/*   -*- buffer-read-only: t -*- vi: set ro:
 *
 *  DO NOT EDIT THIS FILE   (opts.c)
 *
 *  It has been AutoGen-ed
 *  From the definitions    opts.def
 *  and the template file   options
 *
 * Generated from AutoOpts 41:1:16 templates.
 *
 *  AutoOpts is a copyrighted work.  This source file is not encumbered
 *  by AutoOpts licensing, but is provided under the licensing terms chosen
 *  by the autogen author or copyright holder.  AutoOpts is
 *  licensed under the terms of the LGPL.  The redistributable library
 *  (``libopts'') is licensed under the terms of either the LGPL or, at the
 *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
 *  for details.
 *
 * The autogen program is copyrighted and licensed
 * under the following terms:
 *
 *  Copyright (C) 1992-2015 Bruce Korb, all rights reserved.
 *  This is free software. It is licensed for use, modification and
 *  redistribution under the terms of the GNU General Public License,
 *  version 3 or later <http://gnu.org/licenses/gpl.html>
 *
 *  autogen is free software: you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  autogen is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *  See the GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
/** \file opts.c
 *  \addtogroup autogen
 *  @{
 */

#ifndef __doxygen__
#define OPTION_CODE_COMPILE 1
#include "opts.h"
#include <sys/types.h>

#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

#ifdef  __cplusplus
extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright      (autogen_opt_strs+0)
#define zLicenseDescrip (autogen_opt_strs+272)

/*
 *  global included definitions
 */

#include "autogen.h"
#ifdef HAVE_DLOPEN
# ifdef HAVE_DLFCN_H
#  include <dlfcn.h>
# else
   extern void * dlopen(char const *,int);
# endif

# ifndef  RTLD_GLOBAL
#  define RTLD_GLOBAL 0
# endif

# ifndef  RTLD_NOW
#  ifdef  RTLD_LAZY
#   define RTLD_NOW DL_LAZY
#  else
#   define RTLD_NOW 0
#  endif
# endif
#endif

#if HAVE_CTYPE_H
# include <ctype.h>
#else
# define isspace(_c)  0
#endif

typedef void (init_proc_t)(void);
char const * tpl_fname  = NULL;
bool      trace_is_to_pipe = false;

#ifndef NULL
#  define NULL 0
#endif

/**
 *  static const strings for autogen options
 */
static char const autogen_opt_strs[3237] =
/*     0 */ "autogen (GNU AutoGen) 5.18.12\n"
            "Copyright (C) 1992-2015 Bruce Korb, all rights reserved.\n"
            "This is free software. It is licensed for use, modification and\n"
            "redistribution under the terms of the GNU General Public License,\n"
            "version 3 or later <http://gnu.org/licenses/gpl.html>\n\0"
/*   272 */ "autogen is free software: you can redistribute it and/or modify it under\n"
            "the terms of the GNU General Public License as published by the Free\n"
            "Software Foundation, either version 3 of the License, or (at your option)\n"
            "any later version.\n\n"
            "autogen is distributed in the hope that it will be useful, but WITHOUT ANY\n"
            "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
            "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n"
            "details.\n\n"
            "You should have received a copy of the GNU General Public License along\n"
            "with this program.  If not, see <http://www.gnu.org/licenses/>.\n\0"
/*   875 */ "The following options select definitions, templates and scheme functions\n"
            "to use:\0"
/*   956 */ "Search for templates in DIR\0"
/*   984 */ "TEMPL_DIRS\0"
/*   995 */ "templ-dirs\0"
/*  1006 */ "Use TPL-FILE for the template\0"
/*  1036 */ "OVERRIDE_TPL\0"
/*  1049 */ "override-tpl\0"
/*  1062 */ "Load AutoGen macros from TPL-FILE (deprecated)\0"
/*  1109 */ "LIB_TEMPLATE\0"
/*  1122 */ "lib-template\0"
/*  1135 */ "Read definitions from FILE\0"
/*  1162 */ "DEFINITIONS\0"
/*  1174 */ "no-definitions\0"
/*  1189 */ "no\0"
/*  1192 */ "name or path name of shell to use\0"
/*  1226 */ "SHELL\0"
/*  1232 */ "shell\0"
/*  1238 */ "Do not use in-mem streams\0"
/*  1264 */ "NO_FMEMOPEN\0"
/*  1276 */ "no-fmemopen\0"
/*  1288 */ "characters considered equivalent\0"
/*  1321 */ "EQUATE\0"
/*  1328 */ "equate\0"
/*  1335 */ "_-^\0"
/*  1339 */ "The following options modify how output is handled:\0"
/*  1391 */ "Specify NAME as the base name for output\0"
/*  1432 */ "BASE_NAME\0"
/*  1442 */ "base-name\0"
/*  1452 */ "set mod times to latest source\0"
/*  1483 */ "SOURCE_TIME\0"
/*  1495 */ "no-source-time\0"
/*  1510 */ "Allow output files to be writable\0"
/*  1544 */ "WRITABLE\0"
/*  1553 */ "not-writable\0"
/*  1566 */ "not\0"
/*  1570 */ "The following options are often useful while debugging new templates:\0"
/*  1640 */ "Limit on increment loops\0"
/*  1665 */ "LOOP_LIMIT\0"
/*  1676 */ "loop-limit\0"
/*  1687 */ "Limit server shell operations to SECONDS\0"
/*  1728 */ "TIMEOUT\0"
/*  1736 */ "timeout\0"
/*  1744 */ "tracing level of detail\0"
/*  1768 */ "TRACE\0"
/*  1774 */ "trace\0"
/*  1780 */ "tracing output file or filter\0"
/*  1810 */ "TRACE_OUT\0"
/*  1820 */ "trace-out\0"
/*  1830 */ "Show the definition tree\0"
/*  1855 */ "SHOW_DEFS\0"
/*  1865 */ "show-defs\0"
/*  1875 */ "Show the definitions used\0"
/*  1901 */ "USED_DEFINES\0"
/*  1914 */ "used-defines\0"
/*  1927 */ "Leave a core dump on a failure exit\0"
/*  1963 */ "CORE\0"
/*  1968 */ "core\0"
/*  1973 */ "These options can be used to control what gets processed in the\n"
            "definitions files and template files:\0"
/*  2075 */ "Skip the file with this SUFFIX\0"
/*  2106 */ "SKIP_SUFFIX\0"
/*  2118 */ "skip-suffix\0"
/*  2130 */ "specify this output suffix\0"
/*  2157 */ "SELECT_SUFFIX\0"
/*  2171 */ "select-suffix\0"
/*  2185 */ "name to add to definition list\0"
/*  2216 */ "DEFINE\0"
/*  2223 */ "define\0"
/*  2230 */ "definition list removal pattern\0"
/*  2262 */ "UNDEFINE\0"
/*  2271 */ "undefine\0"
/*  2280 */ "This option is used to automate dependency tracking:\0"
/*  2333 */ "emit make dependency file\0"
/*  2359 */ "MAKE_DEP\0"
/*  2368 */ "make-dep\0"
/*  2377 */ "help, version and option handling:\0"
/*  2412 */ "display extended usage information and exit\0"
/*  2456 */ "help\0"
/*  2461 */ "extended usage information passed thru pager\0"
/*  2506 */ "more-help\0"
/*  2516 */ "output version information and exit\0"
/*  2552 */ "version\0"
/*  2560 */ "reset an option's state\0"
/*  2584 */ "reset-option\0"
/*  2597 */ "abbreviated usage to stdout\0"
/*  2625 */ "usage\0"
/*  2631 */ "save the option state to a config file\0"
/*  2670 */ "save-opts\0"
/*  2680 */ "load options from a config file\0"
/*  2712 */ "LOAD_OPTS\0"
/*  2722 */ "no-load-opts\0"
/*  2735 */ "AUTOGEN\0"
/*  2743 */ "autogen (GNU AutoGen) - The Automated Program Generator - Ver. 5.18.12\n"
            "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ <def-file> ]\n\0"
/*  2887 */ "$HOME\0"
/*  2893 */ ".\0"
/*  2895 */ ".autogenrc\0"
/*  2906 */ "autogen-users@lists.sourceforge.net\0"
/*  2942 */ "AutoGen creates text files from templates using external definitions.\n\0"
/*  3013 */ "AutoGen is a tool designed for generating program files that contain\n"
            "repetitive text with varied substitutions.\n\0"
/*  3126 */ "autogen (GNU AutoGen) 5.18.12\0"
/*  3156 */ "nothing\0"
/*  3164 */ "debug-message\0"
/*  3178 */ "server-shell\0"
/*  3191 */ "templates\0"
/*  3201 */ "block-macros\0"
/*  3214 */ "expressions\0"
/*  3226 */ "everything";

/**
 *  input-select option description:
 */
/** input-select option separation text */
#define INPUT_SELECT_DESC      (autogen_opt_strs+875)
#define INPUT_SELECT_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/**
 *  templ-dirs option description:
 */
/* TRANSLATORS: the option argument is a file name */
/** Descriptive text for the templ-dirs option */
#define TEMPL_DIRS_DESC      (autogen_opt_strs+956)
/** Upper-cased name for the templ-dirs option */
#define TEMPL_DIRS_NAME      (autogen_opt_strs+984)
/** Name string for the templ-dirs option */
#define TEMPL_DIRS_name      (autogen_opt_strs+995)
/** Compiled in flag settings for the templ-dirs option */
#define TEMPL_DIRS_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  override-tpl option description:
 */
/** Descriptive text for the override-tpl option */
#define OVERRIDE_TPL_DESC      (autogen_opt_strs+1006)
/** Upper-cased name for the override-tpl option */
#define OVERRIDE_TPL_NAME      (autogen_opt_strs+1036)
/** Name string for the override-tpl option */
#define OVERRIDE_TPL_name      (autogen_opt_strs+1049)
/** Compiled in flag settings for the override-tpl option */
#define OVERRIDE_TPL_FLAGS     (OPTST_DISABLED | OPTST_NO_INIT \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  lib-template option description:
 */
/** Descriptive text for the lib-template option */
#define LIB_TEMPLATE_DESC      (autogen_opt_strs+1062)
/** Upper-cased name for the lib-template option */
#define LIB_TEMPLATE_NAME      (autogen_opt_strs+1109)
/** Name string for the lib-template option */
#define LIB_TEMPLATE_name      (autogen_opt_strs+1122)
/** Compiled in flag settings for the lib-template option */
#define LIB_TEMPLATE_FLAGS     (OPTST_DISABLED | OPTST_DEPRECATED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  definitions option description:
 */
/** Descriptive text for the definitions option */
#define DEFINITIONS_DESC      (autogen_opt_strs+1135)
/** Upper-cased name for the definitions option */
#define DEFINITIONS_NAME      (autogen_opt_strs+1162)
/** disablement name for the definitions option */
#define NOT_DEFINITIONS_name  (autogen_opt_strs+1174)
/** disablement prefix for the definitions option */
#define NOT_DEFINITIONS_PFX   (autogen_opt_strs+1189)
/** Name string for the definitions option */
#define DEFINITIONS_name      (NOT_DEFINITIONS_name + 3)
/** Compiled in flag settings for the definitions option */
#define DEFINITIONS_FLAGS     (OPTST_INITENABLED | OPTST_NO_INIT \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  shell option description:
 */
#ifdef SHELL_ENABLED
/** Descriptive text for the shell option */
#define SHELL_DESC      (autogen_opt_strs+1192)
/** Upper-cased name for the shell option */
#define SHELL_NAME      (autogen_opt_strs+1226)
/** Name string for the shell option */
#define SHELL_name      (autogen_opt_strs+1232)
/** Compiled in flag settings for the shell option */
#define SHELL_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

#else   /* disable shell */
#define SHELL_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
#define SHELL_NAME      NULL
#define SHELL_DESC      NULL
#define SHELL_name      NULL
#endif  /* SHELL_ENABLED */

/**
 *  no-fmemopen option description:
 */
/** Descriptive text for the no-fmemopen option */
#define NO_FMEMOPEN_DESC      (autogen_opt_strs+1238)
/** Upper-cased name for the no-fmemopen option */
#define NO_FMEMOPEN_NAME      (autogen_opt_strs+1264)
/** Name string for the no-fmemopen option */
#define NO_FMEMOPEN_name      (autogen_opt_strs+1276)
/** Compiled in flag settings for the no-fmemopen option */
#define NO_FMEMOPEN_FLAGS     (OPTST_DISABLED)

/**
 *  equate option description:
 */
/** Descriptive text for the equate option */
#define EQUATE_DESC      (autogen_opt_strs+1288)
/** Upper-cased name for the equate option */
#define EQUATE_NAME      (autogen_opt_strs+1321)
/** Name string for the equate option */
#define EQUATE_name      (autogen_opt_strs+1328)
/** The compiled in default value for the equate option argument */
#define EQUATE_DFT_ARG   (autogen_opt_strs+1335)
/** Compiled in flag settings for the equate option */
#define EQUATE_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  out-handling option description:
 */
/** out-handling option separation text */
#define OUT_HANDLING_DESC      (autogen_opt_strs+1339)
#define OUT_HANDLING_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/**
 *  base-name option description:
 */
/** Descriptive text for the base-name option */
#define BASE_NAME_DESC      (autogen_opt_strs+1391)
/** Upper-cased name for the base-name option */
#define BASE_NAME_NAME      (autogen_opt_strs+1432)
/** Name string for the base-name option */
#define BASE_NAME_name      (autogen_opt_strs+1442)
/** Compiled in flag settings for the base-name option */
#define BASE_NAME_FLAGS     (OPTST_DISABLED | OPTST_NO_INIT \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  source-time option description:
 */
/** Descriptive text for the source-time option */
#define SOURCE_TIME_DESC      (autogen_opt_strs+1452)
/** Upper-cased name for the source-time option */
#define SOURCE_TIME_NAME      (autogen_opt_strs+1483)
/** disablement name for the source-time option */
#define NOT_SOURCE_TIME_name  (autogen_opt_strs+1495)
/** disablement prefix for the source-time option */
#define NOT_SOURCE_TIME_PFX   (autogen_opt_strs+1189)
/** Name string for the source-time option */
#define SOURCE_TIME_name      (NOT_SOURCE_TIME_name + 3)
/** Compiled in flag settings for the source-time option */
#define SOURCE_TIME_FLAGS     (OPTST_DISABLED)

/**
 *  writable option description:
 */
/** Descriptive text for the writable option */
#define WRITABLE_DESC      (autogen_opt_strs+1510)
/** Upper-cased name for the writable option */
#define WRITABLE_NAME      (autogen_opt_strs+1544)
/** disablement name for the writable option */
#define NOT_WRITABLE_name  (autogen_opt_strs+1553)
/** disablement prefix for the writable option */
#define NOT_WRITABLE_PFX   (autogen_opt_strs+1566)
/** Name string for the writable option */
#define WRITABLE_name      (NOT_WRITABLE_name + 4)
/** Compiled in flag settings for the writable option */
#define WRITABLE_FLAGS     (OPTST_DISABLED)

/**
 *  debug-tpl option description:
 */
/** debug-tpl option separation text */
#define DEBUG_TPL_DESC      (autogen_opt_strs+1570)
#define DEBUG_TPL_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/**
 *  loop-limit option description:
 */
/** Descriptive text for the loop-limit option */
#define LOOP_LIMIT_DESC      (autogen_opt_strs+1640)
/** Upper-cased name for the loop-limit option */
#define LOOP_LIMIT_NAME      (autogen_opt_strs+1665)
/** Name string for the loop-limit option */
#define LOOP_LIMIT_name      (autogen_opt_strs+1676)
/** The compiled in default value for the loop-limit option argument */
#define LOOP_LIMIT_DFT_ARG   ((char const*)256)
/** Compiled in flag settings for the loop-limit option */
#define LOOP_LIMIT_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC) \
        | OPTST_SCALED_NUM)

/**
 *  timeout option description:
 */
#ifdef SHELL_ENABLED
/** Descriptive text for the timeout option */
#define TIMEOUT_DESC      (autogen_opt_strs+1687)
/** Upper-cased name for the timeout option */
#define TIMEOUT_NAME      (autogen_opt_strs+1728)
/** Name string for the timeout option */
#define TIMEOUT_name      (autogen_opt_strs+1736)
/** Compiled in flag settings for the timeout option */
#define TIMEOUT_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))

#else   /* disable timeout */
#define TIMEOUT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
#define TIMEOUT_NAME      NULL
#define TIMEOUT_DESC      NULL
#define TIMEOUT_name      NULL
#endif  /* SHELL_ENABLED */

/**
 *  trace option description:
 */
/** Descriptive text for the trace option */
#define TRACE_DESC      (autogen_opt_strs+1744)
/** Upper-cased name for the trace option */
#define TRACE_NAME      (autogen_opt_strs+1768)
/** Name string for the trace option */
#define TRACE_name      (autogen_opt_strs+1774)
/** The compiled in default value for the trace option argument */
#define TRACE_DFT_ARG   ((char const*)TRACE_NOTHING)
/** Compiled in flag settings for the trace option */
#define TRACE_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_ENUMERATION))

/**
 *  trace-out option description:
 */
/** Descriptive text for the trace-out option */
#define TRACE_OUT_DESC      (autogen_opt_strs+1780)
/** Upper-cased name for the trace-out option */
#define TRACE_OUT_NAME      (autogen_opt_strs+1810)
/** Name string for the trace-out option */
#define TRACE_OUT_name      (autogen_opt_strs+1820)
/** Compiled in flag settings for the trace-out option */
#define TRACE_OUT_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  show-defs option description:
 */
#ifdef DEBUG_ENABLED
/** Descriptive text for the show-defs option */
#define SHOW_DEFS_DESC      (autogen_opt_strs+1830)
/** Upper-cased name for the show-defs option */
#define SHOW_DEFS_NAME      (autogen_opt_strs+1855)
/** Name string for the show-defs option */
#define SHOW_DEFS_name      (autogen_opt_strs+1865)
/** Compiled in flag settings for the show-defs option */
#define SHOW_DEFS_FLAGS     (OPTST_DISABLED | OPTST_NO_INIT)

#else   /* disable show-defs */
#define SHOW_DEFS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
#define SHOW_DEFS_NAME      NULL
/** Descriptive text for the show-defs option */
#define SHOW_DEFS_DESC      (NULL)
#define SHOW_DEFS_name      (autogen_opt_strs+1865)
#endif  /* DEBUG_ENABLED */

/**
 *  used-defines option description:
 */
/** Descriptive text for the used-defines option */
#define USED_DEFINES_DESC      (autogen_opt_strs+1875)
/** Upper-cased name for the used-defines option */
#define USED_DEFINES_NAME      (autogen_opt_strs+1901)
/** Name string for the used-defines option */
#define USED_DEFINES_name      (autogen_opt_strs+1914)
/** Compiled in flag settings for the used-defines option */
#define USED_DEFINES_FLAGS     (OPTST_DISABLED | OPTST_NO_INIT)

/**
 *  core option description:
 */
#ifdef HAVE_SYS_RESOURCE_H
/** Descriptive text for the core option */
#define CORE_DESC      (autogen_opt_strs+1927)
/** Upper-cased name for the core option */
#define CORE_NAME      (autogen_opt_strs+1963)
/** Name string for the core option */
#define CORE_name      (autogen_opt_strs+1968)
/** Compiled in flag settings for the core option */
#define CORE_FLAGS     (OPTST_DISABLED)

#else   /* disable core */
#define CORE_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
#define CORE_NAME      NULL
#define CORE_DESC      NULL
#define CORE_name      NULL
#endif  /* HAVE_SYS_RESOURCE_H */

/**
 *  processing option description:
 */
/** processing option separation text */
#define PROCESSING_DESC      (autogen_opt_strs+1973)
#define PROCESSING_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/**
 *  skip-suffix option description with
 *  "Must also have options" and "Incompatible options":
 */
/** Descriptive text for the skip-suffix option */
#define SKIP_SUFFIX_DESC      (autogen_opt_strs+2075)
/** Upper-cased name for the skip-suffix option */
#define SKIP_SUFFIX_NAME      (autogen_opt_strs+2106)
/** Name string for the skip-suffix option */
#define SKIP_SUFFIX_name      (autogen_opt_strs+2118)
/** Other options that appear in conjunction with the skip-suffix option */
static int const aSkip_SuffixCantList[] = {
    INDEX_OPT_SELECT_SUFFIX, NO_EQUIVALENT };
/** Compiled in flag settings for the skip-suffix option */
#define SKIP_SUFFIX_FLAGS     (OPTST_DISABLED | OPTST_STACKED | OPTST_NO_INIT \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  select-suffix option description:
 */
/** Descriptive text for the select-suffix option */
#define SELECT_SUFFIX_DESC      (autogen_opt_strs+2130)
/** Upper-cased name for the select-suffix option */
#define SELECT_SUFFIX_NAME      (autogen_opt_strs+2157)
/** Name string for the select-suffix option */
#define SELECT_SUFFIX_name      (autogen_opt_strs+2171)
/** Compiled in flag settings for the select-suffix option */
#define SELECT_SUFFIX_FLAGS     (OPTST_DISABLED | OPTST_NO_INIT \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  define option description:
 */
/** Descriptive text for the define option */
#define DEFINE_DESC      (autogen_opt_strs+2185)
/** Upper-cased name for the define option */
#define DEFINE_NAME      (autogen_opt_strs+2216)
/** Name string for the define option */
#define DEFINE_name      (autogen_opt_strs+2223)
/** Compiled in flag settings for the define option */
#define DEFINE_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  undefine option description:
 */
/** Descriptive text for the undefine option */
#define UNDEFINE_DESC      (autogen_opt_strs+2230)
/** Upper-cased name for the undefine option */
#define UNDEFINE_NAME      (autogen_opt_strs+2262)
/** Name string for the undefine option */
#define UNDEFINE_name      (autogen_opt_strs+2271)
/** Compiled in flag settings for the undefine option */
#define UNDEFINE_FLAGS     (OPTST_DISABLED | OPTST_NO_INIT \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  dep-track option description:
 */
/** dep-track option separation text */
#define DEP_TRACK_DESC      (autogen_opt_strs+2280)
#define DEP_TRACK_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/**
 *  make-dep option description:
 */
/** Descriptive text for the make-dep option */
#define MAKE_DEP_DESC      (autogen_opt_strs+2333)
/** Upper-cased name for the make-dep option */
#define MAKE_DEP_NAME      (autogen_opt_strs+2359)
/** Name string for the make-dep option */
#define MAKE_DEP_name      (autogen_opt_strs+2368)
/** Compiled in flag settings for the make-dep option */
#define MAKE_DEP_FLAGS     (OPTST_DISABLED | OPTST_NO_INIT \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | OPTST_ARG_OPTIONAL)

/**
 *  autoopts-opts option description:
 */
/** autoopts-opts option separation text */
#define AUTOOPTS_OPTS_DESC      (autogen_opt_strs+2377)
#define AUTOOPTS_OPTS_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/*
 *  Help/More_Help/Version option descriptions:
 */
#define HELP_DESC       (autogen_opt_strs+2412)
#define HELP_name       (autogen_opt_strs+2456)
#ifdef HAVE_WORKING_FORK
#define MORE_HELP_DESC  (autogen_opt_strs+2461)
#define MORE_HELP_name  (autogen_opt_strs+2506)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC  HELP_DESC
#define MORE_HELP_name  HELP_name
#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#endif
#ifdef NO_OPTIONAL_OPT_ARGS
#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
#else
#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
#define VER_DESC        (autogen_opt_strs+2516)
#define VER_name        (autogen_opt_strs+2552)
#define RESET_DESC      (autogen_opt_strs+2560)
#define RESET_name      (autogen_opt_strs+2584)
#define RESET_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)|OPTST_NO_INIT)
#define USAGE_DESC      (autogen_opt_strs+2597)
#define USAGE_name      (autogen_opt_strs+2625)
#define SAVE_OPTS_DESC  (autogen_opt_strs+2631)
#define SAVE_OPTS_name  (autogen_opt_strs+2670)
#define LOAD_OPTS_DESC     (autogen_opt_strs+2680)
#define LOAD_OPTS_NAME     (autogen_opt_strs+2712)
#define NO_LOAD_OPTS_name  (autogen_opt_strs+2722)
#define LOAD_OPTS_pfx      (autogen_opt_strs+1189)
#define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
/**
 *  Declare option callback procedures
 */
#ifdef SHELL_ENABLED
  static tOptProc doOptShell;
#else /* not SHELL_ENABLED */
# define doOptShell NULL
#endif /* def/not SHELL_ENABLED */
#ifdef SHELL_ENABLED
  static tOptProc doOptTimeout;
#else /* not SHELL_ENABLED */
# define doOptTimeout NULL
#endif /* def/not SHELL_ENABLED */
extern tOptProc
    config_dep,         optionBooleanVal,   optionNestedVal,
    optionNumericVal,   optionPagedUsage,   optionPrintVersion,
    optionResetOpt,     optionStackArg,     optionTimeDate,
    optionTimeVal,      optionUnstackArg,   optionVendorOption;
static tOptProc
    doOptLib_Template,  doOptLoop_Limit,    doOptOverride_Tpl,
    doOptSelect_Suffix, doOptTrace,         doUsageOpt;
#define VER_PROC        optionPrintVersion

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 *  Define the autogen Option Descriptions.
 * This is an array of OPTION_CT entries, one for each
 * option that the autogen program responds to.
 */
static tOptDesc optDesc[OPTION_CT] = {
  {  /* entry idx, value */ 0, 0,
     /* equiv idx, value */ 0, 0,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 0, 0,
     /* opt state flags  */ INPUT_SELECT_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ INPUT_SELECT_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 1, VALUE_OPT_TEMPL_DIRS,
     /* equiv idx, value */ 1, VALUE_OPT_TEMPL_DIRS,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ TEMPL_DIRS_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --templ-dirs */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ optionStackArg,
     /* desc, NAME, name */ TEMPL_DIRS_DESC, TEMPL_DIRS_NAME, TEMPL_DIRS_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 2, VALUE_OPT_OVERRIDE_TPL,
     /* equiv idx, value */ 2, VALUE_OPT_OVERRIDE_TPL,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ OVERRIDE_TPL_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --override-tpl */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptOverride_Tpl,
     /* desc, NAME, name */ OVERRIDE_TPL_DESC, OVERRIDE_TPL_NAME, OVERRIDE_TPL_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 3, VALUE_OPT_LIB_TEMPLATE,
     /* equiv idx, value */ 3, VALUE_OPT_LIB_TEMPLATE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ LIB_TEMPLATE_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --lib-template */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptLib_Template,
     /* desc, NAME, name */ LIB_TEMPLATE_DESC, LIB_TEMPLATE_NAME, LIB_TEMPLATE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 4, VALUE_OPT_DEFINITIONS,
     /* equiv idx, value */ 4, VALUE_OPT_DEFINITIONS,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ DEFINITIONS_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --definitions */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ DEFINITIONS_DESC, DEFINITIONS_NAME, DEFINITIONS_name,
     /* disablement strs */ NOT_DEFINITIONS_name, NOT_DEFINITIONS_PFX },

  {  /* entry idx, value */ 5, VALUE_OPT_SHELL,
     /* equiv idx, value */ 5, VALUE_OPT_SHELL,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ SHELL_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --shell */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptShell,
     /* desc, NAME, name */ SHELL_DESC, SHELL_NAME, SHELL_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 6, VALUE_OPT_NO_FMEMOPEN,
     /* equiv idx, value */ 6, VALUE_OPT_NO_FMEMOPEN,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ NO_FMEMOPEN_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --no-fmemopen */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ NO_FMEMOPEN_DESC, NO_FMEMOPEN_NAME, NO_FMEMOPEN_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 7, VALUE_OPT_EQUATE,
     /* equiv idx, value */ 7, VALUE_OPT_EQUATE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ EQUATE_FLAGS, 0,
     /* last opt argumnt */ { EQUATE_DFT_ARG },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ EQUATE_DESC, EQUATE_NAME, EQUATE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 0, 0,
     /* equiv idx, value */ 0, 0,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 0, 0,
     /* opt state flags  */ OUT_HANDLING_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ OUT_HANDLING_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 9, VALUE_OPT_BASE_NAME,
     /* equiv idx, value */ 9, VALUE_OPT_BASE_NAME,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ BASE_NAME_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --base-name */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ BASE_NAME_DESC, BASE_NAME_NAME, BASE_NAME_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 10, VALUE_OPT_SOURCE_TIME,
     /* equiv idx, value */ 10, VALUE_OPT_SOURCE_TIME,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ SOURCE_TIME_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --source-time */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ SOURCE_TIME_DESC, SOURCE_TIME_NAME, SOURCE_TIME_name,
     /* disablement strs */ NOT_SOURCE_TIME_name, NOT_SOURCE_TIME_PFX },

  {  /* entry idx, value */ 11, VALUE_OPT_WRITABLE,
     /* equiv idx, value */ 11, VALUE_OPT_WRITABLE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ WRITABLE_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --writable */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ WRITABLE_DESC, WRITABLE_NAME, WRITABLE_name,
     /* disablement strs */ NOT_WRITABLE_name, NOT_WRITABLE_PFX },

  {  /* entry idx, value */ 0, 0,
     /* equiv idx, value */ 0, 0,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 0, 0,
     /* opt state flags  */ DEBUG_TPL_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ DEBUG_TPL_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 13, VALUE_OPT_LOOP_LIMIT,
     /* equiv idx, value */ 13, VALUE_OPT_LOOP_LIMIT,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ LOOP_LIMIT_FLAGS, 0,
     /* last opt argumnt */ { LOOP_LIMIT_DFT_ARG },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptLoop_Limit,
     /* desc, NAME, name */ LOOP_LIMIT_DESC, LOOP_LIMIT_NAME, LOOP_LIMIT_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 14, VALUE_OPT_TIMEOUT,
     /* equiv idx, value */ 14, VALUE_OPT_TIMEOUT,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ TIMEOUT_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --timeout */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptTimeout,
     /* desc, NAME, name */ TIMEOUT_DESC, TIMEOUT_NAME, TIMEOUT_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 15, VALUE_OPT_TRACE,
     /* equiv idx, value */ 15, VALUE_OPT_TRACE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ TRACE_FLAGS, 0,
     /* last opt argumnt */ { TRACE_DFT_ARG },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptTrace,
     /* desc, NAME, name */ TRACE_DESC, TRACE_NAME, TRACE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 16, VALUE_OPT_TRACE_OUT,
     /* equiv idx, value */ 16, VALUE_OPT_TRACE_OUT,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ TRACE_OUT_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --trace-out */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ TRACE_OUT_DESC, TRACE_OUT_NAME, TRACE_OUT_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 17, VALUE_OPT_SHOW_DEFS,
     /* equiv idx, value */ 17, VALUE_OPT_SHOW_DEFS,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ SHOW_DEFS_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --show-defs */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ SHOW_DEFS_DESC, SHOW_DEFS_NAME, SHOW_DEFS_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 18, VALUE_OPT_USED_DEFINES,
     /* equiv idx, value */ 18, VALUE_OPT_USED_DEFINES,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ USED_DEFINES_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --used-defines */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ USED_DEFINES_DESC, USED_DEFINES_NAME, USED_DEFINES_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 19, VALUE_OPT_CORE,
     /* equiv idx, value */ 19, VALUE_OPT_CORE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ CORE_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --core */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ CORE_DESC, CORE_NAME, CORE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 0, 0,
     /* equiv idx, value */ 0, 0,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 0, 0,
     /* opt state flags  */ PROCESSING_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ PROCESSING_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 21, VALUE_OPT_SKIP_SUFFIX,
     /* equiv idx, value */ 21, VALUE_OPT_SKIP_SUFFIX,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ SKIP_SUFFIX_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --skip-suffix */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, aSkip_SuffixCantList,
     /* option proc      */ optionStackArg,
     /* desc, NAME, name */ SKIP_SUFFIX_DESC, SKIP_SUFFIX_NAME, SKIP_SUFFIX_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 22, VALUE_OPT_SELECT_SUFFIX,
     /* equiv idx, value */ 22, VALUE_OPT_SELECT_SUFFIX,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ SELECT_SUFFIX_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --select-suffix */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptSelect_Suffix,
     /* desc, NAME, name */ SELECT_SUFFIX_DESC, SELECT_SUFFIX_NAME, SELECT_SUFFIX_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 23, VALUE_OPT_DEFINE,
     /* equiv idx, value */ 23, VALUE_OPT_DEFINE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ DEFINE_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --define */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ optionStackArg,
     /* desc, NAME, name */ DEFINE_DESC, DEFINE_NAME, DEFINE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 24, VALUE_OPT_UNDEFINE,
     /* equiv idx, value */ NOLIMIT, NOLIMIT,
     /* equivalenced to  */ INDEX_OPT_DEFINE,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ UNDEFINE_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --undefine */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ optionUnstackArg,
     /* desc, NAME, name */ UNDEFINE_DESC, UNDEFINE_NAME, UNDEFINE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 0, 0,
     /* equiv idx, value */ 0, 0,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 0, 0,
     /* opt state flags  */ DEP_TRACK_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ DEP_TRACK_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 26, VALUE_OPT_MAKE_DEP,
     /* equiv idx, value */ 26, VALUE_OPT_MAKE_DEP,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ MAKE_DEP_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --make-dep */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ config_dep,
     /* desc, NAME, name */ MAKE_DEP_DESC, MAKE_DEP_NAME, MAKE_DEP_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 0, 0,
     /* equiv idx, value */ 0, 0,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 0, 0,
     /* opt state flags  */ AUTOOPTS_OPTS_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ AUTOOPTS_OPTS_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ INDEX_OPT_RESET_OPTION, VALUE_OPT_RESET_OPTION,
     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_RESET_OPTION,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ RESET_FLAGS, AOUSE_RESET_OPTION,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL,  NULL,
     /* option proc      */ optionResetOpt,
     /* desc, NAME, name */ RESET_DESC, NULL, RESET_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ VER_PROC,
     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
     /* disablement strs */ NULL, NULL },



  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doUsageOpt,
     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL,  NULL,
     /* option proc      */ optionPagedUsage,
     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ INDEX_OPT_USAGE, VALUE_OPT_USAGE,
     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_USAGE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_USAGE,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL,  NULL,
     /* option proc      */ doUsageOpt,
     /* desc, NAME, name */ USAGE_DESC, NULL, USAGE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
                       | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL,  NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, NOLIMIT, 0,
     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ optionLoadOpt,
     /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
     /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
};


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of autogen. */
#define zPROGNAME       (autogen_opt_strs+2735)
/** Reference to the title line for autogen usage. */
#define zUsageTitle     (autogen_opt_strs+2743)
/** autogen configuration file name. */
#define zRcName         (autogen_opt_strs+2895)
/** Directories to search for autogen config files. */
static char const * const apzHomeList[3] = {
    autogen_opt_strs+2887,
    autogen_opt_strs+2893,
    NULL };
/** The autogen program bug email address. */
#define zBugsAddr       (autogen_opt_strs+2906)
/** Clarification/explanation of what autogen does. */
#define zExplain        (autogen_opt_strs+2942)
/** Extra detail explaining what autogen does. */
#define zDetail         (autogen_opt_strs+3013)
/** The full version string for autogen. */
#define zFullVersion    (autogen_opt_strs+3126)
/* extracted from optcode.tlib near line 364 */

#define OPTPROC_BASE OPTPROC_NONE
#define translate_option_strings NULL

#ifndef optArgBucket_t
#define opt_arg_union_t optArgBucket_t
#endif
/** Compiled-in initial values for autogen options. */
static opt_arg_union_t const original_autogen_defaults[ OPTION_CT ] = {
    { NULL }, /* doc opt */
    { NULL }, /* --templ-dirs */
    { NULL }, /* --override-tpl */
    { NULL }, /* --lib-template */
    { NULL }, /* --definitions */
    { NULL }, /* --shell */
    { NULL }, /* --no-fmemopen */
    { EQUATE_DFT_ARG },
    { NULL }, /* doc opt */
    { NULL }, /* --base-name */
    { NULL }, /* --source-time */
    { NULL }, /* --writable */
    { NULL }, /* doc opt */
    { LOOP_LIMIT_DFT_ARG },
    { NULL }, /* --timeout */
    { TRACE_DFT_ARG },
    { NULL }, /* --trace-out */
    { NULL }, /* --show-defs */
    { NULL }, /* --used-defines */
    { NULL }, /* --core */
    { NULL }, /* doc opt */
    { NULL }, /* --skip-suffix */
    { NULL }, /* --select-suffix */
    { NULL }, /* --define */
    { NULL }, /* --undefine */
    { NULL }, /* doc opt */
    { NULL }, /* --make-dep */
    { NULL }, /* doc opt */
    { NULL }, /* resettable */
    { NULL }, /* version */
    { NULL }, /* help */
    { NULL }, /* more-help */
    { NULL }, /* usage-opt */
    { NULL }, /* save-opts */
    { NULL }  /* load-opts */
};
/** Compiled-in initial values for autogen option cookies. */
static void * const original_autogen_cookies[ OPTION_CT ] = {
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};

#define autogen_full_usage (NULL)
#define autogen_short_usage (NULL)

#endif /* not defined __doxygen__ */

/*
 *  Create the static procedure(s) declared above.
 */
/**
 * The callout function that invokes the optionUsage function.
 *
 * @param[in] opts the AutoOpts option description structure
 * @param[in] od   the descriptor for the "help" (usage) option.
 * @noreturn
 */
static void
doUsageOpt(tOptions * opts, tOptDesc * od)
{
    int ex_code;
    if ((od->fOptState & OPTST_RESET) != 0)
        return;
    ex_code = (od->optIndex == INDEX_OPT_HELP)
        ? AUTOGEN_EXIT_SUCCESS : AO_EXIT_REQ_USAGE;
    optionUsage(&autogenOptions, ex_code);
    /* NOTREACHED */
    exit(AUTOGEN_EXIT_OPTION_ERROR);
    (void)opts;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the override-tpl option.
 * Definition files specify the standard template that is to be expanded.
 * This option will override that name and expand a different template.
 * @param[in] pOptions the autogen options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
static void
doOptOverride_Tpl(tOptions* pOptions, tOptDesc* pOptDesc)
{
    /*
     * Be sure the flag-code[0] handles special values for the options pointer
     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
     * reset its state.
     */
    /* extracted from opts.def, line 187 */
    tpl_fname = pOptDesc->optArg.argString;
    (void)pOptions;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the lib-template option.
 * DEFINE macros are saved from this template file for use in processing
 * the main macro file.  Template text aside from the DEFINE macros is
 * is ignored.
 *
 * Do not use this.  Instead, use the INCLUDE macro in your template.
 * @param[in] pOptions the autogen options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
static void
doOptLib_Template(tOptions* pOptions, tOptDesc* pOptDesc)
{
    /*
     * Be sure the flag-code[0] handles special values for the options pointer
     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
     * reset its state.
     */
    /* extracted from opts.def, line 211 */
    templ_t * tpl;
    processing_state = PROC_STATE_LIB_LOAD;
    tpl = tpl_load(pOptDesc->optArg.argString, NULL);
    tpl_unload(tpl);
    processing_state = PROC_STATE_OPTIONS;
    (void)pOptions;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the shell option, when SHELL_ENABLED is #define-d.
 * By default, when AutoGen is built, the configuration is probed for a
 * reasonable Bourne-like shell to use for shell script processing.  If
 * a particular template needs an alternate shell, it must be specified
 * with this option on the command line, with an environment variable
 * (@code{SHELL}) or in the configuration/initialization file.
 * @param[in] pOptions the autogen options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
#ifdef SHELL_ENABLED
static void
doOptShell(tOptions* pOptions, tOptDesc* pOptDesc)
{
    /*
     * Be sure the flag-code[0] handles special values for the options pointer
     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
     * reset its state.
     */
    /* extracted from opts.def, line 261 */
    shell_program = pOptDesc->optArg.argString;
    (void)pOptions;
}
#endif /* defined SHELL_ENABLED */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the loop-limit option.
 * This option prevents runaway loops.  For example, if you accidentally
 * specify, "FOR x (for-from 1) (for-to -1) (for-by 1)", it will take a
 * long time to finish.  If you do have more than 256 entries in tables,
 * you will need to specify a new limit with this option.
 * @param[in] pOptions the autogen options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
static void
doOptLoop_Limit(tOptions* pOptions, tOptDesc* pOptDesc)
{
    static struct {long rmin, rmax;} const rng[2] = {
        { -1, LONG_MIN },  { 1, 0x1000000 } };
    int  ix;

    if (pOptions <= OPTPROC_EMIT_LIMIT)
        goto emit_ranges;
    if ((pOptDesc->fOptState & OPTST_RESET) != 0)
        return;
    optionNumericVal(pOptions, pOptDesc);

    for (ix = 0; ix < 2; ix++) {
        if (pOptDesc->optArg.argInt < rng[ix].rmin)
            continue;  /* ranges need not be ordered. */
        if (pOptDesc->optArg.argInt == rng[ix].rmin)
            return;
        if (rng[ix].rmax == LONG_MIN)
            continue;
        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
            return;
    }

    option_usage_fp = stderr;

 emit_ranges:
optionShowRange(pOptions, pOptDesc, VOIDP(rng), 2);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the timeout option, when SHELL_ENABLED is #define-d.
 * AutoGen works with a shell server process.  Most normal commands will
 * complete in less than 10 seconds.  If, however, your commands need more
 * time than this, use this option.
 *
 * The valid range is 0 to 3600 seconds (1 hour).
 * Zero will disable the server time limit.
 * @param[in] pOptions the autogen options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
#ifdef SHELL_ENABLED
static void
doOptTimeout(tOptions* pOptions, tOptDesc* pOptDesc)
{
    static struct {long rmin, rmax;} const rng[1] = {
        { 0, 3600 } };
    int  ix;

    if (pOptions <= OPTPROC_EMIT_LIMIT)
        goto emit_ranges;
    if ((pOptDesc->fOptState & OPTST_RESET) != 0)
        return;
    optionNumericVal(pOptions, pOptDesc);

    for (ix = 0; ix < 1; ix++) {
        if (pOptDesc->optArg.argInt < rng[ix].rmin)
            continue;  /* ranges need not be ordered. */
        if (pOptDesc->optArg.argInt == rng[ix].rmin)
            return;
        if (rng[ix].rmax == LONG_MIN)
            continue;
        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
            return;
    }

    option_usage_fp = stderr;

 emit_ranges:
optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
}
#endif /* defined SHELL_ENABLED */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the trace option.
 * This option will cause AutoGen to display a trace of its template
 * processing.  There are six levels, each level including messages from
 * the previous levels:
 *
 * @table @samp
 * @item nothing
 * Does no tracing at all (default)
 *
 * @item debug-message
 * Print messages from the "DEBUG" AutoGen macro (@pxref{DEBUG}).
 *
 * @item server-shell
 * Traces all input and output to the server shell.  This includes a shell
 * "independent" initialization script about 30 lines long.  Its output is
 * discarded and not inserted into any template.
 *
 * @item templates
 * Traces the invocation of @code{DEFINE}d macros and @code{INCLUDE}s
 *
 * @item block-macros
 * Traces all block macros.  The above, plus @code{IF}, @code{FOR},
 * @code{CASE} and @code{WHILE}.
 *
 * @item expressions
 * Displays the results of expression evaluations.
 *
 * @item everything
 * Displays the invocation of every AutoGen macro, even @code{TEXT} macros
 * (i.e. the text outside of macro quotes).  Additionally, if you rebuild
 * the ``expr.ini'' file with debugging enabled, then all calls to
 * AutoGen defined scheme functions will also get logged:
 * @*
 * @example
 * cd $@{top_builddir@}/agen5
 * DEBUG_ENABLED=true bash bootstrap.dir expr.ini
 * make CFLAGS='-g -DDEBUG_ENABLED=1'
 * @end example
 *
 * Be aware that you cannot rebuild this source in this way without first
 * having installed the @code{autogen} executable in your search path.
 * Because of this, "expr.ini" is in the distributed source list, and
 * not in the dependencies.
 * @end table
 * @param[in] pOptions the autogen options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
static void
doOptTrace(tOptions* pOptions, tOptDesc* pOptDesc)
{

/* extracted from optmain.tlib near line 945 */
    static char const * const names[7] = {
        autogen_opt_strs+3156, autogen_opt_strs+3164, autogen_opt_strs+3178,
        autogen_opt_strs+3191, autogen_opt_strs+3201, autogen_opt_strs+3214,
        autogen_opt_strs+3226 };

    if (pOptions <= OPTPROC_EMIT_LIMIT) {
        (void) optionEnumerationVal(pOptions, pOptDesc, names, 7);
        return; /* protect AutoOpts client code from internal callbacks */
    }
    if ((pOptDesc->fOptState & OPTST_RESET) != 0)
        return;

    pOptDesc->optArg.argEnum =
        optionEnumerationVal(pOptions, pOptDesc, names, 7);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the select-suffix option.
 * If you wish to override the suffix specifications in the template,
 * you can use one or more copies of this option.  See the suffix
 * specification in the @ref{pseudo macro} section of the info doc.
 * @param[in] pOptions the autogen options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
static void
doOptSelect_Suffix(tOptions* pOptions, tOptDesc* pOptDesc)
{
    /*
     * Be sure the flag-code[0] handles special values for the options pointer
     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
     * reset its state.
     */
    /* extracted from opts.def, line 624 */
    char const * arg = pOptDesc->optArg.argString;
    if ((arg != NULL) && (*arg != NUL))
        (void)do_suffix(arg, NULL, -1);
    (void)pOptions;
}
/* extracted from optmain.tlib near line 1250 */

/**
 * Print a usage message with a format and va_list argument.
 * The optionUsage function is then invoked to print
 * the error usage text (somewhat abbreviated) and then exit.
 *
 * @param[in] fmt the message format string
 * @param[in] ap  the var-arg list.
 * @noreturn
 */
void
vusage_message(char const * fmt, va_list ap)
{
    char const * er_leader = _("autogen usage error:\n");
    fputs(er_leader, stderr);
    vfprintf(stderr, fmt, ap);
    optionUsage(&autogenOptions, AUTOGEN_EXIT_USAGE_ERROR);
    /* NOTREACHED */
    exit(1);
}

/**
 * Print a usage message with a format and a variable argument list.
 * vusage_message() is called to do the work.
 *
 * @param[in] fmt the message format string
 * @param[in] ... the argument list for the message
 * @noreturn
 */
void
usage_message(char const * fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    vusage_message(fmt, ap);
    /* NOTREACHED */
    va_end(ap);
}

/**
 * Print a fatal error message and die, \a va_list style.
 *
 * @param[in] exit_code  the value to call exit(3) with
 * @param[in] fmt        the death rattle message
 * @param[in] ap         the argument list for the message
 * @noreturn
 */
void
vdie(int exit_code, char const * fmt, va_list ap)
{
    char const * die_leader = _("autogen fatal error:\n");
    fputs(die_leader, stderr);
    vfprintf(stderr, fmt, ap);
    fflush(stderr);
    exit(exit_code);
    /* NOTREACHED */
}

/**
 * Print a fatal error message and die, var-arg style.
 *
 * @param[in] exit_code  the value to call exit(3) with
 * @param[in] fmt        the death rattle message
 * @param[in] ...        the list of arguments for the message
 * @noreturn
 */
void
die(int exit_code, char const * fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    vdie(exit_code, fmt, ap);
    /* NOTREACHED */
    va_end(ap);
}

/**
 * Print a file system error fatal error message and die.
 *
 * @param[in] exit_code  the value to call exit(3) with.
 * @param[in] op         the operation that failed.
 * @param[in] fname      the file name the operation was on.
 * @noreturn
 */
void
fserr(int exit_code, char const * op, char const * fname)
{
    char const * fserr_fmt = _("fserr %d (%s) performing '%s' on %s\n");
    die(exit_code, fserr_fmt, errno, strerror(errno), op, fname);
    /* NOTREACHED */
}

/**
 * The directory containing the data associated with autogen.
 */
#ifndef  PKGDATADIR
# define PKGDATADIR ""
#endif

/**
 * Information about the person or institution that packaged autogen
 * for the current distribution.
 */
#ifndef  WITH_PACKAGER
# define autogen_packager_info NULL
#else
/** Packager information for autogen. */
static char const autogen_packager_info[] =
    "Packaged by " WITH_PACKAGER

# ifdef WITH_PACKAGER_VERSION
        " ("WITH_PACKAGER_VERSION")"
# endif

# ifdef WITH_PACKAGER_BUG_REPORTS
    "\nReport autogen bugs to " WITH_PACKAGER_BUG_REPORTS
# endif
    "\n";
#endif
#ifndef __doxygen__

#endif /* __doxygen__ */
/**
 * The option definitions for autogen.  The one structure that
 * binds them all.
 */
tOptions autogenOptions = {
    OPTIONS_STRUCT_VERSION,
    0, NULL,                    /* original argc + argv    */
    ( OPTPROC_BASE
    + OPTPROC_ERRSTOP
    + OPTPROC_SHORTOPT
    + OPTPROC_LONGOPT
    + OPTPROC_NO_REQ_OPT
    + OPTPROC_NEGATIONS
    + OPTPROC_ENVIRON ),
    0, NULL,                    /* current option index, current option */
    NULL,         NULL,         zPROGNAME,
    zRcName,      zCopyright,   zLicenseDescrip,
    zFullVersion, apzHomeList,  zUsageTitle,
    zExplain,     zDetail,      optDesc,
    zBugsAddr,                  /* address to send bugs to */
    NULL, NULL,                 /* extensions/saved state  */
    optionUsage, /* usage procedure */
    translate_option_strings,   /* translation procedure */
    /*
     *  Indexes to special options
     */
    { INDEX_OPT_MORE_HELP, /* more-help option index */
      INDEX_OPT_SAVE_OPTS, /* save option index */
      NO_EQUIVALENT, /* '-#' option index */
      NO_EQUIVALENT /* index of default opt */
    },
    35 /* full option count */, 28 /* user option count */,
    autogen_full_usage, autogen_short_usage,
    original_autogen_defaults, original_autogen_cookies,
    PKGDATADIR, autogen_packager_info
};

#ifdef  __cplusplus
}
#endif
/** @} */
/* opts.c ends here */
