aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-19 02:39:08 -0500
committerMike Frysinger <vapier@gentoo.org>2011-11-19 02:42:41 -0500
commitc21c1f1e59a9e1fe8dbab22ebbf3f574a591e6ba (patch)
tree4bf90d1846b9cb84f1cebb3a95748af9eee832c8
parentc7cc685458d22b8fd78a9d8be4c0e7d456ff14a1 (diff)
rc: usage: optimize help string alignment output a little
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--src/rc/_usage.c5
1 files changed, 3 insertions, 2 deletions
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;
}