1285612Sdelphij/*
2181834Sroberto *  EDIT THIS FILE WITH CAUTION  (sntp-opts.c)
3285612Sdelphij *
4330567Sgordon *  It has been AutoGen-ed  February 27, 2018 at 10:25:32 AM by AutoGen 5.18.5
5181834Sroberto *  From the definitions    sntp-opts.def
6181834Sroberto *  and the template file   options
7181834Sroberto *
8285612Sdelphij * Generated from AutoOpts 41:0:16 templates.
9181834Sroberto *
10285612Sdelphij *  AutoOpts is a copyrighted work.  This source file is not encumbered
11285612Sdelphij *  by AutoOpts licensing, but is provided under the licensing terms chosen
12285612Sdelphij *  by the sntp author or copyright holder.  AutoOpts is
13285612Sdelphij *  licensed under the terms of the LGPL.  The redistributable library
14285612Sdelphij *  (``libopts'') is licensed under the terms of either the LGPL or, at the
15285612Sdelphij *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
16285612Sdelphij *  for details.
17181834Sroberto *
18285612Sdelphij * The sntp program is copyrighted and licensed
19285612Sdelphij * under the following terms:
20181834Sroberto *
21316722Sdelphij *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
22285612Sdelphij *  This is free software. It is licensed for use, modification and
23285612Sdelphij *  redistribution under the terms of the NTP License, copies of which
24285612Sdelphij *  can be seen at:
25285612Sdelphij *    <http://ntp.org/license>
26285612Sdelphij *    <http://opensource.org/licenses/ntp-license.php>
27285612Sdelphij *
28285612Sdelphij *  Permission to use, copy, modify, and distribute this software and its
29285612Sdelphij *  documentation for any purpose with or without fee is hereby granted,
30285612Sdelphij *  provided that the above copyright notice appears in all copies and that
31285612Sdelphij *  both the copyright notice and this permission notice appear in
32285612Sdelphij *  supporting documentation, and that the name The University of Delaware not be used in
33285612Sdelphij *  advertising or publicity pertaining to distribution of the software
34285612Sdelphij *  without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
35285612Sdelphij *  representations about the suitability this software for any purpose. It
36285612Sdelphij *  is provided "as is" without express or implied warranty.
37181834Sroberto */
38181834Sroberto
39285612Sdelphij#ifndef __doxygen__
40285612Sdelphij#define OPTION_CODE_COMPILE 1
41285612Sdelphij#include "sntp-opts.h"
42285612Sdelphij#include <sys/types.h>
43181834Sroberto
44181834Sroberto#include <limits.h>
45285612Sdelphij#include <stdio.h>
46285612Sdelphij#include <stdlib.h>
47285612Sdelphij#include <errno.h>
48181834Sroberto
49181834Sroberto#ifdef  __cplusplus
50181834Srobertoextern "C" {
51181834Sroberto#endif
52285612Sdelphijextern FILE * option_usage_fp;
53285612Sdelphij#define zCopyright      (sntp_opt_strs+0)
54316722Sdelphij#define zLicenseDescrip (sntp_opt_strs+341)
55181834Sroberto
56285612Sdelphij/*
57285612Sdelphij *  global included definitions
58285612Sdelphij */
59285612Sdelphij#ifdef __windows
60285612Sdelphij  extern int atoi(const char*);
61285612Sdelphij#else
62285612Sdelphij# include <stdlib.h>
63285612Sdelphij#endif
64285612Sdelphij
65181834Sroberto#ifndef NULL
66181834Sroberto#  define NULL 0
67181834Sroberto#endif
68181834Sroberto
69285612Sdelphij/**
70285612Sdelphij *  static const strings for sntp options
71181834Sroberto */
72330567Sgordonstatic char const sntp_opt_strs[2566] =
73330567Sgordon/*     0 */ "sntp 4.2.8p11\n"
74316722Sdelphij            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
75285612Sdelphij            "This is free software. It is licensed for use, modification and\n"
76285612Sdelphij            "redistribution under the terms of the NTP License, copies of which\n"
77285612Sdelphij            "can be seen at:\n"
78285612Sdelphij            "  <http://ntp.org/license>\n"
79285612Sdelphij            "  <http://opensource.org/licenses/ntp-license.php>\n\0"
80316722Sdelphij/*   341 */ "Permission to use, copy, modify, and distribute this software and its\n"
81285612Sdelphij            "documentation for any purpose with or without fee is hereby granted,\n"
82285612Sdelphij            "provided that the above copyright notice appears in all copies and that\n"
83285612Sdelphij            "both the copyright notice and this permission notice appear in supporting\n"
84285612Sdelphij            "documentation, and that the name The University of Delaware not be used in\n"
85285612Sdelphij            "advertising or publicity pertaining to distribution of the software without\n"
86285612Sdelphij            "specific, written prior permission.  The University of Delaware and Network\n"
87285612Sdelphij            "Time Foundation makes no representations about the suitability this\n"
88285612Sdelphij            "software for any purpose.  It is provided \"as is\" without express or\n"
89285612Sdelphij            "implied warranty.\n\0"
90316722Sdelphij/*  1009 */ "Force IPv4 DNS name resolution\0"
91316722Sdelphij/*  1040 */ "IPV4\0"
92316722Sdelphij/*  1045 */ "ipv4\0"
93316722Sdelphij/*  1050 */ "Force IPv6 DNS name resolution\0"
94316722Sdelphij/*  1081 */ "IPV6\0"
95316722Sdelphij/*  1086 */ "ipv6\0"
96316722Sdelphij/*  1091 */ "Enable authentication with the key auth-keynumber\0"
97316722Sdelphij/*  1141 */ "AUTHENTICATION\0"
98316722Sdelphij/*  1156 */ "authentication\0"
99316722Sdelphij/*  1171 */ "Listen to the address specified for broadcast time sync\0"
100316722Sdelphij/*  1227 */ "BROADCAST\0"
101316722Sdelphij/*  1237 */ "broadcast\0"
102316722Sdelphij/*  1247 */ "Concurrently query all IPs returned for host-name\0"
103316722Sdelphij/*  1297 */ "CONCURRENT\0"
104316722Sdelphij/*  1308 */ "concurrent\0"
105316722Sdelphij/*  1319 */ "Increase debug verbosity level\0"
106316722Sdelphij/*  1350 */ "DEBUG_LEVEL\0"
107316722Sdelphij/*  1362 */ "debug-level\0"
108316722Sdelphij/*  1374 */ "Set the debug verbosity level\0"
109316722Sdelphij/*  1404 */ "SET_DEBUG_LEVEL\0"
110316722Sdelphij/*  1420 */ "set-debug-level\0"
111316722Sdelphij/*  1436 */ "The gap (in milliseconds) between time requests\0"
112316722Sdelphij/*  1484 */ "GAP\0"
113316722Sdelphij/*  1488 */ "gap\0"
114316722Sdelphij/*  1492 */ "KoD history filename\0"
115316722Sdelphij/*  1513 */ "KOD\0"
116316722Sdelphij/*  1517 */ "kod\0"
117316722Sdelphij/*  1521 */ "/var/db/ntp-kod\0"
118316722Sdelphij/*  1537 */ "Look in this file for the key specified with -a\0"
119316722Sdelphij/*  1585 */ "KEYFILE\0"
120316722Sdelphij/*  1593 */ "keyfile\0"
121330567Sgordon/*  1601 */ "/etc/ntp.keys\0"
122330567Sgordon/*  1615 */ "Log to specified logfile\0"
123330567Sgordon/*  1640 */ "LOGFILE\0"
124330567Sgordon/*  1648 */ "logfile\0"
125330567Sgordon/*  1656 */ "Adjustments less than steplimit msec will be slewed\0"
126330567Sgordon/*  1708 */ "STEPLIMIT\0"
127330567Sgordon/*  1718 */ "steplimit\0"
128330567Sgordon/*  1728 */ "Send int as our NTP protocol version\0"
129330567Sgordon/*  1765 */ "NTPVERSION\0"
130330567Sgordon/*  1776 */ "ntpversion\0"
131330567Sgordon/*  1787 */ "Use the NTP Reserved Port (port 123)\0"
132330567Sgordon/*  1824 */ "USERESERVEDPORT\0"
133330567Sgordon/*  1840 */ "usereservedport\0"
134330567Sgordon/*  1856 */ "OK to 'step' the time with settimeofday(2)\0"
135330567Sgordon/*  1899 */ "STEP\0"
136330567Sgordon/*  1904 */ "step\0"
137330567Sgordon/*  1909 */ "OK to 'slew' the time with adjtime(2)\0"
138330567Sgordon/*  1947 */ "SLEW\0"
139330567Sgordon/*  1952 */ "slew\0"
140330567Sgordon/*  1957 */ "The number of seconds to wait for responses\0"
141330567Sgordon/*  2001 */ "TIMEOUT\0"
142330567Sgordon/*  2009 */ "timeout\0"
143330567Sgordon/*  2017 */ "Wait for pending replies (if not setting the time)\0"
144330567Sgordon/*  2068 */ "WAIT\0"
145330567Sgordon/*  2073 */ "no-wait\0"
146330567Sgordon/*  2081 */ "no\0"
147330567Sgordon/*  2084 */ "display extended usage information and exit\0"
148330567Sgordon/*  2128 */ "help\0"
149330567Sgordon/*  2133 */ "extended usage information passed thru pager\0"
150330567Sgordon/*  2178 */ "more-help\0"
151330567Sgordon/*  2188 */ "output version information and exit\0"
152330567Sgordon/*  2224 */ "version\0"
153330567Sgordon/*  2232 */ "save the option state to a config file\0"
154330567Sgordon/*  2271 */ "save-opts\0"
155330567Sgordon/*  2281 */ "load options from a config file\0"
156330567Sgordon/*  2313 */ "LOAD_OPTS\0"
157330567Sgordon/*  2323 */ "no-load-opts\0"
158330567Sgordon/*  2336 */ "SNTP\0"
159330567Sgordon/*  2341 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p11\n"
160285612Sdelphij            "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
161285612Sdelphij            "\t\t[ hostname-or-IP ...]\n\0"
162330567Sgordon/*  2501 */ "$HOME\0"
163330567Sgordon/*  2507 */ ".\0"
164330567Sgordon/*  2509 */ ".ntprc\0"
165330567Sgordon/*  2516 */ "http://bugs.ntp.org, bugs@ntp.org\0"
166330567Sgordon/*  2550 */ "\n\0"
167330567Sgordon/*  2552 */ "sntp 4.2.8p11";
168181834Sroberto
169285612Sdelphij/**
170285612Sdelphij *  ipv4 option description with
171285612Sdelphij *  "Must also have options" and "Incompatible options":
172181834Sroberto */
173285612Sdelphij/** Descriptive text for the ipv4 option */
174316722Sdelphij#define IPV4_DESC      (sntp_opt_strs+1009)
175285612Sdelphij/** Upper-cased name for the ipv4 option */
176316722Sdelphij#define IPV4_NAME      (sntp_opt_strs+1040)
177285612Sdelphij/** Name string for the ipv4 option */
178316722Sdelphij#define IPV4_name      (sntp_opt_strs+1045)
179285612Sdelphij/** Other options that appear in conjunction with the ipv4 option */
180285612Sdelphijstatic int const aIpv4CantList[] = {
181285612Sdelphij    INDEX_OPT_IPV6, NO_EQUIVALENT };
182285612Sdelphij/** Compiled in flag settings for the ipv4 option */
183285612Sdelphij#define IPV4_FLAGS     (OPTST_DISABLED)
184181834Sroberto
185285612Sdelphij/**
186285612Sdelphij *  ipv6 option description with
187181834Sroberto *  "Must also have options" and "Incompatible options":
188181834Sroberto */
189285612Sdelphij/** Descriptive text for the ipv6 option */
190316722Sdelphij#define IPV6_DESC      (sntp_opt_strs+1050)
191285612Sdelphij/** Upper-cased name for the ipv6 option */
192316722Sdelphij#define IPV6_NAME      (sntp_opt_strs+1081)
193285612Sdelphij/** Name string for the ipv6 option */
194316722Sdelphij#define IPV6_name      (sntp_opt_strs+1086)
195285612Sdelphij/** Other options that appear in conjunction with the ipv6 option */
196285612Sdelphijstatic int const aIpv6CantList[] = {
197285612Sdelphij    INDEX_OPT_IPV4, NO_EQUIVALENT };
198285612Sdelphij/** Compiled in flag settings for the ipv6 option */
199285612Sdelphij#define IPV6_FLAGS     (OPTST_DISABLED)
200181834Sroberto
201285612Sdelphij/**
202285612Sdelphij *  authentication option description:
203181834Sroberto */
204285612Sdelphij/** Descriptive text for the authentication option */
205316722Sdelphij#define AUTHENTICATION_DESC      (sntp_opt_strs+1091)
206285612Sdelphij/** Upper-cased name for the authentication option */
207316722Sdelphij#define AUTHENTICATION_NAME      (sntp_opt_strs+1141)
208285612Sdelphij/** Name string for the authentication option */
209316722Sdelphij#define AUTHENTICATION_name      (sntp_opt_strs+1156)
210285612Sdelphij/** Compiled in flag settings for the authentication option */
211285612Sdelphij#define AUTHENTICATION_FLAGS     (OPTST_DISABLED \
212285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
213181834Sroberto
214285612Sdelphij/**
215285612Sdelphij *  broadcast option description:
216181834Sroberto */
217285612Sdelphij/** Descriptive text for the broadcast option */
218316722Sdelphij#define BROADCAST_DESC      (sntp_opt_strs+1171)
219285612Sdelphij/** Upper-cased name for the broadcast option */
220316722Sdelphij#define BROADCAST_NAME      (sntp_opt_strs+1227)
221285612Sdelphij/** Name string for the broadcast option */
222316722Sdelphij#define BROADCAST_name      (sntp_opt_strs+1237)
223285612Sdelphij/** Compiled in flag settings for the broadcast option */
224285612Sdelphij#define BROADCAST_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
225285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
226181834Sroberto
227285612Sdelphij/**
228285612Sdelphij *  concurrent option description:
229181834Sroberto */
230285612Sdelphij/** Descriptive text for the concurrent option */
231316722Sdelphij#define CONCURRENT_DESC      (sntp_opt_strs+1247)
232285612Sdelphij/** Upper-cased name for the concurrent option */
233316722Sdelphij#define CONCURRENT_NAME      (sntp_opt_strs+1297)
234285612Sdelphij/** Name string for the concurrent option */
235316722Sdelphij#define CONCURRENT_name      (sntp_opt_strs+1308)
236285612Sdelphij/** Compiled in flag settings for the concurrent option */
237285612Sdelphij#define CONCURRENT_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
238285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
239181834Sroberto
240285612Sdelphij/**
241285612Sdelphij *  debug-level option description:
242181834Sroberto */
243285612Sdelphij/** Descriptive text for the debug-level option */
244316722Sdelphij#define DEBUG_LEVEL_DESC      (sntp_opt_strs+1319)
245285612Sdelphij/** Upper-cased name for the debug-level option */
246316722Sdelphij#define DEBUG_LEVEL_NAME      (sntp_opt_strs+1350)
247285612Sdelphij/** Name string for the debug-level option */
248316722Sdelphij#define DEBUG_LEVEL_name      (sntp_opt_strs+1362)
249285612Sdelphij/** Compiled in flag settings for the debug-level option */
250285612Sdelphij#define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
251181834Sroberto
252285612Sdelphij/**
253285612Sdelphij *  set-debug-level option description:
254181834Sroberto */
255285612Sdelphij/** Descriptive text for the set-debug-level option */
256316722Sdelphij#define SET_DEBUG_LEVEL_DESC      (sntp_opt_strs+1374)
257285612Sdelphij/** Upper-cased name for the set-debug-level option */
258316722Sdelphij#define SET_DEBUG_LEVEL_NAME      (sntp_opt_strs+1404)
259285612Sdelphij/** Name string for the set-debug-level option */
260316722Sdelphij#define SET_DEBUG_LEVEL_name      (sntp_opt_strs+1420)
261285612Sdelphij/** Compiled in flag settings for the set-debug-level option */
262285612Sdelphij#define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
263285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
264181834Sroberto
265285612Sdelphij/**
266285612Sdelphij *  gap option description:
267285612Sdelphij */
268285612Sdelphij/** Descriptive text for the gap option */
269316722Sdelphij#define GAP_DESC      (sntp_opt_strs+1436)
270285612Sdelphij/** Upper-cased name for the gap option */
271316722Sdelphij#define GAP_NAME      (sntp_opt_strs+1484)
272285612Sdelphij/** Name string for the gap option */
273316722Sdelphij#define GAP_name      (sntp_opt_strs+1488)
274285612Sdelphij/** The compiled in default value for the gap option argument */
275285612Sdelphij#define GAP_DFT_ARG   ((char const*)50)
276285612Sdelphij/** Compiled in flag settings for the gap option */
277285612Sdelphij#define GAP_FLAGS     (OPTST_DISABLED \
278285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
279181834Sroberto
280285612Sdelphij/**
281285612Sdelphij *  kod option description:
282285612Sdelphij */
283285612Sdelphij/** Descriptive text for the kod option */
284316722Sdelphij#define KOD_DESC      (sntp_opt_strs+1492)
285285612Sdelphij/** Upper-cased name for the kod option */
286316722Sdelphij#define KOD_NAME      (sntp_opt_strs+1513)
287285612Sdelphij/** Name string for the kod option */
288316722Sdelphij#define KOD_name      (sntp_opt_strs+1517)
289285612Sdelphij/** The compiled in default value for the kod option argument */
290316722Sdelphij#define KOD_DFT_ARG   (sntp_opt_strs+1521)
291285612Sdelphij/** Compiled in flag settings for the kod option */
292285612Sdelphij#define KOD_FLAGS     (OPTST_DISABLED \
293285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
294181834Sroberto
295285612Sdelphij/**
296285612Sdelphij *  keyfile option description:
297181834Sroberto */
298285612Sdelphij/** Descriptive text for the keyfile option */
299316722Sdelphij#define KEYFILE_DESC      (sntp_opt_strs+1537)
300285612Sdelphij/** Upper-cased name for the keyfile option */
301316722Sdelphij#define KEYFILE_NAME      (sntp_opt_strs+1585)
302285612Sdelphij/** Name string for the keyfile option */
303316722Sdelphij#define KEYFILE_name      (sntp_opt_strs+1593)
304330567Sgordon/** The compiled in default value for the keyfile option argument */
305330567Sgordon#define KEYFILE_DFT_ARG   (sntp_opt_strs+1601)
306285612Sdelphij/** Compiled in flag settings for the keyfile option */
307285612Sdelphij#define KEYFILE_FLAGS     (OPTST_DISABLED \
308285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
309181834Sroberto
310285612Sdelphij/**
311285612Sdelphij *  logfile option description:
312285612Sdelphij */
313285612Sdelphij/** Descriptive text for the logfile option */
314330567Sgordon#define LOGFILE_DESC      (sntp_opt_strs+1615)
315285612Sdelphij/** Upper-cased name for the logfile option */
316330567Sgordon#define LOGFILE_NAME      (sntp_opt_strs+1640)
317285612Sdelphij/** Name string for the logfile option */
318330567Sgordon#define LOGFILE_name      (sntp_opt_strs+1648)
319285612Sdelphij/** Compiled in flag settings for the logfile option */
320285612Sdelphij#define LOGFILE_FLAGS     (OPTST_DISABLED \
321285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
322181834Sroberto
323285612Sdelphij/**
324285612Sdelphij *  steplimit option description:
325181834Sroberto */
326285612Sdelphij/** Descriptive text for the steplimit option */
327330567Sgordon#define STEPLIMIT_DESC      (sntp_opt_strs+1656)
328285612Sdelphij/** Upper-cased name for the steplimit option */
329330567Sgordon#define STEPLIMIT_NAME      (sntp_opt_strs+1708)
330285612Sdelphij/** Name string for the steplimit option */
331330567Sgordon#define STEPLIMIT_name      (sntp_opt_strs+1718)
332285612Sdelphij/** Compiled in flag settings for the steplimit option */
333285612Sdelphij#define STEPLIMIT_FLAGS     (OPTST_DISABLED \
334285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
335285612Sdelphij
336285612Sdelphij/**
337285612Sdelphij *  ntpversion option description:
338181834Sroberto */
339285612Sdelphij/** Descriptive text for the ntpversion option */
340330567Sgordon#define NTPVERSION_DESC      (sntp_opt_strs+1728)
341285612Sdelphij/** Upper-cased name for the ntpversion option */
342330567Sgordon#define NTPVERSION_NAME      (sntp_opt_strs+1765)
343285612Sdelphij/** Name string for the ntpversion option */
344330567Sgordon#define NTPVERSION_name      (sntp_opt_strs+1776)
345285612Sdelphij/** The compiled in default value for the ntpversion option argument */
346285612Sdelphij#define NTPVERSION_DFT_ARG   ((char const*)4)
347285612Sdelphij/** Compiled in flag settings for the ntpversion option */
348285612Sdelphij#define NTPVERSION_FLAGS     (OPTST_DISABLED \
349285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
350181834Sroberto
351285612Sdelphij/**
352285612Sdelphij *  usereservedport option description:
353285612Sdelphij */
354285612Sdelphij/** Descriptive text for the usereservedport option */
355330567Sgordon#define USERESERVEDPORT_DESC      (sntp_opt_strs+1787)
356285612Sdelphij/** Upper-cased name for the usereservedport option */
357330567Sgordon#define USERESERVEDPORT_NAME      (sntp_opt_strs+1824)
358285612Sdelphij/** Name string for the usereservedport option */
359330567Sgordon#define USERESERVEDPORT_name      (sntp_opt_strs+1840)
360285612Sdelphij/** Compiled in flag settings for the usereservedport option */
361285612Sdelphij#define USERESERVEDPORT_FLAGS     (OPTST_DISABLED)
362285612Sdelphij
363285612Sdelphij/**
364285612Sdelphij *  step option description:
365285612Sdelphij */
366285612Sdelphij/** Descriptive text for the step option */
367330567Sgordon#define STEP_DESC      (sntp_opt_strs+1856)
368285612Sdelphij/** Upper-cased name for the step option */
369330567Sgordon#define STEP_NAME      (sntp_opt_strs+1899)
370285612Sdelphij/** Name string for the step option */
371330567Sgordon#define STEP_name      (sntp_opt_strs+1904)
372285612Sdelphij/** Compiled in flag settings for the step option */
373285612Sdelphij#define STEP_FLAGS     (OPTST_DISABLED)
374285612Sdelphij
375285612Sdelphij/**
376285612Sdelphij *  slew option description:
377285612Sdelphij */
378285612Sdelphij/** Descriptive text for the slew option */
379330567Sgordon#define SLEW_DESC      (sntp_opt_strs+1909)
380285612Sdelphij/** Upper-cased name for the slew option */
381330567Sgordon#define SLEW_NAME      (sntp_opt_strs+1947)
382285612Sdelphij/** Name string for the slew option */
383330567Sgordon#define SLEW_name      (sntp_opt_strs+1952)
384285612Sdelphij/** Compiled in flag settings for the slew option */
385285612Sdelphij#define SLEW_FLAGS     (OPTST_DISABLED)
386285612Sdelphij
387285612Sdelphij/**
388285612Sdelphij *  timeout option description:
389285612Sdelphij */
390285612Sdelphij/** Descriptive text for the timeout option */
391330567Sgordon#define TIMEOUT_DESC      (sntp_opt_strs+1957)
392285612Sdelphij/** Upper-cased name for the timeout option */
393330567Sgordon#define TIMEOUT_NAME      (sntp_opt_strs+2001)
394285612Sdelphij/** Name string for the timeout option */
395330567Sgordon#define TIMEOUT_name      (sntp_opt_strs+2009)
396285612Sdelphij/** The compiled in default value for the timeout option argument */
397285612Sdelphij#define TIMEOUT_DFT_ARG   ((char const*)5)
398285612Sdelphij/** Compiled in flag settings for the timeout option */
399285612Sdelphij#define TIMEOUT_FLAGS     (OPTST_DISABLED \
400285612Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
401285612Sdelphij
402285612Sdelphij/**
403285612Sdelphij *  wait option description:
404285612Sdelphij */
405285612Sdelphij/** Descriptive text for the wait option */
406330567Sgordon#define WAIT_DESC      (sntp_opt_strs+2017)
407285612Sdelphij/** Upper-cased name for the wait option */
408330567Sgordon#define WAIT_NAME      (sntp_opt_strs+2068)
409285612Sdelphij/** disablement name for the wait option */
410330567Sgordon#define NOT_WAIT_name  (sntp_opt_strs+2073)
411285612Sdelphij/** disablement prefix for the wait option */
412330567Sgordon#define NOT_WAIT_PFX   (sntp_opt_strs+2081)
413285612Sdelphij/** Name string for the wait option */
414285612Sdelphij#define WAIT_name      (NOT_WAIT_name + 3)
415285612Sdelphij/** Compiled in flag settings for the wait option */
416285612Sdelphij#define WAIT_FLAGS     (OPTST_INITENABLED)
417285612Sdelphij
418181834Sroberto/*
419285612Sdelphij *  Help/More_Help/Version option descriptions:
420181834Sroberto */
421330567Sgordon#define HELP_DESC       (sntp_opt_strs+2084)
422330567Sgordon#define HELP_name       (sntp_opt_strs+2128)
423285612Sdelphij#ifdef HAVE_WORKING_FORK
424330567Sgordon#define MORE_HELP_DESC  (sntp_opt_strs+2133)
425330567Sgordon#define MORE_HELP_name  (sntp_opt_strs+2178)
426285612Sdelphij#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
427285612Sdelphij#else
428285612Sdelphij#define MORE_HELP_DESC  HELP_DESC
429285612Sdelphij#define MORE_HELP_name  HELP_name
430285612Sdelphij#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
431285612Sdelphij#endif
432285612Sdelphij#ifdef NO_OPTIONAL_OPT_ARGS
433285612Sdelphij#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
434285612Sdelphij#else
435285612Sdelphij#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
436285612Sdelphij                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
437285612Sdelphij#endif
438330567Sgordon#define VER_DESC        (sntp_opt_strs+2188)
439330567Sgordon#define VER_name        (sntp_opt_strs+2224)
440330567Sgordon#define SAVE_OPTS_DESC  (sntp_opt_strs+2232)
441330567Sgordon#define SAVE_OPTS_name  (sntp_opt_strs+2271)
442330567Sgordon#define LOAD_OPTS_DESC     (sntp_opt_strs+2281)
443330567Sgordon#define LOAD_OPTS_NAME     (sntp_opt_strs+2313)
444330567Sgordon#define NO_LOAD_OPTS_name  (sntp_opt_strs+2323)
445330567Sgordon#define LOAD_OPTS_pfx      (sntp_opt_strs+2081)
446285612Sdelphij#define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
447285612Sdelphij/**
448285612Sdelphij *  Declare option callback procedures
449285612Sdelphij */
450181834Srobertoextern tOptProc
451285612Sdelphij    ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
452285612Sdelphij    optionNumericVal,      optionPagedUsage,      optionResetOpt,
453285612Sdelphij    optionStackArg,        optionTimeDate,        optionTimeVal,
454285612Sdelphij    optionUnstackArg,      optionVendorOption;
455181834Srobertostatic tOptProc
456285612Sdelphij    doOptDebug_Level, doOptKeyfile,     doOptKod,         doOptLogfile,
457285612Sdelphij    doOptNtpversion,  doOptSteplimit,   doUsageOpt;
458285612Sdelphij#define VER_PROC        ntpOptionPrintVersion
459181834Sroberto
460285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
461285612Sdelphij/**
462285612Sdelphij *  Define the sntp Option Descriptions.
463285612Sdelphij * This is an array of OPTION_CT entries, one for each
464285612Sdelphij * option that the sntp program responds to.
465181834Sroberto */
466285612Sdelphijstatic tOptDesc optDesc[OPTION_CT] = {
467181834Sroberto  {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
468285612Sdelphij     /* equiv idx, value */ 0, VALUE_OPT_IPV4,
469181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
470181834Sroberto     /* min, max, act ct */ 0, 1, 0,
471181834Sroberto     /* opt state flags  */ IPV4_FLAGS, 0,
472285612Sdelphij     /* last opt argumnt */ { NULL }, /* --ipv4 */
473181834Sroberto     /* arg list/cookie  */ NULL,
474285612Sdelphij     /* must/cannot opts */ NULL, aIpv4CantList,
475181834Sroberto     /* option proc      */ NULL,
476285612Sdelphij     /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
477181834Sroberto     /* disablement strs */ NULL, NULL },
478181834Sroberto
479181834Sroberto  {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
480285612Sdelphij     /* equiv idx, value */ 1, VALUE_OPT_IPV6,
481285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
482181834Sroberto     /* min, max, act ct */ 0, 1, 0,
483181834Sroberto     /* opt state flags  */ IPV6_FLAGS, 0,
484285612Sdelphij     /* last opt argumnt */ { NULL }, /* --ipv6 */
485181834Sroberto     /* arg list/cookie  */ NULL,
486285612Sdelphij     /* must/cannot opts */ NULL, aIpv6CantList,
487181834Sroberto     /* option proc      */ NULL,
488285612Sdelphij     /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
489181834Sroberto     /* disablement strs */ NULL, NULL },
490181834Sroberto
491285612Sdelphij  {  /* entry idx, value */ 2, VALUE_OPT_AUTHENTICATION,
492285612Sdelphij     /* equiv idx, value */ 2, VALUE_OPT_AUTHENTICATION,
493181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
494181834Sroberto     /* min, max, act ct */ 0, 1, 0,
495285612Sdelphij     /* opt state flags  */ AUTHENTICATION_FLAGS, 0,
496285612Sdelphij     /* last opt argumnt */ { NULL }, /* --authentication */
497181834Sroberto     /* arg list/cookie  */ NULL,
498181834Sroberto     /* must/cannot opts */ NULL, NULL,
499285612Sdelphij     /* option proc      */ optionNumericVal,
500285612Sdelphij     /* desc, NAME, name */ AUTHENTICATION_DESC, AUTHENTICATION_NAME, AUTHENTICATION_name,
501181834Sroberto     /* disablement strs */ NULL, NULL },
502181834Sroberto
503285612Sdelphij  {  /* entry idx, value */ 3, VALUE_OPT_BROADCAST,
504285612Sdelphij     /* equiv idx, value */ 3, VALUE_OPT_BROADCAST,
505181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
506285612Sdelphij     /* min, max, act ct */ 0, NOLIMIT, 0,
507285612Sdelphij     /* opt state flags  */ BROADCAST_FLAGS, 0,
508285612Sdelphij     /* last opt argumnt */ { NULL }, /* --broadcast */
509285612Sdelphij     /* arg list/cookie  */ NULL,
510285612Sdelphij     /* must/cannot opts */ NULL, NULL,
511285612Sdelphij     /* option proc      */ optionStackArg,
512285612Sdelphij     /* desc, NAME, name */ BROADCAST_DESC, BROADCAST_NAME, BROADCAST_name,
513285612Sdelphij     /* disablement strs */ NULL, NULL },
514285612Sdelphij
515285612Sdelphij  {  /* entry idx, value */ 4, VALUE_OPT_CONCURRENT,
516285612Sdelphij     /* equiv idx, value */ 4, VALUE_OPT_CONCURRENT,
517285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
518285612Sdelphij     /* min, max, act ct */ 0, NOLIMIT, 0,
519285612Sdelphij     /* opt state flags  */ CONCURRENT_FLAGS, 0,
520285612Sdelphij     /* last opt argumnt */ { NULL }, /* --concurrent */
521285612Sdelphij     /* arg list/cookie  */ NULL,
522285612Sdelphij     /* must/cannot opts */ NULL, NULL,
523285612Sdelphij     /* option proc      */ optionStackArg,
524285612Sdelphij     /* desc, NAME, name */ CONCURRENT_DESC, CONCURRENT_NAME, CONCURRENT_name,
525285612Sdelphij     /* disablement strs */ NULL, NULL },
526285612Sdelphij
527285612Sdelphij  {  /* entry idx, value */ 5, VALUE_OPT_DEBUG_LEVEL,
528285612Sdelphij     /* equiv idx, value */ 5, VALUE_OPT_DEBUG_LEVEL,
529285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
530285612Sdelphij     /* min, max, act ct */ 0, NOLIMIT, 0,
531285612Sdelphij     /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
532285612Sdelphij     /* last opt argumnt */ { NULL }, /* --debug-level */
533285612Sdelphij     /* arg list/cookie  */ NULL,
534285612Sdelphij     /* must/cannot opts */ NULL, NULL,
535285612Sdelphij     /* option proc      */ doOptDebug_Level,
536285612Sdelphij     /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
537285612Sdelphij     /* disablement strs */ NULL, NULL },
538285612Sdelphij
539285612Sdelphij  {  /* entry idx, value */ 6, VALUE_OPT_SET_DEBUG_LEVEL,
540285612Sdelphij     /* equiv idx, value */ 6, VALUE_OPT_SET_DEBUG_LEVEL,
541285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
542285612Sdelphij     /* min, max, act ct */ 0, NOLIMIT, 0,
543285612Sdelphij     /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
544285612Sdelphij     /* last opt argumnt */ { NULL }, /* --set-debug-level */
545285612Sdelphij     /* arg list/cookie  */ NULL,
546285612Sdelphij     /* must/cannot opts */ NULL, NULL,
547285612Sdelphij     /* option proc      */ optionNumericVal,
548285612Sdelphij     /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
549285612Sdelphij     /* disablement strs */ NULL, NULL },
550285612Sdelphij
551285612Sdelphij  {  /* entry idx, value */ 7, VALUE_OPT_GAP,
552285612Sdelphij     /* equiv idx, value */ 7, VALUE_OPT_GAP,
553285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
554181834Sroberto     /* min, max, act ct */ 0, 1, 0,
555285612Sdelphij     /* opt state flags  */ GAP_FLAGS, 0,
556285612Sdelphij     /* last opt argumnt */ { GAP_DFT_ARG },
557181834Sroberto     /* arg list/cookie  */ NULL,
558285612Sdelphij     /* must/cannot opts */ NULL, NULL,
559285612Sdelphij     /* option proc      */ optionNumericVal,
560285612Sdelphij     /* desc, NAME, name */ GAP_DESC, GAP_NAME, GAP_name,
561181834Sroberto     /* disablement strs */ NULL, NULL },
562181834Sroberto
563285612Sdelphij  {  /* entry idx, value */ 8, VALUE_OPT_KOD,
564285612Sdelphij     /* equiv idx, value */ 8, VALUE_OPT_KOD,
565181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
566181834Sroberto     /* min, max, act ct */ 0, 1, 0,
567285612Sdelphij     /* opt state flags  */ KOD_FLAGS, 0,
568285612Sdelphij     /* last opt argumnt */ { KOD_DFT_ARG },
569181834Sroberto     /* arg list/cookie  */ NULL,
570285612Sdelphij     /* must/cannot opts */ NULL, NULL,
571285612Sdelphij     /* option proc      */ doOptKod,
572285612Sdelphij     /* desc, NAME, name */ KOD_DESC, KOD_NAME, KOD_name,
573181834Sroberto     /* disablement strs */ NULL, NULL },
574181834Sroberto
575285612Sdelphij  {  /* entry idx, value */ 9, VALUE_OPT_KEYFILE,
576285612Sdelphij     /* equiv idx, value */ 9, VALUE_OPT_KEYFILE,
577181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
578181834Sroberto     /* min, max, act ct */ 0, 1, 0,
579285612Sdelphij     /* opt state flags  */ KEYFILE_FLAGS, 0,
580330567Sgordon     /* last opt argumnt */ { KEYFILE_DFT_ARG },
581181834Sroberto     /* arg list/cookie  */ NULL,
582285612Sdelphij     /* must/cannot opts */ NULL, NULL,
583285612Sdelphij     /* option proc      */ doOptKeyfile,
584285612Sdelphij     /* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
585285612Sdelphij     /* disablement strs */ NULL, NULL },
586285612Sdelphij
587285612Sdelphij  {  /* entry idx, value */ 10, VALUE_OPT_LOGFILE,
588285612Sdelphij     /* equiv idx, value */ 10, VALUE_OPT_LOGFILE,
589285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
590285612Sdelphij     /* min, max, act ct */ 0, 1, 0,
591285612Sdelphij     /* opt state flags  */ LOGFILE_FLAGS, 0,
592285612Sdelphij     /* last opt argumnt */ { NULL }, /* --logfile */
593285612Sdelphij     /* arg list/cookie  */ NULL,
594285612Sdelphij     /* must/cannot opts */ NULL, NULL,
595285612Sdelphij     /* option proc      */ doOptLogfile,
596285612Sdelphij     /* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
597285612Sdelphij     /* disablement strs */ NULL, NULL },
598285612Sdelphij
599285612Sdelphij  {  /* entry idx, value */ 11, VALUE_OPT_STEPLIMIT,
600285612Sdelphij     /* equiv idx, value */ 11, VALUE_OPT_STEPLIMIT,
601285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
602285612Sdelphij     /* min, max, act ct */ 0, 1, 0,
603285612Sdelphij     /* opt state flags  */ STEPLIMIT_FLAGS, 0,
604285612Sdelphij     /* last opt argumnt */ { NULL }, /* --steplimit */
605285612Sdelphij     /* arg list/cookie  */ NULL,
606285612Sdelphij     /* must/cannot opts */ NULL, NULL,
607285612Sdelphij     /* option proc      */ doOptSteplimit,
608285612Sdelphij     /* desc, NAME, name */ STEPLIMIT_DESC, STEPLIMIT_NAME, STEPLIMIT_name,
609285612Sdelphij     /* disablement strs */ NULL, NULL },
610285612Sdelphij
611285612Sdelphij  {  /* entry idx, value */ 12, VALUE_OPT_NTPVERSION,
612285612Sdelphij     /* equiv idx, value */ 12, VALUE_OPT_NTPVERSION,
613285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
614285612Sdelphij     /* min, max, act ct */ 0, 1, 0,
615285612Sdelphij     /* opt state flags  */ NTPVERSION_FLAGS, 0,
616285612Sdelphij     /* last opt argumnt */ { NTPVERSION_DFT_ARG },
617285612Sdelphij     /* arg list/cookie  */ NULL,
618285612Sdelphij     /* must/cannot opts */ NULL, NULL,
619285612Sdelphij     /* option proc      */ doOptNtpversion,
620285612Sdelphij     /* desc, NAME, name */ NTPVERSION_DESC, NTPVERSION_NAME, NTPVERSION_name,
621285612Sdelphij     /* disablement strs */ NULL, NULL },
622285612Sdelphij
623285612Sdelphij  {  /* entry idx, value */ 13, VALUE_OPT_USERESERVEDPORT,
624285612Sdelphij     /* equiv idx, value */ 13, VALUE_OPT_USERESERVEDPORT,
625285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
626285612Sdelphij     /* min, max, act ct */ 0, 1, 0,
627285612Sdelphij     /* opt state flags  */ USERESERVEDPORT_FLAGS, 0,
628285612Sdelphij     /* last opt argumnt */ { NULL }, /* --usereservedport */
629285612Sdelphij     /* arg list/cookie  */ NULL,
630285612Sdelphij     /* must/cannot opts */ NULL, NULL,
631181834Sroberto     /* option proc      */ NULL,
632285612Sdelphij     /* desc, NAME, name */ USERESERVEDPORT_DESC, USERESERVEDPORT_NAME, USERESERVEDPORT_name,
633181834Sroberto     /* disablement strs */ NULL, NULL },
634181834Sroberto
635285612Sdelphij  {  /* entry idx, value */ 14, VALUE_OPT_STEP,
636285612Sdelphij     /* equiv idx, value */ 14, VALUE_OPT_STEP,
637181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
638181834Sroberto     /* min, max, act ct */ 0, 1, 0,
639285612Sdelphij     /* opt state flags  */ STEP_FLAGS, 0,
640285612Sdelphij     /* last opt argumnt */ { NULL }, /* --step */
641181834Sroberto     /* arg list/cookie  */ NULL,
642285612Sdelphij     /* must/cannot opts */ NULL, NULL,
643181834Sroberto     /* option proc      */ NULL,
644285612Sdelphij     /* desc, NAME, name */ STEP_DESC, STEP_NAME, STEP_name,
645181834Sroberto     /* disablement strs */ NULL, NULL },
646181834Sroberto
647285612Sdelphij  {  /* entry idx, value */ 15, VALUE_OPT_SLEW,
648285612Sdelphij     /* equiv idx, value */ 15, VALUE_OPT_SLEW,
649181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
650181834Sroberto     /* min, max, act ct */ 0, 1, 0,
651285612Sdelphij     /* opt state flags  */ SLEW_FLAGS, 0,
652285612Sdelphij     /* last opt argumnt */ { NULL }, /* --slew */
653181834Sroberto     /* arg list/cookie  */ NULL,
654285612Sdelphij     /* must/cannot opts */ NULL, NULL,
655181834Sroberto     /* option proc      */ NULL,
656285612Sdelphij     /* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
657181834Sroberto     /* disablement strs */ NULL, NULL },
658181834Sroberto
659285612Sdelphij  {  /* entry idx, value */ 16, VALUE_OPT_TIMEOUT,
660285612Sdelphij     /* equiv idx, value */ 16, VALUE_OPT_TIMEOUT,
661285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
662285612Sdelphij     /* min, max, act ct */ 0, 1, 0,
663285612Sdelphij     /* opt state flags  */ TIMEOUT_FLAGS, 0,
664285612Sdelphij     /* last opt argumnt */ { TIMEOUT_DFT_ARG },
665285612Sdelphij     /* arg list/cookie  */ NULL,
666285612Sdelphij     /* must/cannot opts */ NULL, NULL,
667285612Sdelphij     /* option proc      */ optionNumericVal,
668285612Sdelphij     /* desc, NAME, name */ TIMEOUT_DESC, TIMEOUT_NAME, TIMEOUT_name,
669285612Sdelphij     /* disablement strs */ NULL, NULL },
670181834Sroberto
671285612Sdelphij  {  /* entry idx, value */ 17, VALUE_OPT_WAIT,
672285612Sdelphij     /* equiv idx, value */ 17, VALUE_OPT_WAIT,
673285612Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
674285612Sdelphij     /* min, max, act ct */ 0, 1, 0,
675285612Sdelphij     /* opt state flags  */ WAIT_FLAGS, 0,
676285612Sdelphij     /* last opt argumnt */ { NULL }, /* --wait */
677285612Sdelphij     /* arg list/cookie  */ NULL,
678285612Sdelphij     /* must/cannot opts */ NULL, NULL,
679285612Sdelphij     /* option proc      */ NULL,
680285612Sdelphij     /* desc, NAME, name */ WAIT_DESC, WAIT_NAME, WAIT_name,
681285612Sdelphij     /* disablement strs */ NOT_WAIT_name, NOT_WAIT_PFX },
682285612Sdelphij
683181834Sroberto  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
684285612Sdelphij     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
685181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
686181834Sroberto     /* min, max, act ct */ 0, 1, 0,
687285612Sdelphij     /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
688181834Sroberto     /* last opt argumnt */ { NULL },
689181834Sroberto     /* arg list/cookie  */ NULL,
690181834Sroberto     /* must/cannot opts */ NULL, NULL,
691285612Sdelphij     /* option proc      */ VER_PROC,
692285612Sdelphij     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
693181834Sroberto     /* disablement strs */ NULL, NULL },
694181834Sroberto
695181834Sroberto
696181834Sroberto
697181834Sroberto  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
698285612Sdelphij     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
699181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
700181834Sroberto     /* min, max, act ct */ 0, 1, 0,
701285612Sdelphij     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
702181834Sroberto     /* last opt argumnt */ { NULL },
703181834Sroberto     /* arg list/cookie  */ NULL,
704181834Sroberto     /* must/cannot opts */ NULL, NULL,
705181834Sroberto     /* option proc      */ doUsageOpt,
706285612Sdelphij     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
707181834Sroberto     /* disablement strs */ NULL, NULL },
708181834Sroberto
709181834Sroberto  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
710285612Sdelphij     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
711181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
712181834Sroberto     /* min, max, act ct */ 0, 1, 0,
713285612Sdelphij     /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
714181834Sroberto     /* last opt argumnt */ { NULL },
715181834Sroberto     /* arg list/cookie  */ NULL,
716181834Sroberto     /* must/cannot opts */ NULL,  NULL,
717181834Sroberto     /* option proc      */ optionPagedUsage,
718285612Sdelphij     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
719181834Sroberto     /* disablement strs */ NULL, NULL },
720181834Sroberto
721181834Sroberto  {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
722285612Sdelphij     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
723181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
724181834Sroberto     /* min, max, act ct */ 0, 1, 0,
725181834Sroberto     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
726285612Sdelphij                       | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
727181834Sroberto     /* last opt argumnt */ { NULL },
728181834Sroberto     /* arg list/cookie  */ NULL,
729181834Sroberto     /* must/cannot opts */ NULL,  NULL,
730181834Sroberto     /* option proc      */ NULL,
731285612Sdelphij     /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
732181834Sroberto     /* disablement strs */ NULL, NULL },
733181834Sroberto
734181834Sroberto  {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
735285612Sdelphij     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
736181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
737181834Sroberto     /* min, max, act ct */ 0, NOLIMIT, 0,
738285612Sdelphij     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
739285612Sdelphij			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
740181834Sroberto     /* last opt argumnt */ { NULL },
741181834Sroberto     /* arg list/cookie  */ NULL,
742181834Sroberto     /* must/cannot opts */ NULL, NULL,
743181834Sroberto     /* option proc      */ optionLoadOpt,
744285612Sdelphij     /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
745285612Sdelphij     /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
746181834Sroberto};
747181834Sroberto
748181834Sroberto
749285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
750285612Sdelphij/** Reference to the upper cased version of sntp. */
751330567Sgordon#define zPROGNAME       (sntp_opt_strs+2336)
752285612Sdelphij/** Reference to the title line for sntp usage. */
753330567Sgordon#define zUsageTitle     (sntp_opt_strs+2341)
754285612Sdelphij/** sntp configuration file name. */
755330567Sgordon#define zRcName         (sntp_opt_strs+2509)
756285612Sdelphij/** Directories to search for sntp config files. */
757285612Sdelphijstatic char const * const apzHomeList[3] = {
758330567Sgordon    sntp_opt_strs+2501,
759330567Sgordon    sntp_opt_strs+2507,
760285612Sdelphij    NULL };
761285612Sdelphij/** The sntp program bug email address. */
762330567Sgordon#define zBugsAddr       (sntp_opt_strs+2516)
763285612Sdelphij/** Clarification/explanation of what sntp does. */
764330567Sgordon#define zExplain        (sntp_opt_strs+2550)
765285612Sdelphij/** Extra detail explaining what sntp does. */
766285612Sdelphij#define zDetail         (NULL)
767285612Sdelphij/** The full version string for sntp. */
768330567Sgordon#define zFullVersion    (sntp_opt_strs+2552)
769285612Sdelphij/* extracted from optcode.tlib near line 364 */
770181834Sroberto
771181834Sroberto#if defined(ENABLE_NLS)
772181834Sroberto# define OPTPROC_BASE OPTPROC_TRANSLATE
773181834Sroberto  static tOptionXlateProc translate_option_strings;
774181834Sroberto#else
775181834Sroberto# define OPTPROC_BASE OPTPROC_NONE
776181834Sroberto# define translate_option_strings NULL
777181834Sroberto#endif /* ENABLE_NLS */
778181834Sroberto
779285612Sdelphij#define sntp_full_usage (NULL)
780285612Sdelphij#define sntp_short_usage (NULL)
781285612Sdelphij
782285612Sdelphij#endif /* not defined __doxygen__ */
783285612Sdelphij
784285612Sdelphij/*
785285612Sdelphij *  Create the static procedure(s) declared above.
786285612Sdelphij */
787285612Sdelphij/**
788285612Sdelphij * The callout function that invokes the optionUsage function.
789285612Sdelphij *
790285612Sdelphij * @param[in] opts the AutoOpts option description structure
791285612Sdelphij * @param[in] od   the descriptor for the "help" (usage) option.
792285612Sdelphij * @noreturn
793285612Sdelphij */
794285612Sdelphijstatic void
795285612SdelphijdoUsageOpt(tOptions * opts, tOptDesc * od)
796285612Sdelphij{
797285612Sdelphij    int ex_code;
798285612Sdelphij    ex_code = SNTP_EXIT_SUCCESS;
799285612Sdelphij    optionUsage(&sntpOptions, ex_code);
800285612Sdelphij    /* NOTREACHED */
801285612Sdelphij    exit(1);
802285612Sdelphij    (void)opts;
803285612Sdelphij    (void)od;
804285612Sdelphij}
805285612Sdelphij
806285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
807285612Sdelphij/**
808285612Sdelphij * Code to handle the debug-level option.
809285612Sdelphij *
810285612Sdelphij * @param[in] pOptions the sntp options data structure
811285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option.
812285612Sdelphij */
813285612Sdelphijstatic void
814285612SdelphijdoOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
815285612Sdelphij{
816285612Sdelphij    /*
817285612Sdelphij     * Be sure the flag-code[0] handles special values for the options pointer
818285612Sdelphij     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
819285612Sdelphij     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
820285612Sdelphij     * reset its state.
821285612Sdelphij     */
822285612Sdelphij    /* extracted from debug-opt.def, line 15 */
823285612SdelphijOPT_VALUE_SET_DEBUG_LEVEL++;
824285612Sdelphij    (void)pOptDesc;
825285612Sdelphij    (void)pOptions;
826285612Sdelphij}
827285612Sdelphij
828285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
829285612Sdelphij/**
830285612Sdelphij * Code to handle the kod option.
831285612Sdelphij * Specifies the filename to be used for the persistent history of KoD
832285612Sdelphij * responses received from servers.  If the file does not exist, a
833285612Sdelphij * warning message will be displayed.  The file will not be created.
834285612Sdelphij * @param[in] pOptions the sntp options data structure
835285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option.
836285612Sdelphij */
837285612Sdelphijstatic void
838285612SdelphijdoOptKod(tOptions* pOptions, tOptDesc* pOptDesc)
839285612Sdelphij{
840285612Sdelphij    static teOptFileType const  type =
841285612Sdelphij        FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
842285612Sdelphij    static tuFileMode           mode;
843285612Sdelphij#ifndef O_CLOEXEC
844285612Sdelphij#  define O_CLOEXEC 0
845285612Sdelphij#endif
846285612Sdelphij    mode.file_flags = O_CLOEXEC;
847285612Sdelphij
848285612Sdelphij    /*
849285612Sdelphij     * This function handles special invalid values for "pOptions"
850285612Sdelphij     */
851285612Sdelphij    optionFileCheck(pOptions, pOptDesc, type, mode);
852285612Sdelphij}
853285612Sdelphij
854285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
855285612Sdelphij/**
856285612Sdelphij * Code to handle the keyfile option.
857285612Sdelphij * This option specifies the keyfile.
858285612Sdelphij * @code{sntp} will search for the key specified with @option{-a}
859285612Sdelphij * @file{keyno} in this file.  See @command{ntp.keys(5)} for more
860285612Sdelphij * information.
861285612Sdelphij * @param[in] pOptions the sntp options data structure
862285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option.
863285612Sdelphij */
864285612Sdelphijstatic void
865285612SdelphijdoOptKeyfile(tOptions* pOptions, tOptDesc* pOptDesc)
866285612Sdelphij{
867285612Sdelphij    static teOptFileType const  type =
868285612Sdelphij        FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
869285612Sdelphij    static tuFileMode           mode;
870285612Sdelphij#ifndef O_CLOEXEC
871285612Sdelphij#  define O_CLOEXEC 0
872285612Sdelphij#endif
873285612Sdelphij    mode.file_flags = O_CLOEXEC;
874285612Sdelphij
875285612Sdelphij    /*
876285612Sdelphij     * This function handles special invalid values for "pOptions"
877285612Sdelphij     */
878285612Sdelphij    optionFileCheck(pOptions, pOptDesc, type, mode);
879285612Sdelphij}
880285612Sdelphij
881285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
882285612Sdelphij/**
883285612Sdelphij * Code to handle the logfile option.
884285612Sdelphij * This option causes the client to write log messages to the specified
885285612Sdelphij * @file{logfile}.
886285612Sdelphij * @param[in] pOptions the sntp options data structure
887285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option.
888285612Sdelphij */
889285612Sdelphijstatic void
890285612SdelphijdoOptLogfile(tOptions* pOptions, tOptDesc* pOptDesc)
891285612Sdelphij{
892285612Sdelphij    static teOptFileType const  type =
893285612Sdelphij        FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
894285612Sdelphij    static tuFileMode           mode;
895285612Sdelphij#ifndef O_CLOEXEC
896285612Sdelphij#  define O_CLOEXEC 0
897285612Sdelphij#endif
898285612Sdelphij    mode.file_flags = O_CLOEXEC;
899285612Sdelphij
900285612Sdelphij    /*
901285612Sdelphij     * This function handles special invalid values for "pOptions"
902285612Sdelphij     */
903285612Sdelphij    optionFileCheck(pOptions, pOptDesc, type, mode);
904285612Sdelphij}
905285612Sdelphij
906285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
907285612Sdelphij/**
908285612Sdelphij * Code to handle the steplimit option.
909285612Sdelphij * If the time adjustment is less than @file{steplimit} milliseconds,
910285612Sdelphij * slew the amount using @command{adjtime(2)}.  Otherwise, step the
911285612Sdelphij * correction using @command{settimeofday(2)}.  The default value is 0,
912285612Sdelphij * which means all adjustments will be stepped.  This is a feature, as
913285612Sdelphij * different situations demand different values.
914285612Sdelphij * @param[in] pOptions the sntp options data structure
915285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option.
916285612Sdelphij */
917285612Sdelphijstatic void
918285612SdelphijdoOptSteplimit(tOptions* pOptions, tOptDesc* pOptDesc)
919285612Sdelphij{
920285612Sdelphij    static struct {long rmin, rmax;} const rng[1] = {
921285612Sdelphij        { 0, LONG_MAX } };
922285612Sdelphij    int  ix;
923285612Sdelphij
924285612Sdelphij    if (pOptions <= OPTPROC_EMIT_LIMIT)
925285612Sdelphij        goto emit_ranges;
926285612Sdelphij    optionNumericVal(pOptions, pOptDesc);
927285612Sdelphij
928285612Sdelphij    for (ix = 0; ix < 1; ix++) {
929285612Sdelphij        if (pOptDesc->optArg.argInt < rng[ix].rmin)
930285612Sdelphij            continue;  /* ranges need not be ordered. */
931285612Sdelphij        if (pOptDesc->optArg.argInt == rng[ix].rmin)
932285612Sdelphij            return;
933285612Sdelphij        if (rng[ix].rmax == LONG_MIN)
934285612Sdelphij            continue;
935285612Sdelphij        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
936285612Sdelphij            return;
937285612Sdelphij    }
938285612Sdelphij
939285612Sdelphij    option_usage_fp = stderr;
940285612Sdelphij
941285612Sdelphij emit_ranges:
942285612SdelphijoptionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
943285612Sdelphij}
944285612Sdelphij
945285612Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
946285612Sdelphij/**
947285612Sdelphij * Code to handle the ntpversion option.
948285612Sdelphij * When sending requests to a remote server, tell them we are running
949285612Sdelphij * NTP protocol version @file{ntpversion} .
950285612Sdelphij * @param[in] pOptions the sntp options data structure
951285612Sdelphij * @param[in,out] pOptDesc the option descriptor for this option.
952285612Sdelphij */
953285612Sdelphijstatic void
954285612SdelphijdoOptNtpversion(tOptions* pOptions, tOptDesc* pOptDesc)
955285612Sdelphij{
956285612Sdelphij    static struct {long rmin, rmax;} const rng[1] = {
957285612Sdelphij        { 0, 7 } };
958285612Sdelphij    int  ix;
959285612Sdelphij
960285612Sdelphij    if (pOptions <= OPTPROC_EMIT_LIMIT)
961285612Sdelphij        goto emit_ranges;
962285612Sdelphij    optionNumericVal(pOptions, pOptDesc);
963285612Sdelphij
964285612Sdelphij    for (ix = 0; ix < 1; ix++) {
965285612Sdelphij        if (pOptDesc->optArg.argInt < rng[ix].rmin)
966285612Sdelphij            continue;  /* ranges need not be ordered. */
967285612Sdelphij        if (pOptDesc->optArg.argInt == rng[ix].rmin)
968285612Sdelphij            return;
969285612Sdelphij        if (rng[ix].rmax == LONG_MIN)
970285612Sdelphij            continue;
971285612Sdelphij        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
972285612Sdelphij            return;
973285612Sdelphij    }
974285612Sdelphij
975285612Sdelphij    option_usage_fp = stderr;
976285612Sdelphij
977285612Sdelphij emit_ranges:
978285612SdelphijoptionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
979285612Sdelphij}
980285612Sdelphij/* extracted from optmain.tlib near line 1250 */
981285612Sdelphij
982285612Sdelphij/**
983285612Sdelphij * The directory containing the data associated with sntp.
984285612Sdelphij */
985285612Sdelphij#ifndef  PKGDATADIR
986285612Sdelphij# define PKGDATADIR ""
987285612Sdelphij#endif
988285612Sdelphij
989285612Sdelphij/**
990285612Sdelphij * Information about the person or institution that packaged sntp
991285612Sdelphij * for the current distribution.
992285612Sdelphij */
993285612Sdelphij#ifndef  WITH_PACKAGER
994285612Sdelphij# define sntp_packager_info NULL
995285612Sdelphij#else
996285612Sdelphij/** Packager information for sntp. */
997285612Sdelphijstatic char const sntp_packager_info[] =
998285612Sdelphij    "Packaged by " WITH_PACKAGER
999285612Sdelphij
1000285612Sdelphij# ifdef WITH_PACKAGER_VERSION
1001285612Sdelphij        " ("WITH_PACKAGER_VERSION")"
1002285612Sdelphij# endif
1003285612Sdelphij
1004285612Sdelphij# ifdef WITH_PACKAGER_BUG_REPORTS
1005285612Sdelphij    "\nReport sntp bugs to " WITH_PACKAGER_BUG_REPORTS
1006285612Sdelphij# endif
1007285612Sdelphij    "\n";
1008285612Sdelphij#endif
1009285612Sdelphij#ifndef __doxygen__
1010285612Sdelphij
1011285612Sdelphij#endif /* __doxygen__ */
1012285612Sdelphij/**
1013285612Sdelphij * The option definitions for sntp.  The one structure that
1014285612Sdelphij * binds them all.
1015285612Sdelphij */
1016181834SrobertotOptions sntpOptions = {
1017181834Sroberto    OPTIONS_STRUCT_VERSION,
1018181834Sroberto    0, NULL,                    /* original argc + argv    */
1019181834Sroberto    ( OPTPROC_BASE
1020181834Sroberto    + OPTPROC_ERRSTOP
1021181834Sroberto    + OPTPROC_SHORTOPT
1022181834Sroberto    + OPTPROC_LONGOPT
1023181834Sroberto    + OPTPROC_NO_REQ_OPT
1024285612Sdelphij    + OPTPROC_NEGATIONS
1025181834Sroberto    + OPTPROC_ENVIRON
1026285612Sdelphij    + OPTPROC_MISUSE ),
1027181834Sroberto    0, NULL,                    /* current option index, current option */
1028181834Sroberto    NULL,         NULL,         zPROGNAME,
1029285612Sdelphij    zRcName,      zCopyright,   zLicenseDescrip,
1030181834Sroberto    zFullVersion, apzHomeList,  zUsageTitle,
1031181834Sroberto    zExplain,     zDetail,      optDesc,
1032181834Sroberto    zBugsAddr,                  /* address to send bugs to */
1033181834Sroberto    NULL, NULL,                 /* extensions/saved state  */
1034285612Sdelphij    optionUsage, /* usage procedure */
1035181834Sroberto    translate_option_strings,   /* translation procedure */
1036181834Sroberto    /*
1037181834Sroberto     *  Indexes to special options
1038181834Sroberto     */
1039285612Sdelphij    { INDEX_OPT_MORE_HELP, /* more-help option index */
1040285612Sdelphij      INDEX_OPT_SAVE_OPTS, /* save option index */
1041285612Sdelphij      NO_EQUIVALENT, /* '-#' option index */
1042181834Sroberto      NO_EQUIVALENT /* index of default opt */
1043181834Sroberto    },
1044285612Sdelphij    23 /* full option count */, 18 /* user option count */,
1045285612Sdelphij    sntp_full_usage, sntp_short_usage,
1046285612Sdelphij    NULL, NULL,
1047285612Sdelphij    PKGDATADIR, sntp_packager_info
1048181834Sroberto};
1049181834Sroberto
1050285612Sdelphij#if ENABLE_NLS
1051285612Sdelphij/**
1052285612Sdelphij * This code is designed to translate translatable option text for the
1053285612Sdelphij * sntp program.  These translations happen upon entry
1054285612Sdelphij * to optionProcess().
1055181834Sroberto */
1056181834Sroberto#include <stdio.h>
1057181834Sroberto#include <stdlib.h>
1058181834Sroberto#include <string.h>
1059181834Sroberto#include <unistd.h>
1060285612Sdelphij#ifdef HAVE_DCGETTEXT
1061285612Sdelphij# include <gettext.h>
1062285612Sdelphij#endif
1063181834Sroberto#include <autoopts/usage-txt.h>
1064181834Sroberto
1065285612Sdelphijstatic char * AO_gettext(char const * pz);
1066285612Sdelphijstatic void   coerce_it(void ** s);
1067181834Sroberto
1068285612Sdelphij/**
1069285612Sdelphij * AutoGen specific wrapper function for gettext.  It relies on the macro _()
1070285612Sdelphij * to convert from English to the target language, then strdup-duplicates the
1071285612Sdelphij * result string.  It tries the "libopts" domain first, then whatever has been
1072285612Sdelphij * set via the \a textdomain(3) call.
1073285612Sdelphij *
1074285612Sdelphij * @param[in] pz the input text used as a lookup key.
1075285612Sdelphij * @returns the translated text (if there is one),
1076285612Sdelphij *   or the original text (if not).
1077285612Sdelphij */
1078285612Sdelphijstatic char *
1079285612SdelphijAO_gettext(char const * pz)
1080181834Sroberto{
1081285612Sdelphij    char * res;
1082181834Sroberto    if (pz == NULL)
1083181834Sroberto        return NULL;
1084285612Sdelphij#ifdef HAVE_DCGETTEXT
1085285612Sdelphij    /*
1086285612Sdelphij     * While processing the option_xlateable_txt data, try to use the
1087285612Sdelphij     * "libopts" domain.  Once we switch to the option descriptor data,
1088285612Sdelphij     * do *not* use that domain.
1089285612Sdelphij     */
1090285612Sdelphij    if (option_xlateable_txt.field_ct != 0) {
1091285612Sdelphij        res = dgettext("libopts", pz);
1092285612Sdelphij        if (res == pz)
1093285612Sdelphij            res = (char *)VOIDP(_(pz));
1094285612Sdelphij    } else
1095285612Sdelphij        res = (char *)VOIDP(_(pz));
1096285612Sdelphij#else
1097285612Sdelphij    res = (char *)VOIDP(_(pz));
1098285612Sdelphij#endif
1099285612Sdelphij    if (res == pz)
1100285612Sdelphij        return res;
1101285612Sdelphij    res = strdup(res);
1102285612Sdelphij    if (res == NULL) {
1103285612Sdelphij        fputs(_("No memory for duping translated strings\n"), stderr);
1104285612Sdelphij        exit(SNTP_EXIT_FAILURE);
1105181834Sroberto    }
1106285612Sdelphij    return res;
1107181834Sroberto}
1108181834Sroberto
1109285612Sdelphij/**
1110285612Sdelphij * All the pointers we use are marked "* const", but they are stored in
1111285612Sdelphij * writable memory.  Coerce the mutability and set the pointer.
1112285612Sdelphij */
1113285612Sdelphijstatic void coerce_it(void ** s) { *s = AO_gettext(*s);
1114285612Sdelphij}
1115181834Sroberto
1116285612Sdelphij/**
1117285612Sdelphij * Translate all the translatable strings in the sntpOptions
1118285612Sdelphij * structure defined above.  This is done only once.
1119181834Sroberto */
1120181834Srobertostatic void
1121285612Sdelphijtranslate_option_strings(void)
1122181834Sroberto{
1123285612Sdelphij    tOptions * const opts = &sntpOptions;
1124285612Sdelphij
1125181834Sroberto    /*
1126181834Sroberto     *  Guard against re-translation.  It won't work.  The strings will have
1127181834Sroberto     *  been changed by the first pass through this code.  One shot only.
1128181834Sroberto     */
1129285612Sdelphij    if (option_xlateable_txt.field_ct != 0) {
1130285612Sdelphij        /*
1131285612Sdelphij         *  Do the translations.  The first pointer follows the field count
1132285612Sdelphij         *  field.  The field count field is the size of a pointer.
1133285612Sdelphij         */
1134285612Sdelphij        char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
1135285612Sdelphij        int     ix  = option_xlateable_txt.field_ct;
1136181834Sroberto
1137181834Sroberto        do {
1138285612Sdelphij            ppz++; /* skip over field_ct */
1139181834Sroberto            *ppz = AO_gettext(*ppz);
1140181834Sroberto        } while (--ix > 0);
1141285612Sdelphij        /* prevent re-translation and disable "libopts" domain lookup */
1142285612Sdelphij        option_xlateable_txt.field_ct = 0;
1143181834Sroberto
1144285612Sdelphij        coerce_it(VOIDP(&(opts->pzCopyright)));
1145285612Sdelphij        coerce_it(VOIDP(&(opts->pzCopyNotice)));
1146285612Sdelphij        coerce_it(VOIDP(&(opts->pzFullVersion)));
1147285612Sdelphij        coerce_it(VOIDP(&(opts->pzUsageTitle)));
1148285612Sdelphij        coerce_it(VOIDP(&(opts->pzExplain)));
1149285612Sdelphij        coerce_it(VOIDP(&(opts->pzDetail)));
1150285612Sdelphij        {
1151285612Sdelphij            tOptDesc * od = opts->pOptDesc;
1152285612Sdelphij            for (ix = opts->optCt; ix > 0; ix--, od++)
1153285612Sdelphij                coerce_it(VOIDP(&(od->pzText)));
1154181834Sroberto        }
1155181834Sroberto    }
1156181834Sroberto}
1157181834Sroberto#endif /* ENABLE_NLS */
1158181834Sroberto
1159285612Sdelphij#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
1160285612Sdelphij/** I18N function strictly for xgettext.  Do not compile. */
1161285612Sdelphijstatic void bogus_function(void) {
1162285612Sdelphij  /* TRANSLATORS:
1163285612Sdelphij
1164285612Sdelphij     The following dummy function was crated solely so that xgettext can
1165285612Sdelphij     extract the correct strings.  These strings are actually referenced
1166285612Sdelphij     by a field name in the sntpOptions structure noted in the
1167285612Sdelphij     comments below.  The literal text is defined in sntp_opt_strs.
1168285612Sdelphij
1169285612Sdelphij     NOTE: the strings below are segmented with respect to the source string
1170285612Sdelphij     sntp_opt_strs.  The strings above are handed off for translation
1171285612Sdelphij     at run time a paragraph at a time.  Consequently, they are presented here
1172285612Sdelphij     for translation a paragraph at a time.
1173285612Sdelphij
1174285612Sdelphij     ALSO: often the description for an option will reference another option
1175285612Sdelphij     by name.  These are set off with apostrophe quotes (I hope).  Do not
1176285612Sdelphij     translate option names.
1177285612Sdelphij   */
1178285612Sdelphij  /* referenced via sntpOptions.pzCopyright */
1179330567Sgordon  puts(_("sntp 4.2.8p11\n\
1180316722SdelphijCopyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
1181285612SdelphijThis is free software. It is licensed for use, modification and\n\
1182285612Sdelphijredistribution under the terms of the NTP License, copies of which\n\
1183285612Sdelphijcan be seen at:\n"));
1184285612Sdelphij  puts(_("  <http://ntp.org/license>\n\
1185285612Sdelphij  <http://opensource.org/licenses/ntp-license.php>\n"));
1186285612Sdelphij
1187285612Sdelphij  /* referenced via sntpOptions.pzCopyNotice */
1188285612Sdelphij  puts(_("Permission to use, copy, modify, and distribute this software and its\n\
1189285612Sdelphijdocumentation for any purpose with or without fee is hereby granted,\n\
1190285612Sdelphijprovided that the above copyright notice appears in all copies and that\n\
1191285612Sdelphijboth the copyright notice and this permission notice appear in supporting\n\
1192285612Sdelphijdocumentation, and that the name The University of Delaware not be used in\n\
1193285612Sdelphijadvertising or publicity pertaining to distribution of the software without\n\
1194285612Sdelphijspecific, written prior permission.  The University of Delaware and Network\n\
1195285612SdelphijTime Foundation makes no representations about the suitability this\n\
1196285612Sdelphijsoftware for any purpose.  It is provided \"as is\" without express or\n\
1197285612Sdelphijimplied warranty.\n"));
1198285612Sdelphij
1199285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1200285612Sdelphij  puts(_("Force IPv4 DNS name resolution"));
1201285612Sdelphij
1202285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1203285612Sdelphij  puts(_("Force IPv6 DNS name resolution"));
1204285612Sdelphij
1205285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1206285612Sdelphij  puts(_("Enable authentication with the key auth-keynumber"));
1207285612Sdelphij
1208285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1209285612Sdelphij  puts(_("Listen to the address specified for broadcast time sync"));
1210285612Sdelphij
1211285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1212285612Sdelphij  puts(_("Concurrently query all IPs returned for host-name"));
1213285612Sdelphij
1214285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1215285612Sdelphij  puts(_("Increase debug verbosity level"));
1216285612Sdelphij
1217285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1218285612Sdelphij  puts(_("Set the debug verbosity level"));
1219285612Sdelphij
1220285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1221285612Sdelphij  puts(_("The gap (in milliseconds) between time requests"));
1222285612Sdelphij
1223285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1224285612Sdelphij  puts(_("KoD history filename"));
1225285612Sdelphij
1226285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1227285612Sdelphij  puts(_("Look in this file for the key specified with -a"));
1228285612Sdelphij
1229285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1230285612Sdelphij  puts(_("Log to specified logfile"));
1231285612Sdelphij
1232285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1233285612Sdelphij  puts(_("Adjustments less than steplimit msec will be slewed"));
1234285612Sdelphij
1235285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1236285612Sdelphij  puts(_("Send int as our NTP protocol version"));
1237285612Sdelphij
1238285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1239285612Sdelphij  puts(_("Use the NTP Reserved Port (port 123)"));
1240285612Sdelphij
1241285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1242285612Sdelphij  puts(_("OK to 'step' the time with settimeofday(2)"));
1243285612Sdelphij
1244285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1245285612Sdelphij  puts(_("OK to 'slew' the time with adjtime(2)"));
1246285612Sdelphij
1247285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1248285612Sdelphij  puts(_("The number of seconds to wait for responses"));
1249285612Sdelphij
1250285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1251285612Sdelphij  puts(_("Wait for pending replies (if not setting the time)"));
1252285612Sdelphij
1253285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1254285612Sdelphij  puts(_("display extended usage information and exit"));
1255285612Sdelphij
1256285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1257285612Sdelphij  puts(_("extended usage information passed thru pager"));
1258285612Sdelphij
1259285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1260285612Sdelphij  puts(_("output version information and exit"));
1261285612Sdelphij
1262285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1263285612Sdelphij  puts(_("save the option state to a config file"));
1264285612Sdelphij
1265285612Sdelphij  /* referenced via sntpOptions.pOptDesc->pzText */
1266285612Sdelphij  puts(_("load options from a config file"));
1267285612Sdelphij
1268285612Sdelphij  /* referenced via sntpOptions.pzUsageTitle */
1269330567Sgordon  puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p11\n\
1270285612SdelphijUsage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
1271285612Sdelphij\t\t[ hostname-or-IP ...]\n"));
1272285612Sdelphij
1273285612Sdelphij  /* referenced via sntpOptions.pzExplain */
1274285612Sdelphij  puts(_("\n"));
1275285612Sdelphij
1276285612Sdelphij  /* referenced via sntpOptions.pzFullVersion */
1277330567Sgordon  puts(_("sntp 4.2.8p11"));
1278285612Sdelphij
1279285612Sdelphij  /* referenced via sntpOptions.pzFullUsage */
1280285612Sdelphij  puts(_("<<<NOT-FOUND>>>"));
1281285612Sdelphij
1282285612Sdelphij  /* referenced via sntpOptions.pzShortUsage */
1283285612Sdelphij  puts(_("<<<NOT-FOUND>>>"));
1284285612Sdelphij  /* LIBOPTS-MESSAGES: */
1285285612Sdelphij#line 67 "../autoopts.c"
1286285612Sdelphij  puts(_("allocation of %d bytes failed\n"));
1287285612Sdelphij#line 93 "../autoopts.c"
1288285612Sdelphij  puts(_("allocation of %d bytes failed\n"));
1289285612Sdelphij#line 53 "../init.c"
1290285612Sdelphij  puts(_("AutoOpts function called without option descriptor\n"));
1291285612Sdelphij#line 86 "../init.c"
1292285612Sdelphij  puts(_("\tThis exceeds the compiled library version:  "));
1293285612Sdelphij#line 84 "../init.c"
1294285612Sdelphij  puts(_("Automated Options Processing Error!\n"
1295285612Sdelphij       "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
1296285612Sdelphij#line 80 "../autoopts.c"
1297285612Sdelphij  puts(_("realloc of %d bytes at 0x%p failed\n"));
1298285612Sdelphij#line 88 "../init.c"
1299285612Sdelphij  puts(_("\tThis is less than the minimum library version:  "));
1300285612Sdelphij#line 121 "../version.c"
1301285612Sdelphij  puts(_("Automated Options version %s\n"
1302285612Sdelphij       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
1303285612Sdelphij#line 87 "../makeshell.c"
1304285612Sdelphij  puts(_("(AutoOpts bug):  %s.\n"));
1305285612Sdelphij#line 90 "../reset.c"
1306285612Sdelphij  puts(_("optionResetOpt() called, but reset-option not configured"));
1307285612Sdelphij#line 292 "../usage.c"
1308285612Sdelphij  puts(_("could not locate the 'help' option"));
1309285612Sdelphij#line 336 "../autoopts.c"
1310285612Sdelphij  puts(_("optionProcess() was called with invalid data"));
1311285612Sdelphij#line 748 "../usage.c"
1312285612Sdelphij  puts(_("invalid argument type specified"));
1313285612Sdelphij#line 598 "../find.c"
1314285612Sdelphij  puts(_("defaulted to option with optional arg"));
1315285612Sdelphij#line 76 "../alias.c"
1316285612Sdelphij  puts(_("aliasing option is out of range."));
1317285612Sdelphij#line 234 "../enum.c"
1318285612Sdelphij  puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
1319285612Sdelphij#line 108 "../find.c"
1320285612Sdelphij  puts(_("  The following options match:\n"));
1321285612Sdelphij#line 293 "../find.c"
1322285612Sdelphij  puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
1323285612Sdelphij#line 161 "../check.c"
1324285612Sdelphij  puts(_("%s: Command line arguments required\n"));
1325285612Sdelphij#line 43 "../alias.c"
1326285612Sdelphij  puts(_("%d %s%s options allowed\n"));
1327285612Sdelphij#line 94 "../makeshell.c"
1328285612Sdelphij  puts(_("%s error %d (%s) calling %s for '%s'\n"));
1329285612Sdelphij#line 306 "../makeshell.c"
1330285612Sdelphij  puts(_("interprocess pipe"));
1331285612Sdelphij#line 168 "../version.c"
1332285612Sdelphij  puts(_("error: version option argument '%c' invalid.  Use:\n"
1333285612Sdelphij       "\t'v' - version only\n"
1334285612Sdelphij       "\t'c' - version and copyright\n"
1335285612Sdelphij       "\t'n' - version and full copyright notice\n"));
1336285612Sdelphij#line 58 "../check.c"
1337285612Sdelphij  puts(_("%s error:  the '%s' and '%s' options conflict\n"));
1338285612Sdelphij#line 217 "../find.c"
1339285612Sdelphij  puts(_("%s: The '%s' option has been disabled."));
1340285612Sdelphij#line 430 "../find.c"
1341285612Sdelphij  puts(_("%s: The '%s' option has been disabled."));
1342285612Sdelphij#line 38 "../alias.c"
1343285612Sdelphij  puts(_("-equivalence"));
1344285612Sdelphij#line 469 "../find.c"
1345285612Sdelphij  puts(_("%s: illegal option -- %c\n"));
1346285612Sdelphij#line 110 "../reset.c"
1347285612Sdelphij  puts(_("%s: illegal option -- %c\n"));
1348285612Sdelphij#line 271 "../find.c"
1349285612Sdelphij  puts(_("%s: illegal option -- %s\n"));
1350285612Sdelphij#line 755 "../find.c"
1351285612Sdelphij  puts(_("%s: illegal option -- %s\n"));
1352285612Sdelphij#line 118 "../reset.c"
1353285612Sdelphij  puts(_("%s: illegal option -- %s\n"));
1354285612Sdelphij#line 335 "../find.c"
1355285612Sdelphij  puts(_("%s: unknown vendor extension option -- %s\n"));
1356285612Sdelphij#line 159 "../enum.c"
1357285612Sdelphij  puts(_("  or an integer from %d through %d\n"));
1358285612Sdelphij#line 169 "../enum.c"
1359285612Sdelphij  puts(_("  or an integer from %d through %d\n"));
1360285612Sdelphij#line 747 "../usage.c"
1361285612Sdelphij  puts(_("%s error:  invalid option descriptor for %s\n"));
1362285612Sdelphij#line 1081 "../usage.c"
1363285612Sdelphij  puts(_("%s error:  invalid option descriptor for %s\n"));
1364285612Sdelphij#line 385 "../find.c"
1365285612Sdelphij  puts(_("%s: invalid option name: %s\n"));
1366285612Sdelphij#line 527 "../find.c"
1367285612Sdelphij  puts(_("%s: The '%s' option requires an argument.\n"));
1368285612Sdelphij#line 156 "../autoopts.c"
1369285612Sdelphij  puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
1370285612Sdelphij       "\t'%s' and '%s'."));
1371285612Sdelphij#line 94 "../check.c"
1372285612Sdelphij  puts(_("%s error:  The %s option is required\n"));
1373285612Sdelphij#line 632 "../find.c"
1374285612Sdelphij  puts(_("%s: The '%s' option cannot have an argument.\n"));
1375285612Sdelphij#line 151 "../check.c"
1376285612Sdelphij  puts(_("%s: Command line arguments are not allowed.\n"));
1377285612Sdelphij#line 535 "../save.c"
1378285612Sdelphij  puts(_("error %d (%s) creating %s\n"));
1379285612Sdelphij#line 234 "../enum.c"
1380285612Sdelphij  puts(_("%s error:  '%s' does not match any %s keywords.\n"));
1381285612Sdelphij#line 93 "../reset.c"
1382285612Sdelphij  puts(_("%s error: The '%s' option requires an argument.\n"));
1383285612Sdelphij#line 184 "../save.c"
1384285612Sdelphij  puts(_("error %d (%s) stat-ing %s\n"));
1385285612Sdelphij#line 238 "../save.c"
1386285612Sdelphij  puts(_("error %d (%s) stat-ing %s\n"));
1387285612Sdelphij#line 143 "../restore.c"
1388285612Sdelphij  puts(_("%s error: no saved option state\n"));
1389285612Sdelphij#line 231 "../autoopts.c"
1390285612Sdelphij  puts(_("'%s' is not a command line option.\n"));
1391285612Sdelphij#line 111 "../time.c"
1392285612Sdelphij  puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
1393285612Sdelphij#line 132 "../save.c"
1394285612Sdelphij  puts(_("'%s' not defined\n"));
1395285612Sdelphij#line 50 "../time.c"
1396285612Sdelphij  puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
1397285612Sdelphij#line 92 "../check.c"
1398285612Sdelphij  puts(_("%s error:  The %s option must appear %d times.\n"));
1399285612Sdelphij#line 164 "../numeric.c"
1400285612Sdelphij  puts(_("%s error:  '%s' is not a recognizable number.\n"));
1401285612Sdelphij#line 200 "../enum.c"
1402285612Sdelphij  puts(_("%s error:  %s exceeds %s keyword count\n"));
1403285612Sdelphij#line 330 "../usage.c"
1404285612Sdelphij  puts(_("Try '%s %s' for more information.\n"));
1405285612Sdelphij#line 45 "../alias.c"
1406285612Sdelphij  puts(_("one %s%s option allowed\n"));
1407285612Sdelphij#line 208 "../makeshell.c"
1408285612Sdelphij  puts(_("standard output"));
1409285612Sdelphij#line 943 "../makeshell.c"
1410285612Sdelphij  puts(_("standard output"));
1411285612Sdelphij#line 274 "../usage.c"
1412285612Sdelphij  puts(_("standard output"));
1413285612Sdelphij#line 415 "../usage.c"
1414285612Sdelphij  puts(_("standard output"));
1415285612Sdelphij#line 625 "../usage.c"
1416285612Sdelphij  puts(_("standard output"));
1417285612Sdelphij#line 175 "../version.c"
1418285612Sdelphij  puts(_("standard output"));
1419285612Sdelphij#line 274 "../usage.c"
1420285612Sdelphij  puts(_("standard error"));
1421285612Sdelphij#line 415 "../usage.c"
1422285612Sdelphij  puts(_("standard error"));
1423285612Sdelphij#line 625 "../usage.c"
1424285612Sdelphij  puts(_("standard error"));
1425285612Sdelphij#line 175 "../version.c"
1426285612Sdelphij  puts(_("standard error"));
1427285612Sdelphij#line 208 "../makeshell.c"
1428285612Sdelphij  puts(_("write"));
1429285612Sdelphij#line 943 "../makeshell.c"
1430285612Sdelphij  puts(_("write"));
1431285612Sdelphij#line 273 "../usage.c"
1432285612Sdelphij  puts(_("write"));
1433285612Sdelphij#line 414 "../usage.c"
1434285612Sdelphij  puts(_("write"));
1435285612Sdelphij#line 624 "../usage.c"
1436285612Sdelphij  puts(_("write"));
1437285612Sdelphij#line 174 "../version.c"
1438285612Sdelphij  puts(_("write"));
1439285612Sdelphij#line 60 "../numeric.c"
1440285612Sdelphij  puts(_("%s error:  %s option value %ld is out of range.\n"));
1441285612Sdelphij#line 44 "../check.c"
1442285612Sdelphij  puts(_("%s error:  %s option requires the %s option\n"));
1443285612Sdelphij#line 131 "../save.c"
1444285612Sdelphij  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1445285612Sdelphij#line 183 "../save.c"
1446285612Sdelphij  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1447285612Sdelphij#line 237 "../save.c"
1448285612Sdelphij  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1449285612Sdelphij#line 256 "../save.c"
1450285612Sdelphij  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1451285612Sdelphij#line 534 "../save.c"
1452285612Sdelphij  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1453285612Sdelphij  /* END-LIBOPTS-MESSAGES */
1454285612Sdelphij
1455285612Sdelphij  /* USAGE-TEXT: */
1456285612Sdelphij#line 873 "../usage.c"
1457285612Sdelphij  puts(_("\t\t\t\t- an alternate for '%s'\n"));
1458285612Sdelphij#line 1148 "../usage.c"
1459285612Sdelphij  puts(_("Version, usage and configuration options:"));
1460285612Sdelphij#line 924 "../usage.c"
1461285612Sdelphij  puts(_("\t\t\t\t- default option for unnamed options\n"));
1462285612Sdelphij#line 837 "../usage.c"
1463285612Sdelphij  puts(_("\t\t\t\t- disabled as '--%s'\n"));
1464285612Sdelphij#line 1117 "../usage.c"
1465285612Sdelphij  puts(_(" --- %-14s %s\n"));
1466285612Sdelphij#line 1115 "../usage.c"
1467285612Sdelphij  puts(_("This option has been disabled"));
1468285612Sdelphij#line 864 "../usage.c"
1469285612Sdelphij  puts(_("\t\t\t\t- enabled by default\n"));
1470285612Sdelphij#line 40 "../alias.c"
1471285612Sdelphij  puts(_("%s error:  only "));
1472285612Sdelphij#line 1194 "../usage.c"
1473285612Sdelphij  puts(_(" - examining environment variables named %s_*\n"));
1474285612Sdelphij#line 168 "../file.c"
1475285612Sdelphij  puts(_("\t\t\t\t- file must not pre-exist\n"));
1476285612Sdelphij#line 172 "../file.c"
1477285612Sdelphij  puts(_("\t\t\t\t- file must pre-exist\n"));
1478285612Sdelphij#line 380 "../usage.c"
1479285612Sdelphij  puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1480285612Sdelphij       "hyphen and the flag character.\n"));
1481285612Sdelphij#line 921 "../makeshell.c"
1482285612Sdelphij  puts(_("\n"
1483285612Sdelphij       "= = = = = = = =\n\n"
1484285612Sdelphij       "This incarnation of genshell will produce\n"
1485285612Sdelphij       "a shell script to parse the options for %s:\n\n"));
1486285612Sdelphij#line 166 "../enum.c"
1487285612Sdelphij  puts(_("  or an integer mask with any of the lower %d bits set\n"));
1488285612Sdelphij#line 897 "../usage.c"
1489285612Sdelphij  puts(_("\t\t\t\t- is a set membership option\n"));
1490285612Sdelphij#line 918 "../usage.c"
1491285612Sdelphij  puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1492285612Sdelphij#line 382 "../usage.c"
1493285612Sdelphij  puts(_("Options are specified by single or double hyphens and their name.\n"));
1494285612Sdelphij#line 904 "../usage.c"
1495285612Sdelphij  puts(_("\t\t\t\t- may appear multiple times\n"));
1496285612Sdelphij#line 891 "../usage.c"
1497285612Sdelphij  puts(_("\t\t\t\t- may not be preset\n"));
1498285612Sdelphij#line 1309 "../usage.c"
1499285612Sdelphij  puts(_("   Arg Option-Name    Description\n"));
1500285612Sdelphij#line 1245 "../usage.c"
1501285612Sdelphij  puts(_("  Flg Arg Option-Name    Description\n"));
1502285612Sdelphij#line 1303 "../usage.c"
1503285612Sdelphij  puts(_("  Flg Arg Option-Name    Description\n"));
1504285612Sdelphij#line 1304 "../usage.c"
1505285612Sdelphij  puts(_(" %3s %s"));
1506285612Sdelphij#line 1310 "../usage.c"
1507285612Sdelphij  puts(_(" %3s %s"));
1508285612Sdelphij#line 387 "../usage.c"
1509285612Sdelphij  puts(_("The '-#<number>' option may omit the hash char\n"));
1510285612Sdelphij#line 383 "../usage.c"
1511285612Sdelphij  puts(_("All arguments are named options.\n"));
1512285612Sdelphij#line 971 "../usage.c"
1513285612Sdelphij  puts(_(" - reading file %s"));
1514285612Sdelphij#line 409 "../usage.c"
1515285612Sdelphij  puts(_("\n"
1516285612Sdelphij       "Please send bug reports to:  <%s>\n"));
1517285612Sdelphij#line 100 "../version.c"
1518285612Sdelphij  puts(_("\n"
1519285612Sdelphij       "Please send bug reports to:  <%s>\n"));
1520285612Sdelphij#line 129 "../version.c"
1521285612Sdelphij  puts(_("\n"
1522285612Sdelphij       "Please send bug reports to:  <%s>\n"));
1523285612Sdelphij#line 903 "../usage.c"
1524285612Sdelphij  puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1525285612Sdelphij#line 944 "../usage.c"
1526285612Sdelphij  puts(_("\n"
1527285612Sdelphij       "The following option preset mechanisms are supported:\n"));
1528285612Sdelphij#line 1192 "../usage.c"
1529285612Sdelphij  puts(_("\n"
1530285612Sdelphij       "The following option preset mechanisms are supported:\n"));
1531285612Sdelphij#line 682 "../usage.c"
1532285612Sdelphij  puts(_("prohibits these options:\n"));
1533285612Sdelphij#line 677 "../usage.c"
1534285612Sdelphij  puts(_("prohibits the option '%s'\n"));
1535285612Sdelphij#line 81 "../numeric.c"
1536285612Sdelphij  puts(_("%s%ld to %ld"));
1537285612Sdelphij#line 79 "../numeric.c"
1538285612Sdelphij  puts(_("%sgreater than or equal to %ld"));
1539285612Sdelphij#line 75 "../numeric.c"
1540285612Sdelphij  puts(_("%s%ld exactly"));
1541285612Sdelphij#line 68 "../numeric.c"
1542285612Sdelphij  puts(_("%sit must lie in one of the ranges:\n"));
1543285612Sdelphij#line 68 "../numeric.c"
1544285612Sdelphij  puts(_("%sit must be in the range:\n"));
1545285612Sdelphij#line 88 "../numeric.c"
1546285612Sdelphij  puts(_(", or\n"));
1547285612Sdelphij#line 66 "../numeric.c"
1548285612Sdelphij  puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1549285612Sdelphij#line 77 "../numeric.c"
1550285612Sdelphij  puts(_("%sless than or equal to %ld"));
1551285612Sdelphij#line 390 "../usage.c"
1552285612Sdelphij  puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
1553285612Sdelphij#line 652 "../usage.c"
1554285612Sdelphij  puts(_("requires the option '%s'\n"));
1555285612Sdelphij#line 655 "../usage.c"
1556285612Sdelphij  puts(_("requires these options:\n"));
1557285612Sdelphij#line 1321 "../usage.c"
1558285612Sdelphij  puts(_("   Arg Option-Name   Req?  Description\n"));
1559285612Sdelphij#line 1315 "../usage.c"
1560285612Sdelphij  puts(_("  Flg Arg Option-Name   Req?  Description\n"));
1561285612Sdelphij#line 167 "../enum.c"
1562285612Sdelphij  puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
1563285612Sdelphij       "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1564285612Sdelphij       "will set them all.  Multiple entries may be passed as an option\n"
1565285612Sdelphij       "argument list.\n"));
1566285612Sdelphij#line 910 "../usage.c"
1567285612Sdelphij  puts(_("\t\t\t\t- may appear up to %d times\n"));
1568285612Sdelphij#line 77 "../enum.c"
1569285612Sdelphij  puts(_("The valid \"%s\" option keywords are:\n"));
1570285612Sdelphij#line 1152 "../usage.c"
1571285612Sdelphij  puts(_("The next option supports vendor supported extra options:"));
1572285612Sdelphij#line 773 "../usage.c"
1573285612Sdelphij  puts(_("These additional options are:"));
1574285612Sdelphij  /* END-USAGE-TEXT */
1575285612Sdelphij}
1576285612Sdelphij#endif /* uncompilable code */
1577181834Sroberto#ifdef  __cplusplus
1578181834Sroberto}
1579181834Sroberto#endif
1580181834Sroberto/* sntp-opts.c ends here */
1581