* dump_setup.cc (dump_setup): Avoid trailing spaces on package-list.

This commit is contained in:
Corinna Vinschen 2004-09-22 11:50:51 +00:00
parent 32e73f4dd0
commit 71de401447
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2004-09-22 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
Corinna Vinschen <corinna@vinschen.de>
* dump_setup.cc (dump_setup): Avoid trailing spaces on package-list.
2004-09-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* getfacl.c (main): Correct layout when nopt is set.

View File

@ -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);
}