xref: /freebsd/contrib/ntp/ntpq/ntpq-opts.c (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1 /*
2  *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
3  *
4  *  It has been AutoGen-ed  May 25, 2024 at 12:04:21 AM by AutoGen 5.18.16
5  *  From the definitions    ntpq-opts.def
6  *  and the template file   options
7  *
8  * Generated from AutoOpts 42:1:17 templates.
9  *
10  *  AutoOpts is a copyrighted work.  This source file is not encumbered
11  *  by AutoOpts licensing, but is provided under the licensing terms chosen
12  *  by the ntpq author or copyright holder.  AutoOpts is
13  *  licensed under the terms of the LGPL.  The redistributable library
14  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
15  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
16  *  for details.
17  *
18  * The ntpq program is copyrighted and licensed
19  * under the following terms:
20  *
21  *  Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.
22  *  This is free software. It is licensed for use, modification and
23  *  redistribution under the terms of the NTP License, copies of which
24  *  can be seen at:
25  *    <http://ntp.org/license>
26  *    <http://opensource.org/licenses/ntp-license.php>
27  *
28  *  Permission to use, copy, modify, and distribute this software and its
29  *  documentation for any purpose with or without fee is hereby granted,
30  *  provided that the above copyright notice appears in all copies and that
31  *  both the copyright notice and this permission notice appear in
32  *  supporting documentation, and that the name The University of Delaware not be used in
33  *  advertising or publicity pertaining to distribution of the software
34  *  without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
35  *  representations about the suitability this software for any purpose. It
36  *  is provided "as is" without express or implied warranty.
37  */
38 
39 #ifndef __doxygen__
40 #define OPTION_CODE_COMPILE 1
41 #include "ntpq-opts.h"
42 #include <sys/types.h>
43 #include <sys/stat.h>
44 
45 #include <errno.h>
46 #include <fcntl.h>
47 #include <limits.h>
48 #include <stdio.h>
49 #include <stdlib.h>
50 #include <string.h>
51 #include <unistd.h>
52 
53 #ifdef  __cplusplus
54 extern "C" {
55 #endif
56 extern FILE * option_usage_fp;
57 #define zCopyright      (ntpq_opt_strs+0)
58 #define zLicenseDescrip (ntpq_opt_strs+341)
59 
60 /*
61  *  global included definitions
62  */
63 #ifdef __windows
64   extern int atoi(const char*);
65 #else
66 # include <stdlib.h>
67 #endif
68 
69 #ifndef NULL
70 #  define NULL 0
71 #endif
72 
73 /**
74  *  static const strings for ntpq options
75  */
76 static char const ntpq_opt_strs[2068] =
77 /*     0 */ "ntpq 4.2.8p18\n"
78             "Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n"
79             "This is free software. It is licensed for use, modification and\n"
80             "redistribution under the terms of the NTP License, copies of which\n"
81             "can be seen at:\n"
82             "  <http://ntp.org/license>\n"
83             "  <http://opensource.org/licenses/ntp-license.php>\n\0"
84 /*   341 */ "Permission to use, copy, modify, and distribute this software and its\n"
85             "documentation for any purpose with or without fee is hereby granted,\n"
86             "provided that the above copyright notice appears in all copies and that\n"
87             "both the copyright notice and this permission notice appear in supporting\n"
88             "documentation, and that the name The University of Delaware not be used in\n"
89             "advertising or publicity pertaining to distribution of the software without\n"
90             "specific, written prior permission.  The University of Delaware and Network\n"
91             "Time Foundation makes no representations about the suitability this\n"
92             "software for any purpose.  It is provided \"as is\" without express or\n"
93             "implied warranty.\n\0"
94 /*  1009 */ "Force IPv4 name resolution\0"
95 /*  1036 */ "IPV4\0"
96 /*  1041 */ "ipv4\0"
97 /*  1046 */ "Force IPv6 name resolution\0"
98 /*  1073 */ "IPV6\0"
99 /*  1078 */ "ipv6\0"
100 /*  1083 */ "run a command and exit\0"
101 /*  1106 */ "COMMAND\0"
102 /*  1114 */ "command\0"
103 /*  1122 */ "Increase debug verbosity level\0"
104 /*  1153 */ "DEBUG_LEVEL\0"
105 /*  1165 */ "debug-level\0"
106 /*  1177 */ "Set the debug verbosity level\0"
107 /*  1207 */ "SET_DEBUG_LEVEL\0"
108 /*  1223 */ "set-debug-level\0"
109 /*  1239 */ "Force ntpq to operate in interactive mode\0"
110 /*  1281 */ "INTERACTIVE\0"
111 /*  1293 */ "interactive\0"
112 /*  1305 */ "numeric host addresses\0"
113 /*  1328 */ "NUMERIC\0"
114 /*  1336 */ "numeric\0"
115 /*  1344 */ "Always output status line with readvar\0"
116 /*  1383 */ "OLD_RV\0"
117 /*  1390 */ "old-rv\0"
118 /*  1397 */ "Print a list of the peers\0"
119 /*  1423 */ "PEERS\0"
120 /*  1429 */ "peers\0"
121 /*  1435 */ "Set default display type for S2+ refids\0"
122 /*  1475 */ "REFID\0"
123 /*  1481 */ "refid\0"
124 /*  1487 */ "Use unconnected UDP to communicate with ntpd (default on Windows)\0"
125 /*  1553 */ "UNCONNECTED\0"
126 /*  1565 */ "unconnected\0"
127 /*  1577 */ "Display the full 'remote' value\0"
128 /*  1609 */ "WIDE\0"
129 /*  1614 */ "wide\0"
130 /*  1619 */ "display extended usage information and exit\0"
131 /*  1663 */ "help\0"
132 /*  1668 */ "extended usage information passed thru pager\0"
133 /*  1713 */ "more-help\0"
134 /*  1723 */ "output version information and exit\0"
135 /*  1759 */ "version\0"
136 /*  1767 */ "save the option state to a config file\0"
137 /*  1806 */ "save-opts\0"
138 /*  1816 */ "load options from a config file\0"
139 /*  1848 */ "LOAD_OPTS\0"
140 /*  1858 */ "no-load-opts\0"
141 /*  1871 */ "no\0"
142 /*  1874 */ "NTPQ\0"
143 /*  1879 */ "ntpq - standard NTP query program - Ver. 4.2.8p18\n"
144             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
145 /*  1999 */ "$HOME\0"
146 /*  2005 */ ".\0"
147 /*  2007 */ ".ntprc\0"
148 /*  2014 */ "https://bugs.ntp.org, bugs@ntp.org\0"
149 /*  2049 */ "ntpq 4.2.8p18\0"
150 /*  2063 */ "hash";
151 
152 /**
153  *  ipv4 option description with
154  *  "Must also have options" and "Incompatible options":
155  */
156 /** Descriptive text for the ipv4 option */
157 #define IPV4_DESC      (ntpq_opt_strs+1009)
158 /** Upper-cased name for the ipv4 option */
159 #define IPV4_NAME      (ntpq_opt_strs+1036)
160 /** Name string for the ipv4 option */
161 #define IPV4_name      (ntpq_opt_strs+1041)
162 /** Other options that appear in conjunction with the ipv4 option */
163 static int const aIpv4CantList[] = {
164     INDEX_OPT_IPV6, NO_EQUIVALENT };
165 /** Compiled in flag settings for the ipv4 option */
166 #define IPV4_FLAGS     (OPTST_DISABLED)
167 
168 /**
169  *  ipv6 option description with
170  *  "Must also have options" and "Incompatible options":
171  */
172 /** Descriptive text for the ipv6 option */
173 #define IPV6_DESC      (ntpq_opt_strs+1046)
174 /** Upper-cased name for the ipv6 option */
175 #define IPV6_NAME      (ntpq_opt_strs+1073)
176 /** Name string for the ipv6 option */
177 #define IPV6_name      (ntpq_opt_strs+1078)
178 /** Other options that appear in conjunction with the ipv6 option */
179 static int const aIpv6CantList[] = {
180     INDEX_OPT_IPV4, NO_EQUIVALENT };
181 /** Compiled in flag settings for the ipv6 option */
182 #define IPV6_FLAGS     (OPTST_DISABLED)
183 
184 /**
185  *  command option description:
186  */
187 /** Descriptive text for the command option */
188 #define COMMAND_DESC      (ntpq_opt_strs+1083)
189 /** Upper-cased name for the command option */
190 #define COMMAND_NAME      (ntpq_opt_strs+1106)
191 /** Name string for the command option */
192 #define COMMAND_name      (ntpq_opt_strs+1114)
193 /** Compiled in flag settings for the command option */
194 #define COMMAND_FLAGS     (OPTST_DISABLED \
195         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
196 
197 /**
198  *  debug-level option description:
199  */
200 /** Descriptive text for the debug-level option */
201 #define DEBUG_LEVEL_DESC      (ntpq_opt_strs+1122)
202 /** Upper-cased name for the debug-level option */
203 #define DEBUG_LEVEL_NAME      (ntpq_opt_strs+1153)
204 /** Name string for the debug-level option */
205 #define DEBUG_LEVEL_name      (ntpq_opt_strs+1165)
206 /** Compiled in flag settings for the debug-level option */
207 #define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
208 
209 /**
210  *  set-debug-level option description:
211  */
212 /** Descriptive text for the set-debug-level option */
213 #define SET_DEBUG_LEVEL_DESC      (ntpq_opt_strs+1177)
214 /** Upper-cased name for the set-debug-level option */
215 #define SET_DEBUG_LEVEL_NAME      (ntpq_opt_strs+1207)
216 /** Name string for the set-debug-level option */
217 #define SET_DEBUG_LEVEL_name      (ntpq_opt_strs+1223)
218 /** Compiled in flag settings for the set-debug-level option */
219 #define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
220         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
221 
222 /**
223  *  interactive option description with
224  *  "Must also have options" and "Incompatible options":
225  */
226 /** Descriptive text for the interactive option */
227 #define INTERACTIVE_DESC      (ntpq_opt_strs+1239)
228 /** Upper-cased name for the interactive option */
229 #define INTERACTIVE_NAME      (ntpq_opt_strs+1281)
230 /** Name string for the interactive option */
231 #define INTERACTIVE_name      (ntpq_opt_strs+1293)
232 /** Other options that appear in conjunction with the interactive option */
233 static int const aInteractiveCantList[] = {
234     INDEX_OPT_COMMAND,
235     INDEX_OPT_PEERS, NO_EQUIVALENT };
236 /** Compiled in flag settings for the interactive option */
237 #define INTERACTIVE_FLAGS     (OPTST_DISABLED)
238 
239 /**
240  *  numeric option description:
241  */
242 /** Descriptive text for the numeric option */
243 #define NUMERIC_DESC      (ntpq_opt_strs+1305)
244 /** Upper-cased name for the numeric option */
245 #define NUMERIC_NAME      (ntpq_opt_strs+1328)
246 /** Name string for the numeric option */
247 #define NUMERIC_name      (ntpq_opt_strs+1336)
248 /** Compiled in flag settings for the numeric option */
249 #define NUMERIC_FLAGS     (OPTST_DISABLED)
250 
251 /**
252  *  old-rv option description:
253  */
254 /** Descriptive text for the old-rv option */
255 #define OLD_RV_DESC      (ntpq_opt_strs+1344)
256 /** Upper-cased name for the old-rv option */
257 #define OLD_RV_NAME      (ntpq_opt_strs+1383)
258 /** Name string for the old-rv option */
259 #define OLD_RV_name      (ntpq_opt_strs+1390)
260 /** Compiled in flag settings for the old-rv option */
261 #define OLD_RV_FLAGS     (OPTST_DISABLED)
262 
263 /**
264  *  peers option description with
265  *  "Must also have options" and "Incompatible options":
266  */
267 /** Descriptive text for the peers option */
268 #define PEERS_DESC      (ntpq_opt_strs+1397)
269 /** Upper-cased name for the peers option */
270 #define PEERS_NAME      (ntpq_opt_strs+1423)
271 /** Name string for the peers option */
272 #define PEERS_name      (ntpq_opt_strs+1429)
273 /** Other options that appear in conjunction with the peers option */
274 static int const aPeersCantList[] = {
275     INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
276 /** Compiled in flag settings for the peers option */
277 #define PEERS_FLAGS     (OPTST_DISABLED)
278 
279 /**
280  *  refid option description:
281  */
282 /** Descriptive text for the refid option */
283 #define REFID_DESC      (ntpq_opt_strs+1435)
284 /** Upper-cased name for the refid option */
285 #define REFID_NAME      (ntpq_opt_strs+1475)
286 /** Name string for the refid option */
287 #define REFID_name      (ntpq_opt_strs+1481)
288 /** The compiled in default value for the refid option argument */
289 #define REFID_DFT_ARG   ((char const*)REFID_IPV4)
290 /** Compiled in flag settings for the refid option */
291 #define REFID_FLAGS     (OPTST_DISABLED \
292         | OPTST_SET_ARGTYPE(OPARG_TYPE_ENUMERATION))
293 
294 /**
295  *  unconnected option description:
296  */
297 /** Descriptive text for the unconnected option */
298 #define UNCONNECTED_DESC      (ntpq_opt_strs+1487)
299 /** Upper-cased name for the unconnected option */
300 #define UNCONNECTED_NAME      (ntpq_opt_strs+1553)
301 /** Name string for the unconnected option */
302 #define UNCONNECTED_name      (ntpq_opt_strs+1565)
303 /** Compiled in flag settings for the unconnected option */
304 #define UNCONNECTED_FLAGS     (OPTST_DISABLED)
305 
306 /**
307  *  wide option description:
308  */
309 /** Descriptive text for the wide option */
310 #define WIDE_DESC      (ntpq_opt_strs+1577)
311 /** Upper-cased name for the wide option */
312 #define WIDE_NAME      (ntpq_opt_strs+1609)
313 /** Name string for the wide option */
314 #define WIDE_name      (ntpq_opt_strs+1614)
315 /** Compiled in flag settings for the wide option */
316 #define WIDE_FLAGS     (OPTST_DISABLED)
317 
318 /*
319  *  Help/More_Help/Version option descriptions:
320  */
321 #define HELP_DESC       (ntpq_opt_strs+1619)
322 #define HELP_name       (ntpq_opt_strs+1663)
323 #ifdef HAVE_WORKING_FORK
324 #define MORE_HELP_DESC  (ntpq_opt_strs+1668)
325 #define MORE_HELP_name  (ntpq_opt_strs+1713)
326 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
327 #else
328 #define MORE_HELP_DESC  HELP_DESC
329 #define MORE_HELP_name  HELP_name
330 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
331 #endif
332 #ifdef NO_OPTIONAL_OPT_ARGS
333 #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
334 #else
335 #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
336                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
337 #endif
338 #define VER_DESC        (ntpq_opt_strs+1723)
339 #define VER_name        (ntpq_opt_strs+1759)
340 #define SAVE_OPTS_DESC  (ntpq_opt_strs+1767)
341 #define SAVE_OPTS_name  (ntpq_opt_strs+1806)
342 #define LOAD_OPTS_DESC     (ntpq_opt_strs+1816)
343 #define LOAD_OPTS_NAME     (ntpq_opt_strs+1848)
344 #define NO_LOAD_OPTS_name  (ntpq_opt_strs+1858)
345 #define LOAD_OPTS_pfx      (ntpq_opt_strs+1871)
346 #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
347 /**
348  *  Declare option callback procedures
349  */
350 extern tOptProc
351     ntpOptionPrintVersion,   ntpq_custom_opt_handler, optionBooleanVal,
352     optionNestedVal,         optionNumericVal,        optionPagedUsage,
353     optionResetOpt,          optionStackArg,          optionTimeDate,
354     optionTimeVal,           optionUnstackArg,        optionVendorOption;
355 static tOptProc
356     doOptDebug_Level, doOptRefid, doUsageOpt;
357 #define VER_PROC        ntpOptionPrintVersion
358 
359 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
360 /**
361  *  Define the ntpq Option Descriptions.
362  * This is an array of OPTION_CT entries, one for each
363  * option that the ntpq program responds to.
364  */
365 static tOptDesc optDesc[OPTION_CT] = {
366   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
367      /* equiv idx, value */ 0, VALUE_OPT_IPV4,
368      /* equivalenced to  */ NO_EQUIVALENT,
369      /* min, max, act ct */ 0, 1, 0,
370      /* opt state flags  */ IPV4_FLAGS, 0,
371      /* last opt argumnt */ { NULL }, /* --ipv4 */
372      /* arg list/cookie  */ NULL,
373      /* must/cannot opts */ NULL, aIpv4CantList,
374      /* option proc      */ NULL,
375      /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
376      /* disablement strs */ NULL, NULL },
377 
378   {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
379      /* equiv idx, value */ 1, VALUE_OPT_IPV6,
380      /* equivalenced to  */ NO_EQUIVALENT,
381      /* min, max, act ct */ 0, 1, 0,
382      /* opt state flags  */ IPV6_FLAGS, 0,
383      /* last opt argumnt */ { NULL }, /* --ipv6 */
384      /* arg list/cookie  */ NULL,
385      /* must/cannot opts */ NULL, aIpv6CantList,
386      /* option proc      */ NULL,
387      /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
388      /* disablement strs */ NULL, NULL },
389 
390   {  /* entry idx, value */ 2, VALUE_OPT_COMMAND,
391      /* equiv idx, value */ 2, VALUE_OPT_COMMAND,
392      /* equivalenced to  */ NO_EQUIVALENT,
393      /* min, max, act ct */ 0, NOLIMIT, 0,
394      /* opt state flags  */ COMMAND_FLAGS, 0,
395      /* last opt argumnt */ { NULL }, /* --command */
396      /* arg list/cookie  */ NULL,
397      /* must/cannot opts */ NULL, NULL,
398      /* option proc      */ ntpq_custom_opt_handler,
399      /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name,
400      /* disablement strs */ NULL, NULL },
401 
402   {  /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
403      /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
404      /* equivalenced to  */ NO_EQUIVALENT,
405      /* min, max, act ct */ 0, NOLIMIT, 0,
406      /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
407      /* last opt argumnt */ { NULL }, /* --debug-level */
408      /* arg list/cookie  */ NULL,
409      /* must/cannot opts */ NULL, NULL,
410      /* option proc      */ doOptDebug_Level,
411      /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
412      /* disablement strs */ NULL, NULL },
413 
414   {  /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
415      /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
416      /* equivalenced to  */ NO_EQUIVALENT,
417      /* min, max, act ct */ 0, NOLIMIT, 0,
418      /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
419      /* last opt argumnt */ { NULL }, /* --set-debug-level */
420      /* arg list/cookie  */ NULL,
421      /* must/cannot opts */ NULL, NULL,
422      /* option proc      */ optionNumericVal,
423      /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
424      /* disablement strs */ NULL, NULL },
425 
426   {  /* entry idx, value */ 5, VALUE_OPT_INTERACTIVE,
427      /* equiv idx, value */ 5, VALUE_OPT_INTERACTIVE,
428      /* equivalenced to  */ NO_EQUIVALENT,
429      /* min, max, act ct */ 0, 1, 0,
430      /* opt state flags  */ INTERACTIVE_FLAGS, 0,
431      /* last opt argumnt */ { NULL }, /* --interactive */
432      /* arg list/cookie  */ NULL,
433      /* must/cannot opts */ NULL, aInteractiveCantList,
434      /* option proc      */ NULL,
435      /* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name,
436      /* disablement strs */ NULL, NULL },
437 
438   {  /* entry idx, value */ 6, VALUE_OPT_NUMERIC,
439      /* equiv idx, value */ 6, VALUE_OPT_NUMERIC,
440      /* equivalenced to  */ NO_EQUIVALENT,
441      /* min, max, act ct */ 0, 1, 0,
442      /* opt state flags  */ NUMERIC_FLAGS, 0,
443      /* last opt argumnt */ { NULL }, /* --numeric */
444      /* arg list/cookie  */ NULL,
445      /* must/cannot opts */ NULL, NULL,
446      /* option proc      */ NULL,
447      /* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name,
448      /* disablement strs */ NULL, NULL },
449 
450   {  /* entry idx, value */ 7, VALUE_OPT_OLD_RV,
451      /* equiv idx, value */ 7, VALUE_OPT_OLD_RV,
452      /* equivalenced to  */ NO_EQUIVALENT,
453      /* min, max, act ct */ 0, 1, 0,
454      /* opt state flags  */ OLD_RV_FLAGS, 0,
455      /* last opt argumnt */ { NULL }, /* --old-rv */
456      /* arg list/cookie  */ NULL,
457      /* must/cannot opts */ NULL, NULL,
458      /* option proc      */ NULL,
459      /* desc, NAME, name */ OLD_RV_DESC, OLD_RV_NAME, OLD_RV_name,
460      /* disablement strs */ NULL, NULL },
461 
462   {  /* entry idx, value */ 8, VALUE_OPT_PEERS,
463      /* equiv idx, value */ 8, VALUE_OPT_PEERS,
464      /* equivalenced to  */ NO_EQUIVALENT,
465      /* min, max, act ct */ 0, 1, 0,
466      /* opt state flags  */ PEERS_FLAGS, 0,
467      /* last opt argumnt */ { NULL }, /* --peers */
468      /* arg list/cookie  */ NULL,
469      /* must/cannot opts */ NULL, aPeersCantList,
470      /* option proc      */ ntpq_custom_opt_handler,
471      /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
472      /* disablement strs */ NULL, NULL },
473 
474   {  /* entry idx, value */ 9, VALUE_OPT_REFID,
475      /* equiv idx, value */ 9, VALUE_OPT_REFID,
476      /* equivalenced to  */ NO_EQUIVALENT,
477      /* min, max, act ct */ 0, 1, 0,
478      /* opt state flags  */ REFID_FLAGS, 0,
479      /* last opt argumnt */ { REFID_DFT_ARG },
480      /* arg list/cookie  */ NULL,
481      /* must/cannot opts */ NULL, NULL,
482      /* option proc      */ doOptRefid,
483      /* desc, NAME, name */ REFID_DESC, REFID_NAME, REFID_name,
484      /* disablement strs */ NULL, NULL },
485 
486   {  /* entry idx, value */ 10, VALUE_OPT_UNCONNECTED,
487      /* equiv idx, value */ 10, VALUE_OPT_UNCONNECTED,
488      /* equivalenced to  */ NO_EQUIVALENT,
489      /* min, max, act ct */ 0, 1, 0,
490      /* opt state flags  */ UNCONNECTED_FLAGS, 0,
491      /* last opt argumnt */ { NULL }, /* --unconnected */
492      /* arg list/cookie  */ NULL,
493      /* must/cannot opts */ NULL, NULL,
494      /* option proc      */ NULL,
495      /* desc, NAME, name */ UNCONNECTED_DESC, UNCONNECTED_NAME, UNCONNECTED_name,
496      /* disablement strs */ NULL, NULL },
497 
498   {  /* entry idx, value */ 11, VALUE_OPT_WIDE,
499      /* equiv idx, value */ 11, VALUE_OPT_WIDE,
500      /* equivalenced to  */ NO_EQUIVALENT,
501      /* min, max, act ct */ 0, 1, 0,
502      /* opt state flags  */ WIDE_FLAGS, 0,
503      /* last opt argumnt */ { NULL }, /* --wide */
504      /* arg list/cookie  */ NULL,
505      /* must/cannot opts */ NULL, NULL,
506      /* option proc      */ NULL,
507      /* desc, NAME, name */ WIDE_DESC, WIDE_NAME, WIDE_name,
508      /* disablement strs */ NULL, NULL },
509 
510   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
511      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
512      /* equivalenced to  */ NO_EQUIVALENT,
513      /* min, max, act ct */ 0, 1, 0,
514      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
515      /* last opt argumnt */ { NULL },
516      /* arg list/cookie  */ NULL,
517      /* must/cannot opts */ NULL, NULL,
518      /* option proc      */ VER_PROC,
519      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
520      /* disablement strs */ NULL, NULL },
521 
522 
523 
524   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
525      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
526      /* equivalenced to  */ NO_EQUIVALENT,
527      /* min, max, act ct */ 0, 1, 0,
528      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
529      /* last opt argumnt */ { NULL },
530      /* arg list/cookie  */ NULL,
531      /* must/cannot opts */ NULL, NULL,
532      /* option proc      */ doUsageOpt,
533      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
534      /* disablement strs */ NULL, NULL },
535 
536   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
537      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
538      /* equivalenced to  */ NO_EQUIVALENT,
539      /* min, max, act ct */ 0, 1, 0,
540      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
541      /* last opt argumnt */ { NULL },
542      /* arg list/cookie  */ NULL,
543      /* must/cannot opts */ NULL,  NULL,
544      /* option proc      */ optionPagedUsage,
545      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
546      /* disablement strs */ NULL, NULL },
547 
548   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
549      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
550      /* equivalenced to  */ NO_EQUIVALENT,
551      /* min, max, act ct */ 0, 1, 0,
552      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
553                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
554      /* last opt argumnt */ { NULL },
555      /* arg list/cookie  */ NULL,
556      /* must/cannot opts */ NULL,  NULL,
557      /* option proc      */ NULL,
558      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
559      /* disablement strs */ NULL, NULL },
560 
561   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
562      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
563      /* equivalenced to  */ NO_EQUIVALENT,
564      /* min, max, act ct */ 0, NOLIMIT, 0,
565      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
566 			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
567      /* last opt argumnt */ { NULL },
568      /* arg list/cookie  */ NULL,
569      /* must/cannot opts */ NULL, NULL,
570      /* option proc      */ optionLoadOpt,
571      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
572      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
573 };
574 
575 
576 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
577 /** Reference to the upper cased version of ntpq. */
578 #define zPROGNAME       (ntpq_opt_strs+1874)
579 /** Reference to the title line for ntpq usage. */
580 #define zUsageTitle     (ntpq_opt_strs+1879)
581 /** ntpq configuration file name. */
582 #define zRcName         (ntpq_opt_strs+2007)
583 /** Directories to search for ntpq config files. */
584 static char const * const apzHomeList[3] = {
585     ntpq_opt_strs+1999,
586     ntpq_opt_strs+2005,
587     NULL };
588 /** The ntpq program bug email address. */
589 #define zBugsAddr       (ntpq_opt_strs+2014)
590 /** Clarification/explanation of what ntpq does. */
591 #define zExplain        (NULL)
592 /** Extra detail explaining what ntpq does. */
593 #define zDetail         (NULL)
594 /** The full version string for ntpq. */
595 #define zFullVersion    (ntpq_opt_strs+2049)
596 /* extracted from optcode.tlib near line 342 */
597 
598 #if defined(ENABLE_NLS)
599 # define OPTPROC_BASE OPTPROC_TRANSLATE
600   static tOptionXlateProc translate_option_strings;
601 #else
602 # define OPTPROC_BASE OPTPROC_NONE
603 # define translate_option_strings NULL
604 #endif /* ENABLE_NLS */
605 
606 #define ntpq_full_usage (NULL)
607 #define ntpq_short_usage (NULL)
608 
609 #endif /* not defined __doxygen__ */
610 
611 /*
612  *  Create the static procedure(s) declared above.
613  */
614 /**
615  * The callout function that invokes the optionUsage function.
616  *
617  * @param[in] opts the AutoOpts option description structure
618  * @param[in] od   the descriptor for the "help" (usage) option.
619  * @noreturn
620  */
621 static void
622 doUsageOpt(tOptions * opts, tOptDesc * od)
623 {
624     int ex_code;
625     ex_code = NTPQ_EXIT_SUCCESS;
626     optionUsage(&ntpqOptions, ex_code);
627     /* NOTREACHED */
628     exit(NTPQ_EXIT_FAILURE);
629     (void)opts;
630     (void)od;
631 }
632 
633 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
634 /**
635  * Code to handle the debug-level option.
636  *
637  * @param[in] pOptions the ntpq options data structure
638  * @param[in,out] pOptDesc the option descriptor for this option.
639  */
640 static void
641 doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
642 {
643     /*
644      * Be sure the flag-code[0] handles special values for the options pointer
645      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
646      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
647      * reset its state.
648      */
649     /* extracted from debug-opt.def, line 15 */
650 OPT_VALUE_SET_DEBUG_LEVEL++;
651     (void)pOptDesc;
652     (void)pOptions;
653 }
654 
655 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
656 /**
657  * Code to handle the refid option.
658  * Set the default display format for S2+ refids.
659  * @param[in] pOptions the ntpq options data structure
660  * @param[in,out] pOptDesc the option descriptor for this option.
661  */
662 static void
663 doOptRefid(tOptions* pOptions, tOptDesc* pOptDesc)
664 {
665 
666 /* extracted from optmain.tlib near line 945 */
667     static char const * const names[2] = {
668         ntpq_opt_strs+2063, ntpq_opt_strs+1041 };
669 
670     if (pOptions <= OPTPROC_EMIT_LIMIT) {
671         (void) optionEnumerationVal(pOptions, pOptDesc, names, 2);
672         return; /* protect AutoOpts client code from internal callbacks */
673     }
674 
675     pOptDesc->optArg.argEnum =
676         optionEnumerationVal(pOptions, pOptDesc, names, 2);
677 }
678 /* extracted from optmain.tlib near line 1250 */
679 
680 /**
681  * The directory containing the data associated with ntpq.
682  */
683 #ifndef  PKGDATADIR
684 # define PKGDATADIR ""
685 #endif
686 
687 /**
688  * Information about the person or institution that packaged ntpq
689  * for the current distribution.
690  */
691 #ifndef  WITH_PACKAGER
692 # define ntpq_packager_info NULL
693 #else
694 /** Packager information for ntpq. */
695 static char const ntpq_packager_info[] =
696     "Packaged by " WITH_PACKAGER
697 
698 # ifdef WITH_PACKAGER_VERSION
699         " ("WITH_PACKAGER_VERSION")"
700 # endif
701 
702 # ifdef WITH_PACKAGER_BUG_REPORTS
703     "\nReport ntpq bugs to " WITH_PACKAGER_BUG_REPORTS
704 # endif
705     "\n";
706 #endif
707 #ifndef __doxygen__
708 
709 #endif /* __doxygen__ */
710 /**
711  * The option definitions for ntpq.  The one structure that
712  * binds them all.
713  */
714 tOptions ntpqOptions = {
715     OPTIONS_STRUCT_VERSION,
716     0, NULL,                    /* original argc + argv    */
717     ( OPTPROC_BASE
718     + OPTPROC_ERRSTOP
719     + OPTPROC_SHORTOPT
720     + OPTPROC_LONGOPT
721     + OPTPROC_NO_REQ_OPT
722     + OPTPROC_ENVIRON
723     + OPTPROC_MISUSE ),
724     0, NULL,                    /* current option index, current option */
725     NULL,         NULL,         zPROGNAME,
726     zRcName,      zCopyright,   zLicenseDescrip,
727     zFullVersion, apzHomeList,  zUsageTitle,
728     zExplain,     zDetail,      optDesc,
729     zBugsAddr,                  /* address to send bugs to */
730     NULL, NULL,                 /* extensions/saved state  */
731     optionUsage, /* usage procedure */
732     translate_option_strings,   /* translation procedure */
733     /*
734      *  Indexes to special options
735      */
736     { INDEX_OPT_MORE_HELP, /* more-help option index */
737       INDEX_OPT_SAVE_OPTS, /* save option index */
738       NO_EQUIVALENT, /* '-#' option index */
739       NO_EQUIVALENT /* index of default opt */
740     },
741     17 /* full option count */, 12 /* user option count */,
742     ntpq_full_usage, ntpq_short_usage,
743     NULL, NULL,
744     PKGDATADIR, ntpq_packager_info
745 };
746 
747 #if ENABLE_NLS
748 /**
749  * This code is designed to translate translatable option text for the
750  * ntpq program.  These translations happen upon entry
751  * to optionProcess().
752  */
753 #include <stdio.h>
754 #include <stdlib.h>
755 #include <string.h>
756 #include <unistd.h>
757 #ifdef HAVE_DCGETTEXT
758 # include <gettext.h>
759 #endif
760 #include <autoopts/usage-txt.h>
761 
762 static char * AO_gettext(char const * pz);
763 static void   coerce_it(void ** s);
764 
765 /**
766  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
767  * to convert from English to the target language, then strdup-duplicates the
768  * result string.  It tries the "libopts" domain first, then whatever has been
769  * set via the \a textdomain(3) call.
770  *
771  * @param[in] pz the input text used as a lookup key.
772  * @returns the translated text (if there is one),
773  *   or the original text (if not).
774  */
775 static char *
776 AO_gettext(char const * pz)
777 {
778     char * res;
779     if (pz == NULL)
780         return NULL;
781 #ifdef HAVE_DCGETTEXT
782     /*
783      * While processing the option_xlateable_txt data, try to use the
784      * "libopts" domain.  Once we switch to the option descriptor data,
785      * do *not* use that domain.
786      */
787     if (option_xlateable_txt.field_ct != 0) {
788         res = dgettext("libopts", pz);
789         if (res == pz)
790             res = (char *)VOIDP(_(pz));
791     } else
792         res = (char *)VOIDP(_(pz));
793 #else
794     res = (char *)VOIDP(_(pz));
795 #endif
796     if (res == pz)
797         return res;
798     res = strdup(res);
799     if (res == NULL) {
800         fputs(_("No memory for duping translated strings\n"), stderr);
801         exit(NTPQ_EXIT_FAILURE);
802     }
803     return res;
804 }
805 
806 /**
807  * All the pointers we use are marked "* const", but they are stored in
808  * writable memory.  Coerce the mutability and set the pointer.
809  */
810 static void coerce_it(void ** s) { *s = AO_gettext(*s);
811 }
812 
813 /**
814  * Translate all the translatable strings in the ntpqOptions
815  * structure defined above.  This is done only once.
816  */
817 static void
818 translate_option_strings(void)
819 {
820     tOptions * const opts = &ntpqOptions;
821 
822     /*
823      *  Guard against re-translation.  It won't work.  The strings will have
824      *  been changed by the first pass through this code.  One shot only.
825      */
826     if (option_xlateable_txt.field_ct != 0) {
827         /*
828          *  Do the translations.  The first pointer follows the field count
829          *  field.  The field count field is the size of a pointer.
830          */
831         char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
832         int     ix  = option_xlateable_txt.field_ct;
833 
834         do {
835             ppz++; /* skip over field_ct */
836             *ppz = AO_gettext(*ppz);
837         } while (--ix > 0);
838         /* prevent re-translation and disable "libopts" domain lookup */
839         option_xlateable_txt.field_ct = 0;
840 
841         coerce_it(VOIDP(&(opts->pzCopyright)));
842         coerce_it(VOIDP(&(opts->pzCopyNotice)));
843         coerce_it(VOIDP(&(opts->pzFullVersion)));
844         coerce_it(VOIDP(&(opts->pzUsageTitle)));
845         coerce_it(VOIDP(&(opts->pzExplain)));
846         coerce_it(VOIDP(&(opts->pzDetail)));
847         {
848             tOptDesc * od = opts->pOptDesc;
849             for (ix = opts->optCt; ix > 0; ix--, od++)
850                 coerce_it(VOIDP(&(od->pzText)));
851         }
852     }
853 }
854 #endif /* ENABLE_NLS */
855 
856 #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
857 /** I18N function strictly for xgettext.  Do not compile. */
858 static void bogus_function(void) {
859   /* TRANSLATORS:
860 
861      The following dummy function was crated solely so that xgettext can
862      extract the correct strings.  These strings are actually referenced
863      by a field name in the ntpqOptions structure noted in the
864      comments below.  The literal text is defined in ntpq_opt_strs.
865 
866      NOTE: the strings below are segmented with respect to the source string
867      ntpq_opt_strs.  The strings above are handed off for translation
868      at run time a paragraph at a time.  Consequently, they are presented here
869      for translation a paragraph at a time.
870 
871      ALSO: often the description for an option will reference another option
872      by name.  These are set off with apostrophe quotes (I hope).  Do not
873      translate option names.
874    */
875   /* referenced via ntpqOptions.pzCopyright */
876   puts(_("ntpq 4.2.8p18\n\
877 Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation, all rights reserved.\n\
878 This is free software. It is licensed for use, modification and\n\
879 redistribution under the terms of the NTP License, copies of which\n\
880 can be seen at:\n"));
881   puts(_("  <http://ntp.org/license>\n\
882   <http://opensource.org/licenses/ntp-license.php>\n"));
883 
884   /* referenced via ntpqOptions.pzCopyNotice */
885   puts(_("Permission to use, copy, modify, and distribute this software and its\n\
886 documentation for any purpose with or without fee is hereby granted,\n\
887 provided that the above copyright notice appears in all copies and that\n\
888 both the copyright notice and this permission notice appear in supporting\n\
889 documentation, and that the name The University of Delaware not be used in\n\
890 advertising or publicity pertaining to distribution of the software without\n\
891 specific, written prior permission.  The University of Delaware and Network\n\
892 Time Foundation makes no representations about the suitability this\n\
893 software for any purpose.  It is provided \"as is\" without express or\n\
894 implied warranty.\n"));
895 
896   /* referenced via ntpqOptions.pOptDesc->pzText */
897   puts(_("Force IPv4 name resolution"));
898 
899   /* referenced via ntpqOptions.pOptDesc->pzText */
900   puts(_("Force IPv6 name resolution"));
901 
902   /* referenced via ntpqOptions.pOptDesc->pzText */
903   puts(_("run a command and exit"));
904 
905   /* referenced via ntpqOptions.pOptDesc->pzText */
906   puts(_("Increase debug verbosity level"));
907 
908   /* referenced via ntpqOptions.pOptDesc->pzText */
909   puts(_("Set the debug verbosity level"));
910 
911   /* referenced via ntpqOptions.pOptDesc->pzText */
912   puts(_("Force ntpq to operate in interactive mode"));
913 
914   /* referenced via ntpqOptions.pOptDesc->pzText */
915   puts(_("numeric host addresses"));
916 
917   /* referenced via ntpqOptions.pOptDesc->pzText */
918   puts(_("Always output status line with readvar"));
919 
920   /* referenced via ntpqOptions.pOptDesc->pzText */
921   puts(_("Print a list of the peers"));
922 
923   /* referenced via ntpqOptions.pOptDesc->pzText */
924   puts(_("Set default display type for S2+ refids"));
925 
926   /* referenced via ntpqOptions.pOptDesc->pzText */
927   puts(_("Use unconnected UDP to communicate with ntpd (default on Windows)"));
928 
929   /* referenced via ntpqOptions.pOptDesc->pzText */
930   puts(_("Display the full 'remote' value"));
931 
932   /* referenced via ntpqOptions.pOptDesc->pzText */
933   puts(_("display extended usage information and exit"));
934 
935   /* referenced via ntpqOptions.pOptDesc->pzText */
936   puts(_("extended usage information passed thru pager"));
937 
938   /* referenced via ntpqOptions.pOptDesc->pzText */
939   puts(_("output version information and exit"));
940 
941   /* referenced via ntpqOptions.pOptDesc->pzText */
942   puts(_("save the option state to a config file"));
943 
944   /* referenced via ntpqOptions.pOptDesc->pzText */
945   puts(_("load options from a config file"));
946 
947   /* referenced via ntpqOptions.pzUsageTitle */
948   puts(_("ntpq - standard NTP query program - Ver. 4.2.8p18\n\
949 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
950 
951   /* referenced via ntpqOptions.pzFullVersion */
952   puts(_("ntpq 4.2.8p18"));
953 
954   /* referenced via ntpqOptions.pzFullUsage */
955   puts(_("<<<NOT-FOUND>>>"));
956 
957   /* referenced via ntpqOptions.pzShortUsage */
958   puts(_("<<<NOT-FOUND>>>"));
959   /* LIBOPTS-MESSAGES: */
960 #line 67 "../autoopts.c"
961   puts(_("allocation of %d bytes failed\n"));
962 #line 89 "../autoopts.c"
963   puts(_("allocation of %d bytes failed\n"));
964 #line 48 "../init.c"
965   puts(_("AutoOpts function called without option descriptor\n"));
966 #line 81 "../init.c"
967   puts(_("\tThis exceeds the compiled library version:  "));
968 #line 79 "../init.c"
969   puts(_("Automated Options Processing Error!\n"
970        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
971 #line 78 "../autoopts.c"
972   puts(_("realloc of %d bytes at 0x%p failed\n"));
973 #line 83 "../init.c"
974   puts(_("\tThis is less than the minimum library version:  "));
975 #line 121 "../version.c"
976   puts(_("Automated Options version %s\n"
977        "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
978 #line 49 "../makeshell.c"
979   puts(_("(AutoOpts bug):  %s.\n"));
980 #line 90 "../reset.c"
981   puts(_("optionResetOpt() called, but reset-option not configured"));
982 #line 241 "../usage.c"
983   puts(_("could not locate the 'help' option"));
984 #line 330 "../autoopts.c"
985   puts(_("optionProcess() was called with invalid data"));
986 #line 697 "../usage.c"
987   puts(_("invalid argument type specified"));
988 #line 568 "../find.c"
989   puts(_("defaulted to option with optional arg"));
990 #line 76 "../alias.c"
991   puts(_("aliasing option is out of range."));
992 #line 210 "../enum.c"
993   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
994 #line 78 "../find.c"
995   puts(_("  The following options match:\n"));
996 #line 263 "../find.c"
997   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
998 #line 161 "../check.c"
999   puts(_("%s: Command line arguments required\n"));
1000 #line 43 "../alias.c"
1001   puts(_("%d %s%s options allowed\n"));
1002 #line 56 "../makeshell.c"
1003   puts(_("%s error %d (%s) calling %s for '%s'\n"));
1004 #line 268 "../makeshell.c"
1005   puts(_("interprocess pipe"));
1006 #line 171 "../version.c"
1007   puts(_("error: version option argument '%c' invalid.  Use:\n"
1008        "\t'v' - version only\n"
1009        "\t'c' - version and copyright\n"
1010        "\t'n' - version and full copyright notice\n"));
1011 #line 58 "../check.c"
1012   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
1013 #line 187 "../find.c"
1014   puts(_("%s: The '%s' option has been disabled."));
1015 #line 400 "../find.c"
1016   puts(_("%s: The '%s' option has been disabled."));
1017 #line 38 "../alias.c"
1018   puts(_("-equivalence"));
1019 #line 439 "../find.c"
1020   puts(_("%s: illegal option -- %c\n"));
1021 #line 110 "../reset.c"
1022   puts(_("%s: illegal option -- %c\n"));
1023 #line 241 "../find.c"
1024   puts(_("%s: illegal option -- %s\n"));
1025 #line 740 "../find.c"
1026   puts(_("%s: illegal option -- %s\n"));
1027 #line 118 "../reset.c"
1028   puts(_("%s: illegal option -- %s\n"));
1029 #line 305 "../find.c"
1030   puts(_("%s: unknown vendor extension option -- %s\n"));
1031 #line 135 "../enum.c"
1032   puts(_("  or an integer from %d through %d\n"));
1033 #line 145 "../enum.c"
1034   puts(_("  or an integer from %d through %d\n"));
1035 #line 696 "../usage.c"
1036   puts(_("%s error:  invalid option descriptor for %s\n"));
1037 #line 1030 "../usage.c"
1038   puts(_("%s error:  invalid option descriptor for %s\n"));
1039 #line 355 "../find.c"
1040   puts(_("%s: invalid option name: %s\n"));
1041 #line 497 "../find.c"
1042   puts(_("%s: The '%s' option requires an argument.\n"));
1043 #line 150 "../autoopts.c"
1044   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
1045        "\t'%s' and '%s'."));
1046 #line 94 "../check.c"
1047   puts(_("%s error:  The %s option is required\n"));
1048 #line 602 "../find.c"
1049   puts(_("%s: The '%s' option cannot have an argument.\n"));
1050 #line 151 "../check.c"
1051   puts(_("%s: Command line arguments are not allowed.\n"));
1052 #line 568 "../save.c"
1053   puts(_("error %d (%s) creating %s\n"));
1054 #line 210 "../enum.c"
1055   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
1056 #line 93 "../reset.c"
1057   puts(_("%s error: The '%s' option requires an argument.\n"));
1058 #line 122 "../save.c"
1059   puts(_("error %d (%s) stat-ing %s\n"));
1060 #line 175 "../save.c"
1061   puts(_("error %d (%s) stat-ing %s\n"));
1062 #line 143 "../restore.c"
1063   puts(_("%s error: no saved option state\n"));
1064 #line 225 "../autoopts.c"
1065   puts(_("'%s' is not a command line option.\n"));
1066 #line 113 "../time.c"
1067   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
1068 #line 50 "../time.c"
1069   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
1070 #line 92 "../check.c"
1071   puts(_("%s error:  The %s option must appear %d times.\n"));
1072 #line 165 "../numeric.c"
1073   puts(_("%s error:  '%s' is not a recognizable number.\n"));
1074 #line 176 "../enum.c"
1075   puts(_("%s error:  %s exceeds %s keyword count\n"));
1076 #line 279 "../usage.c"
1077   puts(_("Try '%s %s' for more information.\n"));
1078 #line 45 "../alias.c"
1079   puts(_("one %s%s option allowed\n"));
1080 #line 170 "../makeshell.c"
1081   puts(_("standard output"));
1082 #line 905 "../makeshell.c"
1083   puts(_("standard output"));
1084 #line 223 "../usage.c"
1085   puts(_("standard output"));
1086 #line 364 "../usage.c"
1087   puts(_("standard output"));
1088 #line 574 "../usage.c"
1089   puts(_("standard output"));
1090 #line 178 "../version.c"
1091   puts(_("standard output"));
1092 #line 223 "../usage.c"
1093   puts(_("standard error"));
1094 #line 364 "../usage.c"
1095   puts(_("standard error"));
1096 #line 574 "../usage.c"
1097   puts(_("standard error"));
1098 #line 178 "../version.c"
1099   puts(_("standard error"));
1100 #line 170 "../makeshell.c"
1101   puts(_("write"));
1102 #line 905 "../makeshell.c"
1103   puts(_("write"));
1104 #line 222 "../usage.c"
1105   puts(_("write"));
1106 #line 363 "../usage.c"
1107   puts(_("write"));
1108 #line 573 "../usage.c"
1109   puts(_("write"));
1110 #line 177 "../version.c"
1111   puts(_("write"));
1112 #line 60 "../numeric.c"
1113   puts(_("%s error:  %s option value %ld is out of range.\n"));
1114 #line 44 "../check.c"
1115   puts(_("%s error:  %s option requires the %s option\n"));
1116 #line 121 "../save.c"
1117   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1118 #line 174 "../save.c"
1119   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1120 #line 193 "../save.c"
1121   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1122 #line 567 "../save.c"
1123   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1124   /* END-LIBOPTS-MESSAGES */
1125 
1126   /* USAGE-TEXT: */
1127 #line 822 "../usage.c"
1128   puts(_("\t\t\t\t- an alternate for '%s'\n"));
1129 #line 1097 "../usage.c"
1130   puts(_("Version, usage and configuration options:"));
1131 #line 873 "../usage.c"
1132   puts(_("\t\t\t\t- default option for unnamed options\n"));
1133 #line 786 "../usage.c"
1134   puts(_("\t\t\t\t- disabled as '--%s'\n"));
1135 #line 1066 "../usage.c"
1136   puts(_(" --- %-14s %s\n"));
1137 #line 1064 "../usage.c"
1138   puts(_("This option has been disabled"));
1139 #line 813 "../usage.c"
1140   puts(_("\t\t\t\t- enabled by default\n"));
1141 #line 40 "../alias.c"
1142   puts(_("%s error:  only "));
1143 #line 1143 "../usage.c"
1144   puts(_(" - examining environment variables named %s_*\n"));
1145 #line 168 "../file.c"
1146   puts(_("\t\t\t\t- file must not pre-exist\n"));
1147 #line 172 "../file.c"
1148   puts(_("\t\t\t\t- file must pre-exist\n"));
1149 #line 329 "../usage.c"
1150   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1151        "hyphen and the flag character.\n"));
1152 #line 882 "../makeshell.c"
1153   puts(_("\n"
1154        "= = = = = = = =\n\n"
1155        "This incarnation of genshell will produce\n"
1156        "a shell script to parse the options for %s:\n\n"));
1157 #line 142 "../enum.c"
1158   puts(_("  or an integer mask with any of the lower %d bits set\n"));
1159 #line 846 "../usage.c"
1160   puts(_("\t\t\t\t- is a set membership option\n"));
1161 #line 867 "../usage.c"
1162   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1163 #line 331 "../usage.c"
1164   puts(_("Options are specified by single or double hyphens and their name.\n"));
1165 #line 853 "../usage.c"
1166   puts(_("\t\t\t\t- may appear multiple times\n"));
1167 #line 840 "../usage.c"
1168   puts(_("\t\t\t\t- may not be preset\n"));
1169 #line 1258 "../usage.c"
1170   puts(_("   Arg Option-Name    Description\n"));
1171 #line 1194 "../usage.c"
1172   puts(_("  Flg Arg Option-Name    Description\n"));
1173 #line 1252 "../usage.c"
1174   puts(_("  Flg Arg Option-Name    Description\n"));
1175 #line 1253 "../usage.c"
1176   puts(_(" %3s %s"));
1177 #line 1259 "../usage.c"
1178   puts(_(" %3s %s"));
1179 #line 336 "../usage.c"
1180   puts(_("The '-#<number>' option may omit the hash char\n"));
1181 #line 332 "../usage.c"
1182   puts(_("All arguments are named options.\n"));
1183 #line 920 "../usage.c"
1184   puts(_(" - reading file %s"));
1185 #line 358 "../usage.c"
1186   puts(_("\n"
1187        "Please send bug reports to:  <%s>\n"));
1188 #line 100 "../version.c"
1189   puts(_("\n"
1190        "Please send bug reports to:  <%s>\n"));
1191 #line 129 "../version.c"
1192   puts(_("\n"
1193        "Please send bug reports to:  <%s>\n"));
1194 #line 852 "../usage.c"
1195   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1196 #line 893 "../usage.c"
1197   puts(_("\n"
1198        "The following option preset mechanisms are supported:\n"));
1199 #line 1141 "../usage.c"
1200   puts(_("\n"
1201        "The following option preset mechanisms are supported:\n"));
1202 #line 631 "../usage.c"
1203   puts(_("prohibits these options:\n"));
1204 #line 626 "../usage.c"
1205   puts(_("prohibits the option '%s'\n"));
1206 #line 81 "../numeric.c"
1207   puts(_("%s%ld to %ld"));
1208 #line 79 "../numeric.c"
1209   puts(_("%sgreater than or equal to %ld"));
1210 #line 75 "../numeric.c"
1211   puts(_("%s%ld exactly"));
1212 #line 68 "../numeric.c"
1213   puts(_("%sit must lie in one of the ranges:\n"));
1214 #line 68 "../numeric.c"
1215   puts(_("%sit must be in the range:\n"));
1216 #line 88 "../numeric.c"
1217   puts(_(", or\n"));
1218 #line 66 "../numeric.c"
1219   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1220 #line 77 "../numeric.c"
1221   puts(_("%sless than or equal to %ld"));
1222 #line 339 "../usage.c"
1223   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
1224 #line 601 "../usage.c"
1225   puts(_("requires the option '%s'\n"));
1226 #line 604 "../usage.c"
1227   puts(_("requires these options:\n"));
1228 #line 1270 "../usage.c"
1229   puts(_("   Arg Option-Name   Req?  Description\n"));
1230 #line 1264 "../usage.c"
1231   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
1232 #line 143 "../enum.c"
1233   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
1234        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1235        "will set them all.  Multiple entries may be passed as an option\n"
1236        "argument list.\n"));
1237 #line 859 "../usage.c"
1238   puts(_("\t\t\t\t- may appear up to %d times\n"));
1239 #line 52 "../enum.c"
1240   puts(_("The valid \"%s\" option keywords are:\n"));
1241 #line 1101 "../usage.c"
1242   puts(_("The next option supports vendor supported extra options:"));
1243 #line 722 "../usage.c"
1244   puts(_("These additional options are:"));
1245   /* END-USAGE-TEXT */
1246 }
1247 #endif /* uncompilable code */
1248 #ifdef  __cplusplus
1249 }
1250 #endif
1251 /* ntpq-opts.c ends here */
1252