From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 41E4B1393EA for ; Mon, 10 Mar 2014 08:45:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A2BEE09A5; Mon, 10 Mar 2014 08:45:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 87EF2E09A5 for ; Mon, 10 Mar 2014 08:45:50 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8AC3433FC6E for ; Mon, 10 Mar 2014 08:45:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id ABCFB183B3 for ; Mon, 10 Mar 2014 08:45:47 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1394435323.f9696bacb5d3feb2a1f7fce75e60ca1c692f37bf.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qmerge.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: f9696bacb5d3feb2a1f7fce75e60ca1c692f37bf X-VCS-Branch: master Date: Mon, 10 Mar 2014 08:45:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bf31703f-8d70-410a-a9d5-2ea31a08a1a4 X-Archives-Hash: 7158f5b18e3ba3cb5fab0c4fbc4c1036 commit: f9696bacb5d3feb2a1f7fce75e60ca1c692f37bf Author: Mike Frysinger gentoo org> AuthorDate: Mon Mar 10 07:08:43 2014 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Mar 10 07:08:43 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=f9696bac qmerge: fix color used in displaying downgrades We want to use a darker blue for D status instead of using the same blue color as U status. This also matches portage behavior. --- qmerge.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qmerge.c b/qmerge.c index 572365e..1e07347 100644 --- a/qmerge.c +++ b/qmerge.c @@ -357,6 +357,7 @@ qprint_tree_node(int level, const depend_atom *atom, const struct pkg_t *pkg) char install_ver[126] = ""; char c = 'N'; + const char *color; if (!pretend) return 0; @@ -385,10 +386,13 @@ qprint_tree_node(int level, const depend_atom *atom, const struct pkg_t *pkg) return c; if ((c == 'R' || c == 'D') && update_only && level) return c; - if (c == 'R') - snprintf(buf, sizeof(buf), "%s%c%s", YELLOW, c, NORM); - if (c == 'U' || c == 'D') - snprintf(buf, sizeof(buf), "%s%c%s", BLUE, c, NORM); + switch (c) { + case 'R': color = YELLOW; break; + case 'U': color = BLUE; break; + case 'D': color = DKBLUE; break; + default: color = RED; break; + } + snprintf(buf, sizeof(buf), "%s%c%s", color, c, NORM); #if 0 if (level) { switch (c) {