Home | History | Annotate | Line # | Download | only in ntpsnmpd
ntpsnmpd-opts.c revision 1.2
      1  1.1    kardel /*	$NetBSD: ntpsnmpd-opts.c,v 1.2 2014/12/19 20:43:18 christos Exp $	*/
      2  1.1    kardel 
      3  1.2  christos /*
      4  1.1    kardel  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.c)
      5  1.2  christos  *
      6  1.2  christos  *  It has been AutoGen-ed  December 19, 2014 at 07:50:22 AM by AutoGen 5.18.5pre4
      7  1.1    kardel  *  From the definitions    ntpsnmpd-opts.def
      8  1.1    kardel  *  and the template file   options
      9  1.1    kardel  *
     10  1.2  christos  * Generated from AutoOpts 41:0:16 templates.
     11  1.2  christos  *
     12  1.2  christos  *  AutoOpts is a copyrighted work.  This source file is not encumbered
     13  1.2  christos  *  by AutoOpts licensing, but is provided under the licensing terms chosen
     14  1.2  christos  *  by the ntpsnmpd author or copyright holder.  AutoOpts is
     15  1.2  christos  *  licensed under the terms of the LGPL.  The redistributable library
     16  1.2  christos  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
     17  1.2  christos  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
     18  1.2  christos  *  for details.
     19  1.1    kardel  *
     20  1.2  christos  * The ntpsnmpd program is copyrighted and licensed
     21  1.2  christos  * under the following terms:
     22  1.1    kardel  *
     23  1.2  christos  *  Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
     24  1.2  christos  *  This is free software. It is licensed for use, modification and
     25  1.2  christos  *  redistribution under the terms of the NTP License, copies of which
     26  1.2  christos  *  can be seen at:
     27  1.2  christos  *    <http://ntp.org/license>
     28  1.2  christos  *    <http://opensource.org/licenses/ntp-license.php>
     29  1.1    kardel  *
     30  1.2  christos  *  Permission to use, copy, modify, and distribute this software and its
     31  1.2  christos  *  documentation for any purpose with or without fee is hereby granted,
     32  1.2  christos  *  provided that the above copyright notice appears in all copies and that
     33  1.2  christos  *  both the copyright notice and this permission notice appear in
     34  1.2  christos  *  supporting documentation, and that the name The University of Delaware not be used in
     35  1.2  christos  *  advertising or publicity pertaining to distribution of the software
     36  1.2  christos  *  without specific, written prior permission. The University of Delaware makes no
     37  1.2  christos  *  representations about the suitability this software for any purpose. It
     38  1.2  christos  *  is provided "as is" without express or implied warranty.
     39  1.1    kardel  */
     40  1.1    kardel 
     41  1.2  christos #ifndef __doxygen__
     42  1.2  christos #define OPTION_CODE_COMPILE 1
     43  1.2  christos #include "ntpsnmpd-opts.h"
     44  1.1    kardel #include <sys/types.h>
     45  1.2  christos 
     46  1.1    kardel #include <limits.h>
     47  1.1    kardel #include <stdio.h>
     48  1.1    kardel #include <stdlib.h>
     49  1.1    kardel 
     50  1.1    kardel #ifdef  __cplusplus
     51  1.1    kardel extern "C" {
     52  1.1    kardel #endif
     53  1.2  christos extern FILE * option_usage_fp;
     54  1.2  christos #define zCopyright      (ntpsnmpd_opt_strs+0)
     55  1.2  christos #define zLicenseDescrip (ntpsnmpd_opt_strs+314)
     56  1.1    kardel 
     57  1.1    kardel 
     58  1.1    kardel #ifndef NULL
     59  1.1    kardel #  define NULL 0
     60  1.1    kardel #endif
     61  1.1    kardel 
     62  1.2  christos /**
     63  1.2  christos  *  static const strings for ntpsnmpd options
     64  1.1    kardel  */
     65  1.2  christos static char const ntpsnmpd_opt_strs[1548] =
     66  1.2  christos /*     0 */ "ntpsnmpd 4.2.8\n"
     67  1.2  christos             "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
     68  1.2  christos             "This is free software. It is licensed for use, modification and\n"
     69  1.2  christos             "redistribution under the terms of the NTP License, copies of which\n"
     70  1.2  christos             "can be seen at:\n"
     71  1.2  christos             "  <http://ntp.org/license>\n"
     72  1.2  christos             "  <http://opensource.org/licenses/ntp-license.php>\n\0"
     73  1.2  christos /*   314 */ "Permission to use, copy, modify, and distribute this software and its\n"
     74  1.2  christos             "documentation for any purpose with or without fee is hereby granted,\n"
     75  1.2  christos             "provided that the above copyright notice appears in all copies and that\n"
     76  1.2  christos             "both the copyright notice and this permission notice appear in supporting\n"
     77  1.2  christos             "documentation, and that the name The University of Delaware not be used in\n"
     78  1.2  christos             "advertising or publicity pertaining to distribution of the software without\n"
     79  1.2  christos             "specific, written prior permission.  The University of Delaware makes no\n"
     80  1.2  christos             "representations about the suitability this software for any purpose.  It is\n"
     81  1.2  christos             "provided \"as is\" without express or implied warranty.\n\0"
     82  1.2  christos /*   954 */ "Do not fork\0"
     83  1.2  christos /*   966 */ "NOFORK\0"
     84  1.2  christos /*   973 */ "nofork\0"
     85  1.2  christos /*   980 */ "Log to syslog()\0"
     86  1.2  christos /*   996 */ "SYSLOG\0"
     87  1.2  christos /*  1003 */ "syslog\0"
     88  1.2  christos /*  1010 */ "The socket address ntpsnmpd uses to connect to net-snmpd\0"
     89  1.2  christos /*  1067 */ "AGENTXSOCKET\0"
     90  1.2  christos /*  1080 */ "agentxsocket\0"
     91  1.2  christos /*  1093 */ "unix:/var/agentx/master\0"
     92  1.2  christos /*  1117 */ "display extended usage information and exit\0"
     93  1.2  christos /*  1161 */ "help\0"
     94  1.2  christos /*  1166 */ "extended usage information passed thru pager\0"
     95  1.2  christos /*  1211 */ "more-help\0"
     96  1.2  christos /*  1221 */ "output version information and exit\0"
     97  1.2  christos /*  1257 */ "version\0"
     98  1.2  christos /*  1265 */ "save the option state to a config file\0"
     99  1.2  christos /*  1304 */ "save-opts\0"
    100  1.2  christos /*  1314 */ "load options from a config file\0"
    101  1.2  christos /*  1346 */ "LOAD_OPTS\0"
    102  1.2  christos /*  1356 */ "no-load-opts\0"
    103  1.2  christos /*  1369 */ "no\0"
    104  1.2  christos /*  1372 */ "NTPSNMPD\0"
    105  1.2  christos /*  1381 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8\n"
    106  1.2  christos             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
    107  1.2  christos /*  1482 */ "$HOME\0"
    108  1.2  christos /*  1488 */ ".\0"
    109  1.2  christos /*  1490 */ ".ntprc\0"
    110  1.2  christos /*  1497 */ "http://bugs.ntp.org, bugs (at) ntp.org\0"
    111  1.2  christos /*  1531 */ "\n\0"
    112  1.2  christos /*  1533 */ "ntpsnmpd 4.2.8";
    113  1.2  christos 
    114  1.2  christos /**
    115  1.2  christos  *  nofork option description:
    116  1.2  christos  */
    117  1.2  christos /** Descriptive text for the nofork option */
    118  1.2  christos #define NOFORK_DESC      (ntpsnmpd_opt_strs+954)
    119  1.2  christos /** Upper-cased name for the nofork option */
    120  1.2  christos #define NOFORK_NAME      (ntpsnmpd_opt_strs+966)
    121  1.2  christos /** Name string for the nofork option */
    122  1.2  christos #define NOFORK_name      (ntpsnmpd_opt_strs+973)
    123  1.2  christos /** Compiled in flag settings for the nofork option */
    124  1.2  christos #define NOFORK_FLAGS     (OPTST_DISABLED)
    125  1.2  christos 
    126  1.2  christos /**
    127  1.2  christos  *  syslog option description:
    128  1.2  christos  */
    129  1.2  christos /** Descriptive text for the syslog option */
    130  1.2  christos #define SYSLOG_DESC      (ntpsnmpd_opt_strs+980)
    131  1.2  christos /** Upper-cased name for the syslog option */
    132  1.2  christos #define SYSLOG_NAME      (ntpsnmpd_opt_strs+996)
    133  1.2  christos /** Name string for the syslog option */
    134  1.2  christos #define SYSLOG_name      (ntpsnmpd_opt_strs+1003)
    135  1.2  christos /** Compiled in flag settings for the syslog option */
    136  1.2  christos #define SYSLOG_FLAGS     (OPTST_DISABLED)
    137  1.2  christos 
    138  1.2  christos /**
    139  1.2  christos  *  agentXSocket option description:
    140  1.2  christos  */
    141  1.2  christos /** Descriptive text for the agentXSocket option */
    142  1.2  christos #define AGENTXSOCKET_DESC      (ntpsnmpd_opt_strs+1010)
    143  1.2  christos /** Upper-cased name for the agentXSocket option */
    144  1.2  christos #define AGENTXSOCKET_NAME      (ntpsnmpd_opt_strs+1067)
    145  1.2  christos /** Name string for the agentXSocket option */
    146  1.2  christos #define AGENTXSOCKET_name      (ntpsnmpd_opt_strs+1080)
    147  1.2  christos /** The compiled in default value for the agentXSocket option argument */
    148  1.2  christos #define AGENTXSOCKET_DFT_ARG   (ntpsnmpd_opt_strs+1093)
    149  1.2  christos /** Compiled in flag settings for the agentXSocket option */
    150  1.2  christos #define AGENTXSOCKET_FLAGS     (OPTST_DISABLED \
    151  1.2  christos         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
    152  1.1    kardel 
    153  1.1    kardel /*
    154  1.1    kardel  *  Help/More_Help/Version option descriptions:
    155  1.1    kardel  */
    156  1.2  christos #define HELP_DESC       (ntpsnmpd_opt_strs+1117)
    157  1.2  christos #define HELP_name       (ntpsnmpd_opt_strs+1161)
    158  1.1    kardel #ifdef HAVE_WORKING_FORK
    159  1.2  christos #define MORE_HELP_DESC  (ntpsnmpd_opt_strs+1166)
    160  1.2  christos #define MORE_HELP_name  (ntpsnmpd_opt_strs+1211)
    161  1.2  christos #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
    162  1.1    kardel #else
    163  1.2  christos #define MORE_HELP_DESC  HELP_DESC
    164  1.2  christos #define MORE_HELP_name  HELP_name
    165  1.2  christos #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
    166  1.1    kardel #endif
    167  1.1    kardel #ifdef NO_OPTIONAL_OPT_ARGS
    168  1.2  christos #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
    169  1.1    kardel #else
    170  1.2  christos #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
    171  1.2  christos                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
    172  1.1    kardel #endif
    173  1.2  christos #define VER_DESC        (ntpsnmpd_opt_strs+1221)
    174  1.2  christos #define VER_name        (ntpsnmpd_opt_strs+1257)
    175  1.2  christos #define SAVE_OPTS_DESC  (ntpsnmpd_opt_strs+1265)
    176  1.2  christos #define SAVE_OPTS_name  (ntpsnmpd_opt_strs+1304)
    177  1.2  christos #define LOAD_OPTS_DESC     (ntpsnmpd_opt_strs+1314)
    178  1.2  christos #define LOAD_OPTS_NAME     (ntpsnmpd_opt_strs+1346)
    179  1.2  christos #define NO_LOAD_OPTS_name  (ntpsnmpd_opt_strs+1356)
    180  1.2  christos #define LOAD_OPTS_pfx      (ntpsnmpd_opt_strs+1369)
    181  1.2  christos #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
    182  1.2  christos /**
    183  1.1    kardel  *  Declare option callback procedures
    184  1.1    kardel  */
    185  1.1    kardel extern tOptProc
    186  1.2  christos     ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
    187  1.2  christos     optionNumericVal,      optionPagedUsage,      optionResetOpt,
    188  1.2  christos     optionStackArg,        optionTimeDate,        optionTimeVal,
    189  1.2  christos     optionUnstackArg,      optionVendorOption;
    190  1.1    kardel static tOptProc
    191  1.1    kardel     doUsageOpt;
    192  1.2  christos #define VER_PROC        ntpOptionPrintVersion
    193  1.1    kardel 
    194  1.2  christos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    195  1.2  christos /**
    196  1.2  christos  *  Define the ntpsnmpd Option Descriptions.
    197  1.2  christos  * This is an array of OPTION_CT entries, one for each
    198  1.2  christos  * option that the ntpsnmpd program responds to.
    199  1.1    kardel  */
    200  1.2  christos static tOptDesc optDesc[OPTION_CT] = {
    201  1.1    kardel   {  /* entry idx, value */ 0, VALUE_OPT_NOFORK,
    202  1.1    kardel      /* equiv idx, value */ 0, VALUE_OPT_NOFORK,
    203  1.1    kardel      /* equivalenced to  */ NO_EQUIVALENT,
    204  1.1    kardel      /* min, max, act ct */ 0, 1, 0,
    205  1.1    kardel      /* opt state flags  */ NOFORK_FLAGS, 0,
    206  1.2  christos      /* last opt argumnt */ { NULL }, /* --nofork */
    207  1.1    kardel      /* arg list/cookie  */ NULL,
    208  1.1    kardel      /* must/cannot opts */ NULL, NULL,
    209  1.1    kardel      /* option proc      */ NULL,
    210  1.2  christos      /* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
    211  1.1    kardel      /* disablement strs */ NULL, NULL },
    212  1.1    kardel 
    213  1.1    kardel   {  /* entry idx, value */ 1, VALUE_OPT_SYSLOG,
    214  1.1    kardel      /* equiv idx, value */ 1, VALUE_OPT_SYSLOG,
    215  1.1    kardel      /* equivalenced to  */ NO_EQUIVALENT,
    216  1.1    kardel      /* min, max, act ct */ 0, 1, 0,
    217  1.1    kardel      /* opt state flags  */ SYSLOG_FLAGS, 0,
    218  1.2  christos      /* last opt argumnt */ { NULL }, /* --syslog */
    219  1.2  christos      /* arg list/cookie  */ NULL,
    220  1.2  christos      /* must/cannot opts */ NULL, NULL,
    221  1.2  christos      /* option proc      */ NULL,
    222  1.2  christos      /* desc, NAME, name */ SYSLOG_DESC, SYSLOG_NAME, SYSLOG_name,
    223  1.2  christos      /* disablement strs */ NULL, NULL },
    224  1.2  christos 
    225  1.2  christos   {  /* entry idx, value */ 2, VALUE_OPT_AGENTXSOCKET,
    226  1.2  christos      /* equiv idx, value */ 2, VALUE_OPT_AGENTXSOCKET,
    227  1.2  christos      /* equivalenced to  */ NO_EQUIVALENT,
    228  1.2  christos      /* min, max, act ct */ 0, 1, 0,
    229  1.2  christos      /* opt state flags  */ AGENTXSOCKET_FLAGS, 0,
    230  1.2  christos      /* last opt argumnt */ { AGENTXSOCKET_DFT_ARG },
    231  1.1    kardel      /* arg list/cookie  */ NULL,
    232  1.1    kardel      /* must/cannot opts */ NULL, NULL,
    233  1.1    kardel      /* option proc      */ NULL,
    234  1.2  christos      /* desc, NAME, name */ AGENTXSOCKET_DESC, AGENTXSOCKET_NAME, AGENTXSOCKET_name,
    235  1.1    kardel      /* disablement strs */ NULL, NULL },
    236  1.1    kardel 
    237  1.1    kardel   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
    238  1.2  christos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
    239  1.1    kardel      /* equivalenced to  */ NO_EQUIVALENT,
    240  1.1    kardel      /* min, max, act ct */ 0, 1, 0,
    241  1.2  christos      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
    242  1.1    kardel      /* last opt argumnt */ { NULL },
    243  1.1    kardel      /* arg list/cookie  */ NULL,
    244  1.1    kardel      /* must/cannot opts */ NULL, NULL,
    245  1.2  christos      /* option proc      */ VER_PROC,
    246  1.2  christos      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
    247  1.1    kardel      /* disablement strs */ NULL, NULL },
    248  1.1    kardel 
    249  1.1    kardel 
    250  1.1    kardel 
    251  1.1    kardel   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
    252  1.2  christos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
    253  1.1    kardel      /* equivalenced to  */ NO_EQUIVALENT,
    254  1.1    kardel      /* min, max, act ct */ 0, 1, 0,
    255  1.2  christos      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
    256  1.1    kardel      /* last opt argumnt */ { NULL },
    257  1.1    kardel      /* arg list/cookie  */ NULL,
    258  1.1    kardel      /* must/cannot opts */ NULL, NULL,
    259  1.1    kardel      /* option proc      */ doUsageOpt,
    260  1.2  christos      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
    261  1.1    kardel      /* disablement strs */ NULL, NULL },
    262  1.1    kardel 
    263  1.1    kardel   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
    264  1.2  christos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
    265  1.1    kardel      /* equivalenced to  */ NO_EQUIVALENT,
    266  1.1    kardel      /* min, max, act ct */ 0, 1, 0,
    267  1.2  christos      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
    268  1.1    kardel      /* last opt argumnt */ { NULL },
    269  1.1    kardel      /* arg list/cookie  */ NULL,
    270  1.1    kardel      /* must/cannot opts */ NULL,  NULL,
    271  1.1    kardel      /* option proc      */ optionPagedUsage,
    272  1.2  christos      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
    273  1.1    kardel      /* disablement strs */ NULL, NULL },
    274  1.1    kardel 
    275  1.1    kardel   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
    276  1.2  christos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
    277  1.1    kardel      /* equivalenced to  */ NO_EQUIVALENT,
    278  1.1    kardel      /* min, max, act ct */ 0, 1, 0,
    279  1.1    kardel      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
    280  1.2  christos                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
    281  1.1    kardel      /* last opt argumnt */ { NULL },
    282  1.1    kardel      /* arg list/cookie  */ NULL,
    283  1.1    kardel      /* must/cannot opts */ NULL,  NULL,
    284  1.1    kardel      /* option proc      */ NULL,
    285  1.2  christos      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
    286  1.1    kardel      /* disablement strs */ NULL, NULL },
    287  1.1    kardel 
    288  1.1    kardel   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
    289  1.2  christos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
    290  1.1    kardel      /* equivalenced to  */ NO_EQUIVALENT,
    291  1.1    kardel      /* min, max, act ct */ 0, NOLIMIT, 0,
    292  1.1    kardel      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
    293  1.2  christos 			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
    294  1.1    kardel      /* last opt argumnt */ { NULL },
    295  1.1    kardel      /* arg list/cookie  */ NULL,
    296  1.1    kardel      /* must/cannot opts */ NULL, NULL,
    297  1.1    kardel      /* option proc      */ optionLoadOpt,
    298  1.2  christos      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
    299  1.2  christos      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
    300  1.1    kardel };
    301  1.1    kardel 
    302  1.2  christos 
    303  1.2  christos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    304  1.2  christos /** Reference to the upper cased version of ntpsnmpd. */
    305  1.2  christos #define zPROGNAME       (ntpsnmpd_opt_strs+1372)
    306  1.2  christos /** Reference to the title line for ntpsnmpd usage. */
    307  1.2  christos #define zUsageTitle     (ntpsnmpd_opt_strs+1381)
    308  1.2  christos /** ntpsnmpd configuration file name. */
    309  1.2  christos #define zRcName         (ntpsnmpd_opt_strs+1490)
    310  1.2  christos /** Directories to search for ntpsnmpd config files. */
    311  1.2  christos static char const * const apzHomeList[3] = {
    312  1.2  christos     ntpsnmpd_opt_strs+1482,
    313  1.2  christos     ntpsnmpd_opt_strs+1488,
    314  1.2  christos     NULL };
    315  1.2  christos /** The ntpsnmpd program bug email address. */
    316  1.2  christos #define zBugsAddr       (ntpsnmpd_opt_strs+1497)
    317  1.2  christos /** Clarification/explanation of what ntpsnmpd does. */
    318  1.2  christos #define zExplain        (ntpsnmpd_opt_strs+1531)
    319  1.2  christos /** Extra detail explaining what ntpsnmpd does. */
    320  1.2  christos #define zDetail         (NULL)
    321  1.2  christos /** The full version string for ntpsnmpd. */
    322  1.2  christos #define zFullVersion    (ntpsnmpd_opt_strs+1533)
    323  1.2  christos /* extracted from optcode.tlib near line 364 */
    324  1.1    kardel 
    325  1.1    kardel #if defined(ENABLE_NLS)
    326  1.1    kardel # define OPTPROC_BASE OPTPROC_TRANSLATE
    327  1.1    kardel   static tOptionXlateProc translate_option_strings;
    328  1.1    kardel #else
    329  1.1    kardel # define OPTPROC_BASE OPTPROC_NONE
    330  1.1    kardel # define translate_option_strings NULL
    331  1.1    kardel #endif /* ENABLE_NLS */
    332  1.1    kardel 
    333  1.2  christos #define ntpsnmpd_full_usage (NULL)
    334  1.2  christos #define ntpsnmpd_short_usage (NULL)
    335  1.2  christos 
    336  1.2  christos #endif /* not defined __doxygen__ */
    337  1.1    kardel 
    338  1.2  christos /*
    339  1.2  christos  *  Create the static procedure(s) declared above.
    340  1.2  christos  */
    341  1.2  christos /**
    342  1.2  christos  * The callout function that invokes the optionUsage function.
    343  1.2  christos  *
    344  1.2  christos  * @param[in] opts the AutoOpts option description structure
    345  1.2  christos  * @param[in] od   the descriptor for the "help" (usage) option.
    346  1.2  christos  * @noreturn
    347  1.2  christos  */
    348  1.2  christos static void
    349  1.2  christos doUsageOpt(tOptions * opts, tOptDesc * od)
    350  1.2  christos {
    351  1.2  christos     int ex_code;
    352  1.2  christos     ex_code = NTPSNMPD_EXIT_SUCCESS;
    353  1.2  christos     optionUsage(&ntpsnmpdOptions, ex_code);
    354  1.2  christos     /* NOTREACHED */
    355  1.2  christos     exit(1);
    356  1.2  christos     (void)opts;
    357  1.2  christos     (void)od;
    358  1.2  christos }
    359  1.2  christos /* extracted from optmain.tlib near line 1245 */
    360  1.2  christos 
    361  1.2  christos /**
    362  1.2  christos  * The directory containing the data associated with ntpsnmpd.
    363  1.2  christos  */
    364  1.2  christos #ifndef  PKGDATADIR
    365  1.2  christos # define PKGDATADIR ""
    366  1.2  christos #endif
    367  1.2  christos 
    368  1.2  christos /**
    369  1.2  christos  * Information about the person or institution that packaged ntpsnmpd
    370  1.2  christos  * for the current distribution.
    371  1.2  christos  */
    372  1.2  christos #ifndef  WITH_PACKAGER
    373  1.2  christos # define ntpsnmpd_packager_info NULL
    374  1.2  christos #else
    375  1.2  christos /** Packager information for ntpsnmpd. */
    376  1.2  christos static char const ntpsnmpd_packager_info[] =
    377  1.2  christos     "Packaged by " WITH_PACKAGER
    378  1.2  christos 
    379  1.2  christos # ifdef WITH_PACKAGER_VERSION
    380  1.2  christos         " ("WITH_PACKAGER_VERSION")"
    381  1.2  christos # endif
    382  1.2  christos 
    383  1.2  christos # ifdef WITH_PACKAGER_BUG_REPORTS
    384  1.2  christos     "\nReport ntpsnmpd bugs to " WITH_PACKAGER_BUG_REPORTS
    385  1.2  christos # endif
    386  1.2  christos     "\n";
    387  1.2  christos #endif
    388  1.2  christos #ifndef __doxygen__
    389  1.2  christos 
    390  1.2  christos #endif /* __doxygen__ */
    391  1.2  christos /**
    392  1.2  christos  * The option definitions for ntpsnmpd.  The one structure that
    393  1.2  christos  * binds them all.
    394  1.2  christos  */
    395  1.1    kardel tOptions ntpsnmpdOptions = {
    396  1.1    kardel     OPTIONS_STRUCT_VERSION,
    397  1.1    kardel     0, NULL,                    /* original argc + argv    */
    398  1.1    kardel     ( OPTPROC_BASE
    399  1.1    kardel     + OPTPROC_ERRSTOP
    400  1.1    kardel     + OPTPROC_SHORTOPT
    401  1.1    kardel     + OPTPROC_LONGOPT
    402  1.1    kardel     + OPTPROC_NO_REQ_OPT
    403  1.1    kardel     + OPTPROC_ENVIRON
    404  1.2  christos     + OPTPROC_NO_ARGS
    405  1.2  christos     + OPTPROC_MISUSE ),
    406  1.1    kardel     0, NULL,                    /* current option index, current option */
    407  1.1    kardel     NULL,         NULL,         zPROGNAME,
    408  1.2  christos     zRcName,      zCopyright,   zLicenseDescrip,
    409  1.1    kardel     zFullVersion, apzHomeList,  zUsageTitle,
    410  1.1    kardel     zExplain,     zDetail,      optDesc,
    411  1.1    kardel     zBugsAddr,                  /* address to send bugs to */
    412  1.1    kardel     NULL, NULL,                 /* extensions/saved state  */
    413  1.2  christos     optionUsage, /* usage procedure */
    414  1.1    kardel     translate_option_strings,   /* translation procedure */
    415  1.1    kardel     /*
    416  1.1    kardel      *  Indexes to special options
    417  1.1    kardel      */
    418  1.1    kardel     { INDEX_OPT_MORE_HELP, /* more-help option index */
    419  1.1    kardel       INDEX_OPT_SAVE_OPTS, /* save option index */
    420  1.1    kardel       NO_EQUIVALENT, /* '-#' option index */
    421  1.1    kardel       NO_EQUIVALENT /* index of default opt */
    422  1.1    kardel     },
    423  1.2  christos     8 /* full option count */, 3 /* user option count */,
    424  1.1    kardel     ntpsnmpd_full_usage, ntpsnmpd_short_usage,
    425  1.2  christos     NULL, NULL,
    426  1.2  christos     PKGDATADIR, ntpsnmpd_packager_info
    427  1.1    kardel };
    428  1.1    kardel 
    429  1.2  christos #if ENABLE_NLS
    430  1.2  christos /**
    431  1.2  christos  * This code is designed to translate translatable option text for the
    432  1.2  christos  * ntpsnmpd program.  These translations happen upon entry
    433  1.2  christos  * to optionProcess().
    434  1.1    kardel  */
    435  1.1    kardel #include <stdio.h>
    436  1.1    kardel #include <stdlib.h>
    437  1.1    kardel #include <string.h>
    438  1.1    kardel #include <unistd.h>
    439  1.2  christos #ifdef HAVE_DCGETTEXT
    440  1.2  christos # include <gettext.h>
    441  1.2  christos #endif
    442  1.1    kardel #include <autoopts/usage-txt.h>
    443  1.1    kardel 
    444  1.2  christos static char * AO_gettext(char const * pz);
    445  1.2  christos static void   coerce_it(void ** s);
    446  1.1    kardel 
    447  1.2  christos /**
    448  1.2  christos  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
    449  1.2  christos  * to convert from English to the target language, then strdup-duplicates the
    450  1.2  christos  * result string.  It tries the "libopts" domain first, then whatever has been
    451  1.2  christos  * set via the \a textdomain(3) call.
    452  1.2  christos  *
    453  1.2  christos  * @param[in] pz the input text used as a lookup key.
    454  1.2  christos  * @returns the translated text (if there is one),
    455  1.2  christos  *   or the original text (if not).
    456  1.2  christos  */
    457  1.2  christos static char *
    458  1.2  christos AO_gettext(char const * pz)
    459  1.1    kardel {
    460  1.2  christos     char * res;
    461  1.1    kardel     if (pz == NULL)
    462  1.1    kardel         return NULL;
    463  1.2  christos #ifdef HAVE_DCGETTEXT
    464  1.2  christos     /*
    465  1.2  christos      * While processing the option_xlateable_txt data, try to use the
    466  1.2  christos      * "libopts" domain.  Once we switch to the option descriptor data,
    467  1.2  christos      * do *not* use that domain.
    468  1.2  christos      */
    469  1.2  christos     if (option_xlateable_txt.field_ct != 0) {
    470  1.2  christos         res = dgettext("libopts", pz);
    471  1.2  christos         if (res == pz)
    472  1.2  christos             res = (char *)(void *)_(pz);
    473  1.2  christos     } else
    474  1.2  christos         res = (char *)(void *)_(pz);
    475  1.2  christos #else
    476  1.2  christos     res = (char *)(void *)_(pz);
    477  1.2  christos #endif
    478  1.2  christos     if (res == pz)
    479  1.2  christos         return res;
    480  1.2  christos     res = strdup(res);
    481  1.2  christos     if (res == NULL) {
    482  1.2  christos         fputs(_("No memory for duping translated strings\n"), stderr);
    483  1.2  christos         exit(NTPSNMPD_EXIT_FAILURE);
    484  1.1    kardel     }
    485  1.2  christos     return res;
    486  1.1    kardel }
    487  1.1    kardel 
    488  1.2  christos /**
    489  1.2  christos  * All the pointers we use are marked "* const", but they are stored in
    490  1.2  christos  * writable memory.  Coerce the mutability and set the pointer.
    491  1.2  christos  */
    492  1.2  christos static void coerce_it(void ** s) { *s = AO_gettext(*s);
    493  1.2  christos }
    494  1.1    kardel 
    495  1.2  christos /**
    496  1.2  christos  * Translate all the translatable strings in the ntpsnmpdOptions
    497  1.2  christos  * structure defined above.  This is done only once.
    498  1.1    kardel  */
    499  1.1    kardel static void
    500  1.2  christos translate_option_strings(void)
    501  1.1    kardel {
    502  1.2  christos     tOptions * const opts = &ntpsnmpdOptions;
    503  1.2  christos 
    504  1.1    kardel     /*
    505  1.1    kardel      *  Guard against re-translation.  It won't work.  The strings will have
    506  1.1    kardel      *  been changed by the first pass through this code.  One shot only.
    507  1.1    kardel      */
    508  1.2  christos     if (option_xlateable_txt.field_ct != 0) {
    509  1.1    kardel         /*
    510  1.1    kardel          *  Do the translations.  The first pointer follows the field count
    511  1.1    kardel          *  field.  The field count field is the size of a pointer.
    512  1.1    kardel          */
    513  1.2  christos         char ** ppz = (char**)(void*)&(option_xlateable_txt);
    514  1.2  christos         int     ix  = option_xlateable_txt.field_ct;
    515  1.1    kardel 
    516  1.1    kardel         do {
    517  1.2  christos             ppz++; /* skip over field_ct */
    518  1.1    kardel             *ppz = AO_gettext(*ppz);
    519  1.1    kardel         } while (--ix > 0);
    520  1.2  christos         /* prevent re-translation and disable "libopts" domain lookup */
    521  1.2  christos         option_xlateable_txt.field_ct = 0;
    522  1.1    kardel 
    523  1.2  christos         coerce_it((void*)&(opts->pzCopyright));
    524  1.2  christos         coerce_it((void*)&(opts->pzCopyNotice));
    525  1.2  christos         coerce_it((void*)&(opts->pzFullVersion));
    526  1.2  christos         coerce_it((void*)&(opts->pzUsageTitle));
    527  1.2  christos         coerce_it((void*)&(opts->pzExplain));
    528  1.2  christos         coerce_it((void*)&(opts->pzDetail));
    529  1.2  christos         {
    530  1.2  christos             tOptDesc * od = opts->pOptDesc;
    531  1.2  christos             for (ix = opts->optCt; ix > 0; ix--, od++)
    532  1.2  christos                 coerce_it((void*)&(od->pzText));
    533  1.1    kardel         }
    534  1.1    kardel     }
    535  1.1    kardel }
    536  1.1    kardel #endif /* ENABLE_NLS */
    537  1.1    kardel 
    538  1.2  christos #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
    539  1.2  christos /** I18N function strictly for xgettext.  Do not compile. */
    540  1.2  christos static void bogus_function(void) {
    541  1.2  christos   /* TRANSLATORS:
    542  1.2  christos 
    543  1.2  christos      The following dummy function was crated solely so that xgettext can
    544  1.2  christos      extract the correct strings.  These strings are actually referenced
    545  1.2  christos      by a field name in the ntpsnmpdOptions structure noted in the
    546  1.2  christos      comments below.  The literal text is defined in ntpsnmpd_opt_strs.
    547  1.2  christos 
    548  1.2  christos      NOTE: the strings below are segmented with respect to the source string
    549  1.2  christos      ntpsnmpd_opt_strs.  The strings above are handed off for translation
    550  1.2  christos      at run time a paragraph at a time.  Consequently, they are presented here
    551  1.2  christos      for translation a paragraph at a time.
    552  1.2  christos 
    553  1.2  christos      ALSO: often the description for an option will reference another option
    554  1.2  christos      by name.  These are set off with apostrophe quotes (I hope).  Do not
    555  1.2  christos      translate option names.
    556  1.2  christos    */
    557  1.2  christos   /* referenced via ntpsnmpdOptions.pzCopyright */
    558  1.2  christos   puts(_("ntpsnmpd 4.2.8\n\
    559  1.2  christos Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
    560  1.2  christos This is free software. It is licensed for use, modification and\n\
    561  1.2  christos redistribution under the terms of the NTP License, copies of which\n\
    562  1.2  christos can be seen at:\n"));
    563  1.2  christos   puts(_("  <http://ntp.org/license>\n\
    564  1.2  christos   <http://opensource.org/licenses/ntp-license.php>\n"));
    565  1.2  christos 
    566  1.2  christos   /* referenced via ntpsnmpdOptions.pzCopyNotice */
    567  1.2  christos   puts(_("Permission to use, copy, modify, and distribute this software and its\n\
    568  1.2  christos documentation for any purpose with or without fee is hereby granted,\n\
    569  1.2  christos provided that the above copyright notice appears in all copies and that\n\
    570  1.2  christos both the copyright notice and this permission notice appear in supporting\n\
    571  1.2  christos documentation, and that the name The University of Delaware not be used in\n\
    572  1.2  christos advertising or publicity pertaining to distribution of the software without\n\
    573  1.2  christos specific, written prior permission.  The University of Delaware makes no\n\
    574  1.2  christos representations about the suitability this software for any purpose.  It is\n\
    575  1.2  christos provided \"as is\" without express or implied warranty.\n"));
    576  1.2  christos 
    577  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    578  1.2  christos   puts(_("Do not fork"));
    579  1.2  christos 
    580  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    581  1.2  christos   puts(_("Log to syslog()"));
    582  1.2  christos 
    583  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    584  1.2  christos   puts(_("The socket address ntpsnmpd uses to connect to net-snmpd"));
    585  1.2  christos 
    586  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    587  1.2  christos   puts(_("display extended usage information and exit"));
    588  1.2  christos 
    589  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    590  1.2  christos   puts(_("extended usage information passed thru pager"));
    591  1.2  christos 
    592  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    593  1.2  christos   puts(_("output version information and exit"));
    594  1.2  christos 
    595  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    596  1.2  christos   puts(_("save the option state to a config file"));
    597  1.2  christos 
    598  1.2  christos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
    599  1.2  christos   puts(_("load options from a config file"));
    600  1.2  christos 
    601  1.2  christos   /* referenced via ntpsnmpdOptions.pzUsageTitle */
    602  1.2  christos   puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8\n\
    603  1.2  christos Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
    604  1.2  christos 
    605  1.2  christos   /* referenced via ntpsnmpdOptions.pzExplain */
    606  1.2  christos   puts(_("\n"));
    607  1.2  christos 
    608  1.2  christos   /* referenced via ntpsnmpdOptions.pzFullVersion */
    609  1.2  christos   puts(_("ntpsnmpd 4.2.8"));
    610  1.2  christos 
    611  1.2  christos   /* referenced via ntpsnmpdOptions.pzFullUsage */
    612  1.2  christos   puts(_("<<<NOT-FOUND>>>"));
    613  1.2  christos 
    614  1.2  christos   /* referenced via ntpsnmpdOptions.pzShortUsage */
    615  1.2  christos   puts(_("<<<NOT-FOUND>>>"));
    616  1.2  christos   /* LIBOPTS-MESSAGES: */
    617  1.2  christos #line 67 "../autoopts.c"
    618  1.2  christos   puts(_("allocation of %d bytes failed\n"));
    619  1.2  christos #line 93 "../autoopts.c"
    620  1.2  christos   puts(_("allocation of %d bytes failed\n"));
    621  1.2  christos #line 53 "../init.c"
    622  1.2  christos   puts(_("AutoOpts function called without option descriptor\n"));
    623  1.2  christos #line 86 "../init.c"
    624  1.2  christos   puts(_("\tThis exceeds the compiled library version:  "));
    625  1.2  christos #line 84 "../init.c"
    626  1.2  christos   puts(_("Automated Options Processing Error!\n"
    627  1.2  christos        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
    628  1.2  christos #line 80 "../autoopts.c"
    629  1.2  christos   puts(_("realloc of %d bytes at 0x%p failed\n"));
    630  1.2  christos #line 88 "../init.c"
    631  1.2  christos   puts(_("\tThis is less than the minimum library version:  "));
    632  1.2  christos #line 121 "../version.c"
    633  1.2  christos   puts(_("Automated Options version %s\n"
    634  1.2  christos        "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
    635  1.2  christos #line 82 "../makeshell.c"
    636  1.2  christos   puts(_("(AutoOpts bug):  %s.\n"));
    637  1.2  christos #line 90 "../reset.c"
    638  1.2  christos   puts(_("optionResetOpt() called, but reset-option not configured"));
    639  1.2  christos #line 292 "../usage.c"
    640  1.2  christos   puts(_("could not locate the 'help' option"));
    641  1.2  christos #line 336 "../autoopts.c"
    642  1.2  christos   puts(_("optionProcess() was called with invalid data"));
    643  1.2  christos #line 748 "../usage.c"
    644  1.2  christos   puts(_("invalid argument type specified"));
    645  1.2  christos #line 598 "../find.c"
    646  1.2  christos   puts(_("defaulted to option with optional arg"));
    647  1.2  christos #line 76 "../alias.c"
    648  1.2  christos   puts(_("aliasing option is out of range."));
    649  1.2  christos #line 234 "../enum.c"
    650  1.2  christos   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
    651  1.2  christos #line 108 "../find.c"
    652  1.2  christos   puts(_("  The following options match:\n"));
    653  1.2  christos #line 293 "../find.c"
    654  1.2  christos   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
    655  1.2  christos #line 161 "../check.c"
    656  1.2  christos   puts(_("%s: Command line arguments required\n"));
    657  1.2  christos #line 43 "../alias.c"
    658  1.2  christos   puts(_("%d %s%s options allowed\n"));
    659  1.2  christos #line 89 "../makeshell.c"
    660  1.2  christos   puts(_("%s error %d (%s) calling %s for '%s'\n"));
    661  1.2  christos #line 301 "../makeshell.c"
    662  1.2  christos   puts(_("interprocess pipe"));
    663  1.2  christos #line 168 "../version.c"
    664  1.2  christos   puts(_("error: version option argument '%c' invalid.  Use:\n"
    665  1.2  christos        "\t'v' - version only\n"
    666  1.2  christos        "\t'c' - version and copyright\n"
    667  1.2  christos        "\t'n' - version and full copyright notice\n"));
    668  1.2  christos #line 58 "../check.c"
    669  1.2  christos   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
    670  1.2  christos #line 217 "../find.c"
    671  1.2  christos   puts(_("%s: The '%s' option has been disabled."));
    672  1.2  christos #line 430 "../find.c"
    673  1.2  christos   puts(_("%s: The '%s' option has been disabled."));
    674  1.2  christos #line 38 "../alias.c"
    675  1.2  christos   puts(_("-equivalence"));
    676  1.2  christos #line 469 "../find.c"
    677  1.2  christos   puts(_("%s: illegal option -- %c\n"));
    678  1.2  christos #line 110 "../reset.c"
    679  1.2  christos   puts(_("%s: illegal option -- %c\n"));
    680  1.2  christos #line 271 "../find.c"
    681  1.2  christos   puts(_("%s: illegal option -- %s\n"));
    682  1.2  christos #line 755 "../find.c"
    683  1.2  christos   puts(_("%s: illegal option -- %s\n"));
    684  1.2  christos #line 118 "../reset.c"
    685  1.2  christos   puts(_("%s: illegal option -- %s\n"));
    686  1.2  christos #line 335 "../find.c"
    687  1.2  christos   puts(_("%s: unknown vendor extension option -- %s\n"));
    688  1.2  christos #line 159 "../enum.c"
    689  1.2  christos   puts(_("  or an integer from %d through %d\n"));
    690  1.2  christos #line 169 "../enum.c"
    691  1.2  christos   puts(_("  or an integer from %d through %d\n"));
    692  1.2  christos #line 747 "../usage.c"
    693  1.2  christos   puts(_("%s error:  invalid option descriptor for %s\n"));
    694  1.2  christos #line 1081 "../usage.c"
    695  1.2  christos   puts(_("%s error:  invalid option descriptor for %s\n"));
    696  1.2  christos #line 385 "../find.c"
    697  1.2  christos   puts(_("%s: invalid option name: %s\n"));
    698  1.2  christos #line 527 "../find.c"
    699  1.2  christos   puts(_("%s: The '%s' option requires an argument.\n"));
    700  1.2  christos #line 156 "../autoopts.c"
    701  1.2  christos   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
    702  1.2  christos        "\t'%s' and '%s'."));
    703  1.2  christos #line 94 "../check.c"
    704  1.2  christos   puts(_("%s error:  The %s option is required\n"));
    705  1.2  christos #line 632 "../find.c"
    706  1.2  christos   puts(_("%s: The '%s' option cannot have an argument.\n"));
    707  1.2  christos #line 151 "../check.c"
    708  1.2  christos   puts(_("%s: Command line arguments are not allowed.\n"));
    709  1.2  christos #line 535 "../save.c"
    710  1.2  christos   puts(_("error %d (%s) creating %s\n"));
    711  1.2  christos #line 234 "../enum.c"
    712  1.2  christos   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
    713  1.2  christos #line 93 "../reset.c"
    714  1.2  christos   puts(_("%s error: The '%s' option requires an argument.\n"));
    715  1.2  christos #line 184 "../save.c"
    716  1.2  christos   puts(_("error %d (%s) stat-ing %s\n"));
    717  1.2  christos #line 238 "../save.c"
    718  1.2  christos   puts(_("error %d (%s) stat-ing %s\n"));
    719  1.2  christos #line 143 "../restore.c"
    720  1.2  christos   puts(_("%s error: no saved option state\n"));
    721  1.2  christos #line 231 "../autoopts.c"
    722  1.2  christos   puts(_("'%s' is not a command line option.\n"));
    723  1.2  christos #line 111 "../time.c"
    724  1.2  christos   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
    725  1.2  christos #line 132 "../save.c"
    726  1.2  christos   puts(_("'%s' not defined\n"));
    727  1.2  christos #line 50 "../time.c"
    728  1.2  christos   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
    729  1.2  christos #line 92 "../check.c"
    730  1.2  christos   puts(_("%s error:  The %s option must appear %d times.\n"));
    731  1.2  christos #line 164 "../numeric.c"
    732  1.2  christos   puts(_("%s error:  '%s' is not a recognizable number.\n"));
    733  1.2  christos #line 200 "../enum.c"
    734  1.2  christos   puts(_("%s error:  %s exceeds %s keyword count\n"));
    735  1.2  christos #line 330 "../usage.c"
    736  1.2  christos   puts(_("Try '%s %s' for more information.\n"));
    737  1.2  christos #line 45 "../alias.c"
    738  1.2  christos   puts(_("one %s%s option allowed\n"));
    739  1.2  christos #line 203 "../makeshell.c"
    740  1.2  christos   puts(_("standard output"));
    741  1.2  christos #line 938 "../makeshell.c"
    742  1.2  christos   puts(_("standard output"));
    743  1.2  christos #line 274 "../usage.c"
    744  1.2  christos   puts(_("standard output"));
    745  1.2  christos #line 415 "../usage.c"
    746  1.2  christos   puts(_("standard output"));
    747  1.2  christos #line 625 "../usage.c"
    748  1.2  christos   puts(_("standard output"));
    749  1.2  christos #line 175 "../version.c"
    750  1.2  christos   puts(_("standard output"));
    751  1.2  christos #line 274 "../usage.c"
    752  1.2  christos   puts(_("standard error"));
    753  1.2  christos #line 415 "../usage.c"
    754  1.2  christos   puts(_("standard error"));
    755  1.2  christos #line 625 "../usage.c"
    756  1.2  christos   puts(_("standard error"));
    757  1.2  christos #line 175 "../version.c"
    758  1.2  christos   puts(_("standard error"));
    759  1.2  christos #line 203 "../makeshell.c"
    760  1.2  christos   puts(_("write"));
    761  1.2  christos #line 938 "../makeshell.c"
    762  1.2  christos   puts(_("write"));
    763  1.2  christos #line 273 "../usage.c"
    764  1.2  christos   puts(_("write"));
    765  1.2  christos #line 414 "../usage.c"
    766  1.2  christos   puts(_("write"));
    767  1.2  christos #line 624 "../usage.c"
    768  1.2  christos   puts(_("write"));
    769  1.2  christos #line 174 "../version.c"
    770  1.2  christos   puts(_("write"));
    771  1.2  christos #line 60 "../numeric.c"
    772  1.2  christos   puts(_("%s error:  %s option value %ld is out of range.\n"));
    773  1.2  christos #line 44 "../check.c"
    774  1.2  christos   puts(_("%s error:  %s option requires the %s option\n"));
    775  1.2  christos #line 131 "../save.c"
    776  1.2  christos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
    777  1.2  christos #line 183 "../save.c"
    778  1.2  christos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
    779  1.2  christos #line 237 "../save.c"
    780  1.2  christos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
    781  1.2  christos #line 256 "../save.c"
    782  1.2  christos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
    783  1.2  christos #line 534 "../save.c"
    784  1.2  christos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
    785  1.2  christos   /* END-LIBOPTS-MESSAGES */
    786  1.2  christos 
    787  1.2  christos   /* USAGE-TEXT: */
    788  1.2  christos #line 873 "../usage.c"
    789  1.2  christos   puts(_("\t\t\t\t- an alternate for '%s'\n"));
    790  1.2  christos #line 1148 "../usage.c"
    791  1.2  christos   puts(_("Version, usage and configuration options:"));
    792  1.2  christos #line 924 "../usage.c"
    793  1.2  christos   puts(_("\t\t\t\t- default option for unnamed options\n"));
    794  1.2  christos #line 837 "../usage.c"
    795  1.2  christos   puts(_("\t\t\t\t- disabled as '--%s'\n"));
    796  1.2  christos #line 1117 "../usage.c"
    797  1.2  christos   puts(_(" --- %-14s %s\n"));
    798  1.2  christos #line 1115 "../usage.c"
    799  1.2  christos   puts(_("This option has been disabled"));
    800  1.2  christos #line 864 "../usage.c"
    801  1.2  christos   puts(_("\t\t\t\t- enabled by default\n"));
    802  1.2  christos #line 40 "../alias.c"
    803  1.2  christos   puts(_("%s error:  only "));
    804  1.2  christos #line 1194 "../usage.c"
    805  1.2  christos   puts(_(" - examining environment variables named %s_*\n"));
    806  1.2  christos #line 168 "../file.c"
    807  1.2  christos   puts(_("\t\t\t\t- file must not pre-exist\n"));
    808  1.2  christos #line 172 "../file.c"
    809  1.2  christos   puts(_("\t\t\t\t- file must pre-exist\n"));
    810  1.2  christos #line 380 "../usage.c"
    811  1.2  christos   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
    812  1.2  christos        "hyphen and the flag character.\n"));
    813  1.2  christos #line 916 "../makeshell.c"
    814  1.2  christos   puts(_("\n"
    815  1.2  christos        "= = = = = = = =\n\n"
    816  1.2  christos        "This incarnation of genshell will produce\n"
    817  1.2  christos        "a shell script to parse the options for %s:\n\n"));
    818  1.2  christos #line 166 "../enum.c"
    819  1.2  christos   puts(_("  or an integer mask with any of the lower %d bits set\n"));
    820  1.2  christos #line 897 "../usage.c"
    821  1.2  christos   puts(_("\t\t\t\t- is a set membership option\n"));
    822  1.2  christos #line 918 "../usage.c"
    823  1.2  christos   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
    824  1.2  christos #line 382 "../usage.c"
    825  1.2  christos   puts(_("Options are specified by single or double hyphens and their name.\n"));
    826  1.2  christos #line 904 "../usage.c"
    827  1.2  christos   puts(_("\t\t\t\t- may appear multiple times\n"));
    828  1.2  christos #line 891 "../usage.c"
    829  1.2  christos   puts(_("\t\t\t\t- may not be preset\n"));
    830  1.2  christos #line 1309 "../usage.c"
    831  1.2  christos   puts(_("   Arg Option-Name    Description\n"));
    832  1.2  christos #line 1245 "../usage.c"
    833  1.2  christos   puts(_("  Flg Arg Option-Name    Description\n"));
    834  1.2  christos #line 1303 "../usage.c"
    835  1.2  christos   puts(_("  Flg Arg Option-Name    Description\n"));
    836  1.2  christos #line 1304 "../usage.c"
    837  1.2  christos   puts(_(" %3s %s"));
    838  1.2  christos #line 1310 "../usage.c"
    839  1.2  christos   puts(_(" %3s %s"));
    840  1.2  christos #line 387 "../usage.c"
    841  1.2  christos   puts(_("The '-#<number>' option may omit the hash char\n"));
    842  1.2  christos #line 383 "../usage.c"
    843  1.2  christos   puts(_("All arguments are named options.\n"));
    844  1.2  christos #line 971 "../usage.c"
    845  1.2  christos   puts(_(" - reading file %s"));
    846  1.2  christos #line 409 "../usage.c"
    847  1.2  christos   puts(_("\n"
    848  1.2  christos        "Please send bug reports to:  <%s>\n"));
    849  1.2  christos #line 100 "../version.c"
    850  1.2  christos   puts(_("\n"
    851  1.2  christos        "Please send bug reports to:  <%s>\n"));
    852  1.2  christos #line 129 "../version.c"
    853  1.2  christos   puts(_("\n"
    854  1.2  christos        "Please send bug reports to:  <%s>\n"));
    855  1.2  christos #line 903 "../usage.c"
    856  1.2  christos   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
    857  1.2  christos #line 944 "../usage.c"
    858  1.2  christos   puts(_("\n"
    859  1.2  christos        "The following option preset mechanisms are supported:\n"));
    860  1.2  christos #line 1192 "../usage.c"
    861  1.2  christos   puts(_("\n"
    862  1.2  christos        "The following option preset mechanisms are supported:\n"));
    863  1.2  christos #line 682 "../usage.c"
    864  1.2  christos   puts(_("prohibits these options:\n"));
    865  1.2  christos #line 677 "../usage.c"
    866  1.2  christos   puts(_("prohibits the option '%s'\n"));
    867  1.2  christos #line 81 "../numeric.c"
    868  1.2  christos   puts(_("%s%ld to %ld"));
    869  1.2  christos #line 79 "../numeric.c"
    870  1.2  christos   puts(_("%sgreater than or equal to %ld"));
    871  1.2  christos #line 75 "../numeric.c"
    872  1.2  christos   puts(_("%s%ld exactly"));
    873  1.2  christos #line 68 "../numeric.c"
    874  1.2  christos   puts(_("%sit must lie in one of the ranges:\n"));
    875  1.2  christos #line 68 "../numeric.c"
    876  1.2  christos   puts(_("%sit must be in the range:\n"));
    877  1.2  christos #line 88 "../numeric.c"
    878  1.2  christos   puts(_(", or\n"));
    879  1.2  christos #line 66 "../numeric.c"
    880  1.2  christos   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
    881  1.2  christos #line 77 "../numeric.c"
    882  1.2  christos   puts(_("%sless than or equal to %ld"));
    883  1.2  christos #line 390 "../usage.c"
    884  1.2  christos   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
    885  1.2  christos #line 652 "../usage.c"
    886  1.2  christos   puts(_("requires the option '%s'\n"));
    887  1.2  christos #line 655 "../usage.c"
    888  1.2  christos   puts(_("requires these options:\n"));
    889  1.2  christos #line 1321 "../usage.c"
    890  1.2  christos   puts(_("   Arg Option-Name   Req?  Description\n"));
    891  1.2  christos #line 1315 "../usage.c"
    892  1.2  christos   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
    893  1.2  christos #line 167 "../enum.c"
    894  1.2  christos   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
    895  1.2  christos        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
    896  1.2  christos        "will set them all.  Multiple entries may be passed as an option\n"
    897  1.2  christos        "argument list.\n"));
    898  1.2  christos #line 910 "../usage.c"
    899  1.2  christos   puts(_("\t\t\t\t- may appear up to %d times\n"));
    900  1.2  christos #line 77 "../enum.c"
    901  1.2  christos   puts(_("The valid \"%s\" option keywords are:\n"));
    902  1.2  christos #line 1152 "../usage.c"
    903  1.2  christos   puts(_("The next option supports vendor supported extra options:"));
    904  1.2  christos #line 773 "../usage.c"
    905  1.2  christos   puts(_("These additional options are:"));
    906  1.2  christos   /* END-USAGE-TEXT */
    907  1.2  christos }
    908  1.2  christos #endif /* uncompilable code */
    909  1.1    kardel #ifdef  __cplusplus
    910  1.1    kardel }
    911  1.1    kardel #endif
    912  1.1    kardel /* ntpsnmpd-opts.c ends here */
    913