local timezone.
* [Bug 1751] Support for Atari FreeMiNT OS.
* [Bug 1754] --version output should be more verbose.
+* Upgrade to libopts 33.4.8 from AutoGen 5.11.6pre1.
* Suppress ntp-keygen OpenSSL version display for --help, --version,
display both build and runtime OpenSSL versions when they differ.
* Clean up m4 quoting in configure.ac, *.m4 files, resolving
endif
libopts_la_SOURCES = libopts.c
libopts_la_CPPFLAGS = -I$(top_srcdir)
-libopts_la_LDFLAGS = -version-info 33:3:8
+libopts_la_LDFLAGS = -version-info 33:4:8
EXTRA_DIST = \
COPYING.gplv3 COPYING.lgplv3 COPYING.mbsd \
MakeDefs.inc README ag-char-map.h \
- autoopts/usage-txt.h autoopts/options.h autoopts.c \
- autoopts.h boolean.c compat/strchr.c \
- compat/strdup.c compat/compat.h compat/windows-config.h \
- compat/pathfind.c compat/snprintf.c configfile.c \
+ autoopts/options.h autoopts/usage-txt.h autoopts.c \
+ autoopts.h boolean.c compat/windows-config.h \
+ compat/strchr.c compat/pathfind.c compat/snprintf.c \
+ compat/strdup.c compat/compat.h configfile.c \
cook.c enumeration.c environment.c \
file.c genshell.c genshell.h \
load.c m4/liboptschk.m4 m4/libopts.m4 \
/*
- * Character mapping generated 11/18/10 11:54:12
+ * Character mapping generated 12/15/10 17:47:59
*
* This file contains the character classifications
* used by AutoGen and AutoOpts for identifying tokens.
/**
* \file autoopts.c
*
- * Time-stamp: "2010-07-17 10:41:35 bkorb"
+ * Time-stamp: "2010-12-06 14:02:35 bkorb"
*
* This file contains all of the routines that must be linked into
* an executable to use the generated option processing. The optional
#endif
/*
- * handleOption
+ * handle_opt
*
* This routine handles equivalencing, sets the option state flags and
* invokes the handler procedure, if any.
*/
LOCAL tSuccess
-handleOption(tOptions* pOpts, tOptState* pOptState)
+handle_opt(tOptions* pOpts, tOptState* pOptState)
{
/*
* Save a copy of the option procedure pointer.
if (! DO_IMMEDIATELY(optState.flags))
continue;
- if (! SUCCESSFUL(handleOption(pOpts, &optState)))
+ if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
break;
} optionsDone:;
optState.pOD->optOccCt--; /* don't count last time */
}
- if (! SUCCESSFUL(handleOption(pOpts, &optState)))
+ if (! SUCCESSFUL(handle_opt(pOpts, &optState)))
break;
} optionsDone:;
if ((pOpts->fOptSet & OPTPROC_ERRSTOP) != 0)
*
* DO NOT EDIT THIS FILE (options.h)
*
- * It has been AutoGen-ed November 16, 2010 at 05:41:49 PM by AutoGen 5.11.2pre7
+ * It has been AutoGen-ed December 15, 2010 at 05:48:03 PM by AutoGen 5.11.5
* From the definitions funcs.def
* and the template file options_h
*
* See the relevant generated header file to determine which and what
* values for "opt_name" are available.
*/
-#define OPTIONS_STRUCT_VERSION 135171
-#define OPTIONS_VERSION_STRING "33:3:8"
+#define OPTIONS_STRUCT_VERSION 135172
+#define OPTIONS_VERSION_STRING "33:4:8"
#define OPTIONS_MINIMUM_VERSION 102400
#define OPTIONS_MIN_VER_STRING "25:0:0"
extern const tOptionValue* configFileLoad(char const*);
-/* From: configfile.c line 934
+/* From: configfile.c line 936
*
* optionFileLoad - Load the locatable config files, in order
*
*
* DO NOT EDIT THIS FILE (usage-txt.h)
*
- * It has been AutoGen-ed November 16, 2010 at 05:41:47 PM by AutoGen 5.11.2pre7
+ * It has been AutoGen-ed December 15, 2010 at 05:48:01 PM by AutoGen 5.11.5
* From the definitions usage-txt.def
* and the template file usage-txt.tpl
*
/**
* \file configfile.c
*
- * Time-stamp: "2010-11-18 08:24:46 bkorb"
+ * Time-stamp: "2010-12-10 11:15:09 bkorb"
*
* configuration/rc/ini file handling.
*
else
fputs(zAO_Sml, stderr);
+ fputs(ShellAsString(AO_CURRENT) ":"
+ ShellAsString(AO_REVISION) ":"
+ ShellAsString(AO_AGE) "\n", stderr);
return FAILURE;
}
/**
* \file environment.c
*
- * Time-stamp: "2010-07-17 10:39:52 bkorb"
+ * Time-stamp: "2010-12-06 15:01:45 bkorb"
*
* This file contains all of the routines that must be linked into
* an executable to use the generated option processing. The optional
/* = = = START-STATIC-FORWARD = = = */
static void
-checkEnvOpt(tOptState * os, char * env_name,
+do_env_opt(tOptState * os, char * env_name,
tOptions* pOpts, teEnvPresetType type);
/* = = = END-STATIC-FORWARD = = = */
}
static void
-checkEnvOpt(tOptState * os, char * env_name,
+do_env_opt(tOptState * os, char * env_name,
tOptions* pOpts, teEnvPresetType type)
{
os->pzOptArg = getenv(env_name);
if (os->pzOptArg == NULL)
return;
- os->flags = OPTST_PRESET | OPTST_ALLOC_ARG | os->pOD->fOptState;
- os->optType = TOPT_UNDEFINED;
+ os->flags = OPTST_PRESET | OPTST_ALLOC_ARG | os->pOD->fOptState;
+ os->optType = TOPT_UNDEFINED;
if ( (os->pOD->pz_DisablePfx != NULL)
&& (streqvcmp(os->pzOptArg, os->pOD->pz_DisablePfx) == 0)) {
* The interpretation of the option value depends
* on the type of value argument the option takes
*/
- if (os->pzOptArg != NULL) {
- if (OPTST_GET_ARGTYPE(os->pOD->fOptState) == OPARG_TYPE_NONE) {
- os->pzOptArg = NULL;
- } else if ( (os->pOD->fOptState & OPTST_ARG_OPTIONAL)
- && (*os->pzOptArg == NUL)) {
- os->pzOptArg = NULL;
- } else if (*os->pzOptArg == NUL) {
- os->pzOptArg = zNil;
- } else {
- AGDUPSTR(os->pzOptArg, os->pzOptArg, "option argument");
- os->flags |= OPTST_ALLOC_ARG;
- }
+ if (OPTST_GET_ARGTYPE(os->pOD->fOptState) == OPARG_TYPE_NONE) {
+ /*
+ * Ignore any value.
+ */
+ os->pzOptArg = NULL;
+
+ } else if (os->pzOptArg[0] == NUL) {
+ /*
+ * If the argument is the empty string and the argument is
+ * optional, then treat it as if the option was not specified.
+ */
+ if ((os->pOD->fOptState & OPTST_ARG_OPTIONAL) == 0)
+ return;
+ os->pzOptArg = NULL;
+
+ } else {
+ AGDUPSTR(os->pzOptArg, os->pzOptArg, "option argument");
+ os->flags |= OPTST_ALLOC_ARG;
}
- handleOption(pOpts, os);
+ handle_opt(pOpts, os);
}
/*
* Set up the option state
*/
strcpy(pzFlagName, st.pOD->pz_NAME);
- checkEnvOpt(&st, zEnvName, pOpts, type);
+ do_env_opt(&st, zEnvName, pOpts, type);
}
/*
if (st.pOD->pz_NAME != NULL) {
strcpy(pzFlagName, st.pOD->pz_NAME);
- checkEnvOpt(&st, zEnvName, pOpts, type);
+ do_env_opt(&st, zEnvName, pOpts, type);
}
}
}
*
* DO NOT EDIT THIS FILE (genshell.c)
*
- * It has been AutoGen-ed November 18, 2010 at 11:54:12 AM by AutoGen 5.11.2
+ * It has been AutoGen-ed December 15, 2010 at 05:48:00 PM by AutoGen 5.11.5
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 33:3:8 templates.
+ * Generated from AutoOpts 33:4:8 templates.
*
* AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
*
* DO NOT EDIT THIS FILE (genshell.h)
*
- * It has been AutoGen-ed November 18, 2010 at 11:54:12 AM by AutoGen 5.11.2
+ * It has been AutoGen-ed December 15, 2010 at 05:48:00 PM by AutoGen 5.11.5
* From the definitions genshell.def
* and the template file options
*
- * Generated from AutoOpts 33:3:8 templates.
+ * Generated from AutoOpts 33:4:8 templates.
*
* AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen
* tolerable version is at least as old as what was current when the header
* template was released.
*/
-#define AO_TEMPLATE_VERSION 135171
+#define AO_TEMPLATE_VERSION 135172
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
DESC(n).fOptState |= OPTST_DISABLED; \
DESC(n).optCookie = NULL )
+/* * * * * *
+ *
+ * Enumeration of genshellopt exit codes
+ */
+typedef enum {
+ GENSHELLOPT_EXIT_SUCCESS = 0,
+ GENSHELLOPT_EXIT_FAILURE = 1
+} genshellopt_exit_code_t;
+
/* * * * * *
*
* Interface defines for specific options.
genshelloptOptions.pzCurOpt = NULL)
#define START_OPT RESTART_OPT(1)
#define USAGE(c) (*genshelloptOptions.pUsageProc)(&genshelloptOptions, c)
-/* extracted from /old-home/bkorb/ag/ag/autoopts/tpl/opthead.tpl near line 408 */
+/* extracted from /old-home/bkorb/ag/ag/autoopts/tpl/opthead.tpl near line 435 */
/* * * * * *
*
/**
* \file load.c
- * Time-stamp: "2010-07-17 10:38:19 bkorb"
+ * Time-stamp: "2010-12-06 14:03:01 bkorb"
*
* This file contains the routines that deal with processing text strings
* for options, either from a NUL-terminated string passed in or from an
{
tOptionLoadMode sv = option_load_mode;
option_load_mode = load_mode;
- handleOption(pOpts, pOS);
+ handle_opt(pOpts, pOS);
option_load_mode = sv;
}
}
dnl
dnl DO NOT EDIT THIS FILE (libopts.m4)
dnl
-dnl It has been AutoGen-ed November 16, 2010 at 05:41:43 PM by AutoGen 5.11.2pre7
+dnl It has been AutoGen-ed December 15, 2010 at 05:47:57 PM by AutoGen 5.11.5
dnl From the definitions libopts.def
dnl and the template file conftest.tpl
dnl
dnl do always before generated macros:
dnl
AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
- AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_HEADER_STDC])
AC_HEADER_DIRENT
# =================
AC_FUNC_VPRINTF
AC_FUNC_FORK
AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
- strrchr strsignal])
+ strrchr strsignal])
])
dnl
AC_DEFUN([INVOKE_LIBOPTS_MACROS],[
- AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])dnl
+ AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
# Check to see if a reg expr header is specified.
LIBOPTS_WITH_REGEX_HEADER
dnl Only one option is supported, [skip-makefile], which
dnl conditionalizes away the AC_CONFIG_FILES(libopts-path/Makefile).
dnl
-dnl Time-stamp: "2010-02-24 08:37:21 bkorb"
+dnl Time-stamp: "2010-11-29 15:45:54 bkorb"
dnl
dnl If autoopts-config works, add the linking information to LIBS.
dnl Otherwise, add ``libopts-${ao_rev}'' to SUBDIRS and run all
dnl Default to system libopts
dnl
AC_DEFUN([LIBOPTS_CHECK],[
- AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])dnl
+ AC_REQUIRE([INVOKE_LIBOPTS_MACROS_FIRST])
[NEED_LIBOPTS_DIR='']
m4_pushdef([AO_Libopts_Dir],
[ifelse($1, , [libopts], [$1])])
-# liboptschk.m4 serial 1 (autogen - 5.7.3)
+# liboptschk.m4 serial 2 (autogen - 5.11.4)
dnl Copyright (c) 2005-2010 by Bruce Korb - all rights reserved
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-
-dnl Time-stamp: "2010-02-24 08:38:55 bkorb"
-
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ(2.50)
-
+dnl
+dnl Time-stamp: "2010-12-07 12:57:56 bkorb"
+dnl
AC_DEFUN([ag_FIND_LIBOPTS],
- [if test "X${ac_cv_header_autoopts_options_h}" == Xno
+ [if test "X${ac_cv_header_autoopts_options_h}" = Xno
+ then :
+ else
+ f=`autoopts-config cflags` 2>/dev/null
+ if test X"${f}" = X
then
:
else
- f=`autoopts-config cflags` 2>/dev/null
- test X"${f}" = X && f=`libopts-config cflags` 2>/dev/null
- if test X"${f}" = X
- then
- :
- else
- AC_DEFINE([HAVE_LIBOPTS],[1],[define if we can find libopts])
- CFLAGS="${CFLAGS} ${f}"
- f=`autoopts-config ldflags` 2>/dev/null
- test X"${f}" = X && f=`libopts-config ldflags` 2>/dev/null
- LIBS="${LIBS} ${f}"
- fi
- fi])
+ AC_DEFINE([HAVE_LIBOPTS],[1],[define if we can find libopts])
+ CFLAGS="${CFLAGS} ${f}"
+ ao_CFLAGS="${f}"
+ AC_SUBST(ao_CFLAGS)
+
+ f=`autoopts-config ldflags` 2>/dev/null
+ LIBS="${LIBS} ${f}"
+ ao_LIBS="${f}"
+ AC_SUBST(ao_LIBS)
+ fi
+ fi])
/* -*- buffer-read-only: t -*- vi: set ro:
*
* Prototypes for autoopts
- * Generated Thu Nov 18 11:54:20 PST 2010
+ * Generated Wed Dec 15 17:48:08 PST 2010
*/
#ifndef AUTOOPTS_PROTO_H_GUARD
#define AUTOOPTS_PROTO_H_GUARD 1
ao_strdup(char const *str);
LOCAL tSuccess
-handleOption(tOptions* pOpts, tOptState* pOptState);
+handle_opt(tOptions* pOpts, tOptState* pOptState);
LOCAL tSuccess
longOptionFind(tOptions* pOpts, char* pzOptName, tOptState* pOptState);
/*
- * Generated header for gperf generated source Thu Nov 18 11:54:12 PST 2010
+ * Generated header for gperf generated source Wed Dec 15 17:48:00 PST 2010
* This file enumerates the list of names and declares the
* procedure for mapping string names to the enum value.
*/
/*
- * Generated header for gperf generated source Thu Nov 18 11:54:12 PST 2010
+ * Generated header for gperf generated source Wed Dec 15 17:47:59 PST 2010
* This file enumerates the list of names and declares the
* procedure for mapping string names to the enum value.
*/