1*e03b00c8Schristos /*	$NetBSD: ntpsnmpd-opts.c,v 1.14 2022/10/09 21:41:04 christos Exp $	*/
2abb0f93cSkardel 
3abb0f93cSkardel /*
4abb0f93cSkardel  *  EDIT THIS FILE WITH CAUTION  (ntpsnmpd-opts.c)
5abb0f93cSkardel  *
6*e03b00c8Schristos  *  It has been AutoGen-ed  June 23, 2020 at 02:20:57 AM by AutoGen 5.18.5
7abb0f93cSkardel  *  From the definitions    ntpsnmpd-opts.def
8abb0f93cSkardel  *  and the template file   options
9abb0f93cSkardel  *
109034ec65Schristos  * Generated from AutoOpts 41:1:16 templates.
114305584aSkardel  *
124305584aSkardel  *  AutoOpts is a copyrighted work.  This source file is not encumbered
134305584aSkardel  *  by AutoOpts licensing, but is provided under the licensing terms chosen
144305584aSkardel  *  by the ntpsnmpd author or copyright holder.  AutoOpts is
154305584aSkardel  *  licensed under the terms of the LGPL.  The redistributable library
164305584aSkardel  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
174305584aSkardel  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
184305584aSkardel  *  for details.
19abb0f93cSkardel  *
202b3787f6Schristos  * The ntpsnmpd program is copyrighted and licensed
212b3787f6Schristos  * under the following terms:
22abb0f93cSkardel  *
239034ec65Schristos  *  Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.
242b3787f6Schristos  *  This is free software. It is licensed for use, modification and
252b3787f6Schristos  *  redistribution under the terms of the NTP License, copies of which
262b3787f6Schristos  *  can be seen at:
272b3787f6Schristos  *    <http://ntp.org/license>
282b3787f6Schristos  *    <http://opensource.org/licenses/ntp-license.php>
294305584aSkardel  *
302b3787f6Schristos  *  Permission to use, copy, modify, and distribute this software and its
312b3787f6Schristos  *  documentation for any purpose with or without fee is hereby granted,
322b3787f6Schristos  *  provided that the above copyright notice appears in all copies and that
332b3787f6Schristos  *  both the copyright notice and this permission notice appear in
342b3787f6Schristos  *  supporting documentation, and that the name The University of Delaware not be used in
352b3787f6Schristos  *  advertising or publicity pertaining to distribution of the software
3650cc4415Schristos  *  without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
372b3787f6Schristos  *  representations about the suitability this software for any purpose. It
382b3787f6Schristos  *  is provided "as is" without express or implied warranty.
39abb0f93cSkardel  */
40abb0f93cSkardel 
412b3787f6Schristos #ifndef __doxygen__
422b3787f6Schristos #define OPTION_CODE_COMPILE 1
432b3787f6Schristos #include "ntpsnmpd-opts.h"
44abb0f93cSkardel #include <sys/types.h>
454305584aSkardel 
46abb0f93cSkardel #include <limits.h>
47abb0f93cSkardel #include <stdio.h>
48abb0f93cSkardel #include <stdlib.h>
49abb0f93cSkardel 
50abb0f93cSkardel #ifdef  __cplusplus
51abb0f93cSkardel extern "C" {
52abb0f93cSkardel #endif
534305584aSkardel extern FILE * option_usage_fp;
542b3787f6Schristos #define zCopyright      (ntpsnmpd_opt_strs+0)
551c24ec91Schristos #define zLicenseDescrip (ntpsnmpd_opt_strs+345)
56abb0f93cSkardel 
57abb0f93cSkardel 
58abb0f93cSkardel #ifndef NULL
59abb0f93cSkardel #  define NULL 0
60abb0f93cSkardel #endif
61abb0f93cSkardel 
622b3787f6Schristos /**
632b3787f6Schristos  *  static const strings for ntpsnmpd options
64abb0f93cSkardel  */
651c24ec91Schristos static char const ntpsnmpd_opt_strs[1613] =
66*e03b00c8Schristos /*     0 */ "ntpsnmpd 4.2.8p15\n"
679034ec65Schristos             "Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n"
682b3787f6Schristos             "This is free software. It is licensed for use, modification and\n"
692b3787f6Schristos             "redistribution under the terms of the NTP License, copies of which\n"
702b3787f6Schristos             "can be seen at:\n"
712b3787f6Schristos             "  <http://ntp.org/license>\n"
722b3787f6Schristos             "  <http://opensource.org/licenses/ntp-license.php>\n\0"
731c24ec91Schristos /*   345 */ "Permission to use, copy, modify, and distribute this software and its\n"
742b3787f6Schristos             "documentation for any purpose with or without fee is hereby granted,\n"
752b3787f6Schristos             "provided that the above copyright notice appears in all copies and that\n"
762b3787f6Schristos             "both the copyright notice and this permission notice appear in supporting\n"
772b3787f6Schristos             "documentation, and that the name The University of Delaware not be used in\n"
782b3787f6Schristos             "advertising or publicity pertaining to distribution of the software without\n"
7950cc4415Schristos             "specific, written prior permission.  The University of Delaware and Network\n"
8050cc4415Schristos             "Time Foundation makes no representations about the suitability this\n"
8150cc4415Schristos             "software for any purpose.  It is provided \"as is\" without express or\n"
8250cc4415Schristos             "implied warranty.\n\0"
831c24ec91Schristos /*  1013 */ "Do not fork\0"
841c24ec91Schristos /*  1025 */ "NOFORK\0"
851c24ec91Schristos /*  1032 */ "nofork\0"
861c24ec91Schristos /*  1039 */ "Log to syslog()\0"
871c24ec91Schristos /*  1055 */ "SYSLOG\0"
881c24ec91Schristos /*  1062 */ "syslog\0"
891c24ec91Schristos /*  1069 */ "The socket address ntpsnmpd uses to connect to net-snmpd\0"
901c24ec91Schristos /*  1126 */ "AGENTXSOCKET\0"
911c24ec91Schristos /*  1139 */ "agentxsocket\0"
921c24ec91Schristos /*  1152 */ "unix:/var/agentx/master\0"
931c24ec91Schristos /*  1176 */ "display extended usage information and exit\0"
941c24ec91Schristos /*  1220 */ "help\0"
951c24ec91Schristos /*  1225 */ "extended usage information passed thru pager\0"
961c24ec91Schristos /*  1270 */ "more-help\0"
971c24ec91Schristos /*  1280 */ "output version information and exit\0"
981c24ec91Schristos /*  1316 */ "version\0"
991c24ec91Schristos /*  1324 */ "save the option state to a config file\0"
1001c24ec91Schristos /*  1363 */ "save-opts\0"
1011c24ec91Schristos /*  1373 */ "load options from a config file\0"
1021c24ec91Schristos /*  1405 */ "LOAD_OPTS\0"
1031c24ec91Schristos /*  1415 */ "no-load-opts\0"
1041c24ec91Schristos /*  1428 */ "no\0"
1051c24ec91Schristos /*  1431 */ "NTPSNMPD\0"
106*e03b00c8Schristos /*  1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p15\n"
1072b3787f6Schristos             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
1081c24ec91Schristos /*  1544 */ "$HOME\0"
1091c24ec91Schristos /*  1550 */ ".\0"
1101c24ec91Schristos /*  1552 */ ".ntprc\0"
1111c24ec91Schristos /*  1559 */ "http://bugs.ntp.org, bugs@ntp.org\0"
1121c24ec91Schristos /*  1593 */ "\n\0"
113*e03b00c8Schristos /*  1595 */ "ntpsnmpd 4.2.8p15";
1142b3787f6Schristos 
1152b3787f6Schristos /**
1162b3787f6Schristos  *  nofork option description:
1172b3787f6Schristos  */
1182b3787f6Schristos /** Descriptive text for the nofork option */
1191c24ec91Schristos #define NOFORK_DESC      (ntpsnmpd_opt_strs+1013)
1202b3787f6Schristos /** Upper-cased name for the nofork option */
1211c24ec91Schristos #define NOFORK_NAME      (ntpsnmpd_opt_strs+1025)
1222b3787f6Schristos /** Name string for the nofork option */
1231c24ec91Schristos #define NOFORK_name      (ntpsnmpd_opt_strs+1032)
1242b3787f6Schristos /** Compiled in flag settings for the nofork option */
125abb0f93cSkardel #define NOFORK_FLAGS     (OPTST_DISABLED)
126abb0f93cSkardel 
1272b3787f6Schristos /**
1282b3787f6Schristos  *  syslog option description:
129abb0f93cSkardel  */
1302b3787f6Schristos /** Descriptive text for the syslog option */
1311c24ec91Schristos #define SYSLOG_DESC      (ntpsnmpd_opt_strs+1039)
1322b3787f6Schristos /** Upper-cased name for the syslog option */
1331c24ec91Schristos #define SYSLOG_NAME      (ntpsnmpd_opt_strs+1055)
1342b3787f6Schristos /** Name string for the syslog option */
1351c24ec91Schristos #define SYSLOG_name      (ntpsnmpd_opt_strs+1062)
1362b3787f6Schristos /** Compiled in flag settings for the syslog option */
137abb0f93cSkardel #define SYSLOG_FLAGS     (OPTST_DISABLED)
138abb0f93cSkardel 
1392b3787f6Schristos /**
1402b3787f6Schristos  *  agentXSocket option description:
1414305584aSkardel  */
1422b3787f6Schristos /** Descriptive text for the agentXSocket option */
1431c24ec91Schristos #define AGENTXSOCKET_DESC      (ntpsnmpd_opt_strs+1069)
1442b3787f6Schristos /** Upper-cased name for the agentXSocket option */
1451c24ec91Schristos #define AGENTXSOCKET_NAME      (ntpsnmpd_opt_strs+1126)
1462b3787f6Schristos /** Name string for the agentXSocket option */
1471c24ec91Schristos #define AGENTXSOCKET_name      (ntpsnmpd_opt_strs+1139)
1482b3787f6Schristos /** The compiled in default value for the agentXSocket option argument */
1491c24ec91Schristos #define AGENTXSOCKET_DFT_ARG   (ntpsnmpd_opt_strs+1152)
1502b3787f6Schristos /** Compiled in flag settings for the agentXSocket option */
1514305584aSkardel #define AGENTXSOCKET_FLAGS     (OPTST_DISABLED \
1524305584aSkardel         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
1534305584aSkardel 
1544305584aSkardel /*
155abb0f93cSkardel  *  Help/More_Help/Version option descriptions:
156abb0f93cSkardel  */
1571c24ec91Schristos #define HELP_DESC       (ntpsnmpd_opt_strs+1176)
1581c24ec91Schristos #define HELP_name       (ntpsnmpd_opt_strs+1220)
159abb0f93cSkardel #ifdef HAVE_WORKING_FORK
1601c24ec91Schristos #define MORE_HELP_DESC  (ntpsnmpd_opt_strs+1225)
1611c24ec91Schristos #define MORE_HELP_name  (ntpsnmpd_opt_strs+1270)
1622b3787f6Schristos #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
163abb0f93cSkardel #else
1642b3787f6Schristos #define MORE_HELP_DESC  HELP_DESC
1652b3787f6Schristos #define MORE_HELP_name  HELP_name
1662b3787f6Schristos #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
167abb0f93cSkardel #endif
168abb0f93cSkardel #ifdef NO_OPTIONAL_OPT_ARGS
1692b3787f6Schristos #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
170abb0f93cSkardel #else
1712b3787f6Schristos #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
1722b3787f6Schristos                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
173abb0f93cSkardel #endif
1741c24ec91Schristos #define VER_DESC        (ntpsnmpd_opt_strs+1280)
1751c24ec91Schristos #define VER_name        (ntpsnmpd_opt_strs+1316)
1761c24ec91Schristos #define SAVE_OPTS_DESC  (ntpsnmpd_opt_strs+1324)
1771c24ec91Schristos #define SAVE_OPTS_name  (ntpsnmpd_opt_strs+1363)
1781c24ec91Schristos #define LOAD_OPTS_DESC     (ntpsnmpd_opt_strs+1373)
1791c24ec91Schristos #define LOAD_OPTS_NAME     (ntpsnmpd_opt_strs+1405)
1801c24ec91Schristos #define NO_LOAD_OPTS_name  (ntpsnmpd_opt_strs+1415)
1811c24ec91Schristos #define LOAD_OPTS_pfx      (ntpsnmpd_opt_strs+1428)
1822b3787f6Schristos #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
1832b3787f6Schristos /**
184abb0f93cSkardel  *  Declare option callback procedures
185abb0f93cSkardel  */
186abb0f93cSkardel extern tOptProc
1872b3787f6Schristos     ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
1882b3787f6Schristos     optionNumericVal,      optionPagedUsage,      optionResetOpt,
1894305584aSkardel     optionStackArg,        optionTimeDate,        optionTimeVal,
1901b6f2cd4Schristos     optionUnstackArg,      optionVendorOption;
191abb0f93cSkardel static tOptProc
192abb0f93cSkardel     doUsageOpt;
1932b3787f6Schristos #define VER_PROC        ntpOptionPrintVersion
194abb0f93cSkardel 
1952b3787f6Schristos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1962b3787f6Schristos /**
1972b3787f6Schristos  *  Define the ntpsnmpd Option Descriptions.
1982b3787f6Schristos  * This is an array of OPTION_CT entries, one for each
1992b3787f6Schristos  * option that the ntpsnmpd program responds to.
200abb0f93cSkardel  */
201abb0f93cSkardel static tOptDesc optDesc[OPTION_CT] = {
202abb0f93cSkardel   {  /* entry idx, value */ 0, VALUE_OPT_NOFORK,
203abb0f93cSkardel      /* equiv idx, value */ 0, VALUE_OPT_NOFORK,
204abb0f93cSkardel      /* equivalenced to  */ NO_EQUIVALENT,
205abb0f93cSkardel      /* min, max, act ct */ 0, 1, 0,
206abb0f93cSkardel      /* opt state flags  */ NOFORK_FLAGS, 0,
2072b3787f6Schristos      /* last opt argumnt */ { NULL }, /* --nofork */
208abb0f93cSkardel      /* arg list/cookie  */ NULL,
209abb0f93cSkardel      /* must/cannot opts */ NULL, NULL,
210abb0f93cSkardel      /* option proc      */ NULL,
2112b3787f6Schristos      /* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
212abb0f93cSkardel      /* disablement strs */ NULL, NULL },
213abb0f93cSkardel 
214abb0f93cSkardel   {  /* entry idx, value */ 1, VALUE_OPT_SYSLOG,
215abb0f93cSkardel      /* equiv idx, value */ 1, VALUE_OPT_SYSLOG,
216abb0f93cSkardel      /* equivalenced to  */ NO_EQUIVALENT,
217abb0f93cSkardel      /* min, max, act ct */ 0, 1, 0,
218abb0f93cSkardel      /* opt state flags  */ SYSLOG_FLAGS, 0,
2192b3787f6Schristos      /* last opt argumnt */ { NULL }, /* --syslog */
220abb0f93cSkardel      /* arg list/cookie  */ NULL,
221abb0f93cSkardel      /* must/cannot opts */ NULL, NULL,
222abb0f93cSkardel      /* option proc      */ NULL,
2232b3787f6Schristos      /* desc, NAME, name */ SYSLOG_DESC, SYSLOG_NAME, SYSLOG_name,
224abb0f93cSkardel      /* disablement strs */ NULL, NULL },
225abb0f93cSkardel 
2264305584aSkardel   {  /* entry idx, value */ 2, VALUE_OPT_AGENTXSOCKET,
2274305584aSkardel      /* equiv idx, value */ 2, VALUE_OPT_AGENTXSOCKET,
2284305584aSkardel      /* equivalenced to  */ NO_EQUIVALENT,
2294305584aSkardel      /* min, max, act ct */ 0, 1, 0,
2304305584aSkardel      /* opt state flags  */ AGENTXSOCKET_FLAGS, 0,
2312b3787f6Schristos      /* last opt argumnt */ { AGENTXSOCKET_DFT_ARG },
2324305584aSkardel      /* arg list/cookie  */ NULL,
2334305584aSkardel      /* must/cannot opts */ NULL, NULL,
2344305584aSkardel      /* option proc      */ NULL,
2352b3787f6Schristos      /* desc, NAME, name */ AGENTXSOCKET_DESC, AGENTXSOCKET_NAME, AGENTXSOCKET_name,
2364305584aSkardel      /* disablement strs */ NULL, NULL },
2374305584aSkardel 
238abb0f93cSkardel   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
2392b3787f6Schristos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
240abb0f93cSkardel      /* equivalenced to  */ NO_EQUIVALENT,
241abb0f93cSkardel      /* min, max, act ct */ 0, 1, 0,
2422b3787f6Schristos      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
243abb0f93cSkardel      /* last opt argumnt */ { NULL },
244abb0f93cSkardel      /* arg list/cookie  */ NULL,
245abb0f93cSkardel      /* must/cannot opts */ NULL, NULL,
2462b3787f6Schristos      /* option proc      */ VER_PROC,
2472b3787f6Schristos      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
248abb0f93cSkardel      /* disablement strs */ NULL, NULL },
249abb0f93cSkardel 
250abb0f93cSkardel 
251abb0f93cSkardel 
252abb0f93cSkardel   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
2532b3787f6Schristos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
254abb0f93cSkardel      /* equivalenced to  */ NO_EQUIVALENT,
255abb0f93cSkardel      /* min, max, act ct */ 0, 1, 0,
2562b3787f6Schristos      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
257abb0f93cSkardel      /* last opt argumnt */ { NULL },
258abb0f93cSkardel      /* arg list/cookie  */ NULL,
259abb0f93cSkardel      /* must/cannot opts */ NULL, NULL,
260abb0f93cSkardel      /* option proc      */ doUsageOpt,
2612b3787f6Schristos      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
262abb0f93cSkardel      /* disablement strs */ NULL, NULL },
263abb0f93cSkardel 
264abb0f93cSkardel   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
2652b3787f6Schristos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
266abb0f93cSkardel      /* equivalenced to  */ NO_EQUIVALENT,
267abb0f93cSkardel      /* min, max, act ct */ 0, 1, 0,
2682b3787f6Schristos      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
269abb0f93cSkardel      /* last opt argumnt */ { NULL },
270abb0f93cSkardel      /* arg list/cookie  */ NULL,
271abb0f93cSkardel      /* must/cannot opts */ NULL,  NULL,
272abb0f93cSkardel      /* option proc      */ optionPagedUsage,
2732b3787f6Schristos      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
274abb0f93cSkardel      /* disablement strs */ NULL, NULL },
275abb0f93cSkardel 
276abb0f93cSkardel   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
2772b3787f6Schristos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
278abb0f93cSkardel      /* equivalenced to  */ NO_EQUIVALENT,
279abb0f93cSkardel      /* min, max, act ct */ 0, 1, 0,
280abb0f93cSkardel      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
2812b3787f6Schristos                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
282abb0f93cSkardel      /* last opt argumnt */ { NULL },
283abb0f93cSkardel      /* arg list/cookie  */ NULL,
284abb0f93cSkardel      /* must/cannot opts */ NULL,  NULL,
285abb0f93cSkardel      /* option proc      */ NULL,
2862b3787f6Schristos      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
287abb0f93cSkardel      /* disablement strs */ NULL, NULL },
288abb0f93cSkardel 
289abb0f93cSkardel   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
2902b3787f6Schristos      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
291abb0f93cSkardel      /* equivalenced to  */ NO_EQUIVALENT,
292abb0f93cSkardel      /* min, max, act ct */ 0, NOLIMIT, 0,
293abb0f93cSkardel      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
2942b3787f6Schristos 			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
295abb0f93cSkardel      /* last opt argumnt */ { NULL },
296abb0f93cSkardel      /* arg list/cookie  */ NULL,
297abb0f93cSkardel      /* must/cannot opts */ NULL, NULL,
298abb0f93cSkardel      /* option proc      */ optionLoadOpt,
2992b3787f6Schristos      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
3002b3787f6Schristos      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
301abb0f93cSkardel };
302abb0f93cSkardel 
303abb0f93cSkardel 
3042b3787f6Schristos /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
3052b3787f6Schristos /** Reference to the upper cased version of ntpsnmpd. */
3061c24ec91Schristos #define zPROGNAME       (ntpsnmpd_opt_strs+1431)
3072b3787f6Schristos /** Reference to the title line for ntpsnmpd usage. */
3081c24ec91Schristos #define zUsageTitle     (ntpsnmpd_opt_strs+1440)
3092b3787f6Schristos /** ntpsnmpd configuration file name. */
3101c24ec91Schristos #define zRcName         (ntpsnmpd_opt_strs+1552)
3112b3787f6Schristos /** Directories to search for ntpsnmpd config files. */
3122b3787f6Schristos static char const * const apzHomeList[3] = {
3131c24ec91Schristos     ntpsnmpd_opt_strs+1544,
3141c24ec91Schristos     ntpsnmpd_opt_strs+1550,
3152b3787f6Schristos     NULL };
3162b3787f6Schristos /** The ntpsnmpd program bug email address. */
3171c24ec91Schristos #define zBugsAddr       (ntpsnmpd_opt_strs+1559)
3182b3787f6Schristos /** Clarification/explanation of what ntpsnmpd does. */
3191c24ec91Schristos #define zExplain        (ntpsnmpd_opt_strs+1593)
3202b3787f6Schristos /** Extra detail explaining what ntpsnmpd does. */
3212b3787f6Schristos #define zDetail         (NULL)
3222b3787f6Schristos /** The full version string for ntpsnmpd. */
3231c24ec91Schristos #define zFullVersion    (ntpsnmpd_opt_strs+1595)
3242b3787f6Schristos /* extracted from optcode.tlib near line 364 */
325abb0f93cSkardel 
326abb0f93cSkardel #if defined(ENABLE_NLS)
327abb0f93cSkardel # define OPTPROC_BASE OPTPROC_TRANSLATE
328abb0f93cSkardel   static tOptionXlateProc translate_option_strings;
329abb0f93cSkardel #else
330abb0f93cSkardel # define OPTPROC_BASE OPTPROC_NONE
331abb0f93cSkardel # define translate_option_strings NULL
332abb0f93cSkardel #endif /* ENABLE_NLS */
333abb0f93cSkardel 
3342b3787f6Schristos #define ntpsnmpd_full_usage (NULL)
3352b3787f6Schristos #define ntpsnmpd_short_usage (NULL)
336abb0f93cSkardel 
3372b3787f6Schristos #endif /* not defined __doxygen__ */
3382b3787f6Schristos 
3392b3787f6Schristos /*
3402b3787f6Schristos  *  Create the static procedure(s) declared above.
3412b3787f6Schristos  */
3422b3787f6Schristos /**
3432b3787f6Schristos  * The callout function that invokes the optionUsage function.
3442b3787f6Schristos  *
3452b3787f6Schristos  * @param[in] opts the AutoOpts option description structure
3462b3787f6Schristos  * @param[in] od   the descriptor for the "help" (usage) option.
3472b3787f6Schristos  * @noreturn
3482b3787f6Schristos  */
3492b3787f6Schristos static void
doUsageOpt(tOptions * opts,tOptDesc * od)3502b3787f6Schristos doUsageOpt(tOptions * opts, tOptDesc * od)
3512b3787f6Schristos {
3522b3787f6Schristos     int ex_code;
3532b3787f6Schristos     ex_code = NTPSNMPD_EXIT_SUCCESS;
3542b3787f6Schristos     optionUsage(&ntpsnmpdOptions, ex_code);
3552b3787f6Schristos     /* NOTREACHED */
3562b3787f6Schristos     exit(1);
3572b3787f6Schristos     (void)opts;
3582b3787f6Schristos     (void)od;
3592b3787f6Schristos }
3604e3b3909Schristos /* extracted from optmain.tlib near line 1250 */
3612b3787f6Schristos 
3622b3787f6Schristos /**
3632b3787f6Schristos  * The directory containing the data associated with ntpsnmpd.
3642b3787f6Schristos  */
3654305584aSkardel #ifndef  PKGDATADIR
3664305584aSkardel # define PKGDATADIR ""
3674305584aSkardel #endif
3684305584aSkardel 
3692b3787f6Schristos /**
3702b3787f6Schristos  * Information about the person or institution that packaged ntpsnmpd
3712b3787f6Schristos  * for the current distribution.
3722b3787f6Schristos  */
3734305584aSkardel #ifndef  WITH_PACKAGER
3744305584aSkardel # define ntpsnmpd_packager_info NULL
3754305584aSkardel #else
3762b3787f6Schristos /** Packager information for ntpsnmpd. */
3774305584aSkardel static char const ntpsnmpd_packager_info[] =
3784305584aSkardel     "Packaged by " WITH_PACKAGER
3794305584aSkardel 
3804305584aSkardel # ifdef WITH_PACKAGER_VERSION
3814305584aSkardel         " ("WITH_PACKAGER_VERSION")"
3824305584aSkardel # endif
3834305584aSkardel 
3844305584aSkardel # ifdef WITH_PACKAGER_BUG_REPORTS
3854305584aSkardel     "\nReport ntpsnmpd bugs to " WITH_PACKAGER_BUG_REPORTS
3864305584aSkardel # endif
3874305584aSkardel     "\n";
3884305584aSkardel #endif
3892b3787f6Schristos #ifndef __doxygen__
3904305584aSkardel 
3912b3787f6Schristos #endif /* __doxygen__ */
3922b3787f6Schristos /**
3932b3787f6Schristos  * The option definitions for ntpsnmpd.  The one structure that
3942b3787f6Schristos  * binds them all.
3952b3787f6Schristos  */
396abb0f93cSkardel tOptions ntpsnmpdOptions = {
397abb0f93cSkardel     OPTIONS_STRUCT_VERSION,
398abb0f93cSkardel     0, NULL,                    /* original argc + argv    */
399abb0f93cSkardel     ( OPTPROC_BASE
400abb0f93cSkardel     + OPTPROC_ERRSTOP
401abb0f93cSkardel     + OPTPROC_SHORTOPT
402abb0f93cSkardel     + OPTPROC_LONGOPT
403abb0f93cSkardel     + OPTPROC_NO_REQ_OPT
404abb0f93cSkardel     + OPTPROC_ENVIRON
4054305584aSkardel     + OPTPROC_NO_ARGS
4061b6f2cd4Schristos     + OPTPROC_MISUSE ),
407abb0f93cSkardel     0, NULL,                    /* current option index, current option */
408abb0f93cSkardel     NULL,         NULL,         zPROGNAME,
4094305584aSkardel     zRcName,      zCopyright,   zLicenseDescrip,
410abb0f93cSkardel     zFullVersion, apzHomeList,  zUsageTitle,
411abb0f93cSkardel     zExplain,     zDetail,      optDesc,
412abb0f93cSkardel     zBugsAddr,                  /* address to send bugs to */
413abb0f93cSkardel     NULL, NULL,                 /* extensions/saved state  */
414abb0f93cSkardel     optionUsage, /* usage procedure */
415abb0f93cSkardel     translate_option_strings,   /* translation procedure */
416abb0f93cSkardel     /*
417abb0f93cSkardel      *  Indexes to special options
418abb0f93cSkardel      */
419abb0f93cSkardel     { INDEX_OPT_MORE_HELP, /* more-help option index */
420abb0f93cSkardel       INDEX_OPT_SAVE_OPTS, /* save option index */
421abb0f93cSkardel       NO_EQUIVALENT, /* '-#' option index */
422abb0f93cSkardel       NO_EQUIVALENT /* index of default opt */
423abb0f93cSkardel     },
4244305584aSkardel     8 /* full option count */, 3 /* user option count */,
425abb0f93cSkardel     ntpsnmpd_full_usage, ntpsnmpd_short_usage,
4264305584aSkardel     NULL, NULL,
4274305584aSkardel     PKGDATADIR, ntpsnmpd_packager_info
428abb0f93cSkardel };
429abb0f93cSkardel 
430abb0f93cSkardel #if ENABLE_NLS
4312b3787f6Schristos /**
4322b3787f6Schristos  * This code is designed to translate translatable option text for the
4332b3787f6Schristos  * ntpsnmpd program.  These translations happen upon entry
4342b3787f6Schristos  * to optionProcess().
4352b3787f6Schristos  */
436abb0f93cSkardel #include <stdio.h>
437abb0f93cSkardel #include <stdlib.h>
438abb0f93cSkardel #include <string.h>
439abb0f93cSkardel #include <unistd.h>
4402b3787f6Schristos #ifdef HAVE_DCGETTEXT
4412b3787f6Schristos # include <gettext.h>
4422b3787f6Schristos #endif
443abb0f93cSkardel #include <autoopts/usage-txt.h>
444abb0f93cSkardel 
445abb0f93cSkardel static char * AO_gettext(char const * pz);
446abb0f93cSkardel static void   coerce_it(void ** s);
447abb0f93cSkardel 
4482b3787f6Schristos /**
4492b3787f6Schristos  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
4502b3787f6Schristos  * to convert from English to the target language, then strdup-duplicates the
4512b3787f6Schristos  * result string.  It tries the "libopts" domain first, then whatever has been
4522b3787f6Schristos  * set via the \a textdomain(3) call.
4532b3787f6Schristos  *
4542b3787f6Schristos  * @param[in] pz the input text used as a lookup key.
4552b3787f6Schristos  * @returns the translated text (if there is one),
4562b3787f6Schristos  *   or the original text (if not).
4572b3787f6Schristos  */
458abb0f93cSkardel static char *
AO_gettext(char const * pz)459abb0f93cSkardel AO_gettext(char const * pz)
460abb0f93cSkardel {
4612b3787f6Schristos     char * res;
462abb0f93cSkardel     if (pz == NULL)
463abb0f93cSkardel         return NULL;
4642b3787f6Schristos #ifdef HAVE_DCGETTEXT
4652b3787f6Schristos     /*
4662b3787f6Schristos      * While processing the option_xlateable_txt data, try to use the
4672b3787f6Schristos      * "libopts" domain.  Once we switch to the option descriptor data,
4682b3787f6Schristos      * do *not* use that domain.
4692b3787f6Schristos      */
4702b3787f6Schristos     if (option_xlateable_txt.field_ct != 0) {
4712b3787f6Schristos         res = dgettext("libopts", pz);
4722b3787f6Schristos         if (res == pz)
4734e3b3909Schristos             res = (char *)VOIDP(_(pz));
4742b3787f6Schristos     } else
4754e3b3909Schristos         res = (char *)VOIDP(_(pz));
4762b3787f6Schristos #else
4774e3b3909Schristos     res = (char *)VOIDP(_(pz));
4782b3787f6Schristos #endif
4792b3787f6Schristos     if (res == pz)
4802b3787f6Schristos         return res;
4812b3787f6Schristos     res = strdup(res);
4822b3787f6Schristos     if (res == NULL) {
483abb0f93cSkardel         fputs(_("No memory for duping translated strings\n"), stderr);
4844305584aSkardel         exit(NTPSNMPD_EXIT_FAILURE);
485abb0f93cSkardel     }
4862b3787f6Schristos     return res;
487abb0f93cSkardel }
488abb0f93cSkardel 
4892b3787f6Schristos /**
4902b3787f6Schristos  * All the pointers we use are marked "* const", but they are stored in
4912b3787f6Schristos  * writable memory.  Coerce the mutability and set the pointer.
4922b3787f6Schristos  */
coerce_it(void ** s)4934305584aSkardel static void coerce_it(void ** s) { *s = AO_gettext(*s);
4944305584aSkardel }
495abb0f93cSkardel 
4962b3787f6Schristos /**
4972b3787f6Schristos  * Translate all the translatable strings in the ntpsnmpdOptions
4982b3787f6Schristos  * structure defined above.  This is done only once.
499abb0f93cSkardel  */
500abb0f93cSkardel static void
translate_option_strings(void)501abb0f93cSkardel translate_option_strings(void)
502abb0f93cSkardel {
5032b3787f6Schristos     tOptions * const opts = &ntpsnmpdOptions;
5044305584aSkardel 
505abb0f93cSkardel     /*
506abb0f93cSkardel      *  Guard against re-translation.  It won't work.  The strings will have
507abb0f93cSkardel      *  been changed by the first pass through this code.  One shot only.
508abb0f93cSkardel      */
5092b3787f6Schristos     if (option_xlateable_txt.field_ct != 0) {
510abb0f93cSkardel         /*
511abb0f93cSkardel          *  Do the translations.  The first pointer follows the field count
512abb0f93cSkardel          *  field.  The field count field is the size of a pointer.
513abb0f93cSkardel          */
5144e3b3909Schristos         char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
5152b3787f6Schristos         int     ix  = option_xlateable_txt.field_ct;
516abb0f93cSkardel 
517abb0f93cSkardel         do {
5182b3787f6Schristos             ppz++; /* skip over field_ct */
519abb0f93cSkardel             *ppz = AO_gettext(*ppz);
520abb0f93cSkardel         } while (--ix > 0);
5212b3787f6Schristos         /* prevent re-translation and disable "libopts" domain lookup */
5222b3787f6Schristos         option_xlateable_txt.field_ct = 0;
523abb0f93cSkardel 
5244e3b3909Schristos         coerce_it(VOIDP(&(opts->pzCopyright)));
5254e3b3909Schristos         coerce_it(VOIDP(&(opts->pzCopyNotice)));
5264e3b3909Schristos         coerce_it(VOIDP(&(opts->pzFullVersion)));
5274e3b3909Schristos         coerce_it(VOIDP(&(opts->pzUsageTitle)));
5284e3b3909Schristos         coerce_it(VOIDP(&(opts->pzExplain)));
5294e3b3909Schristos         coerce_it(VOIDP(&(opts->pzDetail)));
5302b3787f6Schristos         {
5312b3787f6Schristos             tOptDesc * od = opts->pOptDesc;
5322b3787f6Schristos             for (ix = opts->optCt; ix > 0; ix--, od++)
5334e3b3909Schristos                 coerce_it(VOIDP(&(od->pzText)));
534abb0f93cSkardel         }
535abb0f93cSkardel     }
5362b3787f6Schristos }
537abb0f93cSkardel #endif /* ENABLE_NLS */
538abb0f93cSkardel 
5392b3787f6Schristos #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
5402b3787f6Schristos /** I18N function strictly for xgettext.  Do not compile. */
bogus_function(void)5412b3787f6Schristos static void bogus_function(void) {
5422b3787f6Schristos   /* TRANSLATORS:
5432b3787f6Schristos 
5442b3787f6Schristos      The following dummy function was crated solely so that xgettext can
5452b3787f6Schristos      extract the correct strings.  These strings are actually referenced
5462b3787f6Schristos      by a field name in the ntpsnmpdOptions structure noted in the
5472b3787f6Schristos      comments below.  The literal text is defined in ntpsnmpd_opt_strs.
5482b3787f6Schristos 
5492b3787f6Schristos      NOTE: the strings below are segmented with respect to the source string
5502b3787f6Schristos      ntpsnmpd_opt_strs.  The strings above are handed off for translation
5512b3787f6Schristos      at run time a paragraph at a time.  Consequently, they are presented here
5522b3787f6Schristos      for translation a paragraph at a time.
5532b3787f6Schristos 
5542b3787f6Schristos      ALSO: often the description for an option will reference another option
5552b3787f6Schristos      by name.  These are set off with apostrophe quotes (I hope).  Do not
5562b3787f6Schristos      translate option names.
5572b3787f6Schristos    */
5582b3787f6Schristos   /* referenced via ntpsnmpdOptions.pzCopyright */
559*e03b00c8Schristos   puts(_("ntpsnmpd 4.2.8p15\n\
5609034ec65Schristos Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation, all rights reserved.\n\
5612b3787f6Schristos This is free software. It is licensed for use, modification and\n\
5622b3787f6Schristos redistribution under the terms of the NTP License, copies of which\n\
5632b3787f6Schristos can be seen at:\n"));
5642b3787f6Schristos   puts(_("  <http://ntp.org/license>\n\
5652b3787f6Schristos   <http://opensource.org/licenses/ntp-license.php>\n"));
5662b3787f6Schristos 
5672b3787f6Schristos   /* referenced via ntpsnmpdOptions.pzCopyNotice */
5682b3787f6Schristos   puts(_("Permission to use, copy, modify, and distribute this software and its\n\
5692b3787f6Schristos documentation for any purpose with or without fee is hereby granted,\n\
5702b3787f6Schristos provided that the above copyright notice appears in all copies and that\n\
5712b3787f6Schristos both the copyright notice and this permission notice appear in supporting\n\
5722b3787f6Schristos documentation, and that the name The University of Delaware not be used in\n\
5732b3787f6Schristos advertising or publicity pertaining to distribution of the software without\n\
57450cc4415Schristos specific, written prior permission.  The University of Delaware and Network\n\
57550cc4415Schristos Time Foundation makes no representations about the suitability this\n\
57650cc4415Schristos software for any purpose.  It is provided \"as is\" without express or\n\
57750cc4415Schristos implied warranty.\n"));
5782b3787f6Schristos 
5792b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
5802b3787f6Schristos   puts(_("Do not fork"));
5812b3787f6Schristos 
5822b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
5832b3787f6Schristos   puts(_("Log to syslog()"));
5842b3787f6Schristos 
5852b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
5862b3787f6Schristos   puts(_("The socket address ntpsnmpd uses to connect to net-snmpd"));
5872b3787f6Schristos 
5882b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
5892b3787f6Schristos   puts(_("display extended usage information and exit"));
5902b3787f6Schristos 
5912b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
5922b3787f6Schristos   puts(_("extended usage information passed thru pager"));
5932b3787f6Schristos 
5942b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
5952b3787f6Schristos   puts(_("output version information and exit"));
5962b3787f6Schristos 
5972b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
5982b3787f6Schristos   puts(_("save the option state to a config file"));
5992b3787f6Schristos 
6002b3787f6Schristos   /* referenced via ntpsnmpdOptions.pOptDesc->pzText */
6012b3787f6Schristos   puts(_("load options from a config file"));
6022b3787f6Schristos 
6032b3787f6Schristos   /* referenced via ntpsnmpdOptions.pzUsageTitle */
604*e03b00c8Schristos   puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p15\n\
6052b3787f6Schristos Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
6062b3787f6Schristos 
6072b3787f6Schristos   /* referenced via ntpsnmpdOptions.pzExplain */
6082b3787f6Schristos   puts(_("\n"));
6092b3787f6Schristos 
6102b3787f6Schristos   /* referenced via ntpsnmpdOptions.pzFullVersion */
611*e03b00c8Schristos   puts(_("ntpsnmpd 4.2.8p15"));
6122b3787f6Schristos 
6132b3787f6Schristos   /* referenced via ntpsnmpdOptions.pzFullUsage */
6142b3787f6Schristos   puts(_("<<<NOT-FOUND>>>"));
6152b3787f6Schristos 
6162b3787f6Schristos   /* referenced via ntpsnmpdOptions.pzShortUsage */
6172b3787f6Schristos   puts(_("<<<NOT-FOUND>>>"));
6182b3787f6Schristos   /* LIBOPTS-MESSAGES: */
6192b3787f6Schristos #line 67 "../autoopts.c"
6202b3787f6Schristos   puts(_("allocation of %d bytes failed\n"));
6212b3787f6Schristos #line 93 "../autoopts.c"
6222b3787f6Schristos   puts(_("allocation of %d bytes failed\n"));
6232b3787f6Schristos #line 53 "../init.c"
6242b3787f6Schristos   puts(_("AutoOpts function called without option descriptor\n"));
6251b6f2cd4Schristos #line 86 "../init.c"
6262b3787f6Schristos   puts(_("\tThis exceeds the compiled library version:  "));
6271b6f2cd4Schristos #line 84 "../init.c"
6282b3787f6Schristos   puts(_("Automated Options Processing Error!\n"
6292b3787f6Schristos        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
6302b3787f6Schristos #line 80 "../autoopts.c"
6312b3787f6Schristos   puts(_("realloc of %d bytes at 0x%p failed\n"));
6321b6f2cd4Schristos #line 88 "../init.c"
6332b3787f6Schristos   puts(_("\tThis is less than the minimum library version:  "));
6342b3787f6Schristos #line 121 "../version.c"
6352b3787f6Schristos   puts(_("Automated Options version %s\n"
6361b6f2cd4Schristos        "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
6374e3b3909Schristos #line 87 "../makeshell.c"
6382b3787f6Schristos   puts(_("(AutoOpts bug):  %s.\n"));
6392b3787f6Schristos #line 90 "../reset.c"
6402b3787f6Schristos   puts(_("optionResetOpt() called, but reset-option not configured"));
6412b3787f6Schristos #line 292 "../usage.c"
6422b3787f6Schristos   puts(_("could not locate the 'help' option"));
6432b3787f6Schristos #line 336 "../autoopts.c"
6442b3787f6Schristos   puts(_("optionProcess() was called with invalid data"));
6452b3787f6Schristos #line 748 "../usage.c"
6462b3787f6Schristos   puts(_("invalid argument type specified"));
6472b3787f6Schristos #line 598 "../find.c"
6482b3787f6Schristos   puts(_("defaulted to option with optional arg"));
6492b3787f6Schristos #line 76 "../alias.c"
6502b3787f6Schristos   puts(_("aliasing option is out of range."));
6512b3787f6Schristos #line 234 "../enum.c"
6522b3787f6Schristos   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
6532b3787f6Schristos #line 108 "../find.c"
6542b3787f6Schristos   puts(_("  The following options match:\n"));
6552b3787f6Schristos #line 293 "../find.c"
6562b3787f6Schristos   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
6572b3787f6Schristos #line 161 "../check.c"
6582b3787f6Schristos   puts(_("%s: Command line arguments required\n"));
6592b3787f6Schristos #line 43 "../alias.c"
6602b3787f6Schristos   puts(_("%d %s%s options allowed\n"));
6614e3b3909Schristos #line 94 "../makeshell.c"
6622b3787f6Schristos   puts(_("%s error %d (%s) calling %s for '%s'\n"));
6634e3b3909Schristos #line 306 "../makeshell.c"
6642b3787f6Schristos   puts(_("interprocess pipe"));
6652b3787f6Schristos #line 168 "../version.c"
6662b3787f6Schristos   puts(_("error: version option argument '%c' invalid.  Use:\n"
6672b3787f6Schristos        "\t'v' - version only\n"
6682b3787f6Schristos        "\t'c' - version and copyright\n"
6692b3787f6Schristos        "\t'n' - version and full copyright notice\n"));
6702b3787f6Schristos #line 58 "../check.c"
6712b3787f6Schristos   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
6722b3787f6Schristos #line 217 "../find.c"
6732b3787f6Schristos   puts(_("%s: The '%s' option has been disabled."));
6742b3787f6Schristos #line 430 "../find.c"
6752b3787f6Schristos   puts(_("%s: The '%s' option has been disabled."));
6762b3787f6Schristos #line 38 "../alias.c"
6772b3787f6Schristos   puts(_("-equivalence"));
6782b3787f6Schristos #line 469 "../find.c"
6792b3787f6Schristos   puts(_("%s: illegal option -- %c\n"));
6802b3787f6Schristos #line 110 "../reset.c"
6812b3787f6Schristos   puts(_("%s: illegal option -- %c\n"));
6822b3787f6Schristos #line 271 "../find.c"
6832b3787f6Schristos   puts(_("%s: illegal option -- %s\n"));
6842b3787f6Schristos #line 755 "../find.c"
6852b3787f6Schristos   puts(_("%s: illegal option -- %s\n"));
6862b3787f6Schristos #line 118 "../reset.c"
6872b3787f6Schristos   puts(_("%s: illegal option -- %s\n"));
6882b3787f6Schristos #line 335 "../find.c"
6892b3787f6Schristos   puts(_("%s: unknown vendor extension option -- %s\n"));
6902b3787f6Schristos #line 159 "../enum.c"
6912b3787f6Schristos   puts(_("  or an integer from %d through %d\n"));
6922b3787f6Schristos #line 169 "../enum.c"
6932b3787f6Schristos   puts(_("  or an integer from %d through %d\n"));
6942b3787f6Schristos #line 747 "../usage.c"
6952b3787f6Schristos   puts(_("%s error:  invalid option descriptor for %s\n"));
6962b3787f6Schristos #line 1081 "../usage.c"
6972b3787f6Schristos   puts(_("%s error:  invalid option descriptor for %s\n"));
6982b3787f6Schristos #line 385 "../find.c"
6992b3787f6Schristos   puts(_("%s: invalid option name: %s\n"));
7002b3787f6Schristos #line 527 "../find.c"
7012b3787f6Schristos   puts(_("%s: The '%s' option requires an argument.\n"));
7022b3787f6Schristos #line 156 "../autoopts.c"
7032b3787f6Schristos   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
7042b3787f6Schristos        "\t'%s' and '%s'."));
7052b3787f6Schristos #line 94 "../check.c"
7062b3787f6Schristos   puts(_("%s error:  The %s option is required\n"));
7072b3787f6Schristos #line 632 "../find.c"
7082b3787f6Schristos   puts(_("%s: The '%s' option cannot have an argument.\n"));
7092b3787f6Schristos #line 151 "../check.c"
7102b3787f6Schristos   puts(_("%s: Command line arguments are not allowed.\n"));
7112b3787f6Schristos #line 535 "../save.c"
7122b3787f6Schristos   puts(_("error %d (%s) creating %s\n"));
7132b3787f6Schristos #line 234 "../enum.c"
7142b3787f6Schristos   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
7152b3787f6Schristos #line 93 "../reset.c"
7162b3787f6Schristos   puts(_("%s error: The '%s' option requires an argument.\n"));
7172b3787f6Schristos #line 184 "../save.c"
7182b3787f6Schristos   puts(_("error %d (%s) stat-ing %s\n"));
7192b3787f6Schristos #line 238 "../save.c"
7202b3787f6Schristos   puts(_("error %d (%s) stat-ing %s\n"));
7212b3787f6Schristos #line 143 "../restore.c"
7222b3787f6Schristos   puts(_("%s error: no saved option state\n"));
7232b3787f6Schristos #line 231 "../autoopts.c"
7242b3787f6Schristos   puts(_("'%s' is not a command line option.\n"));
7251b6f2cd4Schristos #line 111 "../time.c"
7262b3787f6Schristos   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
7272b3787f6Schristos #line 132 "../save.c"
7282b3787f6Schristos   puts(_("'%s' not defined\n"));
7291b6f2cd4Schristos #line 50 "../time.c"
7302b3787f6Schristos   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
7312b3787f6Schristos #line 92 "../check.c"
7322b3787f6Schristos   puts(_("%s error:  The %s option must appear %d times.\n"));
7331b6f2cd4Schristos #line 164 "../numeric.c"
7342b3787f6Schristos   puts(_("%s error:  '%s' is not a recognizable number.\n"));
7352b3787f6Schristos #line 200 "../enum.c"
7362b3787f6Schristos   puts(_("%s error:  %s exceeds %s keyword count\n"));
7372b3787f6Schristos #line 330 "../usage.c"
7382b3787f6Schristos   puts(_("Try '%s %s' for more information.\n"));
7392b3787f6Schristos #line 45 "../alias.c"
7402b3787f6Schristos   puts(_("one %s%s option allowed\n"));
7414e3b3909Schristos #line 208 "../makeshell.c"
7422b3787f6Schristos   puts(_("standard output"));
7434e3b3909Schristos #line 943 "../makeshell.c"
7442b3787f6Schristos   puts(_("standard output"));
7452b3787f6Schristos #line 274 "../usage.c"
7462b3787f6Schristos   puts(_("standard output"));
7472b3787f6Schristos #line 415 "../usage.c"
7482b3787f6Schristos   puts(_("standard output"));
7492b3787f6Schristos #line 625 "../usage.c"
7502b3787f6Schristos   puts(_("standard output"));
7512b3787f6Schristos #line 175 "../version.c"
7522b3787f6Schristos   puts(_("standard output"));
7532b3787f6Schristos #line 274 "../usage.c"
7542b3787f6Schristos   puts(_("standard error"));
7552b3787f6Schristos #line 415 "../usage.c"
7562b3787f6Schristos   puts(_("standard error"));
7572b3787f6Schristos #line 625 "../usage.c"
7582b3787f6Schristos   puts(_("standard error"));
7592b3787f6Schristos #line 175 "../version.c"
7602b3787f6Schristos   puts(_("standard error"));
7614e3b3909Schristos #line 208 "../makeshell.c"
7622b3787f6Schristos   puts(_("write"));
7634e3b3909Schristos #line 943 "../makeshell.c"
7642b3787f6Schristos   puts(_("write"));
7652b3787f6Schristos #line 273 "../usage.c"
7662b3787f6Schristos   puts(_("write"));
7672b3787f6Schristos #line 414 "../usage.c"
7682b3787f6Schristos   puts(_("write"));
7692b3787f6Schristos #line 624 "../usage.c"
7702b3787f6Schristos   puts(_("write"));
7712b3787f6Schristos #line 174 "../version.c"
7722b3787f6Schristos   puts(_("write"));
7732b3787f6Schristos #line 60 "../numeric.c"
7742b3787f6Schristos   puts(_("%s error:  %s option value %ld is out of range.\n"));
7752b3787f6Schristos #line 44 "../check.c"
7762b3787f6Schristos   puts(_("%s error:  %s option requires the %s option\n"));
7772b3787f6Schristos #line 131 "../save.c"
7782b3787f6Schristos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
7792b3787f6Schristos #line 183 "../save.c"
7802b3787f6Schristos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
7812b3787f6Schristos #line 237 "../save.c"
7822b3787f6Schristos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
7832b3787f6Schristos #line 256 "../save.c"
7842b3787f6Schristos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
7852b3787f6Schristos #line 534 "../save.c"
7862b3787f6Schristos   puts(_("%s warning:  cannot save options - %s not regular file\n"));
7872b3787f6Schristos   /* END-LIBOPTS-MESSAGES */
7882b3787f6Schristos 
7892b3787f6Schristos   /* USAGE-TEXT: */
7902b3787f6Schristos #line 873 "../usage.c"
7912b3787f6Schristos   puts(_("\t\t\t\t- an alternate for '%s'\n"));
7922b3787f6Schristos #line 1148 "../usage.c"
7932b3787f6Schristos   puts(_("Version, usage and configuration options:"));
7942b3787f6Schristos #line 924 "../usage.c"
7952b3787f6Schristos   puts(_("\t\t\t\t- default option for unnamed options\n"));
7962b3787f6Schristos #line 837 "../usage.c"
7972b3787f6Schristos   puts(_("\t\t\t\t- disabled as '--%s'\n"));
7982b3787f6Schristos #line 1117 "../usage.c"
7992b3787f6Schristos   puts(_(" --- %-14s %s\n"));
8002b3787f6Schristos #line 1115 "../usage.c"
8012b3787f6Schristos   puts(_("This option has been disabled"));
8022b3787f6Schristos #line 864 "../usage.c"
8032b3787f6Schristos   puts(_("\t\t\t\t- enabled by default\n"));
8042b3787f6Schristos #line 40 "../alias.c"
8052b3787f6Schristos   puts(_("%s error:  only "));
8062b3787f6Schristos #line 1194 "../usage.c"
8072b3787f6Schristos   puts(_(" - examining environment variables named %s_*\n"));
8082b3787f6Schristos #line 168 "../file.c"
8092b3787f6Schristos   puts(_("\t\t\t\t- file must not pre-exist\n"));
8102b3787f6Schristos #line 172 "../file.c"
8112b3787f6Schristos   puts(_("\t\t\t\t- file must pre-exist\n"));
8122b3787f6Schristos #line 380 "../usage.c"
8132b3787f6Schristos   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
8142b3787f6Schristos        "hyphen and the flag character.\n"));
8154e3b3909Schristos #line 921 "../makeshell.c"
8162b3787f6Schristos   puts(_("\n"
8172b3787f6Schristos        "= = = = = = = =\n\n"
8182b3787f6Schristos        "This incarnation of genshell will produce\n"
8192b3787f6Schristos        "a shell script to parse the options for %s:\n\n"));
8202b3787f6Schristos #line 166 "../enum.c"
8212b3787f6Schristos   puts(_("  or an integer mask with any of the lower %d bits set\n"));
8222b3787f6Schristos #line 897 "../usage.c"
8232b3787f6Schristos   puts(_("\t\t\t\t- is a set membership option\n"));
8242b3787f6Schristos #line 918 "../usage.c"
8252b3787f6Schristos   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
8262b3787f6Schristos #line 382 "../usage.c"
8272b3787f6Schristos   puts(_("Options are specified by single or double hyphens and their name.\n"));
8282b3787f6Schristos #line 904 "../usage.c"
8292b3787f6Schristos   puts(_("\t\t\t\t- may appear multiple times\n"));
8302b3787f6Schristos #line 891 "../usage.c"
8312b3787f6Schristos   puts(_("\t\t\t\t- may not be preset\n"));
8322b3787f6Schristos #line 1309 "../usage.c"
8332b3787f6Schristos   puts(_("   Arg Option-Name    Description\n"));
8342b3787f6Schristos #line 1245 "../usage.c"
8352b3787f6Schristos   puts(_("  Flg Arg Option-Name    Description\n"));
8362b3787f6Schristos #line 1303 "../usage.c"
8372b3787f6Schristos   puts(_("  Flg Arg Option-Name    Description\n"));
8382b3787f6Schristos #line 1304 "../usage.c"
8392b3787f6Schristos   puts(_(" %3s %s"));
8402b3787f6Schristos #line 1310 "../usage.c"
8412b3787f6Schristos   puts(_(" %3s %s"));
8422b3787f6Schristos #line 387 "../usage.c"
8432b3787f6Schristos   puts(_("The '-#<number>' option may omit the hash char\n"));
8442b3787f6Schristos #line 383 "../usage.c"
8452b3787f6Schristos   puts(_("All arguments are named options.\n"));
8462b3787f6Schristos #line 971 "../usage.c"
8472b3787f6Schristos   puts(_(" - reading file %s"));
8482b3787f6Schristos #line 409 "../usage.c"
8492b3787f6Schristos   puts(_("\n"
8502b3787f6Schristos        "Please send bug reports to:  <%s>\n"));
8512b3787f6Schristos #line 100 "../version.c"
8522b3787f6Schristos   puts(_("\n"
8532b3787f6Schristos        "Please send bug reports to:  <%s>\n"));
8542b3787f6Schristos #line 129 "../version.c"
8552b3787f6Schristos   puts(_("\n"
8562b3787f6Schristos        "Please send bug reports to:  <%s>\n"));
8572b3787f6Schristos #line 903 "../usage.c"
8582b3787f6Schristos   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
8592b3787f6Schristos #line 944 "../usage.c"
8602b3787f6Schristos   puts(_("\n"
8612b3787f6Schristos        "The following option preset mechanisms are supported:\n"));
8622b3787f6Schristos #line 1192 "../usage.c"
8632b3787f6Schristos   puts(_("\n"
8642b3787f6Schristos        "The following option preset mechanisms are supported:\n"));
8652b3787f6Schristos #line 682 "../usage.c"
8662b3787f6Schristos   puts(_("prohibits these options:\n"));
8672b3787f6Schristos #line 677 "../usage.c"
8682b3787f6Schristos   puts(_("prohibits the option '%s'\n"));
8692b3787f6Schristos #line 81 "../numeric.c"
8702b3787f6Schristos   puts(_("%s%ld to %ld"));
8712b3787f6Schristos #line 79 "../numeric.c"
8722b3787f6Schristos   puts(_("%sgreater than or equal to %ld"));
8732b3787f6Schristos #line 75 "../numeric.c"
8742b3787f6Schristos   puts(_("%s%ld exactly"));
8752b3787f6Schristos #line 68 "../numeric.c"
8762b3787f6Schristos   puts(_("%sit must lie in one of the ranges:\n"));
8772b3787f6Schristos #line 68 "../numeric.c"
8782b3787f6Schristos   puts(_("%sit must be in the range:\n"));
8792b3787f6Schristos #line 88 "../numeric.c"
8802b3787f6Schristos   puts(_(", or\n"));
8812b3787f6Schristos #line 66 "../numeric.c"
8822b3787f6Schristos   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
8832b3787f6Schristos #line 77 "../numeric.c"
8842b3787f6Schristos   puts(_("%sless than or equal to %ld"));
8852b3787f6Schristos #line 390 "../usage.c"
8862b3787f6Schristos   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
8872b3787f6Schristos #line 652 "../usage.c"
8882b3787f6Schristos   puts(_("requires the option '%s'\n"));
8892b3787f6Schristos #line 655 "../usage.c"
8902b3787f6Schristos   puts(_("requires these options:\n"));
8912b3787f6Schristos #line 1321 "../usage.c"
8922b3787f6Schristos   puts(_("   Arg Option-Name   Req?  Description\n"));
8932b3787f6Schristos #line 1315 "../usage.c"
8942b3787f6Schristos   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
8952b3787f6Schristos #line 167 "../enum.c"
8962b3787f6Schristos   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
8972b3787f6Schristos        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
8982b3787f6Schristos        "will set them all.  Multiple entries may be passed as an option\n"
8992b3787f6Schristos        "argument list.\n"));
9002b3787f6Schristos #line 910 "../usage.c"
9012b3787f6Schristos   puts(_("\t\t\t\t- may appear up to %d times\n"));
9022b3787f6Schristos #line 77 "../enum.c"
9032b3787f6Schristos   puts(_("The valid \"%s\" option keywords are:\n"));
9042b3787f6Schristos #line 1152 "../usage.c"
9052b3787f6Schristos   puts(_("The next option supports vendor supported extra options:"));
9062b3787f6Schristos #line 773 "../usage.c"
9072b3787f6Schristos   puts(_("These additional options are:"));
9082b3787f6Schristos   /* END-USAGE-TEXT */
9092b3787f6Schristos }
9102b3787f6Schristos #endif /* uncompilable code */
911abb0f93cSkardel #ifdef  __cplusplus
912abb0f93cSkardel }
913abb0f93cSkardel #endif
914abb0f93cSkardel /* ntpsnmpd-opts.c ends here */
915