updated libopts

This commit is contained in:
Nikos Mavrogiannopoulos
2013-04-28 15:16:15 +03:00
parent fed7861b89
commit 66d9e9404d
59 changed files with 7427 additions and 4770 deletions
+20 -11
View File
@@ -2,11 +2,13 @@
/**
* \file time.c
*
* Time-stamp: "2012-01-29 12:52:31 bkorb"
*
* @addtogroup autoopts
* @{
*/
/*
* This file is part of AutoOpts, a companion to AutoGen.
* AutoOpts is free software.
* AutoOpts is Copyright (c) 1992-2012 by Bruce Korb - all rights reserved
* AutoOpts is Copyright (C) 1992-2013 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
@@ -18,11 +20,11 @@
* The Modified Berkeley Software Distribution License
* See the file "COPYING.mbsd"
*
* These files have the following md5sums:
* These files have the following sha256 sums:
*
* 43b91e8ca915626ed3818ffb1b71248b pkg/libopts/COPYING.gplv3
* 06a1a2e4760c90ea5e1dad8dfaac4d39 pkg/libopts/COPYING.lgplv3
* 66a5cedaf62c4b2637025f049f9b826f pkg/libopts/COPYING.mbsd
* 8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95 COPYING.gplv3
* 4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b COPYING.lgplv3
* 13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239 COPYING.mbsd
*/
/*=export_func optionTimeVal
@@ -40,6 +42,9 @@ optionTimeVal(tOptions * pOpts, tOptDesc * pOD)
{
time_t val;
if (pOpts <= OPTPROC_EMIT_LIMIT)
return;
if ((pOD->fOptState & OPTST_RESET) != 0)
return;
@@ -55,7 +60,7 @@ optionTimeVal(tOptions * pOpts, tOptDesc * pOD)
pOD->fOptState &= ~OPTST_ALLOC_ARG;
}
pOD->optArg.argInt = (unsigned long)val;
pOD->optArg.argInt = (long)val;
}
/*=export_func optionTimeDate
@@ -72,6 +77,9 @@ void
optionTimeDate(tOptions * pOpts, tOptDesc * pOD)
{
#if defined(HAVE_GETDATE_R) && defined(HAVE_PUTENV)
if (pOpts <= OPTPROC_EMIT_LIMIT)
return;
if ((! HAS_pzPkgDataDir(pOpts)) || (pOpts->pzPkgDataDir == NULL))
goto default_action;
@@ -121,14 +129,15 @@ optionTimeDate(tOptions * pOpts, tOptDesc * pOD)
}
return;
default_action:
default_action:
#endif
optionTimeVal(pOpts, pOD);
if (pOD->optArg.argInt != BAD_TIME)
pOD->optArg.argInt += (unsigned long)time(NULL);
pOD->optArg.argInt += (long)time(NULL);
}
/*
/** @}
*
* Local Variables:
* mode: C
* c-file-style: "stroustrup"