From 68a0223c4e5dab84ea0b33370d5c854fc074d5f3 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 2 Aug 2012 14:37:15 +0200 Subject: [PATCH] xbps-repo: fix the 'search' target to show a consistent output for inst/uninst pkgs. Fixes issue #28. --- bin/xbps-repo/show.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/xbps-repo/show.c b/bin/xbps-repo/show.c index 19bd33a2..0b7faa5f 100644 --- a/bin/xbps-repo/show.c +++ b/bin/xbps-repo/show.c @@ -129,21 +129,21 @@ show_pkg_namedesc(struct xbps_handle *xhp, tmp[x] = '\0'; if (xbps_pkgdb_get_pkgd_by_pkgver(xhp, pkgver)) - inststr = "[*] "; + inststr = "[*]"; else - inststr = "[ ] "; + inststr = "[-]"; len = strlen(inststr) + strlen(tmp) + strlen(desc) + 1; if (len > rsd->maxcols) { out = malloc(rsd->maxcols); assert(out); - snprintf(out, rsd->maxcols-2, "%s%s %s", + snprintf(out, rsd->maxcols-2, "%s %s %s", inststr, tmp, desc); strncat(out, "...", rsd->maxcols); printf("%s\n", out); free(out); } else { - printf("%s%s %s\n", inststr, tmp, desc); + printf("%s %s %s\n", inststr, tmp, desc); } } }