mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] menu: Align entries
Date: Wed, 19 Jun 2013 22:53:40 +0200	[thread overview]
Message-ID: <1371675222-25433-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1371675222-25433-1-git-send-email-s.hauer@pengutronix.de>

More than 9 menu entries in are single menu are not aligned anymore, like
this:

8 entry8
9 entry9
10 entry10

Use %2d in the printf format specifier to align more than 9 entries.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/menu.c b/common/menu.c
index a672e59..1f0ffec 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -175,7 +175,7 @@ static void print_menu_entry(struct menu *m, struct menu_entry *me,
 		puts("   ");
 	}
 
-	printf(" %d: ", me->num);
+	printf(" %2d: ", me->num);
 	if (selected)
 		puts("\e[7m");
 
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-06-19 20:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 20:53 Some small menu updates Sascha Hauer
2013-06-19 20:53 ` Sascha Hauer [this message]
2013-06-19 20:53 ` [PATCH 2/3] Fix gotoXY argument order Sascha Hauer
2013-06-19 20:53 ` [PATCH 3/3] menu: Make action callback optional Sascha Hauer

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=1371675222-25433-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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