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