1280849Scy/*
2181834Sroberto *  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.c)
3280849Scy *
4316722Sdelphij *  It has been AutoGen-ed  March 21, 2017 at 10:44:44 AM by AutoGen 5.18.5
5181834Sroberto *  From the definitions    ntpdc-opts.def
6181834Sroberto *  and the template file   options
7181834Sroberto *
8280849Scy * Generated from AutoOpts 41:0:16 templates.
9181834Sroberto *
10280849Scy *  AutoOpts is a copyrighted work.  This source file is not encumbered
11280849Scy *  by AutoOpts licensing, but is provided under the licensing terms chosen
12280849Scy *  by the ntpdc author or copyright holder.  AutoOpts is
13280849Scy *  licensed under the terms of the LGPL.  The redistributable library
14280849Scy *  (``libopts'') is licensed under the terms of either the LGPL or, at the
15280849Scy *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
16280849Scy *  for details.
17181834Sroberto *
18280849Scy * The ntpdc program is copyrighted and licensed
19280849Scy * under the following terms:
20181834Sroberto *
21316722Sdelphij *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
22280849Scy *  This is free software. It is licensed for use, modification and
23280849Scy *  redistribution under the terms of the NTP License, copies of which
24280849Scy *  can be seen at:
25280849Scy *    <http://ntp.org/license>
26280849Scy *    <http://opensource.org/licenses/ntp-license.php>
27280849Scy *
28280849Scy *  Permission to use, copy, modify, and distribute this software and its
29280849Scy *  documentation for any purpose with or without fee is hereby granted,
30280849Scy *  provided that the above copyright notice appears in all copies and that
31280849Scy *  both the copyright notice and this permission notice appear in
32280849Scy *  supporting documentation, and that the name The University of Delaware not be used in
33280849Scy *  advertising or publicity pertaining to distribution of the software
34280849Scy *  without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
35280849Scy *  representations about the suitability this software for any purpose. It
36280849Scy *  is provided "as is" without express or implied warranty.
37181834Sroberto */
38181834Sroberto
39280849Scy#ifndef __doxygen__
40280849Scy#define OPTION_CODE_COMPILE 1
41280849Scy#include "ntpdc-opts.h"
42280849Scy#include <sys/types.h>
43181834Sroberto
44181834Sroberto#include <limits.h>
45280849Scy#include <stdio.h>
46280849Scy#include <stdlib.h>
47181834Sroberto
48181834Sroberto#ifdef  __cplusplus
49181834Srobertoextern "C" {
50181834Sroberto#endif
51280849Scyextern FILE * option_usage_fp;
52280849Scy#define zCopyright      (ntpdc_opt_strs+0)
53316722Sdelphij#define zLicenseDescrip (ntpdc_opt_strs+342)
54181834Sroberto
55181834Sroberto/*
56181834Sroberto *  global included definitions
57181834Sroberto */
58181834Sroberto#ifdef __windows
59181834Sroberto  extern int atoi(const char*);
60181834Sroberto#else
61181834Sroberto# include <stdlib.h>
62181834Sroberto#endif
63181834Sroberto
64181834Sroberto#ifndef NULL
65181834Sroberto#  define NULL 0
66181834Sroberto#endif
67181834Sroberto
68280849Scy/**
69280849Scy *  static const strings for ntpdc options
70181834Sroberto */
71316722Sdelphijstatic char const ntpdc_opt_strs[1914] =
72316722Sdelphij/*     0 */ "ntpdc 4.2.8p10\n"
73316722Sdelphij            "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
74280849Scy            "This is free software. It is licensed for use, modification and\n"
75280849Scy            "redistribution under the terms of the NTP License, copies of which\n"
76280849Scy            "can be seen at:\n"
77280849Scy            "  <http://ntp.org/license>\n"
78280849Scy            "  <http://opensource.org/licenses/ntp-license.php>\n\0"
79316722Sdelphij/*   342 */ "Permission to use, copy, modify, and distribute this software and its\n"
80280849Scy            "documentation for any purpose with or without fee is hereby granted,\n"
81280849Scy            "provided that the above copyright notice appears in all copies and that\n"
82280849Scy            "both the copyright notice and this permission notice appear in supporting\n"
83280849Scy            "documentation, and that the name The University of Delaware not be used in\n"
84280849Scy            "advertising or publicity pertaining to distribution of the software without\n"
85280849Scy            "specific, written prior permission.  The University of Delaware and Network\n"
86280849Scy            "Time Foundation makes no representations about the suitability this\n"
87280849Scy            "software for any purpose.  It is provided \"as is\" without express or\n"
88280849Scy            "implied warranty.\n\0"
89316722Sdelphij/*  1010 */ "Force IPv4 DNS name resolution\0"
90316722Sdelphij/*  1041 */ "IPV4\0"
91316722Sdelphij/*  1046 */ "ipv4\0"
92316722Sdelphij/*  1051 */ "Force IPv6 DNS name resolution\0"
93316722Sdelphij/*  1082 */ "IPV6\0"
94316722Sdelphij/*  1087 */ "ipv6\0"
95316722Sdelphij/*  1092 */ "run a command and exit\0"
96316722Sdelphij/*  1115 */ "COMMAND\0"
97316722Sdelphij/*  1123 */ "command\0"
98316722Sdelphij/*  1131 */ "Increase debug verbosity level\0"
99316722Sdelphij/*  1162 */ "DEBUG_LEVEL\0"
100316722Sdelphij/*  1174 */ "debug-level\0"
101316722Sdelphij/*  1186 */ "Set the debug verbosity level\0"
102316722Sdelphij/*  1216 */ "SET_DEBUG_LEVEL\0"
103316722Sdelphij/*  1232 */ "set-debug-level\0"
104316722Sdelphij/*  1248 */ "Force ntpq to operate in interactive mode\0"
105316722Sdelphij/*  1290 */ "INTERACTIVE\0"
106316722Sdelphij/*  1302 */ "interactive\0"
107316722Sdelphij/*  1314 */ "Print a list of the peers\0"
108316722Sdelphij/*  1340 */ "LISTPEERS\0"
109316722Sdelphij/*  1350 */ "listpeers\0"
110316722Sdelphij/*  1360 */ "numeric host addresses\0"
111316722Sdelphij/*  1383 */ "NUMERIC\0"
112316722Sdelphij/*  1391 */ "numeric\0"
113316722Sdelphij/*  1399 */ "PEERS\0"
114316722Sdelphij/*  1405 */ "peers\0"
115316722Sdelphij/*  1411 */ "Show a list of the peers\0"
116316722Sdelphij/*  1436 */ "SHOWPEERS\0"
117316722Sdelphij/*  1446 */ "showpeers\0"
118316722Sdelphij/*  1456 */ "display extended usage information and exit\0"
119316722Sdelphij/*  1500 */ "help\0"
120316722Sdelphij/*  1505 */ "extended usage information passed thru pager\0"
121316722Sdelphij/*  1550 */ "more-help\0"
122316722Sdelphij/*  1560 */ "output version information and exit\0"
123316722Sdelphij/*  1596 */ "version\0"
124316722Sdelphij/*  1604 */ "save the option state to a config file\0"
125316722Sdelphij/*  1643 */ "save-opts\0"
126316722Sdelphij/*  1653 */ "load options from a config file\0"
127316722Sdelphij/*  1685 */ "LOAD_OPTS\0"
128316722Sdelphij/*  1695 */ "no-load-opts\0"
129316722Sdelphij/*  1708 */ "no\0"
130316722Sdelphij/*  1711 */ "NTPDC\0"
131316722Sdelphij/*  1717 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p10\n"
132280849Scy            "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
133316722Sdelphij/*  1848 */ "$HOME\0"
134316722Sdelphij/*  1854 */ ".\0"
135316722Sdelphij/*  1856 */ ".ntprc\0"
136316722Sdelphij/*  1863 */ "http://bugs.ntp.org, bugs@ntp.org\0"
137316722Sdelphij/*  1897 */ "\n\0"
138316722Sdelphij/*  1899 */ "ntpdc 4.2.8p10";
139181834Sroberto
140280849Scy/**
141280849Scy *  ipv4 option description with
142280849Scy *  "Must also have options" and "Incompatible options":
143181834Sroberto */
144280849Scy/** Descriptive text for the ipv4 option */
145316722Sdelphij#define IPV4_DESC      (ntpdc_opt_strs+1010)
146280849Scy/** Upper-cased name for the ipv4 option */
147316722Sdelphij#define IPV4_NAME      (ntpdc_opt_strs+1041)
148280849Scy/** Name string for the ipv4 option */
149316722Sdelphij#define IPV4_name      (ntpdc_opt_strs+1046)
150280849Scy/** Other options that appear in conjunction with the ipv4 option */
151280849Scystatic int const aIpv4CantList[] = {
152280849Scy    INDEX_OPT_IPV6, NO_EQUIVALENT };
153280849Scy/** Compiled in flag settings for the ipv4 option */
154280849Scy#define IPV4_FLAGS     (OPTST_DISABLED)
155181834Sroberto
156280849Scy/**
157280849Scy *  ipv6 option description with
158181834Sroberto *  "Must also have options" and "Incompatible options":
159181834Sroberto */
160280849Scy/** Descriptive text for the ipv6 option */
161316722Sdelphij#define IPV6_DESC      (ntpdc_opt_strs+1051)
162280849Scy/** Upper-cased name for the ipv6 option */
163316722Sdelphij#define IPV6_NAME      (ntpdc_opt_strs+1082)
164280849Scy/** Name string for the ipv6 option */
165316722Sdelphij#define IPV6_name      (ntpdc_opt_strs+1087)
166280849Scy/** Other options that appear in conjunction with the ipv6 option */
167280849Scystatic int const aIpv6CantList[] = {
168280849Scy    INDEX_OPT_IPV4, NO_EQUIVALENT };
169280849Scy/** Compiled in flag settings for the ipv6 option */
170280849Scy#define IPV6_FLAGS     (OPTST_DISABLED)
171181834Sroberto
172280849Scy/**
173280849Scy *  command option description:
174181834Sroberto */
175280849Scy/** Descriptive text for the command option */
176316722Sdelphij#define COMMAND_DESC      (ntpdc_opt_strs+1092)
177280849Scy/** Upper-cased name for the command option */
178316722Sdelphij#define COMMAND_NAME      (ntpdc_opt_strs+1115)
179280849Scy/** Name string for the command option */
180316722Sdelphij#define COMMAND_name      (ntpdc_opt_strs+1123)
181280849Scy/** Compiled in flag settings for the command option */
182280849Scy#define COMMAND_FLAGS     (OPTST_DISABLED | OPTST_STACKED \
183280849Scy        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
184181834Sroberto
185280849Scy/**
186280849Scy *  debug-level option description:
187181834Sroberto */
188280849Scy/** Descriptive text for the debug-level option */
189316722Sdelphij#define DEBUG_LEVEL_DESC      (ntpdc_opt_strs+1131)
190280849Scy/** Upper-cased name for the debug-level option */
191316722Sdelphij#define DEBUG_LEVEL_NAME      (ntpdc_opt_strs+1162)
192280849Scy/** Name string for the debug-level option */
193316722Sdelphij#define DEBUG_LEVEL_name      (ntpdc_opt_strs+1174)
194280849Scy/** Compiled in flag settings for the debug-level option */
195280849Scy#define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
196181834Sroberto
197280849Scy/**
198280849Scy *  set-debug-level option description:
199280849Scy */
200280849Scy/** Descriptive text for the set-debug-level option */
201316722Sdelphij#define SET_DEBUG_LEVEL_DESC      (ntpdc_opt_strs+1186)
202280849Scy/** Upper-cased name for the set-debug-level option */
203316722Sdelphij#define SET_DEBUG_LEVEL_NAME      (ntpdc_opt_strs+1216)
204280849Scy/** Name string for the set-debug-level option */
205316722Sdelphij#define SET_DEBUG_LEVEL_name      (ntpdc_opt_strs+1232)
206280849Scy/** Compiled in flag settings for the set-debug-level option */
207280849Scy#define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
208280849Scy        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
209280849Scy
210280849Scy/**
211280849Scy *  interactive option description with
212181834Sroberto *  "Must also have options" and "Incompatible options":
213181834Sroberto */
214280849Scy/** Descriptive text for the interactive option */
215316722Sdelphij#define INTERACTIVE_DESC      (ntpdc_opt_strs+1248)
216280849Scy/** Upper-cased name for the interactive option */
217316722Sdelphij#define INTERACTIVE_NAME      (ntpdc_opt_strs+1290)
218280849Scy/** Name string for the interactive option */
219316722Sdelphij#define INTERACTIVE_name      (ntpdc_opt_strs+1302)
220280849Scy/** Other options that appear in conjunction with the interactive option */
221280849Scystatic int const aInteractiveCantList[] = {
222181834Sroberto    INDEX_OPT_COMMAND,
223181834Sroberto    INDEX_OPT_LISTPEERS,
224181834Sroberto    INDEX_OPT_PEERS,
225181834Sroberto    INDEX_OPT_SHOWPEERS, NO_EQUIVALENT };
226280849Scy/** Compiled in flag settings for the interactive option */
227280849Scy#define INTERACTIVE_FLAGS     (OPTST_DISABLED)
228181834Sroberto
229280849Scy/**
230280849Scy *  listpeers option description with
231280849Scy *  "Must also have options" and "Incompatible options":
232181834Sroberto */
233280849Scy/** Descriptive text for the listpeers option */
234316722Sdelphij#define LISTPEERS_DESC      (ntpdc_opt_strs+1314)
235280849Scy/** Upper-cased name for the listpeers option */
236316722Sdelphij#define LISTPEERS_NAME      (ntpdc_opt_strs+1340)
237280849Scy/** Name string for the listpeers option */
238316722Sdelphij#define LISTPEERS_name      (ntpdc_opt_strs+1350)
239280849Scy/** Other options that appear in conjunction with the listpeers option */
240280849Scystatic int const aListpeersCantList[] = {
241280849Scy    INDEX_OPT_COMMAND, NO_EQUIVALENT };
242280849Scy/** Compiled in flag settings for the listpeers option */
243280849Scy#define LISTPEERS_FLAGS     (OPTST_DISABLED)
244181834Sroberto
245280849Scy/**
246280849Scy *  numeric option description:
247280849Scy */
248280849Scy/** Descriptive text for the numeric option */
249316722Sdelphij#define NUMERIC_DESC      (ntpdc_opt_strs+1360)
250280849Scy/** Upper-cased name for the numeric option */
251316722Sdelphij#define NUMERIC_NAME      (ntpdc_opt_strs+1383)
252280849Scy/** Name string for the numeric option */
253316722Sdelphij#define NUMERIC_name      (ntpdc_opt_strs+1391)
254280849Scy/** Compiled in flag settings for the numeric option */
255280849Scy#define NUMERIC_FLAGS     (OPTST_DISABLED)
256181834Sroberto
257280849Scy/**
258280849Scy *  peers option description with
259280849Scy *  "Must also have options" and "Incompatible options":
260181834Sroberto */
261280849Scy/** Descriptive text for the peers option */
262316722Sdelphij#define PEERS_DESC      (ntpdc_opt_strs+1314)
263280849Scy/** Upper-cased name for the peers option */
264316722Sdelphij#define PEERS_NAME      (ntpdc_opt_strs+1399)
265280849Scy/** Name string for the peers option */
266316722Sdelphij#define PEERS_name      (ntpdc_opt_strs+1405)
267280849Scy/** Other options that appear in conjunction with the peers option */
268280849Scystatic int const aPeersCantList[] = {
269280849Scy    INDEX_OPT_COMMAND, NO_EQUIVALENT };
270280849Scy/** Compiled in flag settings for the peers option */
271280849Scy#define PEERS_FLAGS     (OPTST_DISABLED)
272181834Sroberto
273280849Scy/**
274280849Scy *  showpeers option description with
275280849Scy *  "Must also have options" and "Incompatible options":
276181834Sroberto */
277280849Scy/** Descriptive text for the showpeers option */
278316722Sdelphij#define SHOWPEERS_DESC      (ntpdc_opt_strs+1411)
279280849Scy/** Upper-cased name for the showpeers option */
280316722Sdelphij#define SHOWPEERS_NAME      (ntpdc_opt_strs+1436)
281280849Scy/** Name string for the showpeers option */
282316722Sdelphij#define SHOWPEERS_name      (ntpdc_opt_strs+1446)
283280849Scy/** Other options that appear in conjunction with the showpeers option */
284280849Scystatic int const aShowpeersCantList[] = {
285280849Scy    INDEX_OPT_COMMAND, NO_EQUIVALENT };
286280849Scy/** Compiled in flag settings for the showpeers option */
287280849Scy#define SHOWPEERS_FLAGS     (OPTST_DISABLED)
288181834Sroberto
289181834Sroberto/*
290181834Sroberto *  Help/More_Help/Version option descriptions:
291181834Sroberto */
292316722Sdelphij#define HELP_DESC       (ntpdc_opt_strs+1456)
293316722Sdelphij#define HELP_name       (ntpdc_opt_strs+1500)
294280849Scy#ifdef HAVE_WORKING_FORK
295316722Sdelphij#define MORE_HELP_DESC  (ntpdc_opt_strs+1505)
296316722Sdelphij#define MORE_HELP_name  (ntpdc_opt_strs+1550)
297280849Scy#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
298280849Scy#else
299280849Scy#define MORE_HELP_DESC  HELP_DESC
300280849Scy#define MORE_HELP_name  HELP_name
301280849Scy#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
302280849Scy#endif
303280849Scy#ifdef NO_OPTIONAL_OPT_ARGS
304280849Scy#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
305280849Scy#else
306280849Scy#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
307280849Scy                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
308280849Scy#endif
309316722Sdelphij#define VER_DESC        (ntpdc_opt_strs+1560)
310316722Sdelphij#define VER_name        (ntpdc_opt_strs+1596)
311316722Sdelphij#define SAVE_OPTS_DESC  (ntpdc_opt_strs+1604)
312316722Sdelphij#define SAVE_OPTS_name  (ntpdc_opt_strs+1643)
313316722Sdelphij#define LOAD_OPTS_DESC     (ntpdc_opt_strs+1653)
314316722Sdelphij#define LOAD_OPTS_NAME     (ntpdc_opt_strs+1685)
315316722Sdelphij#define NO_LOAD_OPTS_name  (ntpdc_opt_strs+1695)
316316722Sdelphij#define LOAD_OPTS_pfx      (ntpdc_opt_strs+1708)
317280849Scy#define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
318280849Scy/**
319181834Sroberto *  Declare option callback procedures
320181834Sroberto */
321181834Srobertoextern tOptProc
322280849Scy    ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
323280849Scy    optionNumericVal,      optionPagedUsage,      optionResetOpt,
324280849Scy    optionStackArg,        optionTimeDate,        optionTimeVal,
325280849Scy    optionUnstackArg,      optionVendorOption;
326181834Srobertostatic tOptProc
327280849Scy    doOptDebug_Level, doUsageOpt;
328280849Scy#define VER_PROC        ntpOptionPrintVersion
329181834Sroberto
330280849Scy/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
331280849Scy/**
332280849Scy *  Define the ntpdc Option Descriptions.
333280849Scy * This is an array of OPTION_CT entries, one for each
334280849Scy * option that the ntpdc program responds to.
335181834Sroberto */
336280849Scystatic tOptDesc optDesc[OPTION_CT] = {
337181834Sroberto  {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
338280849Scy     /* equiv idx, value */ 0, VALUE_OPT_IPV4,
339181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
340181834Sroberto     /* min, max, act ct */ 0, 1, 0,
341181834Sroberto     /* opt state flags  */ IPV4_FLAGS, 0,
342280849Scy     /* last opt argumnt */ { NULL }, /* --ipv4 */
343181834Sroberto     /* arg list/cookie  */ NULL,
344280849Scy     /* must/cannot opts */ NULL, aIpv4CantList,
345181834Sroberto     /* option proc      */ NULL,
346280849Scy     /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
347181834Sroberto     /* disablement strs */ NULL, NULL },
348181834Sroberto
349181834Sroberto  {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
350280849Scy     /* equiv idx, value */ 1, VALUE_OPT_IPV6,
351280849Scy     /* equivalenced to  */ NO_EQUIVALENT,
352181834Sroberto     /* min, max, act ct */ 0, 1, 0,
353181834Sroberto     /* opt state flags  */ IPV6_FLAGS, 0,
354280849Scy     /* last opt argumnt */ { NULL }, /* --ipv6 */
355181834Sroberto     /* arg list/cookie  */ NULL,
356280849Scy     /* must/cannot opts */ NULL, aIpv6CantList,
357181834Sroberto     /* option proc      */ NULL,
358280849Scy     /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
359181834Sroberto     /* disablement strs */ NULL, NULL },
360181834Sroberto
361181834Sroberto  {  /* entry idx, value */ 2, VALUE_OPT_COMMAND,
362181834Sroberto     /* equiv idx, value */ 2, VALUE_OPT_COMMAND,
363181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
364181834Sroberto     /* min, max, act ct */ 0, NOLIMIT, 0,
365181834Sroberto     /* opt state flags  */ COMMAND_FLAGS, 0,
366280849Scy     /* last opt argumnt */ { NULL }, /* --command */
367181834Sroberto     /* arg list/cookie  */ NULL,
368181834Sroberto     /* must/cannot opts */ NULL, NULL,
369181834Sroberto     /* option proc      */ optionStackArg,
370280849Scy     /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name,
371181834Sroberto     /* disablement strs */ NULL, NULL },
372181834Sroberto
373280849Scy  {  /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
374280849Scy     /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
375181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
376280849Scy     /* min, max, act ct */ 0, NOLIMIT, 0,
377280849Scy     /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
378280849Scy     /* last opt argumnt */ { NULL }, /* --debug-level */
379181834Sroberto     /* arg list/cookie  */ NULL,
380280849Scy     /* must/cannot opts */ NULL, NULL,
381280849Scy     /* option proc      */ doOptDebug_Level,
382280849Scy     /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
383181834Sroberto     /* disablement strs */ NULL, NULL },
384181834Sroberto
385280849Scy  {  /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
386280849Scy     /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
387181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
388280849Scy     /* min, max, act ct */ 0, NOLIMIT, 0,
389280849Scy     /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
390280849Scy     /* last opt argumnt */ { NULL }, /* --set-debug-level */
391181834Sroberto     /* arg list/cookie  */ NULL,
392280849Scy     /* must/cannot opts */ NULL, NULL,
393280849Scy     /* option proc      */ optionNumericVal,
394280849Scy     /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
395181834Sroberto     /* disablement strs */ NULL, NULL },
396181834Sroberto
397280849Scy  {  /* entry idx, value */ 5, VALUE_OPT_INTERACTIVE,
398280849Scy     /* equiv idx, value */ 5, VALUE_OPT_INTERACTIVE,
399181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
400181834Sroberto     /* min, max, act ct */ 0, 1, 0,
401280849Scy     /* opt state flags  */ INTERACTIVE_FLAGS, 0,
402280849Scy     /* last opt argumnt */ { NULL }, /* --interactive */
403181834Sroberto     /* arg list/cookie  */ NULL,
404280849Scy     /* must/cannot opts */ NULL, aInteractiveCantList,
405181834Sroberto     /* option proc      */ NULL,
406280849Scy     /* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name,
407181834Sroberto     /* disablement strs */ NULL, NULL },
408181834Sroberto
409280849Scy  {  /* entry idx, value */ 6, VALUE_OPT_LISTPEERS,
410280849Scy     /* equiv idx, value */ 6, VALUE_OPT_LISTPEERS,
411181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
412181834Sroberto     /* min, max, act ct */ 0, 1, 0,
413280849Scy     /* opt state flags  */ LISTPEERS_FLAGS, 0,
414280849Scy     /* last opt argumnt */ { NULL }, /* --listpeers */
415181834Sroberto     /* arg list/cookie  */ NULL,
416280849Scy     /* must/cannot opts */ NULL, aListpeersCantList,
417181834Sroberto     /* option proc      */ NULL,
418280849Scy     /* desc, NAME, name */ LISTPEERS_DESC, LISTPEERS_NAME, LISTPEERS_name,
419181834Sroberto     /* disablement strs */ NULL, NULL },
420181834Sroberto
421280849Scy  {  /* entry idx, value */ 7, VALUE_OPT_NUMERIC,
422280849Scy     /* equiv idx, value */ 7, VALUE_OPT_NUMERIC,
423181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
424280849Scy     /* min, max, act ct */ 0, 1, 0,
425280849Scy     /* opt state flags  */ NUMERIC_FLAGS, 0,
426280849Scy     /* last opt argumnt */ { NULL }, /* --numeric */
427181834Sroberto     /* arg list/cookie  */ NULL,
428181834Sroberto     /* must/cannot opts */ NULL, NULL,
429181834Sroberto     /* option proc      */ NULL,
430280849Scy     /* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name,
431181834Sroberto     /* disablement strs */ NULL, NULL },
432181834Sroberto
433280849Scy  {  /* entry idx, value */ 8, VALUE_OPT_PEERS,
434280849Scy     /* equiv idx, value */ 8, VALUE_OPT_PEERS,
435181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
436280849Scy     /* min, max, act ct */ 0, 1, 0,
437280849Scy     /* opt state flags  */ PEERS_FLAGS, 0,
438280849Scy     /* last opt argumnt */ { NULL }, /* --peers */
439181834Sroberto     /* arg list/cookie  */ NULL,
440280849Scy     /* must/cannot opts */ NULL, aPeersCantList,
441280849Scy     /* option proc      */ NULL,
442280849Scy     /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
443181834Sroberto     /* disablement strs */ NULL, NULL },
444181834Sroberto
445280849Scy  {  /* entry idx, value */ 9, VALUE_OPT_SHOWPEERS,
446280849Scy     /* equiv idx, value */ 9, VALUE_OPT_SHOWPEERS,
447181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
448181834Sroberto     /* min, max, act ct */ 0, 1, 0,
449280849Scy     /* opt state flags  */ SHOWPEERS_FLAGS, 0,
450280849Scy     /* last opt argumnt */ { NULL }, /* --showpeers */
451181834Sroberto     /* arg list/cookie  */ NULL,
452280849Scy     /* must/cannot opts */ NULL, aShowpeersCantList,
453181834Sroberto     /* option proc      */ NULL,
454280849Scy     /* desc, NAME, name */ SHOWPEERS_DESC, SHOWPEERS_NAME, SHOWPEERS_name,
455181834Sroberto     /* disablement strs */ NULL, NULL },
456181834Sroberto
457181834Sroberto  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
458280849Scy     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
459181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
460181834Sroberto     /* min, max, act ct */ 0, 1, 0,
461280849Scy     /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
462181834Sroberto     /* last opt argumnt */ { NULL },
463181834Sroberto     /* arg list/cookie  */ NULL,
464181834Sroberto     /* must/cannot opts */ NULL, NULL,
465280849Scy     /* option proc      */ VER_PROC,
466280849Scy     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
467181834Sroberto     /* disablement strs */ NULL, NULL },
468181834Sroberto
469181834Sroberto
470181834Sroberto
471181834Sroberto  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
472280849Scy     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
473181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
474181834Sroberto     /* min, max, act ct */ 0, 1, 0,
475280849Scy     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
476181834Sroberto     /* last opt argumnt */ { NULL },
477181834Sroberto     /* arg list/cookie  */ NULL,
478181834Sroberto     /* must/cannot opts */ NULL, NULL,
479181834Sroberto     /* option proc      */ doUsageOpt,
480280849Scy     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
481181834Sroberto     /* disablement strs */ NULL, NULL },
482181834Sroberto
483181834Sroberto  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
484280849Scy     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
485181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
486181834Sroberto     /* min, max, act ct */ 0, 1, 0,
487280849Scy     /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
488181834Sroberto     /* last opt argumnt */ { NULL },
489181834Sroberto     /* arg list/cookie  */ NULL,
490181834Sroberto     /* must/cannot opts */ NULL,  NULL,
491181834Sroberto     /* option proc      */ optionPagedUsage,
492280849Scy     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
493181834Sroberto     /* disablement strs */ NULL, NULL },
494181834Sroberto
495181834Sroberto  {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
496280849Scy     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
497181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
498181834Sroberto     /* min, max, act ct */ 0, 1, 0,
499181834Sroberto     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
500280849Scy                       | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
501181834Sroberto     /* last opt argumnt */ { NULL },
502181834Sroberto     /* arg list/cookie  */ NULL,
503181834Sroberto     /* must/cannot opts */ NULL,  NULL,
504181834Sroberto     /* option proc      */ NULL,
505280849Scy     /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
506181834Sroberto     /* disablement strs */ NULL, NULL },
507181834Sroberto
508181834Sroberto  {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
509280849Scy     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
510181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
511181834Sroberto     /* min, max, act ct */ 0, NOLIMIT, 0,
512280849Scy     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
513280849Scy			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
514181834Sroberto     /* last opt argumnt */ { NULL },
515181834Sroberto     /* arg list/cookie  */ NULL,
516181834Sroberto     /* must/cannot opts */ NULL, NULL,
517181834Sroberto     /* option proc      */ optionLoadOpt,
518280849Scy     /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
519280849Scy     /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
520181834Sroberto};
521181834Sroberto
522181834Sroberto
523280849Scy/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
524280849Scy/** Reference to the upper cased version of ntpdc. */
525316722Sdelphij#define zPROGNAME       (ntpdc_opt_strs+1711)
526280849Scy/** Reference to the title line for ntpdc usage. */
527316722Sdelphij#define zUsageTitle     (ntpdc_opt_strs+1717)
528280849Scy/** ntpdc configuration file name. */
529316722Sdelphij#define zRcName         (ntpdc_opt_strs+1856)
530280849Scy/** Directories to search for ntpdc config files. */
531280849Scystatic char const * const apzHomeList[3] = {
532316722Sdelphij    ntpdc_opt_strs+1848,
533316722Sdelphij    ntpdc_opt_strs+1854,
534280849Scy    NULL };
535280849Scy/** The ntpdc program bug email address. */
536316722Sdelphij#define zBugsAddr       (ntpdc_opt_strs+1863)
537280849Scy/** Clarification/explanation of what ntpdc does. */
538316722Sdelphij#define zExplain        (ntpdc_opt_strs+1897)
539280849Scy/** Extra detail explaining what ntpdc does. */
540280849Scy#define zDetail         (NULL)
541280849Scy/** The full version string for ntpdc. */
542316722Sdelphij#define zFullVersion    (ntpdc_opt_strs+1899)
543280849Scy/* extracted from optcode.tlib near line 364 */
544181834Sroberto
545181834Sroberto#if defined(ENABLE_NLS)
546181834Sroberto# define OPTPROC_BASE OPTPROC_TRANSLATE
547181834Sroberto  static tOptionXlateProc translate_option_strings;
548181834Sroberto#else
549181834Sroberto# define OPTPROC_BASE OPTPROC_NONE
550181834Sroberto# define translate_option_strings NULL
551181834Sroberto#endif /* ENABLE_NLS */
552181834Sroberto
553280849Scy#define ntpdc_full_usage (NULL)
554280849Scy#define ntpdc_short_usage (NULL)
555280849Scy
556280849Scy#endif /* not defined __doxygen__ */
557280849Scy
558280849Scy/*
559280849Scy *  Create the static procedure(s) declared above.
560280849Scy */
561280849Scy/**
562280849Scy * The callout function that invokes the optionUsage function.
563280849Scy *
564280849Scy * @param[in] opts the AutoOpts option description structure
565280849Scy * @param[in] od   the descriptor for the "help" (usage) option.
566280849Scy * @noreturn
567280849Scy */
568280849Scystatic void
569280849ScydoUsageOpt(tOptions * opts, tOptDesc * od)
570280849Scy{
571280849Scy    int ex_code;
572280849Scy    ex_code = NTPDC_EXIT_SUCCESS;
573280849Scy    optionUsage(&ntpdcOptions, ex_code);
574280849Scy    /* NOTREACHED */
575280849Scy    exit(1);
576280849Scy    (void)opts;
577280849Scy    (void)od;
578280849Scy}
579280849Scy
580280849Scy/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
581280849Scy/**
582280849Scy * Code to handle the debug-level option.
583280849Scy *
584280849Scy * @param[in] pOptions the ntpdc options data structure
585280849Scy * @param[in,out] pOptDesc the option descriptor for this option.
586280849Scy */
587280849Scystatic void
588280849ScydoOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
589280849Scy{
590280849Scy    /*
591280849Scy     * Be sure the flag-code[0] handles special values for the options pointer
592280849Scy     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
593280849Scy     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
594280849Scy     * reset its state.
595280849Scy     */
596280849Scy    /* extracted from debug-opt.def, line 15 */
597280849ScyOPT_VALUE_SET_DEBUG_LEVEL++;
598280849Scy    (void)pOptDesc;
599280849Scy    (void)pOptions;
600280849Scy}
601285169Scy/* extracted from optmain.tlib near line 1250 */
602280849Scy
603280849Scy/**
604280849Scy * The directory containing the data associated with ntpdc.
605280849Scy */
606280849Scy#ifndef  PKGDATADIR
607280849Scy# define PKGDATADIR ""
608280849Scy#endif
609280849Scy
610280849Scy/**
611280849Scy * Information about the person or institution that packaged ntpdc
612280849Scy * for the current distribution.
613280849Scy */
614280849Scy#ifndef  WITH_PACKAGER
615280849Scy# define ntpdc_packager_info NULL
616280849Scy#else
617280849Scy/** Packager information for ntpdc. */
618280849Scystatic char const ntpdc_packager_info[] =
619280849Scy    "Packaged by " WITH_PACKAGER
620280849Scy
621280849Scy# ifdef WITH_PACKAGER_VERSION
622280849Scy        " ("WITH_PACKAGER_VERSION")"
623280849Scy# endif
624280849Scy
625280849Scy# ifdef WITH_PACKAGER_BUG_REPORTS
626280849Scy    "\nReport ntpdc bugs to " WITH_PACKAGER_BUG_REPORTS
627280849Scy# endif
628280849Scy    "\n";
629280849Scy#endif
630280849Scy#ifndef __doxygen__
631280849Scy
632280849Scy#endif /* __doxygen__ */
633280849Scy/**
634280849Scy * The option definitions for ntpdc.  The one structure that
635280849Scy * binds them all.
636280849Scy */
637181834SrobertotOptions ntpdcOptions = {
638181834Sroberto    OPTIONS_STRUCT_VERSION,
639181834Sroberto    0, NULL,                    /* original argc + argv    */
640181834Sroberto    ( OPTPROC_BASE
641181834Sroberto    + OPTPROC_ERRSTOP
642181834Sroberto    + OPTPROC_SHORTOPT
643181834Sroberto    + OPTPROC_LONGOPT
644181834Sroberto    + OPTPROC_NO_REQ_OPT
645181834Sroberto    + OPTPROC_ENVIRON
646280849Scy    + OPTPROC_MISUSE ),
647181834Sroberto    0, NULL,                    /* current option index, current option */
648181834Sroberto    NULL,         NULL,         zPROGNAME,
649280849Scy    zRcName,      zCopyright,   zLicenseDescrip,
650181834Sroberto    zFullVersion, apzHomeList,  zUsageTitle,
651181834Sroberto    zExplain,     zDetail,      optDesc,
652181834Sroberto    zBugsAddr,                  /* address to send bugs to */
653181834Sroberto    NULL, NULL,                 /* extensions/saved state  */
654280849Scy    optionUsage, /* usage procedure */
655181834Sroberto    translate_option_strings,   /* translation procedure */
656181834Sroberto    /*
657181834Sroberto     *  Indexes to special options
658181834Sroberto     */
659280849Scy    { INDEX_OPT_MORE_HELP, /* more-help option index */
660280849Scy      INDEX_OPT_SAVE_OPTS, /* save option index */
661280849Scy      NO_EQUIVALENT, /* '-#' option index */
662181834Sroberto      NO_EQUIVALENT /* index of default opt */
663181834Sroberto    },
664280849Scy    15 /* full option count */, 10 /* user option count */,
665280849Scy    ntpdc_full_usage, ntpdc_short_usage,
666280849Scy    NULL, NULL,
667280849Scy    PKGDATADIR, ntpdc_packager_info
668181834Sroberto};
669181834Sroberto
670280849Scy#if ENABLE_NLS
671280849Scy/**
672280849Scy * This code is designed to translate translatable option text for the
673280849Scy * ntpdc program.  These translations happen upon entry
674280849Scy * to optionProcess().
675181834Sroberto */
676181834Sroberto#include <stdio.h>
677181834Sroberto#include <stdlib.h>
678181834Sroberto#include <string.h>
679181834Sroberto#include <unistd.h>
680280849Scy#ifdef HAVE_DCGETTEXT
681280849Scy# include <gettext.h>
682280849Scy#endif
683181834Sroberto#include <autoopts/usage-txt.h>
684181834Sroberto
685280849Scystatic char * AO_gettext(char const * pz);
686280849Scystatic void   coerce_it(void ** s);
687181834Sroberto
688280849Scy/**
689280849Scy * AutoGen specific wrapper function for gettext.  It relies on the macro _()
690280849Scy * to convert from English to the target language, then strdup-duplicates the
691280849Scy * result string.  It tries the "libopts" domain first, then whatever has been
692280849Scy * set via the \a textdomain(3) call.
693280849Scy *
694280849Scy * @param[in] pz the input text used as a lookup key.
695280849Scy * @returns the translated text (if there is one),
696280849Scy *   or the original text (if not).
697280849Scy */
698280849Scystatic char *
699280849ScyAO_gettext(char const * pz)
700181834Sroberto{
701280849Scy    char * res;
702181834Sroberto    if (pz == NULL)
703181834Sroberto        return NULL;
704280849Scy#ifdef HAVE_DCGETTEXT
705280849Scy    /*
706280849Scy     * While processing the option_xlateable_txt data, try to use the
707280849Scy     * "libopts" domain.  Once we switch to the option descriptor data,
708280849Scy     * do *not* use that domain.
709280849Scy     */
710280849Scy    if (option_xlateable_txt.field_ct != 0) {
711280849Scy        res = dgettext("libopts", pz);
712280849Scy        if (res == pz)
713285169Scy            res = (char *)VOIDP(_(pz));
714280849Scy    } else
715285169Scy        res = (char *)VOIDP(_(pz));
716280849Scy#else
717285169Scy    res = (char *)VOIDP(_(pz));
718280849Scy#endif
719280849Scy    if (res == pz)
720280849Scy        return res;
721280849Scy    res = strdup(res);
722280849Scy    if (res == NULL) {
723280849Scy        fputs(_("No memory for duping translated strings\n"), stderr);
724280849Scy        exit(NTPDC_EXIT_FAILURE);
725181834Sroberto    }
726280849Scy    return res;
727181834Sroberto}
728181834Sroberto
729280849Scy/**
730280849Scy * All the pointers we use are marked "* const", but they are stored in
731280849Scy * writable memory.  Coerce the mutability and set the pointer.
732280849Scy */
733280849Scystatic void coerce_it(void ** s) { *s = AO_gettext(*s);
734280849Scy}
735181834Sroberto
736280849Scy/**
737280849Scy * Translate all the translatable strings in the ntpdcOptions
738280849Scy * structure defined above.  This is done only once.
739181834Sroberto */
740181834Srobertostatic void
741280849Scytranslate_option_strings(void)
742181834Sroberto{
743280849Scy    tOptions * const opts = &ntpdcOptions;
744280849Scy
745181834Sroberto    /*
746181834Sroberto     *  Guard against re-translation.  It won't work.  The strings will have
747181834Sroberto     *  been changed by the first pass through this code.  One shot only.
748181834Sroberto     */
749280849Scy    if (option_xlateable_txt.field_ct != 0) {
750280849Scy        /*
751280849Scy         *  Do the translations.  The first pointer follows the field count
752280849Scy         *  field.  The field count field is the size of a pointer.
753280849Scy         */
754285169Scy        char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
755280849Scy        int     ix  = option_xlateable_txt.field_ct;
756181834Sroberto
757181834Sroberto        do {
758280849Scy            ppz++; /* skip over field_ct */
759181834Sroberto            *ppz = AO_gettext(*ppz);
760181834Sroberto        } while (--ix > 0);
761280849Scy        /* prevent re-translation and disable "libopts" domain lookup */
762280849Scy        option_xlateable_txt.field_ct = 0;
763181834Sroberto
764285169Scy        coerce_it(VOIDP(&(opts->pzCopyright)));
765285169Scy        coerce_it(VOIDP(&(opts->pzCopyNotice)));
766285169Scy        coerce_it(VOIDP(&(opts->pzFullVersion)));
767285169Scy        coerce_it(VOIDP(&(opts->pzUsageTitle)));
768285169Scy        coerce_it(VOIDP(&(opts->pzExplain)));
769285169Scy        coerce_it(VOIDP(&(opts->pzDetail)));
770280849Scy        {
771280849Scy            tOptDesc * od = opts->pOptDesc;
772280849Scy            for (ix = opts->optCt; ix > 0; ix--, od++)
773285169Scy                coerce_it(VOIDP(&(od->pzText)));
774181834Sroberto        }
775181834Sroberto    }
776181834Sroberto}
777181834Sroberto#endif /* ENABLE_NLS */
778181834Sroberto
779280849Scy#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
780280849Scy/** I18N function strictly for xgettext.  Do not compile. */
781280849Scystatic void bogus_function(void) {
782280849Scy  /* TRANSLATORS:
783280849Scy
784280849Scy     The following dummy function was crated solely so that xgettext can
785280849Scy     extract the correct strings.  These strings are actually referenced
786280849Scy     by a field name in the ntpdcOptions structure noted in the
787280849Scy     comments below.  The literal text is defined in ntpdc_opt_strs.
788280849Scy
789280849Scy     NOTE: the strings below are segmented with respect to the source string
790280849Scy     ntpdc_opt_strs.  The strings above are handed off for translation
791280849Scy     at run time a paragraph at a time.  Consequently, they are presented here
792280849Scy     for translation a paragraph at a time.
793280849Scy
794280849Scy     ALSO: often the description for an option will reference another option
795280849Scy     by name.  These are set off with apostrophe quotes (I hope).  Do not
796280849Scy     translate option names.
797280849Scy   */
798280849Scy  /* referenced via ntpdcOptions.pzCopyright */
799316722Sdelphij  puts(_("ntpdc 4.2.8p10\n\
800316722SdelphijCopyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
801280849ScyThis is free software. It is licensed for use, modification and\n\
802280849Scyredistribution under the terms of the NTP License, copies of which\n\
803280849Scycan be seen at:\n"));
804280849Scy  puts(_("  <http://ntp.org/license>\n\
805280849Scy  <http://opensource.org/licenses/ntp-license.php>\n"));
806280849Scy
807280849Scy  /* referenced via ntpdcOptions.pzCopyNotice */
808280849Scy  puts(_("Permission to use, copy, modify, and distribute this software and its\n\
809280849Scydocumentation for any purpose with or without fee is hereby granted,\n\
810280849Scyprovided that the above copyright notice appears in all copies and that\n\
811280849Scyboth the copyright notice and this permission notice appear in supporting\n\
812280849Scydocumentation, and that the name The University of Delaware not be used in\n\
813280849Scyadvertising or publicity pertaining to distribution of the software without\n\
814280849Scyspecific, written prior permission.  The University of Delaware and Network\n\
815280849ScyTime Foundation makes no representations about the suitability this\n\
816280849Scysoftware for any purpose.  It is provided \"as is\" without express or\n\
817280849Scyimplied warranty.\n"));
818280849Scy
819280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
820280849Scy  puts(_("Force IPv4 DNS name resolution"));
821280849Scy
822280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
823280849Scy  puts(_("Force IPv6 DNS name resolution"));
824280849Scy
825280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
826280849Scy  puts(_("run a command and exit"));
827280849Scy
828280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
829280849Scy  puts(_("Increase debug verbosity level"));
830280849Scy
831280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
832280849Scy  puts(_("Set the debug verbosity level"));
833280849Scy
834280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
835280849Scy  puts(_("Force ntpq to operate in interactive mode"));
836280849Scy
837280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
838280849Scy  puts(_("Print a list of the peers"));
839280849Scy
840280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
841280849Scy  puts(_("numeric host addresses"));
842280849Scy
843280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
844280849Scy  puts(_("Print a list of the peers"));
845280849Scy
846280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
847280849Scy  puts(_("Show a list of the peers"));
848280849Scy
849280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
850280849Scy  puts(_("display extended usage information and exit"));
851280849Scy
852280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
853280849Scy  puts(_("extended usage information passed thru pager"));
854280849Scy
855280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
856280849Scy  puts(_("output version information and exit"));
857280849Scy
858280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
859280849Scy  puts(_("save the option state to a config file"));
860280849Scy
861280849Scy  /* referenced via ntpdcOptions.pOptDesc->pzText */
862280849Scy  puts(_("load options from a config file"));
863280849Scy
864280849Scy  /* referenced via ntpdcOptions.pzUsageTitle */
865316722Sdelphij  puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p10\n\
866280849ScyUsage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
867280849Scy
868280849Scy  /* referenced via ntpdcOptions.pzExplain */
869280849Scy  puts(_("\n"));
870280849Scy
871280849Scy  /* referenced via ntpdcOptions.pzFullVersion */
872316722Sdelphij  puts(_("ntpdc 4.2.8p10"));
873280849Scy
874280849Scy  /* referenced via ntpdcOptions.pzFullUsage */
875280849Scy  puts(_("<<<NOT-FOUND>>>"));
876280849Scy
877280849Scy  /* referenced via ntpdcOptions.pzShortUsage */
878280849Scy  puts(_("<<<NOT-FOUND>>>"));
879280849Scy  /* LIBOPTS-MESSAGES: */
880280849Scy#line 67 "../autoopts.c"
881280849Scy  puts(_("allocation of %d bytes failed\n"));
882280849Scy#line 93 "../autoopts.c"
883280849Scy  puts(_("allocation of %d bytes failed\n"));
884280849Scy#line 53 "../init.c"
885280849Scy  puts(_("AutoOpts function called without option descriptor\n"));
886280849Scy#line 86 "../init.c"
887280849Scy  puts(_("\tThis exceeds the compiled library version:  "));
888280849Scy#line 84 "../init.c"
889280849Scy  puts(_("Automated Options Processing Error!\n"
890280849Scy       "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
891280849Scy#line 80 "../autoopts.c"
892280849Scy  puts(_("realloc of %d bytes at 0x%p failed\n"));
893280849Scy#line 88 "../init.c"
894280849Scy  puts(_("\tThis is less than the minimum library version:  "));
895280849Scy#line 121 "../version.c"
896280849Scy  puts(_("Automated Options version %s\n"
897280849Scy       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
898285169Scy#line 87 "../makeshell.c"
899280849Scy  puts(_("(AutoOpts bug):  %s.\n"));
900280849Scy#line 90 "../reset.c"
901280849Scy  puts(_("optionResetOpt() called, but reset-option not configured"));
902280849Scy#line 292 "../usage.c"
903280849Scy  puts(_("could not locate the 'help' option"));
904280849Scy#line 336 "../autoopts.c"
905280849Scy  puts(_("optionProcess() was called with invalid data"));
906280849Scy#line 748 "../usage.c"
907280849Scy  puts(_("invalid argument type specified"));
908280849Scy#line 598 "../find.c"
909280849Scy  puts(_("defaulted to option with optional arg"));
910280849Scy#line 76 "../alias.c"
911280849Scy  puts(_("aliasing option is out of range."));
912280849Scy#line 234 "../enum.c"
913280849Scy  puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
914280849Scy#line 108 "../find.c"
915280849Scy  puts(_("  The following options match:\n"));
916280849Scy#line 293 "../find.c"
917280849Scy  puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
918280849Scy#line 161 "../check.c"
919280849Scy  puts(_("%s: Command line arguments required\n"));
920280849Scy#line 43 "../alias.c"
921280849Scy  puts(_("%d %s%s options allowed\n"));
922285169Scy#line 94 "../makeshell.c"
923280849Scy  puts(_("%s error %d (%s) calling %s for '%s'\n"));
924285169Scy#line 306 "../makeshell.c"
925280849Scy  puts(_("interprocess pipe"));
926280849Scy#line 168 "../version.c"
927280849Scy  puts(_("error: version option argument '%c' invalid.  Use:\n"
928280849Scy       "\t'v' - version only\n"
929280849Scy       "\t'c' - version and copyright\n"
930280849Scy       "\t'n' - version and full copyright notice\n"));
931280849Scy#line 58 "../check.c"
932280849Scy  puts(_("%s error:  the '%s' and '%s' options conflict\n"));
933280849Scy#line 217 "../find.c"
934280849Scy  puts(_("%s: The '%s' option has been disabled."));
935280849Scy#line 430 "../find.c"
936280849Scy  puts(_("%s: The '%s' option has been disabled."));
937280849Scy#line 38 "../alias.c"
938280849Scy  puts(_("-equivalence"));
939280849Scy#line 469 "../find.c"
940280849Scy  puts(_("%s: illegal option -- %c\n"));
941280849Scy#line 110 "../reset.c"
942280849Scy  puts(_("%s: illegal option -- %c\n"));
943280849Scy#line 271 "../find.c"
944280849Scy  puts(_("%s: illegal option -- %s\n"));
945280849Scy#line 755 "../find.c"
946280849Scy  puts(_("%s: illegal option -- %s\n"));
947280849Scy#line 118 "../reset.c"
948280849Scy  puts(_("%s: illegal option -- %s\n"));
949280849Scy#line 335 "../find.c"
950280849Scy  puts(_("%s: unknown vendor extension option -- %s\n"));
951280849Scy#line 159 "../enum.c"
952280849Scy  puts(_("  or an integer from %d through %d\n"));
953280849Scy#line 169 "../enum.c"
954280849Scy  puts(_("  or an integer from %d through %d\n"));
955280849Scy#line 747 "../usage.c"
956280849Scy  puts(_("%s error:  invalid option descriptor for %s\n"));
957280849Scy#line 1081 "../usage.c"
958280849Scy  puts(_("%s error:  invalid option descriptor for %s\n"));
959280849Scy#line 385 "../find.c"
960280849Scy  puts(_("%s: invalid option name: %s\n"));
961280849Scy#line 527 "../find.c"
962280849Scy  puts(_("%s: The '%s' option requires an argument.\n"));
963280849Scy#line 156 "../autoopts.c"
964280849Scy  puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
965280849Scy       "\t'%s' and '%s'."));
966280849Scy#line 94 "../check.c"
967280849Scy  puts(_("%s error:  The %s option is required\n"));
968280849Scy#line 632 "../find.c"
969280849Scy  puts(_("%s: The '%s' option cannot have an argument.\n"));
970280849Scy#line 151 "../check.c"
971280849Scy  puts(_("%s: Command line arguments are not allowed.\n"));
972280849Scy#line 535 "../save.c"
973280849Scy  puts(_("error %d (%s) creating %s\n"));
974280849Scy#line 234 "../enum.c"
975280849Scy  puts(_("%s error:  '%s' does not match any %s keywords.\n"));
976280849Scy#line 93 "../reset.c"
977280849Scy  puts(_("%s error: The '%s' option requires an argument.\n"));
978280849Scy#line 184 "../save.c"
979280849Scy  puts(_("error %d (%s) stat-ing %s\n"));
980280849Scy#line 238 "../save.c"
981280849Scy  puts(_("error %d (%s) stat-ing %s\n"));
982280849Scy#line 143 "../restore.c"
983280849Scy  puts(_("%s error: no saved option state\n"));
984280849Scy#line 231 "../autoopts.c"
985280849Scy  puts(_("'%s' is not a command line option.\n"));
986280849Scy#line 111 "../time.c"
987280849Scy  puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
988280849Scy#line 132 "../save.c"
989280849Scy  puts(_("'%s' not defined\n"));
990280849Scy#line 50 "../time.c"
991280849Scy  puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
992280849Scy#line 92 "../check.c"
993280849Scy  puts(_("%s error:  The %s option must appear %d times.\n"));
994280849Scy#line 164 "../numeric.c"
995280849Scy  puts(_("%s error:  '%s' is not a recognizable number.\n"));
996280849Scy#line 200 "../enum.c"
997280849Scy  puts(_("%s error:  %s exceeds %s keyword count\n"));
998280849Scy#line 330 "../usage.c"
999280849Scy  puts(_("Try '%s %s' for more information.\n"));
1000280849Scy#line 45 "../alias.c"
1001280849Scy  puts(_("one %s%s option allowed\n"));
1002285169Scy#line 208 "../makeshell.c"
1003280849Scy  puts(_("standard output"));
1004285169Scy#line 943 "../makeshell.c"
1005280849Scy  puts(_("standard output"));
1006280849Scy#line 274 "../usage.c"
1007280849Scy  puts(_("standard output"));
1008280849Scy#line 415 "../usage.c"
1009280849Scy  puts(_("standard output"));
1010280849Scy#line 625 "../usage.c"
1011280849Scy  puts(_("standard output"));
1012280849Scy#line 175 "../version.c"
1013280849Scy  puts(_("standard output"));
1014280849Scy#line 274 "../usage.c"
1015280849Scy  puts(_("standard error"));
1016280849Scy#line 415 "../usage.c"
1017280849Scy  puts(_("standard error"));
1018280849Scy#line 625 "../usage.c"
1019280849Scy  puts(_("standard error"));
1020280849Scy#line 175 "../version.c"
1021280849Scy  puts(_("standard error"));
1022285169Scy#line 208 "../makeshell.c"
1023280849Scy  puts(_("write"));
1024285169Scy#line 943 "../makeshell.c"
1025280849Scy  puts(_("write"));
1026280849Scy#line 273 "../usage.c"
1027280849Scy  puts(_("write"));
1028280849Scy#line 414 "../usage.c"
1029280849Scy  puts(_("write"));
1030280849Scy#line 624 "../usage.c"
1031280849Scy  puts(_("write"));
1032280849Scy#line 174 "../version.c"
1033280849Scy  puts(_("write"));
1034280849Scy#line 60 "../numeric.c"
1035280849Scy  puts(_("%s error:  %s option value %ld is out of range.\n"));
1036280849Scy#line 44 "../check.c"
1037280849Scy  puts(_("%s error:  %s option requires the %s option\n"));
1038280849Scy#line 131 "../save.c"
1039280849Scy  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1040280849Scy#line 183 "../save.c"
1041280849Scy  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1042280849Scy#line 237 "../save.c"
1043280849Scy  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1044280849Scy#line 256 "../save.c"
1045280849Scy  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1046280849Scy#line 534 "../save.c"
1047280849Scy  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1048280849Scy  /* END-LIBOPTS-MESSAGES */
1049280849Scy
1050280849Scy  /* USAGE-TEXT: */
1051280849Scy#line 873 "../usage.c"
1052280849Scy  puts(_("\t\t\t\t- an alternate for '%s'\n"));
1053280849Scy#line 1148 "../usage.c"
1054280849Scy  puts(_("Version, usage and configuration options:"));
1055280849Scy#line 924 "../usage.c"
1056280849Scy  puts(_("\t\t\t\t- default option for unnamed options\n"));
1057280849Scy#line 837 "../usage.c"
1058280849Scy  puts(_("\t\t\t\t- disabled as '--%s'\n"));
1059280849Scy#line 1117 "../usage.c"
1060280849Scy  puts(_(" --- %-14s %s\n"));
1061280849Scy#line 1115 "../usage.c"
1062280849Scy  puts(_("This option has been disabled"));
1063280849Scy#line 864 "../usage.c"
1064280849Scy  puts(_("\t\t\t\t- enabled by default\n"));
1065280849Scy#line 40 "../alias.c"
1066280849Scy  puts(_("%s error:  only "));
1067280849Scy#line 1194 "../usage.c"
1068280849Scy  puts(_(" - examining environment variables named %s_*\n"));
1069280849Scy#line 168 "../file.c"
1070280849Scy  puts(_("\t\t\t\t- file must not pre-exist\n"));
1071280849Scy#line 172 "../file.c"
1072280849Scy  puts(_("\t\t\t\t- file must pre-exist\n"));
1073280849Scy#line 380 "../usage.c"
1074280849Scy  puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1075280849Scy       "hyphen and the flag character.\n"));
1076285169Scy#line 921 "../makeshell.c"
1077280849Scy  puts(_("\n"
1078280849Scy       "= = = = = = = =\n\n"
1079280849Scy       "This incarnation of genshell will produce\n"
1080280849Scy       "a shell script to parse the options for %s:\n\n"));
1081280849Scy#line 166 "../enum.c"
1082280849Scy  puts(_("  or an integer mask with any of the lower %d bits set\n"));
1083280849Scy#line 897 "../usage.c"
1084280849Scy  puts(_("\t\t\t\t- is a set membership option\n"));
1085280849Scy#line 918 "../usage.c"
1086280849Scy  puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1087280849Scy#line 382 "../usage.c"
1088280849Scy  puts(_("Options are specified by single or double hyphens and their name.\n"));
1089280849Scy#line 904 "../usage.c"
1090280849Scy  puts(_("\t\t\t\t- may appear multiple times\n"));
1091280849Scy#line 891 "../usage.c"
1092280849Scy  puts(_("\t\t\t\t- may not be preset\n"));
1093280849Scy#line 1309 "../usage.c"
1094280849Scy  puts(_("   Arg Option-Name    Description\n"));
1095280849Scy#line 1245 "../usage.c"
1096280849Scy  puts(_("  Flg Arg Option-Name    Description\n"));
1097280849Scy#line 1303 "../usage.c"
1098280849Scy  puts(_("  Flg Arg Option-Name    Description\n"));
1099280849Scy#line 1304 "../usage.c"
1100280849Scy  puts(_(" %3s %s"));
1101280849Scy#line 1310 "../usage.c"
1102280849Scy  puts(_(" %3s %s"));
1103280849Scy#line 387 "../usage.c"
1104280849Scy  puts(_("The '-#<number>' option may omit the hash char\n"));
1105280849Scy#line 383 "../usage.c"
1106280849Scy  puts(_("All arguments are named options.\n"));
1107280849Scy#line 971 "../usage.c"
1108280849Scy  puts(_(" - reading file %s"));
1109280849Scy#line 409 "../usage.c"
1110280849Scy  puts(_("\n"
1111280849Scy       "Please send bug reports to:  <%s>\n"));
1112280849Scy#line 100 "../version.c"
1113280849Scy  puts(_("\n"
1114280849Scy       "Please send bug reports to:  <%s>\n"));
1115280849Scy#line 129 "../version.c"
1116280849Scy  puts(_("\n"
1117280849Scy       "Please send bug reports to:  <%s>\n"));
1118280849Scy#line 903 "../usage.c"
1119280849Scy  puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1120280849Scy#line 944 "../usage.c"
1121280849Scy  puts(_("\n"
1122280849Scy       "The following option preset mechanisms are supported:\n"));
1123280849Scy#line 1192 "../usage.c"
1124280849Scy  puts(_("\n"
1125280849Scy       "The following option preset mechanisms are supported:\n"));
1126280849Scy#line 682 "../usage.c"
1127280849Scy  puts(_("prohibits these options:\n"));
1128280849Scy#line 677 "../usage.c"
1129280849Scy  puts(_("prohibits the option '%s'\n"));
1130280849Scy#line 81 "../numeric.c"
1131280849Scy  puts(_("%s%ld to %ld"));
1132280849Scy#line 79 "../numeric.c"
1133280849Scy  puts(_("%sgreater than or equal to %ld"));
1134280849Scy#line 75 "../numeric.c"
1135280849Scy  puts(_("%s%ld exactly"));
1136280849Scy#line 68 "../numeric.c"
1137280849Scy  puts(_("%sit must lie in one of the ranges:\n"));
1138280849Scy#line 68 "../numeric.c"
1139280849Scy  puts(_("%sit must be in the range:\n"));
1140280849Scy#line 88 "../numeric.c"
1141280849Scy  puts(_(", or\n"));
1142280849Scy#line 66 "../numeric.c"
1143280849Scy  puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1144280849Scy#line 77 "../numeric.c"
1145280849Scy  puts(_("%sless than or equal to %ld"));
1146280849Scy#line 390 "../usage.c"
1147280849Scy  puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
1148280849Scy#line 652 "../usage.c"
1149280849Scy  puts(_("requires the option '%s'\n"));
1150280849Scy#line 655 "../usage.c"
1151280849Scy  puts(_("requires these options:\n"));
1152280849Scy#line 1321 "../usage.c"
1153280849Scy  puts(_("   Arg Option-Name   Req?  Description\n"));
1154280849Scy#line 1315 "../usage.c"
1155280849Scy  puts(_("  Flg Arg Option-Name   Req?  Description\n"));
1156280849Scy#line 167 "../enum.c"
1157280849Scy  puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
1158280849Scy       "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1159280849Scy       "will set them all.  Multiple entries may be passed as an option\n"
1160280849Scy       "argument list.\n"));
1161280849Scy#line 910 "../usage.c"
1162280849Scy  puts(_("\t\t\t\t- may appear up to %d times\n"));
1163280849Scy#line 77 "../enum.c"
1164280849Scy  puts(_("The valid \"%s\" option keywords are:\n"));
1165280849Scy#line 1152 "../usage.c"
1166280849Scy  puts(_("The next option supports vendor supported extra options:"));
1167280849Scy#line 773 "../usage.c"
1168280849Scy  puts(_("These additional options are:"));
1169280849Scy  /* END-USAGE-TEXT */
1170280849Scy}
1171280849Scy#endif /* uncompilable code */
1172181834Sroberto#ifdef  __cplusplus
1173181834Sroberto}
1174181834Sroberto#endif
1175181834Sroberto/* ntpdc-opts.c ends here */
1176