linux-kernel.vger.kernel.org archive mirror
 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: help includes dependency information
Date: Fri, 31 Dec 2004 00:53:09 +0100	[thread overview]
Message-ID: <20041230235309.GD9450@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:43:45+01:00 sam@mars.ravnborg.org 
#   kconfig: help includes dependency information
#   
#   When selecting help on a menu item display
#   "depends on:"
#   "selects:"
#   "selected by:"
#   
#   Only relevant headlines are displayed - so if no "selects:" appear then this menu
#   does not select a specific symbol.
#   Loosly based on a patch by: Cal Peake <cp@absolutedigital.net>
#   
#   Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
# 
# scripts/kconfig/mconf.c
#   2004/12/31 00:43:27+01:00 sam@mars.ravnborg.org +5 -5
#   display
#   "depends on:"
#   "selects:"
#   "selected by:"
#   
#   information when selecting help on a menu
# 
diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
--- a/scripts/kconfig/mconf.c	2004-12-31 00:46:29 +01:00
+++ b/scripts/kconfig/mconf.c	2004-12-31 00:46:29 +01:00
@@ -732,17 +732,17 @@
 static void show_help(struct menu *menu)
 {
 	const char *help;
-	char *helptext;
 	struct symbol *sym = menu->sym;
 
 	help = sym->help;
 	if (!help)
 		help = nohelp_text;
 	if (sym->name) {
-		helptext = malloc(strlen(sym->name) + strlen(help) + 16);
-		sprintf(helptext, "CONFIG_%s:\n\n%s", sym->name, help);
-		show_helptext(menu_get_prompt(menu), helptext);
-		free(helptext);
+		struct gstr str = str_init();
+		str_printf(&str, "CONFIG_%s:\n\n%s", sym->name, help);
+		show_expr(menu, &str);
+		show_helptext(menu_get_prompt(menu), str_get(&str));
+		str_del(&str);
 	} else
 		show_helptext(menu_get_prompt(menu), help);
 }

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

Thread overview: 15+ 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 ` kconfig: remove noise from show_expr Sam Ravnborg
2004-12-30 23:53 ` Sam Ravnborg [this message]
2005-01-01  4:02   ` kconfig: help includes dependency information 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
     [not found] <fa.hcrei7d.knakqt@ifi.uio.no>
     [not found] ` <fa.gau82p1.1g24ton@ifi.uio.no>
2005-01-01  8:58   ` kconfig: help includes dependency information Bodo Eggert

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=20041230235309.GD9450@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;
as well as URLs for NNTP newsgroup(s).