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 DB7301389C0 for ; Tue, 12 Feb 2013 09:01:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 351F321C064; Tue, 12 Feb 2013 09:01:24 +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 ACC6721C064 for ; Tue, 12 Feb 2013 09:01:23 +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 ADCFF33E69C for ; Tue, 12 Feb 2013 09:01:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 4B46CE4093 for ; Tue, 12 Feb 2013 09:01:18 +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: <1360568403.b23472af8e6dda4e7040e39916fa896619e417f0.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: ufed-curses-types.c ufed-curses-types.h X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: b23472af8e6dda4e7040e39916fa896619e417f0 X-VCS-Branch: master Date: Tue, 12 Feb 2013 09:01:18 +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: 42fe5b24-1d30-4e66-b885-49fd9613afc0 X-Archives-Hash: 18f14039d8d90636a06acf1456f53fe6 commit: b23472af8e6dda4e7040e39916fa896619e417f0 Author: Sven Eden gmx de> AuthorDate: Mon Feb 11 07:37:27 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Mon Feb 11 07:40:03 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=b23472af Added sixth flag character to addFlagDesc() and new statePkgUse to use it to struct sDesc_. --- ufed-curses-types.c | 5 +++-- ufed-curses-types.h | 13 +++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ufed-curses-types.c b/ufed-curses-types.c index 0d31300..3cdb04d 100644 --- a/ufed-curses-types.c +++ b/ufed-curses-types.c @@ -102,7 +102,7 @@ sFlag* addFlag (sFlag** root, const char* name, int line, int ndesc, const char * @param[in] state '+','-',' ' for global, installed, forced, masked, package - in that order. * @return the full length of the description including package list and separators **/ -size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char state[5]) +size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char state[6]) { size_t result = 3; // space and brackets. if (flag) { @@ -111,7 +111,7 @@ size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char s if (idx < flag->ndesc) { // state is a byte mask. Check it first: - for (int i = 0; i < 5; ++i) { + for (int i = 0; i < 6; ++i) { if (('+' != state[i]) && ('-' != state[i]) && (' ' != state[i])) ERROR_EXIT(-1, "Illegal character '%c' in state string at position %d\n", state[i], i) @@ -125,6 +125,7 @@ size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char s flag->desc[idx].stateForced = state[2]; flag->desc[idx].stateMasked = state[3]; flag->desc[idx].statePackage = state[4]; + flag->desc[idx].statePkgUse = state[5]; // Set flag mask and force status if this is a global and masked/forced description if (flag->desc[idx].isGlobal && ('+' == flag->desc[idx].stateMasked)) diff --git a/ufed-curses-types.h b/ufed-curses-types.h index 4c55532..db61c3c 100644 --- a/ufed-curses-types.h +++ b/ufed-curses-types.h @@ -96,13 +96,14 @@ typedef enum eWin_ { * @brief Describe one description line **/ typedef struct sDesc_ { - char* desc; //!< The description line - bool isGlobal; //!< true if this is the global description and setting - bool isInstalled; //!< global: at least one pkg is installed, local: all in *pkg are installed. - char* pkg; //!< affected packages + char* desc; //!< The description line + bool isGlobal; //!< true if this is the global description and setting + bool isInstalled; //!< global: at least one pkg is installed, local: all in *pkg are installed. + char* pkg; //!< affected packages char stateForced; //!< unforced '-', forced '+' or not set ' ' by *use.force char stateMasked; //!< unmasked '-', masked '+' or not sed ' ' by *use.mask - char statePackage; //!< disabled '-', enabled '+' or not set ' ' by package.use + char statePackage; //!< disabled '-', enabled '+' or not set ' ' by profiles package.use + char statePkgUse; //!< disabled '-', enabled '+' or not set ' ' by users package.use } sDesc; @@ -163,7 +164,7 @@ typedef struct sWindow_ { * ======================================= */ sFlag* addFlag (sFlag** root, const char* name, int line, int ndesc, const char state[2]); -size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char state[5]); +size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char state[6]); void addLineStats (const sFlag* flag, sListStats* stats); void destroyFlag (sFlag** root, sFlag** flag); void genFlagStats (sFlag* flag);