mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Roman Zippel <zippel@linux-m68k.org>, linux-kernel@vger.kernel.org
Subject: kconfig: remove noise from show_expr
Date: Fri, 31 Dec 2004 00:52:45 +0100	[thread overview]
Message-ID: <20041230235245.GC9450@mars.ravnborg.org> (raw)
In-Reply-To: <20041230235146.GA9450@mars.ravnborg.org>

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/12/31 00:36:09+01:00 sam@mars.ravnborg.org 
#   kconfig: remove noise from show_expr
#   
#   This makes readout more compact when searching for specific symbols
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/kconfig/mconf.c
#   2004/12/31 00:35:50+01:00 sam@mars.ravnborg.org +7 -17
#   avoid printing empty information in show_expr
#   increase buffer size in str_printf - people write that big text blocks
# 
diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
--- a/scripts/kconfig/mconf.c	2004-12-31 00:45:40 +01:00
+++ b/scripts/kconfig/mconf.c	2004-12-31 00:45:40 +01:00
@@ -147,7 +147,7 @@
 static void str_printf(struct gstr *gs, const char *fmt, ...)
 {
 	va_list ap;
-	char s[1024];
+	char s[4096];
 	va_start(ap, fmt);
 	vsnprintf(s, sizeof(s), fmt, ap);
 	str_add(gs, s);
@@ -347,34 +347,24 @@
 
 static void show_expr(struct menu *menu, struct gstr *gs)
 {
-	bool hit = false;
-	str_add(gs, "Depends:\n ");
 	if (menu->prompt->visible.expr) {
-		if (!hit)
-			hit = true;
+		str_add(gs, "\ndepends on:\n ");
 		expr_str(menu->prompt->visible.expr, gs);
 	}
-	if (!hit)
-		str_add(gs, "None");
 	if (menu->sym) {
 		struct property *prop;
-		hit = false;
-		str_add(gs, "\nSelects:\n ");
+		bool hit = false;
 		for_all_properties(menu->sym, prop, P_SELECT) {
-			if (!hit)
+			if (!hit) {
+				str_add(gs, "\nselects:\n ");
 				hit = true;
+			}
 			expr_str(prop->expr, gs);
 		}
-		if (!hit)
-			str_add(gs, "None");
-		hit = false;
-		str_add(gs, "\nSelected by:\n ");
 		if (menu->sym->rev_dep.expr) {
-			hit = true;
+			str_add(gs, "\nselected by:\n ");
 			expr_str(menu->sym->rev_dep.expr, gs);
 		}
-		if (!hit)
-			str_add(gs, "None");
 	}
 }
 

  parent reply	other threads:[~2004-12-30 23:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-30 23:51 kconfig: Sam Ravnborg
2004-12-30 23:52 ` kconfig: avoid temporary file Sam Ravnborg
2005-01-03  0:55   ` Roman Zippel
2005-01-03  5:10     ` Sam Ravnborg
2005-01-05 12:40       ` Roman Zippel
2005-01-05 18:14         ` Sam Ravnborg
2005-01-06 14:53           ` Roman Zippel
2004-12-30 23:52 ` Sam Ravnborg [this message]
2004-12-30 23:53 ` kconfig: help includes dependency information Sam Ravnborg
2005-01-01  4:02   ` Ingo Oeser
2005-01-02 20:16     ` Sam Ravnborg
2005-01-03 19:24       ` Ingo Oeser
2005-01-03  0:34 ` kconfig: Roman Zippel
2005-01-03  5:11   ` kconfig: Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041230235245.GC9450@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome