Deleted Added
full compact
ntpq-opts.c (302408) ntpq-opts.c (181834)
1/*
1/*
2 * EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
2 * EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
3 *
4 * It has been AutoGen-ed June 2, 2016 at 07:37:05 AM by AutoGen 5.18.5
3 *
4 * It has been AutoGen-ed Sunday August 17, 2008 at 05:26:55 AM EDT
5 * From the definitions ntpq-opts.def
6 * and the template file options
7 *
5 * From the definitions ntpq-opts.def
6 * and the template file options
7 *
8 * Generated from AutoOpts 41:0:16 templates.
8 * Generated from AutoOpts 29:0:4 templates.
9 */
10
11/*
12 * This file was produced by an AutoOpts template. AutoOpts is a
13 * copyrighted work. This source file is not encumbered by AutoOpts
14 * licensing, but is provided under the licensing terms chosen by the
15 * ntpq author or copyright holder. AutoOpts is licensed under
16 * the terms of the LGPL. The redistributable library (``libopts'') is
17 * licensed under the terms of either the LGPL or, at the users discretion,
18 * the BSD license. See the AutoOpts and/or libopts sources for details.
9 *
19 *
10 * AutoOpts is a copyrighted work. This source file is not encumbered
11 * by AutoOpts licensing, but is provided under the licensing terms chosen
12 * by the ntpq author or copyright holder. AutoOpts is
13 * licensed under the terms of the LGPL. The redistributable library
14 * (``libopts'') is licensed under the terms of either the LGPL or, at the
15 * users discretion, the BSD license. See the AutoOpts and/or libopts sources
16 * for details.
20 * This source file is copyrighted and licensed under the following terms:
17 *
21 *
18 * The ntpq program is copyrighted and licensed
19 * under the following terms:
22 * ntpq copyright 1970-2008 David L. Mills and/or others - all rights reserved
20 *
23 *
21 * Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.
22 * This is free software. It is licensed for use, modification and
23 * redistribution under the terms of the NTP License, copies of which
24 * can be seen at:
25 * <http://ntp.org/license>
26 * <http://opensource.org/licenses/ntp-license.php>
27 *
28 * Permission to use, copy, modify, and distribute this software and its
29 * documentation for any purpose with or without fee is hereby granted,
30 * provided that the above copyright notice appears in all copies and that
31 * both the copyright notice and this permission notice appear in
32 * supporting documentation, and that the name The University of Delaware not be used in
33 * advertising or publicity pertaining to distribution of the software
34 * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
35 * representations about the suitability this software for any purpose. It
36 * is provided "as is" without express or implied warranty.
24 * see html/copyright.html
37 */
38
25 */
26
39#ifndef __doxygen__
40#define OPTION_CODE_COMPILE 1
41#include "ntpq-opts.h"
42#include <sys/types.h>
43
44#include <limits.h>
27
28#include <limits.h>
45#include <stdio.h>
46#include <stdlib.h>
47
29
30#define OPTION_CODE_COMPILE 1
31#include "ntpq-opts.h"
32
48#ifdef __cplusplus
49extern "C" {
50#endif
33#ifdef __cplusplus
34extern "C" {
35#endif
51extern FILE * option_usage_fp;
52#define zCopyright (ntpq_opt_strs+0)
53#define zLicenseDescrip (ntpq_opt_strs+340)
36tSCC zCopyright[] =
37 "ntpq copyright (c) 1970-2008 David L. Mills and/or others, all rights reserved";
38tSCC zCopyrightNotice[] =
39
40/* extracted from ../include/copyright.def near line 8 */
41"see html/copyright.html";
42extern tUsageProc optionUsage;
54
55/*
56 * global included definitions
57 */
58#ifdef __windows
59 extern int atoi(const char*);
60#else
61# include <stdlib.h>
62#endif
63
64#ifndef NULL
65# define NULL 0
66#endif
43
44/*
45 * global included definitions
46 */
47#ifdef __windows
48 extern int atoi(const char*);
49#else
50# include <stdlib.h>
51#endif
52
53#ifndef NULL
54# define NULL 0
55#endif
56#ifndef EXIT_SUCCESS
57# define EXIT_SUCCESS 0
58#endif
59#ifndef EXIT_FAILURE
60# define EXIT_FAILURE 1
61#endif
62/*
63 * Ipv4 option description:
64 */
65tSCC zIpv4Text[] =
66 "Force IPv4 DNS name resolution";
67tSCC zIpv4_NAME[] = "IPV4";
68tSCC zIpv4_Name[] = "ipv4";
69#define IPV4_FLAGS (OPTST_DISABLED)
67
70
68/**
69 * static const strings for ntpq options
71/*
72 * Ipv6 option description:
70 */
73 */
71static char const ntpq_opt_strs[1982] =
72/* 0 */ "ntpq 4.2.8p8\n"
73 "Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n"
74 "This is free software. It is licensed for use, modification and\n"
75 "redistribution under the terms of the NTP License, copies of which\n"
76 "can be seen at:\n"
77 " <http://ntp.org/license>\n"
78 " <http://opensource.org/licenses/ntp-license.php>\n\0"
79/* 340 */ "Permission to use, copy, modify, and distribute this software and its\n"
80 "documentation for any purpose with or without fee is hereby granted,\n"
81 "provided that the above copyright notice appears in all copies and that\n"
82 "both the copyright notice and this permission notice appear in supporting\n"
83 "documentation, and that the name The University of Delaware not be used in\n"
84 "advertising or publicity pertaining to distribution of the software without\n"
85 "specific, written prior permission. The University of Delaware and Network\n"
86 "Time Foundation makes no representations about the suitability this\n"
87 "software for any purpose. It is provided \"as is\" without express or\n"
88 "implied warranty.\n\0"
89/* 1008 */ "Force IPv4 DNS name resolution\0"
90/* 1039 */ "IPV4\0"
91/* 1044 */ "ipv4\0"
92/* 1049 */ "Force IPv6 DNS name resolution\0"
93/* 1080 */ "IPV6\0"
94/* 1085 */ "ipv6\0"
95/* 1090 */ "run a command and exit\0"
96/* 1113 */ "COMMAND\0"
97/* 1121 */ "command\0"
98/* 1129 */ "Increase debug verbosity level\0"
99/* 1160 */ "DEBUG_LEVEL\0"
100/* 1172 */ "debug-level\0"
101/* 1184 */ "Set the debug verbosity level\0"
102/* 1214 */ "SET_DEBUG_LEVEL\0"
103/* 1230 */ "set-debug-level\0"
104/* 1246 */ "Force ntpq to operate in interactive mode\0"
105/* 1288 */ "INTERACTIVE\0"
106/* 1300 */ "interactive\0"
107/* 1312 */ "numeric host addresses\0"
108/* 1335 */ "NUMERIC\0"
109/* 1343 */ "numeric\0"
110/* 1351 */ "Always output status line with readvar\0"
111/* 1390 */ "OLD_RV\0"
112/* 1397 */ "old-rv\0"
113/* 1404 */ "Print a list of the peers\0"
114/* 1430 */ "PEERS\0"
115/* 1436 */ "peers\0"
116/* 1442 */ "Set default display type for S2+ refids\0"
117/* 1482 */ "REFID\0"
118/* 1488 */ "refid\0"
119/* 1494 */ "Display the full 'remote' value\0"
120/* 1526 */ "WIDE\0"
121/* 1531 */ "wide\0"
122/* 1536 */ "display extended usage information and exit\0"
123/* 1580 */ "help\0"
124/* 1585 */ "extended usage information passed thru pager\0"
125/* 1630 */ "more-help\0"
126/* 1640 */ "output version information and exit\0"
127/* 1676 */ "version\0"
128/* 1684 */ "save the option state to a config file\0"
129/* 1723 */ "save-opts\0"
130/* 1733 */ "load options from a config file\0"
131/* 1765 */ "LOAD_OPTS\0"
132/* 1775 */ "no-load-opts\0"
133/* 1788 */ "no\0"
134/* 1791 */ "NTPQ\0"
135/* 1796 */ "ntpq - standard NTP query program - Ver. 4.2.8p8\n"
136 "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
137/* 1915 */ "$HOME\0"
138/* 1921 */ ".\0"
139/* 1923 */ ".ntprc\0"
140/* 1930 */ "http://bugs.ntp.org, bugs@ntp.org\0"
141/* 1964 */ "ntpq 4.2.8p8\0"
142/* 1977 */ "hash";
74tSCC zIpv6Text[] =
75 "Force IPv6 DNS name resolution";
76tSCC zIpv6_NAME[] = "IPV6";
77tSCC zIpv6_Name[] = "ipv6";
78#define IPV6_FLAGS (OPTST_DISABLED)
143
79
144/**
145 * ipv4 option description with
146 * "Must also have options" and "Incompatible options":
80/*
81 * Command option description:
147 */
82 */
148/** Descriptive text for the ipv4 option */
149#define IPV4_DESC (ntpq_opt_strs+1008)
150/** Upper-cased name for the ipv4 option */
151#define IPV4_NAME (ntpq_opt_strs+1039)
152/** Name string for the ipv4 option */
153#define IPV4_name (ntpq_opt_strs+1044)
154/** Other options that appear in conjunction with the ipv4 option */
155static int const aIpv4CantList[] = {
156 INDEX_OPT_IPV6, NO_EQUIVALENT };
157/** Compiled in flag settings for the ipv4 option */
158#define IPV4_FLAGS (OPTST_DISABLED)
83tSCC zCommandText[] =
84 "run a command and exit";
85tSCC zCommand_NAME[] = "COMMAND";
86tSCC zCommand_Name[] = "command";
87#define COMMAND_FLAGS (OPTST_DISABLED | OPTST_STACKED \
88 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
159
89
160/**
161 * ipv6 option description with
162 * "Must also have options" and "Incompatible options":
90/*
91 * Debug_Level option description:
163 */
92 */
164/** Descriptive text for the ipv6 option */
165#define IPV6_DESC (ntpq_opt_strs+1049)
166/** Upper-cased name for the ipv6 option */
167#define IPV6_NAME (ntpq_opt_strs+1080)
168/** Name string for the ipv6 option */
169#define IPV6_name (ntpq_opt_strs+1085)
170/** Other options that appear in conjunction with the ipv6 option */
171static int const aIpv6CantList[] = {
172 INDEX_OPT_IPV4, NO_EQUIVALENT };
173/** Compiled in flag settings for the ipv6 option */
174#define IPV6_FLAGS (OPTST_DISABLED)
93#ifdef DEBUG
94tSCC zDebug_LevelText[] =
95 "Increase output debug message level";
96tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
97tSCC zDebug_Level_Name[] = "debug-level";
98#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
175
99
176/**
177 * command option description:
100#else /* disable Debug_Level */
101#define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
102#define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
103#define zDebug_LevelText NULL
104#define zDebug_Level_NAME NULL
105#define zDebug_Level_Name NULL
106#endif /* DEBUG */
107
108/*
109 * Set_Debug_Level option description:
178 */
110 */
179/** Descriptive text for the command option */
180#define COMMAND_DESC (ntpq_opt_strs+1090)
181/** Upper-cased name for the command option */
182#define COMMAND_NAME (ntpq_opt_strs+1113)
183/** Name string for the command option */
184#define COMMAND_name (ntpq_opt_strs+1121)
185/** Compiled in flag settings for the command option */
186#define COMMAND_FLAGS (OPTST_DISABLED \
111#ifdef DEBUG
112tSCC zSet_Debug_LevelText[] =
113 "Set the output debug message level";
114tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
115tSCC zSet_Debug_Level_Name[] = "set-debug-level";
116#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
187 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
188
117 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
118
189/**
190 * debug-level option description:
191 */
192/** Descriptive text for the debug-level option */
193#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1129)
194/** Upper-cased name for the debug-level option */
195#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1160)
196/** Name string for the debug-level option */
197#define DEBUG_LEVEL_name (ntpq_opt_strs+1172)
198/** Compiled in flag settings for the debug-level option */
199#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
119#else /* disable Set_Debug_Level */
120#define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
121#define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
122#define zSet_Debug_LevelText NULL
123#define zSet_Debug_Level_NAME NULL
124#define zSet_Debug_Level_Name NULL
125#endif /* DEBUG */
200
126
201/**
202 * set-debug-level option description:
127/*
128 * Peers option description with
129 * "Must also have options" and "Incompatible options":
203 */
130 */
204/** Descriptive text for the set-debug-level option */
205#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1184)
206/** Upper-cased name for the set-debug-level option */
207#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1214)
208/** Name string for the set-debug-level option */
209#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1230)
210/** Compiled in flag settings for the set-debug-level option */
211#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
212 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
131tSCC zPeersText[] =
132 "Print a list of the peers";
133tSCC zPeers_NAME[] = "PEERS";
134tSCC zPeers_Name[] = "peers";
135static const int
136 aPeersCantList[] = {
137 INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
138#define PEERS_FLAGS (OPTST_DISABLED)
213
139
214/**
215 * interactive option description with
140/*
141 * Interactive option description with
216 * "Must also have options" and "Incompatible options":
217 */
142 * "Must also have options" and "Incompatible options":
143 */
218/** Descriptive text for the interactive option */
219#define INTERACTIVE_DESC (ntpq_opt_strs+1246)
220/** Upper-cased name for the interactive option */
221#define INTERACTIVE_NAME (ntpq_opt_strs+1288)
222/** Name string for the interactive option */
223#define INTERACTIVE_name (ntpq_opt_strs+1300)
224/** Other options that appear in conjunction with the interactive option */
225static int const aInteractiveCantList[] = {
144tSCC zInteractiveText[] =
145 "Force ntpq to operate in interactive mode";
146tSCC zInteractive_NAME[] = "INTERACTIVE";
147tSCC zInteractive_Name[] = "interactive";
148static const int
149 aInteractiveCantList[] = {
226 INDEX_OPT_COMMAND,
227 INDEX_OPT_PEERS, NO_EQUIVALENT };
150 INDEX_OPT_COMMAND,
151 INDEX_OPT_PEERS, NO_EQUIVALENT };
228/** Compiled in flag settings for the interactive option */
229#define INTERACTIVE_FLAGS (OPTST_DISABLED)
152#define INTERACTIVE_FLAGS (OPTST_DISABLED)
230
153
231/**
232 * numeric option description:
154/*
155 * Numeric option description:
233 */
156 */
234/** Descriptive text for the numeric option */
235#define NUMERIC_DESC (ntpq_opt_strs+1312)
236/** Upper-cased name for the numeric option */
237#define NUMERIC_NAME (ntpq_opt_strs+1335)
238/** Name string for the numeric option */
239#define NUMERIC_name (ntpq_opt_strs+1343)
240/** Compiled in flag settings for the numeric option */
241#define NUMERIC_FLAGS (OPTST_DISABLED)
157tSCC zNumericText[] =
158 "numeric host addresses";
159tSCC zNumeric_NAME[] = "NUMERIC";
160tSCC zNumeric_Name[] = "numeric";
161#define NUMERIC_FLAGS (OPTST_DISABLED)
242
162
243/**
244 * old-rv option description:
163/*
164 * Help/More_Help/Version option descriptions:
245 */
165 */
246/** Descriptive text for the old-rv option */
247#define OLD_RV_DESC (ntpq_opt_strs+1351)
248/** Upper-cased name for the old-rv option */
249#define OLD_RV_NAME (ntpq_opt_strs+1390)
250/** Name string for the old-rv option */
251#define OLD_RV_name (ntpq_opt_strs+1397)
252/** Compiled in flag settings for the old-rv option */
253#define OLD_RV_FLAGS (OPTST_DISABLED)
166tSCC zHelpText[] = "Display usage information and exit";
167tSCC zHelp_Name[] = "help";
254
168
255/**
256 * peers option description with
257 * "Must also have options" and "Incompatible options":
169tSCC zMore_HelpText[] = "Extended usage information passed thru pager";
170tSCC zMore_Help_Name[] = "more-help";
171
172tSCC zVersionText[] = "Output version information and exit";
173tSCC zVersion_Name[] = "version";
174
175/*
176 * Save/Load_Opts option description:
258 */
177 */
259/** Descriptive text for the peers option */
260#define PEERS_DESC (ntpq_opt_strs+1404)
261/** Upper-cased name for the peers option */
262#define PEERS_NAME (ntpq_opt_strs+1430)
263/** Name string for the peers option */
264#define PEERS_name (ntpq_opt_strs+1436)
265/** Other options that appear in conjunction with the peers option */
266static int const aPeersCantList[] = {
267 INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
268/** Compiled in flag settings for the peers option */
269#define PEERS_FLAGS (OPTST_DISABLED)
178tSCC zSave_OptsText[] = "Save the option state to a config file";
179tSCC zSave_Opts_Name[] = "save-opts";
270
180
271/**
272 * refid option description:
181tSCC zLoad_OptsText[] = "Load options from a config file";
182tSCC zLoad_Opts_NAME[] = "LOAD_OPTS";
183
184tSCC zNotLoad_Opts_Name[] = "no-load-opts";
185tSCC zNotLoad_Opts_Pfx[] = "no";
186#define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
187/*
188 * Declare option callback procedures
273 */
189 */
274/** Descriptive text for the refid option */
275#define REFID_DESC (ntpq_opt_strs+1442)
276/** Upper-cased name for the refid option */
277#define REFID_NAME (ntpq_opt_strs+1482)
278/** Name string for the refid option */
279#define REFID_name (ntpq_opt_strs+1488)
280/** The compiled in default value for the refid option argument */
281#define REFID_DFT_ARG ((char const*)REFID_IPV4)
282/** Compiled in flag settings for the refid option */
283#define REFID_FLAGS (OPTST_DISABLED \
284 | OPTST_SET_ARGTYPE(OPARG_TYPE_ENUMERATION))
190#ifdef DEBUG
191 static tOptProc doOptSet_Debug_Level;
192#else /* not DEBUG */
193# define doOptSet_Debug_Level NULL
194#endif /* def/not DEBUG */
195#if defined(TEST_NTPQ_OPTS)
196/*
197 * Under test, omit argument processing, or call optionStackArg,
198 * if multiple copies are allowed.
199 */
200extern tOptProc
201 optionPagedUsage, optionStackArg, optionVersionStderr;
202static tOptProc
203 doUsageOpt;
285
204
286/**
287 * wide option description:
205/*
206 * #define map the "normal" callout procs to the test ones...
288 */
207 */
289/** Descriptive text for the wide option */
290#define WIDE_DESC (ntpq_opt_strs+1494)
291/** Upper-cased name for the wide option */
292#define WIDE_NAME (ntpq_opt_strs+1526)
293/** Name string for the wide option */
294#define WIDE_name (ntpq_opt_strs+1531)
295/** Compiled in flag settings for the wide option */
296#define WIDE_FLAGS (OPTST_DISABLED)
208#define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
297
209
210
211#else /* NOT defined TEST_NTPQ_OPTS */
298/*
212/*
299 * Help/More_Help/Version option descriptions:
213 * When not under test, there are different procs to use
300 */
214 */
301#define HELP_DESC (ntpq_opt_strs+1536)
302#define HELP_name (ntpq_opt_strs+1580)
303#ifdef HAVE_WORKING_FORK
304#define MORE_HELP_DESC (ntpq_opt_strs+1585)
305#define MORE_HELP_name (ntpq_opt_strs+1630)
306#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
307#else
308#define MORE_HELP_DESC HELP_DESC
309#define MORE_HELP_name HELP_name
310#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
311#endif
312#ifdef NO_OPTIONAL_OPT_ARGS
313# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
314#else
315# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
316 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
317#endif
318#define VER_DESC (ntpq_opt_strs+1640)
319#define VER_name (ntpq_opt_strs+1676)
320#define SAVE_OPTS_DESC (ntpq_opt_strs+1684)
321#define SAVE_OPTS_name (ntpq_opt_strs+1723)
322#define LOAD_OPTS_DESC (ntpq_opt_strs+1733)
323#define LOAD_OPTS_NAME (ntpq_opt_strs+1765)
324#define NO_LOAD_OPTS_name (ntpq_opt_strs+1775)
325#define LOAD_OPTS_pfx (ntpq_opt_strs+1788)
326#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
327/**
328 * Declare option callback procedures
329 */
330extern tOptProc
215extern tOptProc
331 ntpOptionPrintVersion, ntpq_custom_opt_handler, optionBooleanVal,
332 optionNestedVal, optionNumericVal, optionPagedUsage,
333 optionResetOpt, optionStackArg, optionTimeDate,
334 optionTimeVal, optionUnstackArg, optionVendorOption;
216 optionPagedUsage, optionPrintVersion, optionStackArg;
335static tOptProc
217static tOptProc
336 doOptDebug_Level, doOptRefid, doUsageOpt;
337#define VER_PROC ntpOptionPrintVersion
218 doUsageOpt;
338
219
339/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
340/**
341 * Define the ntpq Option Descriptions.
342 * This is an array of OPTION_CT entries, one for each
343 * option that the ntpq program responds to.
220/*
221 * #define map the "normal" callout procs
344 */
222 */
345static tOptDesc optDesc[OPTION_CT] = {
223#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
224
225#define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
226#endif /* defined(TEST_NTPQ_OPTS) */
227#ifdef TEST_NTPQ_OPTS
228# define DOVERPROC optionVersionStderr
229#else
230# define DOVERPROC optionPrintVersion
231#endif /* TEST_NTPQ_OPTS */
232
233/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
234 *
235 * Define the Ntpq Option Descriptions.
236 */
237static tOptDesc optDesc[ OPTION_CT ] = {
346 { /* entry idx, value */ 0, VALUE_OPT_IPV4,
238 { /* entry idx, value */ 0, VALUE_OPT_IPV4,
347 /* equiv idx, value */ 0, VALUE_OPT_IPV4,
239 /* equiv idx, value */ NO_EQUIVALENT, 0,
348 /* equivalenced to */ NO_EQUIVALENT,
349 /* min, max, act ct */ 0, 1, 0,
350 /* opt state flags */ IPV4_FLAGS, 0,
240 /* equivalenced to */ NO_EQUIVALENT,
241 /* min, max, act ct */ 0, 1, 0,
242 /* opt state flags */ IPV4_FLAGS, 0,
351 /* last opt argumnt */ { NULL }, /* --ipv4 */
243 /* last opt argumnt */ { NULL },
352 /* arg list/cookie */ NULL,
244 /* arg list/cookie */ NULL,
353 /* must/cannot opts */ NULL, aIpv4CantList,
245 /* must/cannot opts */ NULL, NULL,
354 /* option proc */ NULL,
246 /* option proc */ NULL,
355 /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
247 /* desc, NAME, name */ zIpv4Text, zIpv4_NAME, zIpv4_Name,
356 /* disablement strs */ NULL, NULL },
357
358 { /* entry idx, value */ 1, VALUE_OPT_IPV6,
248 /* disablement strs */ NULL, NULL },
249
250 { /* entry idx, value */ 1, VALUE_OPT_IPV6,
359 /* equiv idx, value */ 1, VALUE_OPT_IPV6,
360 /* equivalenced to */ NO_EQUIVALENT,
251 /* equiv idx, value */ NOLIMIT, NOLIMIT,
252 /* equivalenced to */ INDEX_OPT_IPV4,
361 /* min, max, act ct */ 0, 1, 0,
362 /* opt state flags */ IPV6_FLAGS, 0,
253 /* min, max, act ct */ 0, 1, 0,
254 /* opt state flags */ IPV6_FLAGS, 0,
363 /* last opt argumnt */ { NULL }, /* --ipv6 */
255 /* last opt argumnt */ { NULL },
364 /* arg list/cookie */ NULL,
256 /* arg list/cookie */ NULL,
365 /* must/cannot opts */ NULL, aIpv6CantList,
257 /* must/cannot opts */ NULL, NULL,
366 /* option proc */ NULL,
258 /* option proc */ NULL,
367 /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
259 /* desc, NAME, name */ zIpv6Text, zIpv6_NAME, zIpv6_Name,
368 /* disablement strs */ NULL, NULL },
369
370 { /* entry idx, value */ 2, VALUE_OPT_COMMAND,
371 /* equiv idx, value */ 2, VALUE_OPT_COMMAND,
372 /* equivalenced to */ NO_EQUIVALENT,
373 /* min, max, act ct */ 0, NOLIMIT, 0,
374 /* opt state flags */ COMMAND_FLAGS, 0,
260 /* disablement strs */ NULL, NULL },
261
262 { /* entry idx, value */ 2, VALUE_OPT_COMMAND,
263 /* equiv idx, value */ 2, VALUE_OPT_COMMAND,
264 /* equivalenced to */ NO_EQUIVALENT,
265 /* min, max, act ct */ 0, NOLIMIT, 0,
266 /* opt state flags */ COMMAND_FLAGS, 0,
375 /* last opt argumnt */ { NULL }, /* --command */
267 /* last opt argumnt */ { NULL },
376 /* arg list/cookie */ NULL,
377 /* must/cannot opts */ NULL, NULL,
268 /* arg list/cookie */ NULL,
269 /* must/cannot opts */ NULL, NULL,
378 /* option proc */ ntpq_custom_opt_handler,
379 /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name,
270 /* option proc */ optionStackArg,
271 /* desc, NAME, name */ zCommandText, zCommand_NAME, zCommand_Name,
380 /* disablement strs */ NULL, NULL },
381
382 { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
383 /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
384 /* equivalenced to */ NO_EQUIVALENT,
385 /* min, max, act ct */ 0, NOLIMIT, 0,
386 /* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
272 /* disablement strs */ NULL, NULL },
273
274 { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
275 /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
276 /* equivalenced to */ NO_EQUIVALENT,
277 /* min, max, act ct */ 0, NOLIMIT, 0,
278 /* opt state flags */ DEBUG_LEVEL_FLAGS, 0,
387 /* last opt argumnt */ { NULL }, /* --debug-level */
279 /* last opt argumnt */ { NULL },
388 /* arg list/cookie */ NULL,
389 /* must/cannot opts */ NULL, NULL,
280 /* arg list/cookie */ NULL,
281 /* must/cannot opts */ NULL, NULL,
390 /* option proc */ doOptDebug_Level,
391 /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
282 /* option proc */ NULL,
283 /* desc, NAME, name */ zDebug_LevelText, zDebug_Level_NAME, zDebug_Level_Name,
392 /* disablement strs */ NULL, NULL },
393
394 { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
395 /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
396 /* equivalenced to */ NO_EQUIVALENT,
397 /* min, max, act ct */ 0, NOLIMIT, 0,
398 /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
284 /* disablement strs */ NULL, NULL },
285
286 { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
287 /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
288 /* equivalenced to */ NO_EQUIVALENT,
289 /* min, max, act ct */ 0, NOLIMIT, 0,
290 /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0,
399 /* last opt argumnt */ { NULL }, /* --set-debug-level */
291 /* last opt argumnt */ { NULL },
400 /* arg list/cookie */ NULL,
401 /* must/cannot opts */ NULL, NULL,
292 /* arg list/cookie */ NULL,
293 /* must/cannot opts */ NULL, NULL,
402 /* option proc */ optionNumericVal,
403 /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
294 /* option proc */ SET_DEBUG_LEVEL_OPT_PROC,
295 /* desc, NAME, name */ zSet_Debug_LevelText, zSet_Debug_Level_NAME, zSet_Debug_Level_Name,
404 /* disablement strs */ NULL, NULL },
405
296 /* disablement strs */ NULL, NULL },
297
406 { /* entry idx, value */ 5, VALUE_OPT_INTERACTIVE,
407 /* equiv idx, value */ 5, VALUE_OPT_INTERACTIVE,
298 { /* entry idx, value */ 5, VALUE_OPT_PEERS,
299 /* equiv idx, value */ 5, VALUE_OPT_PEERS,
408 /* equivalenced to */ NO_EQUIVALENT,
409 /* min, max, act ct */ 0, 1, 0,
300 /* equivalenced to */ NO_EQUIVALENT,
301 /* min, max, act ct */ 0, 1, 0,
410 /* opt state flags */ INTERACTIVE_FLAGS, 0,
411 /* last opt argumnt */ { NULL }, /* --interactive */
302 /* opt state flags */ PEERS_FLAGS, 0,
303 /* last opt argumnt */ { NULL },
412 /* arg list/cookie */ NULL,
304 /* arg list/cookie */ NULL,
413 /* must/cannot opts */ NULL, aInteractiveCantList,
305 /* must/cannot opts */ NULL, aPeersCantList,
414 /* option proc */ NULL,
306 /* option proc */ NULL,
415 /* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name,
307 /* desc, NAME, name */ zPeersText, zPeers_NAME, zPeers_Name,
416 /* disablement strs */ NULL, NULL },
417
308 /* disablement strs */ NULL, NULL },
309
418 { /* entry idx, value */ 6, VALUE_OPT_NUMERIC,
419 /* equiv idx, value */ 6, VALUE_OPT_NUMERIC,
310 { /* entry idx, value */ 6, VALUE_OPT_INTERACTIVE,
311 /* equiv idx, value */ 6, VALUE_OPT_INTERACTIVE,
420 /* equivalenced to */ NO_EQUIVALENT,
421 /* min, max, act ct */ 0, 1, 0,
312 /* equivalenced to */ NO_EQUIVALENT,
313 /* min, max, act ct */ 0, 1, 0,
422 /* opt state flags */ NUMERIC_FLAGS, 0,
423 /* last opt argumnt */ { NULL }, /* --numeric */
314 /* opt state flags */ INTERACTIVE_FLAGS, 0,
315 /* last opt argumnt */ { NULL },
424 /* arg list/cookie */ NULL,
316 /* arg list/cookie */ NULL,
425 /* must/cannot opts */ NULL, NULL,
317 /* must/cannot opts */ NULL, aInteractiveCantList,
426 /* option proc */ NULL,
318 /* option proc */ NULL,
427 /* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name,
319 /* desc, NAME, name */ zInteractiveText, zInteractive_NAME, zInteractive_Name,
428 /* disablement strs */ NULL, NULL },
429
320 /* disablement strs */ NULL, NULL },
321
430 { /* entry idx, value */ 7, VALUE_OPT_OLD_RV,
431 /* equiv idx, value */ 7, VALUE_OPT_OLD_RV,
322 { /* entry idx, value */ 7, VALUE_OPT_NUMERIC,
323 /* equiv idx, value */ 7, VALUE_OPT_NUMERIC,
432 /* equivalenced to */ NO_EQUIVALENT,
433 /* min, max, act ct */ 0, 1, 0,
324 /* equivalenced to */ NO_EQUIVALENT,
325 /* min, max, act ct */ 0, 1, 0,
434 /* opt state flags */ OLD_RV_FLAGS, 0,
435 /* last opt argumnt */ { NULL }, /* --old-rv */
326 /* opt state flags */ NUMERIC_FLAGS, 0,
327 /* last opt argumnt */ { NULL },
436 /* arg list/cookie */ NULL,
437 /* must/cannot opts */ NULL, NULL,
438 /* option proc */ NULL,
328 /* arg list/cookie */ NULL,
329 /* must/cannot opts */ NULL, NULL,
330 /* option proc */ NULL,
439 /* desc, NAME, name */ OLD_RV_DESC, OLD_RV_NAME, OLD_RV_name,
331 /* desc, NAME, name */ zNumericText, zNumeric_NAME, zNumeric_Name,
440 /* disablement strs */ NULL, NULL },
441
332 /* disablement strs */ NULL, NULL },
333
442 { /* entry idx, value */ 8, VALUE_OPT_PEERS,
443 /* equiv idx, value */ 8, VALUE_OPT_PEERS,
444 /* equivalenced to */ NO_EQUIVALENT,
445 /* min, max, act ct */ 0, 1, 0,
446 /* opt state flags */ PEERS_FLAGS, 0,
447 /* last opt argumnt */ { NULL }, /* --peers */
448 /* arg list/cookie */ NULL,
449 /* must/cannot opts */ NULL, aPeersCantList,
450 /* option proc */ ntpq_custom_opt_handler,
451 /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
452 /* disablement strs */ NULL, NULL },
334#ifdef NO_OPTIONAL_OPT_ARGS
335# define VERSION_OPT_FLAGS OPTST_IMM | OPTST_NO_INIT
336#else
337# define VERSION_OPT_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
338 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
339#endif
453
340
454 { /* entry idx, value */ 9, VALUE_OPT_REFID,
455 /* equiv idx, value */ 9, VALUE_OPT_REFID,
456 /* equivalenced to */ NO_EQUIVALENT,
457 /* min, max, act ct */ 0, 1, 0,
458 /* opt state flags */ REFID_FLAGS, 0,
459 /* last opt argumnt */ { REFID_DFT_ARG },
460 /* arg list/cookie */ NULL,
461 /* must/cannot opts */ NULL, NULL,
462 /* option proc */ doOptRefid,
463 /* desc, NAME, name */ REFID_DESC, REFID_NAME, REFID_name,
464 /* disablement strs */ NULL, NULL },
465
466 { /* entry idx, value */ 10, VALUE_OPT_WIDE,
467 /* equiv idx, value */ 10, VALUE_OPT_WIDE,
468 /* equivalenced to */ NO_EQUIVALENT,
469 /* min, max, act ct */ 0, 1, 0,
470 /* opt state flags */ WIDE_FLAGS, 0,
471 /* last opt argumnt */ { NULL }, /* --wide */
472 /* arg list/cookie */ NULL,
473 /* must/cannot opts */ NULL, NULL,
474 /* option proc */ NULL,
475 /* desc, NAME, name */ WIDE_DESC, WIDE_NAME, WIDE_name,
476 /* disablement strs */ NULL, NULL },
477
478 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
341 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
479 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION,
342 /* equiv idx value */ NO_EQUIVALENT, 0,
480 /* equivalenced to */ NO_EQUIVALENT,
481 /* min, max, act ct */ 0, 1, 0,
343 /* equivalenced to */ NO_EQUIVALENT,
344 /* min, max, act ct */ 0, 1, 0,
482 /* opt state flags */ VER_FLAGS, AOUSE_VERSION,
345 /* opt state flags */ VERSION_OPT_FLAGS, 0,
483 /* last opt argumnt */ { NULL },
484 /* arg list/cookie */ NULL,
485 /* must/cannot opts */ NULL, NULL,
346 /* last opt argumnt */ { NULL },
347 /* arg list/cookie */ NULL,
348 /* must/cannot opts */ NULL, NULL,
486 /* option proc */ VER_PROC,
487 /* desc, NAME, name */ VER_DESC, NULL, VER_name,
349 /* option proc */ DOVERPROC,
350 /* desc, NAME, name */ zVersionText, NULL, zVersion_Name,
488 /* disablement strs */ NULL, NULL },
489
351 /* disablement strs */ NULL, NULL },
352
353#undef VERSION_OPT_FLAGS
490
491
492 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
354
355
356 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
493 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP,
357 /* equiv idx value */ NO_EQUIVALENT, 0,
494 /* equivalenced to */ NO_EQUIVALENT,
495 /* min, max, act ct */ 0, 1, 0,
358 /* equivalenced to */ NO_EQUIVALENT,
359 /* min, max, act ct */ 0, 1, 0,
496 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
360 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
497 /* last opt argumnt */ { NULL },
498 /* arg list/cookie */ NULL,
499 /* must/cannot opts */ NULL, NULL,
500 /* option proc */ doUsageOpt,
361 /* last opt argumnt */ { NULL },
362 /* arg list/cookie */ NULL,
363 /* must/cannot opts */ NULL, NULL,
364 /* option proc */ doUsageOpt,
501 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
365 /* desc, NAME, name */ zHelpText, NULL, zHelp_Name,
502 /* disablement strs */ NULL, NULL },
503
504 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
366 /* disablement strs */ NULL, NULL },
367
368 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
505 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
369 /* equiv idx value */ NO_EQUIVALENT, 0,
506 /* equivalenced to */ NO_EQUIVALENT,
507 /* min, max, act ct */ 0, 1, 0,
370 /* equivalenced to */ NO_EQUIVALENT,
371 /* min, max, act ct */ 0, 1, 0,
508 /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
372 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, 0,
509 /* last opt argumnt */ { NULL },
510 /* arg list/cookie */ NULL,
511 /* must/cannot opts */ NULL, NULL,
512 /* option proc */ optionPagedUsage,
373 /* last opt argumnt */ { NULL },
374 /* arg list/cookie */ NULL,
375 /* must/cannot opts */ NULL, NULL,
376 /* option proc */ optionPagedUsage,
513 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
377 /* desc, NAME, name */ zMore_HelpText, NULL, zMore_Help_Name,
514 /* disablement strs */ NULL, NULL },
515
516 { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
378 /* disablement strs */ NULL, NULL },
379
380 { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
517 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
381 /* equiv idx value */ NO_EQUIVALENT, 0,
518 /* equivalenced to */ NO_EQUIVALENT,
519 /* min, max, act ct */ 0, 1, 0,
520 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
382 /* equivalenced to */ NO_EQUIVALENT,
383 /* min, max, act ct */ 0, 1, 0,
384 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
521 | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
385 | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, 0,
522 /* last opt argumnt */ { NULL },
523 /* arg list/cookie */ NULL,
524 /* must/cannot opts */ NULL, NULL,
525 /* option proc */ NULL,
386 /* last opt argumnt */ { NULL },
387 /* arg list/cookie */ NULL,
388 /* must/cannot opts */ NULL, NULL,
389 /* option proc */ NULL,
526 /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
390 /* desc, NAME, name */ zSave_OptsText, NULL, zSave_Opts_Name,
527 /* disablement strs */ NULL, NULL },
528
529 { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
391 /* disablement strs */ NULL, NULL },
392
393 { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
530 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
394 /* equiv idx value */ NO_EQUIVALENT, 0,
531 /* equivalenced to */ NO_EQUIVALENT,
532 /* min, max, act ct */ 0, NOLIMIT, 0,
395 /* equivalenced to */ NO_EQUIVALENT,
396 /* min, max, act ct */ 0, NOLIMIT, 0,
533 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
534 | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
397 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) \
398 | OPTST_DISABLE_IMM, 0,
535 /* last opt argumnt */ { NULL },
536 /* arg list/cookie */ NULL,
537 /* must/cannot opts */ NULL, NULL,
538 /* option proc */ optionLoadOpt,
399 /* last opt argumnt */ { NULL },
400 /* arg list/cookie */ NULL,
401 /* must/cannot opts */ NULL, NULL,
402 /* option proc */ optionLoadOpt,
539 /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
540 /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
403 /* desc, NAME, name */ zLoad_OptsText, zLoad_Opts_NAME, zLoad_Opts_Name,
404 /* disablement strs */ zNotLoad_Opts_Name, zNotLoad_Opts_Pfx }
541};
542
405};
406
407/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
408 *
409 * Define the Ntpq Option Environment
410 */
411tSCC zPROGNAME[] = "NTPQ";
412tSCC zUsageTitle[] =
413"ntpq - standard NTP query program - Ver. 4.2.4p5\n\
414USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n";
415tSCC zRcName[] = ".ntprc";
416tSCC* apzHomeList[] = {
417 "$HOME",
418 ".",
419 NULL };
543
420
544/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
545/** Reference to the upper cased version of ntpq. */
546#define zPROGNAME (ntpq_opt_strs+1791)
547/** Reference to the title line for ntpq usage. */
548#define zUsageTitle (ntpq_opt_strs+1796)
549/** ntpq configuration file name. */
550#define zRcName (ntpq_opt_strs+1923)
551/** Directories to search for ntpq config files. */
552static char const * const apzHomeList[3] = {
553 ntpq_opt_strs+1915,
554 ntpq_opt_strs+1921,
555 NULL };
556/** The ntpq program bug email address. */
557#define zBugsAddr (ntpq_opt_strs+1930)
558/** Clarification/explanation of what ntpq does. */
559#define zExplain (NULL)
560/** Extra detail explaining what ntpq does. */
561#define zDetail (NULL)
562/** The full version string for ntpq. */
563#define zFullVersion (ntpq_opt_strs+1964)
564/* extracted from optcode.tlib near line 364 */
421tSCC zBugsAddr[] = "http://bugs.ntp.isc.org, bugs@ntp.org";
422#define zExplain NULL
423tSCC zDetail[] = "\n\
424The\n\
425[= prog-name =]\n\
426utility program is used to query NTP servers which\n\
427implement the standard NTP mode 6 control message formats defined\n\
428in Appendix B of the NTPv3 specification RFC1305, requesting\n\
429information about current state and/or changes in that state.\n\
430The same formats are used in NTPv4, although some of the\n\
431variables have changed and new ones added.\n";
432tSCC zFullVersion[] = NTPQ_FULL_VERSION;
433/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 408 */
565
566#if defined(ENABLE_NLS)
567# define OPTPROC_BASE OPTPROC_TRANSLATE
568 static tOptionXlateProc translate_option_strings;
569#else
570# define OPTPROC_BASE OPTPROC_NONE
571# define translate_option_strings NULL
572#endif /* ENABLE_NLS */
573
434
435#if defined(ENABLE_NLS)
436# define OPTPROC_BASE OPTPROC_TRANSLATE
437 static tOptionXlateProc translate_option_strings;
438#else
439# define OPTPROC_BASE OPTPROC_NONE
440# define translate_option_strings NULL
441#endif /* ENABLE_NLS */
442
574#define ntpq_full_usage (NULL)
575#define ntpq_short_usage (NULL)
576
577#endif /* not defined __doxygen__ */
578
579/*
580 * Create the static procedure(s) declared above.
581 */
582/**
583 * The callout function that invokes the optionUsage function.
584 *
585 * @param[in] opts the AutoOpts option description structure
586 * @param[in] od the descriptor for the "help" (usage) option.
587 * @noreturn
588 */
589static void
590doUsageOpt(tOptions * opts, tOptDesc * od)
591{
592 int ex_code;
593 ex_code = NTPQ_EXIT_SUCCESS;
594 optionUsage(&ntpqOptions, ex_code);
595 /* NOTREACHED */
596 exit(1);
597 (void)opts;
598 (void)od;
599}
600
601/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
602/**
603 * Code to handle the debug-level option.
604 *
605 * @param[in] pOptions the ntpq options data structure
606 * @param[in,out] pOptDesc the option descriptor for this option.
607 */
608static void
609doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
610{
611 /*
612 * Be sure the flag-code[0] handles special values for the options pointer
613 * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
614 * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
615 * reset its state.
616 */
617 /* extracted from debug-opt.def, line 15 */
618OPT_VALUE_SET_DEBUG_LEVEL++;
619 (void)pOptDesc;
620 (void)pOptions;
621}
622
623/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
624/**
625 * Code to handle the refid option.
626 * Set the default display format for S2+ refids.
627 * @param[in] pOptions the ntpq options data structure
628 * @param[in,out] pOptDesc the option descriptor for this option.
629 */
630static void
631doOptRefid(tOptions* pOptions, tOptDesc* pOptDesc)
632{
633
634/* extracted from optmain.tlib near line 945 */
635 static char const * const names[2] = {
636 ntpq_opt_strs+1977, ntpq_opt_strs+1044 };
637
638 if (pOptions <= OPTPROC_EMIT_LIMIT) {
639 (void) optionEnumerationVal(pOptions, pOptDesc, names, 2);
640 return; /* protect AutoOpts client code from internal callbacks */
641 }
642
643 pOptDesc->optArg.argEnum =
644 optionEnumerationVal(pOptions, pOptDesc, names, 2);
645}
646/* extracted from optmain.tlib near line 1250 */
647
648/**
649 * The directory containing the data associated with ntpq.
650 */
651#ifndef PKGDATADIR
652# define PKGDATADIR ""
653#endif
654
655/**
656 * Information about the person or institution that packaged ntpq
657 * for the current distribution.
658 */
659#ifndef WITH_PACKAGER
660# define ntpq_packager_info NULL
661#else
662/** Packager information for ntpq. */
663static char const ntpq_packager_info[] =
664 "Packaged by " WITH_PACKAGER
665
666# ifdef WITH_PACKAGER_VERSION
667 " ("WITH_PACKAGER_VERSION")"
668# endif
669
670# ifdef WITH_PACKAGER_BUG_REPORTS
671 "\nReport ntpq bugs to " WITH_PACKAGER_BUG_REPORTS
672# endif
673 "\n";
674#endif
675#ifndef __doxygen__
676
677#endif /* __doxygen__ */
678/**
679 * The option definitions for ntpq. The one structure that
680 * binds them all.
681 */
682tOptions ntpqOptions = {
683 OPTIONS_STRUCT_VERSION,
684 0, NULL, /* original argc + argv */
685 ( OPTPROC_BASE
686 + OPTPROC_ERRSTOP
687 + OPTPROC_SHORTOPT
688 + OPTPROC_LONGOPT
689 + OPTPROC_NO_REQ_OPT
690 + OPTPROC_ENVIRON
443tOptions ntpqOptions = {
444 OPTIONS_STRUCT_VERSION,
445 0, NULL, /* original argc + argv */
446 ( OPTPROC_BASE
447 + OPTPROC_ERRSTOP
448 + OPTPROC_SHORTOPT
449 + OPTPROC_LONGOPT
450 + OPTPROC_NO_REQ_OPT
451 + OPTPROC_ENVIRON
691 + OPTPROC_MISUSE ),
452 + OPTPROC_HAS_IMMED ),
692 0, NULL, /* current option index, current option */
693 NULL, NULL, zPROGNAME,
453 0, NULL, /* current option index, current option */
454 NULL, NULL, zPROGNAME,
694 zRcName, zCopyright, zLicenseDescrip,
455 zRcName, zCopyright, zCopyrightNotice,
695 zFullVersion, apzHomeList, zUsageTitle,
696 zExplain, zDetail, optDesc,
697 zBugsAddr, /* address to send bugs to */
698 NULL, NULL, /* extensions/saved state */
456 zFullVersion, apzHomeList, zUsageTitle,
457 zExplain, zDetail, optDesc,
458 zBugsAddr, /* address to send bugs to */
459 NULL, NULL, /* extensions/saved state */
699 optionUsage, /* usage procedure */
460 optionUsage, /* usage procedure */
700 translate_option_strings, /* translation procedure */
701 /*
702 * Indexes to special options
703 */
461 translate_option_strings, /* translation procedure */
462 /*
463 * Indexes to special options
464 */
704 { INDEX_OPT_MORE_HELP, /* more-help option index */
705 INDEX_OPT_SAVE_OPTS, /* save option index */
706 NO_EQUIVALENT, /* '-#' option index */
465 { INDEX_OPT_MORE_HELP,
466 INDEX_OPT_SAVE_OPTS,
467 NO_EQUIVALENT /* index of '-#' option */,
707 NO_EQUIVALENT /* index of default opt */
708 },
468 NO_EQUIVALENT /* index of default opt */
469 },
709 16 /* full option count */, 11 /* user option count */,
710 ntpq_full_usage, ntpq_short_usage,
711 NULL, NULL,
712 PKGDATADIR, ntpq_packager_info
470 13 /* full option count */, 8 /* user option count */
713};
714
471};
472
715#if ENABLE_NLS
716/**
717 * This code is designed to translate translatable option text for the
718 * ntpq program. These translations happen upon entry
719 * to optionProcess().
473/*
474 * Create the static procedure(s) declared above.
720 */
475 */
476static void
477doUsageOpt(
478 tOptions* pOptions,
479 tOptDesc* pOptDesc )
480{
481 USAGE( EXIT_SUCCESS );
482}
483
484#if ! defined(TEST_NTPQ_OPTS)
485
486/* * * * * * *
487 *
488 * For the set-debug-level option, when DEBUG is #define-d.
489 */
490#ifdef DEBUG
491static void
492doOptSet_Debug_Level(
493 tOptions* pOptions,
494 tOptDesc* pOptDesc )
495{
496 /* extracted from ../include/debug-opt.def, line 29 */
497DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
498}
499#endif /* defined DEBUG */
500
501#endif /* defined(TEST_NTPQ_OPTS) */
502
503/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 92 */
504
505#if defined(TEST_NTPQ_OPTS) /* TEST MAIN PROCEDURE: */
506
507int
508main( int argc, char** argv )
509{
510 int res = EXIT_SUCCESS;
511 (void)optionProcess( &ntpqOptions, argc, argv );
512 {
513 void optionPutShell( tOptions* );
514 optionPutShell( &ntpqOptions );
515 }
516 return res;
517}
518#endif /* defined TEST_NTPQ_OPTS */
519/* extracted from /usr/local/gnu/share/autogen/optcode.tpl near line 514 */
520
521#if ENABLE_NLS
721#include <stdio.h>
722#include <stdlib.h>
723#include <string.h>
724#include <unistd.h>
522#include <stdio.h>
523#include <stdlib.h>
524#include <string.h>
525#include <unistd.h>
725#ifdef HAVE_DCGETTEXT
726# include <gettext.h>
727#endif
728#include <autoopts/usage-txt.h>
729
526#include <autoopts/usage-txt.h>
527
730static char * AO_gettext(char const * pz);
731static void coerce_it(void ** s);
528static char* AO_gettext( char const* pz );
529static void coerce_it(void** s);
732
530
733/**
734 * AutoGen specific wrapper function for gettext. It relies on the macro _()
735 * to convert from English to the target language, then strdup-duplicates the
736 * result string. It tries the "libopts" domain first, then whatever has been
737 * set via the \a textdomain(3) call.
738 *
739 * @param[in] pz the input text used as a lookup key.
740 * @returns the translated text (if there is one),
741 * or the original text (if not).
742 */
743static char *
744AO_gettext(char const * pz)
531static char*
532AO_gettext( char const* pz )
745{
533{
746 char * res;
534 char* pzRes;
747 if (pz == NULL)
748 return NULL;
535 if (pz == NULL)
536 return NULL;
749#ifdef HAVE_DCGETTEXT
750 /*
751 * While processing the option_xlateable_txt data, try to use the
752 * "libopts" domain. Once we switch to the option descriptor data,
753 * do *not* use that domain.
754 */
755 if (option_xlateable_txt.field_ct != 0) {
756 res = dgettext("libopts", pz);
757 if (res == pz)
758 res = (char *)VOIDP(_(pz));
759 } else
760 res = (char *)VOIDP(_(pz));
761#else
762 res = (char *)VOIDP(_(pz));
763#endif
764 if (res == pz)
765 return res;
766 res = strdup(res);
767 if (res == NULL) {
768 fputs(_("No memory for duping translated strings\n"), stderr);
769 exit(NTPQ_EXIT_FAILURE);
537 pzRes = _(pz);
538 if (pzRes == pz)
539 return pzRes;
540 pzRes = strdup( pzRes );
541 if (pzRes == NULL) {
542 fputs( _("No memory for duping translated strings\n"), stderr );
543 exit( EXIT_FAILURE );
770 }
544 }
771 return res;
545 return pzRes;
772}
773
546}
547
774/**
775 * All the pointers we use are marked "* const", but they are stored in
776 * writable memory. Coerce the mutability and set the pointer.
777 */
778static void coerce_it(void ** s) { *s = AO_gettext(*s);
779}
548static void coerce_it(void** s) { *s = AO_gettext(*s); }
549#define COERSION(_f) \
550 coerce_it((void*)&(ntpqOptions._f))
780
551
781/**
782 * Translate all the translatable strings in the ntpqOptions
783 * structure defined above. This is done only once.
552/*
553 * This invokes the translation code (e.g. gettext(3)).
784 */
785static void
554 */
555static void
786translate_option_strings(void)
556translate_option_strings( void )
787{
557{
788 tOptions * const opts = &ntpqOptions;
789
790 /*
791 * Guard against re-translation. It won't work. The strings will have
792 * been changed by the first pass through this code. One shot only.
793 */
558 /*
559 * Guard against re-translation. It won't work. The strings will have
560 * been changed by the first pass through this code. One shot only.
561 */
794 if (option_xlateable_txt.field_ct != 0) {
795 /*
796 * Do the translations. The first pointer follows the field count
797 * field. The field count field is the size of a pointer.
798 */
799 char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
800 int ix = option_xlateable_txt.field_ct;
562 if (option_usage_text.field_ct == 0)
563 return;
564 /*
565 * Do the translations. The first pointer follows the field count field.
566 * The field count field is the size of a pointer.
567 */
568 {
569 char** ppz = (char**)(void*)&(option_usage_text);
570 int ix = option_usage_text.field_ct;
801
802 do {
571
572 do {
803 ppz++; /* skip over field_ct */
573 ppz++;
804 *ppz = AO_gettext(*ppz);
805 } while (--ix > 0);
574 *ppz = AO_gettext(*ppz);
575 } while (--ix > 0);
806 /* prevent re-translation and disable "libopts" domain lookup */
807 option_xlateable_txt.field_ct = 0;
576 }
577 option_usage_text.field_ct = 0;
808
578
809 coerce_it(VOIDP(&(opts->pzCopyright)));
810 coerce_it(VOIDP(&(opts->pzCopyNotice)));
811 coerce_it(VOIDP(&(opts->pzFullVersion)));
812 coerce_it(VOIDP(&(opts->pzUsageTitle)));
813 coerce_it(VOIDP(&(opts->pzExplain)));
814 coerce_it(VOIDP(&(opts->pzDetail)));
815 {
816 tOptDesc * od = opts->pOptDesc;
817 for (ix = opts->optCt; ix > 0; ix--, od++)
818 coerce_it(VOIDP(&(od->pzText)));
579 {
580 tOptDesc* pOD = ntpqOptions.pOptDesc;
581 int ix = ntpqOptions.optCt;
582
583 for (;;) {
584 pOD->pzText = AO_gettext(pOD->pzText);
585 pOD->pz_NAME = AO_gettext(pOD->pz_NAME);
586 pOD->pz_Name = AO_gettext(pOD->pz_Name);
587 pOD->pz_DisableName = AO_gettext(pOD->pz_DisableName);
588 pOD->pz_DisablePfx = AO_gettext(pOD->pz_DisablePfx);
589 if (--ix <= 0)
590 break;
591 pOD++;
819 }
820 }
592 }
593 }
594 COERSION(pzCopyright);
595 COERSION(pzCopyNotice);
596 COERSION(pzFullVersion);
597 COERSION(pzUsageTitle);
598 COERSION(pzExplain);
599 COERSION(pzDetail);
821}
600}
601
822#endif /* ENABLE_NLS */
823
602#endif /* ENABLE_NLS */
603
824#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
825/** I18N function strictly for xgettext. Do not compile. */
826static void bogus_function(void) {
827 /* TRANSLATORS:
828
829 The following dummy function was crated solely so that xgettext can
830 extract the correct strings. These strings are actually referenced
831 by a field name in the ntpqOptions structure noted in the
832 comments below. The literal text is defined in ntpq_opt_strs.
833
834 NOTE: the strings below are segmented with respect to the source string
835 ntpq_opt_strs. The strings above are handed off for translation
836 at run time a paragraph at a time. Consequently, they are presented here
837 for translation a paragraph at a time.
838
839 ALSO: often the description for an option will reference another option
840 by name. These are set off with apostrophe quotes (I hope). Do not
841 translate option names.
842 */
843 /* referenced via ntpqOptions.pzCopyright */
844 puts(_("ntpq 4.2.8p8\n\
845Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n\
846This is free software. It is licensed for use, modification and\n\
847redistribution under the terms of the NTP License, copies of which\n\
848can be seen at:\n"));
849 puts(_(" <http://ntp.org/license>\n\
850 <http://opensource.org/licenses/ntp-license.php>\n"));
851
852 /* referenced via ntpqOptions.pzCopyNotice */
853 puts(_("Permission to use, copy, modify, and distribute this software and its\n\
854documentation for any purpose with or without fee is hereby granted,\n\
855provided that the above copyright notice appears in all copies and that\n\
856both the copyright notice and this permission notice appear in supporting\n\
857documentation, and that the name The University of Delaware not be used in\n\
858advertising or publicity pertaining to distribution of the software without\n\
859specific, written prior permission. The University of Delaware and Network\n\
860Time Foundation makes no representations about the suitability this\n\
861software for any purpose. It is provided \"as is\" without express or\n\
862implied warranty.\n"));
863
864 /* referenced via ntpqOptions.pOptDesc->pzText */
865 puts(_("Force IPv4 DNS name resolution"));
866
867 /* referenced via ntpqOptions.pOptDesc->pzText */
868 puts(_("Force IPv6 DNS name resolution"));
869
870 /* referenced via ntpqOptions.pOptDesc->pzText */
871 puts(_("run a command and exit"));
872
873 /* referenced via ntpqOptions.pOptDesc->pzText */
874 puts(_("Increase debug verbosity level"));
875
876 /* referenced via ntpqOptions.pOptDesc->pzText */
877 puts(_("Set the debug verbosity level"));
878
879 /* referenced via ntpqOptions.pOptDesc->pzText */
880 puts(_("Force ntpq to operate in interactive mode"));
881
882 /* referenced via ntpqOptions.pOptDesc->pzText */
883 puts(_("numeric host addresses"));
884
885 /* referenced via ntpqOptions.pOptDesc->pzText */
886 puts(_("Always output status line with readvar"));
887
888 /* referenced via ntpqOptions.pOptDesc->pzText */
889 puts(_("Print a list of the peers"));
890
891 /* referenced via ntpqOptions.pOptDesc->pzText */
892 puts(_("Set default display type for S2+ refids"));
893
894 /* referenced via ntpqOptions.pOptDesc->pzText */
895 puts(_("Display the full 'remote' value"));
896
897 /* referenced via ntpqOptions.pOptDesc->pzText */
898 puts(_("display extended usage information and exit"));
899
900 /* referenced via ntpqOptions.pOptDesc->pzText */
901 puts(_("extended usage information passed thru pager"));
902
903 /* referenced via ntpqOptions.pOptDesc->pzText */
904 puts(_("output version information and exit"));
905
906 /* referenced via ntpqOptions.pOptDesc->pzText */
907 puts(_("save the option state to a config file"));
908
909 /* referenced via ntpqOptions.pOptDesc->pzText */
910 puts(_("load options from a config file"));
911
912 /* referenced via ntpqOptions.pzUsageTitle */
913 puts(_("ntpq - standard NTP query program - Ver. 4.2.8p8\n\
914Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
915
916 /* referenced via ntpqOptions.pzFullVersion */
917 puts(_("ntpq 4.2.8p8"));
918
919 /* referenced via ntpqOptions.pzFullUsage */
920 puts(_("<<<NOT-FOUND>>>"));
921
922 /* referenced via ntpqOptions.pzShortUsage */
923 puts(_("<<<NOT-FOUND>>>"));
924 /* LIBOPTS-MESSAGES: */
925#line 67 "../autoopts.c"
926 puts(_("allocation of %d bytes failed\n"));
927#line 93 "../autoopts.c"
928 puts(_("allocation of %d bytes failed\n"));
929#line 53 "../init.c"
930 puts(_("AutoOpts function called without option descriptor\n"));
931#line 86 "../init.c"
932 puts(_("\tThis exceeds the compiled library version: "));
933#line 84 "../init.c"
934 puts(_("Automated Options Processing Error!\n"
935 "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
936#line 80 "../autoopts.c"
937 puts(_("realloc of %d bytes at 0x%p failed\n"));
938#line 88 "../init.c"
939 puts(_("\tThis is less than the minimum library version: "));
940#line 121 "../version.c"
941 puts(_("Automated Options version %s\n"
942 "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
943#line 87 "../makeshell.c"
944 puts(_("(AutoOpts bug): %s.\n"));
945#line 90 "../reset.c"
946 puts(_("optionResetOpt() called, but reset-option not configured"));
947#line 292 "../usage.c"
948 puts(_("could not locate the 'help' option"));
949#line 336 "../autoopts.c"
950 puts(_("optionProcess() was called with invalid data"));
951#line 748 "../usage.c"
952 puts(_("invalid argument type specified"));
953#line 598 "../find.c"
954 puts(_("defaulted to option with optional arg"));
955#line 76 "../alias.c"
956 puts(_("aliasing option is out of range."));
957#line 234 "../enum.c"
958 puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
959#line 108 "../find.c"
960 puts(_(" The following options match:\n"));
961#line 293 "../find.c"
962 puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
963#line 161 "../check.c"
964 puts(_("%s: Command line arguments required\n"));
965#line 43 "../alias.c"
966 puts(_("%d %s%s options allowed\n"));
967#line 94 "../makeshell.c"
968 puts(_("%s error %d (%s) calling %s for '%s'\n"));
969#line 306 "../makeshell.c"
970 puts(_("interprocess pipe"));
971#line 168 "../version.c"
972 puts(_("error: version option argument '%c' invalid. Use:\n"
973 "\t'v' - version only\n"
974 "\t'c' - version and copyright\n"
975 "\t'n' - version and full copyright notice\n"));
976#line 58 "../check.c"
977 puts(_("%s error: the '%s' and '%s' options conflict\n"));
978#line 217 "../find.c"
979 puts(_("%s: The '%s' option has been disabled."));
980#line 430 "../find.c"
981 puts(_("%s: The '%s' option has been disabled."));
982#line 38 "../alias.c"
983 puts(_("-equivalence"));
984#line 469 "../find.c"
985 puts(_("%s: illegal option -- %c\n"));
986#line 110 "../reset.c"
987 puts(_("%s: illegal option -- %c\n"));
988#line 271 "../find.c"
989 puts(_("%s: illegal option -- %s\n"));
990#line 755 "../find.c"
991 puts(_("%s: illegal option -- %s\n"));
992#line 118 "../reset.c"
993 puts(_("%s: illegal option -- %s\n"));
994#line 335 "../find.c"
995 puts(_("%s: unknown vendor extension option -- %s\n"));
996#line 159 "../enum.c"
997 puts(_(" or an integer from %d through %d\n"));
998#line 169 "../enum.c"
999 puts(_(" or an integer from %d through %d\n"));
1000#line 747 "../usage.c"
1001 puts(_("%s error: invalid option descriptor for %s\n"));
1002#line 1081 "../usage.c"
1003 puts(_("%s error: invalid option descriptor for %s\n"));
1004#line 385 "../find.c"
1005 puts(_("%s: invalid option name: %s\n"));
1006#line 527 "../find.c"
1007 puts(_("%s: The '%s' option requires an argument.\n"));
1008#line 156 "../autoopts.c"
1009 puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
1010 "\t'%s' and '%s'."));
1011#line 94 "../check.c"
1012 puts(_("%s error: The %s option is required\n"));
1013#line 632 "../find.c"
1014 puts(_("%s: The '%s' option cannot have an argument.\n"));
1015#line 151 "../check.c"
1016 puts(_("%s: Command line arguments are not allowed.\n"));
1017#line 535 "../save.c"
1018 puts(_("error %d (%s) creating %s\n"));
1019#line 234 "../enum.c"
1020 puts(_("%s error: '%s' does not match any %s keywords.\n"));
1021#line 93 "../reset.c"
1022 puts(_("%s error: The '%s' option requires an argument.\n"));
1023#line 184 "../save.c"
1024 puts(_("error %d (%s) stat-ing %s\n"));
1025#line 238 "../save.c"
1026 puts(_("error %d (%s) stat-ing %s\n"));
1027#line 143 "../restore.c"
1028 puts(_("%s error: no saved option state\n"));
1029#line 231 "../autoopts.c"
1030 puts(_("'%s' is not a command line option.\n"));
1031#line 111 "../time.c"
1032 puts(_("%s error: '%s' is not a recognizable date/time.\n"));
1033#line 132 "../save.c"
1034 puts(_("'%s' not defined\n"));
1035#line 50 "../time.c"
1036 puts(_("%s error: '%s' is not a recognizable time duration.\n"));
1037#line 92 "../check.c"
1038 puts(_("%s error: The %s option must appear %d times.\n"));
1039#line 164 "../numeric.c"
1040 puts(_("%s error: '%s' is not a recognizable number.\n"));
1041#line 200 "../enum.c"
1042 puts(_("%s error: %s exceeds %s keyword count\n"));
1043#line 330 "../usage.c"
1044 puts(_("Try '%s %s' for more information.\n"));
1045#line 45 "../alias.c"
1046 puts(_("one %s%s option allowed\n"));
1047#line 208 "../makeshell.c"
1048 puts(_("standard output"));
1049#line 943 "../makeshell.c"
1050 puts(_("standard output"));
1051#line 274 "../usage.c"
1052 puts(_("standard output"));
1053#line 415 "../usage.c"
1054 puts(_("standard output"));
1055#line 625 "../usage.c"
1056 puts(_("standard output"));
1057#line 175 "../version.c"
1058 puts(_("standard output"));
1059#line 274 "../usage.c"
1060 puts(_("standard error"));
1061#line 415 "../usage.c"
1062 puts(_("standard error"));
1063#line 625 "../usage.c"
1064 puts(_("standard error"));
1065#line 175 "../version.c"
1066 puts(_("standard error"));
1067#line 208 "../makeshell.c"
1068 puts(_("write"));
1069#line 943 "../makeshell.c"
1070 puts(_("write"));
1071#line 273 "../usage.c"
1072 puts(_("write"));
1073#line 414 "../usage.c"
1074 puts(_("write"));
1075#line 624 "../usage.c"
1076 puts(_("write"));
1077#line 174 "../version.c"
1078 puts(_("write"));
1079#line 60 "../numeric.c"
1080 puts(_("%s error: %s option value %ld is out of range.\n"));
1081#line 44 "../check.c"
1082 puts(_("%s error: %s option requires the %s option\n"));
1083#line 131 "../save.c"
1084 puts(_("%s warning: cannot save options - %s not regular file\n"));
1085#line 183 "../save.c"
1086 puts(_("%s warning: cannot save options - %s not regular file\n"));
1087#line 237 "../save.c"
1088 puts(_("%s warning: cannot save options - %s not regular file\n"));
1089#line 256 "../save.c"
1090 puts(_("%s warning: cannot save options - %s not regular file\n"));
1091#line 534 "../save.c"
1092 puts(_("%s warning: cannot save options - %s not regular file\n"));
1093 /* END-LIBOPTS-MESSAGES */
1094
1095 /* USAGE-TEXT: */
1096#line 873 "../usage.c"
1097 puts(_("\t\t\t\t- an alternate for '%s'\n"));
1098#line 1148 "../usage.c"
1099 puts(_("Version, usage and configuration options:"));
1100#line 924 "../usage.c"
1101 puts(_("\t\t\t\t- default option for unnamed options\n"));
1102#line 837 "../usage.c"
1103 puts(_("\t\t\t\t- disabled as '--%s'\n"));
1104#line 1117 "../usage.c"
1105 puts(_(" --- %-14s %s\n"));
1106#line 1115 "../usage.c"
1107 puts(_("This option has been disabled"));
1108#line 864 "../usage.c"
1109 puts(_("\t\t\t\t- enabled by default\n"));
1110#line 40 "../alias.c"
1111 puts(_("%s error: only "));
1112#line 1194 "../usage.c"
1113 puts(_(" - examining environment variables named %s_*\n"));
1114#line 168 "../file.c"
1115 puts(_("\t\t\t\t- file must not pre-exist\n"));
1116#line 172 "../file.c"
1117 puts(_("\t\t\t\t- file must pre-exist\n"));
1118#line 380 "../usage.c"
1119 puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1120 "hyphen and the flag character.\n"));
1121#line 921 "../makeshell.c"
1122 puts(_("\n"
1123 "= = = = = = = =\n\n"
1124 "This incarnation of genshell will produce\n"
1125 "a shell script to parse the options for %s:\n\n"));
1126#line 166 "../enum.c"
1127 puts(_(" or an integer mask with any of the lower %d bits set\n"));
1128#line 897 "../usage.c"
1129 puts(_("\t\t\t\t- is a set membership option\n"));
1130#line 918 "../usage.c"
1131 puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1132#line 382 "../usage.c"
1133 puts(_("Options are specified by single or double hyphens and their name.\n"));
1134#line 904 "../usage.c"
1135 puts(_("\t\t\t\t- may appear multiple times\n"));
1136#line 891 "../usage.c"
1137 puts(_("\t\t\t\t- may not be preset\n"));
1138#line 1309 "../usage.c"
1139 puts(_(" Arg Option-Name Description\n"));
1140#line 1245 "../usage.c"
1141 puts(_(" Flg Arg Option-Name Description\n"));
1142#line 1303 "../usage.c"
1143 puts(_(" Flg Arg Option-Name Description\n"));
1144#line 1304 "../usage.c"
1145 puts(_(" %3s %s"));
1146#line 1310 "../usage.c"
1147 puts(_(" %3s %s"));
1148#line 387 "../usage.c"
1149 puts(_("The '-#<number>' option may omit the hash char\n"));
1150#line 383 "../usage.c"
1151 puts(_("All arguments are named options.\n"));
1152#line 971 "../usage.c"
1153 puts(_(" - reading file %s"));
1154#line 409 "../usage.c"
1155 puts(_("\n"
1156 "Please send bug reports to: <%s>\n"));
1157#line 100 "../version.c"
1158 puts(_("\n"
1159 "Please send bug reports to: <%s>\n"));
1160#line 129 "../version.c"
1161 puts(_("\n"
1162 "Please send bug reports to: <%s>\n"));
1163#line 903 "../usage.c"
1164 puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1165#line 944 "../usage.c"
1166 puts(_("\n"
1167 "The following option preset mechanisms are supported:\n"));
1168#line 1192 "../usage.c"
1169 puts(_("\n"
1170 "The following option preset mechanisms are supported:\n"));
1171#line 682 "../usage.c"
1172 puts(_("prohibits these options:\n"));
1173#line 677 "../usage.c"
1174 puts(_("prohibits the option '%s'\n"));
1175#line 81 "../numeric.c"
1176 puts(_("%s%ld to %ld"));
1177#line 79 "../numeric.c"
1178 puts(_("%sgreater than or equal to %ld"));
1179#line 75 "../numeric.c"
1180 puts(_("%s%ld exactly"));
1181#line 68 "../numeric.c"
1182 puts(_("%sit must lie in one of the ranges:\n"));
1183#line 68 "../numeric.c"
1184 puts(_("%sit must be in the range:\n"));
1185#line 88 "../numeric.c"
1186 puts(_(", or\n"));
1187#line 66 "../numeric.c"
1188 puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1189#line 77 "../numeric.c"
1190 puts(_("%sless than or equal to %ld"));
1191#line 390 "../usage.c"
1192 puts(_("Operands and options may be intermixed. They will be reordered.\n"));
1193#line 652 "../usage.c"
1194 puts(_("requires the option '%s'\n"));
1195#line 655 "../usage.c"
1196 puts(_("requires these options:\n"));
1197#line 1321 "../usage.c"
1198 puts(_(" Arg Option-Name Req? Description\n"));
1199#line 1315 "../usage.c"
1200 puts(_(" Flg Arg Option-Name Req? Description\n"));
1201#line 167 "../enum.c"
1202 puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
1203 "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1204 "will set them all. Multiple entries may be passed as an option\n"
1205 "argument list.\n"));
1206#line 910 "../usage.c"
1207 puts(_("\t\t\t\t- may appear up to %d times\n"));
1208#line 77 "../enum.c"
1209 puts(_("The valid \"%s\" option keywords are:\n"));
1210#line 1152 "../usage.c"
1211 puts(_("The next option supports vendor supported extra options:"));
1212#line 773 "../usage.c"
1213 puts(_("These additional options are:"));
1214 /* END-USAGE-TEXT */
1215}
1216#endif /* uncompilable code */
1217#ifdef __cplusplus
1218}
1219#endif
1220/* ntpq-opts.c ends here */
604#ifdef __cplusplus
605}
606#endif
607/* ntpq-opts.c ends here */