Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   Add color to remove.c (http://www.linux-archive.org/archlinux-pacman-development/690771-add-color-remove-c.html)

Daniel Wallace 08-05-2012 09:46 AM

Add color to remove.c
 
Signed-off-by: Daniel Wallace <daniel.wallace@gatech.edu>
---
src/pacman/remove.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 472adb5..28502f2 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -28,6 +28,7 @@
/* pacman */
#include "pacman.h"
#include "util.h"
+#include "color.h"
#include "conf.h"

static int fnmatch_cmp(const void *pattern, const void *string)
@@ -119,7 +120,11 @@ int pacman_remove(alpm_list_t *targets)
for(i = data; i; i = alpm_list_next(i)) {
alpm_depmissing_t *miss = i->data;
char *depstring = alpm_dep_compute_string(miss->depend);
- printf(_(":: %s: requires %s
"), miss->target, depstring);
+ if (config->color) {
+ color_printf(COLOR_DOUBLECOLON, _(":: %s: requires %s
"), miss->target, depstring);
+ } else {
+ printf(_(":: %s: requires %s
"), miss->target, depstring);
+ }
free(depstring);
}
break;
--
1.7.11.4


All times are GMT. The time now is 08:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.