xref: /netbsd-src/external/bsd/ntp/dist/sntp/sntp-opts.c (revision 2e2322c9c07009df921d11b1268f8506affbb8ba)
1 /*	$NetBSD: sntp-opts.c,v 1.10 2016/11/22 03:09:31 christos Exp $	*/
2 
3 /*
4  *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
5  *
6  *  It has been AutoGen-ed  November 21, 2016 at 07:38:40 AM by AutoGen 5.18.5
7  *  From the definitions    sntp-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 sntp 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 sntp program is copyrighted and licensed
21  * under the following terms:
22  *
23  *  Copyright (C) 1992-2016 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 "sntp-opts.h"
44 #include <sys/types.h>
45 
46 #include <limits.h>
47 #include <stdio.h>
48 #include <stdlib.h>
49 #include <errno.h>
50 
51 #ifdef  __cplusplus
52 extern "C" {
53 #endif
54 extern FILE * option_usage_fp;
55 #define zCopyright      (sntp_opt_strs+0)
56 #define zLicenseDescrip (sntp_opt_strs+340)
57 
58 /*
59  *  global included definitions
60  */
61 #ifdef __windows
62   extern int atoi(const char*);
63 #else
64 # include <stdlib.h>
65 #endif
66 
67 #ifndef NULL
68 #  define NULL 0
69 #endif
70 
71 /**
72  *  static const strings for sntp options
73  */
74 static char const sntp_opt_strs[2549] =
75 /*     0 */ "sntp 4.2.8p9\n"
76             "Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n"
77             "This is free software. It is licensed for use, modification and\n"
78             "redistribution under the terms of the NTP License, copies of which\n"
79             "can be seen at:\n"
80             "  <http://ntp.org/license>\n"
81             "  <http://opensource.org/licenses/ntp-license.php>\n\0"
82 /*   340 */ "Permission to use, copy, modify, and distribute this software and its\n"
83             "documentation for any purpose with or without fee is hereby granted,\n"
84             "provided that the above copyright notice appears in all copies and that\n"
85             "both the copyright notice and this permission notice appear in supporting\n"
86             "documentation, and that the name The University of Delaware not be used in\n"
87             "advertising or publicity pertaining to distribution of the software without\n"
88             "specific, written prior permission.  The University of Delaware and Network\n"
89             "Time Foundation makes no representations about the suitability this\n"
90             "software for any purpose.  It is provided \"as is\" without express or\n"
91             "implied warranty.\n\0"
92 /*  1008 */ "Force IPv4 DNS name resolution\0"
93 /*  1039 */ "IPV4\0"
94 /*  1044 */ "ipv4\0"
95 /*  1049 */ "Force IPv6 DNS name resolution\0"
96 /*  1080 */ "IPV6\0"
97 /*  1085 */ "ipv6\0"
98 /*  1090 */ "Enable authentication with the key auth-keynumber\0"
99 /*  1140 */ "AUTHENTICATION\0"
100 /*  1155 */ "authentication\0"
101 /*  1170 */ "Listen to the address specified for broadcast time sync\0"
102 /*  1226 */ "BROADCAST\0"
103 /*  1236 */ "broadcast\0"
104 /*  1246 */ "Concurrently query all IPs returned for host-name\0"
105 /*  1296 */ "CONCURRENT\0"
106 /*  1307 */ "concurrent\0"
107 /*  1318 */ "Increase debug verbosity level\0"
108 /*  1349 */ "DEBUG_LEVEL\0"
109 /*  1361 */ "debug-level\0"
110 /*  1373 */ "Set the debug verbosity level\0"
111 /*  1403 */ "SET_DEBUG_LEVEL\0"
112 /*  1419 */ "set-debug-level\0"
113 /*  1435 */ "The gap (in milliseconds) between time requests\0"
114 /*  1483 */ "GAP\0"
115 /*  1487 */ "gap\0"
116 /*  1491 */ "KoD history filename\0"
117 /*  1512 */ "KOD\0"
118 /*  1516 */ "kod\0"
119 /*  1520 */ "/var/db/ntp-kod\0"
120 /*  1536 */ "Look in this file for the key specified with -a\0"
121 /*  1584 */ "KEYFILE\0"
122 /*  1592 */ "keyfile\0"
123 /*  1600 */ "Log to specified logfile\0"
124 /*  1625 */ "LOGFILE\0"
125 /*  1633 */ "logfile\0"
126 /*  1641 */ "Adjustments less than steplimit msec will be slewed\0"
127 /*  1693 */ "STEPLIMIT\0"
128 /*  1703 */ "steplimit\0"
129 /*  1713 */ "Send int as our NTP protocol version\0"
130 /*  1750 */ "NTPVERSION\0"
131 /*  1761 */ "ntpversion\0"
132 /*  1772 */ "Use the NTP Reserved Port (port 123)\0"
133 /*  1809 */ "USERESERVEDPORT\0"
134 /*  1825 */ "usereservedport\0"
135 /*  1841 */ "OK to 'step' the time with settimeofday(2)\0"
136 /*  1884 */ "STEP\0"
137 /*  1889 */ "step\0"
138 /*  1894 */ "OK to 'slew' the time with adjtime(2)\0"
139 /*  1932 */ "SLEW\0"
140 /*  1937 */ "slew\0"
141 /*  1942 */ "The number of seconds to wait for responses\0"
142 /*  1986 */ "TIMEOUT\0"
143 /*  1994 */ "timeout\0"
144 /*  2002 */ "Wait for pending replies (if not setting the time)\0"
145 /*  2053 */ "WAIT\0"
146 /*  2058 */ "no-wait\0"
147 /*  2066 */ "no\0"
148 /*  2069 */ "display extended usage information and exit\0"
149 /*  2113 */ "help\0"
150 /*  2118 */ "extended usage information passed thru pager\0"
151 /*  2163 */ "more-help\0"
152 /*  2173 */ "output version information and exit\0"
153 /*  2209 */ "version\0"
154 /*  2217 */ "save the option state to a config file\0"
155 /*  2256 */ "save-opts\0"
156 /*  2266 */ "load options from a config file\0"
157 /*  2298 */ "LOAD_OPTS\0"
158 /*  2308 */ "no-load-opts\0"
159 /*  2321 */ "SNTP\0"
160 /*  2326 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p9\n"
161             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
162             "\t\t[ hostname-or-IP ...]\n\0"
163 /*  2485 */ "$HOME\0"
164 /*  2491 */ ".\0"
165 /*  2493 */ ".ntprc\0"
166 /*  2500 */ "http://bugs.ntp.org, bugs@ntp.org\0"
167 /*  2534 */ "\n\0"
168 /*  2536 */ "sntp 4.2.8p9";
169 
170 /**
171  *  ipv4 option description with
172  *  "Must also have options" and "Incompatible options":
173  */
174 /** Descriptive text for the ipv4 option */
175 #define IPV4_DESC      (sntp_opt_strs+1008)
176 /** Upper-cased name for the ipv4 option */
177 #define IPV4_NAME      (sntp_opt_strs+1039)
178 /** Name string for the ipv4 option */
179 #define IPV4_name      (sntp_opt_strs+1044)
180 /** Other options that appear in conjunction with the ipv4 option */
181 static int const aIpv4CantList[] = {
182     INDEX_OPT_IPV6, NO_EQUIVALENT };
183 /** Compiled in flag settings for the ipv4 option */
184 #define IPV4_FLAGS     (OPTST_DISABLED)
185 
186 /**
187  *  ipv6 option description with
188  *  "Must also have options" and "Incompatible options":
189  */
190 /** Descriptive text for the ipv6 option */
191 #define IPV6_DESC      (sntp_opt_strs+1049)
192 /** Upper-cased name for the ipv6 option */
193 #define IPV6_NAME      (sntp_opt_strs+1080)
194 /** Name string for the ipv6 option */
195 #define IPV6_name      (sntp_opt_strs+1085)
196 /** Other options that appear in conjunction with the ipv6 option */
197 static int const aIpv6CantList[] = {
198     INDEX_OPT_IPV4, NO_EQUIVALENT };
199 /** Compiled in flag settings for the ipv6 option */
200 #define IPV6_FLAGS     (OPTST_DISABLED)
201 
202 /**
203  *  authentication option description:
204  */
205 /** Descriptive text for the authentication option */
206 #define AUTHENTICATION_DESC      (sntp_opt_strs+1090)
207 /** Upper-cased name for the authentication option */
208 #define AUTHENTICATION_NAME      (sntp_opt_strs+1140)
209 /** Name string for the authentication option */
210 #define AUTHENTICATION_name      (sntp_opt_strs+1155)
211 /** Compiled in flag settings for the authentication option */
212 #define AUTHENTICATION_FLAGS     (OPTST_DISABLED \
213         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
214 
215 /**
216  *  broadcast option description:
217  */
218 /** Descriptive text for the broadcast option */
219 #define BROADCAST_DESC      (sntp_opt_strs+1170)
220 /** Upper-cased name for the broadcast option */
221 #define BROADCAST_NAME      (sntp_opt_strs+1226)
222 /** Name string for the broadcast option */
223 #define BROADCAST_name      (sntp_opt_strs+1236)
224 /** Compiled in flag settings for the broadcast option */
225 #define BROADCAST_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
226         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
227 
228 /**
229  *  concurrent option description:
230  */
231 /** Descriptive text for the concurrent option */
232 #define CONCURRENT_DESC      (sntp_opt_strs+1246)
233 /** Upper-cased name for the concurrent option */
234 #define CONCURRENT_NAME      (sntp_opt_strs+1296)
235 /** Name string for the concurrent option */
236 #define CONCURRENT_name      (sntp_opt_strs+1307)
237 /** Compiled in flag settings for the concurrent option */
238 #define CONCURRENT_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
239         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
240 
241 /**
242  *  debug-level option description:
243  */
244 /** Descriptive text for the debug-level option */
245 #define DEBUG_LEVEL_DESC      (sntp_opt_strs+1318)
246 /** Upper-cased name for the debug-level option */
247 #define DEBUG_LEVEL_NAME      (sntp_opt_strs+1349)
248 /** Name string for the debug-level option */
249 #define DEBUG_LEVEL_name      (sntp_opt_strs+1361)
250 /** Compiled in flag settings for the debug-level option */
251 #define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
252 
253 /**
254  *  set-debug-level option description:
255  */
256 /** Descriptive text for the set-debug-level option */
257 #define SET_DEBUG_LEVEL_DESC      (sntp_opt_strs+1373)
258 /** Upper-cased name for the set-debug-level option */
259 #define SET_DEBUG_LEVEL_NAME      (sntp_opt_strs+1403)
260 /** Name string for the set-debug-level option */
261 #define SET_DEBUG_LEVEL_name      (sntp_opt_strs+1419)
262 /** Compiled in flag settings for the set-debug-level option */
263 #define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
264         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
265 
266 /**
267  *  gap option description:
268  */
269 /** Descriptive text for the gap option */
270 #define GAP_DESC      (sntp_opt_strs+1435)
271 /** Upper-cased name for the gap option */
272 #define GAP_NAME      (sntp_opt_strs+1483)
273 /** Name string for the gap option */
274 #define GAP_name      (sntp_opt_strs+1487)
275 /** The compiled in default value for the gap option argument */
276 #define GAP_DFT_ARG   ((char const*)50)
277 /** Compiled in flag settings for the gap option */
278 #define GAP_FLAGS     (OPTST_DISABLED \
279         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
280 
281 /**
282  *  kod option description:
283  */
284 /** Descriptive text for the kod option */
285 #define KOD_DESC      (sntp_opt_strs+1491)
286 /** Upper-cased name for the kod option */
287 #define KOD_NAME      (sntp_opt_strs+1512)
288 /** Name string for the kod option */
289 #define KOD_name      (sntp_opt_strs+1516)
290 /** The compiled in default value for the kod option argument */
291 #define KOD_DFT_ARG   (sntp_opt_strs+1520)
292 /** Compiled in flag settings for the kod option */
293 #define KOD_FLAGS     (OPTST_DISABLED \
294         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
295 
296 /**
297  *  keyfile option description:
298  */
299 /** Descriptive text for the keyfile option */
300 #define KEYFILE_DESC      (sntp_opt_strs+1536)
301 /** Upper-cased name for the keyfile option */
302 #define KEYFILE_NAME      (sntp_opt_strs+1584)
303 /** Name string for the keyfile option */
304 #define KEYFILE_name      (sntp_opt_strs+1592)
305 /** Compiled in flag settings for the keyfile option */
306 #define KEYFILE_FLAGS     (OPTST_DISABLED \
307         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
308 
309 /**
310  *  logfile option description:
311  */
312 /** Descriptive text for the logfile option */
313 #define LOGFILE_DESC      (sntp_opt_strs+1600)
314 /** Upper-cased name for the logfile option */
315 #define LOGFILE_NAME      (sntp_opt_strs+1625)
316 /** Name string for the logfile option */
317 #define LOGFILE_name      (sntp_opt_strs+1633)
318 /** Compiled in flag settings for the logfile option */
319 #define LOGFILE_FLAGS     (OPTST_DISABLED \
320         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
321 
322 /**
323  *  steplimit option description:
324  */
325 /** Descriptive text for the steplimit option */
326 #define STEPLIMIT_DESC      (sntp_opt_strs+1641)
327 /** Upper-cased name for the steplimit option */
328 #define STEPLIMIT_NAME      (sntp_opt_strs+1693)
329 /** Name string for the steplimit option */
330 #define STEPLIMIT_name      (sntp_opt_strs+1703)
331 /** Compiled in flag settings for the steplimit option */
332 #define STEPLIMIT_FLAGS     (OPTST_DISABLED \
333         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
334 
335 /**
336  *  ntpversion option description:
337  */
338 /** Descriptive text for the ntpversion option */
339 #define NTPVERSION_DESC      (sntp_opt_strs+1713)
340 /** Upper-cased name for the ntpversion option */
341 #define NTPVERSION_NAME      (sntp_opt_strs+1750)
342 /** Name string for the ntpversion option */
343 #define NTPVERSION_name      (sntp_opt_strs+1761)
344 /** The compiled in default value for the ntpversion option argument */
345 #define NTPVERSION_DFT_ARG   ((char const*)4)
346 /** Compiled in flag settings for the ntpversion option */
347 #define NTPVERSION_FLAGS     (OPTST_DISABLED \
348         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
349 
350 /**
351  *  usereservedport option description:
352  */
353 /** Descriptive text for the usereservedport option */
354 #define USERESERVEDPORT_DESC      (sntp_opt_strs+1772)
355 /** Upper-cased name for the usereservedport option */
356 #define USERESERVEDPORT_NAME      (sntp_opt_strs+1809)
357 /** Name string for the usereservedport option */
358 #define USERESERVEDPORT_name      (sntp_opt_strs+1825)
359 /** Compiled in flag settings for the usereservedport option */
360 #define USERESERVEDPORT_FLAGS     (OPTST_DISABLED)
361 
362 /**
363  *  step option description:
364  */
365 /** Descriptive text for the step option */
366 #define STEP_DESC      (sntp_opt_strs+1841)
367 /** Upper-cased name for the step option */
368 #define STEP_NAME      (sntp_opt_strs+1884)
369 /** Name string for the step option */
370 #define STEP_name      (sntp_opt_strs+1889)
371 /** Compiled in flag settings for the step option */
372 #define STEP_FLAGS     (OPTST_DISABLED)
373 
374 /**
375  *  slew option description:
376  */
377 /** Descriptive text for the slew option */
378 #define SLEW_DESC      (sntp_opt_strs+1894)
379 /** Upper-cased name for the slew option */
380 #define SLEW_NAME      (sntp_opt_strs+1932)
381 /** Name string for the slew option */
382 #define SLEW_name      (sntp_opt_strs+1937)
383 /** Compiled in flag settings for the slew option */
384 #define SLEW_FLAGS     (OPTST_DISABLED)
385 
386 /**
387  *  timeout option description:
388  */
389 /** Descriptive text for the timeout option */
390 #define TIMEOUT_DESC      (sntp_opt_strs+1942)
391 /** Upper-cased name for the timeout option */
392 #define TIMEOUT_NAME      (sntp_opt_strs+1986)
393 /** Name string for the timeout option */
394 #define TIMEOUT_name      (sntp_opt_strs+1994)
395 /** The compiled in default value for the timeout option argument */
396 #define TIMEOUT_DFT_ARG   ((char const*)5)
397 /** Compiled in flag settings for the timeout option */
398 #define TIMEOUT_FLAGS     (OPTST_DISABLED \
399         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
400 
401 /**
402  *  wait option description:
403  */
404 /** Descriptive text for the wait option */
405 #define WAIT_DESC      (sntp_opt_strs+2002)
406 /** Upper-cased name for the wait option */
407 #define WAIT_NAME      (sntp_opt_strs+2053)
408 /** disablement name for the wait option */
409 #define NOT_WAIT_name  (sntp_opt_strs+2058)
410 /** disablement prefix for the wait option */
411 #define NOT_WAIT_PFX   (sntp_opt_strs+2066)
412 /** Name string for the wait option */
413 #define WAIT_name      (NOT_WAIT_name + 3)
414 /** Compiled in flag settings for the wait option */
415 #define WAIT_FLAGS     (OPTST_INITENABLED)
416 
417 /*
418  *  Help/More_Help/Version option descriptions:
419  */
420 #define HELP_DESC       (sntp_opt_strs+2069)
421 #define HELP_name       (sntp_opt_strs+2113)
422 #ifdef HAVE_WORKING_FORK
423 #define MORE_HELP_DESC  (sntp_opt_strs+2118)
424 #define MORE_HELP_name  (sntp_opt_strs+2163)
425 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
426 #else
427 #define MORE_HELP_DESC  HELP_DESC
428 #define MORE_HELP_name  HELP_name
429 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
430 #endif
431 #ifdef NO_OPTIONAL_OPT_ARGS
432 #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
433 #else
434 #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
435                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
436 #endif
437 #define VER_DESC        (sntp_opt_strs+2173)
438 #define VER_name        (sntp_opt_strs+2209)
439 #define SAVE_OPTS_DESC  (sntp_opt_strs+2217)
440 #define SAVE_OPTS_name  (sntp_opt_strs+2256)
441 #define LOAD_OPTS_DESC     (sntp_opt_strs+2266)
442 #define LOAD_OPTS_NAME     (sntp_opt_strs+2298)
443 #define NO_LOAD_OPTS_name  (sntp_opt_strs+2308)
444 #define LOAD_OPTS_pfx      (sntp_opt_strs+2066)
445 #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
446 /**
447  *  Declare option callback procedures
448  */
449 extern tOptProc
450     ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
451     optionNumericVal,      optionPagedUsage,      optionResetOpt,
452     optionStackArg,        optionTimeDate,        optionTimeVal,
453     optionUnstackArg,      optionVendorOption;
454 static tOptProc
455     doOptDebug_Level, doOptKeyfile,     doOptKod,         doOptLogfile,
456     doOptNtpversion,  doOptSteplimit,   doUsageOpt;
457 #define VER_PROC        ntpOptionPrintVersion
458 
459 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
460 /**
461  *  Define the sntp Option Descriptions.
462  * This is an array of OPTION_CT entries, one for each
463  * option that the sntp program responds to.
464  */
465 static tOptDesc optDesc[OPTION_CT] = {
466   {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
467      /* equiv idx, value */ 0, VALUE_OPT_IPV4,
468      /* equivalenced to  */ NO_EQUIVALENT,
469      /* min, max, act ct */ 0, 1, 0,
470      /* opt state flags  */ IPV4_FLAGS, 0,
471      /* last opt argumnt */ { NULL }, /* --ipv4 */
472      /* arg list/cookie  */ NULL,
473      /* must/cannot opts */ NULL, aIpv4CantList,
474      /* option proc      */ NULL,
475      /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
476      /* disablement strs */ NULL, NULL },
477 
478   {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
479      /* equiv idx, value */ 1, VALUE_OPT_IPV6,
480      /* equivalenced to  */ NO_EQUIVALENT,
481      /* min, max, act ct */ 0, 1, 0,
482      /* opt state flags  */ IPV6_FLAGS, 0,
483      /* last opt argumnt */ { NULL }, /* --ipv6 */
484      /* arg list/cookie  */ NULL,
485      /* must/cannot opts */ NULL, aIpv6CantList,
486      /* option proc      */ NULL,
487      /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
488      /* disablement strs */ NULL, NULL },
489 
490   {  /* entry idx, value */ 2, VALUE_OPT_AUTHENTICATION,
491      /* equiv idx, value */ 2, VALUE_OPT_AUTHENTICATION,
492      /* equivalenced to  */ NO_EQUIVALENT,
493      /* min, max, act ct */ 0, 1, 0,
494      /* opt state flags  */ AUTHENTICATION_FLAGS, 0,
495      /* last opt argumnt */ { NULL }, /* --authentication */
496      /* arg list/cookie  */ NULL,
497      /* must/cannot opts */ NULL, NULL,
498      /* option proc      */ optionNumericVal,
499      /* desc, NAME, name */ AUTHENTICATION_DESC, AUTHENTICATION_NAME, AUTHENTICATION_name,
500      /* disablement strs */ NULL, NULL },
501 
502   {  /* entry idx, value */ 3, VALUE_OPT_BROADCAST,
503      /* equiv idx, value */ 3, VALUE_OPT_BROADCAST,
504      /* equivalenced to  */ NO_EQUIVALENT,
505      /* min, max, act ct */ 0, NOLIMIT, 0,
506      /* opt state flags  */ BROADCAST_FLAGS, 0,
507      /* last opt argumnt */ { NULL }, /* --broadcast */
508      /* arg list/cookie  */ NULL,
509      /* must/cannot opts */ NULL, NULL,
510      /* option proc      */ optionStackArg,
511      /* desc, NAME, name */ BROADCAST_DESC, BROADCAST_NAME, BROADCAST_name,
512      /* disablement strs */ NULL, NULL },
513 
514   {  /* entry idx, value */ 4, VALUE_OPT_CONCURRENT,
515      /* equiv idx, value */ 4, VALUE_OPT_CONCURRENT,
516      /* equivalenced to  */ NO_EQUIVALENT,
517      /* min, max, act ct */ 0, NOLIMIT, 0,
518      /* opt state flags  */ CONCURRENT_FLAGS, 0,
519      /* last opt argumnt */ { NULL }, /* --concurrent */
520      /* arg list/cookie  */ NULL,
521      /* must/cannot opts */ NULL, NULL,
522      /* option proc      */ optionStackArg,
523      /* desc, NAME, name */ CONCURRENT_DESC, CONCURRENT_NAME, CONCURRENT_name,
524      /* disablement strs */ NULL, NULL },
525 
526   {  /* entry idx, value */ 5, VALUE_OPT_DEBUG_LEVEL,
527      /* equiv idx, value */ 5, VALUE_OPT_DEBUG_LEVEL,
528      /* equivalenced to  */ NO_EQUIVALENT,
529      /* min, max, act ct */ 0, NOLIMIT, 0,
530      /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
531      /* last opt argumnt */ { NULL }, /* --debug-level */
532      /* arg list/cookie  */ NULL,
533      /* must/cannot opts */ NULL, NULL,
534      /* option proc      */ doOptDebug_Level,
535      /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
536      /* disablement strs */ NULL, NULL },
537 
538   {  /* entry idx, value */ 6, VALUE_OPT_SET_DEBUG_LEVEL,
539      /* equiv idx, value */ 6, VALUE_OPT_SET_DEBUG_LEVEL,
540      /* equivalenced to  */ NO_EQUIVALENT,
541      /* min, max, act ct */ 0, NOLIMIT, 0,
542      /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
543      /* last opt argumnt */ { NULL }, /* --set-debug-level */
544      /* arg list/cookie  */ NULL,
545      /* must/cannot opts */ NULL, NULL,
546      /* option proc      */ optionNumericVal,
547      /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
548      /* disablement strs */ NULL, NULL },
549 
550   {  /* entry idx, value */ 7, VALUE_OPT_GAP,
551      /* equiv idx, value */ 7, VALUE_OPT_GAP,
552      /* equivalenced to  */ NO_EQUIVALENT,
553      /* min, max, act ct */ 0, 1, 0,
554      /* opt state flags  */ GAP_FLAGS, 0,
555      /* last opt argumnt */ { GAP_DFT_ARG },
556      /* arg list/cookie  */ NULL,
557      /* must/cannot opts */ NULL, NULL,
558      /* option proc      */ optionNumericVal,
559      /* desc, NAME, name */ GAP_DESC, GAP_NAME, GAP_name,
560      /* disablement strs */ NULL, NULL },
561 
562   {  /* entry idx, value */ 8, VALUE_OPT_KOD,
563      /* equiv idx, value */ 8, VALUE_OPT_KOD,
564      /* equivalenced to  */ NO_EQUIVALENT,
565      /* min, max, act ct */ 0, 1, 0,
566      /* opt state flags  */ KOD_FLAGS, 0,
567      /* last opt argumnt */ { KOD_DFT_ARG },
568      /* arg list/cookie  */ NULL,
569      /* must/cannot opts */ NULL, NULL,
570      /* option proc      */ doOptKod,
571      /* desc, NAME, name */ KOD_DESC, KOD_NAME, KOD_name,
572      /* disablement strs */ NULL, NULL },
573 
574   {  /* entry idx, value */ 9, VALUE_OPT_KEYFILE,
575      /* equiv idx, value */ 9, VALUE_OPT_KEYFILE,
576      /* equivalenced to  */ NO_EQUIVALENT,
577      /* min, max, act ct */ 0, 1, 0,
578      /* opt state flags  */ KEYFILE_FLAGS, 0,
579      /* last opt argumnt */ { NULL }, /* --keyfile */
580      /* arg list/cookie  */ NULL,
581      /* must/cannot opts */ NULL, NULL,
582      /* option proc      */ doOptKeyfile,
583      /* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
584      /* disablement strs */ NULL, NULL },
585 
586   {  /* entry idx, value */ 10, VALUE_OPT_LOGFILE,
587      /* equiv idx, value */ 10, VALUE_OPT_LOGFILE,
588      /* equivalenced to  */ NO_EQUIVALENT,
589      /* min, max, act ct */ 0, 1, 0,
590      /* opt state flags  */ LOGFILE_FLAGS, 0,
591      /* last opt argumnt */ { NULL }, /* --logfile */
592      /* arg list/cookie  */ NULL,
593      /* must/cannot opts */ NULL, NULL,
594      /* option proc      */ doOptLogfile,
595      /* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
596      /* disablement strs */ NULL, NULL },
597 
598   {  /* entry idx, value */ 11, VALUE_OPT_STEPLIMIT,
599      /* equiv idx, value */ 11, VALUE_OPT_STEPLIMIT,
600      /* equivalenced to  */ NO_EQUIVALENT,
601      /* min, max, act ct */ 0, 1, 0,
602      /* opt state flags  */ STEPLIMIT_FLAGS, 0,
603      /* last opt argumnt */ { NULL }, /* --steplimit */
604      /* arg list/cookie  */ NULL,
605      /* must/cannot opts */ NULL, NULL,
606      /* option proc      */ doOptSteplimit,
607      /* desc, NAME, name */ STEPLIMIT_DESC, STEPLIMIT_NAME, STEPLIMIT_name,
608      /* disablement strs */ NULL, NULL },
609 
610   {  /* entry idx, value */ 12, VALUE_OPT_NTPVERSION,
611      /* equiv idx, value */ 12, VALUE_OPT_NTPVERSION,
612      /* equivalenced to  */ NO_EQUIVALENT,
613      /* min, max, act ct */ 0, 1, 0,
614      /* opt state flags  */ NTPVERSION_FLAGS, 0,
615      /* last opt argumnt */ { NTPVERSION_DFT_ARG },
616      /* arg list/cookie  */ NULL,
617      /* must/cannot opts */ NULL, NULL,
618      /* option proc      */ doOptNtpversion,
619      /* desc, NAME, name */ NTPVERSION_DESC, NTPVERSION_NAME, NTPVERSION_name,
620      /* disablement strs */ NULL, NULL },
621 
622   {  /* entry idx, value */ 13, VALUE_OPT_USERESERVEDPORT,
623      /* equiv idx, value */ 13, VALUE_OPT_USERESERVEDPORT,
624      /* equivalenced to  */ NO_EQUIVALENT,
625      /* min, max, act ct */ 0, 1, 0,
626      /* opt state flags  */ USERESERVEDPORT_FLAGS, 0,
627      /* last opt argumnt */ { NULL }, /* --usereservedport */
628      /* arg list/cookie  */ NULL,
629      /* must/cannot opts */ NULL, NULL,
630      /* option proc      */ NULL,
631      /* desc, NAME, name */ USERESERVEDPORT_DESC, USERESERVEDPORT_NAME, USERESERVEDPORT_name,
632      /* disablement strs */ NULL, NULL },
633 
634   {  /* entry idx, value */ 14, VALUE_OPT_STEP,
635      /* equiv idx, value */ 14, VALUE_OPT_STEP,
636      /* equivalenced to  */ NO_EQUIVALENT,
637      /* min, max, act ct */ 0, 1, 0,
638      /* opt state flags  */ STEP_FLAGS, 0,
639      /* last opt argumnt */ { NULL }, /* --step */
640      /* arg list/cookie  */ NULL,
641      /* must/cannot opts */ NULL, NULL,
642      /* option proc      */ NULL,
643      /* desc, NAME, name */ STEP_DESC, STEP_NAME, STEP_name,
644      /* disablement strs */ NULL, NULL },
645 
646   {  /* entry idx, value */ 15, VALUE_OPT_SLEW,
647      /* equiv idx, value */ 15, VALUE_OPT_SLEW,
648      /* equivalenced to  */ NO_EQUIVALENT,
649      /* min, max, act ct */ 0, 1, 0,
650      /* opt state flags  */ SLEW_FLAGS, 0,
651      /* last opt argumnt */ { NULL }, /* --slew */
652      /* arg list/cookie  */ NULL,
653      /* must/cannot opts */ NULL, NULL,
654      /* option proc      */ NULL,
655      /* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
656      /* disablement strs */ NULL, NULL },
657 
658   {  /* entry idx, value */ 16, VALUE_OPT_TIMEOUT,
659      /* equiv idx, value */ 16, VALUE_OPT_TIMEOUT,
660      /* equivalenced to  */ NO_EQUIVALENT,
661      /* min, max, act ct */ 0, 1, 0,
662      /* opt state flags  */ TIMEOUT_FLAGS, 0,
663      /* last opt argumnt */ { TIMEOUT_DFT_ARG },
664      /* arg list/cookie  */ NULL,
665      /* must/cannot opts */ NULL, NULL,
666      /* option proc      */ optionNumericVal,
667      /* desc, NAME, name */ TIMEOUT_DESC, TIMEOUT_NAME, TIMEOUT_name,
668      /* disablement strs */ NULL, NULL },
669 
670   {  /* entry idx, value */ 17, VALUE_OPT_WAIT,
671      /* equiv idx, value */ 17, VALUE_OPT_WAIT,
672      /* equivalenced to  */ NO_EQUIVALENT,
673      /* min, max, act ct */ 0, 1, 0,
674      /* opt state flags  */ WAIT_FLAGS, 0,
675      /* last opt argumnt */ { NULL }, /* --wait */
676      /* arg list/cookie  */ NULL,
677      /* must/cannot opts */ NULL, NULL,
678      /* option proc      */ NULL,
679      /* desc, NAME, name */ WAIT_DESC, WAIT_NAME, WAIT_name,
680      /* disablement strs */ NOT_WAIT_name, NOT_WAIT_PFX },
681 
682   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
683      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
684      /* equivalenced to  */ NO_EQUIVALENT,
685      /* min, max, act ct */ 0, 1, 0,
686      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
687      /* last opt argumnt */ { NULL },
688      /* arg list/cookie  */ NULL,
689      /* must/cannot opts */ NULL, NULL,
690      /* option proc      */ VER_PROC,
691      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
692      /* disablement strs */ NULL, NULL },
693 
694 
695 
696   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
697      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
698      /* equivalenced to  */ NO_EQUIVALENT,
699      /* min, max, act ct */ 0, 1, 0,
700      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
701      /* last opt argumnt */ { NULL },
702      /* arg list/cookie  */ NULL,
703      /* must/cannot opts */ NULL, NULL,
704      /* option proc      */ doUsageOpt,
705      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
706      /* disablement strs */ NULL, NULL },
707 
708   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
709      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
710      /* equivalenced to  */ NO_EQUIVALENT,
711      /* min, max, act ct */ 0, 1, 0,
712      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
713      /* last opt argumnt */ { NULL },
714      /* arg list/cookie  */ NULL,
715      /* must/cannot opts */ NULL,  NULL,
716      /* option proc      */ optionPagedUsage,
717      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
718      /* disablement strs */ NULL, NULL },
719 
720   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
721      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
722      /* equivalenced to  */ NO_EQUIVALENT,
723      /* min, max, act ct */ 0, 1, 0,
724      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
725                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
726      /* last opt argumnt */ { NULL },
727      /* arg list/cookie  */ NULL,
728      /* must/cannot opts */ NULL,  NULL,
729      /* option proc      */ NULL,
730      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
731      /* disablement strs */ NULL, NULL },
732 
733   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
734      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
735      /* equivalenced to  */ NO_EQUIVALENT,
736      /* min, max, act ct */ 0, NOLIMIT, 0,
737      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
738 			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
739      /* last opt argumnt */ { NULL },
740      /* arg list/cookie  */ NULL,
741      /* must/cannot opts */ NULL, NULL,
742      /* option proc      */ optionLoadOpt,
743      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
744      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
745 };
746 
747 
748 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
749 /** Reference to the upper cased version of sntp. */
750 #define zPROGNAME       (sntp_opt_strs+2321)
751 /** Reference to the title line for sntp usage. */
752 #define zUsageTitle     (sntp_opt_strs+2326)
753 /** sntp configuration file name. */
754 #define zRcName         (sntp_opt_strs+2493)
755 /** Directories to search for sntp config files. */
756 static char const * const apzHomeList[3] = {
757     sntp_opt_strs+2485,
758     sntp_opt_strs+2491,
759     NULL };
760 /** The sntp program bug email address. */
761 #define zBugsAddr       (sntp_opt_strs+2500)
762 /** Clarification/explanation of what sntp does. */
763 #define zExplain        (sntp_opt_strs+2534)
764 /** Extra detail explaining what sntp does. */
765 #define zDetail         (NULL)
766 /** The full version string for sntp. */
767 #define zFullVersion    (sntp_opt_strs+2536)
768 /* extracted from optcode.tlib near line 364 */
769 
770 #if defined(ENABLE_NLS)
771 # define OPTPROC_BASE OPTPROC_TRANSLATE
772   static tOptionXlateProc translate_option_strings;
773 #else
774 # define OPTPROC_BASE OPTPROC_NONE
775 # define translate_option_strings NULL
776 #endif /* ENABLE_NLS */
777 
778 #define sntp_full_usage (NULL)
779 #define sntp_short_usage (NULL)
780 
781 #endif /* not defined __doxygen__ */
782 
783 /*
784  *  Create the static procedure(s) declared above.
785  */
786 /**
787  * The callout function that invokes the optionUsage function.
788  *
789  * @param[in] opts the AutoOpts option description structure
790  * @param[in] od   the descriptor for the "help" (usage) option.
791  * @noreturn
792  */
793 static void
794 doUsageOpt(tOptions * opts, tOptDesc * od)
795 {
796     int ex_code;
797     ex_code = SNTP_EXIT_SUCCESS;
798     optionUsage(&sntpOptions, ex_code);
799     /* NOTREACHED */
800     exit(1);
801     (void)opts;
802     (void)od;
803 }
804 
805 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
806 /**
807  * Code to handle the debug-level option.
808  *
809  * @param[in] pOptions the sntp options data structure
810  * @param[in,out] pOptDesc the option descriptor for this option.
811  */
812 static void
813 doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
814 {
815     /*
816      * Be sure the flag-code[0] handles special values for the options pointer
817      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
818      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
819      * reset its state.
820      */
821     /* extracted from debug-opt.def, line 15 */
822 OPT_VALUE_SET_DEBUG_LEVEL++;
823     (void)pOptDesc;
824     (void)pOptions;
825 }
826 
827 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
828 /**
829  * Code to handle the kod option.
830  * Specifies the filename to be used for the persistent history of KoD
831  * responses received from servers.  If the file does not exist, a
832  * warning message will be displayed.  The file will not be created.
833  * @param[in] pOptions the sntp options data structure
834  * @param[in,out] pOptDesc the option descriptor for this option.
835  */
836 static void
837 doOptKod(tOptions* pOptions, tOptDesc* pOptDesc)
838 {
839     static teOptFileType const  type =
840         FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
841     static tuFileMode           mode;
842 #ifndef O_CLOEXEC
843 #  define O_CLOEXEC 0
844 #endif
845     mode.file_flags = O_CLOEXEC;
846 
847     /*
848      * This function handles special invalid values for "pOptions"
849      */
850     optionFileCheck(pOptions, pOptDesc, type, mode);
851 }
852 
853 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
854 /**
855  * Code to handle the keyfile option.
856  * This option specifies the keyfile.
857  * @code{sntp} will search for the key specified with @option{-a}
858  * @file{keyno} in this file.  See @command{ntp.keys(5)} for more
859  * information.
860  * @param[in] pOptions the sntp options data structure
861  * @param[in,out] pOptDesc the option descriptor for this option.
862  */
863 static void
864 doOptKeyfile(tOptions* pOptions, tOptDesc* pOptDesc)
865 {
866     static teOptFileType const  type =
867         FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
868     static tuFileMode           mode;
869 #ifndef O_CLOEXEC
870 #  define O_CLOEXEC 0
871 #endif
872     mode.file_flags = O_CLOEXEC;
873 
874     /*
875      * This function handles special invalid values for "pOptions"
876      */
877     optionFileCheck(pOptions, pOptDesc, type, mode);
878 }
879 
880 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
881 /**
882  * Code to handle the logfile option.
883  * This option causes the client to write log messages to the specified
884  * @file{logfile}.
885  * @param[in] pOptions the sntp options data structure
886  * @param[in,out] pOptDesc the option descriptor for this option.
887  */
888 static void
889 doOptLogfile(tOptions* pOptions, tOptDesc* pOptDesc)
890 {
891     static teOptFileType const  type =
892         FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
893     static tuFileMode           mode;
894 #ifndef O_CLOEXEC
895 #  define O_CLOEXEC 0
896 #endif
897     mode.file_flags = O_CLOEXEC;
898 
899     /*
900      * This function handles special invalid values for "pOptions"
901      */
902     optionFileCheck(pOptions, pOptDesc, type, mode);
903 }
904 
905 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
906 /**
907  * Code to handle the steplimit option.
908  * If the time adjustment is less than @file{steplimit} milliseconds,
909  * slew the amount using @command{adjtime(2)}.  Otherwise, step the
910  * correction using @command{settimeofday(2)}.  The default value is 0,
911  * which means all adjustments will be stepped.  This is a feature, as
912  * different situations demand different values.
913  * @param[in] pOptions the sntp options data structure
914  * @param[in,out] pOptDesc the option descriptor for this option.
915  */
916 static void
917 doOptSteplimit(tOptions* pOptions, tOptDesc* pOptDesc)
918 {
919     static struct {long rmin, rmax;} const rng[1] = {
920         { 0, LONG_MAX } };
921     int  ix;
922 
923     if (pOptions <= OPTPROC_EMIT_LIMIT)
924         goto emit_ranges;
925     optionNumericVal(pOptions, pOptDesc);
926 
927     for (ix = 0; ix < 1; ix++) {
928         if (pOptDesc->optArg.argInt < rng[ix].rmin)
929             continue;  /* ranges need not be ordered. */
930         if (pOptDesc->optArg.argInt == rng[ix].rmin)
931             return;
932         if (rng[ix].rmax == LONG_MIN)
933             continue;
934         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
935             return;
936     }
937 
938     option_usage_fp = stderr;
939 
940  emit_ranges:
941 optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
942 }
943 
944 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
945 /**
946  * Code to handle the ntpversion option.
947  * When sending requests to a remote server, tell them we are running
948  * NTP protocol version @file{ntpversion} .
949  * @param[in] pOptions the sntp options data structure
950  * @param[in,out] pOptDesc the option descriptor for this option.
951  */
952 static void
953 doOptNtpversion(tOptions* pOptions, tOptDesc* pOptDesc)
954 {
955     static struct {long rmin, rmax;} const rng[1] = {
956         { 0, 7 } };
957     int  ix;
958 
959     if (pOptions <= OPTPROC_EMIT_LIMIT)
960         goto emit_ranges;
961     optionNumericVal(pOptions, pOptDesc);
962 
963     for (ix = 0; ix < 1; ix++) {
964         if (pOptDesc->optArg.argInt < rng[ix].rmin)
965             continue;  /* ranges need not be ordered. */
966         if (pOptDesc->optArg.argInt == rng[ix].rmin)
967             return;
968         if (rng[ix].rmax == LONG_MIN)
969             continue;
970         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
971             return;
972     }
973 
974     option_usage_fp = stderr;
975 
976  emit_ranges:
977 optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
978 }
979 /* extracted from optmain.tlib near line 1250 */
980 
981 /**
982  * The directory containing the data associated with sntp.
983  */
984 #ifndef  PKGDATADIR
985 # define PKGDATADIR ""
986 #endif
987 
988 /**
989  * Information about the person or institution that packaged sntp
990  * for the current distribution.
991  */
992 #ifndef  WITH_PACKAGER
993 # define sntp_packager_info NULL
994 #else
995 /** Packager information for sntp. */
996 static char const sntp_packager_info[] =
997     "Packaged by " WITH_PACKAGER
998 
999 # ifdef WITH_PACKAGER_VERSION
1000         " ("WITH_PACKAGER_VERSION")"
1001 # endif
1002 
1003 # ifdef WITH_PACKAGER_BUG_REPORTS
1004     "\nReport sntp bugs to " WITH_PACKAGER_BUG_REPORTS
1005 # endif
1006     "\n";
1007 #endif
1008 #ifndef __doxygen__
1009 
1010 #endif /* __doxygen__ */
1011 /**
1012  * The option definitions for sntp.  The one structure that
1013  * binds them all.
1014  */
1015 tOptions sntpOptions = {
1016     OPTIONS_STRUCT_VERSION,
1017     0, NULL,                    /* original argc + argv    */
1018     ( OPTPROC_BASE
1019     + OPTPROC_ERRSTOP
1020     + OPTPROC_SHORTOPT
1021     + OPTPROC_LONGOPT
1022     + OPTPROC_NO_REQ_OPT
1023     + OPTPROC_NEGATIONS
1024     + OPTPROC_ENVIRON
1025     + OPTPROC_MISUSE ),
1026     0, NULL,                    /* current option index, current option */
1027     NULL,         NULL,         zPROGNAME,
1028     zRcName,      zCopyright,   zLicenseDescrip,
1029     zFullVersion, apzHomeList,  zUsageTitle,
1030     zExplain,     zDetail,      optDesc,
1031     zBugsAddr,                  /* address to send bugs to */
1032     NULL, NULL,                 /* extensions/saved state  */
1033     optionUsage, /* usage procedure */
1034     translate_option_strings,   /* translation procedure */
1035     /*
1036      *  Indexes to special options
1037      */
1038     { INDEX_OPT_MORE_HELP, /* more-help option index */
1039       INDEX_OPT_SAVE_OPTS, /* save option index */
1040       NO_EQUIVALENT, /* '-#' option index */
1041       NO_EQUIVALENT /* index of default opt */
1042     },
1043     23 /* full option count */, 18 /* user option count */,
1044     sntp_full_usage, sntp_short_usage,
1045     NULL, NULL,
1046     PKGDATADIR, sntp_packager_info
1047 };
1048 
1049 #if ENABLE_NLS
1050 /**
1051  * This code is designed to translate translatable option text for the
1052  * sntp program.  These translations happen upon entry
1053  * to optionProcess().
1054  */
1055 #include <stdio.h>
1056 #include <stdlib.h>
1057 #include <string.h>
1058 #include <unistd.h>
1059 #ifdef HAVE_DCGETTEXT
1060 # include <gettext.h>
1061 #endif
1062 #include <autoopts/usage-txt.h>
1063 
1064 static char * AO_gettext(char const * pz);
1065 static void   coerce_it(void ** s);
1066 
1067 /**
1068  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
1069  * to convert from English to the target language, then strdup-duplicates the
1070  * result string.  It tries the "libopts" domain first, then whatever has been
1071  * set via the \a textdomain(3) call.
1072  *
1073  * @param[in] pz the input text used as a lookup key.
1074  * @returns the translated text (if there is one),
1075  *   or the original text (if not).
1076  */
1077 static char *
1078 AO_gettext(char const * pz)
1079 {
1080     char * res;
1081     if (pz == NULL)
1082         return NULL;
1083 #ifdef HAVE_DCGETTEXT
1084     /*
1085      * While processing the option_xlateable_txt data, try to use the
1086      * "libopts" domain.  Once we switch to the option descriptor data,
1087      * do *not* use that domain.
1088      */
1089     if (option_xlateable_txt.field_ct != 0) {
1090         res = dgettext("libopts", pz);
1091         if (res == pz)
1092             res = (char *)VOIDP(_(pz));
1093     } else
1094         res = (char *)VOIDP(_(pz));
1095 #else
1096     res = (char *)VOIDP(_(pz));
1097 #endif
1098     if (res == pz)
1099         return res;
1100     res = strdup(res);
1101     if (res == NULL) {
1102         fputs(_("No memory for duping translated strings\n"), stderr);
1103         exit(SNTP_EXIT_FAILURE);
1104     }
1105     return res;
1106 }
1107 
1108 /**
1109  * All the pointers we use are marked "* const", but they are stored in
1110  * writable memory.  Coerce the mutability and set the pointer.
1111  */
1112 static void coerce_it(void ** s) { *s = AO_gettext(*s);
1113 }
1114 
1115 /**
1116  * Translate all the translatable strings in the sntpOptions
1117  * structure defined above.  This is done only once.
1118  */
1119 static void
1120 translate_option_strings(void)
1121 {
1122     tOptions * const opts = &sntpOptions;
1123 
1124     /*
1125      *  Guard against re-translation.  It won't work.  The strings will have
1126      *  been changed by the first pass through this code.  One shot only.
1127      */
1128     if (option_xlateable_txt.field_ct != 0) {
1129         /*
1130          *  Do the translations.  The first pointer follows the field count
1131          *  field.  The field count field is the size of a pointer.
1132          */
1133         char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
1134         int     ix  = option_xlateable_txt.field_ct;
1135 
1136         do {
1137             ppz++; /* skip over field_ct */
1138             *ppz = AO_gettext(*ppz);
1139         } while (--ix > 0);
1140         /* prevent re-translation and disable "libopts" domain lookup */
1141         option_xlateable_txt.field_ct = 0;
1142 
1143         coerce_it(VOIDP(&(opts->pzCopyright)));
1144         coerce_it(VOIDP(&(opts->pzCopyNotice)));
1145         coerce_it(VOIDP(&(opts->pzFullVersion)));
1146         coerce_it(VOIDP(&(opts->pzUsageTitle)));
1147         coerce_it(VOIDP(&(opts->pzExplain)));
1148         coerce_it(VOIDP(&(opts->pzDetail)));
1149         {
1150             tOptDesc * od = opts->pOptDesc;
1151             for (ix = opts->optCt; ix > 0; ix--, od++)
1152                 coerce_it(VOIDP(&(od->pzText)));
1153         }
1154     }
1155 }
1156 #endif /* ENABLE_NLS */
1157 
1158 #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
1159 /** I18N function strictly for xgettext.  Do not compile. */
1160 static void bogus_function(void) {
1161   /* TRANSLATORS:
1162 
1163      The following dummy function was crated solely so that xgettext can
1164      extract the correct strings.  These strings are actually referenced
1165      by a field name in the sntpOptions structure noted in the
1166      comments below.  The literal text is defined in sntp_opt_strs.
1167 
1168      NOTE: the strings below are segmented with respect to the source string
1169      sntp_opt_strs.  The strings above are handed off for translation
1170      at run time a paragraph at a time.  Consequently, they are presented here
1171      for translation a paragraph at a time.
1172 
1173      ALSO: often the description for an option will reference another option
1174      by name.  These are set off with apostrophe quotes (I hope).  Do not
1175      translate option names.
1176    */
1177   /* referenced via sntpOptions.pzCopyright */
1178   puts(_("sntp 4.2.8p9\n\
1179 Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n\
1180 This is free software. It is licensed for use, modification and\n\
1181 redistribution under the terms of the NTP License, copies of which\n\
1182 can be seen at:\n"));
1183   puts(_("  <http://ntp.org/license>\n\
1184   <http://opensource.org/licenses/ntp-license.php>\n"));
1185 
1186   /* referenced via sntpOptions.pzCopyNotice */
1187   puts(_("Permission to use, copy, modify, and distribute this software and its\n\
1188 documentation for any purpose with or without fee is hereby granted,\n\
1189 provided that the above copyright notice appears in all copies and that\n\
1190 both the copyright notice and this permission notice appear in supporting\n\
1191 documentation, and that the name The University of Delaware not be used in\n\
1192 advertising or publicity pertaining to distribution of the software without\n\
1193 specific, written prior permission.  The University of Delaware and Network\n\
1194 Time Foundation makes no representations about the suitability this\n\
1195 software for any purpose.  It is provided \"as is\" without express or\n\
1196 implied warranty.\n"));
1197 
1198   /* referenced via sntpOptions.pOptDesc->pzText */
1199   puts(_("Force IPv4 DNS name resolution"));
1200 
1201   /* referenced via sntpOptions.pOptDesc->pzText */
1202   puts(_("Force IPv6 DNS name resolution"));
1203 
1204   /* referenced via sntpOptions.pOptDesc->pzText */
1205   puts(_("Enable authentication with the key auth-keynumber"));
1206 
1207   /* referenced via sntpOptions.pOptDesc->pzText */
1208   puts(_("Listen to the address specified for broadcast time sync"));
1209 
1210   /* referenced via sntpOptions.pOptDesc->pzText */
1211   puts(_("Concurrently query all IPs returned for host-name"));
1212 
1213   /* referenced via sntpOptions.pOptDesc->pzText */
1214   puts(_("Increase debug verbosity level"));
1215 
1216   /* referenced via sntpOptions.pOptDesc->pzText */
1217   puts(_("Set the debug verbosity level"));
1218 
1219   /* referenced via sntpOptions.pOptDesc->pzText */
1220   puts(_("The gap (in milliseconds) between time requests"));
1221 
1222   /* referenced via sntpOptions.pOptDesc->pzText */
1223   puts(_("KoD history filename"));
1224 
1225   /* referenced via sntpOptions.pOptDesc->pzText */
1226   puts(_("Look in this file for the key specified with -a"));
1227 
1228   /* referenced via sntpOptions.pOptDesc->pzText */
1229   puts(_("Log to specified logfile"));
1230 
1231   /* referenced via sntpOptions.pOptDesc->pzText */
1232   puts(_("Adjustments less than steplimit msec will be slewed"));
1233 
1234   /* referenced via sntpOptions.pOptDesc->pzText */
1235   puts(_("Send int as our NTP protocol version"));
1236 
1237   /* referenced via sntpOptions.pOptDesc->pzText */
1238   puts(_("Use the NTP Reserved Port (port 123)"));
1239 
1240   /* referenced via sntpOptions.pOptDesc->pzText */
1241   puts(_("OK to 'step' the time with settimeofday(2)"));
1242 
1243   /* referenced via sntpOptions.pOptDesc->pzText */
1244   puts(_("OK to 'slew' the time with adjtime(2)"));
1245 
1246   /* referenced via sntpOptions.pOptDesc->pzText */
1247   puts(_("The number of seconds to wait for responses"));
1248 
1249   /* referenced via sntpOptions.pOptDesc->pzText */
1250   puts(_("Wait for pending replies (if not setting the time)"));
1251 
1252   /* referenced via sntpOptions.pOptDesc->pzText */
1253   puts(_("display extended usage information and exit"));
1254 
1255   /* referenced via sntpOptions.pOptDesc->pzText */
1256   puts(_("extended usage information passed thru pager"));
1257 
1258   /* referenced via sntpOptions.pOptDesc->pzText */
1259   puts(_("output version information and exit"));
1260 
1261   /* referenced via sntpOptions.pOptDesc->pzText */
1262   puts(_("save the option state to a config file"));
1263 
1264   /* referenced via sntpOptions.pOptDesc->pzText */
1265   puts(_("load options from a config file"));
1266 
1267   /* referenced via sntpOptions.pzUsageTitle */
1268   puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p9\n\
1269 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
1270 \t\t[ hostname-or-IP ...]\n"));
1271 
1272   /* referenced via sntpOptions.pzExplain */
1273   puts(_("\n"));
1274 
1275   /* referenced via sntpOptions.pzFullVersion */
1276   puts(_("sntp 4.2.8p9"));
1277 
1278   /* referenced via sntpOptions.pzFullUsage */
1279   puts(_("<<<NOT-FOUND>>>"));
1280 
1281   /* referenced via sntpOptions.pzShortUsage */
1282   puts(_("<<<NOT-FOUND>>>"));
1283   /* LIBOPTS-MESSAGES: */
1284 #line 67 "../autoopts.c"
1285   puts(_("allocation of %d bytes failed\n"));
1286 #line 93 "../autoopts.c"
1287   puts(_("allocation of %d bytes failed\n"));
1288 #line 53 "../init.c"
1289   puts(_("AutoOpts function called without option descriptor\n"));
1290 #line 86 "../init.c"
1291   puts(_("\tThis exceeds the compiled library version:  "));
1292 #line 84 "../init.c"
1293   puts(_("Automated Options Processing Error!\n"
1294        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
1295 #line 80 "../autoopts.c"
1296   puts(_("realloc of %d bytes at 0x%p failed\n"));
1297 #line 88 "../init.c"
1298   puts(_("\tThis is less than the minimum library version:  "));
1299 #line 121 "../version.c"
1300   puts(_("Automated Options version %s\n"
1301        "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
1302 #line 87 "../makeshell.c"
1303   puts(_("(AutoOpts bug):  %s.\n"));
1304 #line 90 "../reset.c"
1305   puts(_("optionResetOpt() called, but reset-option not configured"));
1306 #line 292 "../usage.c"
1307   puts(_("could not locate the 'help' option"));
1308 #line 336 "../autoopts.c"
1309   puts(_("optionProcess() was called with invalid data"));
1310 #line 748 "../usage.c"
1311   puts(_("invalid argument type specified"));
1312 #line 598 "../find.c"
1313   puts(_("defaulted to option with optional arg"));
1314 #line 76 "../alias.c"
1315   puts(_("aliasing option is out of range."));
1316 #line 234 "../enum.c"
1317   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
1318 #line 108 "../find.c"
1319   puts(_("  The following options match:\n"));
1320 #line 293 "../find.c"
1321   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
1322 #line 161 "../check.c"
1323   puts(_("%s: Command line arguments required\n"));
1324 #line 43 "../alias.c"
1325   puts(_("%d %s%s options allowed\n"));
1326 #line 94 "../makeshell.c"
1327   puts(_("%s error %d (%s) calling %s for '%s'\n"));
1328 #line 306 "../makeshell.c"
1329   puts(_("interprocess pipe"));
1330 #line 168 "../version.c"
1331   puts(_("error: version option argument '%c' invalid.  Use:\n"
1332        "\t'v' - version only\n"
1333        "\t'c' - version and copyright\n"
1334        "\t'n' - version and full copyright notice\n"));
1335 #line 58 "../check.c"
1336   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
1337 #line 217 "../find.c"
1338   puts(_("%s: The '%s' option has been disabled."));
1339 #line 430 "../find.c"
1340   puts(_("%s: The '%s' option has been disabled."));
1341 #line 38 "../alias.c"
1342   puts(_("-equivalence"));
1343 #line 469 "../find.c"
1344   puts(_("%s: illegal option -- %c\n"));
1345 #line 110 "../reset.c"
1346   puts(_("%s: illegal option -- %c\n"));
1347 #line 271 "../find.c"
1348   puts(_("%s: illegal option -- %s\n"));
1349 #line 755 "../find.c"
1350   puts(_("%s: illegal option -- %s\n"));
1351 #line 118 "../reset.c"
1352   puts(_("%s: illegal option -- %s\n"));
1353 #line 335 "../find.c"
1354   puts(_("%s: unknown vendor extension option -- %s\n"));
1355 #line 159 "../enum.c"
1356   puts(_("  or an integer from %d through %d\n"));
1357 #line 169 "../enum.c"
1358   puts(_("  or an integer from %d through %d\n"));
1359 #line 747 "../usage.c"
1360   puts(_("%s error:  invalid option descriptor for %s\n"));
1361 #line 1081 "../usage.c"
1362   puts(_("%s error:  invalid option descriptor for %s\n"));
1363 #line 385 "../find.c"
1364   puts(_("%s: invalid option name: %s\n"));
1365 #line 527 "../find.c"
1366   puts(_("%s: The '%s' option requires an argument.\n"));
1367 #line 156 "../autoopts.c"
1368   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
1369        "\t'%s' and '%s'."));
1370 #line 94 "../check.c"
1371   puts(_("%s error:  The %s option is required\n"));
1372 #line 632 "../find.c"
1373   puts(_("%s: The '%s' option cannot have an argument.\n"));
1374 #line 151 "../check.c"
1375   puts(_("%s: Command line arguments are not allowed.\n"));
1376 #line 535 "../save.c"
1377   puts(_("error %d (%s) creating %s\n"));
1378 #line 234 "../enum.c"
1379   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
1380 #line 93 "../reset.c"
1381   puts(_("%s error: The '%s' option requires an argument.\n"));
1382 #line 184 "../save.c"
1383   puts(_("error %d (%s) stat-ing %s\n"));
1384 #line 238 "../save.c"
1385   puts(_("error %d (%s) stat-ing %s\n"));
1386 #line 143 "../restore.c"
1387   puts(_("%s error: no saved option state\n"));
1388 #line 231 "../autoopts.c"
1389   puts(_("'%s' is not a command line option.\n"));
1390 #line 111 "../time.c"
1391   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
1392 #line 132 "../save.c"
1393   puts(_("'%s' not defined\n"));
1394 #line 50 "../time.c"
1395   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
1396 #line 92 "../check.c"
1397   puts(_("%s error:  The %s option must appear %d times.\n"));
1398 #line 164 "../numeric.c"
1399   puts(_("%s error:  '%s' is not a recognizable number.\n"));
1400 #line 200 "../enum.c"
1401   puts(_("%s error:  %s exceeds %s keyword count\n"));
1402 #line 330 "../usage.c"
1403   puts(_("Try '%s %s' for more information.\n"));
1404 #line 45 "../alias.c"
1405   puts(_("one %s%s option allowed\n"));
1406 #line 208 "../makeshell.c"
1407   puts(_("standard output"));
1408 #line 943 "../makeshell.c"
1409   puts(_("standard output"));
1410 #line 274 "../usage.c"
1411   puts(_("standard output"));
1412 #line 415 "../usage.c"
1413   puts(_("standard output"));
1414 #line 625 "../usage.c"
1415   puts(_("standard output"));
1416 #line 175 "../version.c"
1417   puts(_("standard output"));
1418 #line 274 "../usage.c"
1419   puts(_("standard error"));
1420 #line 415 "../usage.c"
1421   puts(_("standard error"));
1422 #line 625 "../usage.c"
1423   puts(_("standard error"));
1424 #line 175 "../version.c"
1425   puts(_("standard error"));
1426 #line 208 "../makeshell.c"
1427   puts(_("write"));
1428 #line 943 "../makeshell.c"
1429   puts(_("write"));
1430 #line 273 "../usage.c"
1431   puts(_("write"));
1432 #line 414 "../usage.c"
1433   puts(_("write"));
1434 #line 624 "../usage.c"
1435   puts(_("write"));
1436 #line 174 "../version.c"
1437   puts(_("write"));
1438 #line 60 "../numeric.c"
1439   puts(_("%s error:  %s option value %ld is out of range.\n"));
1440 #line 44 "../check.c"
1441   puts(_("%s error:  %s option requires the %s option\n"));
1442 #line 131 "../save.c"
1443   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1444 #line 183 "../save.c"
1445   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1446 #line 237 "../save.c"
1447   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1448 #line 256 "../save.c"
1449   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1450 #line 534 "../save.c"
1451   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1452   /* END-LIBOPTS-MESSAGES */
1453 
1454   /* USAGE-TEXT: */
1455 #line 873 "../usage.c"
1456   puts(_("\t\t\t\t- an alternate for '%s'\n"));
1457 #line 1148 "../usage.c"
1458   puts(_("Version, usage and configuration options:"));
1459 #line 924 "../usage.c"
1460   puts(_("\t\t\t\t- default option for unnamed options\n"));
1461 #line 837 "../usage.c"
1462   puts(_("\t\t\t\t- disabled as '--%s'\n"));
1463 #line 1117 "../usage.c"
1464   puts(_(" --- %-14s %s\n"));
1465 #line 1115 "../usage.c"
1466   puts(_("This option has been disabled"));
1467 #line 864 "../usage.c"
1468   puts(_("\t\t\t\t- enabled by default\n"));
1469 #line 40 "../alias.c"
1470   puts(_("%s error:  only "));
1471 #line 1194 "../usage.c"
1472   puts(_(" - examining environment variables named %s_*\n"));
1473 #line 168 "../file.c"
1474   puts(_("\t\t\t\t- file must not pre-exist\n"));
1475 #line 172 "../file.c"
1476   puts(_("\t\t\t\t- file must pre-exist\n"));
1477 #line 380 "../usage.c"
1478   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1479        "hyphen and the flag character.\n"));
1480 #line 921 "../makeshell.c"
1481   puts(_("\n"
1482        "= = = = = = = =\n\n"
1483        "This incarnation of genshell will produce\n"
1484        "a shell script to parse the options for %s:\n\n"));
1485 #line 166 "../enum.c"
1486   puts(_("  or an integer mask with any of the lower %d bits set\n"));
1487 #line 897 "../usage.c"
1488   puts(_("\t\t\t\t- is a set membership option\n"));
1489 #line 918 "../usage.c"
1490   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1491 #line 382 "../usage.c"
1492   puts(_("Options are specified by single or double hyphens and their name.\n"));
1493 #line 904 "../usage.c"
1494   puts(_("\t\t\t\t- may appear multiple times\n"));
1495 #line 891 "../usage.c"
1496   puts(_("\t\t\t\t- may not be preset\n"));
1497 #line 1309 "../usage.c"
1498   puts(_("   Arg Option-Name    Description\n"));
1499 #line 1245 "../usage.c"
1500   puts(_("  Flg Arg Option-Name    Description\n"));
1501 #line 1303 "../usage.c"
1502   puts(_("  Flg Arg Option-Name    Description\n"));
1503 #line 1304 "../usage.c"
1504   puts(_(" %3s %s"));
1505 #line 1310 "../usage.c"
1506   puts(_(" %3s %s"));
1507 #line 387 "../usage.c"
1508   puts(_("The '-#<number>' option may omit the hash char\n"));
1509 #line 383 "../usage.c"
1510   puts(_("All arguments are named options.\n"));
1511 #line 971 "../usage.c"
1512   puts(_(" - reading file %s"));
1513 #line 409 "../usage.c"
1514   puts(_("\n"
1515        "Please send bug reports to:  <%s>\n"));
1516 #line 100 "../version.c"
1517   puts(_("\n"
1518        "Please send bug reports to:  <%s>\n"));
1519 #line 129 "../version.c"
1520   puts(_("\n"
1521        "Please send bug reports to:  <%s>\n"));
1522 #line 903 "../usage.c"
1523   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1524 #line 944 "../usage.c"
1525   puts(_("\n"
1526        "The following option preset mechanisms are supported:\n"));
1527 #line 1192 "../usage.c"
1528   puts(_("\n"
1529        "The following option preset mechanisms are supported:\n"));
1530 #line 682 "../usage.c"
1531   puts(_("prohibits these options:\n"));
1532 #line 677 "../usage.c"
1533   puts(_("prohibits the option '%s'\n"));
1534 #line 81 "../numeric.c"
1535   puts(_("%s%ld to %ld"));
1536 #line 79 "../numeric.c"
1537   puts(_("%sgreater than or equal to %ld"));
1538 #line 75 "../numeric.c"
1539   puts(_("%s%ld exactly"));
1540 #line 68 "../numeric.c"
1541   puts(_("%sit must lie in one of the ranges:\n"));
1542 #line 68 "../numeric.c"
1543   puts(_("%sit must be in the range:\n"));
1544 #line 88 "../numeric.c"
1545   puts(_(", or\n"));
1546 #line 66 "../numeric.c"
1547   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1548 #line 77 "../numeric.c"
1549   puts(_("%sless than or equal to %ld"));
1550 #line 390 "../usage.c"
1551   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
1552 #line 652 "../usage.c"
1553   puts(_("requires the option '%s'\n"));
1554 #line 655 "../usage.c"
1555   puts(_("requires these options:\n"));
1556 #line 1321 "../usage.c"
1557   puts(_("   Arg Option-Name   Req?  Description\n"));
1558 #line 1315 "../usage.c"
1559   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
1560 #line 167 "../enum.c"
1561   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
1562        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1563        "will set them all.  Multiple entries may be passed as an option\n"
1564        "argument list.\n"));
1565 #line 910 "../usage.c"
1566   puts(_("\t\t\t\t- may appear up to %d times\n"));
1567 #line 77 "../enum.c"
1568   puts(_("The valid \"%s\" option keywords are:\n"));
1569 #line 1152 "../usage.c"
1570   puts(_("The next option supports vendor supported extra options:"));
1571 #line 773 "../usage.c"
1572   puts(_("These additional options are:"));
1573   /* END-USAGE-TEXT */
1574 }
1575 #endif /* uncompilable code */
1576 #ifdef  __cplusplus
1577 }
1578 #endif
1579 /* sntp-opts.c ends here */
1580