diff options
author | Sven Eden <sven.eden@gmx.de> | 2013-02-11 18:42:24 +0100 |
---|---|---|
committer | Sven Eden <sven.eden@gmx.de> | 2013-02-11 18:42:24 +0100 |
commit | 6f41b3dd0f6d64d5120b18c2a10dc2911a47682f (patch) | |
tree | e1c76843d983b5e6e58bf387ca93ce615c9369c4 /ufed-curses-types.c | |
parent | Added local flags "default" setting from IUSE to . Changed the detection of "... (diff) | |
download | ufed-6f41b3dd0f6d64d5120b18c2a10dc2911a47682f.tar.gz ufed-6f41b3dd0f6d64d5120b18c2a10dc2911a47682f.tar.bz2 ufed-6f41b3dd0f6d64d5120b18c2a10dc2911a47682f.zip |
Added local "default" setting from IUSE to struct sDesc_
Diffstat (limited to 'ufed-curses-types.c')
-rw-r--r-- | ufed-curses-types.c | 9 |
1 files changed, 5 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)) |