/*   -*- 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 42:1:17 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-2018 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 <sys/stat.h>

#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.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[3212] =
/*     0 */ "autogen (GNU AutoGen) 5.18.16\n"
            "Copyright (C) 1992-2018 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 */ "Read definitions from FILE\0"
/*  1089 */ "DEFINITIONS\0"
/*  1101 */ "no-definitions\0"
/*  1116 */ "no\0"
/*  1119 */ "name or path name of shell to use\0"
/*  1153 */ "SHELL\0"
/*  1159 */ "shell\0"
/*  1165 */ "Do not use in-mem streams\0"
/*  1191 */ "NO_FMEMOPEN\0"
/*  1203 */ "no-fmemopen\0"
/*  1215 */ "characters considered equivalent\0"
/*  1248 */ "EQUATE\0"
/*  1255 */ "equate\0"
/*  1262 */ "_-^\0"
/*  1266 */ "The following options modify how output is handled:\0"
/*  1318 */ "Specify NAME as the base name for output\0"
/*  1359 */ "BASE_NAME\0"
/*  1369 */ "base-name\0"
/*  1379 */ "set mod times to latest source\0"
/*  1410 */ "SOURCE_TIME\0"
/*  1422 */ "no-source-time\0"
/*  1437 */ "Allow output files to be writable\0"
/*  1471 */ "WRITABLE\0"
/*  1480 */ "not-writable\0"
/*  1493 */ "not\0"
/*  1497 */ "The following options are often useful while debugging new templates:\0"
/*  1567 */ "Limit on increment loops\0"
/*  1592 */ "LOOP_LIMIT\0"
/*  1603 */ "loop-limit\0"
/*  1614 */ "Limit server shell operations to SECONDS\0"
/*  1655 */ "TIMEOUT\0"
/*  1663 */ "timeout\0"
/*  1671 */ "tracing level of detail\0"
/*  1695 */ "TRACE\0"
/*  1701 */ "trace\0"
/*  1707 */ "tracing output file or filter\0"
/*  1737 */ "TRACE_OUT\0"
/*  1747 */ "trace-out\0"
/*  1757 */ "Show the definition tree\0"
/*  1782 */ "SHOW_DEFS\0"
/*  1792 */ "show-defs\0"
/*  1802 */ "Show the definitions used\0"
/*  1828 */ "USED_DEFINES\0"
/*  1841 */ "used-defines\0"
/*  1854 */ "Leave a core dump on a failure exit\0"
/*  1890 */ "CORE\0"
/*  1895 */ "core\0"
/*  1900 */ "These options can be used to control what gets processed in the\n"
            "definitions files and template files:\0"
/*  2002 */ "Skip the file with this SUFFIX\0"
/*  2033 */ "SKIP_SUFFIX\0"
/*  2045 */ "skip-suffix\0"
/*  2057 */ "specify this output suffix\0"
/*  2084 */ "SELECT_SUFFIX\0"
/*  2098 */ "select-suffix\0"
/*  2112 */ "name to add to definition list\0"
/*  2143 */ "DEFINE\0"
/*  2150 */ "define\0"
/*  2157 */ "definition list removal pattern\0"
/*  2189 */ "UNDEFINE\0"
/*  2198 */ "undefine\0"
/*  2207 */ "This option is used to automate dependency tracking:\0"
/*  2260 */ "emit make dependency file\0"
/*  2286 */ "MAKE_DEP\0"
/*  2295 */ "make-dep\0"
/*  2304 */ "help, version, option and error handling:\0"
/*  2346 */ "Do not abort on errors\0"
/*  2369 */ "NO_ABORT\0"
/*  2378 */ "no-abort\0"
/*  2387 */ "display extended usage information and exit\0"
/*  2431 */ "help\0"
/*  2436 */ "extended usage information passed thru pager\0"
/*  2481 */ "more-help\0"
/*  2491 */ "output version information and exit\0"
/*  2527 */ "version\0"
/*  2535 */ "reset an option's state\0"
/*  2559 */ "reset-option\0"
/*  2572 */ "abbreviated usage to stdout\0"
/*  2600 */ "usage\0"
/*  2606 */ "save the option state to a config file\0"
/*  2645 */ "save-opts\0"
/*  2655 */ "load options from a config file\0"
/*  2687 */ "LOAD_OPTS\0"
/*  2697 */ "no-load-opts\0"
/*  2710 */ "AUTOGEN\0"
/*  2718 */ "autogen (GNU AutoGen) - The Automated Program Generator - Ver. 5.18.16\n"
            "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ <def-file> ]\n\0"
/*  2862 */ "$HOME\0"
/*  2868 */ ".\0"
/*  2870 */ ".autogenrc\0"
/*  2881 */ "autogen-users@lists.sourceforge.net\0"
/*  2917 */ "AutoGen creates text files from templates using external definitions.\n\0"
/*  2988 */ "AutoGen is a tool designed for generating program files that contain\n"
            "repetitive text with varied substitutions.\n\0"
/*  3101 */ "autogen (GNU AutoGen) 5.18.16\0"
/*  3131 */ "nothing\0"
/*  3139 */ "debug-message\0"
/*  3153 */ "server-shell\0"
/*  3166 */ "templates\0"
/*  3176 */ "block-macros\0"
/*  3189 */ "expressions\0"
/*  3201 */ "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))

/**
 *  definitions option description:
 */
/** Descriptive text for the definitions option */
#define DEFINITIONS_DESC      (autogen_opt_strs+1062)
/** Upper-cased name for the definitions option */
#define DEFINITIONS_NAME      (autogen_opt_strs+1089)
/** disablement name for the definitions option */
#define NOT_DEFINITIONS_name  (autogen_opt_strs+1101)
/** disablement prefix for the definitions option */
#define NOT_DEFINITIONS_PFX   (autogen_opt_strs+1116)
/** 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+1119)
/** Upper-cased name for the shell option */
#define SHELL_NAME      (autogen_opt_strs+1153)
/** Name string for the shell option */
#define SHELL_name      (autogen_opt_strs+1159)
/** 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+1165)
/** Upper-cased name for the no-fmemopen option */
#define NO_FMEMOPEN_NAME      (autogen_opt_strs+1191)
/** Name string for the no-fmemopen option */
#define NO_FMEMOPEN_name      (autogen_opt_strs+1203)
/** 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+1215)
/** Upper-cased name for the equate option */
#define EQUATE_NAME      (autogen_opt_strs+1248)
/** Name string for the equate option */
#define EQUATE_name      (autogen_opt_strs+1255)
/** The compiled in default value for the equate option argument */
#define EQUATE_DFT_ARG   (autogen_opt_strs+1262)
/** 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+1266)
#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+1318)
/** Upper-cased name for the base-name option */
#define BASE_NAME_NAME      (autogen_opt_strs+1359)
/** Name string for the base-name option */
#define BASE_NAME_name      (autogen_opt_strs+1369)
/** 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+1379)
/** Upper-cased name for the source-time option */
#define SOURCE_TIME_NAME      (autogen_opt_strs+1410)
/** disablement name for the source-time option */
#define NOT_SOURCE_TIME_name  (autogen_opt_strs+1422)
/** disablement prefix for the source-time option */
#define NOT_SOURCE_TIME_PFX   (autogen_opt_strs+1116)
/** 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+1437)
/** Upper-cased name for the writable option */
#define WRITABLE_NAME      (autogen_opt_strs+1471)
/** disablement name for the writable option */
#define NOT_WRITABLE_name  (autogen_opt_strs+1480)
/** disablement prefix for the writable option */
#define NOT_WRITABLE_PFX   (autogen_opt_strs+1493)
/** 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+1497)
#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+1567)
/** Upper-cased name for the loop-limit option */
#define LOOP_LIMIT_NAME      (autogen_opt_strs+1592)
/** Name string for the loop-limit option */
#define LOOP_LIMIT_name      (autogen_opt_strs+1603)
/** 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+1614)
/** Upper-cased name for the timeout option */
#define TIMEOUT_NAME      (autogen_opt_strs+1655)
/** Name string for the timeout option */
#define TIMEOUT_name      (autogen_opt_strs+1663)
/** 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+1671)
/** Upper-cased name for the trace option */
#define TRACE_NAME      (autogen_opt_strs+1695)
/** Name string for the trace option */
#define TRACE_name      (autogen_opt_strs+1701)
/** 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+1707)
/** Upper-cased name for the trace-out option */
#define TRACE_OUT_NAME      (autogen_opt_strs+1737)
/** Name string for the trace-out option */
#define TRACE_OUT_name      (autogen_opt_strs+1747)
/** 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+1757)
/** Upper-cased name for the show-defs option */
#define SHOW_DEFS_NAME      (autogen_opt_strs+1782)
/** Name string for the show-defs option */
#define SHOW_DEFS_name      (autogen_opt_strs+1792)
/** 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+1792)
#endif  /* DEBUG_ENABLED */

/**
 *  used-defines option description:
 */
/** Descriptive text for the used-defines option */
#define USED_DEFINES_DESC      (autogen_opt_strs+1802)
/** Upper-cased name for the used-defines option */
#define USED_DEFINES_NAME      (autogen_opt_strs+1828)
/** Name string for the used-defines option */
#define USED_DEFINES_name      (autogen_opt_strs+1841)
/** 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+1854)
/** Upper-cased name for the core option */
#define CORE_NAME      (autogen_opt_strs+1890)
/** Name string for the core option */
#define CORE_name      (autogen_opt_strs+1895)
/** 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+1900)
#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+2002)
/** Upper-cased name for the skip-suffix option */
#define SKIP_SUFFIX_NAME      (autogen_opt_strs+2033)
/** Name string for the skip-suffix option */
#define SKIP_SUFFIX_name      (autogen_opt_strs+2045)
/** 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+2057)
/** Upper-cased name for the select-suffix option */
#define SELECT_SUFFIX_NAME      (autogen_opt_strs+2084)
/** Name string for the select-suffix option */
#define SELECT_SUFFIX_name      (autogen_opt_strs+2098)
/** 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+2112)
/** Upper-cased name for the define option */
#define DEFINE_NAME      (autogen_opt_strs+2143)
/** Name string for the define option */
#define DEFINE_name      (autogen_opt_strs+2150)
/** 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+2157)
/** Upper-cased name for the undefine option */
#define UNDEFINE_NAME      (autogen_opt_strs+2189)
/** Name string for the undefine option */
#define UNDEFINE_name      (autogen_opt_strs+2198)
/** 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+2207)
#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+2260)
/** Upper-cased name for the make-dep option */
#define MAKE_DEP_NAME      (autogen_opt_strs+2286)
/** Name string for the make-dep option */
#define MAKE_DEP_name      (autogen_opt_strs+2295)
/** 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+2304)
#define AUTOOPTS_OPTS_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/**
 *  no-abort option description:
 */
/** Descriptive text for the no-abort option */
#define NO_ABORT_DESC      (autogen_opt_strs+2346)
/** Upper-cased name for the no-abort option */
#define NO_ABORT_NAME      (autogen_opt_strs+2369)
/** Name string for the no-abort option */
#define NO_ABORT_name      (autogen_opt_strs+2378)
/** Compiled in flag settings for the no-abort option */
#define NO_ABORT_FLAGS     (OPTST_DISABLED)

/*
 *  Help/More_Help/Version option descriptions:
 */
#define HELP_DESC       (autogen_opt_strs+2387)
#define HELP_name       (autogen_opt_strs+2431)
#ifdef HAVE_WORKING_FORK
#define MORE_HELP_DESC  (autogen_opt_strs+2436)
#define MORE_HELP_name  (autogen_opt_strs+2481)
#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+2491)
#define VER_name        (autogen_opt_strs+2527)
#define RESET_DESC      (autogen_opt_strs+2535)
#define RESET_name      (autogen_opt_strs+2559)
#define RESET_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)|OPTST_NO_INIT)
#define USAGE_DESC      (autogen_opt_strs+2572)
#define USAGE_name      (autogen_opt_strs+2600)
#define SAVE_OPTS_DESC  (autogen_opt_strs+2606)
#define SAVE_OPTS_name  (autogen_opt_strs+2645)
#define LOAD_OPTS_DESC     (autogen_opt_strs+2655)
#define LOAD_OPTS_NAME     (autogen_opt_strs+2687)
#define NO_LOAD_OPTS_name  (autogen_opt_strs+2697)
#define LOAD_OPTS_pfx      (autogen_opt_strs+1116)
#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
    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_DEFINITIONS,
     /* equiv idx, value */ 3, 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 */ 4, VALUE_OPT_SHELL,
     /* equiv idx, value */ 4, 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 */ 5, VALUE_OPT_NO_FMEMOPEN,
     /* equiv idx, value */ 5, 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 */ 6, VALUE_OPT_EQUATE,
     /* equiv idx, value */ 6, 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 */ 8, VALUE_OPT_BASE_NAME,
     /* equiv idx, value */ 8, 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 */ 9, VALUE_OPT_SOURCE_TIME,
     /* equiv idx, value */ 9, 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 */ 10, VALUE_OPT_WRITABLE,
     /* equiv idx, value */ 10, 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 */ 12, VALUE_OPT_LOOP_LIMIT,
     /* equiv idx, value */ 12, 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 */ 13, VALUE_OPT_TIMEOUT,
     /* equiv idx, value */ 13, 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 */ 14, VALUE_OPT_TRACE,
     /* equiv idx, value */ 14, 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 */ 15, VALUE_OPT_TRACE_OUT,
     /* equiv idx, value */ 15, 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 */ 16, VALUE_OPT_SHOW_DEFS,
     /* equiv idx, value */ 16, 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 */ 17, VALUE_OPT_USED_DEFINES,
     /* equiv idx, value */ 17, 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 */ 18, VALUE_OPT_CORE,
     /* equiv idx, value */ 18, 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 */ 20, VALUE_OPT_SKIP_SUFFIX,
     /* equiv idx, value */ 20, 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 */ 21, VALUE_OPT_SELECT_SUFFIX,
     /* equiv idx, value */ 21, 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 */ 22, VALUE_OPT_DEFINE,
     /* equiv idx, value */ 22, 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 */ 23, 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 */ 25, VALUE_OPT_MAKE_DEP,
     /* equiv idx, value */ 25, 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 */ 27, VALUE_OPT_NO_ABORT,
     /* equiv idx, value */ 27, VALUE_OPT_NO_ABORT,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ NO_ABORT_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --no-abort */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ NO_ABORT_DESC, NO_ABORT_NAME, NO_ABORT_name,
     /* 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+2710)
/** Reference to the title line for autogen usage. */
#define zUsageTitle     (autogen_opt_strs+2718)
/** autogen configuration file name. */
#define zRcName         (autogen_opt_strs+2870)
/** Directories to search for autogen config files. */
static char const * const apzHomeList[3] = {
    autogen_opt_strs+2862,
    autogen_opt_strs+2868,
    NULL };
/** The autogen program bug email address. */
#define zBugsAddr       (autogen_opt_strs+2881)
/** Clarification/explanation of what autogen does. */
#define zExplain        (autogen_opt_strs+2917)
/** Extra detail explaining what autogen does. */
#define zDetail         (autogen_opt_strs+2988)
/** The full version string for autogen. */
#define zFullVersion    (autogen_opt_strs+3101)
/* extracted from optcode.tlib near line 342 */

#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 }, /* --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 }, /* --no-abort */
    { 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 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 231 */
    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+3131, autogen_opt_strs+3139, autogen_opt_strs+3153,
        autogen_opt_strs+3166, autogen_opt_strs+3176, autogen_opt_strs+3189,
        autogen_opt_strs+3201 };

    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 594 */
    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
 */
noreturn extern 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, but C11 compilers cannot tell. */
    abort();
}

/**
 * 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
 */
noreturn extern void
usage_message(char const * fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    vusage_message(fmt, 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
 */
noreturn extern 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);
}

/**
 * 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
 */
noreturn extern void
die(int exit_code, char const * fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    vdie(exit_code, fmt, 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
 */
noreturn extern 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);
}

/**
 * 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 */
