1290001Sglebius/*
2181834Sroberto *  EDIT THIS FILE WITH CAUTION  (ntpq-opts.c)
3290001Sglebius *
4310419Sdelphij *  It has been AutoGen-ed  November 21, 2016 at 08:02:38 AM by AutoGen 5.18.5
5181834Sroberto *  From the definitions    ntpq-opts.def
6181834Sroberto *  and the template file   options
7181834Sroberto *
8290001Sglebius * Generated from AutoOpts 41:0:16 templates.
9181834Sroberto *
10290001Sglebius *  AutoOpts is a copyrighted work.  This source file is not encumbered
11290001Sglebius *  by AutoOpts licensing, but is provided under the licensing terms chosen
12290001Sglebius *  by the ntpq author or copyright holder.  AutoOpts is
13290001Sglebius *  licensed under the terms of the LGPL.  The redistributable library
14290001Sglebius *  (``libopts'') is licensed under the terms of either the LGPL or, at the
15290001Sglebius *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
16290001Sglebius *  for details.
17181834Sroberto *
18290001Sglebius * The ntpq program is copyrighted and licensed
19290001Sglebius * under the following terms:
20181834Sroberto *
21294905Sdelphij *  Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.
22290001Sglebius *  This is free software. It is licensed for use, modification and
23290001Sglebius *  redistribution under the terms of the NTP License, copies of which
24290001Sglebius *  can be seen at:
25290001Sglebius *    <http://ntp.org/license>
26290001Sglebius *    <http://opensource.org/licenses/ntp-license.php>
27290001Sglebius *
28290001Sglebius *  Permission to use, copy, modify, and distribute this software and its
29290001Sglebius *  documentation for any purpose with or without fee is hereby granted,
30290001Sglebius *  provided that the above copyright notice appears in all copies and that
31290001Sglebius *  both the copyright notice and this permission notice appear in
32290001Sglebius *  supporting documentation, and that the name The University of Delaware not be used in
33290001Sglebius *  advertising or publicity pertaining to distribution of the software
34290001Sglebius *  without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
35290001Sglebius *  representations about the suitability this software for any purpose. It
36290001Sglebius *  is provided "as is" without express or implied warranty.
37181834Sroberto */
38181834Sroberto
39290001Sglebius#ifndef __doxygen__
40290001Sglebius#define OPTION_CODE_COMPILE 1
41290001Sglebius#include "ntpq-opts.h"
42290001Sglebius#include <sys/types.h>
43181834Sroberto
44181834Sroberto#include <limits.h>
45290001Sglebius#include <stdio.h>
46290001Sglebius#include <stdlib.h>
47181834Sroberto
48181834Sroberto#ifdef  __cplusplus
49181834Srobertoextern "C" {
50181834Sroberto#endif
51290001Sglebiusextern FILE * option_usage_fp;
52290001Sglebius#define zCopyright      (ntpq_opt_strs+0)
53290001Sglebius#define zLicenseDescrip (ntpq_opt_strs+340)
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
68290001Sglebius/**
69290001Sglebius *  static const strings for ntpq options
70181834Sroberto */
71298770Sdelphijstatic char const ntpq_opt_strs[1982] =
72310419Sdelphij/*     0 */ "ntpq 4.2.8p9\n"
73294905Sdelphij            "Copyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n"
74290001Sglebius            "This is free software. It is licensed for use, modification and\n"
75290001Sglebius            "redistribution under the terms of the NTP License, copies of which\n"
76290001Sglebius            "can be seen at:\n"
77290001Sglebius            "  <http://ntp.org/license>\n"
78290001Sglebius            "  <http://opensource.org/licenses/ntp-license.php>\n\0"
79290001Sglebius/*   340 */ "Permission to use, copy, modify, and distribute this software and its\n"
80290001Sglebius            "documentation for any purpose with or without fee is hereby granted,\n"
81290001Sglebius            "provided that the above copyright notice appears in all copies and that\n"
82290001Sglebius            "both the copyright notice and this permission notice appear in supporting\n"
83290001Sglebius            "documentation, and that the name The University of Delaware not be used in\n"
84290001Sglebius            "advertising or publicity pertaining to distribution of the software without\n"
85290001Sglebius            "specific, written prior permission.  The University of Delaware and Network\n"
86290001Sglebius            "Time Foundation makes no representations about the suitability this\n"
87290001Sglebius            "software for any purpose.  It is provided \"as is\" without express or\n"
88290001Sglebius            "implied warranty.\n\0"
89290001Sglebius/*  1008 */ "Force IPv4 DNS name resolution\0"
90290001Sglebius/*  1039 */ "IPV4\0"
91290001Sglebius/*  1044 */ "ipv4\0"
92290001Sglebius/*  1049 */ "Force IPv6 DNS name resolution\0"
93290001Sglebius/*  1080 */ "IPV6\0"
94290001Sglebius/*  1085 */ "ipv6\0"
95290001Sglebius/*  1090 */ "run a command and exit\0"
96290001Sglebius/*  1113 */ "COMMAND\0"
97290001Sglebius/*  1121 */ "command\0"
98290001Sglebius/*  1129 */ "Increase debug verbosity level\0"
99290001Sglebius/*  1160 */ "DEBUG_LEVEL\0"
100290001Sglebius/*  1172 */ "debug-level\0"
101290001Sglebius/*  1184 */ "Set the debug verbosity level\0"
102290001Sglebius/*  1214 */ "SET_DEBUG_LEVEL\0"
103290001Sglebius/*  1230 */ "set-debug-level\0"
104290001Sglebius/*  1246 */ "Force ntpq to operate in interactive mode\0"
105290001Sglebius/*  1288 */ "INTERACTIVE\0"
106290001Sglebius/*  1300 */ "interactive\0"
107290001Sglebius/*  1312 */ "numeric host addresses\0"
108290001Sglebius/*  1335 */ "NUMERIC\0"
109290001Sglebius/*  1343 */ "numeric\0"
110290001Sglebius/*  1351 */ "Always output status line with readvar\0"
111290001Sglebius/*  1390 */ "OLD_RV\0"
112290001Sglebius/*  1397 */ "old-rv\0"
113290001Sglebius/*  1404 */ "Print a list of the peers\0"
114290001Sglebius/*  1430 */ "PEERS\0"
115290001Sglebius/*  1436 */ "peers\0"
116298770Sdelphij/*  1442 */ "Set default display type for S2+ refids\0"
117298770Sdelphij/*  1482 */ "REFID\0"
118298770Sdelphij/*  1488 */ "refid\0"
119298770Sdelphij/*  1494 */ "Display the full 'remote' value\0"
120298770Sdelphij/*  1526 */ "WIDE\0"
121298770Sdelphij/*  1531 */ "wide\0"
122298770Sdelphij/*  1536 */ "display extended usage information and exit\0"
123298770Sdelphij/*  1580 */ "help\0"
124298770Sdelphij/*  1585 */ "extended usage information passed thru pager\0"
125298770Sdelphij/*  1630 */ "more-help\0"
126298770Sdelphij/*  1640 */ "output version information and exit\0"
127298770Sdelphij/*  1676 */ "version\0"
128298770Sdelphij/*  1684 */ "save the option state to a config file\0"
129298770Sdelphij/*  1723 */ "save-opts\0"
130298770Sdelphij/*  1733 */ "load options from a config file\0"
131298770Sdelphij/*  1765 */ "LOAD_OPTS\0"
132298770Sdelphij/*  1775 */ "no-load-opts\0"
133298770Sdelphij/*  1788 */ "no\0"
134298770Sdelphij/*  1791 */ "NTPQ\0"
135310419Sdelphij/*  1796 */ "ntpq - standard NTP query program - Ver. 4.2.8p9\n"
136290001Sglebius            "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
137298770Sdelphij/*  1915 */ "$HOME\0"
138298770Sdelphij/*  1921 */ ".\0"
139298770Sdelphij/*  1923 */ ".ntprc\0"
140298770Sdelphij/*  1930 */ "http://bugs.ntp.org, bugs@ntp.org\0"
141310419Sdelphij/*  1964 */ "ntpq 4.2.8p9\0"
142298770Sdelphij/*  1977 */ "hash";
143181834Sroberto
144290001Sglebius/**
145290001Sglebius *  ipv4 option description with
146290001Sglebius *  "Must also have options" and "Incompatible options":
147181834Sroberto */
148290001Sglebius/** Descriptive text for the ipv4 option */
149290001Sglebius#define IPV4_DESC      (ntpq_opt_strs+1008)
150290001Sglebius/** Upper-cased name for the ipv4 option */
151290001Sglebius#define IPV4_NAME      (ntpq_opt_strs+1039)
152290001Sglebius/** Name string for the ipv4 option */
153290001Sglebius#define IPV4_name      (ntpq_opt_strs+1044)
154290001Sglebius/** Other options that appear in conjunction with the ipv4 option */
155290001Sglebiusstatic int const aIpv4CantList[] = {
156290001Sglebius    INDEX_OPT_IPV6, NO_EQUIVALENT };
157290001Sglebius/** Compiled in flag settings for the ipv4 option */
158290001Sglebius#define IPV4_FLAGS     (OPTST_DISABLED)
159181834Sroberto
160290001Sglebius/**
161290001Sglebius *  ipv6 option description with
162290001Sglebius *  "Must also have options" and "Incompatible options":
163181834Sroberto */
164290001Sglebius/** Descriptive text for the ipv6 option */
165290001Sglebius#define IPV6_DESC      (ntpq_opt_strs+1049)
166290001Sglebius/** Upper-cased name for the ipv6 option */
167290001Sglebius#define IPV6_NAME      (ntpq_opt_strs+1080)
168290001Sglebius/** Name string for the ipv6 option */
169290001Sglebius#define IPV6_name      (ntpq_opt_strs+1085)
170290001Sglebius/** Other options that appear in conjunction with the ipv6 option */
171290001Sglebiusstatic int const aIpv6CantList[] = {
172290001Sglebius    INDEX_OPT_IPV4, NO_EQUIVALENT };
173290001Sglebius/** Compiled in flag settings for the ipv6 option */
174290001Sglebius#define IPV6_FLAGS     (OPTST_DISABLED)
175181834Sroberto
176290001Sglebius/**
177290001Sglebius *  command option description:
178181834Sroberto */
179290001Sglebius/** Descriptive text for the command option */
180290001Sglebius#define COMMAND_DESC      (ntpq_opt_strs+1090)
181290001Sglebius/** Upper-cased name for the command option */
182290001Sglebius#define COMMAND_NAME      (ntpq_opt_strs+1113)
183290001Sglebius/** Name string for the command option */
184290001Sglebius#define COMMAND_name      (ntpq_opt_strs+1121)
185290001Sglebius/** Compiled in flag settings for the command option */
186290001Sglebius#define COMMAND_FLAGS     (OPTST_DISABLED \
187181834Sroberto        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
188181834Sroberto
189290001Sglebius/**
190290001Sglebius *  debug-level option description:
191290001Sglebius */
192290001Sglebius/** Descriptive text for the debug-level option */
193290001Sglebius#define DEBUG_LEVEL_DESC      (ntpq_opt_strs+1129)
194290001Sglebius/** Upper-cased name for the debug-level option */
195290001Sglebius#define DEBUG_LEVEL_NAME      (ntpq_opt_strs+1160)
196290001Sglebius/** Name string for the debug-level option */
197290001Sglebius#define DEBUG_LEVEL_name      (ntpq_opt_strs+1172)
198290001Sglebius/** Compiled in flag settings for the debug-level option */
199290001Sglebius#define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
200181834Sroberto
201290001Sglebius/**
202290001Sglebius *  set-debug-level option description:
203181834Sroberto */
204290001Sglebius/** Descriptive text for the set-debug-level option */
205290001Sglebius#define SET_DEBUG_LEVEL_DESC      (ntpq_opt_strs+1184)
206290001Sglebius/** Upper-cased name for the set-debug-level option */
207290001Sglebius#define SET_DEBUG_LEVEL_NAME      (ntpq_opt_strs+1214)
208290001Sglebius/** Name string for the set-debug-level option */
209290001Sglebius#define SET_DEBUG_LEVEL_name      (ntpq_opt_strs+1230)
210290001Sglebius/** Compiled in flag settings for the set-debug-level option */
211290001Sglebius#define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
212290001Sglebius        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
213181834Sroberto
214290001Sglebius/**
215290001Sglebius *  interactive option description with
216181834Sroberto *  "Must also have options" and "Incompatible options":
217181834Sroberto */
218290001Sglebius/** Descriptive text for the interactive option */
219290001Sglebius#define INTERACTIVE_DESC      (ntpq_opt_strs+1246)
220290001Sglebius/** Upper-cased name for the interactive option */
221290001Sglebius#define INTERACTIVE_NAME      (ntpq_opt_strs+1288)
222290001Sglebius/** Name string for the interactive option */
223290001Sglebius#define INTERACTIVE_name      (ntpq_opt_strs+1300)
224290001Sglebius/** Other options that appear in conjunction with the interactive option */
225290001Sglebiusstatic int const aInteractiveCantList[] = {
226181834Sroberto    INDEX_OPT_COMMAND,
227181834Sroberto    INDEX_OPT_PEERS, NO_EQUIVALENT };
228290001Sglebius/** Compiled in flag settings for the interactive option */
229290001Sglebius#define INTERACTIVE_FLAGS     (OPTST_DISABLED)
230181834Sroberto
231290001Sglebius/**
232290001Sglebius *  numeric option description:
233181834Sroberto */
234290001Sglebius/** Descriptive text for the numeric option */
235290001Sglebius#define NUMERIC_DESC      (ntpq_opt_strs+1312)
236290001Sglebius/** Upper-cased name for the numeric option */
237290001Sglebius#define NUMERIC_NAME      (ntpq_opt_strs+1335)
238290001Sglebius/** Name string for the numeric option */
239290001Sglebius#define NUMERIC_name      (ntpq_opt_strs+1343)
240290001Sglebius/** Compiled in flag settings for the numeric option */
241290001Sglebius#define NUMERIC_FLAGS     (OPTST_DISABLED)
242181834Sroberto
243290001Sglebius/**
244290001Sglebius *  old-rv option description:
245181834Sroberto */
246290001Sglebius/** Descriptive text for the old-rv option */
247290001Sglebius#define OLD_RV_DESC      (ntpq_opt_strs+1351)
248290001Sglebius/** Upper-cased name for the old-rv option */
249290001Sglebius#define OLD_RV_NAME      (ntpq_opt_strs+1390)
250290001Sglebius/** Name string for the old-rv option */
251290001Sglebius#define OLD_RV_name      (ntpq_opt_strs+1397)
252290001Sglebius/** Compiled in flag settings for the old-rv option */
253290001Sglebius#define OLD_RV_FLAGS     (OPTST_DISABLED)
254181834Sroberto
255290001Sglebius/**
256290001Sglebius *  peers option description with
257290001Sglebius *  "Must also have options" and "Incompatible options":
258181834Sroberto */
259290001Sglebius/** Descriptive text for the peers option */
260290001Sglebius#define PEERS_DESC      (ntpq_opt_strs+1404)
261290001Sglebius/** Upper-cased name for the peers option */
262290001Sglebius#define PEERS_NAME      (ntpq_opt_strs+1430)
263290001Sglebius/** Name string for the peers option */
264290001Sglebius#define PEERS_name      (ntpq_opt_strs+1436)
265290001Sglebius/** Other options that appear in conjunction with the peers option */
266290001Sglebiusstatic int const aPeersCantList[] = {
267290001Sglebius    INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
268290001Sglebius/** Compiled in flag settings for the peers option */
269290001Sglebius#define PEERS_FLAGS     (OPTST_DISABLED)
270181834Sroberto
271290001Sglebius/**
272298770Sdelphij *  refid option description:
273298770Sdelphij */
274298770Sdelphij/** Descriptive text for the refid option */
275298770Sdelphij#define REFID_DESC      (ntpq_opt_strs+1442)
276298770Sdelphij/** Upper-cased name for the refid option */
277298770Sdelphij#define REFID_NAME      (ntpq_opt_strs+1482)
278298770Sdelphij/** Name string for the refid option */
279298770Sdelphij#define REFID_name      (ntpq_opt_strs+1488)
280298770Sdelphij/** The compiled in default value for the refid option argument */
281298770Sdelphij#define REFID_DFT_ARG   ((char const*)REFID_IPV4)
282298770Sdelphij/** Compiled in flag settings for the refid option */
283298770Sdelphij#define REFID_FLAGS     (OPTST_DISABLED \
284298770Sdelphij        | OPTST_SET_ARGTYPE(OPARG_TYPE_ENUMERATION))
285298770Sdelphij
286298770Sdelphij/**
287290001Sglebius *  wide option description:
288181834Sroberto */
289290001Sglebius/** Descriptive text for the wide option */
290298770Sdelphij#define WIDE_DESC      (ntpq_opt_strs+1494)
291290001Sglebius/** Upper-cased name for the wide option */
292298770Sdelphij#define WIDE_NAME      (ntpq_opt_strs+1526)
293290001Sglebius/** Name string for the wide option */
294298770Sdelphij#define WIDE_name      (ntpq_opt_strs+1531)
295290001Sglebius/** Compiled in flag settings for the wide option */
296290001Sglebius#define WIDE_FLAGS     (OPTST_DISABLED)
297181834Sroberto
298181834Sroberto/*
299290001Sglebius *  Help/More_Help/Version option descriptions:
300181834Sroberto */
301298770Sdelphij#define HELP_DESC       (ntpq_opt_strs+1536)
302298770Sdelphij#define HELP_name       (ntpq_opt_strs+1580)
303290001Sglebius#ifdef HAVE_WORKING_FORK
304298770Sdelphij#define MORE_HELP_DESC  (ntpq_opt_strs+1585)
305298770Sdelphij#define MORE_HELP_name  (ntpq_opt_strs+1630)
306290001Sglebius#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
307290001Sglebius#else
308290001Sglebius#define MORE_HELP_DESC  HELP_DESC
309290001Sglebius#define MORE_HELP_name  HELP_name
310290001Sglebius#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
311290001Sglebius#endif
312290001Sglebius#ifdef NO_OPTIONAL_OPT_ARGS
313290001Sglebius#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
314290001Sglebius#else
315290001Sglebius#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
316290001Sglebius                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
317290001Sglebius#endif
318298770Sdelphij#define VER_DESC        (ntpq_opt_strs+1640)
319298770Sdelphij#define VER_name        (ntpq_opt_strs+1676)
320298770Sdelphij#define SAVE_OPTS_DESC  (ntpq_opt_strs+1684)
321298770Sdelphij#define SAVE_OPTS_name  (ntpq_opt_strs+1723)
322298770Sdelphij#define LOAD_OPTS_DESC     (ntpq_opt_strs+1733)
323298770Sdelphij#define LOAD_OPTS_NAME     (ntpq_opt_strs+1765)
324298770Sdelphij#define NO_LOAD_OPTS_name  (ntpq_opt_strs+1775)
325298770Sdelphij#define LOAD_OPTS_pfx      (ntpq_opt_strs+1788)
326290001Sglebius#define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
327290001Sglebius/**
328290001Sglebius *  Declare option callback procedures
329181834Sroberto */
330181834Srobertoextern tOptProc
331290001Sglebius    ntpOptionPrintVersion,   ntpq_custom_opt_handler, optionBooleanVal,
332290001Sglebius    optionNestedVal,         optionNumericVal,        optionPagedUsage,
333290001Sglebius    optionResetOpt,          optionStackArg,          optionTimeDate,
334290001Sglebius    optionTimeVal,           optionUnstackArg,        optionVendorOption;
335181834Srobertostatic tOptProc
336298770Sdelphij    doOptDebug_Level, doOptRefid, doUsageOpt;
337290001Sglebius#define VER_PROC        ntpOptionPrintVersion
338181834Sroberto
339290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
340290001Sglebius/**
341290001Sglebius *  Define the ntpq Option Descriptions.
342290001Sglebius * This is an array of OPTION_CT entries, one for each
343290001Sglebius * option that the ntpq program responds to.
344181834Sroberto */
345290001Sglebiusstatic tOptDesc optDesc[OPTION_CT] = {
346181834Sroberto  {  /* entry idx, value */ 0, VALUE_OPT_IPV4,
347290001Sglebius     /* equiv idx, value */ 0, VALUE_OPT_IPV4,
348181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
349181834Sroberto     /* min, max, act ct */ 0, 1, 0,
350181834Sroberto     /* opt state flags  */ IPV4_FLAGS, 0,
351290001Sglebius     /* last opt argumnt */ { NULL }, /* --ipv4 */
352181834Sroberto     /* arg list/cookie  */ NULL,
353290001Sglebius     /* must/cannot opts */ NULL, aIpv4CantList,
354181834Sroberto     /* option proc      */ NULL,
355290001Sglebius     /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name,
356181834Sroberto     /* disablement strs */ NULL, NULL },
357181834Sroberto
358181834Sroberto  {  /* entry idx, value */ 1, VALUE_OPT_IPV6,
359290001Sglebius     /* equiv idx, value */ 1, VALUE_OPT_IPV6,
360290001Sglebius     /* equivalenced to  */ NO_EQUIVALENT,
361181834Sroberto     /* min, max, act ct */ 0, 1, 0,
362181834Sroberto     /* opt state flags  */ IPV6_FLAGS, 0,
363290001Sglebius     /* last opt argumnt */ { NULL }, /* --ipv6 */
364181834Sroberto     /* arg list/cookie  */ NULL,
365290001Sglebius     /* must/cannot opts */ NULL, aIpv6CantList,
366181834Sroberto     /* option proc      */ NULL,
367290001Sglebius     /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name,
368181834Sroberto     /* disablement strs */ NULL, NULL },
369181834Sroberto
370181834Sroberto  {  /* entry idx, value */ 2, VALUE_OPT_COMMAND,
371181834Sroberto     /* equiv idx, value */ 2, VALUE_OPT_COMMAND,
372181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
373181834Sroberto     /* min, max, act ct */ 0, NOLIMIT, 0,
374181834Sroberto     /* opt state flags  */ COMMAND_FLAGS, 0,
375290001Sglebius     /* last opt argumnt */ { NULL }, /* --command */
376181834Sroberto     /* arg list/cookie  */ NULL,
377181834Sroberto     /* must/cannot opts */ NULL, NULL,
378290001Sglebius     /* option proc      */ ntpq_custom_opt_handler,
379290001Sglebius     /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name,
380181834Sroberto     /* disablement strs */ NULL, NULL },
381181834Sroberto
382181834Sroberto  {  /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
383181834Sroberto     /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
384181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
385181834Sroberto     /* min, max, act ct */ 0, NOLIMIT, 0,
386181834Sroberto     /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
387290001Sglebius     /* last opt argumnt */ { NULL }, /* --debug-level */
388181834Sroberto     /* arg list/cookie  */ NULL,
389181834Sroberto     /* must/cannot opts */ NULL, NULL,
390290001Sglebius     /* option proc      */ doOptDebug_Level,
391290001Sglebius     /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
392181834Sroberto     /* disablement strs */ NULL, NULL },
393181834Sroberto
394181834Sroberto  {  /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
395181834Sroberto     /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
396181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
397181834Sroberto     /* min, max, act ct */ 0, NOLIMIT, 0,
398181834Sroberto     /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
399290001Sglebius     /* last opt argumnt */ { NULL }, /* --set-debug-level */
400181834Sroberto     /* arg list/cookie  */ NULL,
401181834Sroberto     /* must/cannot opts */ NULL, NULL,
402290001Sglebius     /* option proc      */ optionNumericVal,
403290001Sglebius     /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
404181834Sroberto     /* disablement strs */ NULL, NULL },
405181834Sroberto
406290001Sglebius  {  /* entry idx, value */ 5, VALUE_OPT_INTERACTIVE,
407290001Sglebius     /* equiv idx, value */ 5, VALUE_OPT_INTERACTIVE,
408181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
409181834Sroberto     /* min, max, act ct */ 0, 1, 0,
410290001Sglebius     /* opt state flags  */ INTERACTIVE_FLAGS, 0,
411290001Sglebius     /* last opt argumnt */ { NULL }, /* --interactive */
412181834Sroberto     /* arg list/cookie  */ NULL,
413290001Sglebius     /* must/cannot opts */ NULL, aInteractiveCantList,
414181834Sroberto     /* option proc      */ NULL,
415290001Sglebius     /* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name,
416181834Sroberto     /* disablement strs */ NULL, NULL },
417181834Sroberto
418290001Sglebius  {  /* entry idx, value */ 6, VALUE_OPT_NUMERIC,
419290001Sglebius     /* equiv idx, value */ 6, VALUE_OPT_NUMERIC,
420181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
421181834Sroberto     /* min, max, act ct */ 0, 1, 0,
422290001Sglebius     /* opt state flags  */ NUMERIC_FLAGS, 0,
423290001Sglebius     /* last opt argumnt */ { NULL }, /* --numeric */
424181834Sroberto     /* arg list/cookie  */ NULL,
425290001Sglebius     /* must/cannot opts */ NULL, NULL,
426181834Sroberto     /* option proc      */ NULL,
427290001Sglebius     /* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name,
428181834Sroberto     /* disablement strs */ NULL, NULL },
429181834Sroberto
430290001Sglebius  {  /* entry idx, value */ 7, VALUE_OPT_OLD_RV,
431290001Sglebius     /* equiv idx, value */ 7, VALUE_OPT_OLD_RV,
432181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
433181834Sroberto     /* min, max, act ct */ 0, 1, 0,
434290001Sglebius     /* opt state flags  */ OLD_RV_FLAGS, 0,
435290001Sglebius     /* last opt argumnt */ { NULL }, /* --old-rv */
436181834Sroberto     /* arg list/cookie  */ NULL,
437181834Sroberto     /* must/cannot opts */ NULL, NULL,
438181834Sroberto     /* option proc      */ NULL,
439290001Sglebius     /* desc, NAME, name */ OLD_RV_DESC, OLD_RV_NAME, OLD_RV_name,
440181834Sroberto     /* disablement strs */ NULL, NULL },
441181834Sroberto
442290001Sglebius  {  /* entry idx, value */ 8, VALUE_OPT_PEERS,
443290001Sglebius     /* equiv idx, value */ 8, VALUE_OPT_PEERS,
444290001Sglebius     /* equivalenced to  */ NO_EQUIVALENT,
445290001Sglebius     /* min, max, act ct */ 0, 1, 0,
446290001Sglebius     /* opt state flags  */ PEERS_FLAGS, 0,
447290001Sglebius     /* last opt argumnt */ { NULL }, /* --peers */
448290001Sglebius     /* arg list/cookie  */ NULL,
449290001Sglebius     /* must/cannot opts */ NULL, aPeersCantList,
450290001Sglebius     /* option proc      */ ntpq_custom_opt_handler,
451290001Sglebius     /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name,
452290001Sglebius     /* disablement strs */ NULL, NULL },
453181834Sroberto
454298770Sdelphij  {  /* entry idx, value */ 9, VALUE_OPT_REFID,
455298770Sdelphij     /* equiv idx, value */ 9, VALUE_OPT_REFID,
456290001Sglebius     /* equivalenced to  */ NO_EQUIVALENT,
457290001Sglebius     /* min, max, act ct */ 0, 1, 0,
458298770Sdelphij     /* opt state flags  */ REFID_FLAGS, 0,
459298770Sdelphij     /* last opt argumnt */ { REFID_DFT_ARG },
460298770Sdelphij     /* arg list/cookie  */ NULL,
461298770Sdelphij     /* must/cannot opts */ NULL, NULL,
462298770Sdelphij     /* option proc      */ doOptRefid,
463298770Sdelphij     /* desc, NAME, name */ REFID_DESC, REFID_NAME, REFID_name,
464298770Sdelphij     /* disablement strs */ NULL, NULL },
465298770Sdelphij
466298770Sdelphij  {  /* entry idx, value */ 10, VALUE_OPT_WIDE,
467298770Sdelphij     /* equiv idx, value */ 10, VALUE_OPT_WIDE,
468298770Sdelphij     /* equivalenced to  */ NO_EQUIVALENT,
469298770Sdelphij     /* min, max, act ct */ 0, 1, 0,
470290001Sglebius     /* opt state flags  */ WIDE_FLAGS, 0,
471290001Sglebius     /* last opt argumnt */ { NULL }, /* --wide */
472290001Sglebius     /* arg list/cookie  */ NULL,
473290001Sglebius     /* must/cannot opts */ NULL, NULL,
474290001Sglebius     /* option proc      */ NULL,
475290001Sglebius     /* desc, NAME, name */ WIDE_DESC, WIDE_NAME, WIDE_name,
476290001Sglebius     /* disablement strs */ NULL, NULL },
477290001Sglebius
478181834Sroberto  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
479290001Sglebius     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
480181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
481181834Sroberto     /* min, max, act ct */ 0, 1, 0,
482290001Sglebius     /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
483181834Sroberto     /* last opt argumnt */ { NULL },
484181834Sroberto     /* arg list/cookie  */ NULL,
485181834Sroberto     /* must/cannot opts */ NULL, NULL,
486290001Sglebius     /* option proc      */ VER_PROC,
487290001Sglebius     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
488181834Sroberto     /* disablement strs */ NULL, NULL },
489181834Sroberto
490181834Sroberto
491181834Sroberto
492181834Sroberto  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
493290001Sglebius     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
494181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
495181834Sroberto     /* min, max, act ct */ 0, 1, 0,
496290001Sglebius     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
497181834Sroberto     /* last opt argumnt */ { NULL },
498181834Sroberto     /* arg list/cookie  */ NULL,
499181834Sroberto     /* must/cannot opts */ NULL, NULL,
500181834Sroberto     /* option proc      */ doUsageOpt,
501290001Sglebius     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
502181834Sroberto     /* disablement strs */ NULL, NULL },
503181834Sroberto
504181834Sroberto  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
505290001Sglebius     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
506181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
507181834Sroberto     /* min, max, act ct */ 0, 1, 0,
508290001Sglebius     /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
509181834Sroberto     /* last opt argumnt */ { NULL },
510181834Sroberto     /* arg list/cookie  */ NULL,
511181834Sroberto     /* must/cannot opts */ NULL,  NULL,
512181834Sroberto     /* option proc      */ optionPagedUsage,
513290001Sglebius     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
514181834Sroberto     /* disablement strs */ NULL, NULL },
515181834Sroberto
516181834Sroberto  {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
517290001Sglebius     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
518181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
519181834Sroberto     /* min, max, act ct */ 0, 1, 0,
520181834Sroberto     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
521290001Sglebius                       | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
522181834Sroberto     /* last opt argumnt */ { NULL },
523181834Sroberto     /* arg list/cookie  */ NULL,
524181834Sroberto     /* must/cannot opts */ NULL,  NULL,
525181834Sroberto     /* option proc      */ NULL,
526290001Sglebius     /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
527181834Sroberto     /* disablement strs */ NULL, NULL },
528181834Sroberto
529181834Sroberto  {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
530290001Sglebius     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
531181834Sroberto     /* equivalenced to  */ NO_EQUIVALENT,
532181834Sroberto     /* min, max, act ct */ 0, NOLIMIT, 0,
533290001Sglebius     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
534290001Sglebius			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
535181834Sroberto     /* last opt argumnt */ { NULL },
536181834Sroberto     /* arg list/cookie  */ NULL,
537181834Sroberto     /* must/cannot opts */ NULL, NULL,
538181834Sroberto     /* option proc      */ optionLoadOpt,
539290001Sglebius     /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
540290001Sglebius     /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
541181834Sroberto};
542181834Sroberto
543181834Sroberto
544290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
545290001Sglebius/** Reference to the upper cased version of ntpq. */
546298770Sdelphij#define zPROGNAME       (ntpq_opt_strs+1791)
547290001Sglebius/** Reference to the title line for ntpq usage. */
548298770Sdelphij#define zUsageTitle     (ntpq_opt_strs+1796)
549290001Sglebius/** ntpq configuration file name. */
550298770Sdelphij#define zRcName         (ntpq_opt_strs+1923)
551290001Sglebius/** Directories to search for ntpq config files. */
552290001Sglebiusstatic char const * const apzHomeList[3] = {
553298770Sdelphij    ntpq_opt_strs+1915,
554298770Sdelphij    ntpq_opt_strs+1921,
555290001Sglebius    NULL };
556290001Sglebius/** The ntpq program bug email address. */
557298770Sdelphij#define zBugsAddr       (ntpq_opt_strs+1930)
558290001Sglebius/** Clarification/explanation of what ntpq does. */
559290001Sglebius#define zExplain        (NULL)
560290001Sglebius/** Extra detail explaining what ntpq does. */
561290001Sglebius#define zDetail         (NULL)
562290001Sglebius/** The full version string for ntpq. */
563298770Sdelphij#define zFullVersion    (ntpq_opt_strs+1964)
564290001Sglebius/* extracted from optcode.tlib near line 364 */
565181834Sroberto
566181834Sroberto#if defined(ENABLE_NLS)
567181834Sroberto# define OPTPROC_BASE OPTPROC_TRANSLATE
568181834Sroberto  static tOptionXlateProc translate_option_strings;
569181834Sroberto#else
570181834Sroberto# define OPTPROC_BASE OPTPROC_NONE
571181834Sroberto# define translate_option_strings NULL
572181834Sroberto#endif /* ENABLE_NLS */
573181834Sroberto
574290001Sglebius#define ntpq_full_usage (NULL)
575290001Sglebius#define ntpq_short_usage (NULL)
576290001Sglebius
577290001Sglebius#endif /* not defined __doxygen__ */
578290001Sglebius
579290001Sglebius/*
580290001Sglebius *  Create the static procedure(s) declared above.
581290001Sglebius */
582290001Sglebius/**
583290001Sglebius * The callout function that invokes the optionUsage function.
584290001Sglebius *
585290001Sglebius * @param[in] opts the AutoOpts option description structure
586290001Sglebius * @param[in] od   the descriptor for the "help" (usage) option.
587290001Sglebius * @noreturn
588290001Sglebius */
589290001Sglebiusstatic void
590290001SglebiusdoUsageOpt(tOptions * opts, tOptDesc * od)
591290001Sglebius{
592290001Sglebius    int ex_code;
593290001Sglebius    ex_code = NTPQ_EXIT_SUCCESS;
594290001Sglebius    optionUsage(&ntpqOptions, ex_code);
595290001Sglebius    /* NOTREACHED */
596290001Sglebius    exit(1);
597290001Sglebius    (void)opts;
598290001Sglebius    (void)od;
599290001Sglebius}
600290001Sglebius
601290001Sglebius/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
602290001Sglebius/**
603290001Sglebius * Code to handle the debug-level option.
604290001Sglebius *
605290001Sglebius * @param[in] pOptions the ntpq options data structure
606290001Sglebius * @param[in,out] pOptDesc the option descriptor for this option.
607290001Sglebius */
608290001Sglebiusstatic void
609290001SglebiusdoOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
610290001Sglebius{
611290001Sglebius    /*
612290001Sglebius     * Be sure the flag-code[0] handles special values for the options pointer
613290001Sglebius     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
614290001Sglebius     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
615290001Sglebius     * reset its state.
616290001Sglebius     */
617290001Sglebius    /* extracted from debug-opt.def, line 15 */
618290001SglebiusOPT_VALUE_SET_DEBUG_LEVEL++;
619290001Sglebius    (void)pOptDesc;
620290001Sglebius    (void)pOptions;
621290001Sglebius}
622298770Sdelphij
623298770Sdelphij/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
624298770Sdelphij/**
625298770Sdelphij * Code to handle the refid option.
626298770Sdelphij * Set the default display format for S2+ refids.
627298770Sdelphij * @param[in] pOptions the ntpq options data structure
628298770Sdelphij * @param[in,out] pOptDesc the option descriptor for this option.
629298770Sdelphij */
630298770Sdelphijstatic void
631298770SdelphijdoOptRefid(tOptions* pOptions, tOptDesc* pOptDesc)
632298770Sdelphij{
633298770Sdelphij
634298770Sdelphij/* extracted from optmain.tlib near line 945 */
635298770Sdelphij    static char const * const names[2] = {
636298770Sdelphij        ntpq_opt_strs+1977, ntpq_opt_strs+1044 };
637298770Sdelphij
638298770Sdelphij    if (pOptions <= OPTPROC_EMIT_LIMIT) {
639298770Sdelphij        (void) optionEnumerationVal(pOptions, pOptDesc, names, 2);
640298770Sdelphij        return; /* protect AutoOpts client code from internal callbacks */
641298770Sdelphij    }
642298770Sdelphij
643298770Sdelphij    pOptDesc->optArg.argEnum =
644298770Sdelphij        optionEnumerationVal(pOptions, pOptDesc, names, 2);
645298770Sdelphij}
646290001Sglebius/* extracted from optmain.tlib near line 1250 */
647290001Sglebius
648290001Sglebius/**
649290001Sglebius * The directory containing the data associated with ntpq.
650290001Sglebius */
651290001Sglebius#ifndef  PKGDATADIR
652290001Sglebius# define PKGDATADIR ""
653290001Sglebius#endif
654290001Sglebius
655290001Sglebius/**
656290001Sglebius * Information about the person or institution that packaged ntpq
657290001Sglebius * for the current distribution.
658290001Sglebius */
659290001Sglebius#ifndef  WITH_PACKAGER
660290001Sglebius# define ntpq_packager_info NULL
661290001Sglebius#else
662290001Sglebius/** Packager information for ntpq. */
663290001Sglebiusstatic char const ntpq_packager_info[] =
664290001Sglebius    "Packaged by " WITH_PACKAGER
665290001Sglebius
666290001Sglebius# ifdef WITH_PACKAGER_VERSION
667290001Sglebius        " ("WITH_PACKAGER_VERSION")"
668290001Sglebius# endif
669290001Sglebius
670290001Sglebius# ifdef WITH_PACKAGER_BUG_REPORTS
671290001Sglebius    "\nReport ntpq bugs to " WITH_PACKAGER_BUG_REPORTS
672290001Sglebius# endif
673290001Sglebius    "\n";
674290001Sglebius#endif
675290001Sglebius#ifndef __doxygen__
676290001Sglebius
677290001Sglebius#endif /* __doxygen__ */
678290001Sglebius/**
679290001Sglebius * The option definitions for ntpq.  The one structure that
680290001Sglebius * binds them all.
681290001Sglebius */
682181834SrobertotOptions ntpqOptions = {
683181834Sroberto    OPTIONS_STRUCT_VERSION,
684181834Sroberto    0, NULL,                    /* original argc + argv    */
685181834Sroberto    ( OPTPROC_BASE
686181834Sroberto    + OPTPROC_ERRSTOP
687181834Sroberto    + OPTPROC_SHORTOPT
688181834Sroberto    + OPTPROC_LONGOPT
689181834Sroberto    + OPTPROC_NO_REQ_OPT
690181834Sroberto    + OPTPROC_ENVIRON
691290001Sglebius    + OPTPROC_MISUSE ),
692181834Sroberto    0, NULL,                    /* current option index, current option */
693181834Sroberto    NULL,         NULL,         zPROGNAME,
694290001Sglebius    zRcName,      zCopyright,   zLicenseDescrip,
695181834Sroberto    zFullVersion, apzHomeList,  zUsageTitle,
696181834Sroberto    zExplain,     zDetail,      optDesc,
697181834Sroberto    zBugsAddr,                  /* address to send bugs to */
698181834Sroberto    NULL, NULL,                 /* extensions/saved state  */
699290001Sglebius    optionUsage, /* usage procedure */
700181834Sroberto    translate_option_strings,   /* translation procedure */
701181834Sroberto    /*
702181834Sroberto     *  Indexes to special options
703181834Sroberto     */
704290001Sglebius    { INDEX_OPT_MORE_HELP, /* more-help option index */
705290001Sglebius      INDEX_OPT_SAVE_OPTS, /* save option index */
706290001Sglebius      NO_EQUIVALENT, /* '-#' option index */
707181834Sroberto      NO_EQUIVALENT /* index of default opt */
708181834Sroberto    },
709298770Sdelphij    16 /* full option count */, 11 /* user option count */,
710290001Sglebius    ntpq_full_usage, ntpq_short_usage,
711290001Sglebius    NULL, NULL,
712290001Sglebius    PKGDATADIR, ntpq_packager_info
713181834Sroberto};
714181834Sroberto
715290001Sglebius#if ENABLE_NLS
716290001Sglebius/**
717290001Sglebius * This code is designed to translate translatable option text for the
718290001Sglebius * ntpq program.  These translations happen upon entry
719290001Sglebius * to optionProcess().
720181834Sroberto */
721181834Sroberto#include <stdio.h>
722181834Sroberto#include <stdlib.h>
723181834Sroberto#include <string.h>
724181834Sroberto#include <unistd.h>
725290001Sglebius#ifdef HAVE_DCGETTEXT
726290001Sglebius# include <gettext.h>
727290001Sglebius#endif
728181834Sroberto#include <autoopts/usage-txt.h>
729181834Sroberto
730290001Sglebiusstatic char * AO_gettext(char const * pz);
731290001Sglebiusstatic void   coerce_it(void ** s);
732181834Sroberto
733290001Sglebius/**
734290001Sglebius * AutoGen specific wrapper function for gettext.  It relies on the macro _()
735290001Sglebius * to convert from English to the target language, then strdup-duplicates the
736290001Sglebius * result string.  It tries the "libopts" domain first, then whatever has been
737290001Sglebius * set via the \a textdomain(3) call.
738290001Sglebius *
739290001Sglebius * @param[in] pz the input text used as a lookup key.
740290001Sglebius * @returns the translated text (if there is one),
741290001Sglebius *   or the original text (if not).
742290001Sglebius */
743290001Sglebiusstatic char *
744290001SglebiusAO_gettext(char const * pz)
745181834Sroberto{
746290001Sglebius    char * res;
747181834Sroberto    if (pz == NULL)
748181834Sroberto        return NULL;
749290001Sglebius#ifdef HAVE_DCGETTEXT
750290001Sglebius    /*
751290001Sglebius     * While processing the option_xlateable_txt data, try to use the
752290001Sglebius     * "libopts" domain.  Once we switch to the option descriptor data,
753290001Sglebius     * do *not* use that domain.
754290001Sglebius     */
755290001Sglebius    if (option_xlateable_txt.field_ct != 0) {
756290001Sglebius        res = dgettext("libopts", pz);
757290001Sglebius        if (res == pz)
758290001Sglebius            res = (char *)VOIDP(_(pz));
759290001Sglebius    } else
760290001Sglebius        res = (char *)VOIDP(_(pz));
761290001Sglebius#else
762290001Sglebius    res = (char *)VOIDP(_(pz));
763290001Sglebius#endif
764290001Sglebius    if (res == pz)
765290001Sglebius        return res;
766290001Sglebius    res = strdup(res);
767290001Sglebius    if (res == NULL) {
768290001Sglebius        fputs(_("No memory for duping translated strings\n"), stderr);
769290001Sglebius        exit(NTPQ_EXIT_FAILURE);
770181834Sroberto    }
771290001Sglebius    return res;
772181834Sroberto}
773181834Sroberto
774290001Sglebius/**
775290001Sglebius * All the pointers we use are marked "* const", but they are stored in
776290001Sglebius * writable memory.  Coerce the mutability and set the pointer.
777290001Sglebius */
778290001Sglebiusstatic void coerce_it(void ** s) { *s = AO_gettext(*s);
779290001Sglebius}
780181834Sroberto
781290001Sglebius/**
782290001Sglebius * Translate all the translatable strings in the ntpqOptions
783290001Sglebius * structure defined above.  This is done only once.
784181834Sroberto */
785181834Srobertostatic void
786290001Sglebiustranslate_option_strings(void)
787181834Sroberto{
788290001Sglebius    tOptions * const opts = &ntpqOptions;
789290001Sglebius
790181834Sroberto    /*
791181834Sroberto     *  Guard against re-translation.  It won't work.  The strings will have
792181834Sroberto     *  been changed by the first pass through this code.  One shot only.
793181834Sroberto     */
794290001Sglebius    if (option_xlateable_txt.field_ct != 0) {
795290001Sglebius        /*
796290001Sglebius         *  Do the translations.  The first pointer follows the field count
797290001Sglebius         *  field.  The field count field is the size of a pointer.
798290001Sglebius         */
799290001Sglebius        char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
800290001Sglebius        int     ix  = option_xlateable_txt.field_ct;
801181834Sroberto
802181834Sroberto        do {
803290001Sglebius            ppz++; /* skip over field_ct */
804181834Sroberto            *ppz = AO_gettext(*ppz);
805181834Sroberto        } while (--ix > 0);
806290001Sglebius        /* prevent re-translation and disable "libopts" domain lookup */
807290001Sglebius        option_xlateable_txt.field_ct = 0;
808181834Sroberto
809290001Sglebius        coerce_it(VOIDP(&(opts->pzCopyright)));
810290001Sglebius        coerce_it(VOIDP(&(opts->pzCopyNotice)));
811290001Sglebius        coerce_it(VOIDP(&(opts->pzFullVersion)));
812290001Sglebius        coerce_it(VOIDP(&(opts->pzUsageTitle)));
813290001Sglebius        coerce_it(VOIDP(&(opts->pzExplain)));
814290001Sglebius        coerce_it(VOIDP(&(opts->pzDetail)));
815290001Sglebius        {
816290001Sglebius            tOptDesc * od = opts->pOptDesc;
817290001Sglebius            for (ix = opts->optCt; ix > 0; ix--, od++)
818290001Sglebius                coerce_it(VOIDP(&(od->pzText)));
819181834Sroberto        }
820181834Sroberto    }
821181834Sroberto}
822181834Sroberto#endif /* ENABLE_NLS */
823181834Sroberto
824290001Sglebius#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
825290001Sglebius/** I18N function strictly for xgettext.  Do not compile. */
826290001Sglebiusstatic void bogus_function(void) {
827290001Sglebius  /* TRANSLATORS:
828290001Sglebius
829290001Sglebius     The following dummy function was crated solely so that xgettext can
830290001Sglebius     extract the correct strings.  These strings are actually referenced
831290001Sglebius     by a field name in the ntpqOptions structure noted in the
832290001Sglebius     comments below.  The literal text is defined in ntpq_opt_strs.
833290001Sglebius
834290001Sglebius     NOTE: the strings below are segmented with respect to the source string
835290001Sglebius     ntpq_opt_strs.  The strings above are handed off for translation
836290001Sglebius     at run time a paragraph at a time.  Consequently, they are presented here
837290001Sglebius     for translation a paragraph at a time.
838290001Sglebius
839290001Sglebius     ALSO: often the description for an option will reference another option
840290001Sglebius     by name.  These are set off with apostrophe quotes (I hope).  Do not
841290001Sglebius     translate option names.
842290001Sglebius   */
843290001Sglebius  /* referenced via ntpqOptions.pzCopyright */
844310419Sdelphij  puts(_("ntpq 4.2.8p9\n\
845294905SdelphijCopyright (C) 1992-2016 The University of Delaware and Network Time Foundation, all rights reserved.\n\
846290001SglebiusThis is free software. It is licensed for use, modification and\n\
847290001Sglebiusredistribution under the terms of the NTP License, copies of which\n\
848290001Sglebiuscan be seen at:\n"));
849290001Sglebius  puts(_("  <http://ntp.org/license>\n\
850290001Sglebius  <http://opensource.org/licenses/ntp-license.php>\n"));
851290001Sglebius
852290001Sglebius  /* referenced via ntpqOptions.pzCopyNotice */
853290001Sglebius  puts(_("Permission to use, copy, modify, and distribute this software and its\n\
854290001Sglebiusdocumentation for any purpose with or without fee is hereby granted,\n\
855290001Sglebiusprovided that the above copyright notice appears in all copies and that\n\
856290001Sglebiusboth the copyright notice and this permission notice appear in supporting\n\
857290001Sglebiusdocumentation, and that the name The University of Delaware not be used in\n\
858290001Sglebiusadvertising or publicity pertaining to distribution of the software without\n\
859290001Sglebiusspecific, written prior permission.  The University of Delaware and Network\n\
860290001SglebiusTime Foundation makes no representations about the suitability this\n\
861290001Sglebiussoftware for any purpose.  It is provided \"as is\" without express or\n\
862290001Sglebiusimplied warranty.\n"));
863290001Sglebius
864290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
865290001Sglebius  puts(_("Force IPv4 DNS name resolution"));
866290001Sglebius
867290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
868290001Sglebius  puts(_("Force IPv6 DNS name resolution"));
869290001Sglebius
870290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
871290001Sglebius  puts(_("run a command and exit"));
872290001Sglebius
873290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
874290001Sglebius  puts(_("Increase debug verbosity level"));
875290001Sglebius
876290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
877290001Sglebius  puts(_("Set the debug verbosity level"));
878290001Sglebius
879290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
880290001Sglebius  puts(_("Force ntpq to operate in interactive mode"));
881290001Sglebius
882290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
883290001Sglebius  puts(_("numeric host addresses"));
884290001Sglebius
885290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
886290001Sglebius  puts(_("Always output status line with readvar"));
887290001Sglebius
888290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
889290001Sglebius  puts(_("Print a list of the peers"));
890290001Sglebius
891290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
892298770Sdelphij  puts(_("Set default display type for S2+ refids"));
893298770Sdelphij
894298770Sdelphij  /* referenced via ntpqOptions.pOptDesc->pzText */
895290001Sglebius  puts(_("Display the full 'remote' value"));
896290001Sglebius
897290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
898290001Sglebius  puts(_("display extended usage information and exit"));
899290001Sglebius
900290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
901290001Sglebius  puts(_("extended usage information passed thru pager"));
902290001Sglebius
903290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
904290001Sglebius  puts(_("output version information and exit"));
905290001Sglebius
906290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
907290001Sglebius  puts(_("save the option state to a config file"));
908290001Sglebius
909290001Sglebius  /* referenced via ntpqOptions.pOptDesc->pzText */
910290001Sglebius  puts(_("load options from a config file"));
911290001Sglebius
912290001Sglebius  /* referenced via ntpqOptions.pzUsageTitle */
913310419Sdelphij  puts(_("ntpq - standard NTP query program - Ver. 4.2.8p9\n\
914290001SglebiusUsage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
915290001Sglebius
916290001Sglebius  /* referenced via ntpqOptions.pzFullVersion */
917310419Sdelphij  puts(_("ntpq 4.2.8p9"));
918290001Sglebius
919290001Sglebius  /* referenced via ntpqOptions.pzFullUsage */
920290001Sglebius  puts(_("<<<NOT-FOUND>>>"));
921290001Sglebius
922290001Sglebius  /* referenced via ntpqOptions.pzShortUsage */
923290001Sglebius  puts(_("<<<NOT-FOUND>>>"));
924290001Sglebius  /* LIBOPTS-MESSAGES: */
925290001Sglebius#line 67 "../autoopts.c"
926290001Sglebius  puts(_("allocation of %d bytes failed\n"));
927290001Sglebius#line 93 "../autoopts.c"
928290001Sglebius  puts(_("allocation of %d bytes failed\n"));
929290001Sglebius#line 53 "../init.c"
930290001Sglebius  puts(_("AutoOpts function called without option descriptor\n"));
931290001Sglebius#line 86 "../init.c"
932290001Sglebius  puts(_("\tThis exceeds the compiled library version:  "));
933290001Sglebius#line 84 "../init.c"
934290001Sglebius  puts(_("Automated Options Processing Error!\n"
935290001Sglebius       "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
936290001Sglebius#line 80 "../autoopts.c"
937290001Sglebius  puts(_("realloc of %d bytes at 0x%p failed\n"));
938290001Sglebius#line 88 "../init.c"
939290001Sglebius  puts(_("\tThis is less than the minimum library version:  "));
940290001Sglebius#line 121 "../version.c"
941290001Sglebius  puts(_("Automated Options version %s\n"
942290001Sglebius       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
943290001Sglebius#line 87 "../makeshell.c"
944290001Sglebius  puts(_("(AutoOpts bug):  %s.\n"));
945290001Sglebius#line 90 "../reset.c"
946290001Sglebius  puts(_("optionResetOpt() called, but reset-option not configured"));
947290001Sglebius#line 292 "../usage.c"
948290001Sglebius  puts(_("could not locate the 'help' option"));
949290001Sglebius#line 336 "../autoopts.c"
950290001Sglebius  puts(_("optionProcess() was called with invalid data"));
951290001Sglebius#line 748 "../usage.c"
952290001Sglebius  puts(_("invalid argument type specified"));
953290001Sglebius#line 598 "../find.c"
954290001Sglebius  puts(_("defaulted to option with optional arg"));
955290001Sglebius#line 76 "../alias.c"
956290001Sglebius  puts(_("aliasing option is out of range."));
957290001Sglebius#line 234 "../enum.c"
958290001Sglebius  puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
959290001Sglebius#line 108 "../find.c"
960290001Sglebius  puts(_("  The following options match:\n"));
961290001Sglebius#line 293 "../find.c"
962290001Sglebius  puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
963290001Sglebius#line 161 "../check.c"
964290001Sglebius  puts(_("%s: Command line arguments required\n"));
965290001Sglebius#line 43 "../alias.c"
966290001Sglebius  puts(_("%d %s%s options allowed\n"));
967290001Sglebius#line 94 "../makeshell.c"
968290001Sglebius  puts(_("%s error %d (%s) calling %s for '%s'\n"));
969290001Sglebius#line 306 "../makeshell.c"
970290001Sglebius  puts(_("interprocess pipe"));
971290001Sglebius#line 168 "../version.c"
972290001Sglebius  puts(_("error: version option argument '%c' invalid.  Use:\n"
973290001Sglebius       "\t'v' - version only\n"
974290001Sglebius       "\t'c' - version and copyright\n"
975290001Sglebius       "\t'n' - version and full copyright notice\n"));
976290001Sglebius#line 58 "../check.c"
977290001Sglebius  puts(_("%s error:  the '%s' and '%s' options conflict\n"));
978290001Sglebius#line 217 "../find.c"
979290001Sglebius  puts(_("%s: The '%s' option has been disabled."));
980290001Sglebius#line 430 "../find.c"
981290001Sglebius  puts(_("%s: The '%s' option has been disabled."));
982290001Sglebius#line 38 "../alias.c"
983290001Sglebius  puts(_("-equivalence"));
984290001Sglebius#line 469 "../find.c"
985290001Sglebius  puts(_("%s: illegal option -- %c\n"));
986290001Sglebius#line 110 "../reset.c"
987290001Sglebius  puts(_("%s: illegal option -- %c\n"));
988290001Sglebius#line 271 "../find.c"
989290001Sglebius  puts(_("%s: illegal option -- %s\n"));
990290001Sglebius#line 755 "../find.c"
991290001Sglebius  puts(_("%s: illegal option -- %s\n"));
992290001Sglebius#line 118 "../reset.c"
993290001Sglebius  puts(_("%s: illegal option -- %s\n"));
994290001Sglebius#line 335 "../find.c"
995290001Sglebius  puts(_("%s: unknown vendor extension option -- %s\n"));
996290001Sglebius#line 159 "../enum.c"
997290001Sglebius  puts(_("  or an integer from %d through %d\n"));
998290001Sglebius#line 169 "../enum.c"
999290001Sglebius  puts(_("  or an integer from %d through %d\n"));
1000290001Sglebius#line 747 "../usage.c"
1001290001Sglebius  puts(_("%s error:  invalid option descriptor for %s\n"));
1002290001Sglebius#line 1081 "../usage.c"
1003290001Sglebius  puts(_("%s error:  invalid option descriptor for %s\n"));
1004290001Sglebius#line 385 "../find.c"
1005290001Sglebius  puts(_("%s: invalid option name: %s\n"));
1006290001Sglebius#line 527 "../find.c"
1007290001Sglebius  puts(_("%s: The '%s' option requires an argument.\n"));
1008290001Sglebius#line 156 "../autoopts.c"
1009290001Sglebius  puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
1010290001Sglebius       "\t'%s' and '%s'."));
1011290001Sglebius#line 94 "../check.c"
1012290001Sglebius  puts(_("%s error:  The %s option is required\n"));
1013290001Sglebius#line 632 "../find.c"
1014290001Sglebius  puts(_("%s: The '%s' option cannot have an argument.\n"));
1015290001Sglebius#line 151 "../check.c"
1016290001Sglebius  puts(_("%s: Command line arguments are not allowed.\n"));
1017290001Sglebius#line 535 "../save.c"
1018290001Sglebius  puts(_("error %d (%s) creating %s\n"));
1019290001Sglebius#line 234 "../enum.c"
1020290001Sglebius  puts(_("%s error:  '%s' does not match any %s keywords.\n"));
1021290001Sglebius#line 93 "../reset.c"
1022290001Sglebius  puts(_("%s error: The '%s' option requires an argument.\n"));
1023290001Sglebius#line 184 "../save.c"
1024290001Sglebius  puts(_("error %d (%s) stat-ing %s\n"));
1025290001Sglebius#line 238 "../save.c"
1026290001Sglebius  puts(_("error %d (%s) stat-ing %s\n"));
1027290001Sglebius#line 143 "../restore.c"
1028290001Sglebius  puts(_("%s error: no saved option state\n"));
1029290001Sglebius#line 231 "../autoopts.c"
1030290001Sglebius  puts(_("'%s' is not a command line option.\n"));
1031290001Sglebius#line 111 "../time.c"
1032290001Sglebius  puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
1033290001Sglebius#line 132 "../save.c"
1034290001Sglebius  puts(_("'%s' not defined\n"));
1035290001Sglebius#line 50 "../time.c"
1036290001Sglebius  puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
1037290001Sglebius#line 92 "../check.c"
1038290001Sglebius  puts(_("%s error:  The %s option must appear %d times.\n"));
1039290001Sglebius#line 164 "../numeric.c"
1040290001Sglebius  puts(_("%s error:  '%s' is not a recognizable number.\n"));
1041290001Sglebius#line 200 "../enum.c"
1042290001Sglebius  puts(_("%s error:  %s exceeds %s keyword count\n"));
1043290001Sglebius#line 330 "../usage.c"
1044290001Sglebius  puts(_("Try '%s %s' for more information.\n"));
1045290001Sglebius#line 45 "../alias.c"
1046290001Sglebius  puts(_("one %s%s option allowed\n"));
1047290001Sglebius#line 208 "../makeshell.c"
1048290001Sglebius  puts(_("standard output"));
1049290001Sglebius#line 943 "../makeshell.c"
1050290001Sglebius  puts(_("standard output"));
1051290001Sglebius#line 274 "../usage.c"
1052290001Sglebius  puts(_("standard output"));
1053290001Sglebius#line 415 "../usage.c"
1054290001Sglebius  puts(_("standard output"));
1055290001Sglebius#line 625 "../usage.c"
1056290001Sglebius  puts(_("standard output"));
1057290001Sglebius#line 175 "../version.c"
1058290001Sglebius  puts(_("standard output"));
1059290001Sglebius#line 274 "../usage.c"
1060290001Sglebius  puts(_("standard error"));
1061290001Sglebius#line 415 "../usage.c"
1062290001Sglebius  puts(_("standard error"));
1063290001Sglebius#line 625 "../usage.c"
1064290001Sglebius  puts(_("standard error"));
1065290001Sglebius#line 175 "../version.c"
1066290001Sglebius  puts(_("standard error"));
1067290001Sglebius#line 208 "../makeshell.c"
1068290001Sglebius  puts(_("write"));
1069290001Sglebius#line 943 "../makeshell.c"
1070290001Sglebius  puts(_("write"));
1071290001Sglebius#line 273 "../usage.c"
1072290001Sglebius  puts(_("write"));
1073290001Sglebius#line 414 "../usage.c"
1074290001Sglebius  puts(_("write"));
1075290001Sglebius#line 624 "../usage.c"
1076290001Sglebius  puts(_("write"));
1077290001Sglebius#line 174 "../version.c"
1078290001Sglebius  puts(_("write"));
1079290001Sglebius#line 60 "../numeric.c"
1080290001Sglebius  puts(_("%s error:  %s option value %ld is out of range.\n"));
1081290001Sglebius#line 44 "../check.c"
1082290001Sglebius  puts(_("%s error:  %s option requires the %s option\n"));
1083290001Sglebius#line 131 "../save.c"
1084290001Sglebius  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1085290001Sglebius#line 183 "../save.c"
1086290001Sglebius  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1087290001Sglebius#line 237 "../save.c"
1088290001Sglebius  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1089290001Sglebius#line 256 "../save.c"
1090290001Sglebius  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1091290001Sglebius#line 534 "../save.c"
1092290001Sglebius  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1093290001Sglebius  /* END-LIBOPTS-MESSAGES */
1094290001Sglebius
1095290001Sglebius  /* USAGE-TEXT: */
1096290001Sglebius#line 873 "../usage.c"
1097290001Sglebius  puts(_("\t\t\t\t- an alternate for '%s'\n"));
1098290001Sglebius#line 1148 "../usage.c"
1099290001Sglebius  puts(_("Version, usage and configuration options:"));
1100290001Sglebius#line 924 "../usage.c"
1101290001Sglebius  puts(_("\t\t\t\t- default option for unnamed options\n"));
1102290001Sglebius#line 837 "../usage.c"
1103290001Sglebius  puts(_("\t\t\t\t- disabled as '--%s'\n"));
1104290001Sglebius#line 1117 "../usage.c"
1105290001Sglebius  puts(_(" --- %-14s %s\n"));
1106290001Sglebius#line 1115 "../usage.c"
1107290001Sglebius  puts(_("This option has been disabled"));
1108290001Sglebius#line 864 "../usage.c"
1109290001Sglebius  puts(_("\t\t\t\t- enabled by default\n"));
1110290001Sglebius#line 40 "../alias.c"
1111290001Sglebius  puts(_("%s error:  only "));
1112290001Sglebius#line 1194 "../usage.c"
1113290001Sglebius  puts(_(" - examining environment variables named %s_*\n"));
1114290001Sglebius#line 168 "../file.c"
1115290001Sglebius  puts(_("\t\t\t\t- file must not pre-exist\n"));
1116290001Sglebius#line 172 "../file.c"
1117290001Sglebius  puts(_("\t\t\t\t- file must pre-exist\n"));
1118290001Sglebius#line 380 "../usage.c"
1119290001Sglebius  puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1120290001Sglebius       "hyphen and the flag character.\n"));
1121290001Sglebius#line 921 "../makeshell.c"
1122290001Sglebius  puts(_("\n"
1123290001Sglebius       "= = = = = = = =\n\n"
1124290001Sglebius       "This incarnation of genshell will produce\n"
1125290001Sglebius       "a shell script to parse the options for %s:\n\n"));
1126290001Sglebius#line 166 "../enum.c"
1127290001Sglebius  puts(_("  or an integer mask with any of the lower %d bits set\n"));
1128290001Sglebius#line 897 "../usage.c"
1129290001Sglebius  puts(_("\t\t\t\t- is a set membership option\n"));
1130290001Sglebius#line 918 "../usage.c"
1131290001Sglebius  puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1132290001Sglebius#line 382 "../usage.c"
1133290001Sglebius  puts(_("Options are specified by single or double hyphens and their name.\n"));
1134290001Sglebius#line 904 "../usage.c"
1135290001Sglebius  puts(_("\t\t\t\t- may appear multiple times\n"));
1136290001Sglebius#line 891 "../usage.c"
1137290001Sglebius  puts(_("\t\t\t\t- may not be preset\n"));
1138290001Sglebius#line 1309 "../usage.c"
1139290001Sglebius  puts(_("   Arg Option-Name    Description\n"));
1140290001Sglebius#line 1245 "../usage.c"
1141290001Sglebius  puts(_("  Flg Arg Option-Name    Description\n"));
1142290001Sglebius#line 1303 "../usage.c"
1143290001Sglebius  puts(_("  Flg Arg Option-Name    Description\n"));
1144290001Sglebius#line 1304 "../usage.c"
1145290001Sglebius  puts(_(" %3s %s"));
1146290001Sglebius#line 1310 "../usage.c"
1147290001Sglebius  puts(_(" %3s %s"));
1148290001Sglebius#line 387 "../usage.c"
1149290001Sglebius  puts(_("The '-#<number>' option may omit the hash char\n"));
1150290001Sglebius#line 383 "../usage.c"
1151290001Sglebius  puts(_("All arguments are named options.\n"));
1152290001Sglebius#line 971 "../usage.c"
1153290001Sglebius  puts(_(" - reading file %s"));
1154290001Sglebius#line 409 "../usage.c"
1155290001Sglebius  puts(_("\n"
1156290001Sglebius       "Please send bug reports to:  <%s>\n"));
1157290001Sglebius#line 100 "../version.c"
1158290001Sglebius  puts(_("\n"
1159290001Sglebius       "Please send bug reports to:  <%s>\n"));
1160290001Sglebius#line 129 "../version.c"
1161290001Sglebius  puts(_("\n"
1162290001Sglebius       "Please send bug reports to:  <%s>\n"));
1163290001Sglebius#line 903 "../usage.c"
1164290001Sglebius  puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1165290001Sglebius#line 944 "../usage.c"
1166290001Sglebius  puts(_("\n"
1167290001Sglebius       "The following option preset mechanisms are supported:\n"));
1168290001Sglebius#line 1192 "../usage.c"
1169290001Sglebius  puts(_("\n"
1170290001Sglebius       "The following option preset mechanisms are supported:\n"));
1171290001Sglebius#line 682 "../usage.c"
1172290001Sglebius  puts(_("prohibits these options:\n"));
1173290001Sglebius#line 677 "../usage.c"
1174290001Sglebius  puts(_("prohibits the option '%s'\n"));
1175290001Sglebius#line 81 "../numeric.c"
1176290001Sglebius  puts(_("%s%ld to %ld"));
1177290001Sglebius#line 79 "../numeric.c"
1178290001Sglebius  puts(_("%sgreater than or equal to %ld"));
1179290001Sglebius#line 75 "../numeric.c"
1180290001Sglebius  puts(_("%s%ld exactly"));
1181290001Sglebius#line 68 "../numeric.c"
1182290001Sglebius  puts(_("%sit must lie in one of the ranges:\n"));
1183290001Sglebius#line 68 "../numeric.c"
1184290001Sglebius  puts(_("%sit must be in the range:\n"));
1185290001Sglebius#line 88 "../numeric.c"
1186290001Sglebius  puts(_(", or\n"));
1187290001Sglebius#line 66 "../numeric.c"
1188290001Sglebius  puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1189290001Sglebius#line 77 "../numeric.c"
1190290001Sglebius  puts(_("%sless than or equal to %ld"));
1191290001Sglebius#line 390 "../usage.c"
1192290001Sglebius  puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
1193290001Sglebius#line 652 "../usage.c"
1194290001Sglebius  puts(_("requires the option '%s'\n"));
1195290001Sglebius#line 655 "../usage.c"
1196290001Sglebius  puts(_("requires these options:\n"));
1197290001Sglebius#line 1321 "../usage.c"
1198290001Sglebius  puts(_("   Arg Option-Name   Req?  Description\n"));
1199290001Sglebius#line 1315 "../usage.c"
1200290001Sglebius  puts(_("  Flg Arg Option-Name   Req?  Description\n"));
1201290001Sglebius#line 167 "../enum.c"
1202290001Sglebius  puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
1203290001Sglebius       "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1204290001Sglebius       "will set them all.  Multiple entries may be passed as an option\n"
1205290001Sglebius       "argument list.\n"));
1206290001Sglebius#line 910 "../usage.c"
1207290001Sglebius  puts(_("\t\t\t\t- may appear up to %d times\n"));
1208290001Sglebius#line 77 "../enum.c"
1209290001Sglebius  puts(_("The valid \"%s\" option keywords are:\n"));
1210290001Sglebius#line 1152 "../usage.c"
1211290001Sglebius  puts(_("The next option supports vendor supported extra options:"));
1212290001Sglebius#line 773 "../usage.c"
1213290001Sglebius  puts(_("These additional options are:"));
1214290001Sglebius  /* END-USAGE-TEXT */
1215290001Sglebius}
1216290001Sglebius#endif /* uncompilable code */
1217181834Sroberto#ifdef  __cplusplus
1218181834Sroberto}
1219181834Sroberto#endif
1220181834Sroberto/* ntpq-opts.c ends here */
1221