/*   -*- buffer-read-only: t -*- vi: set ro:
 *
 *  DO NOT EDIT THIS FILE   (xmlopts.c)
 *
 *  It has been AutoGen-ed
 *  From the definitions    /usr/src/ports/autogen/autogen-5.18.12-1.i686/src/autogen-5.18.12/xml2ag/xmlopts.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 xml2ag 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 xml2ag 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>
 *
 *  xml2ag 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.
 *
 *  xml2ag 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 xmlopts.c
 *  \addtogroup xml2ag
 *  @{
 */

#ifndef __doxygen__
#define OPTION_CODE_COMPILE 1
#include "xmlopts.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      (xml2ag_opt_strs+0)
#define zLicenseDescrip (xml2ag_opt_strs+271)

/*
 *  global included definitions
 */


#ifndef NULL
#  define NULL 0
#endif

/**
 *  static const strings for xml2ag options
 */
static char const xml2ag_opt_strs[2945] =
/*     0 */ "xml2ag (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"
/*   271 */ "xml2ag is free software: you can redistribute it and/or modify it under the\n"
            "terms of the GNU General Public License as published by the Free Software\n"
            "Foundation, either version 3 of the License, or (at your option) any later\n"
            "version.\n\n"
            "xml2ag 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"
/*   872 */ "All other options are derived from autogen:\0"
/*   916 */ "Output file in lieu of AutoGen processing\0"
/*   958 */ "OUTPUT\0"
/*   965 */ "output\0"
/*   972 */ "All other options:\0"
/*   991 */ "Search for templates in DIR\0"
/*  1019 */ "TEMPL_DIRS\0"
/*  1030 */ "templ-dirs\0"
/*  1041 */ "Use TPL-FILE for the template\0"
/*  1071 */ "OVERRIDE_TPL\0"
/*  1084 */ "override-tpl\0"
/*  1097 */ "Load AutoGen macros from TPL-FILE (deprecated)\0"
/*  1144 */ "LIB_TEMPLATE\0"
/*  1157 */ "lib-template\0"
/*  1170 */ "Read definitions from FILE\0"
/*  1197 */ "DEFINITIONS\0"
/*  1209 */ "definitions\0"
/*  1221 */ "name or path name of shell to use\0"
/*  1255 */ "SHELL\0"
/*  1261 */ "shell\0"
/*  1267 */ "Do not use in-mem streams\0"
/*  1293 */ "NO_FMEMOPEN\0"
/*  1305 */ "no-fmemopen\0"
/*  1317 */ "characters considered equivalent\0"
/*  1350 */ "EQUATE\0"
/*  1357 */ "equate\0"
/*  1364 */ "Specify NAME as the base name for output\0"
/*  1405 */ "BASE_NAME\0"
/*  1415 */ "base-name\0"
/*  1425 */ "set mod times to latest source\0"
/*  1456 */ "SOURCE_TIME\0"
/*  1468 */ "source-time\0"
/*  1480 */ "Allow output files to be writable\0"
/*  1514 */ "WRITABLE\0"
/*  1523 */ "not-writable\0"
/*  1536 */ "not\0"
/*  1540 */ "Limit on increment loops\0"
/*  1565 */ "LOOP_LIMIT\0"
/*  1576 */ "loop-limit\0"
/*  1587 */ "Limit server shell operations to SECONDS\0"
/*  1628 */ "TIMEOUT\0"
/*  1636 */ "timeout\0"
/*  1644 */ "tracing level of detail\0"
/*  1668 */ "TRACE\0"
/*  1674 */ "trace\0"
/*  1680 */ "tracing output file or filter\0"
/*  1710 */ "TRACE_OUT\0"
/*  1720 */ "trace-out\0"
/*  1730 */ "Show the definition tree\0"
/*  1755 */ "SHOW_DEFS\0"
/*  1765 */ "show-defs\0"
/*  1775 */ "Show the definitions used\0"
/*  1801 */ "USED_DEFINES\0"
/*  1814 */ "used-defines\0"
/*  1827 */ "Leave a core dump on a failure exit\0"
/*  1863 */ "CORE\0"
/*  1868 */ "core\0"
/*  1873 */ "Skip the file with this SUFFIX\0"
/*  1904 */ "SKIP_SUFFIX\0"
/*  1916 */ "skip-suffix\0"
/*  1928 */ "specify this output suffix\0"
/*  1955 */ "SELECT_SUFFIX\0"
/*  1969 */ "select-suffix\0"
/*  1983 */ "name to add to definition list\0"
/*  2014 */ "DEFINE\0"
/*  2021 */ "define\0"
/*  2028 */ "definition list removal pattern\0"
/*  2060 */ "UNDEFINE\0"
/*  2069 */ "undefine\0"
/*  2078 */ "emit make dependency file\0"
/*  2104 */ "MAKE_DEP\0"
/*  2113 */ "make-dep\0"
/*  2122 */ "display extended usage information and exit\0"
/*  2166 */ "help\0"
/*  2171 */ "extended usage information passed thru pager\0"
/*  2216 */ "more-help\0"
/*  2226 */ "output version information and exit\0"
/*  2262 */ "version\0"
/*  2270 */ "XML2AG\0"
/*  2277 */ "xml2ag (GNU AutoGen) - XML to AutoGen Definiton Converter - Ver. 5.18.12\n"
            "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ <def-file> ]\n\0"
/*  2423 */ "autogen-users@lists.sourceforge.net\0"
/*  2459 */ "This program will convert any arbitrary XML file into equivalent AutoGen\n"
            "definitions, and invoke AutoGen.\n\0"
/*  2566 */ "The template will be derived from either: * the ``--override-tpl'' command\n"
            "line option * a top level XML attribute named, \"template\"\n\n"
            "The ``base-name'' for the output will similarly be either: * the\n"
            "``--base-name'' command line option * the base name of the .xml file\n\0"
/*  2835 */ "xml2ag (GNU AutoGen) 5.18.12\0"
/*  2864 */ "nothing\0"
/*  2872 */ "debug-message\0"
/*  2886 */ "server-shell\0"
/*  2899 */ "templates\0"
/*  2909 */ "block-macros\0"
/*  2922 */ "expressions\0"
/*  2934 */ "everything";

/**
 *  the-xml2ag-option option description:
 */
/** the-xml2ag-option option separation text */
#define THE_XML2AG_OPTION_DESC      (xml2ag_opt_strs+872)
#define THE_XML2AG_OPTION_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)

/**
 *  output option description:
 */
/** Descriptive text for the output option */
#define OUTPUT_DESC      (xml2ag_opt_strs+916)
/** Upper-cased name for the output option */
#define OUTPUT_NAME      (xml2ag_opt_strs+958)
/** Name string for the output option */
#define OUTPUT_name      (xml2ag_opt_strs+965)
/** Compiled in flag settings for the output option */
#define OUTPUT_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  autogen-options option description:
 */
/** autogen-options option separation text */
#define AUTOGEN_OPTIONS_DESC      (xml2ag_opt_strs+972)
#define AUTOGEN_OPTIONS_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      (xml2ag_opt_strs+991)
/** Upper-cased name for the templ-dirs option */
#define TEMPL_DIRS_NAME      (xml2ag_opt_strs+1019)
/** Name string for the templ-dirs option */
#define TEMPL_DIRS_name      (xml2ag_opt_strs+1030)
/** 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      (xml2ag_opt_strs+1041)
/** Upper-cased name for the override-tpl option */
#define OVERRIDE_TPL_NAME      (xml2ag_opt_strs+1071)
/** Name string for the override-tpl option */
#define OVERRIDE_TPL_name      (xml2ag_opt_strs+1084)
/** Compiled in flag settings for the override-tpl option */
#define OVERRIDE_TPL_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

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

/**
 *  definitions option description:
 */
/** Descriptive text for the definitions option */
#define DEFINITIONS_DESC      (xml2ag_opt_strs+1170)
/** Upper-cased name for the definitions option */
#define DEFINITIONS_NAME      (xml2ag_opt_strs+1197)
/** Name string for the definitions option */
#define DEFINITIONS_name      (xml2ag_opt_strs+1209)
/** Compiled in flag settings for the definitions option */
#define DEFINITIONS_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  shell option description:
 */
/** Descriptive text for the shell option */
#define SHELL_DESC      (xml2ag_opt_strs+1221)
/** Upper-cased name for the shell option */
#define SHELL_NAME      (xml2ag_opt_strs+1255)
/** Name string for the shell option */
#define SHELL_name      (xml2ag_opt_strs+1261)
/** Compiled in flag settings for the shell option */
#define SHELL_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  no-fmemopen option description:
 */
/** Descriptive text for the no-fmemopen option */
#define NO_FMEMOPEN_DESC      (xml2ag_opt_strs+1267)
/** Upper-cased name for the no-fmemopen option */
#define NO_FMEMOPEN_NAME      (xml2ag_opt_strs+1293)
/** Name string for the no-fmemopen option */
#define NO_FMEMOPEN_name      (xml2ag_opt_strs+1305)
/** 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      (xml2ag_opt_strs+1317)
/** Upper-cased name for the equate option */
#define EQUATE_NAME      (xml2ag_opt_strs+1350)
/** Name string for the equate option */
#define EQUATE_name      (xml2ag_opt_strs+1357)
/** Compiled in flag settings for the equate option */
#define EQUATE_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  base-name option description:
 */
/** Descriptive text for the base-name option */
#define BASE_NAME_DESC      (xml2ag_opt_strs+1364)
/** Upper-cased name for the base-name option */
#define BASE_NAME_NAME      (xml2ag_opt_strs+1405)
/** Name string for the base-name option */
#define BASE_NAME_name      (xml2ag_opt_strs+1415)
/** Compiled in flag settings for the base-name option */
#define BASE_NAME_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  source-time option description:
 */
/** Descriptive text for the source-time option */
#define SOURCE_TIME_DESC      (xml2ag_opt_strs+1425)
/** Upper-cased name for the source-time option */
#define SOURCE_TIME_NAME      (xml2ag_opt_strs+1456)
/** Name string for the source-time option */
#define SOURCE_TIME_name      (xml2ag_opt_strs+1468)
/** 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      (xml2ag_opt_strs+1480)
/** Upper-cased name for the writable option */
#define WRITABLE_NAME      (xml2ag_opt_strs+1514)
/** disablement name for the writable option */
#define NOT_WRITABLE_name  (xml2ag_opt_strs+1523)
/** disablement prefix for the writable option */
#define NOT_WRITABLE_PFX   (xml2ag_opt_strs+1536)
/** 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)

/**
 *  loop-limit option description:
 */
/** Descriptive text for the loop-limit option */
#define LOOP_LIMIT_DESC      (xml2ag_opt_strs+1540)
/** Upper-cased name for the loop-limit option */
#define LOOP_LIMIT_NAME      (xml2ag_opt_strs+1565)
/** Name string for the loop-limit option */
#define LOOP_LIMIT_name      (xml2ag_opt_strs+1576)
/** 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:
 */
/** Descriptive text for the timeout option */
#define TIMEOUT_DESC      (xml2ag_opt_strs+1587)
/** Upper-cased name for the timeout option */
#define TIMEOUT_NAME      (xml2ag_opt_strs+1628)
/** Name string for the timeout option */
#define TIMEOUT_name      (xml2ag_opt_strs+1636)
/** Compiled in flag settings for the timeout option */
#define TIMEOUT_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))

/**
 *  trace option description:
 */
/** Descriptive text for the trace option */
#define TRACE_DESC      (xml2ag_opt_strs+1644)
/** Upper-cased name for the trace option */
#define TRACE_NAME      (xml2ag_opt_strs+1668)
/** Name string for the trace option */
#define TRACE_name      (xml2ag_opt_strs+1674)
/** 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      (xml2ag_opt_strs+1680)
/** Upper-cased name for the trace-out option */
#define TRACE_OUT_NAME      (xml2ag_opt_strs+1710)
/** Name string for the trace-out option */
#define TRACE_OUT_name      (xml2ag_opt_strs+1720)
/** 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:
 */
/** Descriptive text for the show-defs option */
#define SHOW_DEFS_DESC      (xml2ag_opt_strs+1730)
/** Upper-cased name for the show-defs option */
#define SHOW_DEFS_NAME      (xml2ag_opt_strs+1755)
/** Name string for the show-defs option */
#define SHOW_DEFS_name      (xml2ag_opt_strs+1765)
/** Compiled in flag settings for the show-defs option */
#define SHOW_DEFS_FLAGS     (OPTST_DISABLED)

/**
 *  used-defines option description:
 */
/** Descriptive text for the used-defines option */
#define USED_DEFINES_DESC      (xml2ag_opt_strs+1775)
/** Upper-cased name for the used-defines option */
#define USED_DEFINES_NAME      (xml2ag_opt_strs+1801)
/** Name string for the used-defines option */
#define USED_DEFINES_name      (xml2ag_opt_strs+1814)
/** Compiled in flag settings for the used-defines option */
#define USED_DEFINES_FLAGS     (OPTST_DISABLED)

/**
 *  core option description:
 */
#ifdef HAVE_SYS_RESOURCE_H
/** Descriptive text for the core option */
#define CORE_DESC      (xml2ag_opt_strs+1827)
/** Upper-cased name for the core option */
#define CORE_NAME      (xml2ag_opt_strs+1863)
/** Name string for the core option */
#define CORE_name      (xml2ag_opt_strs+1868)
/** 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 */

/**
 *  skip-suffix option description with
 *  "Must also have options" and "Incompatible options":
 */
/** Descriptive text for the skip-suffix option */
#define SKIP_SUFFIX_DESC      (xml2ag_opt_strs+1873)
/** Upper-cased name for the skip-suffix option */
#define SKIP_SUFFIX_NAME      (xml2ag_opt_strs+1904)
/** Name string for the skip-suffix option */
#define SKIP_SUFFIX_name      (xml2ag_opt_strs+1916)
/** 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_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  select-suffix option description:
 */
/** Descriptive text for the select-suffix option */
#define SELECT_SUFFIX_DESC      (xml2ag_opt_strs+1928)
/** Upper-cased name for the select-suffix option */
#define SELECT_SUFFIX_NAME      (xml2ag_opt_strs+1955)
/** Name string for the select-suffix option */
#define SELECT_SUFFIX_name      (xml2ag_opt_strs+1969)
/** Compiled in flag settings for the select-suffix option */
#define SELECT_SUFFIX_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

/**
 *  define option description:
 */
/** Descriptive text for the define option */
#define DEFINE_DESC      (xml2ag_opt_strs+1983)
/** Upper-cased name for the define option */
#define DEFINE_NAME      (xml2ag_opt_strs+2014)
/** Name string for the define option */
#define DEFINE_name      (xml2ag_opt_strs+2021)
/** 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      (xml2ag_opt_strs+2028)
/** Upper-cased name for the undefine option */
#define UNDEFINE_NAME      (xml2ag_opt_strs+2060)
/** Name string for the undefine option */
#define UNDEFINE_name      (xml2ag_opt_strs+2069)
/** Compiled in flag settings for the undefine option */
#define UNDEFINE_FLAGS     (OPTST_DISABLED \
        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))

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

/*
 *  Help/More_Help/Version option descriptions:
 */
#define HELP_DESC       (xml2ag_opt_strs+2122)
#define HELP_name       (xml2ag_opt_strs+2166)
#ifdef HAVE_WORKING_FORK
#define MORE_HELP_DESC  (xml2ag_opt_strs+2171)
#define MORE_HELP_name  (xml2ag_opt_strs+2216)
#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        (xml2ag_opt_strs+2226)
#define VER_name        (xml2ag_opt_strs+2262)
/**
 *  Declare option callback procedures
 */
extern tOptProc
    optionBooleanVal,   optionNestedVal,    optionNumericVal,
    optionPagedUsage,   optionPrintVersion, optionResetOpt,
    optionStackArg,     optionTimeDate,     optionTimeVal,
    optionUnstackArg,   optionVendorOption;
static tOptProc
    doOptLoop_Limit, doOptOutput, doOptTimeout, doOptTrace, doUsageOpt;
#define VER_PROC        optionPrintVersion

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 *  Define the xml2ag Option Descriptions.
 * This is an array of OPTION_CT entries, one for each
 * option that the xml2ag 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  */ THE_XML2AG_OPTION_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ THE_XML2AG_OPTION_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 1, VALUE_OPT_OUTPUT,
     /* equiv idx, value */ 1, VALUE_OPT_OUTPUT,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ OUTPUT_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --output */
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ doOptOutput,
     /* desc, NAME, name */ OUTPUT_DESC, OUTPUT_NAME, OUTPUT_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  */ AUTOGEN_OPTIONS_FLAGS, 0,
     /* last opt argumnt */ { NULL },
     /* arg list/cookie  */ NULL,
     /* must/cannot opts */ NULL, NULL,
     /* option proc      */ NULL,
     /* desc, NAME, name */ AUTOGEN_OPTIONS_DESC, NULL, NULL,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 3, VALUE_OPT_TEMPL_DIRS,
     /* equiv idx, value */ 3, 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 */ 4, VALUE_OPT_OVERRIDE_TPL,
     /* equiv idx, value */ 4, 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      */ NULL,
     /* desc, NAME, name */ OVERRIDE_TPL_DESC, OVERRIDE_TPL_NAME, OVERRIDE_TPL_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 5, VALUE_OPT_LIB_TEMPLATE,
     /* equiv idx, value */ 5, 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      */ optionStackArg,
     /* desc, NAME, name */ LIB_TEMPLATE_DESC, LIB_TEMPLATE_NAME, LIB_TEMPLATE_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 6, VALUE_OPT_DEFINITIONS,
     /* equiv idx, value */ 6, 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 */ NULL, NULL },

  {  /* entry idx, value */ 7, VALUE_OPT_SHELL,
     /* equiv idx, value */ 7, 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      */ NULL,
     /* desc, NAME, name */ SHELL_DESC, SHELL_NAME, SHELL_name,
     /* disablement strs */ NULL, NULL },

  {  /* entry idx, value */ 8, VALUE_OPT_NO_FMEMOPEN,
     /* equiv idx, value */ 8, 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 */ 9, VALUE_OPT_EQUATE,
     /* equiv idx, value */ 9, VALUE_OPT_EQUATE,
     /* equivalenced to  */ NO_EQUIVALENT,
     /* min, max, act ct */ 0, 1, 0,
     /* opt state flags  */ EQUATE_FLAGS, 0,
     /* last opt argumnt */ { NULL }, /* --equate */
     /* 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 */ 10, VALUE_OPT_BASE_NAME,
     /* equiv idx, value */ 10, 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 */ 11, VALUE_OPT_SOURCE_TIME,
     /* equiv idx, value */ 11, 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 */ NULL, NULL },

  {  /* entry idx, value */ 12, VALUE_OPT_WRITABLE,
     /* equiv idx, value */ 12, 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 */ 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 */ 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      */ optionStackArg,
     /* 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 */ 24, VALUE_OPT_MAKE_DEP,
     /* equiv idx, value */ 24, 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      */ NULL,
     /* desc, NAME, name */ MAKE_DEP_DESC, MAKE_DEP_NAME, MAKE_DEP_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 }
};


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of xml2ag. */
#define zPROGNAME       (xml2ag_opt_strs+2270)
/** Reference to the title line for xml2ag usage. */
#define zUsageTitle     (xml2ag_opt_strs+2277)
/** There is no xml2ag configuration file. */
#define zRcName         NULL
/** There are no directories to search for xml2ag config files. */
#define apzHomeList     NULL
/** The xml2ag program bug email address. */
#define zBugsAddr       (xml2ag_opt_strs+2423)
/** Clarification/explanation of what xml2ag does. */
#define zExplain        (xml2ag_opt_strs+2459)
/** Extra detail explaining what xml2ag does. */
#define zDetail         (xml2ag_opt_strs+2566)
/** The full version string for xml2ag. */
#define zFullVersion    (xml2ag_opt_strs+2835)
/* extracted from optcode.tlib near line 364 */

#define OPTPROC_BASE OPTPROC_NONE
#define translate_option_strings NULL

#define xml2ag_full_usage (NULL)
#define xml2ag_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;
    ex_code = XML2AG_EXIT_SUCCESS;
    optionUsage(&xml2agOptions, ex_code);
    /* NOTREACHED */
    exit(XML2AG_EXIT_FAILURE);
    (void)opts;
    (void)od;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the output option.
 * By default, the output is handed to an AutoGen for processing.
 * However, you may save the definitions to a file instead.
 * @param[in] pOptions the xml2ag options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
static void
doOptOutput(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 xmlopts.def, line 70 */
    if (strcmp(pOptDesc->optArg.argString, "-") == 0)
        return;

    if (freopen(pOptDesc->optArg.argString, "w", stdout) == NULL) {
        fprintf(stderr, "Error %d (%s) opening `%s' for output",
                errno, strerror(errno), pOptDesc->optArg.argString);
        exit(EXIT_FAILURE);
    }
    (void)pOptions;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the loop-limit option.
 * Pass-through AutoGen argument
 * @param[in] pOptions the xml2ag 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;
    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.
 * Pass-through AutoGen argument
 * @param[in] pOptions the xml2ag options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
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;
    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);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
 * Code to handle the trace option.
 * Pass-through AutoGen argument
 * @param[in] pOptions the xml2ag 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] = {
        xml2ag_opt_strs+2864, xml2ag_opt_strs+2872, xml2ag_opt_strs+2886,
        xml2ag_opt_strs+2899, xml2ag_opt_strs+2909, xml2ag_opt_strs+2922,
        xml2ag_opt_strs+2934 };

    if (pOptions <= OPTPROC_EMIT_LIMIT) {
        (void) optionEnumerationVal(pOptions, pOptDesc, names, 7);
        return; /* protect AutoOpts client code from internal callbacks */
    }

    pOptDesc->optArg.argEnum =
        optionEnumerationVal(pOptions, pOptDesc, names, 7);
}
/* extracted from optmain.tlib near line 1250 */

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

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

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

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

#endif /* __doxygen__ */
/**
 * The option definitions for xml2ag.  The one structure that
 * binds them all.
 */
tOptions xml2agOptions = {
    OPTIONS_STRUCT_VERSION,
    0, NULL,                    /* original argc + argv    */
    ( OPTPROC_BASE
    + OPTPROC_ERRSTOP
    + OPTPROC_SHORTOPT
    + OPTPROC_LONGOPT
    + OPTPROC_NO_REQ_OPT
    + OPTPROC_NEGATIONS ),
    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 */
      NO_EQUIVALENT, /* save option index */
      NO_EQUIVALENT, /* '-#' option index */
      NO_EQUIVALENT /* index of default opt */
    },
    28 /* full option count */, 25 /* user option count */,
    xml2ag_full_usage, xml2ag_short_usage,
    NULL, NULL,
    PKGDATADIR, xml2ag_packager_info
};

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