From c21c1f1e59a9e1fe8dbab22ebbf3f574a591e6ba Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 19 Nov 2011 02:39:08 -0500 Subject: rc: usage: optimize help string alignment output a little Signed-off-by: Mike Frysinger --- src/rc/_usage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/rc') diff --git a/src/rc/_usage.c b/src/rc/_usage.c index 11808532..8aa1806c 100644 --- a/src/rc/_usage.c +++ b/src/rc/_usage.c @@ -75,8 +75,9 @@ usage(int exit_status) lo = p = xstrdup(longopts_help[i]); while ((token = strsep(&p, "\n"))) { - while (++len < 37) - printf(" "); + len = 36 - len; + if (len > 0) + printf("%*s", len, ""); puts(token); len = 0; } -- cgit v1.2.3