libopts: updated to 5.18.6

This commit is contained in:
Nikos Mavrogiannopoulos
2015-11-28 20:03:09 +01:00
parent 3e5a78d500
commit 0ba6330d37
57 changed files with 756 additions and 712 deletions

View File

@@ -8,7 +8,7 @@
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
* AutoOpts is Copyright (C) 1992-2014 by Bruce Korb - all rights reserved
* AutoOpts is Copyright (C) 1992-2015 by Bruce Korb - all rights reserved
*
* AutoOpts is available under any one of two licenses. The license
* in use must be one of these two and the choice is under the control
@@ -31,8 +31,8 @@
* private:
*
* what: process an option with a time duration.
* arg: + tOptions* + opts + program options descriptor +
* arg: + tOptDesc* + od + the descriptor for this arg +
* arg: + tOptions * + opts + program options descriptor +
* arg: + tOptDesc * + od + the descriptor for this arg +
*
* doc:
* Decipher a time duration value.
@@ -64,8 +64,8 @@ optionTimeVal(tOptions * opts, tOptDesc * od)
* private:
*
* what: process an option with a time and date.
* arg: + tOptions* + opts + program options descriptor +
* arg: + tOptDesc* + od + the descriptor for this arg +
* arg: + tOptions * + opts + program options descriptor +
* arg: + tOptDesc * + od + the descriptor for this arg +
*
* doc:
* Decipher a time and date value.
@@ -90,8 +90,10 @@ optionTimeDate(tOptions * opts, tOptDesc * od)
if (envptr == NULL) {
static char const fmt[] = "DATEMSK=%s/datemsk";
envptr = AGALOC(sizeof(fmt) + strlen(opts->pzPkgDataDir), fmt);
sprintf(envptr, fmt, opts->pzPkgDataDir);
size_t sz = sizeof(fmt) + strlen(opts->pzPkgDataDir);
envptr = AGALOC(sz, fmt);
if (snprintf(envptr, sz, fmt, opts->pzPkgDataDir) >= sz)
option_exits(EXIT_FAILURE);
putenv(envptr);
}