public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Matej Laitl <strohel@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	Roman Zippel <zippel@linux-m68k.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] menuconfig: distinguish between selected-by-another options and comments
Date: Sun, 16 Sep 2007 20:41:10 +0200	[thread overview]
Message-ID: <20070916184110.GB9630@uranus.ravnborg.org> (raw)
In-Reply-To: <200709152004.11930.strohel@gmail.com>

On Sat, Sep 15, 2007 at 08:04:10PM +0200, Matej Laitl wrote:
> menuconfig currently represents options implied by another option ('select'
> directive in Kconfig) by prefixing them with '---'. Unfortunately the same
> notation is used for comments.
This is easy to fix - example below.

Now a comment looks like this

   *** This is a comment ***

Notice the three leading spaces which is where '---' was before.

	Sam

diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index bc5854e..2ee12a7 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -481,6 +481,14 @@ static void build_conf(struct menu *menu)
 				if (single_menu_mode && menu->data)
 					goto conf_childs;
 				return;
+			case P_COMMENT:
+				if (prompt) {
+					child_count++;
+					item_make("   %*c*** %s ***", indent + 1, ' ', prompt);
+					item_set_tag(':');
+					item_set_data(menu);
+				}
+				break;
 			default:
 				if (prompt) {
 					child_count++;

  parent reply	other threads:[~2007-09-16 18:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-15 18:04 [PATCH v2] menuconfig: distinguish between selected-by-another options and comments Matej Laitl
2007-09-15 18:20 ` Matej Laitl
2007-09-15 18:38 ` Jan Engelhardt
2007-09-15 18:44   ` Matej Laitl
2007-09-16  0:34 ` Randy Dunlap
2007-09-16 11:17 ` Sam Ravnborg
2007-09-16 17:10   ` Roman Zippel
2007-09-16 18:09     ` Sam Ravnborg
2007-09-16 19:38       ` Roman Zippel
2007-09-16 17:07 ` Roman Zippel
2007-09-16 17:44 ` [PATCH v3] " Matej Laitl
2007-09-16 17:59   ` Roman Zippel
2007-09-16 18:24     ` Matej Laitl
2007-09-16 19:36       ` Roman Zippel
2007-09-16 21:08         ` Matej Laitl
2007-09-16 18:41 ` Sam Ravnborg [this message]
2007-09-16 19:00   ` [PATCH v2] " Matej Laitl
2007-09-18 18:16 ` [PATCH] kconfig: menuconfig: change "---" items to "-*-", "-M-" or "- -" Matej Laitl

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=20070916184110.GB9630@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=strohel@gmail.com \
    --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