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