Blame src/danetool-args.h.bak

Packit Service 4684c1
/*   -*- buffer-read-only: t -*- vi: set ro:
Packit Service 4684c1
 *
Packit Service 4684c1
 *  DO NOT EDIT THIS FILE   (danetool-args.h)
Packit Service 4684c1
 *
Packit Service 4684c1
 *  It has been AutoGen-ed
Packit Service 4684c1
 *  From the definitions    danetool-args.def
Packit Service 4684c1
 *  and the template file   options
Packit Service 4684c1
 *
Packit Service 4684c1
 * Generated from AutoOpts 42:1:17 templates.
Packit Service 4684c1
 *
Packit Service 4684c1
 *  AutoOpts is a copyrighted work.  This header file is not encumbered
Packit Service 4684c1
 *  by AutoOpts licensing, but is provided under the licensing terms chosen
Packit Service 4684c1
 *  by the danetool author or copyright holder.  AutoOpts is
Packit Service 4684c1
 *  licensed under the terms of the LGPL.  The redistributable library
Packit Service 4684c1
 *  (``libopts'') is licensed under the terms of either the LGPL or, at the
Packit Service 4684c1
 *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
Packit Service 4684c1
 *  for details.
Packit Service 4684c1
 *
Packit Service 4684c1
 * The danetool program is copyrighted and licensed
Packit Service 4684c1
 * under the following terms:
Packit Service 4684c1
 *
Packit Service 4684c1
 *  Copyright (C) 2000-2020 Free Software Foundation, and others, all rights reserved.
Packit Service 4684c1
 *  This is free software. It is licensed for use, modification and
Packit Service 4684c1
 *  redistribution under the terms of the GNU General Public License,
Packit Service 4684c1
 *  version 3 or later <http://gnu.org/licenses/gpl.html>
Packit Service 4684c1
 *
Packit Service 4684c1
 *  danetool is free software: you can redistribute it and/or modify it
Packit Service 4684c1
 *  under the terms of the GNU General Public License as published by the
Packit Service 4684c1
 *  Free Software Foundation, either version 3 of the License, or
Packit Service 4684c1
 *  (at your option) any later version.
Packit Service 4684c1
 *
Packit Service 4684c1
 *  danetool is distributed in the hope that it will be useful, but
Packit Service 4684c1
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 4684c1
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit Service 4684c1
 *  See the GNU General Public License for more details.
Packit Service 4684c1
 *
Packit Service 4684c1
 *  You should have received a copy of the GNU General Public License along
Packit Service 4684c1
 *  with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit Service 4684c1
 */
Packit Service 4684c1
/**
Packit Service 4684c1
 *  This file contains the programmatic interface to the Automated
Packit Service 4684c1
 *  Options generated for the danetool program.
Packit Service 4684c1
 *  These macros are documented in the AutoGen info file in the
Packit Service 4684c1
 *  "AutoOpts" chapter.  Please refer to that doc for usage help.
Packit Service 4684c1
 */
Packit Service 4684c1
#ifndef AUTOOPTS_DANETOOL_ARGS_H_GUARD
Packit Service 4684c1
#define AUTOOPTS_DANETOOL_ARGS_H_GUARD 1
Packit Service 4684c1
#include "config.h"
Packit Service 4684c1
#include <autoopts/options.h>
Packit Service 4684c1
#include <stdarg.h>
Packit Service 4684c1
#include <stdnoreturn.h>
Packit Service 4684c1
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Ensure that the library used for compiling this generated header is at
Packit Service 4684c1
 *  least as new as the version current when the header template was released
Packit Service 4684c1
 *  (not counting patch version increments).  Also ensure that the oldest
Packit Service 4684c1
 *  tolerable version is at least as old as what was current when the header
Packit Service 4684c1
 *  template was released.
Packit Service 4684c1
 */
Packit Service 4684c1
#define AO_TEMPLATE_VERSION 172033
Packit Service 4684c1
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
Packit Service 4684c1
 || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
Packit Service 4684c1
# error option template version mismatches autoopts/options.h header
Packit Service 4684c1
  Choke Me.
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
#if GCC_VERSION > 40400
Packit Service 4684c1
#define NOT_REACHED __builtin_unreachable();
Packit Service 4684c1
#else
Packit Service 4684c1
#define NOT_REACHED
Packit Service 4684c1
#endif
Packit Service 4684c1
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Enumeration of each option type for danetool
Packit Service 4684c1
 */
Packit Service 4684c1
typedef enum {
Packit Service 4684c1
    INDEX_OPT_DEBUG             =  0,
Packit Service 4684c1
    INDEX_OPT_VERBOSE           =  1,
Packit Service 4684c1
    INDEX_OPT_INFILE            =  2,
Packit Service 4684c1
    INDEX_OPT_OUTFILE           =  3,
Packit Service 4684c1
    INDEX_OPT_LOAD_PUBKEY       =  4,
Packit Service 4684c1
    INDEX_OPT_LOAD_CERTIFICATE  =  5,
Packit Service 4684c1
    INDEX_OPT_DLV               =  6,
Packit Service 4684c1
    INDEX_OPT_HASH              =  7,
Packit Service 4684c1
    INDEX_OPT_CHECK             =  8,
Packit Service 4684c1
    INDEX_OPT_CHECK_EE          =  9,
Packit Service 4684c1
    INDEX_OPT_CHECK_CA          = 10,
Packit Service 4684c1
    INDEX_OPT_TLSA_RR           = 11,
Packit Service 4684c1
    INDEX_OPT_HOST              = 12,
Packit Service 4684c1
    INDEX_OPT_PROTO             = 13,
Packit Service 4684c1
    INDEX_OPT_PORT              = 14,
Packit Service 4684c1
    INDEX_OPT_APP_PROTO         = 15,
Packit Service 4684c1
    INDEX_OPT_STARTTLS_PROTO    = 16,
Packit Service 4684c1
    INDEX_OPT_CA                = 17,
Packit Service 4684c1
    INDEX_OPT_X509              = 18,
Packit Service 4684c1
    INDEX_OPT_LOCAL             = 19,
Packit Service 4684c1
    INDEX_OPT_DOMAIN            = 20,
Packit Service 4684c1
    INDEX_OPT_LOCAL_DNS         = 21,
Packit Service 4684c1
    INDEX_OPT_INSECURE          = 22,
Packit Service 4684c1
    INDEX_OPT_INDER             = 23,
Packit Service 4684c1
    INDEX_OPT_INRAW             = 24,
Packit Service 4684c1
    INDEX_OPT_PRINT_RAW         = 25,
Packit Service 4684c1
    INDEX_OPT_QUIET             = 26,
Packit Service 4684c1
    INDEX_OPT_VERSION           = 27,
Packit Service 4684c1
    INDEX_OPT_HELP              = 28,
Packit Service 4684c1
    INDEX_OPT_MORE_HELP         = 29
Packit Service 4684c1
} teOptIndex;
Packit Service 4684c1
/** count of all options for danetool */
Packit Service 4684c1
#define OPTION_CT    30
Packit Service 4684c1
/** danetool version */
Packit Service 4684c1
#define DANETOOL_VERSION       "3.6.14"
Packit Service 4684c1
/** Full danetool version text */
Packit Service 4684c1
#define DANETOOL_FULL_VERSION  "danetool 3.6.14"
Packit Service 4684c1
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Interface defines for all options.  Replace "n" with the UPPER_CASED
Packit Service 4684c1
 *  option name (as in the teOptIndex enumeration above).
Packit Service 4684c1
 *  e.g. HAVE_OPT(DEBUG)
Packit Service 4684c1
 */
Packit Service 4684c1
#define         DESC(n) (danetoolOptions.pOptDesc[INDEX_OPT_## n])
Packit Service 4684c1
/** 'true' if an option has been specified in any way */
Packit Service 4684c1
#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
Packit Service 4684c1
/** The string argument to an option. The argument type must be \"string\". */
Packit Service 4684c1
#define      OPT_ARG(n) (DESC(n).optArg.argString)
Packit Service 4684c1
/** Mask the option state revealing how an option was specified.
Packit Service 4684c1
 *  It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
Packit Service 4684c1
 * \a OPTST_DEFINED, \a OPTST_RESET or zero.
Packit Service 4684c1
 */
Packit Service 4684c1
#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
Packit Service 4684c1
/** Count of option's occurrances *on the command line*. */
Packit Service 4684c1
#define    COUNT_OPT(n) (DESC(n).optOccCt)
Packit Service 4684c1
/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
Packit Service 4684c1
#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
Packit Service 4684c1
/** 'true' if \a HAVE_OPT would yield 'false'. */
Packit Service 4684c1
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
Packit Service 4684c1
/** 'true' if OPTST_DISABLED bit not set. */
Packit Service 4684c1
#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
Packit Service 4684c1
/** number of stacked option arguments.
Packit Service 4684c1
 *  Valid only for stacked option arguments. */
Packit Service 4684c1
#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
Packit Service 4684c1
/** stacked argument vector.
Packit Service 4684c1
 *  Valid only for stacked option arguments. */
Packit Service 4684c1
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
Packit Service 4684c1
/** Reset an option. */
Packit Service 4684c1
#define    CLEAR_OPT(n) STMTS( \
Packit Service 4684c1
                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
Packit Service 4684c1
                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
Packit Service 4684c1
                    DESC(n).fOptState |= OPTST_DISABLED; \
Packit Service 4684c1
                DESC(n).optCookie = NULL )
Packit Service 4684c1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Enumeration of danetool exit codes
Packit Service 4684c1
 */
Packit Service 4684c1
typedef enum {
Packit Service 4684c1
    DANETOOL_EXIT_SUCCESS         = 0,
Packit Service 4684c1
    DANETOOL_EXIT_FAILURE         = 1,
Packit Service 4684c1
    DANETOOL_EXIT_USAGE_ERROR     = 64,
Packit Service 4684c1
    DANETOOL_EXIT_LIBOPTS_FAILURE = 70
Packit Service 4684c1
}   danetool_exit_code_t;
Packit Service 4684c1
/**
Packit Service 4684c1
 *  Interface defines for specific options.
Packit Service 4684c1
 * @{
Packit Service 4684c1
 */
Packit Service 4684c1
#define VALUE_OPT_DEBUG          'd'
Packit Service 4684c1
Packit Service 4684c1
#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
Packit Service 4684c1
#define VALUE_OPT_VERBOSE        'V'
Packit Service 4684c1
#define VALUE_OPT_INFILE         0x1001
Packit Service 4684c1
#define VALUE_OPT_OUTFILE        0x1002
Packit Service 4684c1
#define VALUE_OPT_LOAD_PUBKEY    0x1003
Packit Service 4684c1
#define VALUE_OPT_LOAD_CERTIFICATE 0x1004
Packit Service 4684c1
#define VALUE_OPT_DLV            0x1005
Packit Service 4684c1
#define VALUE_OPT_HASH           0x1006
Packit Service 4684c1
#define VALUE_OPT_CHECK          0x1007
Packit Service 4684c1
#define VALUE_OPT_CHECK_EE       0x1008
Packit Service 4684c1
#define VALUE_OPT_CHECK_CA       0x1009
Packit Service 4684c1
#define VALUE_OPT_TLSA_RR        0x100A
Packit Service 4684c1
#define VALUE_OPT_HOST           0x100B
Packit Service 4684c1
#define VALUE_OPT_PROTO          0x100C
Packit Service 4684c1
#define VALUE_OPT_PORT           0x100D
Packit Service 4684c1
#define VALUE_OPT_APP_PROTO      0x100E
Packit Service 4684c1
#define VALUE_OPT_STARTTLS_PROTO 0x100F
Packit Service 4684c1
#define VALUE_OPT_CA             0x1010
Packit Service 4684c1
#define VALUE_OPT_X509           0x1011
Packit Service 4684c1
#define VALUE_OPT_LOCAL          0x1012
Packit Service 4684c1
#define VALUE_OPT_DOMAIN         0x1013
Packit Service 4684c1
#define VALUE_OPT_LOCAL_DNS      0x1014
Packit Service 4684c1
#define VALUE_OPT_INSECURE       0x1015
Packit Service 4684c1
#define VALUE_OPT_INDER          0x1016
Packit Service 4684c1
#define VALUE_OPT_INRAW          0x1017
Packit Service 4684c1
#define VALUE_OPT_PRINT_RAW      0x1018
Packit Service 4684c1
#define VALUE_OPT_QUIET          0x1019
Packit Service 4684c1
/** option flag (value) for help-value option */
Packit Service 4684c1
#define VALUE_OPT_HELP          'h'
Packit Service 4684c1
/** option flag (value) for more-help-value option */
Packit Service 4684c1
#define VALUE_OPT_MORE_HELP     '!'
Packit Service 4684c1
/** option flag (value) for version-value option */
Packit Service 4684c1
#define VALUE_OPT_VERSION       'v'
Packit Service 4684c1
/*
Packit Service 4684c1
 *  Interface defines not associated with particular options
Packit Service 4684c1
 */
Packit Service 4684c1
#define ERRSKIP_OPTERR  STMTS(danetoolOptions.fOptSet &= ~OPTPROC_ERRSTOP)
Packit Service 4684c1
#define ERRSTOP_OPTERR  STMTS(danetoolOptions.fOptSet |= OPTPROC_ERRSTOP)
Packit Service 4684c1
#define RESTART_OPT(n)  STMTS( \
Packit Service 4684c1
                danetoolOptions.curOptIdx = (n); \
Packit Service 4684c1
                danetoolOptions.pzCurOpt  = NULL )
Packit Service 4684c1
#define START_OPT       RESTART_OPT(1)
Packit Service 4684c1
#define USAGE(c)        (*danetoolOptions.pUsageProc)(&danetoolOptions, c)
Packit Service 4684c1
Packit Service 4684c1
#ifdef  __cplusplus
Packit Service 4684c1
extern "C" {
Packit Service 4684c1
#endif
Packit Service 4684c1
/*
Packit Service 4684c1
 *  global exported definitions
Packit Service 4684c1
 */
Packit Service 4684c1
#include <gettext.h>
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
/* * * * * *
Packit Service 4684c1
 *
Packit Service 4684c1
 *  Declare the danetool option descriptor.
Packit Service 4684c1
 */
Packit Service 4684c1
extern tOptions danetoolOptions;
Packit Service 4684c1
Packit Service 4684c1
#if defined(ENABLE_NLS)
Packit Service 4684c1
# ifndef _
Packit Service 4684c1
#   include <stdio.h>
Packit Service 4684c1
#   ifndef HAVE_GETTEXT
Packit Service 4684c1
      extern char * gettext(char const *);
Packit Service 4684c1
#   else
Packit Service 4684c1
#     include <libintl.h>
Packit Service 4684c1
#   endif
Packit Service 4684c1
Packit Service 4684c1
# ifndef ATTRIBUTE_FORMAT_ARG
Packit Service 4684c1
#   define ATTRIBUTE_FORMAT_ARG(_a)
Packit Service 4684c1
# endif
Packit Service 4684c1
Packit Service 4684c1
static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
Packit Service 4684c1
static inline char* aoGetsText(char const* pz) {
Packit Service 4684c1
    if (pz == NULL) return NULL;
Packit Service 4684c1
    return (char*)gettext(pz);
Packit Service 4684c1
}
Packit Service 4684c1
#   define _(s)  aoGetsText(s)
Packit Service 4684c1
# endif /* _() */
Packit Service 4684c1
Packit Service 4684c1
# define OPT_NO_XLAT_CFG_NAMES  STMTS(danetoolOptions.fOptSet |= \
Packit Service 4684c1
                                    OPTPROC_NXLAT_OPT_CFG;)
Packit Service 4684c1
# define OPT_NO_XLAT_OPT_NAMES  STMTS(danetoolOptions.fOptSet |= \
Packit Service 4684c1
                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
Packit Service 4684c1
Packit Service 4684c1
# define OPT_XLAT_CFG_NAMES     STMTS(danetoolOptions.fOptSet &= \
Packit Service 4684c1
                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
Packit Service 4684c1
# define OPT_XLAT_OPT_NAMES     STMTS(danetoolOptions.fOptSet &= \
Packit Service 4684c1
                                  ~OPTPROC_NXLAT_OPT;)
Packit Service 4684c1
Packit Service 4684c1
#else   /* ENABLE_NLS */
Packit Service 4684c1
# define OPT_NO_XLAT_CFG_NAMES
Packit Service 4684c1
# define OPT_NO_XLAT_OPT_NAMES
Packit Service 4684c1
Packit Service 4684c1
# define OPT_XLAT_CFG_NAMES
Packit Service 4684c1
# define OPT_XLAT_OPT_NAMES
Packit Service 4684c1
Packit Service 4684c1
# ifndef _
Packit Service 4684c1
#   define _(_s)  _s
Packit Service 4684c1
# endif
Packit Service 4684c1
#endif  /* ENABLE_NLS */
Packit Service 4684c1
Packit Service 4684c1
Packit Service 4684c1
#ifdef  __cplusplus
Packit Service 4684c1
}
Packit Service 4684c1
#endif
Packit Service 4684c1
#endif /* AUTOOPTS_DANETOOL_ARGS_H_GUARD */
Packit Service 4684c1
Packit Service 4684c1
/* danetool-args.h ends here */