diff -r -u poldek-0.18.7/shell/ls.c poldek-0.18.7-patrys/shell/ls.c --- poldek-0.18.7/shell/ls.c 2004-02-16 20:33:37.000000000 +0100 +++ poldek-0.18.7-patrys/shell/ls.c 2004-12-01 20:00:57.723621464 +0100 @@ -325,35 +325,35 @@ *hdr = '\0'; if (flags & OPT_LS_GROUP) { - snprintf(fmt_hdr, sizeof(fmt_hdr), "%%-%ds%%-%ds\n", - term_width_div2 + term_width_div2/10, (term_width/7)); + snprintf(fmt_hdr, sizeof(fmt_hdr), "%%-%ds %%-%ds\n", + term_width_div2 + term_width_div2/10-1, (term_width/7)); - snprintf(fmt_pkg, sizeof(fmt_pkg), "%%-%ds%%-%ds\n", - term_width_div2 + term_width_div2/10, (term_width/7)); + snprintf(fmt_pkg, sizeof(fmt_pkg), "%%-%ds %%-%ds\n", + term_width_div2 + term_width_div2/10-1, (term_width/7)); snprintf(hdr, sizeof(hdr), fmt_hdr, _("package"), _("group")); } else if (flags & OPT_LS_LONG) { if ((flags & OPT_LS_UPGRADEABLE) == 0) { - snprintf(fmt_hdr, sizeof(fmt_hdr), "%%-%ds%%-%ds %%%ds\n", - term_width_div2 + term_width_div2/10, (term_width/7), + snprintf(fmt_hdr, sizeof(fmt_hdr), "%%-%ds %%-%ds %%%ds\n", + term_width_div2 + term_width_div2/10-1, (term_width/7), (term_width/8) + 2); - snprintf(fmt_pkg, sizeof(fmt_pkg), "%%-%ds%%%ds %%%ds\n", - term_width_div2 + term_width_div2/10, (term_width/7), + snprintf(fmt_pkg, sizeof(fmt_pkg), "%%-%ds %%%ds %%%ds\n", + term_width_div2 + term_width_div2/10-1, (term_width/7), (term_width/8)); snprintf(hdr, sizeof(hdr), fmt_hdr, _("package"), _("build date"), _("size")); } else { - snprintf(fmt_hdr, sizeof(fmt_hdr), "%%-%ds%%-%ds%%-%ds%%%ds\n", - (term_width/2) - 1, (term_width/6) - 1, - (term_width/6) - 1, (term_width/5) - 1); - - snprintf(fmt_pkg, sizeof(fmt_pkg), "%%-%ds%%-%ds%%-%ds%%%ds\n", - (term_width/2) - 1, (term_width/6) - 1, - (term_width/6) - 1, (term_width/6) - 1); + snprintf(fmt_hdr, sizeof(fmt_hdr), "%%-%ds %%-%ds %%-%ds %%%ds\n", + (term_width/2) - 2, (term_width/6) - 2, + (term_width/6) - 2, (term_width/5) - 1); + + snprintf(fmt_pkg, sizeof(fmt_pkg), "%%-%ds %%-%ds %%-%ds %%%ds\n", + (term_width/2) - 2, (term_width/6) - 2, + (term_width/6) - 2, (term_width/6) - 1); if (flags & OPT_LS_INSTALLED) snprintf(hdr, sizeof(hdr), fmt_hdr, _("installed"), @@ -386,6 +386,7 @@ pkg_name = shpkg->nevr; if (npkgs == 0) + if (verbose >= 0) sh_printf_c(out_stream, PRCOLOR_YELLOW, "%s", hdr); if (flags & OPT_LS_LONG) { @@ -432,6 +433,7 @@ npkgs++; } + if (verbose >= 0) if (npkgs) { if ((flags & OPT_LS_LONG) == 0 && out_stream != stdout) { sh_printf_c(out_stream, PRCOLOR_YELLOW,