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 558A41387C3 for ; Fri, 1 Feb 2013 10:49:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5022921C040; Fri, 1 Feb 2013 10:49:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A7D4C21C029 for ; Fri, 1 Feb 2013 10:49:50 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B458633DCA8 for ; Fri, 1 Feb 2013 10:49:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 53D2BE4089 for ; Fri, 1 Feb 2013 10:49:48 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1359300962.7db268543c3b6c56aec762b68ba0dd8ea762cc3e.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: ufed-curses-checklist.c ufed-curses.c X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: 7db268543c3b6c56aec762b68ba0dd8ea762cc3e X-VCS-Branch: master Date: Fri, 1 Feb 2013 10:49:48 +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: bb317c03-cf09-4166-8622-063916ff8e3f X-Archives-Hash: 31ce5bb6b4b387d8d28ef4fcc6bb1451 commit: 7db268543c3b6c56aec762b68ba0dd8ea762cc3e Author: Sven Eden gmx de> AuthorDate: Sun Jan 27 15:36:02 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Sun Jan 27 15:36:02 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=7db26854 Added the information about global flags affecting at least one installed package. --- ufed-curses-checklist.c | 9 ++++++++- ufed-curses.c | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ufed-curses-checklist.c b/ufed-curses-checklist.c index c483d32..00700bd 100644 --- a/ufed-curses-checklist.c +++ b/ufed-curses-checklist.c @@ -56,6 +56,7 @@ enum mask showMasked = show_unmasked; //!< Set whether to show masked, unmasked enum order pkgOrder = pkgs_left; //!< Set whether to display package lists left or right of the description enum scope showScope = show_all; //!< Set whether global, local or all flags are shown int lineCountGlobal; +int lineCountGlobalInstalled; int lineCountLocal; int lineCountLocalInstalled; int lineCountMasked; @@ -114,6 +115,7 @@ static void read_flags(void) { // Initialize line count per type: lineCountGlobal = 0; + lineCountGlobalInstalled = 0; lineCountLocal = 0; lineCountLocalInstalled = 0; lineCountMasked = 0; @@ -136,7 +138,7 @@ static void read_flags(void) { &on.start, &on.end, &state.start, &state.end, &ndescr) != 1) - ERROR_EXIT(-1, "flag sscanf failed on line\n\"%s\"\n", line); + ERROR_EXIT(-1, "flag sscanf failed on line %d:\n\"%s\"\n", lineNum, line); /* Allocate memory for the struct and the arrays */ // struct @@ -219,6 +221,11 @@ static void read_flags(void) { flag->item.isGlobal = true; ++lineCountGlobal; } + else if ('G' == descState) { + flag->item.isGlobal = true; + flag->isInstalled[i] = true; + ++lineCountGlobalInstalled; + } else if ('l' == descState) { ++lineCountLocal; } diff --git a/ufed-curses.c b/ufed-curses.c index 8b1b53a..997798b 100644 --- a/ufed-curses.c +++ b/ufed-curses.c @@ -32,6 +32,7 @@ extern enum mask showMasked; extern enum order pkgOrder; extern enum scope showScope; extern int lineCountGlobal; +extern int lineCountGlobalInstalled; extern int lineCountLocal; extern int lineCountLocalInstalled; extern int lineCountMasked; @@ -77,7 +78,8 @@ int getListHeight() result += lineCountLocal + lineCountLocalInstalled; } if (show_local != showScope) { - result += lineCountGlobal; + // TODO : add installed/not installed filter + result += lineCountGlobal + lineCountGlobalInstalled; } }