Blame src/ocsptool-args.h.bak

Packit 549fdc
/*   -*- buffer-read-only: t -*- vi: set ro:
Packit 549fdc
 *
Packit 549fdc
 *  DO NOT EDIT THIS FILE   (ocsptool-args.h)
Packit 549fdc
 *
Packit 549fdc
 *  It has been AutoGen-ed
Packit 549fdc
 *  From the definitions    ocsptool-args.def
Packit 549fdc
 *  and the template file   options
Packit 549fdc
 *
Packit 549fdc
 * Generated from AutoOpts 41:1:16 templates.
Packit 549fdc
 *
Packit 549fdc
 *  AutoOpts is a copyrighted work.  This header file is not encumbered
Packit 549fdc
 *  by AutoOpts licensing, but is provided under the licensing terms chosen
Packit 549fdc
 *  by the ocsptool author or copyright holder.  AutoOpts is
Packit 549fdc
 *  licensed under the terms of the LGPL.  The redistributable library
Packit 549fdc
 *  (``libopts'') is licensed under the terms of either the LGPL or, at the
Packit 549fdc
 *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
Packit 549fdc
 *  for details.
Packit 549fdc
 *
Packit 549fdc
 * The ocsptool program is copyrighted and licensed
Packit 549fdc
 * under the following terms:
Packit 549fdc
 *
Packit 549fdc
 *  Copyright (C) 2000-2018 Free Software Foundation, and others, all rights reserved.
Packit 549fdc
 *  This is free software. It is licensed for use, modification and
Packit 549fdc
 *  redistribution under the terms of the GNU General Public License,
Packit 549fdc
 *  version 3 or later <http://gnu.org/licenses/gpl.html>
Packit 549fdc
 *
Packit 549fdc
 *  ocsptool is free software: you can redistribute it and/or modify it
Packit 549fdc
 *  under the terms of the GNU General Public License as published by the
Packit 549fdc
 *  Free Software Foundation, either version 3 of the License, or
Packit 549fdc
 *  (at your option) any later version.
Packit 549fdc
 *
Packit 549fdc
 *  ocsptool is distributed in the hope that it will be useful, but
Packit 549fdc
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 549fdc
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit 549fdc
 *  See the GNU General Public License for more details.
Packit 549fdc
 *
Packit 549fdc
 *  You should have received a copy of the GNU General Public License along
Packit 549fdc
 *  with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 549fdc
 */
Packit 549fdc
/**
Packit 549fdc
 *  This file contains the programmatic interface to the Automated
Packit 549fdc
 *  Options generated for the ocsptool program.
Packit 549fdc
 *  These macros are documented in the AutoGen info file in the
Packit 549fdc
 *  "AutoOpts" chapter.  Please refer to that doc for usage help.
Packit 549fdc
 */
Packit 549fdc
#ifndef AUTOOPTS_OCSPTOOL_ARGS_H_GUARD
Packit 549fdc
#define AUTOOPTS_OCSPTOOL_ARGS_H_GUARD 1
Packit 549fdc
#include "config.h"
Packit 549fdc
#include <autoopts/options.h>
Packit 549fdc
Packit 549fdc
/**
Packit 549fdc
 *  Ensure that the library used for compiling this generated header is at
Packit 549fdc
 *  least as new as the version current when the header template was released
Packit 549fdc
 *  (not counting patch version increments).  Also ensure that the oldest
Packit 549fdc
 *  tolerable version is at least as old as what was current when the header
Packit 549fdc
 *  template was released.
Packit 549fdc
 */
Packit 549fdc
#define AO_TEMPLATE_VERSION 167937
Packit 549fdc
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
Packit 549fdc
 || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
Packit 549fdc
# error option template version mismatches autoopts/options.h header
Packit 549fdc
  Choke Me.
Packit 549fdc
#endif
Packit 549fdc
Packit 549fdc
/**
Packit 549fdc
 *  Enumeration of each option type for ocsptool
Packit 549fdc
 */
Packit 549fdc
typedef enum {
Packit 549fdc
    INDEX_OPT_DEBUG                =  0,
Packit 549fdc
    INDEX_OPT_VERBOSE              =  1,
Packit 549fdc
    INDEX_OPT_INFILE               =  2,
Packit 549fdc
    INDEX_OPT_OUTFILE              =  3,
Packit 549fdc
    INDEX_OPT_ASK                  =  4,
Packit 549fdc
    INDEX_OPT_VERIFY_RESPONSE      =  5,
Packit 549fdc
    INDEX_OPT_REQUEST_INFO         =  6,
Packit 549fdc
    INDEX_OPT_RESPONSE_INFO        =  7,
Packit 549fdc
    INDEX_OPT_GENERATE_REQUEST     =  8,
Packit 549fdc
    INDEX_OPT_NONCE                =  9,
Packit 549fdc
    INDEX_OPT_LOAD_CHAIN           = 10,
Packit 549fdc
    INDEX_OPT_LOAD_ISSUER          = 11,
Packit 549fdc
    INDEX_OPT_LOAD_CERT            = 12,
Packit 549fdc
    INDEX_OPT_LOAD_TRUST           = 13,
Packit 549fdc
    INDEX_OPT_LOAD_SIGNER          = 14,
Packit 549fdc
    INDEX_OPT_INDER                = 15,
Packit 549fdc
    INDEX_OPT_LOAD_REQUEST         = 16,
Packit 549fdc
    INDEX_OPT_LOAD_RESPONSE        = 17,
Packit 549fdc
    INDEX_OPT_IGNORE_ERRORS        = 18,
Packit 549fdc
    INDEX_OPT_VERIFY_ALLOW_BROKEN  = 19,
Packit 549fdc
    INDEX_OPT_VERSION              = 20,
Packit 549fdc
    INDEX_OPT_HELP                 = 21,
Packit 549fdc
    INDEX_OPT_MORE_HELP            = 22
Packit 549fdc
} teOptIndex;
Packit 549fdc
/** count of all options for ocsptool */
Packit 549fdc
#define OPTION_CT    23
Packit 549fdc
/** ocsptool version */
Packit 549fdc
#define OCSPTOOL_VERSION       "3.6.2"
Packit 549fdc
/** Full ocsptool version text */
Packit 549fdc
#define OCSPTOOL_FULL_VERSION  "ocsptool 3.6.2"
Packit 549fdc
Packit 549fdc
/**
Packit 549fdc
 *  Interface defines for all options.  Replace "n" with the UPPER_CASED
Packit 549fdc
 *  option name (as in the teOptIndex enumeration above).
Packit 549fdc
 *  e.g. HAVE_OPT(DEBUG)
Packit 549fdc
 */
Packit 549fdc
#define         DESC(n) (ocsptoolOptions.pOptDesc[INDEX_OPT_## n])
Packit 549fdc
/** 'true' if an option has been specified in any way */
Packit 549fdc
#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
Packit 549fdc
/** The string argument to an option. The argument type must be \"string\". */
Packit 549fdc
#define      OPT_ARG(n) (DESC(n).optArg.argString)
Packit 549fdc
/** Mask the option state revealing how an option was specified.
Packit 549fdc
 *  It will be one and only one of \a OPTST_SET, \a OPTST_PRESET,
Packit 549fdc
 * \a OPTST_DEFINED, \a OPTST_RESET or zero.
Packit 549fdc
 */
Packit 549fdc
#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
Packit 549fdc
/** Count of option's occurrances *on the command line*. */
Packit 549fdc
#define    COUNT_OPT(n) (DESC(n).optOccCt)
Packit 549fdc
/** mask of \a OPTST_SET and \a OPTST_DEFINED. */
Packit 549fdc
#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
Packit 549fdc
/** 'true' if \a HAVE_OPT would yield 'false'. */
Packit 549fdc
#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
Packit 549fdc
/** 'true' if OPTST_DISABLED bit not set. */
Packit 549fdc
#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
Packit 549fdc
/** number of stacked option arguments.
Packit 549fdc
 *  Valid only for stacked option arguments. */
Packit 549fdc
#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
Packit 549fdc
/** stacked argument vector.
Packit 549fdc
 *  Valid only for stacked option arguments. */
Packit 549fdc
#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
Packit 549fdc
/** Reset an option. */
Packit 549fdc
#define    CLEAR_OPT(n) STMTS( \
Packit 549fdc
                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
Packit 549fdc
                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
Packit 549fdc
                    DESC(n).fOptState |= OPTST_DISABLED; \
Packit 549fdc
                DESC(n).optCookie = NULL )
Packit 549fdc
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Packit 549fdc
/**
Packit 549fdc
 *  Enumeration of ocsptool exit codes
Packit 549fdc
 */
Packit 549fdc
typedef enum {
Packit 549fdc
    OCSPTOOL_EXIT_SUCCESS         = 0,
Packit 549fdc
    OCSPTOOL_EXIT_FAILURE         = 1,
Packit 549fdc
    OCSPTOOL_EXIT_USAGE_ERROR     = 64,
Packit 549fdc
    OCSPTOOL_EXIT_LIBOPTS_FAILURE = 70
Packit 549fdc
}   ocsptool_exit_code_t;
Packit 549fdc
/**
Packit 549fdc
 *  Interface defines for specific options.
Packit 549fdc
 * @{
Packit 549fdc
 */
Packit 549fdc
#define VALUE_OPT_DEBUG          'd'
Packit 549fdc
Packit 549fdc
#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
Packit 549fdc
#define VALUE_OPT_VERBOSE        'V'
Packit 549fdc
#define VALUE_OPT_INFILE         0x1001
Packit 549fdc
#define VALUE_OPT_OUTFILE        0x1002
Packit 549fdc
#define VALUE_OPT_ASK            0x1003
Packit 549fdc
#define VALUE_OPT_VERIFY_RESPONSE 'e'
Packit 549fdc
#define VALUE_OPT_REQUEST_INFO   'i'
Packit 549fdc
#define VALUE_OPT_RESPONSE_INFO  'j'
Packit 549fdc
#define VALUE_OPT_GENERATE_REQUEST 'q'
Packit 549fdc
#define VALUE_OPT_NONCE          0x1004
Packit 549fdc
#define VALUE_OPT_LOAD_CHAIN     0x1005
Packit 549fdc
#define VALUE_OPT_LOAD_ISSUER    0x1006
Packit 549fdc
#define VALUE_OPT_LOAD_CERT      0x1007
Packit 549fdc
#define VALUE_OPT_LOAD_TRUST     0x1008
Packit 549fdc
#define VALUE_OPT_LOAD_SIGNER    0x1009
Packit 549fdc
#define VALUE_OPT_INDER          0x100A
Packit 549fdc
#define VALUE_OPT_LOAD_REQUEST   'Q'
Packit 549fdc
#define VALUE_OPT_LOAD_RESPONSE  'S'
Packit 549fdc
#define VALUE_OPT_IGNORE_ERRORS  0x100B
Packit 549fdc
#define VALUE_OPT_VERIFY_ALLOW_BROKEN 0x100C
Packit 549fdc
/** option flag (value) for help-value option */
Packit 549fdc
#define VALUE_OPT_HELP          'h'
Packit 549fdc
/** option flag (value) for more-help-value option */
Packit 549fdc
#define VALUE_OPT_MORE_HELP     '!'
Packit 549fdc
/** option flag (value) for version-value option */
Packit 549fdc
#define VALUE_OPT_VERSION       'v'
Packit 549fdc
/*
Packit 549fdc
 *  Interface defines not associated with particular options
Packit 549fdc
 */
Packit 549fdc
#define ERRSKIP_OPTERR  STMTS(ocsptoolOptions.fOptSet &= ~OPTPROC_ERRSTOP)
Packit 549fdc
#define ERRSTOP_OPTERR  STMTS(ocsptoolOptions.fOptSet |= OPTPROC_ERRSTOP)
Packit 549fdc
#define RESTART_OPT(n)  STMTS( \
Packit 549fdc
                ocsptoolOptions.curOptIdx = (n); \
Packit 549fdc
                ocsptoolOptions.pzCurOpt  = NULL )
Packit 549fdc
#define START_OPT       RESTART_OPT(1)
Packit 549fdc
#define USAGE(c)        (*ocsptoolOptions.pUsageProc)(&ocsptoolOptions, c)
Packit 549fdc
Packit 549fdc
#ifdef  __cplusplus
Packit 549fdc
extern "C" {
Packit 549fdc
#endif
Packit 549fdc
/*
Packit 549fdc
 *  global exported definitions
Packit 549fdc
 */
Packit 549fdc
#include <gettext.h>
Packit 549fdc
Packit 549fdc
Packit 549fdc
/* * * * * *
Packit 549fdc
 *
Packit 549fdc
 *  Declare the ocsptool option descriptor.
Packit 549fdc
 */
Packit 549fdc
extern tOptions ocsptoolOptions;
Packit 549fdc
Packit 549fdc
#if defined(ENABLE_NLS)
Packit 549fdc
# ifndef _
Packit 549fdc
#   include <stdio.h>
Packit 549fdc
#   ifndef HAVE_GETTEXT
Packit 549fdc
      extern char * gettext(char const *);
Packit 549fdc
#   else
Packit 549fdc
#     include <libintl.h>
Packit 549fdc
#   endif
Packit 549fdc
Packit 549fdc
# ifndef ATTRIBUTE_FORMAT_ARG
Packit 549fdc
#   define ATTRIBUTE_FORMAT_ARG(_a)
Packit 549fdc
# endif
Packit 549fdc
Packit 549fdc
static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1);
Packit 549fdc
static inline char* aoGetsText(char const* pz) {
Packit 549fdc
    if (pz == NULL) return NULL;
Packit 549fdc
    return (char*)gettext(pz);
Packit 549fdc
}
Packit 549fdc
#   define _(s)  aoGetsText(s)
Packit 549fdc
# endif /* _() */
Packit 549fdc
Packit 549fdc
# define OPT_NO_XLAT_CFG_NAMES  STMTS(ocsptoolOptions.fOptSet |= \
Packit 549fdc
                                    OPTPROC_NXLAT_OPT_CFG;)
Packit 549fdc
# define OPT_NO_XLAT_OPT_NAMES  STMTS(ocsptoolOptions.fOptSet |= \
Packit 549fdc
                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
Packit 549fdc
Packit 549fdc
# define OPT_XLAT_CFG_NAMES     STMTS(ocsptoolOptions.fOptSet &= \
Packit 549fdc
                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
Packit 549fdc
# define OPT_XLAT_OPT_NAMES     STMTS(ocsptoolOptions.fOptSet &= \
Packit 549fdc
                                  ~OPTPROC_NXLAT_OPT;)
Packit 549fdc
Packit 549fdc
#else   /* ENABLE_NLS */
Packit 549fdc
# define OPT_NO_XLAT_CFG_NAMES
Packit 549fdc
# define OPT_NO_XLAT_OPT_NAMES
Packit 549fdc
Packit 549fdc
# define OPT_XLAT_CFG_NAMES
Packit 549fdc
# define OPT_XLAT_OPT_NAMES
Packit 549fdc
Packit 549fdc
# ifndef _
Packit 549fdc
#   define _(_s)  _s
Packit 549fdc
# endif
Packit 549fdc
#endif  /* ENABLE_NLS */
Packit 549fdc
Packit 549fdc
#ifdef  __cplusplus
Packit 549fdc
}
Packit 549fdc
#endif
Packit 549fdc
#endif /* AUTOOPTS_OCSPTOOL_ARGS_H_GUARD */
Packit 549fdc
Packit 549fdc
/* ocsptool-args.h ends here */