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