Lazy allocation of deleted arg bit map.
CVS patchset: 3399 CVS date: 1999/10/25 18:24:38
This commit is contained in:
parent
1cdcd275a8
commit
ba1f155cdc
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 1999-10-25 14:20-0400\n"
|
||||
"POT-Creation-Date: 1999-10-25 14:23-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
|
@ -52,7 +52,7 @@ poptContext poptGetContext(const char * name, int argc, char ** argv,
|
|||
con->os = con->optionStack;
|
||||
con->os->argc = argc;
|
||||
con->os->argv = (const char **)argv; /* XXX don't change the API */
|
||||
con->os->argb = PBM_ALLOC(argc);
|
||||
con->os->argb = NULL;
|
||||
|
||||
if (!(flags & POPT_CONTEXT_KEEP_FIRST))
|
||||
con->os->next = 1; /* skip argv[0] */
|
||||
|
@ -99,7 +99,7 @@ void poptResetContext(poptContext con) {
|
|||
}
|
||||
if (con->os->argb) {
|
||||
PBM_FREE(con->os->argb);
|
||||
con->os->argb = PBM_ALLOC(con->os->argc);
|
||||
con->os->argb = NULL;
|
||||
}
|
||||
con->os->currAlias = NULL;
|
||||
con->os->nextCharArg = NULL;
|
||||
|
@ -197,7 +197,7 @@ static int handleAlias(poptContext con, const char * longName, char shortName,
|
|||
con->os->currAlias = con->aliases + i;
|
||||
poptDupArgv(con->os->currAlias->argc, con->os->currAlias->argv,
|
||||
&con->os->argc, &con->os->argv);
|
||||
con->os->argb = PBM_ALLOC(con->os->argc);
|
||||
con->os->argb = NULL;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ int poptStuffArgs(poptContext con, const char ** argv) {
|
|||
con->os->nextCharArg = NULL;
|
||||
con->os->currAlias = NULL;
|
||||
poptDupArgv(argc, argv, &con->os->argc, &con->os->argv);
|
||||
con->os->argb = PBM_ALLOC(argc);
|
||||
con->os->argb = NULL;
|
||||
con->os->stuffed = 1;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue