updated libopts to 5.18

This commit is contained in:
Nikos Mavrogiannopoulos
2013-11-05 21:04:56 +01:00
parent 6cfa963a1b
commit e7e29b8396
34 changed files with 1152 additions and 926 deletions

View File

@@ -30,7 +30,6 @@
* 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
#define APOSTROPHE '\''
/* = = = START-STATIC-FORWARD = = = */
static size_t
@@ -292,6 +291,7 @@ print_enumeration(tOptions * pOpts, tOptDesc * pOD)
static void
print_membership(tOptions * pOpts, tOptDesc * pOD)
{
char const * svstr = pOD->optArg.argString;
char const * pz;
uintptr_t val = 1;
printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME,
@@ -299,13 +299,9 @@ print_membership(tOptions * pOpts, tOptDesc * pOD)
pOD->optCookie = (void*)(uintptr_t)~0UL;
(*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD);
/*
* We are building the typeset list. The list returned starts with
* 'none + ' for use by option saving stuff. We must ignore that.
*/
pz = pOD->optArg.argString + 7;
pz = pOD->optArg.argString;
while (*pz != NUL) {
printf("typeset -x -i %s_", pOD->pz_NAME);
printf("readonly %s_", pOD->pz_NAME);
pz = SPN_PLUS_N_SPACE_CHARS(pz);
for (;;) {
@@ -321,8 +317,7 @@ print_membership(tOptions * pOpts, tOptDesc * pOD)
}
AGFREE(pOD->optArg.argString);
pOD->optArg.argString = NULL;
pOD->fOptState &= ~OPTST_ALLOC_ARG;
pOD->optArg.argString = svstr;
}
static void