xref: /freebsd/contrib/ntp/util/ntp-keygen-opts.c (revision 2b15cb3d0922bd70ea592f0da9b4a5b167f4d53f)
1ea906c41SOllivier Robert /*
2ea906c41SOllivier Robert  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
3ea906c41SOllivier Robert  *
4*2b15cb3dSCy Schubert  *  It has been AutoGen-ed  February  4, 2015 at 02:43:42 AM by AutoGen 5.18.5pre4
5ea906c41SOllivier Robert  *  From the definitions    ntp-keygen-opts.def
6ea906c41SOllivier Robert  *  and the template file   options
7ea906c41SOllivier Robert  *
8*2b15cb3dSCy Schubert  * Generated from AutoOpts 41:0:16 templates.
9*2b15cb3dSCy Schubert  *
10*2b15cb3dSCy Schubert  *  AutoOpts is a copyrighted work.  This source file is not encumbered
11*2b15cb3dSCy Schubert  *  by AutoOpts licensing, but is provided under the licensing terms chosen
12*2b15cb3dSCy Schubert  *  by the ntp-keygen author or copyright holder.  AutoOpts is
13*2b15cb3dSCy Schubert  *  licensed under the terms of the LGPL.  The redistributable library
14*2b15cb3dSCy Schubert  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
15*2b15cb3dSCy Schubert  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
16*2b15cb3dSCy Schubert  *  for details.
17*2b15cb3dSCy Schubert  *
18*2b15cb3dSCy Schubert  * The ntp-keygen program is copyrighted and licensed
19*2b15cb3dSCy Schubert  * under the following terms:
20*2b15cb3dSCy Schubert  *
21*2b15cb3dSCy Schubert  *  Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
22*2b15cb3dSCy Schubert  *  This is free software. It is licensed for use, modification and
23*2b15cb3dSCy Schubert  *  redistribution under the terms of the NTP License, copies of which
24*2b15cb3dSCy Schubert  *  can be seen at:
25*2b15cb3dSCy Schubert  *    <http://ntp.org/license>
26*2b15cb3dSCy Schubert  *    <http://opensource.org/licenses/ntp-license.php>
27*2b15cb3dSCy Schubert  *
28*2b15cb3dSCy Schubert  *  Permission to use, copy, modify, and distribute this software and its
29*2b15cb3dSCy Schubert  *  documentation for any purpose with or without fee is hereby granted,
30*2b15cb3dSCy Schubert  *  provided that the above copyright notice appears in all copies and that
31*2b15cb3dSCy Schubert  *  both the copyright notice and this permission notice appear in
32*2b15cb3dSCy Schubert  *  supporting documentation, and that the name The University of Delaware not be used in
33*2b15cb3dSCy Schubert  *  advertising or publicity pertaining to distribution of the software
34*2b15cb3dSCy Schubert  *  without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
35*2b15cb3dSCy Schubert  *  representations about the suitability this software for any purpose. It
36*2b15cb3dSCy Schubert  *  is provided "as is" without express or implied warranty.
37ea906c41SOllivier Robert  */
38ea906c41SOllivier Robert 
39*2b15cb3dSCy Schubert #ifndef __doxygen__
40*2b15cb3dSCy Schubert #define OPTION_CODE_COMPILE 1
41*2b15cb3dSCy Schubert #include "ntp-keygen-opts.h"
42*2b15cb3dSCy Schubert #include <sys/types.h>
43ea906c41SOllivier Robert 
44ea906c41SOllivier Robert #include <limits.h>
45ea906c41SOllivier Robert #include <stdio.h>
46*2b15cb3dSCy Schubert #include <stdlib.h>
47*2b15cb3dSCy Schubert #include <errno.h>
48ea906c41SOllivier Robert 
49ea906c41SOllivier Robert #ifdef  __cplusplus
50ea906c41SOllivier Robert extern "C" {
51ea906c41SOllivier Robert #endif
52*2b15cb3dSCy Schubert extern FILE * option_usage_fp;
53*2b15cb3dSCy Schubert #define zCopyright      (ntp_keygen_opt_strs+0)
54*2b15cb3dSCy Schubert #define zLicenseDescrip (ntp_keygen_opt_strs+352)
55ea906c41SOllivier Robert 
56ea906c41SOllivier Robert /*
57ea906c41SOllivier Robert  *  global included definitions
58ea906c41SOllivier Robert  */
59ea906c41SOllivier Robert #include <stdlib.h>
60*2b15cb3dSCy Schubert 
61ea906c41SOllivier Robert #ifdef __windows
62ea906c41SOllivier Robert   extern int atoi(const char*);
63ea906c41SOllivier Robert #else
64ea906c41SOllivier Robert # include <stdlib.h>
65ea906c41SOllivier Robert #endif
66ea906c41SOllivier Robert 
67ea906c41SOllivier Robert #ifndef NULL
68ea906c41SOllivier Robert #  define NULL 0
69ea906c41SOllivier Robert #endif
70*2b15cb3dSCy Schubert 
71*2b15cb3dSCy Schubert /**
72*2b15cb3dSCy Schubert  *  static const strings for ntp-keygen options
73ea906c41SOllivier Robert  */
74*2b15cb3dSCy Schubert static char const ntp_keygen_opt_strs[2419] =
75*2b15cb3dSCy Schubert /*     0 */ "ntp-keygen (ntp) 4.2.8p1\n"
76*2b15cb3dSCy Schubert             "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
77*2b15cb3dSCy Schubert             "This is free software. It is licensed for use, modification and\n"
78*2b15cb3dSCy Schubert             "redistribution under the terms of the NTP License, copies of which\n"
79*2b15cb3dSCy Schubert             "can be seen at:\n"
80*2b15cb3dSCy Schubert             "  <http://ntp.org/license>\n"
81*2b15cb3dSCy Schubert             "  <http://opensource.org/licenses/ntp-license.php>\n\0"
82*2b15cb3dSCy Schubert /*   352 */ "Permission to use, copy, modify, and distribute this software and its\n"
83*2b15cb3dSCy Schubert             "documentation for any purpose with or without fee is hereby granted,\n"
84*2b15cb3dSCy Schubert             "provided that the above copyright notice appears in all copies and that\n"
85*2b15cb3dSCy Schubert             "both the copyright notice and this permission notice appear in supporting\n"
86*2b15cb3dSCy Schubert             "documentation, and that the name The University of Delaware not be used in\n"
87*2b15cb3dSCy Schubert             "advertising or publicity pertaining to distribution of the software without\n"
88*2b15cb3dSCy Schubert             "specific, written prior permission.  The University of Delaware and Network\n"
89*2b15cb3dSCy Schubert             "Time Foundation makes no representations about the suitability this\n"
90*2b15cb3dSCy Schubert             "software for any purpose.  It is provided \"as is\" without express or\n"
91*2b15cb3dSCy Schubert             "implied warranty.\n\0"
92*2b15cb3dSCy Schubert /*  1020 */ "identity modulus bits\0"
93*2b15cb3dSCy Schubert /*  1042 */ "IMBITS\0"
94*2b15cb3dSCy Schubert /*  1049 */ "imbits\0"
95*2b15cb3dSCy Schubert /*  1056 */ "certificate scheme\0"
96*2b15cb3dSCy Schubert /*  1075 */ "CERTIFICATE\0"
97*2b15cb3dSCy Schubert /*  1087 */ "certificate\0"
98*2b15cb3dSCy Schubert /*  1099 */ "privatekey cipher\0"
99*2b15cb3dSCy Schubert /*  1117 */ "CIPHER\0"
100*2b15cb3dSCy Schubert /*  1124 */ "cipher\0"
101*2b15cb3dSCy Schubert /*  1131 */ "Increase debug verbosity level\0"
102*2b15cb3dSCy Schubert /*  1162 */ "DEBUG_LEVEL\0"
103*2b15cb3dSCy Schubert /*  1174 */ "debug-level\0"
104*2b15cb3dSCy Schubert /*  1186 */ "Set the debug verbosity level\0"
105*2b15cb3dSCy Schubert /*  1216 */ "SET_DEBUG_LEVEL\0"
106*2b15cb3dSCy Schubert /*  1232 */ "set-debug-level\0"
107*2b15cb3dSCy Schubert /*  1248 */ "Write IFF or GQ identity keys\0"
108*2b15cb3dSCy Schubert /*  1278 */ "ID_KEY\0"
109*2b15cb3dSCy Schubert /*  1285 */ "id-key\0"
110*2b15cb3dSCy Schubert /*  1292 */ "Generate GQ parameters and keys\0"
111*2b15cb3dSCy Schubert /*  1324 */ "GQ_PARAMS\0"
112*2b15cb3dSCy Schubert /*  1334 */ "gq-params\0"
113*2b15cb3dSCy Schubert /*  1344 */ "generate RSA host key\0"
114*2b15cb3dSCy Schubert /*  1366 */ "HOST_KEY\0"
115*2b15cb3dSCy Schubert /*  1375 */ "host-key\0"
116*2b15cb3dSCy Schubert /*  1384 */ "generate IFF parameters\0"
117*2b15cb3dSCy Schubert /*  1408 */ "IFFKEY\0"
118*2b15cb3dSCy Schubert /*  1415 */ "iffkey\0"
119*2b15cb3dSCy Schubert /*  1422 */ "set Autokey group name\0"
120*2b15cb3dSCy Schubert /*  1445 */ "IDENT\0"
121*2b15cb3dSCy Schubert /*  1451 */ "ident\0"
122*2b15cb3dSCy Schubert /*  1457 */ "set certificate lifetime\0"
123*2b15cb3dSCy Schubert /*  1482 */ "LIFETIME\0"
124*2b15cb3dSCy Schubert /*  1491 */ "lifetime\0"
125*2b15cb3dSCy Schubert /*  1500 */ "generate MD5 keys\0"
126*2b15cb3dSCy Schubert /*  1518 */ "MD5KEY\0"
127*2b15cb3dSCy Schubert /*  1525 */ "md5key\0"
128*2b15cb3dSCy Schubert /*  1532 */ "modulus\0"
129*2b15cb3dSCy Schubert /*  1540 */ "MODULUS\0"
130*2b15cb3dSCy Schubert /*  1548 */ "generate PC private certificate\0"
131*2b15cb3dSCy Schubert /*  1580 */ "PVT_CERT\0"
132*2b15cb3dSCy Schubert /*  1589 */ "pvt-cert\0"
133*2b15cb3dSCy Schubert /*  1598 */ "local private password\0"
134*2b15cb3dSCy Schubert /*  1621 */ "PASSWORD\0"
135*2b15cb3dSCy Schubert /*  1630 */ "password\0"
136*2b15cb3dSCy Schubert /*  1639 */ "export IFF or GQ group keys with password\0"
137*2b15cb3dSCy Schubert /*  1681 */ "EXPORT_PASSWD\0"
138*2b15cb3dSCy Schubert /*  1695 */ "export-passwd\0"
139*2b15cb3dSCy Schubert /*  1709 */ "generate sign key (RSA or DSA)\0"
140*2b15cb3dSCy Schubert /*  1740 */ "SIGN_KEY\0"
141*2b15cb3dSCy Schubert /*  1749 */ "sign-key\0"
142*2b15cb3dSCy Schubert /*  1758 */ "set host and optionally group name\0"
143*2b15cb3dSCy Schubert /*  1793 */ "SUBJECT_NAME\0"
144*2b15cb3dSCy Schubert /*  1806 */ "subject-name\0"
145*2b15cb3dSCy Schubert /*  1819 */ "trusted certificate (TC scheme)\0"
146*2b15cb3dSCy Schubert /*  1851 */ "TRUSTED_CERT\0"
147*2b15cb3dSCy Schubert /*  1864 */ "trusted-cert\0"
148*2b15cb3dSCy Schubert /*  1877 */ "generate <num> MV parameters\0"
149*2b15cb3dSCy Schubert /*  1906 */ "MV_PARAMS\0"
150*2b15cb3dSCy Schubert /*  1916 */ "mv-params\0"
151*2b15cb3dSCy Schubert /*  1926 */ "update <num> MV keys\0"
152*2b15cb3dSCy Schubert /*  1947 */ "MV_KEYS\0"
153*2b15cb3dSCy Schubert /*  1955 */ "mv-keys\0"
154*2b15cb3dSCy Schubert /*  1963 */ "display extended usage information and exit\0"
155*2b15cb3dSCy Schubert /*  2007 */ "help\0"
156*2b15cb3dSCy Schubert /*  2012 */ "extended usage information passed thru pager\0"
157*2b15cb3dSCy Schubert /*  2057 */ "more-help\0"
158*2b15cb3dSCy Schubert /*  2067 */ "output version information and exit\0"
159*2b15cb3dSCy Schubert /*  2103 */ "version\0"
160*2b15cb3dSCy Schubert /*  2111 */ "save the option state to a config file\0"
161*2b15cb3dSCy Schubert /*  2150 */ "save-opts\0"
162*2b15cb3dSCy Schubert /*  2160 */ "load options from a config file\0"
163*2b15cb3dSCy Schubert /*  2192 */ "LOAD_OPTS\0"
164*2b15cb3dSCy Schubert /*  2202 */ "no-load-opts\0"
165*2b15cb3dSCy Schubert /*  2215 */ "no\0"
166*2b15cb3dSCy Schubert /*  2218 */ "NTP_KEYGEN\0"
167*2b15cb3dSCy Schubert /*  2229 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1\n"
168*2b15cb3dSCy Schubert             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
169*2b15cb3dSCy Schubert /*  2343 */ "$HOME\0"
170*2b15cb3dSCy Schubert /*  2349 */ ".\0"
171*2b15cb3dSCy Schubert /*  2351 */ ".ntprc\0"
172*2b15cb3dSCy Schubert /*  2358 */ "http://bugs.ntp.org, bugs@ntp.org\0"
173*2b15cb3dSCy Schubert /*  2392 */ "\n\0"
174*2b15cb3dSCy Schubert /*  2394 */ "ntp-keygen (ntp) 4.2.8p1";
175*2b15cb3dSCy Schubert 
176*2b15cb3dSCy Schubert /**
177*2b15cb3dSCy Schubert  *  imbits option description:
178*2b15cb3dSCy Schubert  */
179*2b15cb3dSCy Schubert #ifdef AUTOKEY
180*2b15cb3dSCy Schubert /** Descriptive text for the imbits option */
181*2b15cb3dSCy Schubert #define IMBITS_DESC      (ntp_keygen_opt_strs+1020)
182*2b15cb3dSCy Schubert /** Upper-cased name for the imbits option */
183*2b15cb3dSCy Schubert #define IMBITS_NAME      (ntp_keygen_opt_strs+1042)
184*2b15cb3dSCy Schubert /** Name string for the imbits option */
185*2b15cb3dSCy Schubert #define IMBITS_name      (ntp_keygen_opt_strs+1049)
186*2b15cb3dSCy Schubert /** Compiled in flag settings for the imbits option */
187*2b15cb3dSCy Schubert #define IMBITS_FLAGS     (OPTST_DISABLED \
188*2b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
189*2b15cb3dSCy Schubert 
190*2b15cb3dSCy Schubert #else   /* disable imbits */
191*2b15cb3dSCy Schubert #define IMBITS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
192*2b15cb3dSCy Schubert #define IMBITS_NAME      NULL
193*2b15cb3dSCy Schubert #define IMBITS_DESC      NULL
194*2b15cb3dSCy Schubert #define IMBITS_name      NULL
195*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
196*2b15cb3dSCy Schubert 
197*2b15cb3dSCy Schubert /**
198*2b15cb3dSCy Schubert  *  certificate option description:
199*2b15cb3dSCy Schubert  */
200*2b15cb3dSCy Schubert #ifdef AUTOKEY
201*2b15cb3dSCy Schubert /** Descriptive text for the certificate option */
202*2b15cb3dSCy Schubert #define CERTIFICATE_DESC      (ntp_keygen_opt_strs+1056)
203*2b15cb3dSCy Schubert /** Upper-cased name for the certificate option */
204*2b15cb3dSCy Schubert #define CERTIFICATE_NAME      (ntp_keygen_opt_strs+1075)
205*2b15cb3dSCy Schubert /** Name string for the certificate option */
206*2b15cb3dSCy Schubert #define CERTIFICATE_name      (ntp_keygen_opt_strs+1087)
207*2b15cb3dSCy Schubert /** Compiled in flag settings for the certificate option */
208ea906c41SOllivier Robert #define CERTIFICATE_FLAGS     (OPTST_DISABLED \
209ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
210ea906c41SOllivier Robert 
211*2b15cb3dSCy Schubert #else   /* disable certificate */
212ea906c41SOllivier Robert #define CERTIFICATE_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
213*2b15cb3dSCy Schubert #define CERTIFICATE_NAME      NULL
214*2b15cb3dSCy Schubert #define CERTIFICATE_DESC      NULL
215*2b15cb3dSCy Schubert #define CERTIFICATE_name      NULL
216*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
217ea906c41SOllivier Robert 
218*2b15cb3dSCy Schubert /**
219*2b15cb3dSCy Schubert  *  cipher option description:
220ea906c41SOllivier Robert  */
221*2b15cb3dSCy Schubert #ifdef AUTOKEY
222*2b15cb3dSCy Schubert /** Descriptive text for the cipher option */
223*2b15cb3dSCy Schubert #define CIPHER_DESC      (ntp_keygen_opt_strs+1099)
224*2b15cb3dSCy Schubert /** Upper-cased name for the cipher option */
225*2b15cb3dSCy Schubert #define CIPHER_NAME      (ntp_keygen_opt_strs+1117)
226*2b15cb3dSCy Schubert /** Name string for the cipher option */
227*2b15cb3dSCy Schubert #define CIPHER_name      (ntp_keygen_opt_strs+1124)
228*2b15cb3dSCy Schubert /** Compiled in flag settings for the cipher option */
229*2b15cb3dSCy Schubert #define CIPHER_FLAGS     (OPTST_DISABLED \
230ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
231ea906c41SOllivier Robert 
232*2b15cb3dSCy Schubert #else   /* disable cipher */
233*2b15cb3dSCy Schubert #define CIPHER_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
234*2b15cb3dSCy Schubert #define CIPHER_NAME      NULL
235*2b15cb3dSCy Schubert #define CIPHER_DESC      NULL
236*2b15cb3dSCy Schubert #define CIPHER_name      NULL
237*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
238ea906c41SOllivier Robert 
239*2b15cb3dSCy Schubert /**
240*2b15cb3dSCy Schubert  *  debug-level option description:
241ea906c41SOllivier Robert  */
242*2b15cb3dSCy Schubert /** Descriptive text for the debug-level option */
243*2b15cb3dSCy Schubert #define DEBUG_LEVEL_DESC      (ntp_keygen_opt_strs+1131)
244*2b15cb3dSCy Schubert /** Upper-cased name for the debug-level option */
245*2b15cb3dSCy Schubert #define DEBUG_LEVEL_NAME      (ntp_keygen_opt_strs+1162)
246*2b15cb3dSCy Schubert /** Name string for the debug-level option */
247*2b15cb3dSCy Schubert #define DEBUG_LEVEL_name      (ntp_keygen_opt_strs+1174)
248*2b15cb3dSCy Schubert /** Compiled in flag settings for the debug-level option */
249*2b15cb3dSCy Schubert #define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
250*2b15cb3dSCy Schubert 
251*2b15cb3dSCy Schubert /**
252*2b15cb3dSCy Schubert  *  set-debug-level option description:
253*2b15cb3dSCy Schubert  */
254*2b15cb3dSCy Schubert /** Descriptive text for the set-debug-level option */
255*2b15cb3dSCy Schubert #define SET_DEBUG_LEVEL_DESC      (ntp_keygen_opt_strs+1186)
256*2b15cb3dSCy Schubert /** Upper-cased name for the set-debug-level option */
257*2b15cb3dSCy Schubert #define SET_DEBUG_LEVEL_NAME      (ntp_keygen_opt_strs+1216)
258*2b15cb3dSCy Schubert /** Name string for the set-debug-level option */
259*2b15cb3dSCy Schubert #define SET_DEBUG_LEVEL_name      (ntp_keygen_opt_strs+1232)
260*2b15cb3dSCy Schubert /** Compiled in flag settings for the set-debug-level option */
261*2b15cb3dSCy Schubert #define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
262*2b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
263*2b15cb3dSCy Schubert 
264*2b15cb3dSCy Schubert /**
265*2b15cb3dSCy Schubert  *  id-key option description:
266*2b15cb3dSCy Schubert  */
267*2b15cb3dSCy Schubert #ifdef AUTOKEY
268*2b15cb3dSCy Schubert /** Descriptive text for the id-key option */
269*2b15cb3dSCy Schubert #define ID_KEY_DESC      (ntp_keygen_opt_strs+1248)
270*2b15cb3dSCy Schubert /** Upper-cased name for the id-key option */
271*2b15cb3dSCy Schubert #define ID_KEY_NAME      (ntp_keygen_opt_strs+1278)
272*2b15cb3dSCy Schubert /** Name string for the id-key option */
273*2b15cb3dSCy Schubert #define ID_KEY_name      (ntp_keygen_opt_strs+1285)
274*2b15cb3dSCy Schubert /** Compiled in flag settings for the id-key option */
275ea906c41SOllivier Robert #define ID_KEY_FLAGS     (OPTST_DISABLED)
276ea906c41SOllivier Robert 
277*2b15cb3dSCy Schubert #else   /* disable id-key */
278ea906c41SOllivier Robert #define ID_KEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
279*2b15cb3dSCy Schubert #define ID_KEY_NAME      NULL
280*2b15cb3dSCy Schubert #define ID_KEY_DESC      NULL
281*2b15cb3dSCy Schubert #define ID_KEY_name      NULL
282*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
283ea906c41SOllivier Robert 
284*2b15cb3dSCy Schubert /**
285*2b15cb3dSCy Schubert  *  gq-params option description:
286ea906c41SOllivier Robert  */
287*2b15cb3dSCy Schubert #ifdef AUTOKEY
288*2b15cb3dSCy Schubert /** Descriptive text for the gq-params option */
289*2b15cb3dSCy Schubert #define GQ_PARAMS_DESC      (ntp_keygen_opt_strs+1292)
290*2b15cb3dSCy Schubert /** Upper-cased name for the gq-params option */
291*2b15cb3dSCy Schubert #define GQ_PARAMS_NAME      (ntp_keygen_opt_strs+1324)
292*2b15cb3dSCy Schubert /** Name string for the gq-params option */
293*2b15cb3dSCy Schubert #define GQ_PARAMS_name      (ntp_keygen_opt_strs+1334)
294*2b15cb3dSCy Schubert /** Compiled in flag settings for the gq-params option */
295ea906c41SOllivier Robert #define GQ_PARAMS_FLAGS     (OPTST_DISABLED)
296ea906c41SOllivier Robert 
297*2b15cb3dSCy Schubert #else   /* disable gq-params */
298ea906c41SOllivier Robert #define GQ_PARAMS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
299*2b15cb3dSCy Schubert #define GQ_PARAMS_NAME      NULL
300*2b15cb3dSCy Schubert #define GQ_PARAMS_DESC      NULL
301*2b15cb3dSCy Schubert #define GQ_PARAMS_name      NULL
302*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
303ea906c41SOllivier Robert 
304*2b15cb3dSCy Schubert /**
305*2b15cb3dSCy Schubert  *  host-key option description:
306ea906c41SOllivier Robert  */
307*2b15cb3dSCy Schubert #ifdef AUTOKEY
308*2b15cb3dSCy Schubert /** Descriptive text for the host-key option */
309*2b15cb3dSCy Schubert #define HOST_KEY_DESC      (ntp_keygen_opt_strs+1344)
310*2b15cb3dSCy Schubert /** Upper-cased name for the host-key option */
311*2b15cb3dSCy Schubert #define HOST_KEY_NAME      (ntp_keygen_opt_strs+1366)
312*2b15cb3dSCy Schubert /** Name string for the host-key option */
313*2b15cb3dSCy Schubert #define HOST_KEY_name      (ntp_keygen_opt_strs+1375)
314*2b15cb3dSCy Schubert /** Compiled in flag settings for the host-key option */
315ea906c41SOllivier Robert #define HOST_KEY_FLAGS     (OPTST_DISABLED)
316ea906c41SOllivier Robert 
317*2b15cb3dSCy Schubert #else   /* disable host-key */
318ea906c41SOllivier Robert #define HOST_KEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
319*2b15cb3dSCy Schubert #define HOST_KEY_NAME      NULL
320*2b15cb3dSCy Schubert #define HOST_KEY_DESC      NULL
321*2b15cb3dSCy Schubert #define HOST_KEY_name      NULL
322*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
323ea906c41SOllivier Robert 
324*2b15cb3dSCy Schubert /**
325*2b15cb3dSCy Schubert  *  iffkey option description:
326ea906c41SOllivier Robert  */
327*2b15cb3dSCy Schubert #ifdef AUTOKEY
328*2b15cb3dSCy Schubert /** Descriptive text for the iffkey option */
329*2b15cb3dSCy Schubert #define IFFKEY_DESC      (ntp_keygen_opt_strs+1384)
330*2b15cb3dSCy Schubert /** Upper-cased name for the iffkey option */
331*2b15cb3dSCy Schubert #define IFFKEY_NAME      (ntp_keygen_opt_strs+1408)
332*2b15cb3dSCy Schubert /** Name string for the iffkey option */
333*2b15cb3dSCy Schubert #define IFFKEY_name      (ntp_keygen_opt_strs+1415)
334*2b15cb3dSCy Schubert /** Compiled in flag settings for the iffkey option */
335ea906c41SOllivier Robert #define IFFKEY_FLAGS     (OPTST_DISABLED)
336ea906c41SOllivier Robert 
337*2b15cb3dSCy Schubert #else   /* disable iffkey */
338ea906c41SOllivier Robert #define IFFKEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
339*2b15cb3dSCy Schubert #define IFFKEY_NAME      NULL
340*2b15cb3dSCy Schubert #define IFFKEY_DESC      NULL
341*2b15cb3dSCy Schubert #define IFFKEY_name      NULL
342*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
343ea906c41SOllivier Robert 
344*2b15cb3dSCy Schubert /**
345*2b15cb3dSCy Schubert  *  ident option description:
346ea906c41SOllivier Robert  */
347*2b15cb3dSCy Schubert #ifdef AUTOKEY
348*2b15cb3dSCy Schubert /** Descriptive text for the ident option */
349*2b15cb3dSCy Schubert #define IDENT_DESC      (ntp_keygen_opt_strs+1422)
350*2b15cb3dSCy Schubert /** Upper-cased name for the ident option */
351*2b15cb3dSCy Schubert #define IDENT_NAME      (ntp_keygen_opt_strs+1445)
352*2b15cb3dSCy Schubert /** Name string for the ident option */
353*2b15cb3dSCy Schubert #define IDENT_name      (ntp_keygen_opt_strs+1451)
354*2b15cb3dSCy Schubert /** Compiled in flag settings for the ident option */
355*2b15cb3dSCy Schubert #define IDENT_FLAGS     (OPTST_DISABLED \
356*2b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
357ea906c41SOllivier Robert 
358*2b15cb3dSCy Schubert #else   /* disable ident */
359*2b15cb3dSCy Schubert #define IDENT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
360*2b15cb3dSCy Schubert #define IDENT_NAME      NULL
361*2b15cb3dSCy Schubert #define IDENT_DESC      NULL
362*2b15cb3dSCy Schubert #define IDENT_name      NULL
363*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
364ea906c41SOllivier Robert 
365*2b15cb3dSCy Schubert /**
366*2b15cb3dSCy Schubert  *  lifetime option description:
367ea906c41SOllivier Robert  */
368*2b15cb3dSCy Schubert #ifdef AUTOKEY
369*2b15cb3dSCy Schubert /** Descriptive text for the lifetime option */
370*2b15cb3dSCy Schubert #define LIFETIME_DESC      (ntp_keygen_opt_strs+1457)
371*2b15cb3dSCy Schubert /** Upper-cased name for the lifetime option */
372*2b15cb3dSCy Schubert #define LIFETIME_NAME      (ntp_keygen_opt_strs+1482)
373*2b15cb3dSCy Schubert /** Name string for the lifetime option */
374*2b15cb3dSCy Schubert #define LIFETIME_name      (ntp_keygen_opt_strs+1491)
375*2b15cb3dSCy Schubert /** Compiled in flag settings for the lifetime option */
376*2b15cb3dSCy Schubert #define LIFETIME_FLAGS     (OPTST_DISABLED \
377*2b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
378*2b15cb3dSCy Schubert 
379*2b15cb3dSCy Schubert #else   /* disable lifetime */
380*2b15cb3dSCy Schubert #define LIFETIME_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
381*2b15cb3dSCy Schubert #define LIFETIME_NAME      NULL
382*2b15cb3dSCy Schubert #define LIFETIME_DESC      NULL
383*2b15cb3dSCy Schubert #define LIFETIME_name      NULL
384*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
385*2b15cb3dSCy Schubert 
386*2b15cb3dSCy Schubert /**
387*2b15cb3dSCy Schubert  *  md5key option description:
388*2b15cb3dSCy Schubert  */
389*2b15cb3dSCy Schubert /** Descriptive text for the md5key option */
390*2b15cb3dSCy Schubert #define MD5KEY_DESC      (ntp_keygen_opt_strs+1500)
391*2b15cb3dSCy Schubert /** Upper-cased name for the md5key option */
392*2b15cb3dSCy Schubert #define MD5KEY_NAME      (ntp_keygen_opt_strs+1518)
393*2b15cb3dSCy Schubert /** Name string for the md5key option */
394*2b15cb3dSCy Schubert #define MD5KEY_name      (ntp_keygen_opt_strs+1525)
395*2b15cb3dSCy Schubert /** Compiled in flag settings for the md5key option */
396ea906c41SOllivier Robert #define MD5KEY_FLAGS     (OPTST_DISABLED)
397ea906c41SOllivier Robert 
398*2b15cb3dSCy Schubert /**
399*2b15cb3dSCy Schubert  *  modulus option description:
400ea906c41SOllivier Robert  */
401*2b15cb3dSCy Schubert #ifdef AUTOKEY
402*2b15cb3dSCy Schubert /** Descriptive text for the modulus option */
403*2b15cb3dSCy Schubert #define MODULUS_DESC      (ntp_keygen_opt_strs+1532)
404*2b15cb3dSCy Schubert /** Upper-cased name for the modulus option */
405*2b15cb3dSCy Schubert #define MODULUS_NAME      (ntp_keygen_opt_strs+1540)
406*2b15cb3dSCy Schubert /** Name string for the modulus option */
407*2b15cb3dSCy Schubert #define MODULUS_name      (ntp_keygen_opt_strs+1532)
408*2b15cb3dSCy Schubert /** Compiled in flag settings for the modulus option */
409ea906c41SOllivier Robert #define MODULUS_FLAGS     (OPTST_DISABLED \
410ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
411ea906c41SOllivier Robert 
412*2b15cb3dSCy Schubert #else   /* disable modulus */
413ea906c41SOllivier Robert #define MODULUS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
414*2b15cb3dSCy Schubert #define MODULUS_NAME      NULL
415*2b15cb3dSCy Schubert #define MODULUS_DESC      NULL
416*2b15cb3dSCy Schubert #define MODULUS_name      NULL
417*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
418ea906c41SOllivier Robert 
419*2b15cb3dSCy Schubert /**
420*2b15cb3dSCy Schubert  *  pvt-cert option description:
421ea906c41SOllivier Robert  */
422*2b15cb3dSCy Schubert #ifdef AUTOKEY
423*2b15cb3dSCy Schubert /** Descriptive text for the pvt-cert option */
424*2b15cb3dSCy Schubert #define PVT_CERT_DESC      (ntp_keygen_opt_strs+1548)
425*2b15cb3dSCy Schubert /** Upper-cased name for the pvt-cert option */
426*2b15cb3dSCy Schubert #define PVT_CERT_NAME      (ntp_keygen_opt_strs+1580)
427*2b15cb3dSCy Schubert /** Name string for the pvt-cert option */
428*2b15cb3dSCy Schubert #define PVT_CERT_name      (ntp_keygen_opt_strs+1589)
429*2b15cb3dSCy Schubert /** Compiled in flag settings for the pvt-cert option */
430ea906c41SOllivier Robert #define PVT_CERT_FLAGS     (OPTST_DISABLED)
431ea906c41SOllivier Robert 
432*2b15cb3dSCy Schubert #else   /* disable pvt-cert */
433ea906c41SOllivier Robert #define PVT_CERT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
434*2b15cb3dSCy Schubert #define PVT_CERT_NAME      NULL
435*2b15cb3dSCy Schubert #define PVT_CERT_DESC      NULL
436*2b15cb3dSCy Schubert #define PVT_CERT_name      NULL
437*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
438ea906c41SOllivier Robert 
439*2b15cb3dSCy Schubert /**
440*2b15cb3dSCy Schubert  *  password option description:
441ea906c41SOllivier Robert  */
442*2b15cb3dSCy Schubert #ifdef AUTOKEY
443*2b15cb3dSCy Schubert /** Descriptive text for the password option */
444*2b15cb3dSCy Schubert #define PASSWORD_DESC      (ntp_keygen_opt_strs+1598)
445*2b15cb3dSCy Schubert /** Upper-cased name for the password option */
446*2b15cb3dSCy Schubert #define PASSWORD_NAME      (ntp_keygen_opt_strs+1621)
447*2b15cb3dSCy Schubert /** Name string for the password option */
448*2b15cb3dSCy Schubert #define PASSWORD_name      (ntp_keygen_opt_strs+1630)
449*2b15cb3dSCy Schubert /** Compiled in flag settings for the password option */
450*2b15cb3dSCy Schubert #define PASSWORD_FLAGS     (OPTST_DISABLED \
451ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
452ea906c41SOllivier Robert 
453*2b15cb3dSCy Schubert #else   /* disable password */
454*2b15cb3dSCy Schubert #define PASSWORD_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
455*2b15cb3dSCy Schubert #define PASSWORD_NAME      NULL
456*2b15cb3dSCy Schubert #define PASSWORD_DESC      NULL
457*2b15cb3dSCy Schubert #define PASSWORD_name      NULL
458*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
459ea906c41SOllivier Robert 
460*2b15cb3dSCy Schubert /**
461*2b15cb3dSCy Schubert  *  export-passwd option description:
462ea906c41SOllivier Robert  */
463*2b15cb3dSCy Schubert #ifdef AUTOKEY
464*2b15cb3dSCy Schubert /** Descriptive text for the export-passwd option */
465*2b15cb3dSCy Schubert #define EXPORT_PASSWD_DESC      (ntp_keygen_opt_strs+1639)
466*2b15cb3dSCy Schubert /** Upper-cased name for the export-passwd option */
467*2b15cb3dSCy Schubert #define EXPORT_PASSWD_NAME      (ntp_keygen_opt_strs+1681)
468*2b15cb3dSCy Schubert /** Name string for the export-passwd option */
469*2b15cb3dSCy Schubert #define EXPORT_PASSWD_name      (ntp_keygen_opt_strs+1695)
470*2b15cb3dSCy Schubert /** Compiled in flag settings for the export-passwd option */
471*2b15cb3dSCy Schubert #define EXPORT_PASSWD_FLAGS     (OPTST_DISABLED \
472ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
473ea906c41SOllivier Robert 
474*2b15cb3dSCy Schubert #else   /* disable export-passwd */
475*2b15cb3dSCy Schubert #define EXPORT_PASSWD_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
476*2b15cb3dSCy Schubert #define EXPORT_PASSWD_NAME      NULL
477*2b15cb3dSCy Schubert #define EXPORT_PASSWD_DESC      NULL
478*2b15cb3dSCy Schubert #define EXPORT_PASSWD_name      NULL
479*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
480ea906c41SOllivier Robert 
481*2b15cb3dSCy Schubert /**
482*2b15cb3dSCy Schubert  *  sign-key option description:
483ea906c41SOllivier Robert  */
484*2b15cb3dSCy Schubert #ifdef AUTOKEY
485*2b15cb3dSCy Schubert /** Descriptive text for the sign-key option */
486*2b15cb3dSCy Schubert #define SIGN_KEY_DESC      (ntp_keygen_opt_strs+1709)
487*2b15cb3dSCy Schubert /** Upper-cased name for the sign-key option */
488*2b15cb3dSCy Schubert #define SIGN_KEY_NAME      (ntp_keygen_opt_strs+1740)
489*2b15cb3dSCy Schubert /** Name string for the sign-key option */
490*2b15cb3dSCy Schubert #define SIGN_KEY_name      (ntp_keygen_opt_strs+1749)
491*2b15cb3dSCy Schubert /** Compiled in flag settings for the sign-key option */
492ea906c41SOllivier Robert #define SIGN_KEY_FLAGS     (OPTST_DISABLED \
493ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
494ea906c41SOllivier Robert 
495*2b15cb3dSCy Schubert #else   /* disable sign-key */
496ea906c41SOllivier Robert #define SIGN_KEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
497*2b15cb3dSCy Schubert #define SIGN_KEY_NAME      NULL
498*2b15cb3dSCy Schubert #define SIGN_KEY_DESC      NULL
499*2b15cb3dSCy Schubert #define SIGN_KEY_name      NULL
500*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
501ea906c41SOllivier Robert 
502*2b15cb3dSCy Schubert /**
503*2b15cb3dSCy Schubert  *  subject-name option description:
504ea906c41SOllivier Robert  */
505*2b15cb3dSCy Schubert #ifdef AUTOKEY
506*2b15cb3dSCy Schubert /** Descriptive text for the subject-name option */
507*2b15cb3dSCy Schubert #define SUBJECT_NAME_DESC      (ntp_keygen_opt_strs+1758)
508*2b15cb3dSCy Schubert /** Upper-cased name for the subject-name option */
509*2b15cb3dSCy Schubert #define SUBJECT_NAME_NAME      (ntp_keygen_opt_strs+1793)
510*2b15cb3dSCy Schubert /** Name string for the subject-name option */
511*2b15cb3dSCy Schubert #define SUBJECT_NAME_name      (ntp_keygen_opt_strs+1806)
512*2b15cb3dSCy Schubert /** Compiled in flag settings for the subject-name option */
513ea906c41SOllivier Robert #define SUBJECT_NAME_FLAGS     (OPTST_DISABLED \
514ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
515ea906c41SOllivier Robert 
516*2b15cb3dSCy Schubert #else   /* disable subject-name */
517ea906c41SOllivier Robert #define SUBJECT_NAME_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
518*2b15cb3dSCy Schubert #define SUBJECT_NAME_NAME      NULL
519*2b15cb3dSCy Schubert #define SUBJECT_NAME_DESC      NULL
520*2b15cb3dSCy Schubert #define SUBJECT_NAME_name      NULL
521*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
522ea906c41SOllivier Robert 
523*2b15cb3dSCy Schubert /**
524*2b15cb3dSCy Schubert  *  trusted-cert option description:
525ea906c41SOllivier Robert  */
526*2b15cb3dSCy Schubert #ifdef AUTOKEY
527*2b15cb3dSCy Schubert /** Descriptive text for the trusted-cert option */
528*2b15cb3dSCy Schubert #define TRUSTED_CERT_DESC      (ntp_keygen_opt_strs+1819)
529*2b15cb3dSCy Schubert /** Upper-cased name for the trusted-cert option */
530*2b15cb3dSCy Schubert #define TRUSTED_CERT_NAME      (ntp_keygen_opt_strs+1851)
531*2b15cb3dSCy Schubert /** Name string for the trusted-cert option */
532*2b15cb3dSCy Schubert #define TRUSTED_CERT_name      (ntp_keygen_opt_strs+1864)
533*2b15cb3dSCy Schubert /** Compiled in flag settings for the trusted-cert option */
534ea906c41SOllivier Robert #define TRUSTED_CERT_FLAGS     (OPTST_DISABLED)
535ea906c41SOllivier Robert 
536*2b15cb3dSCy Schubert #else   /* disable trusted-cert */
537ea906c41SOllivier Robert #define TRUSTED_CERT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
538*2b15cb3dSCy Schubert #define TRUSTED_CERT_NAME      NULL
539*2b15cb3dSCy Schubert #define TRUSTED_CERT_DESC      NULL
540*2b15cb3dSCy Schubert #define TRUSTED_CERT_name      NULL
541*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
542ea906c41SOllivier Robert 
543*2b15cb3dSCy Schubert /**
544*2b15cb3dSCy Schubert  *  mv-params option description:
545ea906c41SOllivier Robert  */
546*2b15cb3dSCy Schubert #ifdef AUTOKEY
547*2b15cb3dSCy Schubert /** Descriptive text for the mv-params option */
548*2b15cb3dSCy Schubert #define MV_PARAMS_DESC      (ntp_keygen_opt_strs+1877)
549*2b15cb3dSCy Schubert /** Upper-cased name for the mv-params option */
550*2b15cb3dSCy Schubert #define MV_PARAMS_NAME      (ntp_keygen_opt_strs+1906)
551*2b15cb3dSCy Schubert /** Name string for the mv-params option */
552*2b15cb3dSCy Schubert #define MV_PARAMS_name      (ntp_keygen_opt_strs+1916)
553*2b15cb3dSCy Schubert /** Compiled in flag settings for the mv-params option */
554ea906c41SOllivier Robert #define MV_PARAMS_FLAGS     (OPTST_DISABLED \
555ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
556ea906c41SOllivier Robert 
557*2b15cb3dSCy Schubert #else   /* disable mv-params */
558ea906c41SOllivier Robert #define MV_PARAMS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
559*2b15cb3dSCy Schubert #define MV_PARAMS_NAME      NULL
560*2b15cb3dSCy Schubert #define MV_PARAMS_DESC      NULL
561*2b15cb3dSCy Schubert #define MV_PARAMS_name      NULL
562*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
563ea906c41SOllivier Robert 
564*2b15cb3dSCy Schubert /**
565*2b15cb3dSCy Schubert  *  mv-keys option description:
566ea906c41SOllivier Robert  */
567*2b15cb3dSCy Schubert #ifdef AUTOKEY
568*2b15cb3dSCy Schubert /** Descriptive text for the mv-keys option */
569*2b15cb3dSCy Schubert #define MV_KEYS_DESC      (ntp_keygen_opt_strs+1926)
570*2b15cb3dSCy Schubert /** Upper-cased name for the mv-keys option */
571*2b15cb3dSCy Schubert #define MV_KEYS_NAME      (ntp_keygen_opt_strs+1947)
572*2b15cb3dSCy Schubert /** Name string for the mv-keys option */
573*2b15cb3dSCy Schubert #define MV_KEYS_name      (ntp_keygen_opt_strs+1955)
574*2b15cb3dSCy Schubert /** Compiled in flag settings for the mv-keys option */
575ea906c41SOllivier Robert #define MV_KEYS_FLAGS     (OPTST_DISABLED \
576ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
577ea906c41SOllivier Robert 
578*2b15cb3dSCy Schubert #else   /* disable mv-keys */
579ea906c41SOllivier Robert #define MV_KEYS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
580*2b15cb3dSCy Schubert #define MV_KEYS_NAME      NULL
581*2b15cb3dSCy Schubert #define MV_KEYS_DESC      NULL
582*2b15cb3dSCy Schubert #define MV_KEYS_name      NULL
583*2b15cb3dSCy Schubert #endif  /* AUTOKEY */
584ea906c41SOllivier Robert 
585ea906c41SOllivier Robert /*
586ea906c41SOllivier Robert  *  Help/More_Help/Version option descriptions:
587ea906c41SOllivier Robert  */
588*2b15cb3dSCy Schubert #define HELP_DESC       (ntp_keygen_opt_strs+1963)
589*2b15cb3dSCy Schubert #define HELP_name       (ntp_keygen_opt_strs+2007)
590*2b15cb3dSCy Schubert #ifdef HAVE_WORKING_FORK
591*2b15cb3dSCy Schubert #define MORE_HELP_DESC  (ntp_keygen_opt_strs+2012)
592*2b15cb3dSCy Schubert #define MORE_HELP_name  (ntp_keygen_opt_strs+2057)
593*2b15cb3dSCy Schubert #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
594*2b15cb3dSCy Schubert #else
595*2b15cb3dSCy Schubert #define MORE_HELP_DESC  HELP_DESC
596*2b15cb3dSCy Schubert #define MORE_HELP_name  HELP_name
597*2b15cb3dSCy Schubert #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
598*2b15cb3dSCy Schubert #endif
599*2b15cb3dSCy Schubert #ifdef NO_OPTIONAL_OPT_ARGS
600*2b15cb3dSCy Schubert #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
601*2b15cb3dSCy Schubert #else
602*2b15cb3dSCy Schubert #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
603*2b15cb3dSCy Schubert                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
604*2b15cb3dSCy Schubert #endif
605*2b15cb3dSCy Schubert #define VER_DESC        (ntp_keygen_opt_strs+2067)
606*2b15cb3dSCy Schubert #define VER_name        (ntp_keygen_opt_strs+2103)
607*2b15cb3dSCy Schubert #define SAVE_OPTS_DESC  (ntp_keygen_opt_strs+2111)
608*2b15cb3dSCy Schubert #define SAVE_OPTS_name  (ntp_keygen_opt_strs+2150)
609*2b15cb3dSCy Schubert #define LOAD_OPTS_DESC     (ntp_keygen_opt_strs+2160)
610*2b15cb3dSCy Schubert #define LOAD_OPTS_NAME     (ntp_keygen_opt_strs+2192)
611*2b15cb3dSCy Schubert #define NO_LOAD_OPTS_name  (ntp_keygen_opt_strs+2202)
612*2b15cb3dSCy Schubert #define LOAD_OPTS_pfx      (ntp_keygen_opt_strs+2215)
613*2b15cb3dSCy Schubert #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
614*2b15cb3dSCy Schubert /**
615ea906c41SOllivier Robert  *  Declare option callback procedures
616ea906c41SOllivier Robert  */
617*2b15cb3dSCy Schubert #ifdef AUTOKEY
618*2b15cb3dSCy Schubert   static tOptProc doOptImbits;
619*2b15cb3dSCy Schubert #else /* not AUTOKEY */
620*2b15cb3dSCy Schubert # define doOptImbits NULL
621*2b15cb3dSCy Schubert #endif /* def/not AUTOKEY */
622*2b15cb3dSCy Schubert #ifdef AUTOKEY
623ea906c41SOllivier Robert   static tOptProc doOptModulus;
624*2b15cb3dSCy Schubert #else /* not AUTOKEY */
625ea906c41SOllivier Robert # define doOptModulus NULL
626*2b15cb3dSCy Schubert #endif /* def/not AUTOKEY */
627ea906c41SOllivier Robert extern tOptProc
628*2b15cb3dSCy Schubert     ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
629*2b15cb3dSCy Schubert     optionNumericVal,      optionPagedUsage,      optionResetOpt,
630*2b15cb3dSCy Schubert     optionStackArg,        optionTimeDate,        optionTimeVal,
631*2b15cb3dSCy Schubert     optionUnstackArg,      optionVendorOption;
632ea906c41SOllivier Robert static tOptProc
633*2b15cb3dSCy Schubert     doOptDebug_Level, doUsageOpt;
634*2b15cb3dSCy Schubert #define VER_PROC        ntpOptionPrintVersion
635ea906c41SOllivier Robert 
636*2b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
637*2b15cb3dSCy Schubert /**
638*2b15cb3dSCy Schubert  *  Define the ntp-keygen Option Descriptions.
639*2b15cb3dSCy Schubert  * This is an array of OPTION_CT entries, one for each
640*2b15cb3dSCy Schubert  * option that the ntp-keygen program responds to.
641ea906c41SOllivier Robert  */
642ea906c41SOllivier Robert static tOptDesc optDesc[OPTION_CT] = {
643*2b15cb3dSCy Schubert   {  /* entry idx, value */ 0, VALUE_OPT_IMBITS,
644*2b15cb3dSCy Schubert      /* equiv idx, value */ 0, VALUE_OPT_IMBITS,
645*2b15cb3dSCy Schubert      /* equivalenced to  */ NO_EQUIVALENT,
646*2b15cb3dSCy Schubert      /* min, max, act ct */ 0, 1, 0,
647*2b15cb3dSCy Schubert      /* opt state flags  */ IMBITS_FLAGS, 0,
648*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --imbits */
649*2b15cb3dSCy Schubert      /* arg list/cookie  */ NULL,
650*2b15cb3dSCy Schubert      /* must/cannot opts */ NULL, NULL,
651*2b15cb3dSCy Schubert      /* option proc      */ doOptImbits,
652*2b15cb3dSCy Schubert      /* desc, NAME, name */ IMBITS_DESC, IMBITS_NAME, IMBITS_name,
653*2b15cb3dSCy Schubert      /* disablement strs */ NULL, NULL },
654*2b15cb3dSCy Schubert 
655*2b15cb3dSCy Schubert   {  /* entry idx, value */ 1, VALUE_OPT_CERTIFICATE,
656*2b15cb3dSCy Schubert      /* equiv idx, value */ 1, VALUE_OPT_CERTIFICATE,
657ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
658ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
659ea906c41SOllivier Robert      /* opt state flags  */ CERTIFICATE_FLAGS, 0,
660*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --certificate */
661ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
662ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
663ea906c41SOllivier Robert      /* option proc      */ NULL,
664*2b15cb3dSCy Schubert      /* desc, NAME, name */ CERTIFICATE_DESC, CERTIFICATE_NAME, CERTIFICATE_name,
665ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
666ea906c41SOllivier Robert 
667*2b15cb3dSCy Schubert   {  /* entry idx, value */ 2, VALUE_OPT_CIPHER,
668*2b15cb3dSCy Schubert      /* equiv idx, value */ 2, VALUE_OPT_CIPHER,
669*2b15cb3dSCy Schubert      /* equivalenced to  */ NO_EQUIVALENT,
670*2b15cb3dSCy Schubert      /* min, max, act ct */ 0, 1, 0,
671*2b15cb3dSCy Schubert      /* opt state flags  */ CIPHER_FLAGS, 0,
672*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --cipher */
673*2b15cb3dSCy Schubert      /* arg list/cookie  */ NULL,
674*2b15cb3dSCy Schubert      /* must/cannot opts */ NULL, NULL,
675*2b15cb3dSCy Schubert      /* option proc      */ NULL,
676*2b15cb3dSCy Schubert      /* desc, NAME, name */ CIPHER_DESC, CIPHER_NAME, CIPHER_name,
677*2b15cb3dSCy Schubert      /* disablement strs */ NULL, NULL },
678*2b15cb3dSCy Schubert 
679*2b15cb3dSCy Schubert   {  /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
680*2b15cb3dSCy Schubert      /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
681ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
682ea906c41SOllivier Robert      /* min, max, act ct */ 0, NOLIMIT, 0,
683ea906c41SOllivier Robert      /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
684*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --debug-level */
685ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
686ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
687*2b15cb3dSCy Schubert      /* option proc      */ doOptDebug_Level,
688*2b15cb3dSCy Schubert      /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
689ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
690ea906c41SOllivier Robert 
691*2b15cb3dSCy Schubert   {  /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
692*2b15cb3dSCy Schubert      /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
693ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
694ea906c41SOllivier Robert      /* min, max, act ct */ 0, NOLIMIT, 0,
695ea906c41SOllivier Robert      /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
696*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --set-debug-level */
697ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
698ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
699*2b15cb3dSCy Schubert      /* option proc      */ optionNumericVal,
700*2b15cb3dSCy Schubert      /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
701ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
702ea906c41SOllivier Robert 
703*2b15cb3dSCy Schubert   {  /* entry idx, value */ 5, VALUE_OPT_ID_KEY,
704*2b15cb3dSCy Schubert      /* equiv idx, value */ 5, VALUE_OPT_ID_KEY,
705ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
706ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
707ea906c41SOllivier Robert      /* opt state flags  */ ID_KEY_FLAGS, 0,
708*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --id-key */
709ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
710ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
711ea906c41SOllivier Robert      /* option proc      */ NULL,
712*2b15cb3dSCy Schubert      /* desc, NAME, name */ ID_KEY_DESC, ID_KEY_NAME, ID_KEY_name,
713ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
714ea906c41SOllivier Robert 
715*2b15cb3dSCy Schubert   {  /* entry idx, value */ 6, VALUE_OPT_GQ_PARAMS,
716*2b15cb3dSCy Schubert      /* equiv idx, value */ 6, VALUE_OPT_GQ_PARAMS,
717ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
718ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
719ea906c41SOllivier Robert      /* opt state flags  */ GQ_PARAMS_FLAGS, 0,
720*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --gq-params */
721ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
722ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
723ea906c41SOllivier Robert      /* option proc      */ NULL,
724*2b15cb3dSCy Schubert      /* desc, NAME, name */ GQ_PARAMS_DESC, GQ_PARAMS_NAME, GQ_PARAMS_name,
725ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
726ea906c41SOllivier Robert 
727*2b15cb3dSCy Schubert   {  /* entry idx, value */ 7, VALUE_OPT_HOST_KEY,
728*2b15cb3dSCy Schubert      /* equiv idx, value */ 7, VALUE_OPT_HOST_KEY,
729ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
730ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
731ea906c41SOllivier Robert      /* opt state flags  */ HOST_KEY_FLAGS, 0,
732*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --host-key */
733ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
734ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
735ea906c41SOllivier Robert      /* option proc      */ NULL,
736*2b15cb3dSCy Schubert      /* desc, NAME, name */ HOST_KEY_DESC, HOST_KEY_NAME, HOST_KEY_name,
737ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
738ea906c41SOllivier Robert 
739*2b15cb3dSCy Schubert   {  /* entry idx, value */ 8, VALUE_OPT_IFFKEY,
740*2b15cb3dSCy Schubert      /* equiv idx, value */ 8, VALUE_OPT_IFFKEY,
741ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
742ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
743ea906c41SOllivier Robert      /* opt state flags  */ IFFKEY_FLAGS, 0,
744*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --iffkey */
745ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
746ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
747ea906c41SOllivier Robert      /* option proc      */ NULL,
748*2b15cb3dSCy Schubert      /* desc, NAME, name */ IFFKEY_DESC, IFFKEY_NAME, IFFKEY_name,
749ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
750ea906c41SOllivier Robert 
751*2b15cb3dSCy Schubert   {  /* entry idx, value */ 9, VALUE_OPT_IDENT,
752*2b15cb3dSCy Schubert      /* equiv idx, value */ 9, VALUE_OPT_IDENT,
753ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
754ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
755*2b15cb3dSCy Schubert      /* opt state flags  */ IDENT_FLAGS, 0,
756*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --ident */
757ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
758ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
759ea906c41SOllivier Robert      /* option proc      */ NULL,
760*2b15cb3dSCy Schubert      /* desc, NAME, name */ IDENT_DESC, IDENT_NAME, IDENT_name,
761ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
762ea906c41SOllivier Robert 
763*2b15cb3dSCy Schubert   {  /* entry idx, value */ 10, VALUE_OPT_LIFETIME,
764*2b15cb3dSCy Schubert      /* equiv idx, value */ 10, VALUE_OPT_LIFETIME,
765*2b15cb3dSCy Schubert      /* equivalenced to  */ NO_EQUIVALENT,
766*2b15cb3dSCy Schubert      /* min, max, act ct */ 0, 1, 0,
767*2b15cb3dSCy Schubert      /* opt state flags  */ LIFETIME_FLAGS, 0,
768*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --lifetime */
769*2b15cb3dSCy Schubert      /* arg list/cookie  */ NULL,
770*2b15cb3dSCy Schubert      /* must/cannot opts */ NULL, NULL,
771*2b15cb3dSCy Schubert      /* option proc      */ optionNumericVal,
772*2b15cb3dSCy Schubert      /* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name,
773*2b15cb3dSCy Schubert      /* disablement strs */ NULL, NULL },
774*2b15cb3dSCy Schubert 
775*2b15cb3dSCy Schubert   {  /* entry idx, value */ 11, VALUE_OPT_MD5KEY,
776*2b15cb3dSCy Schubert      /* equiv idx, value */ 11, VALUE_OPT_MD5KEY,
777ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
778ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
779ea906c41SOllivier Robert      /* opt state flags  */ MD5KEY_FLAGS, 0,
780*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --md5key */
781ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
782ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
783ea906c41SOllivier Robert      /* option proc      */ NULL,
784*2b15cb3dSCy Schubert      /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name,
785ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
786ea906c41SOllivier Robert 
787*2b15cb3dSCy Schubert   {  /* entry idx, value */ 12, VALUE_OPT_MODULUS,
788*2b15cb3dSCy Schubert      /* equiv idx, value */ 12, VALUE_OPT_MODULUS,
789ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
790ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
791ea906c41SOllivier Robert      /* opt state flags  */ MODULUS_FLAGS, 0,
792*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --modulus */
793ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
794ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
795ea906c41SOllivier Robert      /* option proc      */ doOptModulus,
796*2b15cb3dSCy Schubert      /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name,
797ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
798ea906c41SOllivier Robert 
799*2b15cb3dSCy Schubert   {  /* entry idx, value */ 13, VALUE_OPT_PVT_CERT,
800*2b15cb3dSCy Schubert      /* equiv idx, value */ 13, VALUE_OPT_PVT_CERT,
801ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
802ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
803ea906c41SOllivier Robert      /* opt state flags  */ PVT_CERT_FLAGS, 0,
804*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --pvt-cert */
805ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
806ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
807ea906c41SOllivier Robert      /* option proc      */ NULL,
808*2b15cb3dSCy Schubert      /* desc, NAME, name */ PVT_CERT_DESC, PVT_CERT_NAME, PVT_CERT_name,
809ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
810ea906c41SOllivier Robert 
811*2b15cb3dSCy Schubert   {  /* entry idx, value */ 14, VALUE_OPT_PASSWORD,
812*2b15cb3dSCy Schubert      /* equiv idx, value */ 14, VALUE_OPT_PASSWORD,
813ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
814ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
815*2b15cb3dSCy Schubert      /* opt state flags  */ PASSWORD_FLAGS, 0,
816*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --password */
817ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
818ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
819ea906c41SOllivier Robert      /* option proc      */ NULL,
820*2b15cb3dSCy Schubert      /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name,
821ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
822ea906c41SOllivier Robert 
823*2b15cb3dSCy Schubert   {  /* entry idx, value */ 15, VALUE_OPT_EXPORT_PASSWD,
824*2b15cb3dSCy Schubert      /* equiv idx, value */ 15, VALUE_OPT_EXPORT_PASSWD,
825ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
826ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
827*2b15cb3dSCy Schubert      /* opt state flags  */ EXPORT_PASSWD_FLAGS, 0,
828*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --export-passwd */
829ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
830ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
831ea906c41SOllivier Robert      /* option proc      */ NULL,
832*2b15cb3dSCy Schubert      /* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name,
833ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
834ea906c41SOllivier Robert 
835*2b15cb3dSCy Schubert   {  /* entry idx, value */ 16, VALUE_OPT_SIGN_KEY,
836*2b15cb3dSCy Schubert      /* equiv idx, value */ 16, VALUE_OPT_SIGN_KEY,
837ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
838ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
839ea906c41SOllivier Robert      /* opt state flags  */ SIGN_KEY_FLAGS, 0,
840*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --sign-key */
841ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
842ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
843ea906c41SOllivier Robert      /* option proc      */ NULL,
844*2b15cb3dSCy Schubert      /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name,
845ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
846ea906c41SOllivier Robert 
847*2b15cb3dSCy Schubert   {  /* entry idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
848*2b15cb3dSCy Schubert      /* equiv idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
849ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
850ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
851ea906c41SOllivier Robert      /* opt state flags  */ SUBJECT_NAME_FLAGS, 0,
852*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --subject-name */
853ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
854ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
855ea906c41SOllivier Robert      /* option proc      */ NULL,
856*2b15cb3dSCy Schubert      /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name,
857ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
858ea906c41SOllivier Robert 
859*2b15cb3dSCy Schubert   {  /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT,
860*2b15cb3dSCy Schubert      /* equiv idx, value */ 18, VALUE_OPT_TRUSTED_CERT,
861ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
862ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
863ea906c41SOllivier Robert      /* opt state flags  */ TRUSTED_CERT_FLAGS, 0,
864*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --trusted-cert */
865ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
866ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
867ea906c41SOllivier Robert      /* option proc      */ NULL,
868*2b15cb3dSCy Schubert      /* desc, NAME, name */ TRUSTED_CERT_DESC, TRUSTED_CERT_NAME, TRUSTED_CERT_name,
869ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
870ea906c41SOllivier Robert 
871*2b15cb3dSCy Schubert   {  /* entry idx, value */ 19, VALUE_OPT_MV_PARAMS,
872*2b15cb3dSCy Schubert      /* equiv idx, value */ 19, VALUE_OPT_MV_PARAMS,
873ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
874ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
875ea906c41SOllivier Robert      /* opt state flags  */ MV_PARAMS_FLAGS, 0,
876*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --mv-params */
877ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
878ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
879ea906c41SOllivier Robert      /* option proc      */ optionNumericVal,
880*2b15cb3dSCy Schubert      /* desc, NAME, name */ MV_PARAMS_DESC, MV_PARAMS_NAME, MV_PARAMS_name,
881ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
882ea906c41SOllivier Robert 
883*2b15cb3dSCy Schubert   {  /* entry idx, value */ 20, VALUE_OPT_MV_KEYS,
884*2b15cb3dSCy Schubert      /* equiv idx, value */ 20, VALUE_OPT_MV_KEYS,
885ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
886ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
887ea906c41SOllivier Robert      /* opt state flags  */ MV_KEYS_FLAGS, 0,
888*2b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --mv-keys */
889ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
890ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
891ea906c41SOllivier Robert      /* option proc      */ optionNumericVal,
892*2b15cb3dSCy Schubert      /* desc, NAME, name */ MV_KEYS_DESC, MV_KEYS_NAME, MV_KEYS_name,
893ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
894ea906c41SOllivier Robert 
895ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
896*2b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
897ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
898ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
899*2b15cb3dSCy Schubert      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
900ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
901ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
902ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
903*2b15cb3dSCy Schubert      /* option proc      */ VER_PROC,
904*2b15cb3dSCy Schubert      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
905ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
906ea906c41SOllivier Robert 
907ea906c41SOllivier Robert 
908ea906c41SOllivier Robert 
909ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
910*2b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
911ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
912ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
913*2b15cb3dSCy Schubert      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
914ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
915ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
916ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
917ea906c41SOllivier Robert      /* option proc      */ doUsageOpt,
918*2b15cb3dSCy Schubert      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
919ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
920ea906c41SOllivier Robert 
921ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
922*2b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
923ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
924ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
925*2b15cb3dSCy Schubert      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
926ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
927ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
928ea906c41SOllivier Robert      /* must/cannot opts */ NULL,  NULL,
929ea906c41SOllivier Robert      /* option proc      */ optionPagedUsage,
930*2b15cb3dSCy Schubert      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
931ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
932ea906c41SOllivier Robert 
933ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
934*2b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
935ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
936ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
937ea906c41SOllivier Robert      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
938*2b15cb3dSCy Schubert                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
939ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
940ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
941ea906c41SOllivier Robert      /* must/cannot opts */ NULL,  NULL,
942ea906c41SOllivier Robert      /* option proc      */ NULL,
943*2b15cb3dSCy Schubert      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
944ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
945ea906c41SOllivier Robert 
946ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
947*2b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
948ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
949ea906c41SOllivier Robert      /* min, max, act ct */ 0, NOLIMIT, 0,
950*2b15cb3dSCy Schubert      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
951*2b15cb3dSCy Schubert 			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
952ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
953ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
954ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
955ea906c41SOllivier Robert      /* option proc      */ optionLoadOpt,
956*2b15cb3dSCy Schubert      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
957*2b15cb3dSCy Schubert      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
958ea906c41SOllivier Robert };
959ea906c41SOllivier Robert 
960ea906c41SOllivier Robert 
961*2b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
962*2b15cb3dSCy Schubert /** Reference to the upper cased version of ntp-keygen. */
963*2b15cb3dSCy Schubert #define zPROGNAME       (ntp_keygen_opt_strs+2218)
964*2b15cb3dSCy Schubert /** Reference to the title line for ntp-keygen usage. */
965*2b15cb3dSCy Schubert #define zUsageTitle     (ntp_keygen_opt_strs+2229)
966*2b15cb3dSCy Schubert /** ntp-keygen configuration file name. */
967*2b15cb3dSCy Schubert #define zRcName         (ntp_keygen_opt_strs+2351)
968*2b15cb3dSCy Schubert /** Directories to search for ntp-keygen config files. */
969*2b15cb3dSCy Schubert static char const * const apzHomeList[3] = {
970*2b15cb3dSCy Schubert     ntp_keygen_opt_strs+2343,
971*2b15cb3dSCy Schubert     ntp_keygen_opt_strs+2349,
972*2b15cb3dSCy Schubert     NULL };
973*2b15cb3dSCy Schubert /** The ntp-keygen program bug email address. */
974*2b15cb3dSCy Schubert #define zBugsAddr       (ntp_keygen_opt_strs+2358)
975*2b15cb3dSCy Schubert /** Clarification/explanation of what ntp-keygen does. */
976*2b15cb3dSCy Schubert #define zExplain        (ntp_keygen_opt_strs+2392)
977*2b15cb3dSCy Schubert /** Extra detail explaining what ntp-keygen does. */
978*2b15cb3dSCy Schubert #define zDetail         (NULL)
979*2b15cb3dSCy Schubert /** The full version string for ntp-keygen. */
980*2b15cb3dSCy Schubert #define zFullVersion    (ntp_keygen_opt_strs+2394)
981*2b15cb3dSCy Schubert /* extracted from optcode.tlib near line 364 */
982ea906c41SOllivier Robert 
983ea906c41SOllivier Robert #if defined(ENABLE_NLS)
984ea906c41SOllivier Robert # define OPTPROC_BASE OPTPROC_TRANSLATE
985ea906c41SOllivier Robert   static tOptionXlateProc translate_option_strings;
986ea906c41SOllivier Robert #else
987ea906c41SOllivier Robert # define OPTPROC_BASE OPTPROC_NONE
988ea906c41SOllivier Robert # define translate_option_strings NULL
989ea906c41SOllivier Robert #endif /* ENABLE_NLS */
990ea906c41SOllivier Robert 
991*2b15cb3dSCy Schubert #define ntp_keygen_full_usage (NULL)
992*2b15cb3dSCy Schubert #define ntp_keygen_short_usage (NULL)
993*2b15cb3dSCy Schubert 
994*2b15cb3dSCy Schubert #endif /* not defined __doxygen__ */
995*2b15cb3dSCy Schubert 
996*2b15cb3dSCy Schubert /*
997*2b15cb3dSCy Schubert  *  Create the static procedure(s) declared above.
998*2b15cb3dSCy Schubert  */
999*2b15cb3dSCy Schubert /**
1000*2b15cb3dSCy Schubert  * The callout function that invokes the optionUsage function.
1001*2b15cb3dSCy Schubert  *
1002*2b15cb3dSCy Schubert  * @param[in] opts the AutoOpts option description structure
1003*2b15cb3dSCy Schubert  * @param[in] od   the descriptor for the "help" (usage) option.
1004*2b15cb3dSCy Schubert  * @noreturn
1005*2b15cb3dSCy Schubert  */
1006*2b15cb3dSCy Schubert static void
1007*2b15cb3dSCy Schubert doUsageOpt(tOptions * opts, tOptDesc * od)
1008*2b15cb3dSCy Schubert {
1009*2b15cb3dSCy Schubert     int ex_code;
1010*2b15cb3dSCy Schubert     ex_code = NTP_KEYGEN_EXIT_SUCCESS;
1011*2b15cb3dSCy Schubert     optionUsage(&ntp_keygenOptions, ex_code);
1012*2b15cb3dSCy Schubert     /* NOTREACHED */
1013*2b15cb3dSCy Schubert     exit(1);
1014*2b15cb3dSCy Schubert     (void)opts;
1015*2b15cb3dSCy Schubert     (void)od;
1016*2b15cb3dSCy Schubert }
1017*2b15cb3dSCy Schubert 
1018*2b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1019*2b15cb3dSCy Schubert /**
1020*2b15cb3dSCy Schubert  * Code to handle the imbits option, when AUTOKEY is #define-d.
1021*2b15cb3dSCy Schubert  * The number of bits in the identity modulus.  The default is 256.
1022*2b15cb3dSCy Schubert  * @param[in] pOptions the ntp-keygen options data structure
1023*2b15cb3dSCy Schubert  * @param[in,out] pOptDesc the option descriptor for this option.
1024*2b15cb3dSCy Schubert  */
1025*2b15cb3dSCy Schubert #ifdef AUTOKEY
1026*2b15cb3dSCy Schubert static void
1027*2b15cb3dSCy Schubert doOptImbits(tOptions* pOptions, tOptDesc* pOptDesc)
1028*2b15cb3dSCy Schubert {
1029*2b15cb3dSCy Schubert     static struct {long rmin, rmax;} const rng[1] = {
1030*2b15cb3dSCy Schubert         { 256, 2048 } };
1031*2b15cb3dSCy Schubert     int  ix;
1032*2b15cb3dSCy Schubert 
1033*2b15cb3dSCy Schubert     if (pOptions <= OPTPROC_EMIT_LIMIT)
1034*2b15cb3dSCy Schubert         goto emit_ranges;
1035*2b15cb3dSCy Schubert     optionNumericVal(pOptions, pOptDesc);
1036*2b15cb3dSCy Schubert 
1037*2b15cb3dSCy Schubert     for (ix = 0; ix < 1; ix++) {
1038*2b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt < rng[ix].rmin)
1039*2b15cb3dSCy Schubert             continue;  /* ranges need not be ordered. */
1040*2b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt == rng[ix].rmin)
1041*2b15cb3dSCy Schubert             return;
1042*2b15cb3dSCy Schubert         if (rng[ix].rmax == LONG_MIN)
1043*2b15cb3dSCy Schubert             continue;
1044*2b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1045*2b15cb3dSCy Schubert             return;
1046*2b15cb3dSCy Schubert     }
1047*2b15cb3dSCy Schubert 
1048*2b15cb3dSCy Schubert     option_usage_fp = stderr;
1049*2b15cb3dSCy Schubert 
1050*2b15cb3dSCy Schubert  emit_ranges:
1051*2b15cb3dSCy Schubert     optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
1052*2b15cb3dSCy Schubert }
1053*2b15cb3dSCy Schubert #endif /* defined AUTOKEY */
1054*2b15cb3dSCy Schubert 
1055*2b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1056*2b15cb3dSCy Schubert /**
1057*2b15cb3dSCy Schubert  * Code to handle the debug-level option.
1058*2b15cb3dSCy Schubert  *
1059*2b15cb3dSCy Schubert  * @param[in] pOptions the ntp-keygen options data structure
1060*2b15cb3dSCy Schubert  * @param[in,out] pOptDesc the option descriptor for this option.
1061*2b15cb3dSCy Schubert  */
1062*2b15cb3dSCy Schubert static void
1063*2b15cb3dSCy Schubert doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
1064*2b15cb3dSCy Schubert {
1065*2b15cb3dSCy Schubert     /*
1066*2b15cb3dSCy Schubert      * Be sure the flag-code[0] handles special values for the options pointer
1067*2b15cb3dSCy Schubert      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1068*2b15cb3dSCy Schubert      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1069*2b15cb3dSCy Schubert      * reset its state.
1070*2b15cb3dSCy Schubert      */
1071*2b15cb3dSCy Schubert     /* extracted from debug-opt.def, line 15 */
1072*2b15cb3dSCy Schubert OPT_VALUE_SET_DEBUG_LEVEL++;
1073*2b15cb3dSCy Schubert     (void)pOptDesc;
1074*2b15cb3dSCy Schubert     (void)pOptions;
1075*2b15cb3dSCy Schubert }
1076*2b15cb3dSCy Schubert 
1077*2b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1078*2b15cb3dSCy Schubert /**
1079*2b15cb3dSCy Schubert  * Code to handle the modulus option, when AUTOKEY is #define-d.
1080*2b15cb3dSCy Schubert  * The number of bits in the prime modulus.  The default is 512.
1081*2b15cb3dSCy Schubert  * @param[in] pOptions the ntp-keygen options data structure
1082*2b15cb3dSCy Schubert  * @param[in,out] pOptDesc the option descriptor for this option.
1083*2b15cb3dSCy Schubert  */
1084*2b15cb3dSCy Schubert #ifdef AUTOKEY
1085*2b15cb3dSCy Schubert static void
1086*2b15cb3dSCy Schubert doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
1087*2b15cb3dSCy Schubert {
1088*2b15cb3dSCy Schubert     static struct {long rmin, rmax;} const rng[1] = {
1089*2b15cb3dSCy Schubert         { 256, 2048 } };
1090*2b15cb3dSCy Schubert     int  ix;
1091*2b15cb3dSCy Schubert 
1092*2b15cb3dSCy Schubert     if (pOptions <= OPTPROC_EMIT_LIMIT)
1093*2b15cb3dSCy Schubert         goto emit_ranges;
1094*2b15cb3dSCy Schubert     optionNumericVal(pOptions, pOptDesc);
1095*2b15cb3dSCy Schubert 
1096*2b15cb3dSCy Schubert     for (ix = 0; ix < 1; ix++) {
1097*2b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt < rng[ix].rmin)
1098*2b15cb3dSCy Schubert             continue;  /* ranges need not be ordered. */
1099*2b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt == rng[ix].rmin)
1100*2b15cb3dSCy Schubert             return;
1101*2b15cb3dSCy Schubert         if (rng[ix].rmax == LONG_MIN)
1102*2b15cb3dSCy Schubert             continue;
1103*2b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1104*2b15cb3dSCy Schubert             return;
1105*2b15cb3dSCy Schubert     }
1106*2b15cb3dSCy Schubert 
1107*2b15cb3dSCy Schubert     option_usage_fp = stderr;
1108*2b15cb3dSCy Schubert 
1109*2b15cb3dSCy Schubert  emit_ranges:
1110*2b15cb3dSCy Schubert     optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
1111*2b15cb3dSCy Schubert }
1112*2b15cb3dSCy Schubert #endif /* defined AUTOKEY */
1113*2b15cb3dSCy Schubert /* extracted from optmain.tlib near line 1245 */
1114*2b15cb3dSCy Schubert 
1115*2b15cb3dSCy Schubert /**
1116*2b15cb3dSCy Schubert  * The directory containing the data associated with ntp-keygen.
1117*2b15cb3dSCy Schubert  */
1118*2b15cb3dSCy Schubert #ifndef  PKGDATADIR
1119*2b15cb3dSCy Schubert # define PKGDATADIR ""
1120*2b15cb3dSCy Schubert #endif
1121*2b15cb3dSCy Schubert 
1122*2b15cb3dSCy Schubert /**
1123*2b15cb3dSCy Schubert  * Information about the person or institution that packaged ntp-keygen
1124*2b15cb3dSCy Schubert  * for the current distribution.
1125*2b15cb3dSCy Schubert  */
1126*2b15cb3dSCy Schubert #ifndef  WITH_PACKAGER
1127*2b15cb3dSCy Schubert # define ntp_keygen_packager_info NULL
1128*2b15cb3dSCy Schubert #else
1129*2b15cb3dSCy Schubert /** Packager information for ntp-keygen. */
1130*2b15cb3dSCy Schubert static char const ntp_keygen_packager_info[] =
1131*2b15cb3dSCy Schubert     "Packaged by " WITH_PACKAGER
1132*2b15cb3dSCy Schubert 
1133*2b15cb3dSCy Schubert # ifdef WITH_PACKAGER_VERSION
1134*2b15cb3dSCy Schubert         " ("WITH_PACKAGER_VERSION")"
1135*2b15cb3dSCy Schubert # endif
1136*2b15cb3dSCy Schubert 
1137*2b15cb3dSCy Schubert # ifdef WITH_PACKAGER_BUG_REPORTS
1138*2b15cb3dSCy Schubert     "\nReport ntp_keygen bugs to " WITH_PACKAGER_BUG_REPORTS
1139*2b15cb3dSCy Schubert # endif
1140*2b15cb3dSCy Schubert     "\n";
1141*2b15cb3dSCy Schubert #endif
1142*2b15cb3dSCy Schubert #ifndef __doxygen__
1143*2b15cb3dSCy Schubert 
1144*2b15cb3dSCy Schubert #endif /* __doxygen__ */
1145*2b15cb3dSCy Schubert /**
1146*2b15cb3dSCy Schubert  * The option definitions for ntp-keygen.  The one structure that
1147*2b15cb3dSCy Schubert  * binds them all.
1148*2b15cb3dSCy Schubert  */
1149ea906c41SOllivier Robert tOptions ntp_keygenOptions = {
1150ea906c41SOllivier Robert     OPTIONS_STRUCT_VERSION,
1151ea906c41SOllivier Robert     0, NULL,                    /* original argc + argv    */
1152ea906c41SOllivier Robert     ( OPTPROC_BASE
1153ea906c41SOllivier Robert     + OPTPROC_ERRSTOP
1154ea906c41SOllivier Robert     + OPTPROC_SHORTOPT
1155ea906c41SOllivier Robert     + OPTPROC_LONGOPT
1156ea906c41SOllivier Robert     + OPTPROC_NO_REQ_OPT
1157ea906c41SOllivier Robert     + OPTPROC_ENVIRON
1158ea906c41SOllivier Robert     + OPTPROC_NO_ARGS
1159*2b15cb3dSCy Schubert     + OPTPROC_MISUSE ),
1160ea906c41SOllivier Robert     0, NULL,                    /* current option index, current option */
1161ea906c41SOllivier Robert     NULL,         NULL,         zPROGNAME,
1162*2b15cb3dSCy Schubert     zRcName,      zCopyright,   zLicenseDescrip,
1163ea906c41SOllivier Robert     zFullVersion, apzHomeList,  zUsageTitle,
1164ea906c41SOllivier Robert     zExplain,     zDetail,      optDesc,
1165ea906c41SOllivier Robert     zBugsAddr,                  /* address to send bugs to */
1166ea906c41SOllivier Robert     NULL, NULL,                 /* extensions/saved state  */
1167ea906c41SOllivier Robert     optionUsage, /* usage procedure */
1168ea906c41SOllivier Robert     translate_option_strings,   /* translation procedure */
1169ea906c41SOllivier Robert     /*
1170ea906c41SOllivier Robert      *  Indexes to special options
1171ea906c41SOllivier Robert      */
1172*2b15cb3dSCy Schubert     { INDEX_OPT_MORE_HELP, /* more-help option index */
1173*2b15cb3dSCy Schubert       INDEX_OPT_SAVE_OPTS, /* save option index */
1174*2b15cb3dSCy Schubert       NO_EQUIVALENT, /* '-#' option index */
1175ea906c41SOllivier Robert       NO_EQUIVALENT /* index of default opt */
1176ea906c41SOllivier Robert     },
1177*2b15cb3dSCy Schubert     26 /* full option count */, 21 /* user option count */,
1178*2b15cb3dSCy Schubert     ntp_keygen_full_usage, ntp_keygen_short_usage,
1179*2b15cb3dSCy Schubert     NULL, NULL,
1180*2b15cb3dSCy Schubert     PKGDATADIR, ntp_keygen_packager_info
1181ea906c41SOllivier Robert };
1182ea906c41SOllivier Robert 
1183ea906c41SOllivier Robert #if ENABLE_NLS
1184*2b15cb3dSCy Schubert /**
1185*2b15cb3dSCy Schubert  * This code is designed to translate translatable option text for the
1186*2b15cb3dSCy Schubert  * ntp-keygen program.  These translations happen upon entry
1187*2b15cb3dSCy Schubert  * to optionProcess().
1188*2b15cb3dSCy Schubert  */
1189ea906c41SOllivier Robert #include <stdio.h>
1190ea906c41SOllivier Robert #include <stdlib.h>
1191ea906c41SOllivier Robert #include <string.h>
1192ea906c41SOllivier Robert #include <unistd.h>
1193*2b15cb3dSCy Schubert #ifdef HAVE_DCGETTEXT
1194*2b15cb3dSCy Schubert # include <gettext.h>
1195*2b15cb3dSCy Schubert #endif
1196ea906c41SOllivier Robert #include <autoopts/usage-txt.h>
1197ea906c41SOllivier Robert 
1198ea906c41SOllivier Robert static char * AO_gettext(char const * pz);
1199ea906c41SOllivier Robert static void   coerce_it(void ** s);
1200ea906c41SOllivier Robert 
1201*2b15cb3dSCy Schubert /**
1202*2b15cb3dSCy Schubert  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
1203*2b15cb3dSCy Schubert  * to convert from English to the target language, then strdup-duplicates the
1204*2b15cb3dSCy Schubert  * result string.  It tries the "libopts" domain first, then whatever has been
1205*2b15cb3dSCy Schubert  * set via the \a textdomain(3) call.
1206*2b15cb3dSCy Schubert  *
1207*2b15cb3dSCy Schubert  * @param[in] pz the input text used as a lookup key.
1208*2b15cb3dSCy Schubert  * @returns the translated text (if there is one),
1209*2b15cb3dSCy Schubert  *   or the original text (if not).
1210*2b15cb3dSCy Schubert  */
1211ea906c41SOllivier Robert static char *
1212ea906c41SOllivier Robert AO_gettext(char const * pz)
1213ea906c41SOllivier Robert {
1214*2b15cb3dSCy Schubert     char * res;
1215ea906c41SOllivier Robert     if (pz == NULL)
1216ea906c41SOllivier Robert         return NULL;
1217*2b15cb3dSCy Schubert #ifdef HAVE_DCGETTEXT
1218ea906c41SOllivier Robert     /*
1219*2b15cb3dSCy Schubert      * While processing the option_xlateable_txt data, try to use the
1220*2b15cb3dSCy Schubert      * "libopts" domain.  Once we switch to the option descriptor data,
1221*2b15cb3dSCy Schubert      * do *not* use that domain.
1222*2b15cb3dSCy Schubert      */
1223*2b15cb3dSCy Schubert     if (option_xlateable_txt.field_ct != 0) {
1224*2b15cb3dSCy Schubert         res = dgettext("libopts", pz);
1225*2b15cb3dSCy Schubert         if (res == pz)
1226*2b15cb3dSCy Schubert             res = (char *)(void *)_(pz);
1227*2b15cb3dSCy Schubert     } else
1228*2b15cb3dSCy Schubert         res = (char *)(void *)_(pz);
1229*2b15cb3dSCy Schubert #else
1230*2b15cb3dSCy Schubert     res = (char *)(void *)_(pz);
1231*2b15cb3dSCy Schubert #endif
1232*2b15cb3dSCy Schubert     if (res == pz)
1233*2b15cb3dSCy Schubert         return res;
1234*2b15cb3dSCy Schubert     res = strdup(res);
1235*2b15cb3dSCy Schubert     if (res == NULL) {
1236*2b15cb3dSCy Schubert         fputs(_("No memory for duping translated strings\n"), stderr);
1237*2b15cb3dSCy Schubert         exit(NTP_KEYGEN_EXIT_FAILURE);
1238*2b15cb3dSCy Schubert     }
1239*2b15cb3dSCy Schubert     return res;
1240*2b15cb3dSCy Schubert }
1241*2b15cb3dSCy Schubert 
1242*2b15cb3dSCy Schubert /**
1243*2b15cb3dSCy Schubert  * All the pointers we use are marked "* const", but they are stored in
1244*2b15cb3dSCy Schubert  * writable memory.  Coerce the mutability and set the pointer.
1245*2b15cb3dSCy Schubert  */
1246*2b15cb3dSCy Schubert static void coerce_it(void ** s) { *s = AO_gettext(*s);
1247*2b15cb3dSCy Schubert }
1248*2b15cb3dSCy Schubert 
1249*2b15cb3dSCy Schubert /**
1250*2b15cb3dSCy Schubert  * Translate all the translatable strings in the ntp_keygenOptions
1251*2b15cb3dSCy Schubert  * structure defined above.  This is done only once.
1252ea906c41SOllivier Robert  */
1253ea906c41SOllivier Robert static void
1254ea906c41SOllivier Robert translate_option_strings(void)
1255ea906c41SOllivier Robert {
1256*2b15cb3dSCy Schubert     tOptions * const opts = &ntp_keygenOptions;
1257*2b15cb3dSCy Schubert 
1258ea906c41SOllivier Robert     /*
1259ea906c41SOllivier Robert      *  Guard against re-translation.  It won't work.  The strings will have
1260ea906c41SOllivier Robert      *  been changed by the first pass through this code.  One shot only.
1261ea906c41SOllivier Robert      */
1262*2b15cb3dSCy Schubert     if (option_xlateable_txt.field_ct != 0) {
1263ea906c41SOllivier Robert         /*
1264*2b15cb3dSCy Schubert          *  Do the translations.  The first pointer follows the field count
1265*2b15cb3dSCy Schubert          *  field.  The field count field is the size of a pointer.
1266ea906c41SOllivier Robert          */
1267*2b15cb3dSCy Schubert         char ** ppz = (char**)(void*)&(option_xlateable_txt);
1268*2b15cb3dSCy Schubert         int     ix  = option_xlateable_txt.field_ct;
1269ea906c41SOllivier Robert 
1270ea906c41SOllivier Robert         do {
1271*2b15cb3dSCy Schubert             ppz++; /* skip over field_ct */
1272ea906c41SOllivier Robert             *ppz = AO_gettext(*ppz);
1273ea906c41SOllivier Robert         } while (--ix > 0);
1274*2b15cb3dSCy Schubert         /* prevent re-translation and disable "libopts" domain lookup */
1275*2b15cb3dSCy Schubert         option_xlateable_txt.field_ct = 0;
1276ea906c41SOllivier Robert 
1277*2b15cb3dSCy Schubert         coerce_it((void*)&(opts->pzCopyright));
1278*2b15cb3dSCy Schubert         coerce_it((void*)&(opts->pzCopyNotice));
1279*2b15cb3dSCy Schubert         coerce_it((void*)&(opts->pzFullVersion));
1280*2b15cb3dSCy Schubert         coerce_it((void*)&(opts->pzUsageTitle));
1281*2b15cb3dSCy Schubert         coerce_it((void*)&(opts->pzExplain));
1282*2b15cb3dSCy Schubert         coerce_it((void*)&(opts->pzDetail));
1283ea906c41SOllivier Robert         {
1284*2b15cb3dSCy Schubert             tOptDesc * od = opts->pOptDesc;
1285*2b15cb3dSCy Schubert             for (ix = opts->optCt; ix > 0; ix--, od++)
1286*2b15cb3dSCy Schubert                 coerce_it((void*)&(od->pzText));
1287ea906c41SOllivier Robert         }
1288ea906c41SOllivier Robert     }
1289ea906c41SOllivier Robert }
1290ea906c41SOllivier Robert #endif /* ENABLE_NLS */
1291ea906c41SOllivier Robert 
1292*2b15cb3dSCy Schubert #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
1293*2b15cb3dSCy Schubert /** I18N function strictly for xgettext.  Do not compile. */
1294*2b15cb3dSCy Schubert static void bogus_function(void) {
1295*2b15cb3dSCy Schubert   /* TRANSLATORS:
1296*2b15cb3dSCy Schubert 
1297*2b15cb3dSCy Schubert      The following dummy function was crated solely so that xgettext can
1298*2b15cb3dSCy Schubert      extract the correct strings.  These strings are actually referenced
1299*2b15cb3dSCy Schubert      by a field name in the ntp_keygenOptions structure noted in the
1300*2b15cb3dSCy Schubert      comments below.  The literal text is defined in ntp_keygen_opt_strs.
1301*2b15cb3dSCy Schubert 
1302*2b15cb3dSCy Schubert      NOTE: the strings below are segmented with respect to the source string
1303*2b15cb3dSCy Schubert      ntp_keygen_opt_strs.  The strings above are handed off for translation
1304*2b15cb3dSCy Schubert      at run time a paragraph at a time.  Consequently, they are presented here
1305*2b15cb3dSCy Schubert      for translation a paragraph at a time.
1306*2b15cb3dSCy Schubert 
1307*2b15cb3dSCy Schubert      ALSO: often the description for an option will reference another option
1308*2b15cb3dSCy Schubert      by name.  These are set off with apostrophe quotes (I hope).  Do not
1309*2b15cb3dSCy Schubert      translate option names.
1310*2b15cb3dSCy Schubert    */
1311*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzCopyright */
1312*2b15cb3dSCy Schubert   puts(_("ntp-keygen (ntp) 4.2.8p1\n\
1313*2b15cb3dSCy Schubert Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
1314*2b15cb3dSCy Schubert This is free software. It is licensed for use, modification and\n\
1315*2b15cb3dSCy Schubert redistribution under the terms of the NTP License, copies of which\n\
1316*2b15cb3dSCy Schubert can be seen at:\n"));
1317*2b15cb3dSCy Schubert   puts(_("  <http://ntp.org/license>\n\
1318*2b15cb3dSCy Schubert   <http://opensource.org/licenses/ntp-license.php>\n"));
1319*2b15cb3dSCy Schubert 
1320*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzCopyNotice */
1321*2b15cb3dSCy Schubert   puts(_("Permission to use, copy, modify, and distribute this software and its\n\
1322*2b15cb3dSCy Schubert documentation for any purpose with or without fee is hereby granted,\n\
1323*2b15cb3dSCy Schubert provided that the above copyright notice appears in all copies and that\n\
1324*2b15cb3dSCy Schubert both the copyright notice and this permission notice appear in supporting\n\
1325*2b15cb3dSCy Schubert documentation, and that the name The University of Delaware not be used in\n\
1326*2b15cb3dSCy Schubert advertising or publicity pertaining to distribution of the software without\n\
1327*2b15cb3dSCy Schubert specific, written prior permission.  The University of Delaware and Network\n\
1328*2b15cb3dSCy Schubert Time Foundation makes no representations about the suitability this\n\
1329*2b15cb3dSCy Schubert software for any purpose.  It is provided \"as is\" without express or\n\
1330*2b15cb3dSCy Schubert implied warranty.\n"));
1331*2b15cb3dSCy Schubert 
1332*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1333*2b15cb3dSCy Schubert   puts(_("identity modulus bits"));
1334*2b15cb3dSCy Schubert 
1335*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1336*2b15cb3dSCy Schubert   puts(_("certificate scheme"));
1337*2b15cb3dSCy Schubert 
1338*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1339*2b15cb3dSCy Schubert   puts(_("privatekey cipher"));
1340*2b15cb3dSCy Schubert 
1341*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1342*2b15cb3dSCy Schubert   puts(_("Increase debug verbosity level"));
1343*2b15cb3dSCy Schubert 
1344*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1345*2b15cb3dSCy Schubert   puts(_("Set the debug verbosity level"));
1346*2b15cb3dSCy Schubert 
1347*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1348*2b15cb3dSCy Schubert   puts(_("Write IFF or GQ identity keys"));
1349*2b15cb3dSCy Schubert 
1350*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1351*2b15cb3dSCy Schubert   puts(_("Generate GQ parameters and keys"));
1352*2b15cb3dSCy Schubert 
1353*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1354*2b15cb3dSCy Schubert   puts(_("generate RSA host key"));
1355*2b15cb3dSCy Schubert 
1356*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1357*2b15cb3dSCy Schubert   puts(_("generate IFF parameters"));
1358*2b15cb3dSCy Schubert 
1359*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1360*2b15cb3dSCy Schubert   puts(_("set Autokey group name"));
1361*2b15cb3dSCy Schubert 
1362*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1363*2b15cb3dSCy Schubert   puts(_("set certificate lifetime"));
1364*2b15cb3dSCy Schubert 
1365*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1366*2b15cb3dSCy Schubert   puts(_("generate MD5 keys"));
1367*2b15cb3dSCy Schubert 
1368*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1369*2b15cb3dSCy Schubert   puts(_("modulus"));
1370*2b15cb3dSCy Schubert 
1371*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1372*2b15cb3dSCy Schubert   puts(_("generate PC private certificate"));
1373*2b15cb3dSCy Schubert 
1374*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1375*2b15cb3dSCy Schubert   puts(_("local private password"));
1376*2b15cb3dSCy Schubert 
1377*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1378*2b15cb3dSCy Schubert   puts(_("export IFF or GQ group keys with password"));
1379*2b15cb3dSCy Schubert 
1380*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1381*2b15cb3dSCy Schubert   puts(_("generate sign key (RSA or DSA)"));
1382*2b15cb3dSCy Schubert 
1383*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1384*2b15cb3dSCy Schubert   puts(_("set host and optionally group name"));
1385*2b15cb3dSCy Schubert 
1386*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1387*2b15cb3dSCy Schubert   puts(_("trusted certificate (TC scheme)"));
1388*2b15cb3dSCy Schubert 
1389*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1390*2b15cb3dSCy Schubert   puts(_("generate <num> MV parameters"));
1391*2b15cb3dSCy Schubert 
1392*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1393*2b15cb3dSCy Schubert   puts(_("update <num> MV keys"));
1394*2b15cb3dSCy Schubert 
1395*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1396*2b15cb3dSCy Schubert   puts(_("display extended usage information and exit"));
1397*2b15cb3dSCy Schubert 
1398*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1399*2b15cb3dSCy Schubert   puts(_("extended usage information passed thru pager"));
1400*2b15cb3dSCy Schubert 
1401*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1402*2b15cb3dSCy Schubert   puts(_("output version information and exit"));
1403*2b15cb3dSCy Schubert 
1404*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1405*2b15cb3dSCy Schubert   puts(_("save the option state to a config file"));
1406*2b15cb3dSCy Schubert 
1407*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
1408*2b15cb3dSCy Schubert   puts(_("load options from a config file"));
1409*2b15cb3dSCy Schubert 
1410*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzUsageTitle */
1411*2b15cb3dSCy Schubert   puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p1\n\
1412*2b15cb3dSCy Schubert Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
1413*2b15cb3dSCy Schubert 
1414*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzExplain */
1415*2b15cb3dSCy Schubert   puts(_("\n"));
1416*2b15cb3dSCy Schubert 
1417*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzFullVersion */
1418*2b15cb3dSCy Schubert   puts(_("ntp-keygen (ntp) 4.2.8p1"));
1419*2b15cb3dSCy Schubert 
1420*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzFullUsage */
1421*2b15cb3dSCy Schubert   puts(_("<<<NOT-FOUND>>>"));
1422*2b15cb3dSCy Schubert 
1423*2b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzShortUsage */
1424*2b15cb3dSCy Schubert   puts(_("<<<NOT-FOUND>>>"));
1425*2b15cb3dSCy Schubert   /* LIBOPTS-MESSAGES: */
1426*2b15cb3dSCy Schubert #line 67 "../autoopts.c"
1427*2b15cb3dSCy Schubert   puts(_("allocation of %d bytes failed\n"));
1428*2b15cb3dSCy Schubert #line 93 "../autoopts.c"
1429*2b15cb3dSCy Schubert   puts(_("allocation of %d bytes failed\n"));
1430*2b15cb3dSCy Schubert #line 53 "../init.c"
1431*2b15cb3dSCy Schubert   puts(_("AutoOpts function called without option descriptor\n"));
1432*2b15cb3dSCy Schubert #line 86 "../init.c"
1433*2b15cb3dSCy Schubert   puts(_("\tThis exceeds the compiled library version:  "));
1434*2b15cb3dSCy Schubert #line 84 "../init.c"
1435*2b15cb3dSCy Schubert   puts(_("Automated Options Processing Error!\n"
1436*2b15cb3dSCy Schubert        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
1437*2b15cb3dSCy Schubert #line 80 "../autoopts.c"
1438*2b15cb3dSCy Schubert   puts(_("realloc of %d bytes at 0x%p failed\n"));
1439*2b15cb3dSCy Schubert #line 88 "../init.c"
1440*2b15cb3dSCy Schubert   puts(_("\tThis is less than the minimum library version:  "));
1441*2b15cb3dSCy Schubert #line 121 "../version.c"
1442*2b15cb3dSCy Schubert   puts(_("Automated Options version %s\n"
1443*2b15cb3dSCy Schubert        "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
1444*2b15cb3dSCy Schubert #line 82 "../makeshell.c"
1445*2b15cb3dSCy Schubert   puts(_("(AutoOpts bug):  %s.\n"));
1446*2b15cb3dSCy Schubert #line 90 "../reset.c"
1447*2b15cb3dSCy Schubert   puts(_("optionResetOpt() called, but reset-option not configured"));
1448*2b15cb3dSCy Schubert #line 292 "../usage.c"
1449*2b15cb3dSCy Schubert   puts(_("could not locate the 'help' option"));
1450*2b15cb3dSCy Schubert #line 336 "../autoopts.c"
1451*2b15cb3dSCy Schubert   puts(_("optionProcess() was called with invalid data"));
1452*2b15cb3dSCy Schubert #line 748 "../usage.c"
1453*2b15cb3dSCy Schubert   puts(_("invalid argument type specified"));
1454*2b15cb3dSCy Schubert #line 598 "../find.c"
1455*2b15cb3dSCy Schubert   puts(_("defaulted to option with optional arg"));
1456*2b15cb3dSCy Schubert #line 76 "../alias.c"
1457*2b15cb3dSCy Schubert   puts(_("aliasing option is out of range."));
1458*2b15cb3dSCy Schubert #line 234 "../enum.c"
1459*2b15cb3dSCy Schubert   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
1460*2b15cb3dSCy Schubert #line 108 "../find.c"
1461*2b15cb3dSCy Schubert   puts(_("  The following options match:\n"));
1462*2b15cb3dSCy Schubert #line 293 "../find.c"
1463*2b15cb3dSCy Schubert   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
1464*2b15cb3dSCy Schubert #line 161 "../check.c"
1465*2b15cb3dSCy Schubert   puts(_("%s: Command line arguments required\n"));
1466*2b15cb3dSCy Schubert #line 43 "../alias.c"
1467*2b15cb3dSCy Schubert   puts(_("%d %s%s options allowed\n"));
1468*2b15cb3dSCy Schubert #line 89 "../makeshell.c"
1469*2b15cb3dSCy Schubert   puts(_("%s error %d (%s) calling %s for '%s'\n"));
1470*2b15cb3dSCy Schubert #line 301 "../makeshell.c"
1471*2b15cb3dSCy Schubert   puts(_("interprocess pipe"));
1472*2b15cb3dSCy Schubert #line 168 "../version.c"
1473*2b15cb3dSCy Schubert   puts(_("error: version option argument '%c' invalid.  Use:\n"
1474*2b15cb3dSCy Schubert        "\t'v' - version only\n"
1475*2b15cb3dSCy Schubert        "\t'c' - version and copyright\n"
1476*2b15cb3dSCy Schubert        "\t'n' - version and full copyright notice\n"));
1477*2b15cb3dSCy Schubert #line 58 "../check.c"
1478*2b15cb3dSCy Schubert   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
1479*2b15cb3dSCy Schubert #line 217 "../find.c"
1480*2b15cb3dSCy Schubert   puts(_("%s: The '%s' option has been disabled."));
1481*2b15cb3dSCy Schubert #line 430 "../find.c"
1482*2b15cb3dSCy Schubert   puts(_("%s: The '%s' option has been disabled."));
1483*2b15cb3dSCy Schubert #line 38 "../alias.c"
1484*2b15cb3dSCy Schubert   puts(_("-equivalence"));
1485*2b15cb3dSCy Schubert #line 469 "../find.c"
1486*2b15cb3dSCy Schubert   puts(_("%s: illegal option -- %c\n"));
1487*2b15cb3dSCy Schubert #line 110 "../reset.c"
1488*2b15cb3dSCy Schubert   puts(_("%s: illegal option -- %c\n"));
1489*2b15cb3dSCy Schubert #line 271 "../find.c"
1490*2b15cb3dSCy Schubert   puts(_("%s: illegal option -- %s\n"));
1491*2b15cb3dSCy Schubert #line 755 "../find.c"
1492*2b15cb3dSCy Schubert   puts(_("%s: illegal option -- %s\n"));
1493*2b15cb3dSCy Schubert #line 118 "../reset.c"
1494*2b15cb3dSCy Schubert   puts(_("%s: illegal option -- %s\n"));
1495*2b15cb3dSCy Schubert #line 335 "../find.c"
1496*2b15cb3dSCy Schubert   puts(_("%s: unknown vendor extension option -- %s\n"));
1497*2b15cb3dSCy Schubert #line 159 "../enum.c"
1498*2b15cb3dSCy Schubert   puts(_("  or an integer from %d through %d\n"));
1499*2b15cb3dSCy Schubert #line 169 "../enum.c"
1500*2b15cb3dSCy Schubert   puts(_("  or an integer from %d through %d\n"));
1501*2b15cb3dSCy Schubert #line 747 "../usage.c"
1502*2b15cb3dSCy Schubert   puts(_("%s error:  invalid option descriptor for %s\n"));
1503*2b15cb3dSCy Schubert #line 1081 "../usage.c"
1504*2b15cb3dSCy Schubert   puts(_("%s error:  invalid option descriptor for %s\n"));
1505*2b15cb3dSCy Schubert #line 385 "../find.c"
1506*2b15cb3dSCy Schubert   puts(_("%s: invalid option name: %s\n"));
1507*2b15cb3dSCy Schubert #line 527 "../find.c"
1508*2b15cb3dSCy Schubert   puts(_("%s: The '%s' option requires an argument.\n"));
1509*2b15cb3dSCy Schubert #line 156 "../autoopts.c"
1510*2b15cb3dSCy Schubert   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
1511*2b15cb3dSCy Schubert        "\t'%s' and '%s'."));
1512*2b15cb3dSCy Schubert #line 94 "../check.c"
1513*2b15cb3dSCy Schubert   puts(_("%s error:  The %s option is required\n"));
1514*2b15cb3dSCy Schubert #line 632 "../find.c"
1515*2b15cb3dSCy Schubert   puts(_("%s: The '%s' option cannot have an argument.\n"));
1516*2b15cb3dSCy Schubert #line 151 "../check.c"
1517*2b15cb3dSCy Schubert   puts(_("%s: Command line arguments are not allowed.\n"));
1518*2b15cb3dSCy Schubert #line 535 "../save.c"
1519*2b15cb3dSCy Schubert   puts(_("error %d (%s) creating %s\n"));
1520*2b15cb3dSCy Schubert #line 234 "../enum.c"
1521*2b15cb3dSCy Schubert   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
1522*2b15cb3dSCy Schubert #line 93 "../reset.c"
1523*2b15cb3dSCy Schubert   puts(_("%s error: The '%s' option requires an argument.\n"));
1524*2b15cb3dSCy Schubert #line 184 "../save.c"
1525*2b15cb3dSCy Schubert   puts(_("error %d (%s) stat-ing %s\n"));
1526*2b15cb3dSCy Schubert #line 238 "../save.c"
1527*2b15cb3dSCy Schubert   puts(_("error %d (%s) stat-ing %s\n"));
1528*2b15cb3dSCy Schubert #line 143 "../restore.c"
1529*2b15cb3dSCy Schubert   puts(_("%s error: no saved option state\n"));
1530*2b15cb3dSCy Schubert #line 231 "../autoopts.c"
1531*2b15cb3dSCy Schubert   puts(_("'%s' is not a command line option.\n"));
1532*2b15cb3dSCy Schubert #line 111 "../time.c"
1533*2b15cb3dSCy Schubert   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
1534*2b15cb3dSCy Schubert #line 132 "../save.c"
1535*2b15cb3dSCy Schubert   puts(_("'%s' not defined\n"));
1536*2b15cb3dSCy Schubert #line 50 "../time.c"
1537*2b15cb3dSCy Schubert   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
1538*2b15cb3dSCy Schubert #line 92 "../check.c"
1539*2b15cb3dSCy Schubert   puts(_("%s error:  The %s option must appear %d times.\n"));
1540*2b15cb3dSCy Schubert #line 164 "../numeric.c"
1541*2b15cb3dSCy Schubert   puts(_("%s error:  '%s' is not a recognizable number.\n"));
1542*2b15cb3dSCy Schubert #line 200 "../enum.c"
1543*2b15cb3dSCy Schubert   puts(_("%s error:  %s exceeds %s keyword count\n"));
1544*2b15cb3dSCy Schubert #line 330 "../usage.c"
1545*2b15cb3dSCy Schubert   puts(_("Try '%s %s' for more information.\n"));
1546*2b15cb3dSCy Schubert #line 45 "../alias.c"
1547*2b15cb3dSCy Schubert   puts(_("one %s%s option allowed\n"));
1548*2b15cb3dSCy Schubert #line 203 "../makeshell.c"
1549*2b15cb3dSCy Schubert   puts(_("standard output"));
1550*2b15cb3dSCy Schubert #line 938 "../makeshell.c"
1551*2b15cb3dSCy Schubert   puts(_("standard output"));
1552*2b15cb3dSCy Schubert #line 274 "../usage.c"
1553*2b15cb3dSCy Schubert   puts(_("standard output"));
1554*2b15cb3dSCy Schubert #line 415 "../usage.c"
1555*2b15cb3dSCy Schubert   puts(_("standard output"));
1556*2b15cb3dSCy Schubert #line 625 "../usage.c"
1557*2b15cb3dSCy Schubert   puts(_("standard output"));
1558*2b15cb3dSCy Schubert #line 175 "../version.c"
1559*2b15cb3dSCy Schubert   puts(_("standard output"));
1560*2b15cb3dSCy Schubert #line 274 "../usage.c"
1561*2b15cb3dSCy Schubert   puts(_("standard error"));
1562*2b15cb3dSCy Schubert #line 415 "../usage.c"
1563*2b15cb3dSCy Schubert   puts(_("standard error"));
1564*2b15cb3dSCy Schubert #line 625 "../usage.c"
1565*2b15cb3dSCy Schubert   puts(_("standard error"));
1566*2b15cb3dSCy Schubert #line 175 "../version.c"
1567*2b15cb3dSCy Schubert   puts(_("standard error"));
1568*2b15cb3dSCy Schubert #line 203 "../makeshell.c"
1569*2b15cb3dSCy Schubert   puts(_("write"));
1570*2b15cb3dSCy Schubert #line 938 "../makeshell.c"
1571*2b15cb3dSCy Schubert   puts(_("write"));
1572*2b15cb3dSCy Schubert #line 273 "../usage.c"
1573*2b15cb3dSCy Schubert   puts(_("write"));
1574*2b15cb3dSCy Schubert #line 414 "../usage.c"
1575*2b15cb3dSCy Schubert   puts(_("write"));
1576*2b15cb3dSCy Schubert #line 624 "../usage.c"
1577*2b15cb3dSCy Schubert   puts(_("write"));
1578*2b15cb3dSCy Schubert #line 174 "../version.c"
1579*2b15cb3dSCy Schubert   puts(_("write"));
1580*2b15cb3dSCy Schubert #line 60 "../numeric.c"
1581*2b15cb3dSCy Schubert   puts(_("%s error:  %s option value %ld is out of range.\n"));
1582*2b15cb3dSCy Schubert #line 44 "../check.c"
1583*2b15cb3dSCy Schubert   puts(_("%s error:  %s option requires the %s option\n"));
1584*2b15cb3dSCy Schubert #line 131 "../save.c"
1585*2b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1586*2b15cb3dSCy Schubert #line 183 "../save.c"
1587*2b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1588*2b15cb3dSCy Schubert #line 237 "../save.c"
1589*2b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1590*2b15cb3dSCy Schubert #line 256 "../save.c"
1591*2b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1592*2b15cb3dSCy Schubert #line 534 "../save.c"
1593*2b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
1594*2b15cb3dSCy Schubert   /* END-LIBOPTS-MESSAGES */
1595*2b15cb3dSCy Schubert 
1596*2b15cb3dSCy Schubert   /* USAGE-TEXT: */
1597*2b15cb3dSCy Schubert #line 873 "../usage.c"
1598*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- an alternate for '%s'\n"));
1599*2b15cb3dSCy Schubert #line 1148 "../usage.c"
1600*2b15cb3dSCy Schubert   puts(_("Version, usage and configuration options:"));
1601*2b15cb3dSCy Schubert #line 924 "../usage.c"
1602*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- default option for unnamed options\n"));
1603*2b15cb3dSCy Schubert #line 837 "../usage.c"
1604*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- disabled as '--%s'\n"));
1605*2b15cb3dSCy Schubert #line 1117 "../usage.c"
1606*2b15cb3dSCy Schubert   puts(_(" --- %-14s %s\n"));
1607*2b15cb3dSCy Schubert #line 1115 "../usage.c"
1608*2b15cb3dSCy Schubert   puts(_("This option has been disabled"));
1609*2b15cb3dSCy Schubert #line 864 "../usage.c"
1610*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- enabled by default\n"));
1611*2b15cb3dSCy Schubert #line 40 "../alias.c"
1612*2b15cb3dSCy Schubert   puts(_("%s error:  only "));
1613*2b15cb3dSCy Schubert #line 1194 "../usage.c"
1614*2b15cb3dSCy Schubert   puts(_(" - examining environment variables named %s_*\n"));
1615*2b15cb3dSCy Schubert #line 168 "../file.c"
1616*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- file must not pre-exist\n"));
1617*2b15cb3dSCy Schubert #line 172 "../file.c"
1618*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- file must pre-exist\n"));
1619*2b15cb3dSCy Schubert #line 380 "../usage.c"
1620*2b15cb3dSCy Schubert   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
1621*2b15cb3dSCy Schubert        "hyphen and the flag character.\n"));
1622*2b15cb3dSCy Schubert #line 916 "../makeshell.c"
1623*2b15cb3dSCy Schubert   puts(_("\n"
1624*2b15cb3dSCy Schubert        "= = = = = = = =\n\n"
1625*2b15cb3dSCy Schubert        "This incarnation of genshell will produce\n"
1626*2b15cb3dSCy Schubert        "a shell script to parse the options for %s:\n\n"));
1627*2b15cb3dSCy Schubert #line 166 "../enum.c"
1628*2b15cb3dSCy Schubert   puts(_("  or an integer mask with any of the lower %d bits set\n"));
1629*2b15cb3dSCy Schubert #line 897 "../usage.c"
1630*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- is a set membership option\n"));
1631*2b15cb3dSCy Schubert #line 918 "../usage.c"
1632*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
1633*2b15cb3dSCy Schubert #line 382 "../usage.c"
1634*2b15cb3dSCy Schubert   puts(_("Options are specified by single or double hyphens and their name.\n"));
1635*2b15cb3dSCy Schubert #line 904 "../usage.c"
1636*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- may appear multiple times\n"));
1637*2b15cb3dSCy Schubert #line 891 "../usage.c"
1638*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- may not be preset\n"));
1639*2b15cb3dSCy Schubert #line 1309 "../usage.c"
1640*2b15cb3dSCy Schubert   puts(_("   Arg Option-Name    Description\n"));
1641*2b15cb3dSCy Schubert #line 1245 "../usage.c"
1642*2b15cb3dSCy Schubert   puts(_("  Flg Arg Option-Name    Description\n"));
1643*2b15cb3dSCy Schubert #line 1303 "../usage.c"
1644*2b15cb3dSCy Schubert   puts(_("  Flg Arg Option-Name    Description\n"));
1645*2b15cb3dSCy Schubert #line 1304 "../usage.c"
1646*2b15cb3dSCy Schubert   puts(_(" %3s %s"));
1647*2b15cb3dSCy Schubert #line 1310 "../usage.c"
1648*2b15cb3dSCy Schubert   puts(_(" %3s %s"));
1649*2b15cb3dSCy Schubert #line 387 "../usage.c"
1650*2b15cb3dSCy Schubert   puts(_("The '-#<number>' option may omit the hash char\n"));
1651*2b15cb3dSCy Schubert #line 383 "../usage.c"
1652*2b15cb3dSCy Schubert   puts(_("All arguments are named options.\n"));
1653*2b15cb3dSCy Schubert #line 971 "../usage.c"
1654*2b15cb3dSCy Schubert   puts(_(" - reading file %s"));
1655*2b15cb3dSCy Schubert #line 409 "../usage.c"
1656*2b15cb3dSCy Schubert   puts(_("\n"
1657*2b15cb3dSCy Schubert        "Please send bug reports to:  <%s>\n"));
1658*2b15cb3dSCy Schubert #line 100 "../version.c"
1659*2b15cb3dSCy Schubert   puts(_("\n"
1660*2b15cb3dSCy Schubert        "Please send bug reports to:  <%s>\n"));
1661*2b15cb3dSCy Schubert #line 129 "../version.c"
1662*2b15cb3dSCy Schubert   puts(_("\n"
1663*2b15cb3dSCy Schubert        "Please send bug reports to:  <%s>\n"));
1664*2b15cb3dSCy Schubert #line 903 "../usage.c"
1665*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
1666*2b15cb3dSCy Schubert #line 944 "../usage.c"
1667*2b15cb3dSCy Schubert   puts(_("\n"
1668*2b15cb3dSCy Schubert        "The following option preset mechanisms are supported:\n"));
1669*2b15cb3dSCy Schubert #line 1192 "../usage.c"
1670*2b15cb3dSCy Schubert   puts(_("\n"
1671*2b15cb3dSCy Schubert        "The following option preset mechanisms are supported:\n"));
1672*2b15cb3dSCy Schubert #line 682 "../usage.c"
1673*2b15cb3dSCy Schubert   puts(_("prohibits these options:\n"));
1674*2b15cb3dSCy Schubert #line 677 "../usage.c"
1675*2b15cb3dSCy Schubert   puts(_("prohibits the option '%s'\n"));
1676*2b15cb3dSCy Schubert #line 81 "../numeric.c"
1677*2b15cb3dSCy Schubert   puts(_("%s%ld to %ld"));
1678*2b15cb3dSCy Schubert #line 79 "../numeric.c"
1679*2b15cb3dSCy Schubert   puts(_("%sgreater than or equal to %ld"));
1680*2b15cb3dSCy Schubert #line 75 "../numeric.c"
1681*2b15cb3dSCy Schubert   puts(_("%s%ld exactly"));
1682*2b15cb3dSCy Schubert #line 68 "../numeric.c"
1683*2b15cb3dSCy Schubert   puts(_("%sit must lie in one of the ranges:\n"));
1684*2b15cb3dSCy Schubert #line 68 "../numeric.c"
1685*2b15cb3dSCy Schubert   puts(_("%sit must be in the range:\n"));
1686*2b15cb3dSCy Schubert #line 88 "../numeric.c"
1687*2b15cb3dSCy Schubert   puts(_(", or\n"));
1688*2b15cb3dSCy Schubert #line 66 "../numeric.c"
1689*2b15cb3dSCy Schubert   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
1690*2b15cb3dSCy Schubert #line 77 "../numeric.c"
1691*2b15cb3dSCy Schubert   puts(_("%sless than or equal to %ld"));
1692*2b15cb3dSCy Schubert #line 390 "../usage.c"
1693*2b15cb3dSCy Schubert   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
1694*2b15cb3dSCy Schubert #line 652 "../usage.c"
1695*2b15cb3dSCy Schubert   puts(_("requires the option '%s'\n"));
1696*2b15cb3dSCy Schubert #line 655 "../usage.c"
1697*2b15cb3dSCy Schubert   puts(_("requires these options:\n"));
1698*2b15cb3dSCy Schubert #line 1321 "../usage.c"
1699*2b15cb3dSCy Schubert   puts(_("   Arg Option-Name   Req?  Description\n"));
1700*2b15cb3dSCy Schubert #line 1315 "../usage.c"
1701*2b15cb3dSCy Schubert   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
1702*2b15cb3dSCy Schubert #line 167 "../enum.c"
1703*2b15cb3dSCy Schubert   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
1704*2b15cb3dSCy Schubert        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
1705*2b15cb3dSCy Schubert        "will set them all.  Multiple entries may be passed as an option\n"
1706*2b15cb3dSCy Schubert        "argument list.\n"));
1707*2b15cb3dSCy Schubert #line 910 "../usage.c"
1708*2b15cb3dSCy Schubert   puts(_("\t\t\t\t- may appear up to %d times\n"));
1709*2b15cb3dSCy Schubert #line 77 "../enum.c"
1710*2b15cb3dSCy Schubert   puts(_("The valid \"%s\" option keywords are:\n"));
1711*2b15cb3dSCy Schubert #line 1152 "../usage.c"
1712*2b15cb3dSCy Schubert   puts(_("The next option supports vendor supported extra options:"));
1713*2b15cb3dSCy Schubert #line 773 "../usage.c"
1714*2b15cb3dSCy Schubert   puts(_("These additional options are:"));
1715*2b15cb3dSCy Schubert   /* END-USAGE-TEXT */
1716*2b15cb3dSCy Schubert }
1717*2b15cb3dSCy Schubert #endif /* uncompilable code */
1718ea906c41SOllivier Robert #ifdef  __cplusplus
1719ea906c41SOllivier Robert }
1720ea906c41SOllivier Robert #endif
1721ea906c41SOllivier Robert /* ntp-keygen-opts.c ends here */
1722