From: Corinna Vinschen Date: Wed, 22 Sep 2004 11:50:51 +0000 (+0000) Subject: * dump_setup.cc (dump_setup): Avoid trailing spaces on package-list. X-Git-Tag: gdb_6_3-20041019-branchpoint~70 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=71de40144754bbc705bd7ee9e8e1a2bf05df2c44;p=newlib-cygwin.git * dump_setup.cc (dump_setup): Avoid trailing spaces on package-list. --- diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index de0be5ce3..46c6c8a47 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2004-09-22 Bas van Gompel + Corinna Vinschen + + * dump_setup.cc (dump_setup): Avoid trailing spaces on package-list. + 2004-09-15 Bas van Gompel * getfacl.c (main): Correct layout when nopt is set. diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc index 11d32c4af..734650e1f 100644 --- a/winsup/utils/dump_setup.cc +++ b/winsup/utils/dump_setup.cc @@ -392,12 +392,19 @@ dump_setup (int verbose, char **argv, bool check_files) puts (""); } - printf ("%-*s %-*s %s\n", package_len, "Package", version_len, "Version", check_files?"Status":""); + printf ("%-*s %-*s%s\n", package_len, "Package", + check_files ? version_len : 7, "Version", + check_files ? " Status" : ""); for (int i = 0; packages[i].name; i++) { - printf ("%-*s %-*s %s\n", package_len, packages[i].name, version_len, - packages[i].ver, check_files ? - (check_package_files (verbose, packages[i].name) ? "OK" : "Incomplete") : ""); + if (check_files) + printf ("%-*s %-*s%s\n", package_len, packages[i].name, + version_len, packages[i].ver, + check_package_files (verbose, packages[i].name) + ? " OK" : " Incomplete"); + else + printf ("%-*s %-*s\n", package_len, packages[i].name, + strlen(packages[i].ver), packages[i].ver); fflush(stdout); }