From ba1f155cdcd759363d00a1d0a9317c720c584d84 Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 25 Oct 1999 18:24:38 +0000 Subject: [PATCH] Lazy allocation of deleted arg bit map. CVS patchset: 3399 CVS date: 1999/10/25 18:24:38 --- popt/po/popt.pot | 2 +- popt/popt.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/popt/po/popt.pot b/popt/po/popt.pot index e0204d7..78c2117 100644 --- a/popt/po/popt.pot +++ b/popt/po/popt.pot @@ -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 \n" "Language-Team: LANGUAGE \n" diff --git a/popt/popt.c b/popt/popt.c index 6b82988..4eeb8fe 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -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; -- 2.7.4