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 9658D138202 for ; Wed, 11 Sep 2013 06:04:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80943E0C31; Wed, 11 Sep 2013 06:04:10 +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 B16F0E0C31 for ; Wed, 11 Sep 2013 06:04:09 +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 C155133EB22 for ; Wed, 11 Sep 2013 06:04:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D2CCAE545C for ; Wed, 11 Sep 2013 06:04:06 +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: <1378793842.8d940b199f830d1686a67f5cec88aa6b2c1e8a45.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: 8d940b199f830d1686a67f5cec88aa6b2c1e8a45 X-VCS-Branch: master Date: Wed, 11 Sep 2013 06:04:06 +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: 5cbf2285-5d3c-4864-b87a-1fb96e150145 X-Archives-Hash: e26a19960551d17995d0790b802049c9 commit: 8d940b199f830d1686a67f5cec88aa6b2c1e8a45 Author: Sven Eden gmx net> AuthorDate: Tue Sep 10 06:17:22 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Tue Sep 10 06:17:22 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=8d940b19 types: Added altenative description to sFlag --- ufed-curses-types.c | 8 +++++--- ufed-curses-types.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ufed-curses-types.c b/ufed-curses-types.c index a3bc79e..b604b6d 100644 --- a/ufed-curses-types.c +++ b/ufed-curses-types.c @@ -99,10 +99,11 @@ sFlag* addFlag (sFlag** root, const char* name, int line, int ndesc, const char * @param[in,out] flag pointer to the flag to manipulate. Must not be NULL * @param[in] pkg list of affected packages or NULL if no packages are affected * @param[in] desc description line + * @param[in] desc_alt alternative description line * @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[7]) +size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char* desc_alt, const char state[7]) { size_t result = 3; // space and brackets. if (flag) { @@ -118,8 +119,9 @@ size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char s } // Now apply. - if (pkg) flag->desc[idx].pkg = strdup(pkg); - if (desc) flag->desc[idx].desc = strdup(desc); + if (pkg) flag->desc[idx].pkg = strdup(pkg); + if (desc) flag->desc[idx].desc = strdup(desc); + if (desc_alt) flag->desc[idx].desc_alt = strdup(desc_alt); if ('+' == state[0]) flag->desc[idx].isGlobal = true; if ('+' == state[1]) flag->desc[idx].isInstalled = true; flag->desc[idx].stateForced = state[2]; diff --git a/ufed-curses-types.h b/ufed-curses-types.h index af7deec..1fe52d6 100644 --- a/ufed-curses-types.h +++ b/ufed-curses-types.h @@ -97,6 +97,7 @@ typedef enum eWin_ { **/ typedef struct sDesc_ { char* desc; //!< The description line + char* desc_alt; //!< The alternative 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 @@ -166,7 +167,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[6]); +size_t addFlagDesc (sFlag* flag, const char* pkg, const char* desc, const char* desc_alt, const char state[6]); void addLineStats (const sFlag* flag, sListStats* stats); void destroyFlag (sFlag** root, sFlag** flag); void genFlagStats (sFlag* flag);