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