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 44E5F1389C0 for ; Tue, 12 Feb 2013 09:01:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 35F0D21C06E; Tue, 12 Feb 2013 09:01:29 +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 AA7DE21C077 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 C4D8333E6A1 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 0C133E409D for ; Tue, 12 Feb 2013 09:01:19 +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: <1360604544.6f41b3dd0f6d64d5120b18c2a10dc2911a47682f.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: 6f41b3dd0f6d64d5120b18c2a10dc2911a47682f X-VCS-Branch: master Date: Tue, 12 Feb 2013 09:01:19 +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: 8d3ed872-2d9a-4f2c-ae6a-d4b7c256b5e0 X-Archives-Hash: ec585025c0c70f3fbc85ec6bb151e189 commit: 6f41b3dd0f6d64d5120b18c2a10dc2911a47682f Author: Sven Eden gmx de> AuthorDate: Mon Feb 11 17:42:24 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Mon Feb 11 17:42:24 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=6f41b3dd Added local "default" setting from IUSE to struct sDesc_ --- ufed-curses-types.c | 9 +++++---- ufed-curses-types.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ufed-curses-types.c b/ufed-curses-types.c index 3cdb04d..a3bc79e 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[6]) +size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char state[7]) { 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 < 6; ++i) { + for (int i = 0; i < 7; ++i) { if (('+' != state[i]) && ('-' != state[i]) && (' ' != state[i])) ERROR_EXIT(-1, "Illegal character '%c' in state string at position %d\n", state[i], i) @@ -124,8 +124,9 @@ size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char s if ('+' == state[1]) flag->desc[idx].isInstalled = true; flag->desc[idx].stateForced = state[2]; flag->desc[idx].stateMasked = state[3]; - flag->desc[idx].statePackage = state[4]; - flag->desc[idx].statePkgUse = state[5]; + flag->desc[idx].stateDefault = state[4]; + flag->desc[idx].statePackage = state[5]; + flag->desc[idx].statePkgUse = state[6]; // 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 db61c3c..7eb7991 100644 --- a/ufed-curses-types.h +++ b/ufed-curses-types.h @@ -102,6 +102,7 @@ typedef struct sDesc_ { 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 stateDefault; //!< disabled '-', enabled '+' or not set ' ' ebuilds IUSE (installed packages only) char statePackage; //!< disabled '-', enabled '+' or not set ' ' by profiles package.use char statePkgUse; //!< disabled '-', enabled '+' or not set ' ' by users package.use } sDesc;