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