From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RRg1H-00037R-9Z for garchives@archives.gentoo.org; Sat, 19 Nov 2011 08:11:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5818B21C095; Sat, 19 Nov 2011 08:11:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 246A821C089 for ; Sat, 19 Nov 2011 08:11:15 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 969B81B4040 for ; Sat, 19 Nov 2011 08:11:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7DC7080052 for ; Sat, 19 Nov 2011 08:11:13 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/_usage.c X-VCS-Directories: src/rc/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: c21c1f1e59a9e1fe8dbab22ebbf3f574a591e6ba Date: Sat, 19 Nov 2011 08:11:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 90ba330c-78bb-41ff-a9fc-cf56847435ea X-Archives-Hash: 8683686af3f5dd4ee362c9b78bd21db5 commit: c21c1f1e59a9e1fe8dbab22ebbf3f574a591e6ba Author: Mike Frysinger gentoo org> AuthorDate: Sat Nov 19 07:39:08 2011 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sat Nov 19 07:42:41 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3Dc21c1f1e rc: usage: optimize help string alignment output a little Signed-off-by: Mike Frysinger gentoo.org> --- src/rc/_usage.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rc/_usage.c b/src/rc/_usage.c index 1180853..8aa1806 100644 --- a/src/rc/_usage.c +++ b/src/rc/_usage.c @@ -75,8 +75,9 @@ usage(int exit_status) =20 lo =3D p =3D xstrdup(longopts_help[i]); while ((token =3D strsep(&p, "\n"))) { - while (++len < 37) - printf(" "); + len =3D 36 - len; + if (len > 0) + printf("%*s", len, ""); puts(token); len =3D 0; }