xref: /netbsd-src/external/bsd/ntp/dist/ntpd/ntpd-opts.c (revision 6a493d6bc668897c91594964a732d38505b70cbb)
1 /*	$NetBSD: ntpd-opts.c,v 1.1.1.3 2013/12/27 23:31:00 christos Exp $	*/
2 
3 /*
4  *  EDIT THIS FILE WITH CAUTION  (ntpd-opts.c)
5  *
6  *  It has been AutoGen-ed  December 24, 2013 at 11:37:03 AM by AutoGen 5.18.3pre5
7  *  From the definitions    ntpd-opts.def
8  *  and the template file   options
9  *
10  * Generated from AutoOpts 40:1:15 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 ntpd 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 ntpd program is copyrighted and licensed
21  * under the following terms:
22  *
23  *  Copyright (C) 1970-2013 The University of Delaware, 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 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 "ntpd-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      (ntpd_opt_strs+0)
55 #define zLicenseDescrip (ntpd_opt_strs+314)
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 #ifdef __windows
67   extern int atoi(const char*);
68 #else
69 # include <stdlib.h>
70 #endif
71 
72 #ifndef NULL
73 #  define NULL 0
74 #endif
75 
76 /**
77  *  static const strings for ntpd options
78  */
79 static char const ntpd_opt_strs[3011] =
80 /*     0 */ "ntpd 4.2.7p404\n"
81             "Copyright (C) 1970-2013 The University of Delaware, all rights reserved.\n"
82             "This is free software. It is licensed for use, modification and\n"
83             "redistribution under the terms of the NTP License, copies of which\n"
84             "can be seen at:\n"
85             "  <http://ntp.org/license>\n"
86             "  <http://opensource.org/licenses/ntp-license.php>\n\0"
87 /*   314 */ "Permission to use, copy, modify, and distribute this software and its\n"
88             "documentation for any purpose with or without fee is hereby granted,\n"
89             "provided that the above copyright notice appears in all copies and that\n"
90             "both the copyright notice and this permission notice appear in supporting\n"
91             "documentation, and that the name The University of Delaware not be used in\n"
92             "advertising or publicity pertaining to distribution of the software without\n"
93             "specific, written prior permission.  The University of Delaware makes no\n"
94             "representations about the suitability this software for any purpose.  It is\n"
95             "provided \"as is\" without express or implied warranty.\n\0"
96 /*   954 */ "Force IPv4 DNS name resolution\0"
97 /*   985 */ "IPV4\0"
98 /*   990 */ "ipv4\0"
99 /*   995 */ "Force IPv6 DNS name resolution\0"
100 /*  1026 */ "IPV6\0"
101 /*  1031 */ "ipv6\0"
102 /*  1036 */ "Require crypto authentication\0"
103 /*  1066 */ "AUTHREQ\0"
104 /*  1074 */ "authreq\0"
105 /*  1082 */ "Do not require crypto authentication\0"
106 /*  1119 */ "AUTHNOREQ\0"
107 /*  1129 */ "authnoreq\0"
108 /*  1139 */ "Allow us to sync to broadcast servers\0"
109 /*  1177 */ "BCASTSYNC\0"
110 /*  1187 */ "bcastsync\0"
111 /*  1197 */ "configuration file name\0"
112 /*  1221 */ "CONFIGFILE\0"
113 /*  1232 */ "configfile\0"
114 /*  1243 */ "Increase debug verbosity level\0"
115 /*  1274 */ "DEBUG_LEVEL\0"
116 /*  1286 */ "debug-level\0"
117 /*  1298 */ "Set the debug verbosity level\0"
118 /*  1328 */ "SET_DEBUG_LEVEL\0"
119 /*  1344 */ "set-debug-level\0"
120 /*  1360 */ "frequency drift file name\0"
121 /*  1386 */ "DRIFTFILE\0"
122 /*  1396 */ "driftfile\0"
123 /*  1406 */ "Allow the first adjustment to be Big\0"
124 /*  1443 */ "PANICGATE\0"
125 /*  1453 */ "panicgate\0"
126 /*  1463 */ "Jail directory\0"
127 /*  1478 */ "JAILDIR\0"
128 /*  1486 */ "jaildir\0"
129 /*  1494 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
130 /*  1573 */ "Listen on an interface name or address\0"
131 /*  1612 */ "INTERFACE\0"
132 /*  1622 */ "interface\0"
133 /*  1632 */ "path to symmetric keys\0"
134 /*  1655 */ "KEYFILE\0"
135 /*  1663 */ "keyfile\0"
136 /*  1671 */ "path to the log file\0"
137 /*  1692 */ "LOGFILE\0"
138 /*  1700 */ "logfile\0"
139 /*  1708 */ "Do not listen to virtual interfaces\0"
140 /*  1744 */ "NOVIRTUALIPS\0"
141 /*  1757 */ "novirtualips\0"
142 /*  1770 */ "Modify Multimedia Timer (Windows only)\0"
143 /*  1809 */ "MODIFYMMTIMER\0"
144 /*  1823 */ "modifymmtimer\0"
145 /*  1837 */ "Do not fork\0"
146 /*  1849 */ "NOFORK\0"
147 /*  1856 */ "nofork\0"
148 /*  1863 */ "Run at high priority\0"
149 /*  1884 */ "NICE\0"
150 /*  1889 */ "nice\0"
151 /*  1894 */ "path to the PID file\0"
152 /*  1915 */ "PIDFILE\0"
153 /*  1923 */ "pidfile\0"
154 /*  1931 */ "Process priority\0"
155 /*  1948 */ "PRIORITY\0"
156 /*  1957 */ "priority\0"
157 /*  1966 */ "Set the time and quit\0"
158 /*  1988 */ "QUIT\0"
159 /*  1993 */ "quit\0"
160 /*  1998 */ "Broadcast/propagation delay\0"
161 /*  2026 */ "PROPAGATIONDELAY\0"
162 /*  2043 */ "propagationdelay\0"
163 /*  2060 */ "Save parsed configuration and quit\0"
164 /*  2095 */ "SAVECONFIGQUIT\0"
165 /*  2110 */ "saveconfigquit\0"
166 /*  2125 */ "Statistics file location\0"
167 /*  2150 */ "STATSDIR\0"
168 /*  2159 */ "statsdir\0"
169 /*  2168 */ "Trusted key number\0"
170 /*  2187 */ "TRUSTEDKEY\0"
171 /*  2198 */ "trustedkey\0"
172 /*  2209 */ "Run as userid (or userid:groupid)\0"
173 /*  2243 */ "USER\0"
174 /*  2248 */ "user\0"
175 /*  2253 */ "interval in seconds between scans for new or dropped interfaces\0"
176 /*  2317 */ "UPDATEINTERVAL\0"
177 /*  2332 */ "updateinterval\0"
178 /*  2347 */ "make ARG an ntp variable (RW)\0"
179 /*  2377 */ "VAR\0"
180 /*  2381 */ "var\0"
181 /*  2385 */ "make ARG an ntp variable (RW|DEF)\0"
182 /*  2419 */ "DVAR\0"
183 /*  2424 */ "dvar\0"
184 /*  2429 */ "Seconds to wait for first clock sync\0"
185 /*  2466 */ "WAIT_SYNC\0"
186 /*  2476 */ "wait-sync\0"
187 /*  2486 */ "Slew up to 600 seconds\0"
188 /*  2509 */ "SLEW\0"
189 /*  2514 */ "slew\0"
190 /*  2519 */ "Use CPU cycle counter (Windows only)\0"
191 /*  2556 */ "USEPCC\0"
192 /*  2563 */ "usepcc\0"
193 /*  2570 */ "Force CPU cycle counter use (Windows only)\0"
194 /*  2613 */ "PCCFREQ\0"
195 /*  2621 */ "pccfreq\0"
196 /*  2629 */ "Register with mDNS as a NTP server\0"
197 /*  2664 */ "MDNS\0"
198 /*  2669 */ "mdns\0"
199 /*  2674 */ "display extended usage information and exit\0"
200 /*  2718 */ "help\0"
201 /*  2723 */ "extended usage information passed thru pager\0"
202 /*  2768 */ "more-help\0"
203 /*  2778 */ "output version information and exit\0"
204 /*  2814 */ "version\0"
205 /*  2822 */ "NTPD\0"
206 /*  2827 */ "ntpd - NTP daemon program - Ver. 4.2.7p404\n"
207             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
208             "\t\t[ <server1> ... <serverN> ]\n\0"
209 /*  2960 */ "http://bugs.ntp.org, bugs@ntp.org\0"
210 /*  2994 */ "\n\0"
211 /*  2996 */ "ntpd 4.2.7p404";
212 
213 /**
214  *  ipv4 option description with
215  *  "Must also have options" and "Incompatible options":
216  */
217 /** Descriptive text for the ipv4 option */
218 #define IPV4_DESC      (ntpd_opt_strs+954)
219 /** Upper-cased name for the ipv4 option */
220 #define IPV4_NAME      (ntpd_opt_strs+985)
221 /** Name string for the ipv4 option */
222 #define IPV4_name      (ntpd_opt_strs+990)
223 /** Other options that appear in conjunction with the ipv4 option */
224 static int const aIpv4CantList[] = {
225     INDEX_OPT_IPV6, NO_EQUIVALENT };
226 /** Compiled in flag settings for the ipv4 option */
227 #define IPV4_FLAGS     (OPTST_DISABLED)
228 
229 /**
230  *  ipv6 option description with
231  *  "Must also have options" and "Incompatible options":
232  */
233 /** Descriptive text for the ipv6 option */
234 #define IPV6_DESC      (ntpd_opt_strs+995)
235 /** Upper-cased name for the ipv6 option */
236 #define IPV6_NAME      (ntpd_opt_strs+1026)
237 /** Name string for the ipv6 option */
238 #define IPV6_name      (ntpd_opt_strs+1031)
239 /** Other options that appear in conjunction with the ipv6 option */
240 static int const aIpv6CantList[] = {
241     INDEX_OPT_IPV4, NO_EQUIVALENT };
242 /** Compiled in flag settings for the ipv6 option */
243 #define IPV6_FLAGS     (OPTST_DISABLED)
244 
245 /**
246  *  authreq option description with
247  *  "Must also have options" and "Incompatible options":
248  */
249 /** Descriptive text for the authreq option */
250 #define AUTHREQ_DESC      (ntpd_opt_strs+1036)
251 /** Upper-cased name for the authreq option */
252 #define AUTHREQ_NAME      (ntpd_opt_strs+1066)
253 /** Name string for the authreq option */
254 #define AUTHREQ_name      (ntpd_opt_strs+1074)
255 /** Other options that appear in conjunction with the authreq option */
256 static int const aAuthreqCantList[] = {
257     INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
258 /** Compiled in flag settings for the authreq option */
259 #define AUTHREQ_FLAGS     (OPTST_DISABLED)
260 
261 /**
262  *  authnoreq option description with
263  *  "Must also have options" and "Incompatible options":
264  */
265 /** Descriptive text for the authnoreq option */
266 #define AUTHNOREQ_DESC      (ntpd_opt_strs+1082)
267 /** Upper-cased name for the authnoreq option */
268 #define AUTHNOREQ_NAME      (ntpd_opt_strs+1119)
269 /** Name string for the authnoreq option */
270 #define AUTHNOREQ_name      (ntpd_opt_strs+1129)
271 /** Other options that appear in conjunction with the authnoreq option */
272 static int const aAuthnoreqCantList[] = {
273     INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
274 /** Compiled in flag settings for the authnoreq option */
275 #define AUTHNOREQ_FLAGS     (OPTST_DISABLED)
276 
277 /**
278  *  bcastsync option description:
279  */
280 /** Descriptive text for the bcastsync option */
281 #define BCASTSYNC_DESC      (ntpd_opt_strs+1139)
282 /** Upper-cased name for the bcastsync option */
283 #define BCASTSYNC_NAME      (ntpd_opt_strs+1177)
284 /** Name string for the bcastsync option */
285 #define BCASTSYNC_name      (ntpd_opt_strs+1187)
286 /** Compiled in flag settings for the bcastsync option */
287 #define BCASTSYNC_FLAGS     (OPTST_DISABLED)
288 
289 /**
290  *  configfile option description:
291  */
292 /** Descriptive text for the configfile option */
293 #define CONFIGFILE_DESC      (ntpd_opt_strs+1197)
294 /** Upper-cased name for the configfile option */
295 #define CONFIGFILE_NAME      (ntpd_opt_strs+1221)
296 /** Name string for the configfile option */
297 #define CONFIGFILE_name      (ntpd_opt_strs+1232)
298 /** Compiled in flag settings for the configfile option */
299 #define CONFIGFILE_FLAGS     (OPTST_DISABLED \
300         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
301 
302 /**
303  *  debug-level option description:
304  */
305 /** Descriptive text for the debug-level option */
306 #define DEBUG_LEVEL_DESC      (ntpd_opt_strs+1243)
307 /** Upper-cased name for the debug-level option */
308 #define DEBUG_LEVEL_NAME      (ntpd_opt_strs+1274)
309 /** Name string for the debug-level option */
310 #define DEBUG_LEVEL_name      (ntpd_opt_strs+1286)
311 /** Compiled in flag settings for the debug-level option */
312 #define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
313 
314 /**
315  *  set-debug-level option description:
316  */
317 /** Descriptive text for the set-debug-level option */
318 #define SET_DEBUG_LEVEL_DESC      (ntpd_opt_strs+1298)
319 /** Upper-cased name for the set-debug-level option */
320 #define SET_DEBUG_LEVEL_NAME      (ntpd_opt_strs+1328)
321 /** Name string for the set-debug-level option */
322 #define SET_DEBUG_LEVEL_name      (ntpd_opt_strs+1344)
323 /** Compiled in flag settings for the set-debug-level option */
324 #define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
325         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
326 
327 /**
328  *  driftfile option description:
329  */
330 /** Descriptive text for the driftfile option */
331 #define DRIFTFILE_DESC      (ntpd_opt_strs+1360)
332 /** Upper-cased name for the driftfile option */
333 #define DRIFTFILE_NAME      (ntpd_opt_strs+1386)
334 /** Name string for the driftfile option */
335 #define DRIFTFILE_name      (ntpd_opt_strs+1396)
336 /** Compiled in flag settings for the driftfile option */
337 #define DRIFTFILE_FLAGS     (OPTST_DISABLED \
338         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
339 
340 /**
341  *  panicgate option description:
342  */
343 /** Descriptive text for the panicgate option */
344 #define PANICGATE_DESC      (ntpd_opt_strs+1406)
345 /** Upper-cased name for the panicgate option */
346 #define PANICGATE_NAME      (ntpd_opt_strs+1443)
347 /** Name string for the panicgate option */
348 #define PANICGATE_name      (ntpd_opt_strs+1453)
349 /** Compiled in flag settings for the panicgate option */
350 #define PANICGATE_FLAGS     (OPTST_DISABLED)
351 
352 /**
353  *  jaildir option description:
354  */
355 #ifdef HAVE_DROPROOT
356 /** Descriptive text for the jaildir option */
357 #define JAILDIR_DESC      (ntpd_opt_strs+1463)
358 /** Upper-cased name for the jaildir option */
359 #define JAILDIR_NAME      (ntpd_opt_strs+1478)
360 /** Name string for the jaildir option */
361 #define JAILDIR_name      (ntpd_opt_strs+1486)
362 /** Compiled in flag settings for the jaildir option */
363 #define JAILDIR_FLAGS     (OPTST_DISABLED \
364         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
365 
366 #else   /* disable jaildir */
367 #define JAILDIR_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
368 #define JAILDIR_NAME      NULL
369 /** Descriptive text for the jaildir option */
370 #define JAILDIR_DESC      (ntpd_opt_strs+1494)
371 #define JAILDIR_name      (ntpd_opt_strs+1486)
372 #endif  /* HAVE_DROPROOT */
373 
374 /**
375  *  interface option description:
376  */
377 /** Descriptive text for the interface option */
378 #define INTERFACE_DESC      (ntpd_opt_strs+1573)
379 /** Upper-cased name for the interface option */
380 #define INTERFACE_NAME      (ntpd_opt_strs+1612)
381 /** Name string for the interface option */
382 #define INTERFACE_name      (ntpd_opt_strs+1622)
383 /** Compiled in flag settings for the interface option */
384 #define INTERFACE_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
385         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
386 
387 /**
388  *  keyfile option description:
389  */
390 /** Descriptive text for the keyfile option */
391 #define KEYFILE_DESC      (ntpd_opt_strs+1632)
392 /** Upper-cased name for the keyfile option */
393 #define KEYFILE_NAME      (ntpd_opt_strs+1655)
394 /** Name string for the keyfile option */
395 #define KEYFILE_name      (ntpd_opt_strs+1663)
396 /** Compiled in flag settings for the keyfile option */
397 #define KEYFILE_FLAGS     (OPTST_DISABLED \
398         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
399 
400 /**
401  *  logfile option description:
402  */
403 /** Descriptive text for the logfile option */
404 #define LOGFILE_DESC      (ntpd_opt_strs+1671)
405 /** Upper-cased name for the logfile option */
406 #define LOGFILE_NAME      (ntpd_opt_strs+1692)
407 /** Name string for the logfile option */
408 #define LOGFILE_name      (ntpd_opt_strs+1700)
409 /** Compiled in flag settings for the logfile option */
410 #define LOGFILE_FLAGS     (OPTST_DISABLED \
411         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
412 
413 /**
414  *  novirtualips option description:
415  */
416 /** Descriptive text for the novirtualips option */
417 #define NOVIRTUALIPS_DESC      (ntpd_opt_strs+1708)
418 /** Upper-cased name for the novirtualips option */
419 #define NOVIRTUALIPS_NAME      (ntpd_opt_strs+1744)
420 /** Name string for the novirtualips option */
421 #define NOVIRTUALIPS_name      (ntpd_opt_strs+1757)
422 /** Compiled in flag settings for the novirtualips option */
423 #define NOVIRTUALIPS_FLAGS     (OPTST_DISABLED)
424 
425 /**
426  *  modifymmtimer option description:
427  */
428 #ifdef SYS_WINNT
429 /** Descriptive text for the modifymmtimer option */
430 #define MODIFYMMTIMER_DESC      (ntpd_opt_strs+1770)
431 /** Upper-cased name for the modifymmtimer option */
432 #define MODIFYMMTIMER_NAME      (ntpd_opt_strs+1809)
433 /** Name string for the modifymmtimer option */
434 #define MODIFYMMTIMER_name      (ntpd_opt_strs+1823)
435 /** Compiled in flag settings for the modifymmtimer option */
436 #define MODIFYMMTIMER_FLAGS     (OPTST_DISABLED)
437 
438 #else   /* disable modifymmtimer */
439 #define MODIFYMMTIMER_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
440 #define MODIFYMMTIMER_NAME      NULL
441 #define MODIFYMMTIMER_DESC      NULL
442 #define MODIFYMMTIMER_name      NULL
443 #endif  /* SYS_WINNT */
444 
445 /**
446  *  nofork option description with
447  *  "Must also have options" and "Incompatible options":
448  */
449 /** Descriptive text for the nofork option */
450 #define NOFORK_DESC      (ntpd_opt_strs+1837)
451 /** Upper-cased name for the nofork option */
452 #define NOFORK_NAME      (ntpd_opt_strs+1849)
453 /** Name string for the nofork option */
454 #define NOFORK_name      (ntpd_opt_strs+1856)
455 /** Other options that appear in conjunction with the nofork option */
456 static int const aNoforkCantList[] = {
457     INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
458 /** Compiled in flag settings for the nofork option */
459 #define NOFORK_FLAGS     (OPTST_DISABLED)
460 
461 /**
462  *  nice option description:
463  */
464 /** Descriptive text for the nice option */
465 #define NICE_DESC      (ntpd_opt_strs+1863)
466 /** Upper-cased name for the nice option */
467 #define NICE_NAME      (ntpd_opt_strs+1884)
468 /** Name string for the nice option */
469 #define NICE_name      (ntpd_opt_strs+1889)
470 /** Compiled in flag settings for the nice option */
471 #define NICE_FLAGS     (OPTST_DISABLED)
472 
473 /**
474  *  pidfile option description:
475  */
476 /** Descriptive text for the pidfile option */
477 #define PIDFILE_DESC      (ntpd_opt_strs+1894)
478 /** Upper-cased name for the pidfile option */
479 #define PIDFILE_NAME      (ntpd_opt_strs+1915)
480 /** Name string for the pidfile option */
481 #define PIDFILE_name      (ntpd_opt_strs+1923)
482 /** Compiled in flag settings for the pidfile option */
483 #define PIDFILE_FLAGS     (OPTST_DISABLED \
484         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
485 
486 /**
487  *  priority option description:
488  */
489 /** Descriptive text for the priority option */
490 #define PRIORITY_DESC      (ntpd_opt_strs+1931)
491 /** Upper-cased name for the priority option */
492 #define PRIORITY_NAME      (ntpd_opt_strs+1948)
493 /** Name string for the priority option */
494 #define PRIORITY_name      (ntpd_opt_strs+1957)
495 /** Compiled in flag settings for the priority option */
496 #define PRIORITY_FLAGS     (OPTST_DISABLED \
497         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
498 
499 /**
500  *  quit option description with
501  *  "Must also have options" and "Incompatible options":
502  */
503 /** Descriptive text for the quit option */
504 #define QUIT_DESC      (ntpd_opt_strs+1966)
505 /** Upper-cased name for the quit option */
506 #define QUIT_NAME      (ntpd_opt_strs+1988)
507 /** Name string for the quit option */
508 #define QUIT_name      (ntpd_opt_strs+1993)
509 /** Other options that appear in conjunction with the quit option */
510 static int const aQuitCantList[] = {
511     INDEX_OPT_SAVECONFIGQUIT,
512     INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
513 /** Compiled in flag settings for the quit option */
514 #define QUIT_FLAGS     (OPTST_DISABLED)
515 
516 /**
517  *  propagationdelay option description:
518  */
519 /** Descriptive text for the propagationdelay option */
520 #define PROPAGATIONDELAY_DESC      (ntpd_opt_strs+1998)
521 /** Upper-cased name for the propagationdelay option */
522 #define PROPAGATIONDELAY_NAME      (ntpd_opt_strs+2026)
523 /** Name string for the propagationdelay option */
524 #define PROPAGATIONDELAY_name      (ntpd_opt_strs+2043)
525 /** Compiled in flag settings for the propagationdelay option */
526 #define PROPAGATIONDELAY_FLAGS     (OPTST_DISABLED \
527         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
528 
529 /**
530  *  saveconfigquit option description with
531  *  "Must also have options" and "Incompatible options":
532  */
533 #ifdef SAVECONFIG
534 /** Descriptive text for the saveconfigquit option */
535 #define SAVECONFIGQUIT_DESC      (ntpd_opt_strs+2060)
536 /** Upper-cased name for the saveconfigquit option */
537 #define SAVECONFIGQUIT_NAME      (ntpd_opt_strs+2095)
538 /** Name string for the saveconfigquit option */
539 #define SAVECONFIGQUIT_name      (ntpd_opt_strs+2110)
540 /** Other options that appear in conjunction with the saveconfigquit option */
541 static int const aSaveconfigquitCantList[] = {
542     INDEX_OPT_QUIT,
543     INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
544 /** Compiled in flag settings for the saveconfigquit option */
545 #define SAVECONFIGQUIT_FLAGS     (OPTST_DISABLED \
546         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
547 
548 #else   /* disable saveconfigquit */
549 #define SAVECONFIGQUIT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
550 #define aSaveconfigquitCantList   NULL
551 #define SAVECONFIGQUIT_NAME      NULL
552 #define SAVECONFIGQUIT_DESC      NULL
553 #define SAVECONFIGQUIT_name      NULL
554 #endif  /* SAVECONFIG */
555 
556 /**
557  *  statsdir option description:
558  */
559 /** Descriptive text for the statsdir option */
560 #define STATSDIR_DESC      (ntpd_opt_strs+2125)
561 /** Upper-cased name for the statsdir option */
562 #define STATSDIR_NAME      (ntpd_opt_strs+2150)
563 /** Name string for the statsdir option */
564 #define STATSDIR_name      (ntpd_opt_strs+2159)
565 /** Compiled in flag settings for the statsdir option */
566 #define STATSDIR_FLAGS     (OPTST_DISABLED \
567         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
568 
569 /**
570  *  trustedkey option description:
571  */
572 /** Descriptive text for the trustedkey option */
573 #define TRUSTEDKEY_DESC      (ntpd_opt_strs+2168)
574 /** Upper-cased name for the trustedkey option */
575 #define TRUSTEDKEY_NAME      (ntpd_opt_strs+2187)
576 /** Name string for the trustedkey option */
577 #define TRUSTEDKEY_name      (ntpd_opt_strs+2198)
578 /** Compiled in flag settings for the trustedkey option */
579 #define TRUSTEDKEY_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
580         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
581 
582 /**
583  *  user option description:
584  */
585 #ifdef HAVE_DROPROOT
586 /** Descriptive text for the user option */
587 #define USER_DESC      (ntpd_opt_strs+2209)
588 /** Upper-cased name for the user option */
589 #define USER_NAME      (ntpd_opt_strs+2243)
590 /** Name string for the user option */
591 #define USER_name      (ntpd_opt_strs+2248)
592 /** Compiled in flag settings for the user option */
593 #define USER_FLAGS     (OPTST_DISABLED \
594         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
595 
596 #else   /* disable user */
597 #define USER_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
598 #define USER_NAME      NULL
599 /** Descriptive text for the user option */
600 #define USER_DESC      (ntpd_opt_strs+1494)
601 #define USER_name      (ntpd_opt_strs+2248)
602 #endif  /* HAVE_DROPROOT */
603 
604 /**
605  *  updateinterval option description:
606  */
607 /** Descriptive text for the updateinterval option */
608 #define UPDATEINTERVAL_DESC      (ntpd_opt_strs+2253)
609 /** Upper-cased name for the updateinterval option */
610 #define UPDATEINTERVAL_NAME      (ntpd_opt_strs+2317)
611 /** Name string for the updateinterval option */
612 #define UPDATEINTERVAL_name      (ntpd_opt_strs+2332)
613 /** Compiled in flag settings for the updateinterval option */
614 #define UPDATEINTERVAL_FLAGS     (OPTST_DISABLED \
615         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
616 
617 /**
618  *  var option description:
619  */
620 /** Descriptive text for the var option */
621 #define VAR_DESC      (ntpd_opt_strs+2347)
622 /** Upper-cased name for the var option */
623 #define VAR_NAME      (ntpd_opt_strs+2377)
624 /** Name string for the var option */
625 #define VAR_name      (ntpd_opt_strs+2381)
626 /** Compiled in flag settings for the var option */
627 #define VAR_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
628         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
629 
630 /**
631  *  dvar option description:
632  */
633 /** Descriptive text for the dvar option */
634 #define DVAR_DESC      (ntpd_opt_strs+2385)
635 /** Upper-cased name for the dvar option */
636 #define DVAR_NAME      (ntpd_opt_strs+2419)
637 /** Name string for the dvar option */
638 #define DVAR_name      (ntpd_opt_strs+2424)
639 /** Compiled in flag settings for the dvar option */
640 #define DVAR_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
641         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
642 
643 /**
644  *  wait-sync option description with
645  *  "Must also have options" and "Incompatible options":
646  */
647 #ifdef HAVE_WORKING_FORK
648 /** Descriptive text for the wait-sync option */
649 #define WAIT_SYNC_DESC      (ntpd_opt_strs+2429)
650 /** Upper-cased name for the wait-sync option */
651 #define WAIT_SYNC_NAME      (ntpd_opt_strs+2466)
652 /** Name string for the wait-sync option */
653 #define WAIT_SYNC_name      (ntpd_opt_strs+2476)
654 /** Other options that appear in conjunction with the wait-sync option */
655 static int const aWait_SyncCantList[] = {
656     INDEX_OPT_NOFORK,
657     INDEX_OPT_QUIT,
658     INDEX_OPT_SAVECONFIGQUIT, NO_EQUIVALENT };
659 /** Compiled in flag settings for the wait-sync option */
660 #define WAIT_SYNC_FLAGS     (OPTST_DISABLED \
661         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
662 
663 #else   /* disable wait-sync */
664 #define WAIT_SYNC_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
665 #define aWait_SyncCantList   NULL
666 #define WAIT_SYNC_NAME      NULL
667 #define WAIT_SYNC_DESC      NULL
668 #define WAIT_SYNC_name      NULL
669 #endif  /* HAVE_WORKING_FORK */
670 
671 /**
672  *  slew option description:
673  */
674 /** Descriptive text for the slew option */
675 #define SLEW_DESC      (ntpd_opt_strs+2486)
676 /** Upper-cased name for the slew option */
677 #define SLEW_NAME      (ntpd_opt_strs+2509)
678 /** Name string for the slew option */
679 #define SLEW_name      (ntpd_opt_strs+2514)
680 /** Compiled in flag settings for the slew option */
681 #define SLEW_FLAGS     (OPTST_DISABLED)
682 
683 /**
684  *  usepcc option description:
685  */
686 #ifdef SYS_WINNT
687 /** Descriptive text for the usepcc option */
688 #define USEPCC_DESC      (ntpd_opt_strs+2519)
689 /** Upper-cased name for the usepcc option */
690 #define USEPCC_NAME      (ntpd_opt_strs+2556)
691 /** Name string for the usepcc option */
692 #define USEPCC_name      (ntpd_opt_strs+2563)
693 /** Compiled in flag settings for the usepcc option */
694 #define USEPCC_FLAGS     (OPTST_DISABLED)
695 
696 #else   /* disable usepcc */
697 #define USEPCC_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
698 #define USEPCC_NAME      NULL
699 #define USEPCC_DESC      NULL
700 #define USEPCC_name      NULL
701 #endif  /* SYS_WINNT */
702 
703 /**
704  *  pccfreq option description:
705  */
706 #ifdef SYS_WINNT
707 /** Descriptive text for the pccfreq option */
708 #define PCCFREQ_DESC      (ntpd_opt_strs+2570)
709 /** Upper-cased name for the pccfreq option */
710 #define PCCFREQ_NAME      (ntpd_opt_strs+2613)
711 /** Name string for the pccfreq option */
712 #define PCCFREQ_name      (ntpd_opt_strs+2621)
713 /** Compiled in flag settings for the pccfreq option */
714 #define PCCFREQ_FLAGS     (OPTST_DISABLED \
715         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
716 
717 #else   /* disable pccfreq */
718 #define PCCFREQ_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
719 #define PCCFREQ_NAME      NULL
720 #define PCCFREQ_DESC      NULL
721 #define PCCFREQ_name      NULL
722 #endif  /* SYS_WINNT */
723 
724 /**
725  *  mdns option description:
726  */
727 #ifdef HAVE_DNSREGISTRATION
728 /** Descriptive text for the mdns option */
729 #define MDNS_DESC      (ntpd_opt_strs+2629)
730 /** Upper-cased name for the mdns option */
731 #define MDNS_NAME      (ntpd_opt_strs+2664)
732 /** Name string for the mdns option */
733 #define MDNS_name      (ntpd_opt_strs+2669)
734 /** Compiled in flag settings for the mdns option */
735 #define MDNS_FLAGS     (OPTST_DISABLED)
736 
737 #else   /* disable mdns */
738 #define MDNS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
739 #define MDNS_NAME      NULL
740 #define MDNS_DESC      NULL
741 #define MDNS_name      NULL
742 #endif  /* HAVE_DNSREGISTRATION */
743 
744 /*
745  *  Help/More_Help/Version option descriptions:
746  */
747 #define HELP_DESC       (ntpd_opt_strs+2674)
748 #define HELP_name       (ntpd_opt_strs+2718)
749 #ifdef HAVE_WORKING_FORK
750 #define MORE_HELP_DESC  (ntpd_opt_strs+2723)
751 #define MORE_HELP_name  (ntpd_opt_strs+2768)
752 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
753 #else
754 #define MORE_HELP_DESC  HELP_DESC
755 #define MORE_HELP_name  HELP_name
756 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
757 #endif
758 #ifdef NO_OPTIONAL_OPT_ARGS
759 #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
760 #else
761 #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
762                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
763 #endif
764 #define VER_DESC        (ntpd_opt_strs+2778)
765 #define VER_name        (ntpd_opt_strs+2814)
766 /**
767  *  Declare option callback procedures
768  */
769 /* extracted from optmain.tlib near line 723 */
770 
771 #if defined(TEST_NTPD_OPTS)
772 /*
773  *  Under test, omit argument processing, or call optionStackArg,
774  *  if multiple copies are allowed.
775  */
776 static tOptProc
777     doUsageOpt;
778 
779 /*
780  *  #define map the "normal" callout procs to the test ones...
781  */
782 #define DEBUG_LEVEL_OPT_PROC optionStackArg
783 
784 
785 #else /* NOT defined TEST_NTPD_OPTS */
786 /*
787  *  When not under test, there are different procs to use
788  */
789 extern tOptProc
790     ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
791     optionNumericVal,      optionPagedUsage,      optionResetOpt,
792     optionStackArg,        optionTimeDate,        optionTimeVal,
793     optionUnstackArg,      optionVendorOption,    optionVersionStderr;
794 static tOptProc
795     doOptDebug_Level, doUsageOpt;
796 
797 /**
798  *  #define map the "normal" callout procs
799  */
800 #define DEBUG_LEVEL_OPT_PROC doOptDebug_Level
801 
802 #endif /* TEST_NTPD_OPTS */
803 #define VER_PROC        ntpOptionPrintVersion
804 
805 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
806 /**
807  *  Define the ntpd Option Descriptions.
808  * This is an array of OPTION_CT entries, one for each
809  * option that the ntpd program responds to.
810  */
811 static tOptDesc optDesc[OPTION_CT] = {
812   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
813      /* equiv idx, value */ 0, VALUE_OPT_IPV4,
814      /* equivalenced to  */ NO_EQUIVALENT,
815      /* min, max, act ct */ 0, 1, 0,
816      /* opt state flags  */ IPV4_FLAGS, 0,
817      /* last opt argumnt */ { NULL }, /* --ipv4 */
818      /* arg list/cookie  */ NULL,
819      /* must/cannot opts */ NULL, aIpv4CantList,
820      /* option proc      */ NULL,
821      /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
822      /* disablement strs */ NULL, NULL },
823 
824   {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
825      /* equiv idx, value */ 1, VALUE_OPT_IPV6,
826      /* equivalenced to  */ NO_EQUIVALENT,
827      /* min, max, act ct */ 0, 1, 0,
828      /* opt state flags  */ IPV6_FLAGS, 0,
829      /* last opt argumnt */ { NULL }, /* --ipv6 */
830      /* arg list/cookie  */ NULL,
831      /* must/cannot opts */ NULL, aIpv6CantList,
832      /* option proc      */ NULL,
833      /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
834      /* disablement strs */ NULL, NULL },
835 
836   {  /* entry idx, value */ 2, VALUE_OPT_AUTHREQ,
837      /* equiv idx, value */ 2, VALUE_OPT_AUTHREQ,
838      /* equivalenced to  */ NO_EQUIVALENT,
839      /* min, max, act ct */ 0, 1, 0,
840      /* opt state flags  */ AUTHREQ_FLAGS, 0,
841      /* last opt argumnt */ { NULL }, /* --authreq */
842      /* arg list/cookie  */ NULL,
843      /* must/cannot opts */ NULL, aAuthreqCantList,
844      /* option proc      */ NULL,
845      /* desc, NAME, name */ AUTHREQ_DESC, AUTHREQ_NAME, AUTHREQ_name,
846      /* disablement strs */ NULL, NULL },
847 
848   {  /* entry idx, value */ 3, VALUE_OPT_AUTHNOREQ,
849      /* equiv idx, value */ 3, VALUE_OPT_AUTHNOREQ,
850      /* equivalenced to  */ NO_EQUIVALENT,
851      /* min, max, act ct */ 0, 1, 0,
852      /* opt state flags  */ AUTHNOREQ_FLAGS, 0,
853      /* last opt argumnt */ { NULL }, /* --authnoreq */
854      /* arg list/cookie  */ NULL,
855      /* must/cannot opts */ NULL, aAuthnoreqCantList,
856      /* option proc      */ NULL,
857      /* desc, NAME, name */ AUTHNOREQ_DESC, AUTHNOREQ_NAME, AUTHNOREQ_name,
858      /* disablement strs */ NULL, NULL },
859 
860   {  /* entry idx, value */ 4, VALUE_OPT_BCASTSYNC,
861      /* equiv idx, value */ 4, VALUE_OPT_BCASTSYNC,
862      /* equivalenced to  */ NO_EQUIVALENT,
863      /* min, max, act ct */ 0, 1, 0,
864      /* opt state flags  */ BCASTSYNC_FLAGS, 0,
865      /* last opt argumnt */ { NULL }, /* --bcastsync */
866      /* arg list/cookie  */ NULL,
867      /* must/cannot opts */ NULL, NULL,
868      /* option proc      */ NULL,
869      /* desc, NAME, name */ BCASTSYNC_DESC, BCASTSYNC_NAME, BCASTSYNC_name,
870      /* disablement strs */ NULL, NULL },
871 
872   {  /* entry idx, value */ 5, VALUE_OPT_CONFIGFILE,
873      /* equiv idx, value */ 5, VALUE_OPT_CONFIGFILE,
874      /* equivalenced to  */ NO_EQUIVALENT,
875      /* min, max, act ct */ 0, 1, 0,
876      /* opt state flags  */ CONFIGFILE_FLAGS, 0,
877      /* last opt argumnt */ { NULL }, /* --configfile */
878      /* arg list/cookie  */ NULL,
879      /* must/cannot opts */ NULL, NULL,
880      /* option proc      */ NULL,
881      /* desc, NAME, name */ CONFIGFILE_DESC, CONFIGFILE_NAME, CONFIGFILE_name,
882      /* disablement strs */ NULL, NULL },
883 
884   {  /* entry idx, value */ 6, VALUE_OPT_DEBUG_LEVEL,
885      /* equiv idx, value */ 6, VALUE_OPT_DEBUG_LEVEL,
886      /* equivalenced to  */ NO_EQUIVALENT,
887      /* min, max, act ct */ 0, NOLIMIT, 0,
888      /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
889      /* last opt argumnt */ { NULL }, /* --debug-level */
890      /* arg list/cookie  */ NULL,
891      /* must/cannot opts */ NULL, NULL,
892      /* option proc      */ DEBUG_LEVEL_OPT_PROC,
893      /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
894      /* disablement strs */ NULL, NULL },
895 
896   {  /* entry idx, value */ 7, VALUE_OPT_SET_DEBUG_LEVEL,
897      /* equiv idx, value */ 7, VALUE_OPT_SET_DEBUG_LEVEL,
898      /* equivalenced to  */ NO_EQUIVALENT,
899      /* min, max, act ct */ 0, NOLIMIT, 0,
900      /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
901      /* last opt argumnt */ { NULL }, /* --set-debug-level */
902      /* arg list/cookie  */ NULL,
903      /* must/cannot opts */ NULL, NULL,
904      /* option proc      */ optionNumericVal,
905      /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
906      /* disablement strs */ NULL, NULL },
907 
908   {  /* entry idx, value */ 8, VALUE_OPT_DRIFTFILE,
909      /* equiv idx, value */ 8, VALUE_OPT_DRIFTFILE,
910      /* equivalenced to  */ NO_EQUIVALENT,
911      /* min, max, act ct */ 0, 1, 0,
912      /* opt state flags  */ DRIFTFILE_FLAGS, 0,
913      /* last opt argumnt */ { NULL }, /* --driftfile */
914      /* arg list/cookie  */ NULL,
915      /* must/cannot opts */ NULL, NULL,
916      /* option proc      */ NULL,
917      /* desc, NAME, name */ DRIFTFILE_DESC, DRIFTFILE_NAME, DRIFTFILE_name,
918      /* disablement strs */ NULL, NULL },
919 
920   {  /* entry idx, value */ 9, VALUE_OPT_PANICGATE,
921      /* equiv idx, value */ 9, VALUE_OPT_PANICGATE,
922      /* equivalenced to  */ NO_EQUIVALENT,
923      /* min, max, act ct */ 0, NOLIMIT, 0,
924      /* opt state flags  */ PANICGATE_FLAGS, 0,
925      /* last opt argumnt */ { NULL }, /* --panicgate */
926      /* arg list/cookie  */ NULL,
927      /* must/cannot opts */ NULL, NULL,
928      /* option proc      */ NULL,
929      /* desc, NAME, name */ PANICGATE_DESC, PANICGATE_NAME, PANICGATE_name,
930      /* disablement strs */ NULL, NULL },
931 
932   {  /* entry idx, value */ 10, VALUE_OPT_JAILDIR,
933      /* equiv idx, value */ 10, VALUE_OPT_JAILDIR,
934      /* equivalenced to  */ NO_EQUIVALENT,
935      /* min, max, act ct */ 0, 1, 0,
936      /* opt state flags  */ JAILDIR_FLAGS, 0,
937      /* last opt argumnt */ { NULL }, /* --jaildir */
938      /* arg list/cookie  */ NULL,
939      /* must/cannot opts */ NULL, NULL,
940      /* option proc      */ NULL,
941      /* desc, NAME, name */ JAILDIR_DESC, JAILDIR_NAME, JAILDIR_name,
942      /* disablement strs */ NULL, NULL },
943 
944   {  /* entry idx, value */ 11, VALUE_OPT_INTERFACE,
945      /* equiv idx, value */ 11, VALUE_OPT_INTERFACE,
946      /* equivalenced to  */ NO_EQUIVALENT,
947      /* min, max, act ct */ 0, NOLIMIT, 0,
948      /* opt state flags  */ INTERFACE_FLAGS, 0,
949      /* last opt argumnt */ { NULL }, /* --interface */
950      /* arg list/cookie  */ NULL,
951      /* must/cannot opts */ NULL, NULL,
952      /* option proc      */ optionStackArg,
953      /* desc, NAME, name */ INTERFACE_DESC, INTERFACE_NAME, INTERFACE_name,
954      /* disablement strs */ NULL, NULL },
955 
956   {  /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
957      /* equiv idx, value */ 12, VALUE_OPT_KEYFILE,
958      /* equivalenced to  */ NO_EQUIVALENT,
959      /* min, max, act ct */ 0, 1, 0,
960      /* opt state flags  */ KEYFILE_FLAGS, 0,
961      /* last opt argumnt */ { NULL }, /* --keyfile */
962      /* arg list/cookie  */ NULL,
963      /* must/cannot opts */ NULL, NULL,
964      /* option proc      */ NULL,
965      /* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
966      /* disablement strs */ NULL, NULL },
967 
968   {  /* entry idx, value */ 13, VALUE_OPT_LOGFILE,
969      /* equiv idx, value */ 13, VALUE_OPT_LOGFILE,
970      /* equivalenced to  */ NO_EQUIVALENT,
971      /* min, max, act ct */ 0, 1, 0,
972      /* opt state flags  */ LOGFILE_FLAGS, 0,
973      /* last opt argumnt */ { NULL }, /* --logfile */
974      /* arg list/cookie  */ NULL,
975      /* must/cannot opts */ NULL, NULL,
976      /* option proc      */ NULL,
977      /* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
978      /* disablement strs */ NULL, NULL },
979 
980   {  /* entry idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
981      /* equiv idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
982      /* equivalenced to  */ NO_EQUIVALENT,
983      /* min, max, act ct */ 0, 1, 0,
984      /* opt state flags  */ NOVIRTUALIPS_FLAGS, 0,
985      /* last opt argumnt */ { NULL }, /* --novirtualips */
986      /* arg list/cookie  */ NULL,
987      /* must/cannot opts */ NULL, NULL,
988      /* option proc      */ NULL,
989      /* desc, NAME, name */ NOVIRTUALIPS_DESC, NOVIRTUALIPS_NAME, NOVIRTUALIPS_name,
990      /* disablement strs */ NULL, NULL },
991 
992   {  /* entry idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
993      /* equiv idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
994      /* equivalenced to  */ NO_EQUIVALENT,
995      /* min, max, act ct */ 0, 1, 0,
996      /* opt state flags  */ MODIFYMMTIMER_FLAGS, 0,
997      /* last opt argumnt */ { NULL }, /* --modifymmtimer */
998      /* arg list/cookie  */ NULL,
999      /* must/cannot opts */ NULL, NULL,
1000      /* option proc      */ NULL,
1001      /* desc, NAME, name */ MODIFYMMTIMER_DESC, MODIFYMMTIMER_NAME, MODIFYMMTIMER_name,
1002      /* disablement strs */ NULL, NULL },
1003 
1004   {  /* entry idx, value */ 16, VALUE_OPT_NOFORK,
1005      /* equiv idx, value */ 16, VALUE_OPT_NOFORK,
1006      /* equivalenced to  */ NO_EQUIVALENT,
1007      /* min, max, act ct */ 0, 1, 0,
1008      /* opt state flags  */ NOFORK_FLAGS, 0,
1009      /* last opt argumnt */ { NULL }, /* --nofork */
1010      /* arg list/cookie  */ NULL,
1011      /* must/cannot opts */ NULL, aNoforkCantList,
1012      /* option proc      */ NULL,
1013      /* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
1014      /* disablement strs */ NULL, NULL },
1015 
1016   {  /* entry idx, value */ 17, VALUE_OPT_NICE,
1017      /* equiv idx, value */ 17, VALUE_OPT_NICE,
1018      /* equivalenced to  */ NO_EQUIVALENT,
1019      /* min, max, act ct */ 0, 1, 0,
1020      /* opt state flags  */ NICE_FLAGS, 0,
1021      /* last opt argumnt */ { NULL }, /* --nice */
1022      /* arg list/cookie  */ NULL,
1023      /* must/cannot opts */ NULL, NULL,
1024      /* option proc      */ NULL,
1025      /* desc, NAME, name */ NICE_DESC, NICE_NAME, NICE_name,
1026      /* disablement strs */ NULL, NULL },
1027 
1028   {  /* entry idx, value */ 18, VALUE_OPT_PIDFILE,
1029      /* equiv idx, value */ 18, VALUE_OPT_PIDFILE,
1030      /* equivalenced to  */ NO_EQUIVALENT,
1031      /* min, max, act ct */ 0, 1, 0,
1032      /* opt state flags  */ PIDFILE_FLAGS, 0,
1033      /* last opt argumnt */ { NULL }, /* --pidfile */
1034      /* arg list/cookie  */ NULL,
1035      /* must/cannot opts */ NULL, NULL,
1036      /* option proc      */ NULL,
1037      /* desc, NAME, name */ PIDFILE_DESC, PIDFILE_NAME, PIDFILE_name,
1038      /* disablement strs */ NULL, NULL },
1039 
1040   {  /* entry idx, value */ 19, VALUE_OPT_PRIORITY,
1041      /* equiv idx, value */ 19, VALUE_OPT_PRIORITY,
1042      /* equivalenced to  */ NO_EQUIVALENT,
1043      /* min, max, act ct */ 0, 1, 0,
1044      /* opt state flags  */ PRIORITY_FLAGS, 0,
1045      /* last opt argumnt */ { NULL }, /* --priority */
1046      /* arg list/cookie  */ NULL,
1047      /* must/cannot opts */ NULL, NULL,
1048      /* option proc      */ optionNumericVal,
1049      /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
1050      /* disablement strs */ NULL, NULL },
1051 
1052   {  /* entry idx, value */ 20, VALUE_OPT_QUIT,
1053      /* equiv idx, value */ 20, VALUE_OPT_QUIT,
1054      /* equivalenced to  */ NO_EQUIVALENT,
1055      /* min, max, act ct */ 0, 1, 0,
1056      /* opt state flags  */ QUIT_FLAGS, 0,
1057      /* last opt argumnt */ { NULL }, /* --quit */
1058      /* arg list/cookie  */ NULL,
1059      /* must/cannot opts */ NULL, aQuitCantList,
1060      /* option proc      */ NULL,
1061      /* desc, NAME, name */ QUIT_DESC, QUIT_NAME, QUIT_name,
1062      /* disablement strs */ NULL, NULL },
1063 
1064   {  /* entry idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
1065      /* equiv idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
1066      /* equivalenced to  */ NO_EQUIVALENT,
1067      /* min, max, act ct */ 0, 1, 0,
1068      /* opt state flags  */ PROPAGATIONDELAY_FLAGS, 0,
1069      /* last opt argumnt */ { NULL }, /* --propagationdelay */
1070      /* arg list/cookie  */ NULL,
1071      /* must/cannot opts */ NULL, NULL,
1072      /* option proc      */ NULL,
1073      /* desc, NAME, name */ PROPAGATIONDELAY_DESC, PROPAGATIONDELAY_NAME, PROPAGATIONDELAY_name,
1074      /* disablement strs */ NULL, NULL },
1075 
1076   {  /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
1077      /* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
1078      /* equivalenced to  */ NO_EQUIVALENT,
1079      /* min, max, act ct */ 0, 1, 0,
1080      /* opt state flags  */ SAVECONFIGQUIT_FLAGS, 0,
1081      /* last opt argumnt */ { NULL }, /* --saveconfigquit */
1082      /* arg list/cookie  */ NULL,
1083      /* must/cannot opts */ NULL, aSaveconfigquitCantList,
1084      /* option proc      */ NULL,
1085      /* desc, NAME, name */ SAVECONFIGQUIT_DESC, SAVECONFIGQUIT_NAME, SAVECONFIGQUIT_name,
1086      /* disablement strs */ NULL, NULL },
1087 
1088   {  /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
1089      /* equiv idx, value */ 23, VALUE_OPT_STATSDIR,
1090      /* equivalenced to  */ NO_EQUIVALENT,
1091      /* min, max, act ct */ 0, 1, 0,
1092      /* opt state flags  */ STATSDIR_FLAGS, 0,
1093      /* last opt argumnt */ { NULL }, /* --statsdir */
1094      /* arg list/cookie  */ NULL,
1095      /* must/cannot opts */ NULL, NULL,
1096      /* option proc      */ NULL,
1097      /* desc, NAME, name */ STATSDIR_DESC, STATSDIR_NAME, STATSDIR_name,
1098      /* disablement strs */ NULL, NULL },
1099 
1100   {  /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
1101      /* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
1102      /* equivalenced to  */ NO_EQUIVALENT,
1103      /* min, max, act ct */ 0, NOLIMIT, 0,
1104      /* opt state flags  */ TRUSTEDKEY_FLAGS, 0,
1105      /* last opt argumnt */ { NULL }, /* --trustedkey */
1106      /* arg list/cookie  */ NULL,
1107      /* must/cannot opts */ NULL, NULL,
1108      /* option proc      */ optionStackArg,
1109      /* desc, NAME, name */ TRUSTEDKEY_DESC, TRUSTEDKEY_NAME, TRUSTEDKEY_name,
1110      /* disablement strs */ NULL, NULL },
1111 
1112   {  /* entry idx, value */ 25, VALUE_OPT_USER,
1113      /* equiv idx, value */ 25, VALUE_OPT_USER,
1114      /* equivalenced to  */ NO_EQUIVALENT,
1115      /* min, max, act ct */ 0, 1, 0,
1116      /* opt state flags  */ USER_FLAGS, 0,
1117      /* last opt argumnt */ { NULL }, /* --user */
1118      /* arg list/cookie  */ NULL,
1119      /* must/cannot opts */ NULL, NULL,
1120      /* option proc      */ NULL,
1121      /* desc, NAME, name */ USER_DESC, USER_NAME, USER_name,
1122      /* disablement strs */ NULL, NULL },
1123 
1124   {  /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
1125      /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
1126      /* equivalenced to  */ NO_EQUIVALENT,
1127      /* min, max, act ct */ 0, 1, 0,
1128      /* opt state flags  */ UPDATEINTERVAL_FLAGS, 0,
1129      /* last opt argumnt */ { NULL }, /* --updateinterval */
1130      /* arg list/cookie  */ NULL,
1131      /* must/cannot opts */ NULL, NULL,
1132      /* option proc      */ optionNumericVal,
1133      /* desc, NAME, name */ UPDATEINTERVAL_DESC, UPDATEINTERVAL_NAME, UPDATEINTERVAL_name,
1134      /* disablement strs */ NULL, NULL },
1135 
1136   {  /* entry idx, value */ 27, VALUE_OPT_VAR,
1137      /* equiv idx, value */ 27, VALUE_OPT_VAR,
1138      /* equivalenced to  */ NO_EQUIVALENT,
1139      /* min, max, act ct */ 0, NOLIMIT, 0,
1140      /* opt state flags  */ VAR_FLAGS, 0,
1141      /* last opt argumnt */ { NULL }, /* --var */
1142      /* arg list/cookie  */ NULL,
1143      /* must/cannot opts */ NULL, NULL,
1144      /* option proc      */ optionStackArg,
1145      /* desc, NAME, name */ VAR_DESC, VAR_NAME, VAR_name,
1146      /* disablement strs */ NULL, NULL },
1147 
1148   {  /* entry idx, value */ 28, VALUE_OPT_DVAR,
1149      /* equiv idx, value */ 28, VALUE_OPT_DVAR,
1150      /* equivalenced to  */ NO_EQUIVALENT,
1151      /* min, max, act ct */ 0, NOLIMIT, 0,
1152      /* opt state flags  */ DVAR_FLAGS, 0,
1153      /* last opt argumnt */ { NULL }, /* --dvar */
1154      /* arg list/cookie  */ NULL,
1155      /* must/cannot opts */ NULL, NULL,
1156      /* option proc      */ optionStackArg,
1157      /* desc, NAME, name */ DVAR_DESC, DVAR_NAME, DVAR_name,
1158      /* disablement strs */ NULL, NULL },
1159 
1160   {  /* entry idx, value */ 29, VALUE_OPT_WAIT_SYNC,
1161      /* equiv idx, value */ 29, VALUE_OPT_WAIT_SYNC,
1162      /* equivalenced to  */ NO_EQUIVALENT,
1163      /* min, max, act ct */ 0, 1, 0,
1164      /* opt state flags  */ WAIT_SYNC_FLAGS, 0,
1165      /* last opt argumnt */ { NULL }, /* --wait-sync */
1166      /* arg list/cookie  */ NULL,
1167      /* must/cannot opts */ NULL, aWait_SyncCantList,
1168      /* option proc      */ optionNumericVal,
1169      /* desc, NAME, name */ WAIT_SYNC_DESC, WAIT_SYNC_NAME, WAIT_SYNC_name,
1170      /* disablement strs */ NULL, NULL },
1171 
1172   {  /* entry idx, value */ 30, VALUE_OPT_SLEW,
1173      /* equiv idx, value */ 30, VALUE_OPT_SLEW,
1174      /* equivalenced to  */ NO_EQUIVALENT,
1175      /* min, max, act ct */ 0, 1, 0,
1176      /* opt state flags  */ SLEW_FLAGS, 0,
1177      /* last opt argumnt */ { NULL }, /* --slew */
1178      /* arg list/cookie  */ NULL,
1179      /* must/cannot opts */ NULL, NULL,
1180      /* option proc      */ NULL,
1181      /* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
1182      /* disablement strs */ NULL, NULL },
1183 
1184   {  /* entry idx, value */ 31, VALUE_OPT_USEPCC,
1185      /* equiv idx, value */ 31, VALUE_OPT_USEPCC,
1186      /* equivalenced to  */ NO_EQUIVALENT,
1187      /* min, max, act ct */ 0, 1, 0,
1188      /* opt state flags  */ USEPCC_FLAGS, 0,
1189      /* last opt argumnt */ { NULL }, /* --usepcc */
1190      /* arg list/cookie  */ NULL,
1191      /* must/cannot opts */ NULL, NULL,
1192      /* option proc      */ NULL,
1193      /* desc, NAME, name */ USEPCC_DESC, USEPCC_NAME, USEPCC_name,
1194      /* disablement strs */ NULL, NULL },
1195 
1196   {  /* entry idx, value */ 32, VALUE_OPT_PCCFREQ,
1197      /* equiv idx, value */ 32, VALUE_OPT_PCCFREQ,
1198      /* equivalenced to  */ NO_EQUIVALENT,
1199      /* min, max, act ct */ 0, 1, 0,
1200      /* opt state flags  */ PCCFREQ_FLAGS, 0,
1201      /* last opt argumnt */ { NULL }, /* --pccfreq */
1202      /* arg list/cookie  */ NULL,
1203      /* must/cannot opts */ NULL, NULL,
1204      /* option proc      */ NULL,
1205      /* desc, NAME, name */ PCCFREQ_DESC, PCCFREQ_NAME, PCCFREQ_name,
1206      /* disablement strs */ NULL, NULL },
1207 
1208   {  /* entry idx, value */ 33, VALUE_OPT_MDNS,
1209      /* equiv idx, value */ 33, VALUE_OPT_MDNS,
1210      /* equivalenced to  */ NO_EQUIVALENT,
1211      /* min, max, act ct */ 0, 1, 0,
1212      /* opt state flags  */ MDNS_FLAGS, 0,
1213      /* last opt argumnt */ { NULL }, /* --mdns */
1214      /* arg list/cookie  */ NULL,
1215      /* must/cannot opts */ NULL, NULL,
1216      /* option proc      */ NULL,
1217      /* desc, NAME, name */ MDNS_DESC, MDNS_NAME, MDNS_name,
1218      /* disablement strs */ NULL, NULL },
1219 
1220   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
1221      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
1222      /* equivalenced to  */ NO_EQUIVALENT,
1223      /* min, max, act ct */ 0, 1, 0,
1224      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
1225      /* last opt argumnt */ { NULL },
1226      /* arg list/cookie  */ NULL,
1227      /* must/cannot opts */ NULL, NULL,
1228      /* option proc      */ VER_PROC,
1229      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
1230      /* disablement strs */ NULL, NULL },
1231 
1232 
1233 
1234   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
1235      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
1236      /* equivalenced to  */ NO_EQUIVALENT,
1237      /* min, max, act ct */ 0, 1, 0,
1238      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
1239      /* last opt argumnt */ { NULL },
1240      /* arg list/cookie  */ NULL,
1241      /* must/cannot opts */ NULL, NULL,
1242      /* option proc      */ doUsageOpt,
1243      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
1244      /* disablement strs */ NULL, NULL },
1245 
1246   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
1247      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
1248      /* equivalenced to  */ NO_EQUIVALENT,
1249      /* min, max, act ct */ 0, 1, 0,
1250      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
1251      /* last opt argumnt */ { NULL },
1252      /* arg list/cookie  */ NULL,
1253      /* must/cannot opts */ NULL,  NULL,
1254      /* option proc      */ optionPagedUsage,
1255      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
1256      /* disablement strs */ NULL, NULL }
1257 };
1258 
1259 
1260 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1261 /** Reference to the upper cased version of ntpd. */
1262 #define zPROGNAME       (ntpd_opt_strs+2822)
1263 /** Reference to the title line for ntpd usage. */
1264 #define zUsageTitle     (ntpd_opt_strs+2827)
1265 /** There is no ntpd configuration file. */
1266 #define zRcName         NULL
1267 /** There are no directories to search for ntpd config files. */
1268 #define apzHomeList     NULL
1269 /** The ntpd program bug email address. */
1270 #define zBugsAddr       (ntpd_opt_strs+2960)
1271 /** Clarification/explanation of what ntpd does. */
1272 #define zExplain        (ntpd_opt_strs+2994)
1273 /** Extra detail explaining what ntpd does. */
1274 #define zDetail         (NULL)
1275 /** The full version string for ntpd. */
1276 #define zFullVersion    (ntpd_opt_strs+2996)
1277 /* extracted from optcode.tlib near line 364 */
1278 
1279 #if defined(ENABLE_NLS)
1280 # define OPTPROC_BASE OPTPROC_TRANSLATE
1281   static tOptionXlateProc translate_option_strings;
1282 #else
1283 # define OPTPROC_BASE OPTPROC_NONE
1284 # define translate_option_strings NULL
1285 #endif /* ENABLE_NLS */
1286 
1287 #define ntpd_full_usage (NULL)
1288 #define ntpd_short_usage (NULL)
1289 
1290 #endif /* not defined __doxygen__ */
1291 
1292 /*
1293  *  Create the static procedure(s) declared above.
1294  */
1295 /**
1296  * The callout function that invokes the optionUsage function.
1297  *
1298  * @param[in] opts the AutoOpts option description structure
1299  * @param[in] od   the descriptor for the "help" (usage) option.
1300  * @noreturn
1301  */
1302 static void
1303 doUsageOpt(tOptions * opts, tOptDesc * od)
1304 {
1305     int ex_code;
1306     ex_code = NTPD_EXIT_SUCCESS;
1307     optionUsage(&ntpdOptions, ex_code);
1308     /* NOTREACHED */
1309     exit(1);
1310     (void)opts;
1311     (void)od;
1312 }
1313 
1314 #if ! defined(TEST_NTPD_OPTS)
1315 
1316 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1317 /**
1318  * Code to handle the debug-level option.
1319  *
1320  * @param[in] pOptions the ntpd options data structure
1321  * @param[in,out] pOptDesc the option descriptor for this option.
1322  */
1323 static void
1324 doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
1325 {
1326     /*
1327      * Be sure the flag-code[0] handles special values for the options pointer
1328      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1329      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1330      * reset its state.
1331      */
1332     /* extracted from debug-opt.def, line 15 */
1333 OPT_VALUE_SET_DEBUG_LEVEL++;
1334     (void)pOptDesc;
1335     (void)pOptions;
1336 }
1337 #endif /* defined(TEST_NTPD_OPTS) */
1338 /* extracted from optmain.tlib near line 46 */
1339 
1340 #if defined(TEST_NTPD_OPTS) /* TEST-MAIN-PROCEDURE: */
1341 
1342 extern void optionPutShell(tOptions*);
1343 
1344 /**
1345  * Generated main procedure.  This will emit text that a Bourne shell can
1346  * process to handle its command line arguments.
1347  *
1348  * @param[in] argc argument count
1349  * @param[in] argv argument vector
1350  * @returns program exit code
1351  */
1352 int
1353 main(int argc, char ** argv)
1354 {
1355     int res = NTPD_EXIT_SUCCESS;
1356     (void)optionProcess(&ntpdOptions, argc, argv);
1357     optionPutShell(&ntpdOptions);
1358     res = ferror(stdout);
1359     if (res != 0)
1360         fputs("output error writing to stdout\n", stderr);
1361     return res;
1362 }
1363 #endif  /* TEST_NTPD_OPTS END-TEST-MAIN-PROCEDURE */
1364 /* extracted from optmain.tlib near line 1245 */
1365 
1366 /**
1367  * The directory containing the data associated with ntpd.
1368  */
1369 #ifndef  PKGDATADIR
1370 # define PKGDATADIR ""
1371 #endif
1372 
1373 /**
1374  * Information about the person or institution that packaged ntpd
1375  * for the current distribution.
1376  */
1377 #ifndef  WITH_PACKAGER
1378 # define ntpd_packager_info NULL
1379 #else
1380 /** Packager information for ntpd. */
1381 static char const ntpd_packager_info[] =
1382     "Packaged by " WITH_PACKAGER
1383 
1384 # ifdef WITH_PACKAGER_VERSION
1385         " ("WITH_PACKAGER_VERSION")"
1386 # endif
1387 
1388 # ifdef WITH_PACKAGER_BUG_REPORTS
1389     "\nReport ntpd bugs to " WITH_PACKAGER_BUG_REPORTS
1390 # endif
1391     "\n";
1392 #endif
1393 #ifndef __doxygen__
1394 
1395 #endif /* __doxygen__ */
1396 /**
1397  * The option definitions for ntpd.  The one structure that
1398  * binds them all.
1399  */
1400 tOptions ntpdOptions = {
1401     OPTIONS_STRUCT_VERSION,
1402     0, NULL,                    /* original argc + argv    */
1403     ( OPTPROC_BASE
1404     + OPTPROC_ERRSTOP
1405     + OPTPROC_SHORTOPT
1406     + OPTPROC_LONGOPT
1407     + OPTPROC_NO_REQ_OPT
1408     + OPTPROC_ENVIRON
1409     + OPTPROC_MISUSE
1410     + OPTPROC_SHELL_OUTPUT ),
1411     0, NULL,                    /* current option index, current option */
1412     NULL,         NULL,         zPROGNAME,
1413     zRcName,      zCopyright,   zLicenseDescrip,
1414     zFullVersion, apzHomeList,  zUsageTitle,
1415     zExplain,     zDetail,      optDesc,
1416     zBugsAddr,                  /* address to send bugs to */
1417     NULL, NULL,                 /* extensions/saved state  */
1418     optionUsage, /* usage procedure */
1419     translate_option_strings,   /* translation procedure */
1420     /*
1421      *  Indexes to special options
1422      */
1423     { INDEX_OPT_MORE_HELP, /* more-help option index */
1424       NO_EQUIVALENT, /* save option index */
1425       NO_EQUIVALENT, /* '-#' option index */
1426       NO_EQUIVALENT /* index of default opt */
1427     },
1428     37 /* full option count */, 34 /* user option count */,
1429     ntpd_full_usage, ntpd_short_usage,
1430     NULL, NULL,
1431     PKGDATADIR, ntpd_packager_info
1432 };
1433 
1434 #if ENABLE_NLS
1435 /**
1436  * This code is designed to translate translatable option text for the
1437  * ntpd program.  These translations happen upon entry
1438  * to optionProcess().
1439  */
1440 #include <stdio.h>
1441 #include <stdlib.h>
1442 #include <string.h>
1443 #include <unistd.h>
1444 #ifdef HAVE_DCGETTEXT
1445 # include <gettext.h>
1446 #endif
1447 #include <autoopts/usage-txt.h>
1448 
1449 static char * AO_gettext(char const * pz);
1450 static void   coerce_it(void ** s);
1451 
1452 /**
1453  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
1454  * to convert from English to the target language, then strdup-duplicates the
1455  * result string.  It tries the "libopts" domain first, then whatever has been
1456  * set via the \a textdomain(3) call.
1457  *
1458  * @param[in] pz the input text used as a lookup key.
1459  * @returns the translated text (if there is one),
1460  *   or the original text (if not).
1461  */
1462 static char *
1463 AO_gettext(char const * pz)
1464 {
1465     char * res;
1466     if (pz == NULL)
1467         return NULL;
1468 #ifdef HAVE_DCGETTEXT
1469     /*
1470      * While processing the option_xlateable_txt data, try to use the
1471      * "libopts" domain.  Once we switch to the option descriptor data,
1472      * do *not* use that domain.
1473      */
1474     if (option_xlateable_txt.field_ct != 0) {
1475         res = dgettext("libopts", pz);
1476         if (res == pz)
1477             res = (char *)(void *)_(pz);
1478     } else
1479         res = (char *)(void *)_(pz);
1480 #else
1481     res = (char *)(void *)_(pz);
1482 #endif
1483     if (res == pz)
1484         return res;
1485     res = strdup(res);
1486     if (res == NULL) {
1487         fputs(_("No memory for duping translated strings\n"), stderr);
1488         exit(NTPD_EXIT_FAILURE);
1489     }
1490     return res;
1491 }
1492 
1493 /**
1494  * All the pointers we use are marked "* const", but they are stored in
1495  * writable memory.  Coerce the mutability and set the pointer.
1496  */
1497 static void coerce_it(void ** s) { *s = AO_gettext(*s);
1498 }
1499 
1500 /**
1501  * Translate all the translatable strings in the ntpdOptions
1502  * structure defined above.  This is done only once.
1503  */
1504 static void
1505 translate_option_strings(void)
1506 {
1507     tOptions * const opts = &ntpdOptions;
1508 
1509     /*
1510      *  Guard against re-translation.  It won't work.  The strings will have
1511      *  been changed by the first pass through this code.  One shot only.
1512      */
1513     if (option_xlateable_txt.field_ct != 0) {
1514         /*
1515          *  Do the translations.  The first pointer follows the field count
1516          *  field.  The field count field is the size of a pointer.
1517          */
1518         char ** ppz = (char**)(void*)&(option_xlateable_txt);
1519         int     ix  = option_xlateable_txt.field_ct;
1520 
1521         do {
1522             ppz++; /* skip over field_ct */
1523             *ppz = AO_gettext(*ppz);
1524         } while (--ix > 0);
1525         /* prevent re-translation and disable "libopts" domain lookup */
1526         option_xlateable_txt.field_ct = 0;
1527 
1528         coerce_it((void*)&(opts->pzCopyright));
1529         coerce_it((void*)&(opts->pzCopyNotice));
1530         coerce_it((void*)&(opts->pzFullVersion));
1531         coerce_it((void*)&(opts->pzUsageTitle));
1532         coerce_it((void*)&(opts->pzExplain));
1533         coerce_it((void*)&(opts->pzDetail));
1534         {
1535             tOptDesc * od = opts->pOptDesc;
1536             for (ix = opts->optCt; ix > 0; ix--, od++)
1537                 coerce_it((void*)&(od->pzText));
1538         }
1539     }
1540 }
1541 #endif /* ENABLE_NLS */
1542 
1543 #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
1544 /** I18N function strictly for xgettext.  Do not compile. */
1545 static void bogus_function(void) {
1546   /* TRANSLATORS:
1547 
1548      The following dummy function was crated solely so that xgettext can
1549      extract the correct strings.  These strings are actually referenced
1550      by a field name in the ntpdOptions structure noted in the
1551      comments below.  The literal text is defined in ntpd_opt_strs.
1552 
1553      NOTE: the strings below are segmented with respect to the source string
1554      ntpd_opt_strs.  The strings above are handed off for translation
1555      at run time a paragraph at a time.  Consequently, they are presented here
1556      for translation a paragraph at a time.
1557 
1558      ALSO: often the description for an option will reference another option
1559      by name.  These are set off with apostrophe quotes (I hope).  Do not
1560      translate option names.
1561    */
1562   /* referenced via ntpdOptions.pzCopyright */
1563   puts(_("ntpd 4.2.7p404\n\
1564 Copyright (C) 1970-2013 The University of Delaware, all rights reserved.\n\
1565 This is free software. It is licensed for use, modification and\n\
1566 redistribution under the terms of the NTP License, copies of which\n\
1567 can be seen at:\n"));
1568   puts(_("  <http://ntp.org/license>\n\
1569   <http://opensource.org/licenses/ntp-license.php>\n"));
1570 
1571   /* referenced via ntpdOptions.pzCopyNotice */
1572   puts(_("Permission to use, copy, modify, and distribute this software and its\n\
1573 documentation for any purpose with or without fee is hereby granted,\n\
1574 provided that the above copyright notice appears in all copies and that\n\
1575 both the copyright notice and this permission notice appear in supporting\n\
1576 documentation, and that the name The University of Delaware not be used in\n\
1577 advertising or publicity pertaining to distribution of the software without\n\
1578 specific, written prior permission.  The University of Delaware makes no\n\
1579 representations about the suitability this software for any purpose.  It is\n\
1580 provided \"as is\" without express or implied warranty.\n"));
1581 
1582   /* referenced via ntpdOptions.pOptDesc->pzText */
1583   puts(_("Force IPv4 DNS name resolution"));
1584 
1585   /* referenced via ntpdOptions.pOptDesc->pzText */
1586   puts(_("Force IPv6 DNS name resolution"));
1587 
1588   /* referenced via ntpdOptions.pOptDesc->pzText */
1589   puts(_("Require crypto authentication"));
1590 
1591   /* referenced via ntpdOptions.pOptDesc->pzText */
1592   puts(_("Do not require crypto authentication"));
1593 
1594   /* referenced via ntpdOptions.pOptDesc->pzText */
1595   puts(_("Allow us to sync to broadcast servers"));
1596 
1597   /* referenced via ntpdOptions.pOptDesc->pzText */
1598   puts(_("configuration file name"));
1599 
1600   /* referenced via ntpdOptions.pOptDesc->pzText */
1601   puts(_("Increase debug verbosity level"));
1602 
1603   /* referenced via ntpdOptions.pOptDesc->pzText */
1604   puts(_("Set the debug verbosity level"));
1605 
1606   /* referenced via ntpdOptions.pOptDesc->pzText */
1607   puts(_("frequency drift file name"));
1608 
1609   /* referenced via ntpdOptions.pOptDesc->pzText */
1610   puts(_("Allow the first adjustment to be Big"));
1611 
1612   /* referenced via ntpdOptions.pOptDesc->pzText */
1613   puts(_("Jail directory"));
1614 
1615   /* referenced via ntpdOptions.pOptDesc->pzText */
1616   puts(_("built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs"));
1617 
1618   /* referenced via ntpdOptions.pOptDesc->pzText */
1619   puts(_("Listen on an interface name or address"));
1620 
1621   /* referenced via ntpdOptions.pOptDesc->pzText */
1622   puts(_("path to symmetric keys"));
1623 
1624   /* referenced via ntpdOptions.pOptDesc->pzText */
1625   puts(_("path to the log file"));
1626 
1627   /* referenced via ntpdOptions.pOptDesc->pzText */
1628   puts(_("Do not listen to virtual interfaces"));
1629 
1630   /* referenced via ntpdOptions.pOptDesc->pzText */
1631   puts(_("Modify Multimedia Timer (Windows only)"));
1632 
1633   /* referenced via ntpdOptions.pOptDesc->pzText */
1634   puts(_("Do not fork"));
1635 
1636   /* referenced via ntpdOptions.pOptDesc->pzText */
1637   puts(_("Run at high priority"));
1638 
1639   /* referenced via ntpdOptions.pOptDesc->pzText */
1640   puts(_("path to the PID file"));
1641 
1642   /* referenced via ntpdOptions.pOptDesc->pzText */
1643   puts(_("Process priority"));
1644 
1645   /* referenced via ntpdOptions.pOptDesc->pzText */
1646   puts(_("Set the time and quit"));
1647 
1648   /* referenced via ntpdOptions.pOptDesc->pzText */
1649   puts(_("Broadcast/propagation delay"));
1650 
1651   /* referenced via ntpdOptions.pOptDesc->pzText */
1652   puts(_("Save parsed configuration and quit"));
1653 
1654   /* referenced via ntpdOptions.pOptDesc->pzText */
1655   puts(_("Statistics file location"));
1656 
1657   /* referenced via ntpdOptions.pOptDesc->pzText */
1658   puts(_("Trusted key number"));
1659 
1660   /* referenced via ntpdOptions.pOptDesc->pzText */
1661   puts(_("Run as userid (or userid:groupid)"));
1662 
1663   /* referenced via ntpdOptions.pOptDesc->pzText */
1664   puts(_("built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs"));
1665 
1666   /* referenced via ntpdOptions.pOptDesc->pzText */
1667   puts(_("interval in seconds between scans for new or dropped interfaces"));
1668 
1669   /* referenced via ntpdOptions.pOptDesc->pzText */
1670   puts(_("make ARG an ntp variable (RW)"));
1671 
1672   /* referenced via ntpdOptions.pOptDesc->pzText */
1673   puts(_("make ARG an ntp variable (RW|DEF)"));
1674 
1675   /* referenced via ntpdOptions.pOptDesc->pzText */
1676   puts(_("Seconds to wait for first clock sync"));
1677 
1678   /* referenced via ntpdOptions.pOptDesc->pzText */
1679   puts(_("Slew up to 600 seconds"));
1680 
1681   /* referenced via ntpdOptions.pOptDesc->pzText */
1682   puts(_("Use CPU cycle counter (Windows only)"));
1683 
1684   /* referenced via ntpdOptions.pOptDesc->pzText */
1685   puts(_("Force CPU cycle counter use (Windows only)"));
1686 
1687   /* referenced via ntpdOptions.pOptDesc->pzText */
1688   puts(_("Register with mDNS as a NTP server"));
1689 
1690   /* referenced via ntpdOptions.pOptDesc->pzText */
1691   puts(_("display extended usage information and exit"));
1692 
1693   /* referenced via ntpdOptions.pOptDesc->pzText */
1694   puts(_("extended usage information passed thru pager"));
1695 
1696   /* referenced via ntpdOptions.pOptDesc->pzText */
1697   puts(_("output version information and exit"));
1698 
1699   /* referenced via ntpdOptions.pzUsageTitle */
1700   puts(_("ntpd - NTP daemon program - Ver. 4.2.7p404\n\
1701 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
1702 \t\t[ <server1> ... <serverN> ]\n"));
1703 
1704   /* referenced via ntpdOptions.pzExplain */
1705   puts(_("\n"));
1706 
1707   /* referenced via ntpdOptions.pzFullVersion */
1708   puts(_("ntpd 4.2.7p404"));
1709 
1710   /* referenced via ntpdOptions.pzFullUsage */
1711   puts(_("<<<NOT-FOUND>>>"));
1712 
1713   /* referenced via ntpdOptions.pzShortUsage */
1714   puts(_("<<<NOT-FOUND>>>"));
1715   /* LIBOPTS-MESSAGES: */
1716 #line 67 "../autoopts.c"
1717   puts(_("allocation of %d bytes failed\n"));
1718 #line 93 "../autoopts.c"
1719   puts(_("allocation of %d bytes failed\n"));
1720 #line 53 "../init.c"
1721   puts(_("AutoOpts function called without option descriptor\n"));
1722 #line 90 "../init.c"
1723   puts(_("\tThis exceeds the compiled library version:  "));
1724 #line 88 "../init.c"
1725   puts(_("Automated Options Processing Error!\n"
1726        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
1727 #line 80 "../autoopts.c"
1728   puts(_("realloc of %d bytes at 0x%p failed\n"));
1729 #line 92 "../init.c"
1730   puts(_("\tThis is less than the minimum library version:  "));
1731 #line 121 "../version.c"
1732   puts(_("Automated Options version %s\n"
1733        "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n"));
1734 #line 82 "../makeshell.c"
1735   puts(_("(AutoOpts bug):  %s.\n"));
1736 #line 90 "../reset.c"
1737   puts(_("optionResetOpt() called, but reset-option not configured"));
1738 #line 292 "../usage.c"
1739   puts(_("could not locate the 'help' option"));
1740 #line 336 "../autoopts.c"
1741   puts(_("optionProcess() was called with invalid data"));
1742 #line 748 "../usage.c"
1743   puts(_("invalid argument type specified"));
1744 #line 598 "../find.c"
1745   puts(_("defaulted to option with optional arg"));
1746 #line 76 "../alias.c"
1747   puts(_("aliasing option is out of range."));
1748 #line 234 "../enum.c"
1749   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
1750 #line 108 "../find.c"
1751   puts(_("  The following options match:\n"));
1752 #line 293 "../find.c"
1753   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
1754 #line 161 "../check.c"
1755   puts(_("%s: Command line arguments required\n"));
1756 #line 43 "../alias.c"
1757   puts(_("%d %s%s options allowed\n"));
1758 #line 89 "../makeshell.c"
1759   puts(_("%s error %d (%s) calling %s for '%s'\n"));
1760 #line 301 "../makeshell.c"
1761   puts(_("interprocess pipe"));
1762 #line 168 "../version.c"
1763   puts(_("error: version option argument '%c' invalid.  Use:\n"
1764        "\t'v' - version only\n"
1765        "\t'c' - version and copyright\n"
1766        "\t'n' - version and full copyright notice\n"));
1767 #line 58 "../check.c"
1768   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
1769 #line 217 "../find.c"
1770   puts(_("%s: The '%s' option has been disabled."));
1771 #line 430 "../find.c"
1772   puts(_("%s: The '%s' option has been disabled."));
1773 #line 38 "../alias.c"
1774   puts(_("-equivalence"));
1775 #line 469 "../find.c"
1776   puts(_("%s: illegal option -- %c\n"));
1777 #line 110 "../reset.c"
1778   puts(_("%s: illegal option -- %c\n"));
1779 #line 271 "../find.c"
1780   puts(_("%s: illegal option -- %s\n"));
1781 #line 755 "../find.c"
1782   puts(_("%s: illegal option -- %s\n"));
1783 #line 118 "../reset.c"
1784   puts(_("%s: illegal option -- %s\n"));
1785 #line 335 "../find.c"
1786   puts(_("%s: unknown vendor extension option -- %s\n"));
1787 #line 159 "../enum.c"
1788   puts(_("  or an integer from %d through %d\n"));
1789 #line 169 "../enum.c"
1790   puts(_("  or an integer from %d through %d\n"));
1791 #line 747 "../usage.c"
1792   puts(_("%s error:  invalid option descriptor for %s\n"));
1793 #line 1081 "../usage.c"
1794   puts(_("%s error:  invalid option descriptor for %s\n"));
1795 #line 385 "../find.c"
1796   puts(_("%s: invalid option name: %s\n"));
1797 #line 527 "../find.c"
1798   puts(_("%s: The '%s' option requires an argument.\n"));
1799 #line 156 "../autoopts.c"
1800   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
1801        "\t'%s' and '%s'."));
1802 #line 94 "../check.c"
1803   puts(_("%s error:  The %s option is required\n"));
1804 #line 632 "../find.c"
1805   puts(_("%s: The '%s' option cannot have an argument.\n"));
1806 #line 151 "../check.c"
1807   puts(_("%s: Command line arguments are not allowed.\n"));
1808 #line 535 "../save.c"
1809   puts(_("error %d (%s) creating %s\n"));
1810 #line 234 "../enum.c"
1811   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
1812 #line 93 "../reset.c"
1813   puts(_("%s error: The '%s' option requires an argument.\n"));
1814 #line 184 "../save.c"
1815   puts(_("error %d (%s) stat-ing %s\n"));
1816 #line 238 "../save.c"
1817   puts(_("error %d (%s) stat-ing %s\n"));
1818 #line 143 "../restore.c"
1819   puts(_("%s error: no saved option state\n"));
1820 #line 231 "../autoopts.c"
1821   puts(_("'%s' is not a command line option.\n"));
1822 #line 114 "../time.c"
1823   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
1824 #line 132 "../save.c"
1825   puts(_("'%s' not defined\n"));
1826 #line 53 "../time.c"
1827   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
1828 #line 92 "../check.c"
1829   puts(_("%s error:  The %s option must appear %d times.\n"));
1830 #line 157 "../numeric.c"
1831   puts(_("%s error:  '%s' is not a recognizable number.\n"));
1832 #line 200 "../enum.c"
1833   puts(_("%s error:  %s exceeds %s keyword count\n"));
1834 #line 330 "../usage.c"
1835   puts(_("Try '%s %s' for more information.\n"));
1836 #line 45 "../alias.c"
1837   puts(_("one %s%s option allowed\n"));
1838 #line 203 "../makeshell.c"
1839   puts(_("standard output"));
1840 #line 938 "../makeshell.c"
1841   puts(_("standard output"));
1842 #line 274 "../usage.c"
1843   puts(_("standard output"));
1844 #line 415 "../usage.c"
1845   puts(_("standard output"));
1846 #line 625 "../usage.c"
1847   puts(_("standard output"));
1848 #line 175 "../version.c"
1849   puts(_("standard output"));
1850 #line 274 "../usage.c"
1851   puts(_("standard error"));
1852 #line 415 "../usage.c"
1853   puts(_("standard error"));
1854 #line 625 "../usage.c"
1855   puts(_("standard error"));
1856 #line 175 "../version.c"
1857   puts(_("standard error"));
1858 #line 203 "../makeshell.c"
1859   puts(_("write"));
1860 #line 938 "../makeshell.c"
1861   puts(_("write"));
1862 #line 273 "../usage.c"
1863   puts(_("write"));
1864 #line 414 "../usage.c"
1865   puts(_("write"));
1866 #line 624 "../usage.c"
1867   puts(_("write"));
1868 #line 174 "../version.c"
1869   puts(_("write"));
1870 #line 60 "../numeric.c"
1871   puts(_("%s error:  %s option value %ld is out of range.\n"));
1872 #line 44 "../check.c"
1873   puts(_("%s error:  %s option requires the %s option\n"));
1874 #line 131 "../save.c"
1875   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1876 #line 183 "../save.c"
1877   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1878 #line 237 "../save.c"
1879   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1880 #line 256 "../save.c"
1881   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1882 #line 534 "../save.c"
1883   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1884   /* END-LIBOPTS-MESSAGES */
1885 
1886   /* USAGE-TEXT: */
1887 #line 873 "../usage.c"
1888   puts(_("\t\t\t\t- an alternate for '%s'\n"));
1889 #line 1148 "../usage.c"
1890   puts(_("Version, usage and configuration options:"));
1891 #line 924 "../usage.c"
1892   puts(_("\t\t\t\t- default option for unnamed options\n"));
1893 #line 837 "../usage.c"
1894   puts(_("\t\t\t\t- disabled as '--%s'\n"));
1895 #line 1117 "../usage.c"
1896   puts(_(" --- %-14s %s\n"));
1897 #line 1115 "../usage.c"
1898   puts(_("This option has been disabled"));
1899 #line 864 "../usage.c"
1900   puts(_("\t\t\t\t- enabled by default\n"));
1901 #line 40 "../alias.c"
1902   puts(_("%s error:  only "));
1903 #line 1194 "../usage.c"
1904   puts(_(" - examining environment variables named %s_*\n"));
1905 #line 168 "../file.c"
1906   puts(_("\t\t\t\t- file must not pre-exist\n"));
1907 #line 172 "../file.c"
1908   puts(_("\t\t\t\t- file must pre-exist\n"));
1909 #line 380 "../usage.c"
1910   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1911        "hyphen and the flag character.\n"));
1912 #line 916 "../makeshell.c"
1913   puts(_("\n"
1914        "= = = = = = = =\n\n"
1915        "This incarnation of genshell will produce\n"
1916        "a shell script to parse the options for %s:\n\n"));
1917 #line 166 "../enum.c"
1918   puts(_("  or an integer mask with any of the lower %d bits set\n"));
1919 #line 897 "../usage.c"
1920   puts(_("\t\t\t\t- is a set membership option\n"));
1921 #line 918 "../usage.c"
1922   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1923 #line 382 "../usage.c"
1924   puts(_("Options are specified by single or double hyphens and their name.\n"));
1925 #line 904 "../usage.c"
1926   puts(_("\t\t\t\t- may appear multiple times\n"));
1927 #line 891 "../usage.c"
1928   puts(_("\t\t\t\t- may not be preset\n"));
1929 #line 1309 "../usage.c"
1930   puts(_("   Arg Option-Name    Description\n"));
1931 #line 1245 "../usage.c"
1932   puts(_("  Flg Arg Option-Name    Description\n"));
1933 #line 1303 "../usage.c"
1934   puts(_("  Flg Arg Option-Name    Description\n"));
1935 #line 1304 "../usage.c"
1936   puts(_(" %3s %s"));
1937 #line 1310 "../usage.c"
1938   puts(_(" %3s %s"));
1939 #line 387 "../usage.c"
1940   puts(_("The '-#<number>' option may omit the hash char\n"));
1941 #line 383 "../usage.c"
1942   puts(_("All arguments are named options.\n"));
1943 #line 971 "../usage.c"
1944   puts(_(" - reading file %s"));
1945 #line 409 "../usage.c"
1946   puts(_("\n"
1947        "Please send bug reports to:  <%s>\n"));
1948 #line 100 "../version.c"
1949   puts(_("\n"
1950        "Please send bug reports to:  <%s>\n"));
1951 #line 129 "../version.c"
1952   puts(_("\n"
1953        "Please send bug reports to:  <%s>\n"));
1954 #line 903 "../usage.c"
1955   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1956 #line 944 "../usage.c"
1957   puts(_("\n"
1958        "The following option preset mechanisms are supported:\n"));
1959 #line 1192 "../usage.c"
1960   puts(_("\n"
1961        "The following option preset mechanisms are supported:\n"));
1962 #line 682 "../usage.c"
1963   puts(_("prohibits these options:\n"));
1964 #line 677 "../usage.c"
1965   puts(_("prohibits the option '%s'\n"));
1966 #line 81 "../numeric.c"
1967   puts(_("%s%ld to %ld"));
1968 #line 79 "../numeric.c"
1969   puts(_("%sgreater than or equal to %ld"));
1970 #line 75 "../numeric.c"
1971   puts(_("%s%ld exactly"));
1972 #line 68 "../numeric.c"
1973   puts(_("%sit must lie in one of the ranges:\n"));
1974 #line 68 "../numeric.c"
1975   puts(_("%sit must be in the range:\n"));
1976 #line 88 "../numeric.c"
1977   puts(_(", or\n"));
1978 #line 66 "../numeric.c"
1979   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1980 #line 77 "../numeric.c"
1981   puts(_("%sless than or equal to %ld"));
1982 #line 390 "../usage.c"
1983   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
1984 #line 652 "../usage.c"
1985   puts(_("requires the option '%s'\n"));
1986 #line 655 "../usage.c"
1987   puts(_("requires these options:\n"));
1988 #line 1321 "../usage.c"
1989   puts(_("   Arg Option-Name   Req?  Description\n"));
1990 #line 1315 "../usage.c"
1991   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
1992 #line 167 "../enum.c"
1993   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
1994        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1995        "will set them all.  Multiple entries may be passed as an option\n"
1996        "argument list.\n"));
1997 #line 910 "../usage.c"
1998   puts(_("\t\t\t\t- may appear up to %d times\n"));
1999 #line 77 "../enum.c"
2000   puts(_("The valid \"%s\" option keywords are:\n"));
2001 #line 1152 "../usage.c"
2002   puts(_("The next option supports vendor supported extra options:"));
2003 #line 773 "../usage.c"
2004   puts(_("These additional options are:"));
2005   /* END-USAGE-TEXT */
2006 }
2007 #endif /* uncompilable code */
2008 #ifdef  __cplusplus
2009 }
2010 #endif
2011 /* ntpd-opts.c ends here */
2012