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