xref: /freebsd/contrib/ntp/util/ntp-keygen-opts.c (revision f0574f5cf69e168cc4ea71ebbe5fdec9ec9a3dfe)
1ea906c41SOllivier Robert /*
2ea906c41SOllivier Robert  *  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.c)
3ea906c41SOllivier Robert  *
4*f0574f5cSXin LI  *  It has been AutoGen-ed  March 21, 2017 at 10:45:48 AM by AutoGen 5.18.5
5ea906c41SOllivier Robert  *  From the definitions    ntp-keygen-opts.def
6ea906c41SOllivier Robert  *  and the template file   options
7ea906c41SOllivier Robert  *
82b15cb3dSCy Schubert  * Generated from AutoOpts 41:0:16 templates.
92b15cb3dSCy Schubert  *
102b15cb3dSCy Schubert  *  AutoOpts is a copyrighted work.  This source file is not encumbered
112b15cb3dSCy Schubert  *  by AutoOpts licensing, but is provided under the licensing terms chosen
122b15cb3dSCy Schubert  *  by the ntp-keygen author or copyright holder.  AutoOpts is
132b15cb3dSCy Schubert  *  licensed under the terms of the LGPL.  The redistributable library
142b15cb3dSCy Schubert  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
152b15cb3dSCy Schubert  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
162b15cb3dSCy Schubert  *  for details.
172b15cb3dSCy Schubert  *
182b15cb3dSCy Schubert  * The ntp-keygen program is copyrighted and licensed
192b15cb3dSCy Schubert  * under the following terms:
202b15cb3dSCy Schubert  *
21*f0574f5cSXin LI  *  Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.
222b15cb3dSCy Schubert  *  This is free software. It is licensed for use, modification and
232b15cb3dSCy Schubert  *  redistribution under the terms of the NTP License, copies of which
242b15cb3dSCy Schubert  *  can be seen at:
252b15cb3dSCy Schubert  *    <http://ntp.org/license>
262b15cb3dSCy Schubert  *    <http://opensource.org/licenses/ntp-license.php>
272b15cb3dSCy Schubert  *
282b15cb3dSCy Schubert  *  Permission to use, copy, modify, and distribute this software and its
292b15cb3dSCy Schubert  *  documentation for any purpose with or without fee is hereby granted,
302b15cb3dSCy Schubert  *  provided that the above copyright notice appears in all copies and that
312b15cb3dSCy Schubert  *  both the copyright notice and this permission notice appear in
322b15cb3dSCy Schubert  *  supporting documentation, and that the name The University of Delaware not be used in
332b15cb3dSCy Schubert  *  advertising or publicity pertaining to distribution of the software
342b15cb3dSCy Schubert  *  without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
352b15cb3dSCy Schubert  *  representations about the suitability this software for any purpose. It
362b15cb3dSCy Schubert  *  is provided "as is" without express or implied warranty.
37ea906c41SOllivier Robert  */
38ea906c41SOllivier Robert 
392b15cb3dSCy Schubert #ifndef __doxygen__
402b15cb3dSCy Schubert #define OPTION_CODE_COMPILE 1
412b15cb3dSCy Schubert #include "ntp-keygen-opts.h"
422b15cb3dSCy Schubert #include <sys/types.h>
43ea906c41SOllivier Robert 
44ea906c41SOllivier Robert #include <limits.h>
45ea906c41SOllivier Robert #include <stdio.h>
462b15cb3dSCy Schubert #include <stdlib.h>
472b15cb3dSCy Schubert #include <errno.h>
48ea906c41SOllivier Robert 
49ea906c41SOllivier Robert #ifdef  __cplusplus
50ea906c41SOllivier Robert extern "C" {
51ea906c41SOllivier Robert #endif
522b15cb3dSCy Schubert extern FILE * option_usage_fp;
532b15cb3dSCy Schubert #define zCopyright      (ntp_keygen_opt_strs+0)
54*f0574f5cSXin LI #define zLicenseDescrip (ntp_keygen_opt_strs+353)
55ea906c41SOllivier Robert 
56ea906c41SOllivier Robert /*
57ea906c41SOllivier Robert  *  global included definitions
58ea906c41SOllivier Robert  */
59ea906c41SOllivier Robert #include <stdlib.h>
602b15cb3dSCy Schubert 
61ea906c41SOllivier Robert #ifdef __windows
62ea906c41SOllivier Robert   extern int atoi(const char*);
63ea906c41SOllivier Robert #else
64ea906c41SOllivier Robert # include <stdlib.h>
65ea906c41SOllivier Robert #endif
66ea906c41SOllivier Robert 
67ea906c41SOllivier Robert #ifndef NULL
68ea906c41SOllivier Robert #  define NULL 0
69ea906c41SOllivier Robert #endif
702b15cb3dSCy Schubert 
712b15cb3dSCy Schubert /**
722b15cb3dSCy Schubert  *  static const strings for ntp-keygen options
73ea906c41SOllivier Robert  */
74*f0574f5cSXin LI static char const ntp_keygen_opt_strs[2422] =
75*f0574f5cSXin LI /*     0 */ "ntp-keygen (ntp) 4.2.8p10\n"
76*f0574f5cSXin LI             "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
772b15cb3dSCy Schubert             "This is free software. It is licensed for use, modification and\n"
782b15cb3dSCy Schubert             "redistribution under the terms of the NTP License, copies of which\n"
792b15cb3dSCy Schubert             "can be seen at:\n"
802b15cb3dSCy Schubert             "  <http://ntp.org/license>\n"
812b15cb3dSCy Schubert             "  <http://opensource.org/licenses/ntp-license.php>\n\0"
82*f0574f5cSXin LI /*   353 */ "Permission to use, copy, modify, and distribute this software and its\n"
832b15cb3dSCy Schubert             "documentation for any purpose with or without fee is hereby granted,\n"
842b15cb3dSCy Schubert             "provided that the above copyright notice appears in all copies and that\n"
852b15cb3dSCy Schubert             "both the copyright notice and this permission notice appear in supporting\n"
862b15cb3dSCy Schubert             "documentation, and that the name The University of Delaware not be used in\n"
872b15cb3dSCy Schubert             "advertising or publicity pertaining to distribution of the software without\n"
882b15cb3dSCy Schubert             "specific, written prior permission.  The University of Delaware and Network\n"
892b15cb3dSCy Schubert             "Time Foundation makes no representations about the suitability this\n"
902b15cb3dSCy Schubert             "software for any purpose.  It is provided \"as is\" without express or\n"
912b15cb3dSCy Schubert             "implied warranty.\n\0"
92*f0574f5cSXin LI /*  1021 */ "identity modulus bits\0"
93*f0574f5cSXin LI /*  1043 */ "IMBITS\0"
94*f0574f5cSXin LI /*  1050 */ "imbits\0"
95*f0574f5cSXin LI /*  1057 */ "certificate scheme\0"
96*f0574f5cSXin LI /*  1076 */ "CERTIFICATE\0"
97*f0574f5cSXin LI /*  1088 */ "certificate\0"
98*f0574f5cSXin LI /*  1100 */ "privatekey cipher\0"
99*f0574f5cSXin LI /*  1118 */ "CIPHER\0"
100*f0574f5cSXin LI /*  1125 */ "cipher\0"
101*f0574f5cSXin LI /*  1132 */ "Increase debug verbosity level\0"
102*f0574f5cSXin LI /*  1163 */ "DEBUG_LEVEL\0"
103*f0574f5cSXin LI /*  1175 */ "debug-level\0"
104*f0574f5cSXin LI /*  1187 */ "Set the debug verbosity level\0"
105*f0574f5cSXin LI /*  1217 */ "SET_DEBUG_LEVEL\0"
106*f0574f5cSXin LI /*  1233 */ "set-debug-level\0"
107*f0574f5cSXin LI /*  1249 */ "Write IFF or GQ identity keys\0"
108*f0574f5cSXin LI /*  1279 */ "ID_KEY\0"
109*f0574f5cSXin LI /*  1286 */ "id-key\0"
110*f0574f5cSXin LI /*  1293 */ "Generate GQ parameters and keys\0"
111*f0574f5cSXin LI /*  1325 */ "GQ_PARAMS\0"
112*f0574f5cSXin LI /*  1335 */ "gq-params\0"
113*f0574f5cSXin LI /*  1345 */ "generate RSA host key\0"
114*f0574f5cSXin LI /*  1367 */ "HOST_KEY\0"
115*f0574f5cSXin LI /*  1376 */ "host-key\0"
116*f0574f5cSXin LI /*  1385 */ "generate IFF parameters\0"
117*f0574f5cSXin LI /*  1409 */ "IFFKEY\0"
118*f0574f5cSXin LI /*  1416 */ "iffkey\0"
119*f0574f5cSXin LI /*  1423 */ "set Autokey group name\0"
120*f0574f5cSXin LI /*  1446 */ "IDENT\0"
121*f0574f5cSXin LI /*  1452 */ "ident\0"
122*f0574f5cSXin LI /*  1458 */ "set certificate lifetime\0"
123*f0574f5cSXin LI /*  1483 */ "LIFETIME\0"
124*f0574f5cSXin LI /*  1492 */ "lifetime\0"
125*f0574f5cSXin LI /*  1501 */ "generate MD5 keys\0"
126*f0574f5cSXin LI /*  1519 */ "MD5KEY\0"
127*f0574f5cSXin LI /*  1526 */ "md5key\0"
128*f0574f5cSXin LI /*  1533 */ "modulus\0"
129*f0574f5cSXin LI /*  1541 */ "MODULUS\0"
130*f0574f5cSXin LI /*  1549 */ "generate PC private certificate\0"
131*f0574f5cSXin LI /*  1581 */ "PVT_CERT\0"
132*f0574f5cSXin LI /*  1590 */ "pvt-cert\0"
133*f0574f5cSXin LI /*  1599 */ "local private password\0"
134*f0574f5cSXin LI /*  1622 */ "PASSWORD\0"
135*f0574f5cSXin LI /*  1631 */ "password\0"
136*f0574f5cSXin LI /*  1640 */ "export IFF or GQ group keys with password\0"
137*f0574f5cSXin LI /*  1682 */ "EXPORT_PASSWD\0"
138*f0574f5cSXin LI /*  1696 */ "export-passwd\0"
139*f0574f5cSXin LI /*  1710 */ "generate sign key (RSA or DSA)\0"
140*f0574f5cSXin LI /*  1741 */ "SIGN_KEY\0"
141*f0574f5cSXin LI /*  1750 */ "sign-key\0"
142*f0574f5cSXin LI /*  1759 */ "set host and optionally group name\0"
143*f0574f5cSXin LI /*  1794 */ "SUBJECT_NAME\0"
144*f0574f5cSXin LI /*  1807 */ "subject-name\0"
145*f0574f5cSXin LI /*  1820 */ "trusted certificate (TC scheme)\0"
146*f0574f5cSXin LI /*  1852 */ "TRUSTED_CERT\0"
147*f0574f5cSXin LI /*  1865 */ "trusted-cert\0"
148*f0574f5cSXin LI /*  1878 */ "generate <num> MV parameters\0"
149*f0574f5cSXin LI /*  1907 */ "MV_PARAMS\0"
150*f0574f5cSXin LI /*  1917 */ "mv-params\0"
151*f0574f5cSXin LI /*  1927 */ "update <num> MV keys\0"
152*f0574f5cSXin LI /*  1948 */ "MV_KEYS\0"
153*f0574f5cSXin LI /*  1956 */ "mv-keys\0"
154*f0574f5cSXin LI /*  1964 */ "display extended usage information and exit\0"
155*f0574f5cSXin LI /*  2008 */ "help\0"
156*f0574f5cSXin LI /*  2013 */ "extended usage information passed thru pager\0"
157*f0574f5cSXin LI /*  2058 */ "more-help\0"
158*f0574f5cSXin LI /*  2068 */ "output version information and exit\0"
159*f0574f5cSXin LI /*  2104 */ "version\0"
160*f0574f5cSXin LI /*  2112 */ "save the option state to a config file\0"
161*f0574f5cSXin LI /*  2151 */ "save-opts\0"
162*f0574f5cSXin LI /*  2161 */ "load options from a config file\0"
163*f0574f5cSXin LI /*  2193 */ "LOAD_OPTS\0"
164*f0574f5cSXin LI /*  2203 */ "no-load-opts\0"
165*f0574f5cSXin LI /*  2216 */ "no\0"
166*f0574f5cSXin LI /*  2219 */ "NTP_KEYGEN\0"
167*f0574f5cSXin LI /*  2230 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p10\n"
1682b15cb3dSCy Schubert             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
169*f0574f5cSXin LI /*  2345 */ "$HOME\0"
170*f0574f5cSXin LI /*  2351 */ ".\0"
171*f0574f5cSXin LI /*  2353 */ ".ntprc\0"
172*f0574f5cSXin LI /*  2360 */ "http://bugs.ntp.org, bugs@ntp.org\0"
173*f0574f5cSXin LI /*  2394 */ "\n\0"
174*f0574f5cSXin LI /*  2396 */ "ntp-keygen (ntp) 4.2.8p10";
1752b15cb3dSCy Schubert 
1762b15cb3dSCy Schubert /**
1772b15cb3dSCy Schubert  *  imbits option description:
1782b15cb3dSCy Schubert  */
1792b15cb3dSCy Schubert #ifdef AUTOKEY
1802b15cb3dSCy Schubert /** Descriptive text for the imbits option */
181*f0574f5cSXin LI #define IMBITS_DESC      (ntp_keygen_opt_strs+1021)
1822b15cb3dSCy Schubert /** Upper-cased name for the imbits option */
183*f0574f5cSXin LI #define IMBITS_NAME      (ntp_keygen_opt_strs+1043)
1842b15cb3dSCy Schubert /** Name string for the imbits option */
185*f0574f5cSXin LI #define IMBITS_name      (ntp_keygen_opt_strs+1050)
1862b15cb3dSCy Schubert /** Compiled in flag settings for the imbits option */
1872b15cb3dSCy Schubert #define IMBITS_FLAGS     (OPTST_DISABLED \
1882b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
1892b15cb3dSCy Schubert 
1902b15cb3dSCy Schubert #else   /* disable imbits */
1912b15cb3dSCy Schubert #define IMBITS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
1922b15cb3dSCy Schubert #define IMBITS_NAME      NULL
1932b15cb3dSCy Schubert #define IMBITS_DESC      NULL
1942b15cb3dSCy Schubert #define IMBITS_name      NULL
1952b15cb3dSCy Schubert #endif  /* AUTOKEY */
1962b15cb3dSCy Schubert 
1972b15cb3dSCy Schubert /**
1982b15cb3dSCy Schubert  *  certificate option description:
1992b15cb3dSCy Schubert  */
2002b15cb3dSCy Schubert #ifdef AUTOKEY
2012b15cb3dSCy Schubert /** Descriptive text for the certificate option */
202*f0574f5cSXin LI #define CERTIFICATE_DESC      (ntp_keygen_opt_strs+1057)
2032b15cb3dSCy Schubert /** Upper-cased name for the certificate option */
204*f0574f5cSXin LI #define CERTIFICATE_NAME      (ntp_keygen_opt_strs+1076)
2052b15cb3dSCy Schubert /** Name string for the certificate option */
206*f0574f5cSXin LI #define CERTIFICATE_name      (ntp_keygen_opt_strs+1088)
2072b15cb3dSCy Schubert /** Compiled in flag settings for the certificate option */
208ea906c41SOllivier Robert #define CERTIFICATE_FLAGS     (OPTST_DISABLED \
209ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
210ea906c41SOllivier Robert 
2112b15cb3dSCy Schubert #else   /* disable certificate */
212ea906c41SOllivier Robert #define CERTIFICATE_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
2132b15cb3dSCy Schubert #define CERTIFICATE_NAME      NULL
2142b15cb3dSCy Schubert #define CERTIFICATE_DESC      NULL
2152b15cb3dSCy Schubert #define CERTIFICATE_name      NULL
2162b15cb3dSCy Schubert #endif  /* AUTOKEY */
217ea906c41SOllivier Robert 
2182b15cb3dSCy Schubert /**
2192b15cb3dSCy Schubert  *  cipher option description:
220ea906c41SOllivier Robert  */
2212b15cb3dSCy Schubert #ifdef AUTOKEY
2222b15cb3dSCy Schubert /** Descriptive text for the cipher option */
223*f0574f5cSXin LI #define CIPHER_DESC      (ntp_keygen_opt_strs+1100)
2242b15cb3dSCy Schubert /** Upper-cased name for the cipher option */
225*f0574f5cSXin LI #define CIPHER_NAME      (ntp_keygen_opt_strs+1118)
2262b15cb3dSCy Schubert /** Name string for the cipher option */
227*f0574f5cSXin LI #define CIPHER_name      (ntp_keygen_opt_strs+1125)
2282b15cb3dSCy Schubert /** Compiled in flag settings for the cipher option */
2292b15cb3dSCy Schubert #define CIPHER_FLAGS     (OPTST_DISABLED \
230ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
231ea906c41SOllivier Robert 
2322b15cb3dSCy Schubert #else   /* disable cipher */
2332b15cb3dSCy Schubert #define CIPHER_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
2342b15cb3dSCy Schubert #define CIPHER_NAME      NULL
2352b15cb3dSCy Schubert #define CIPHER_DESC      NULL
2362b15cb3dSCy Schubert #define CIPHER_name      NULL
2372b15cb3dSCy Schubert #endif  /* AUTOKEY */
238ea906c41SOllivier Robert 
2392b15cb3dSCy Schubert /**
2402b15cb3dSCy Schubert  *  debug-level option description:
241ea906c41SOllivier Robert  */
2422b15cb3dSCy Schubert /** Descriptive text for the debug-level option */
243*f0574f5cSXin LI #define DEBUG_LEVEL_DESC      (ntp_keygen_opt_strs+1132)
2442b15cb3dSCy Schubert /** Upper-cased name for the debug-level option */
245*f0574f5cSXin LI #define DEBUG_LEVEL_NAME      (ntp_keygen_opt_strs+1163)
2462b15cb3dSCy Schubert /** Name string for the debug-level option */
247*f0574f5cSXin LI #define DEBUG_LEVEL_name      (ntp_keygen_opt_strs+1175)
2482b15cb3dSCy Schubert /** Compiled in flag settings for the debug-level option */
2492b15cb3dSCy Schubert #define DEBUG_LEVEL_FLAGS     (OPTST_DISABLED)
2502b15cb3dSCy Schubert 
2512b15cb3dSCy Schubert /**
2522b15cb3dSCy Schubert  *  set-debug-level option description:
2532b15cb3dSCy Schubert  */
2542b15cb3dSCy Schubert /** Descriptive text for the set-debug-level option */
255*f0574f5cSXin LI #define SET_DEBUG_LEVEL_DESC      (ntp_keygen_opt_strs+1187)
2562b15cb3dSCy Schubert /** Upper-cased name for the set-debug-level option */
257*f0574f5cSXin LI #define SET_DEBUG_LEVEL_NAME      (ntp_keygen_opt_strs+1217)
2582b15cb3dSCy Schubert /** Name string for the set-debug-level option */
259*f0574f5cSXin LI #define SET_DEBUG_LEVEL_name      (ntp_keygen_opt_strs+1233)
2602b15cb3dSCy Schubert /** Compiled in flag settings for the set-debug-level option */
2612b15cb3dSCy Schubert #define SET_DEBUG_LEVEL_FLAGS     (OPTST_DISABLED \
2622b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
2632b15cb3dSCy Schubert 
2642b15cb3dSCy Schubert /**
2652b15cb3dSCy Schubert  *  id-key option description:
2662b15cb3dSCy Schubert  */
2672b15cb3dSCy Schubert #ifdef AUTOKEY
2682b15cb3dSCy Schubert /** Descriptive text for the id-key option */
269*f0574f5cSXin LI #define ID_KEY_DESC      (ntp_keygen_opt_strs+1249)
2702b15cb3dSCy Schubert /** Upper-cased name for the id-key option */
271*f0574f5cSXin LI #define ID_KEY_NAME      (ntp_keygen_opt_strs+1279)
2722b15cb3dSCy Schubert /** Name string for the id-key option */
273*f0574f5cSXin LI #define ID_KEY_name      (ntp_keygen_opt_strs+1286)
2742b15cb3dSCy Schubert /** Compiled in flag settings for the id-key option */
275ea906c41SOllivier Robert #define ID_KEY_FLAGS     (OPTST_DISABLED)
276ea906c41SOllivier Robert 
2772b15cb3dSCy Schubert #else   /* disable id-key */
278ea906c41SOllivier Robert #define ID_KEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
2792b15cb3dSCy Schubert #define ID_KEY_NAME      NULL
2802b15cb3dSCy Schubert #define ID_KEY_DESC      NULL
2812b15cb3dSCy Schubert #define ID_KEY_name      NULL
2822b15cb3dSCy Schubert #endif  /* AUTOKEY */
283ea906c41SOllivier Robert 
2842b15cb3dSCy Schubert /**
2852b15cb3dSCy Schubert  *  gq-params option description:
286ea906c41SOllivier Robert  */
2872b15cb3dSCy Schubert #ifdef AUTOKEY
2882b15cb3dSCy Schubert /** Descriptive text for the gq-params option */
289*f0574f5cSXin LI #define GQ_PARAMS_DESC      (ntp_keygen_opt_strs+1293)
2902b15cb3dSCy Schubert /** Upper-cased name for the gq-params option */
291*f0574f5cSXin LI #define GQ_PARAMS_NAME      (ntp_keygen_opt_strs+1325)
2922b15cb3dSCy Schubert /** Name string for the gq-params option */
293*f0574f5cSXin LI #define GQ_PARAMS_name      (ntp_keygen_opt_strs+1335)
2942b15cb3dSCy Schubert /** Compiled in flag settings for the gq-params option */
295ea906c41SOllivier Robert #define GQ_PARAMS_FLAGS     (OPTST_DISABLED)
296ea906c41SOllivier Robert 
2972b15cb3dSCy Schubert #else   /* disable gq-params */
298ea906c41SOllivier Robert #define GQ_PARAMS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
2992b15cb3dSCy Schubert #define GQ_PARAMS_NAME      NULL
3002b15cb3dSCy Schubert #define GQ_PARAMS_DESC      NULL
3012b15cb3dSCy Schubert #define GQ_PARAMS_name      NULL
3022b15cb3dSCy Schubert #endif  /* AUTOKEY */
303ea906c41SOllivier Robert 
3042b15cb3dSCy Schubert /**
3052b15cb3dSCy Schubert  *  host-key option description:
306ea906c41SOllivier Robert  */
3072b15cb3dSCy Schubert #ifdef AUTOKEY
3082b15cb3dSCy Schubert /** Descriptive text for the host-key option */
309*f0574f5cSXin LI #define HOST_KEY_DESC      (ntp_keygen_opt_strs+1345)
3102b15cb3dSCy Schubert /** Upper-cased name for the host-key option */
311*f0574f5cSXin LI #define HOST_KEY_NAME      (ntp_keygen_opt_strs+1367)
3122b15cb3dSCy Schubert /** Name string for the host-key option */
313*f0574f5cSXin LI #define HOST_KEY_name      (ntp_keygen_opt_strs+1376)
3142b15cb3dSCy Schubert /** Compiled in flag settings for the host-key option */
315ea906c41SOllivier Robert #define HOST_KEY_FLAGS     (OPTST_DISABLED)
316ea906c41SOllivier Robert 
3172b15cb3dSCy Schubert #else   /* disable host-key */
318ea906c41SOllivier Robert #define HOST_KEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
3192b15cb3dSCy Schubert #define HOST_KEY_NAME      NULL
3202b15cb3dSCy Schubert #define HOST_KEY_DESC      NULL
3212b15cb3dSCy Schubert #define HOST_KEY_name      NULL
3222b15cb3dSCy Schubert #endif  /* AUTOKEY */
323ea906c41SOllivier Robert 
3242b15cb3dSCy Schubert /**
3252b15cb3dSCy Schubert  *  iffkey option description:
326ea906c41SOllivier Robert  */
3272b15cb3dSCy Schubert #ifdef AUTOKEY
3282b15cb3dSCy Schubert /** Descriptive text for the iffkey option */
329*f0574f5cSXin LI #define IFFKEY_DESC      (ntp_keygen_opt_strs+1385)
3302b15cb3dSCy Schubert /** Upper-cased name for the iffkey option */
331*f0574f5cSXin LI #define IFFKEY_NAME      (ntp_keygen_opt_strs+1409)
3322b15cb3dSCy Schubert /** Name string for the iffkey option */
333*f0574f5cSXin LI #define IFFKEY_name      (ntp_keygen_opt_strs+1416)
3342b15cb3dSCy Schubert /** Compiled in flag settings for the iffkey option */
335ea906c41SOllivier Robert #define IFFKEY_FLAGS     (OPTST_DISABLED)
336ea906c41SOllivier Robert 
3372b15cb3dSCy Schubert #else   /* disable iffkey */
338ea906c41SOllivier Robert #define IFFKEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
3392b15cb3dSCy Schubert #define IFFKEY_NAME      NULL
3402b15cb3dSCy Schubert #define IFFKEY_DESC      NULL
3412b15cb3dSCy Schubert #define IFFKEY_name      NULL
3422b15cb3dSCy Schubert #endif  /* AUTOKEY */
343ea906c41SOllivier Robert 
3442b15cb3dSCy Schubert /**
3452b15cb3dSCy Schubert  *  ident option description:
346ea906c41SOllivier Robert  */
3472b15cb3dSCy Schubert #ifdef AUTOKEY
3482b15cb3dSCy Schubert /** Descriptive text for the ident option */
349*f0574f5cSXin LI #define IDENT_DESC      (ntp_keygen_opt_strs+1423)
3502b15cb3dSCy Schubert /** Upper-cased name for the ident option */
351*f0574f5cSXin LI #define IDENT_NAME      (ntp_keygen_opt_strs+1446)
3522b15cb3dSCy Schubert /** Name string for the ident option */
353*f0574f5cSXin LI #define IDENT_name      (ntp_keygen_opt_strs+1452)
3542b15cb3dSCy Schubert /** Compiled in flag settings for the ident option */
3552b15cb3dSCy Schubert #define IDENT_FLAGS     (OPTST_DISABLED \
3562b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
357ea906c41SOllivier Robert 
3582b15cb3dSCy Schubert #else   /* disable ident */
3592b15cb3dSCy Schubert #define IDENT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
3602b15cb3dSCy Schubert #define IDENT_NAME      NULL
3612b15cb3dSCy Schubert #define IDENT_DESC      NULL
3622b15cb3dSCy Schubert #define IDENT_name      NULL
3632b15cb3dSCy Schubert #endif  /* AUTOKEY */
364ea906c41SOllivier Robert 
3652b15cb3dSCy Schubert /**
3662b15cb3dSCy Schubert  *  lifetime option description:
367ea906c41SOllivier Robert  */
3682b15cb3dSCy Schubert #ifdef AUTOKEY
3692b15cb3dSCy Schubert /** Descriptive text for the lifetime option */
370*f0574f5cSXin LI #define LIFETIME_DESC      (ntp_keygen_opt_strs+1458)
3712b15cb3dSCy Schubert /** Upper-cased name for the lifetime option */
372*f0574f5cSXin LI #define LIFETIME_NAME      (ntp_keygen_opt_strs+1483)
3732b15cb3dSCy Schubert /** Name string for the lifetime option */
374*f0574f5cSXin LI #define LIFETIME_name      (ntp_keygen_opt_strs+1492)
3752b15cb3dSCy Schubert /** Compiled in flag settings for the lifetime option */
3762b15cb3dSCy Schubert #define LIFETIME_FLAGS     (OPTST_DISABLED \
3772b15cb3dSCy Schubert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
3782b15cb3dSCy Schubert 
3792b15cb3dSCy Schubert #else   /* disable lifetime */
3802b15cb3dSCy Schubert #define LIFETIME_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
3812b15cb3dSCy Schubert #define LIFETIME_NAME      NULL
3822b15cb3dSCy Schubert #define LIFETIME_DESC      NULL
3832b15cb3dSCy Schubert #define LIFETIME_name      NULL
3842b15cb3dSCy Schubert #endif  /* AUTOKEY */
3852b15cb3dSCy Schubert 
3862b15cb3dSCy Schubert /**
3872b15cb3dSCy Schubert  *  md5key option description:
3882b15cb3dSCy Schubert  */
3892b15cb3dSCy Schubert /** Descriptive text for the md5key option */
390*f0574f5cSXin LI #define MD5KEY_DESC      (ntp_keygen_opt_strs+1501)
3912b15cb3dSCy Schubert /** Upper-cased name for the md5key option */
392*f0574f5cSXin LI #define MD5KEY_NAME      (ntp_keygen_opt_strs+1519)
3932b15cb3dSCy Schubert /** Name string for the md5key option */
394*f0574f5cSXin LI #define MD5KEY_name      (ntp_keygen_opt_strs+1526)
3952b15cb3dSCy Schubert /** Compiled in flag settings for the md5key option */
396ea906c41SOllivier Robert #define MD5KEY_FLAGS     (OPTST_DISABLED)
397ea906c41SOllivier Robert 
3982b15cb3dSCy Schubert /**
3992b15cb3dSCy Schubert  *  modulus option description:
400ea906c41SOllivier Robert  */
4012b15cb3dSCy Schubert #ifdef AUTOKEY
4022b15cb3dSCy Schubert /** Descriptive text for the modulus option */
403*f0574f5cSXin LI #define MODULUS_DESC      (ntp_keygen_opt_strs+1533)
4042b15cb3dSCy Schubert /** Upper-cased name for the modulus option */
405*f0574f5cSXin LI #define MODULUS_NAME      (ntp_keygen_opt_strs+1541)
4062b15cb3dSCy Schubert /** Name string for the modulus option */
407*f0574f5cSXin LI #define MODULUS_name      (ntp_keygen_opt_strs+1533)
4082b15cb3dSCy Schubert /** Compiled in flag settings for the modulus option */
409ea906c41SOllivier Robert #define MODULUS_FLAGS     (OPTST_DISABLED \
410ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
411ea906c41SOllivier Robert 
4122b15cb3dSCy Schubert #else   /* disable modulus */
413ea906c41SOllivier Robert #define MODULUS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
4142b15cb3dSCy Schubert #define MODULUS_NAME      NULL
4152b15cb3dSCy Schubert #define MODULUS_DESC      NULL
4162b15cb3dSCy Schubert #define MODULUS_name      NULL
4172b15cb3dSCy Schubert #endif  /* AUTOKEY */
418ea906c41SOllivier Robert 
4192b15cb3dSCy Schubert /**
4202b15cb3dSCy Schubert  *  pvt-cert option description:
421ea906c41SOllivier Robert  */
4222b15cb3dSCy Schubert #ifdef AUTOKEY
4232b15cb3dSCy Schubert /** Descriptive text for the pvt-cert option */
424*f0574f5cSXin LI #define PVT_CERT_DESC      (ntp_keygen_opt_strs+1549)
4252b15cb3dSCy Schubert /** Upper-cased name for the pvt-cert option */
426*f0574f5cSXin LI #define PVT_CERT_NAME      (ntp_keygen_opt_strs+1581)
4272b15cb3dSCy Schubert /** Name string for the pvt-cert option */
428*f0574f5cSXin LI #define PVT_CERT_name      (ntp_keygen_opt_strs+1590)
4292b15cb3dSCy Schubert /** Compiled in flag settings for the pvt-cert option */
430ea906c41SOllivier Robert #define PVT_CERT_FLAGS     (OPTST_DISABLED)
431ea906c41SOllivier Robert 
4322b15cb3dSCy Schubert #else   /* disable pvt-cert */
433ea906c41SOllivier Robert #define PVT_CERT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
4342b15cb3dSCy Schubert #define PVT_CERT_NAME      NULL
4352b15cb3dSCy Schubert #define PVT_CERT_DESC      NULL
4362b15cb3dSCy Schubert #define PVT_CERT_name      NULL
4372b15cb3dSCy Schubert #endif  /* AUTOKEY */
438ea906c41SOllivier Robert 
4392b15cb3dSCy Schubert /**
4402b15cb3dSCy Schubert  *  password option description:
441ea906c41SOllivier Robert  */
4422b15cb3dSCy Schubert #ifdef AUTOKEY
4432b15cb3dSCy Schubert /** Descriptive text for the password option */
444*f0574f5cSXin LI #define PASSWORD_DESC      (ntp_keygen_opt_strs+1599)
4452b15cb3dSCy Schubert /** Upper-cased name for the password option */
446*f0574f5cSXin LI #define PASSWORD_NAME      (ntp_keygen_opt_strs+1622)
4472b15cb3dSCy Schubert /** Name string for the password option */
448*f0574f5cSXin LI #define PASSWORD_name      (ntp_keygen_opt_strs+1631)
4492b15cb3dSCy Schubert /** Compiled in flag settings for the password option */
4502b15cb3dSCy Schubert #define PASSWORD_FLAGS     (OPTST_DISABLED \
451ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
452ea906c41SOllivier Robert 
4532b15cb3dSCy Schubert #else   /* disable password */
4542b15cb3dSCy Schubert #define PASSWORD_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
4552b15cb3dSCy Schubert #define PASSWORD_NAME      NULL
4562b15cb3dSCy Schubert #define PASSWORD_DESC      NULL
4572b15cb3dSCy Schubert #define PASSWORD_name      NULL
4582b15cb3dSCy Schubert #endif  /* AUTOKEY */
459ea906c41SOllivier Robert 
4602b15cb3dSCy Schubert /**
4612b15cb3dSCy Schubert  *  export-passwd option description:
462ea906c41SOllivier Robert  */
4632b15cb3dSCy Schubert #ifdef AUTOKEY
4642b15cb3dSCy Schubert /** Descriptive text for the export-passwd option */
465*f0574f5cSXin LI #define EXPORT_PASSWD_DESC      (ntp_keygen_opt_strs+1640)
4662b15cb3dSCy Schubert /** Upper-cased name for the export-passwd option */
467*f0574f5cSXin LI #define EXPORT_PASSWD_NAME      (ntp_keygen_opt_strs+1682)
4682b15cb3dSCy Schubert /** Name string for the export-passwd option */
469*f0574f5cSXin LI #define EXPORT_PASSWD_name      (ntp_keygen_opt_strs+1696)
4702b15cb3dSCy Schubert /** Compiled in flag settings for the export-passwd option */
4712b15cb3dSCy Schubert #define EXPORT_PASSWD_FLAGS     (OPTST_DISABLED \
472ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
473ea906c41SOllivier Robert 
4742b15cb3dSCy Schubert #else   /* disable export-passwd */
4752b15cb3dSCy Schubert #define EXPORT_PASSWD_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
4762b15cb3dSCy Schubert #define EXPORT_PASSWD_NAME      NULL
4772b15cb3dSCy Schubert #define EXPORT_PASSWD_DESC      NULL
4782b15cb3dSCy Schubert #define EXPORT_PASSWD_name      NULL
4792b15cb3dSCy Schubert #endif  /* AUTOKEY */
480ea906c41SOllivier Robert 
4812b15cb3dSCy Schubert /**
4822b15cb3dSCy Schubert  *  sign-key option description:
483ea906c41SOllivier Robert  */
4842b15cb3dSCy Schubert #ifdef AUTOKEY
4852b15cb3dSCy Schubert /** Descriptive text for the sign-key option */
486*f0574f5cSXin LI #define SIGN_KEY_DESC      (ntp_keygen_opt_strs+1710)
4872b15cb3dSCy Schubert /** Upper-cased name for the sign-key option */
488*f0574f5cSXin LI #define SIGN_KEY_NAME      (ntp_keygen_opt_strs+1741)
4892b15cb3dSCy Schubert /** Name string for the sign-key option */
490*f0574f5cSXin LI #define SIGN_KEY_name      (ntp_keygen_opt_strs+1750)
4912b15cb3dSCy Schubert /** Compiled in flag settings for the sign-key option */
492ea906c41SOllivier Robert #define SIGN_KEY_FLAGS     (OPTST_DISABLED \
493ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
494ea906c41SOllivier Robert 
4952b15cb3dSCy Schubert #else   /* disable sign-key */
496ea906c41SOllivier Robert #define SIGN_KEY_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
4972b15cb3dSCy Schubert #define SIGN_KEY_NAME      NULL
4982b15cb3dSCy Schubert #define SIGN_KEY_DESC      NULL
4992b15cb3dSCy Schubert #define SIGN_KEY_name      NULL
5002b15cb3dSCy Schubert #endif  /* AUTOKEY */
501ea906c41SOllivier Robert 
5022b15cb3dSCy Schubert /**
5032b15cb3dSCy Schubert  *  subject-name option description:
504ea906c41SOllivier Robert  */
5052b15cb3dSCy Schubert #ifdef AUTOKEY
5062b15cb3dSCy Schubert /** Descriptive text for the subject-name option */
507*f0574f5cSXin LI #define SUBJECT_NAME_DESC      (ntp_keygen_opt_strs+1759)
5082b15cb3dSCy Schubert /** Upper-cased name for the subject-name option */
509*f0574f5cSXin LI #define SUBJECT_NAME_NAME      (ntp_keygen_opt_strs+1794)
5102b15cb3dSCy Schubert /** Name string for the subject-name option */
511*f0574f5cSXin LI #define SUBJECT_NAME_name      (ntp_keygen_opt_strs+1807)
5122b15cb3dSCy Schubert /** Compiled in flag settings for the subject-name option */
513ea906c41SOllivier Robert #define SUBJECT_NAME_FLAGS     (OPTST_DISABLED \
514ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
515ea906c41SOllivier Robert 
5162b15cb3dSCy Schubert #else   /* disable subject-name */
517ea906c41SOllivier Robert #define SUBJECT_NAME_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
5182b15cb3dSCy Schubert #define SUBJECT_NAME_NAME      NULL
5192b15cb3dSCy Schubert #define SUBJECT_NAME_DESC      NULL
5202b15cb3dSCy Schubert #define SUBJECT_NAME_name      NULL
5212b15cb3dSCy Schubert #endif  /* AUTOKEY */
522ea906c41SOllivier Robert 
5232b15cb3dSCy Schubert /**
5242b15cb3dSCy Schubert  *  trusted-cert option description:
525ea906c41SOllivier Robert  */
5262b15cb3dSCy Schubert #ifdef AUTOKEY
5272b15cb3dSCy Schubert /** Descriptive text for the trusted-cert option */
528*f0574f5cSXin LI #define TRUSTED_CERT_DESC      (ntp_keygen_opt_strs+1820)
5292b15cb3dSCy Schubert /** Upper-cased name for the trusted-cert option */
530*f0574f5cSXin LI #define TRUSTED_CERT_NAME      (ntp_keygen_opt_strs+1852)
5312b15cb3dSCy Schubert /** Name string for the trusted-cert option */
532*f0574f5cSXin LI #define TRUSTED_CERT_name      (ntp_keygen_opt_strs+1865)
5332b15cb3dSCy Schubert /** Compiled in flag settings for the trusted-cert option */
534ea906c41SOllivier Robert #define TRUSTED_CERT_FLAGS     (OPTST_DISABLED)
535ea906c41SOllivier Robert 
5362b15cb3dSCy Schubert #else   /* disable trusted-cert */
537ea906c41SOllivier Robert #define TRUSTED_CERT_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
5382b15cb3dSCy Schubert #define TRUSTED_CERT_NAME      NULL
5392b15cb3dSCy Schubert #define TRUSTED_CERT_DESC      NULL
5402b15cb3dSCy Schubert #define TRUSTED_CERT_name      NULL
5412b15cb3dSCy Schubert #endif  /* AUTOKEY */
542ea906c41SOllivier Robert 
5432b15cb3dSCy Schubert /**
5442b15cb3dSCy Schubert  *  mv-params option description:
545ea906c41SOllivier Robert  */
5462b15cb3dSCy Schubert #ifdef AUTOKEY
5472b15cb3dSCy Schubert /** Descriptive text for the mv-params option */
548*f0574f5cSXin LI #define MV_PARAMS_DESC      (ntp_keygen_opt_strs+1878)
5492b15cb3dSCy Schubert /** Upper-cased name for the mv-params option */
550*f0574f5cSXin LI #define MV_PARAMS_NAME      (ntp_keygen_opt_strs+1907)
5512b15cb3dSCy Schubert /** Name string for the mv-params option */
552*f0574f5cSXin LI #define MV_PARAMS_name      (ntp_keygen_opt_strs+1917)
5532b15cb3dSCy Schubert /** Compiled in flag settings for the mv-params option */
554ea906c41SOllivier Robert #define MV_PARAMS_FLAGS     (OPTST_DISABLED \
555ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
556ea906c41SOllivier Robert 
5572b15cb3dSCy Schubert #else   /* disable mv-params */
558ea906c41SOllivier Robert #define MV_PARAMS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
5592b15cb3dSCy Schubert #define MV_PARAMS_NAME      NULL
5602b15cb3dSCy Schubert #define MV_PARAMS_DESC      NULL
5612b15cb3dSCy Schubert #define MV_PARAMS_name      NULL
5622b15cb3dSCy Schubert #endif  /* AUTOKEY */
563ea906c41SOllivier Robert 
5642b15cb3dSCy Schubert /**
5652b15cb3dSCy Schubert  *  mv-keys option description:
566ea906c41SOllivier Robert  */
5672b15cb3dSCy Schubert #ifdef AUTOKEY
5682b15cb3dSCy Schubert /** Descriptive text for the mv-keys option */
569*f0574f5cSXin LI #define MV_KEYS_DESC      (ntp_keygen_opt_strs+1927)
5702b15cb3dSCy Schubert /** Upper-cased name for the mv-keys option */
571*f0574f5cSXin LI #define MV_KEYS_NAME      (ntp_keygen_opt_strs+1948)
5722b15cb3dSCy Schubert /** Name string for the mv-keys option */
573*f0574f5cSXin LI #define MV_KEYS_name      (ntp_keygen_opt_strs+1956)
5742b15cb3dSCy Schubert /** Compiled in flag settings for the mv-keys option */
575ea906c41SOllivier Robert #define MV_KEYS_FLAGS     (OPTST_DISABLED \
576ea906c41SOllivier Robert         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
577ea906c41SOllivier Robert 
5782b15cb3dSCy Schubert #else   /* disable mv-keys */
579ea906c41SOllivier Robert #define MV_KEYS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
5802b15cb3dSCy Schubert #define MV_KEYS_NAME      NULL
5812b15cb3dSCy Schubert #define MV_KEYS_DESC      NULL
5822b15cb3dSCy Schubert #define MV_KEYS_name      NULL
5832b15cb3dSCy Schubert #endif  /* AUTOKEY */
584ea906c41SOllivier Robert 
585ea906c41SOllivier Robert /*
586ea906c41SOllivier Robert  *  Help/More_Help/Version option descriptions:
587ea906c41SOllivier Robert  */
588*f0574f5cSXin LI #define HELP_DESC       (ntp_keygen_opt_strs+1964)
589*f0574f5cSXin LI #define HELP_name       (ntp_keygen_opt_strs+2008)
5902b15cb3dSCy Schubert #ifdef HAVE_WORKING_FORK
591*f0574f5cSXin LI #define MORE_HELP_DESC  (ntp_keygen_opt_strs+2013)
592*f0574f5cSXin LI #define MORE_HELP_name  (ntp_keygen_opt_strs+2058)
5932b15cb3dSCy Schubert #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
5942b15cb3dSCy Schubert #else
5952b15cb3dSCy Schubert #define MORE_HELP_DESC  HELP_DESC
5962b15cb3dSCy Schubert #define MORE_HELP_name  HELP_name
5972b15cb3dSCy Schubert #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
5982b15cb3dSCy Schubert #endif
5992b15cb3dSCy Schubert #ifdef NO_OPTIONAL_OPT_ARGS
6002b15cb3dSCy Schubert #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
6012b15cb3dSCy Schubert #else
6022b15cb3dSCy Schubert #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
6032b15cb3dSCy Schubert                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
6042b15cb3dSCy Schubert #endif
605*f0574f5cSXin LI #define VER_DESC        (ntp_keygen_opt_strs+2068)
606*f0574f5cSXin LI #define VER_name        (ntp_keygen_opt_strs+2104)
607*f0574f5cSXin LI #define SAVE_OPTS_DESC  (ntp_keygen_opt_strs+2112)
608*f0574f5cSXin LI #define SAVE_OPTS_name  (ntp_keygen_opt_strs+2151)
609*f0574f5cSXin LI #define LOAD_OPTS_DESC     (ntp_keygen_opt_strs+2161)
610*f0574f5cSXin LI #define LOAD_OPTS_NAME     (ntp_keygen_opt_strs+2193)
611*f0574f5cSXin LI #define NO_LOAD_OPTS_name  (ntp_keygen_opt_strs+2203)
612*f0574f5cSXin LI #define LOAD_OPTS_pfx      (ntp_keygen_opt_strs+2216)
6132b15cb3dSCy Schubert #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
6142b15cb3dSCy Schubert /**
615ea906c41SOllivier Robert  *  Declare option callback procedures
616ea906c41SOllivier Robert  */
6172b15cb3dSCy Schubert #ifdef AUTOKEY
6182b15cb3dSCy Schubert   static tOptProc doOptImbits;
6192b15cb3dSCy Schubert #else /* not AUTOKEY */
6202b15cb3dSCy Schubert # define doOptImbits NULL
6212b15cb3dSCy Schubert #endif /* def/not AUTOKEY */
6222b15cb3dSCy Schubert #ifdef AUTOKEY
623ea906c41SOllivier Robert   static tOptProc doOptModulus;
6242b15cb3dSCy Schubert #else /* not AUTOKEY */
625ea906c41SOllivier Robert # define doOptModulus NULL
6262b15cb3dSCy Schubert #endif /* def/not AUTOKEY */
627ea906c41SOllivier Robert extern tOptProc
6282b15cb3dSCy Schubert     ntpOptionPrintVersion, optionBooleanVal,      optionNestedVal,
6292b15cb3dSCy Schubert     optionNumericVal,      optionPagedUsage,      optionResetOpt,
6302b15cb3dSCy Schubert     optionStackArg,        optionTimeDate,        optionTimeVal,
6312b15cb3dSCy Schubert     optionUnstackArg,      optionVendorOption;
632ea906c41SOllivier Robert static tOptProc
6332b15cb3dSCy Schubert     doOptDebug_Level, doUsageOpt;
6342b15cb3dSCy Schubert #define VER_PROC        ntpOptionPrintVersion
635ea906c41SOllivier Robert 
6362b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
6372b15cb3dSCy Schubert /**
6382b15cb3dSCy Schubert  *  Define the ntp-keygen Option Descriptions.
6392b15cb3dSCy Schubert  * This is an array of OPTION_CT entries, one for each
6402b15cb3dSCy Schubert  * option that the ntp-keygen program responds to.
641ea906c41SOllivier Robert  */
642ea906c41SOllivier Robert static tOptDesc optDesc[OPTION_CT] = {
6432b15cb3dSCy Schubert   {  /* entry idx, value */ 0, VALUE_OPT_IMBITS,
6442b15cb3dSCy Schubert      /* equiv idx, value */ 0, VALUE_OPT_IMBITS,
6452b15cb3dSCy Schubert      /* equivalenced to  */ NO_EQUIVALENT,
6462b15cb3dSCy Schubert      /* min, max, act ct */ 0, 1, 0,
6472b15cb3dSCy Schubert      /* opt state flags  */ IMBITS_FLAGS, 0,
6482b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --imbits */
6492b15cb3dSCy Schubert      /* arg list/cookie  */ NULL,
6502b15cb3dSCy Schubert      /* must/cannot opts */ NULL, NULL,
6512b15cb3dSCy Schubert      /* option proc      */ doOptImbits,
6522b15cb3dSCy Schubert      /* desc, NAME, name */ IMBITS_DESC, IMBITS_NAME, IMBITS_name,
6532b15cb3dSCy Schubert      /* disablement strs */ NULL, NULL },
6542b15cb3dSCy Schubert 
6552b15cb3dSCy Schubert   {  /* entry idx, value */ 1, VALUE_OPT_CERTIFICATE,
6562b15cb3dSCy Schubert      /* equiv idx, value */ 1, VALUE_OPT_CERTIFICATE,
657ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
658ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
659ea906c41SOllivier Robert      /* opt state flags  */ CERTIFICATE_FLAGS, 0,
6602b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --certificate */
661ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
662ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
663ea906c41SOllivier Robert      /* option proc      */ NULL,
6642b15cb3dSCy Schubert      /* desc, NAME, name */ CERTIFICATE_DESC, CERTIFICATE_NAME, CERTIFICATE_name,
665ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
666ea906c41SOllivier Robert 
6672b15cb3dSCy Schubert   {  /* entry idx, value */ 2, VALUE_OPT_CIPHER,
6682b15cb3dSCy Schubert      /* equiv idx, value */ 2, VALUE_OPT_CIPHER,
6692b15cb3dSCy Schubert      /* equivalenced to  */ NO_EQUIVALENT,
6702b15cb3dSCy Schubert      /* min, max, act ct */ 0, 1, 0,
6712b15cb3dSCy Schubert      /* opt state flags  */ CIPHER_FLAGS, 0,
6722b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --cipher */
6732b15cb3dSCy Schubert      /* arg list/cookie  */ NULL,
6742b15cb3dSCy Schubert      /* must/cannot opts */ NULL, NULL,
6752b15cb3dSCy Schubert      /* option proc      */ NULL,
6762b15cb3dSCy Schubert      /* desc, NAME, name */ CIPHER_DESC, CIPHER_NAME, CIPHER_name,
6772b15cb3dSCy Schubert      /* disablement strs */ NULL, NULL },
6782b15cb3dSCy Schubert 
6792b15cb3dSCy Schubert   {  /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
6802b15cb3dSCy Schubert      /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL,
681ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
682ea906c41SOllivier Robert      /* min, max, act ct */ 0, NOLIMIT, 0,
683ea906c41SOllivier Robert      /* opt state flags  */ DEBUG_LEVEL_FLAGS, 0,
6842b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --debug-level */
685ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
686ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
6872b15cb3dSCy Schubert      /* option proc      */ doOptDebug_Level,
6882b15cb3dSCy Schubert      /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name,
689ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
690ea906c41SOllivier Robert 
6912b15cb3dSCy Schubert   {  /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
6922b15cb3dSCy Schubert      /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL,
693ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
694ea906c41SOllivier Robert      /* min, max, act ct */ 0, NOLIMIT, 0,
695ea906c41SOllivier Robert      /* opt state flags  */ SET_DEBUG_LEVEL_FLAGS, 0,
6962b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --set-debug-level */
697ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
698ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
6992b15cb3dSCy Schubert      /* option proc      */ optionNumericVal,
7002b15cb3dSCy Schubert      /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name,
701ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
702ea906c41SOllivier Robert 
7032b15cb3dSCy Schubert   {  /* entry idx, value */ 5, VALUE_OPT_ID_KEY,
7042b15cb3dSCy Schubert      /* equiv idx, value */ 5, VALUE_OPT_ID_KEY,
705ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
706ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
707ea906c41SOllivier Robert      /* opt state flags  */ ID_KEY_FLAGS, 0,
7082b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --id-key */
709ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
710ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
711ea906c41SOllivier Robert      /* option proc      */ NULL,
7122b15cb3dSCy Schubert      /* desc, NAME, name */ ID_KEY_DESC, ID_KEY_NAME, ID_KEY_name,
713ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
714ea906c41SOllivier Robert 
7152b15cb3dSCy Schubert   {  /* entry idx, value */ 6, VALUE_OPT_GQ_PARAMS,
7162b15cb3dSCy Schubert      /* equiv idx, value */ 6, VALUE_OPT_GQ_PARAMS,
717ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
718ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
719ea906c41SOllivier Robert      /* opt state flags  */ GQ_PARAMS_FLAGS, 0,
7202b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --gq-params */
721ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
722ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
723ea906c41SOllivier Robert      /* option proc      */ NULL,
7242b15cb3dSCy Schubert      /* desc, NAME, name */ GQ_PARAMS_DESC, GQ_PARAMS_NAME, GQ_PARAMS_name,
725ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
726ea906c41SOllivier Robert 
7272b15cb3dSCy Schubert   {  /* entry idx, value */ 7, VALUE_OPT_HOST_KEY,
7282b15cb3dSCy Schubert      /* equiv idx, value */ 7, VALUE_OPT_HOST_KEY,
729ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
730ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
731ea906c41SOllivier Robert      /* opt state flags  */ HOST_KEY_FLAGS, 0,
7322b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --host-key */
733ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
734ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
735ea906c41SOllivier Robert      /* option proc      */ NULL,
7362b15cb3dSCy Schubert      /* desc, NAME, name */ HOST_KEY_DESC, HOST_KEY_NAME, HOST_KEY_name,
737ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
738ea906c41SOllivier Robert 
7392b15cb3dSCy Schubert   {  /* entry idx, value */ 8, VALUE_OPT_IFFKEY,
7402b15cb3dSCy Schubert      /* equiv idx, value */ 8, VALUE_OPT_IFFKEY,
741ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
742ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
743ea906c41SOllivier Robert      /* opt state flags  */ IFFKEY_FLAGS, 0,
7442b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --iffkey */
745ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
746ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
747ea906c41SOllivier Robert      /* option proc      */ NULL,
7482b15cb3dSCy Schubert      /* desc, NAME, name */ IFFKEY_DESC, IFFKEY_NAME, IFFKEY_name,
749ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
750ea906c41SOllivier Robert 
7512b15cb3dSCy Schubert   {  /* entry idx, value */ 9, VALUE_OPT_IDENT,
7522b15cb3dSCy Schubert      /* equiv idx, value */ 9, VALUE_OPT_IDENT,
753ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
754ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
7552b15cb3dSCy Schubert      /* opt state flags  */ IDENT_FLAGS, 0,
7562b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --ident */
757ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
758ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
759ea906c41SOllivier Robert      /* option proc      */ NULL,
7602b15cb3dSCy Schubert      /* desc, NAME, name */ IDENT_DESC, IDENT_NAME, IDENT_name,
761ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
762ea906c41SOllivier Robert 
7632b15cb3dSCy Schubert   {  /* entry idx, value */ 10, VALUE_OPT_LIFETIME,
7642b15cb3dSCy Schubert      /* equiv idx, value */ 10, VALUE_OPT_LIFETIME,
7652b15cb3dSCy Schubert      /* equivalenced to  */ NO_EQUIVALENT,
7662b15cb3dSCy Schubert      /* min, max, act ct */ 0, 1, 0,
7672b15cb3dSCy Schubert      /* opt state flags  */ LIFETIME_FLAGS, 0,
7682b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --lifetime */
7692b15cb3dSCy Schubert      /* arg list/cookie  */ NULL,
7702b15cb3dSCy Schubert      /* must/cannot opts */ NULL, NULL,
7712b15cb3dSCy Schubert      /* option proc      */ optionNumericVal,
7722b15cb3dSCy Schubert      /* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name,
7732b15cb3dSCy Schubert      /* disablement strs */ NULL, NULL },
7742b15cb3dSCy Schubert 
7752b15cb3dSCy Schubert   {  /* entry idx, value */ 11, VALUE_OPT_MD5KEY,
7762b15cb3dSCy Schubert      /* equiv idx, value */ 11, VALUE_OPT_MD5KEY,
777ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
778ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
779ea906c41SOllivier Robert      /* opt state flags  */ MD5KEY_FLAGS, 0,
7802b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --md5key */
781ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
782ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
783ea906c41SOllivier Robert      /* option proc      */ NULL,
7842b15cb3dSCy Schubert      /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name,
785ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
786ea906c41SOllivier Robert 
7872b15cb3dSCy Schubert   {  /* entry idx, value */ 12, VALUE_OPT_MODULUS,
7882b15cb3dSCy Schubert      /* equiv idx, value */ 12, VALUE_OPT_MODULUS,
789ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
790ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
791ea906c41SOllivier Robert      /* opt state flags  */ MODULUS_FLAGS, 0,
7922b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --modulus */
793ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
794ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
795ea906c41SOllivier Robert      /* option proc      */ doOptModulus,
7962b15cb3dSCy Schubert      /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name,
797ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
798ea906c41SOllivier Robert 
7992b15cb3dSCy Schubert   {  /* entry idx, value */ 13, VALUE_OPT_PVT_CERT,
8002b15cb3dSCy Schubert      /* equiv idx, value */ 13, VALUE_OPT_PVT_CERT,
801ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
802ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
803ea906c41SOllivier Robert      /* opt state flags  */ PVT_CERT_FLAGS, 0,
8042b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --pvt-cert */
805ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
806ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
807ea906c41SOllivier Robert      /* option proc      */ NULL,
8082b15cb3dSCy Schubert      /* desc, NAME, name */ PVT_CERT_DESC, PVT_CERT_NAME, PVT_CERT_name,
809ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
810ea906c41SOllivier Robert 
8112b15cb3dSCy Schubert   {  /* entry idx, value */ 14, VALUE_OPT_PASSWORD,
8122b15cb3dSCy Schubert      /* equiv idx, value */ 14, VALUE_OPT_PASSWORD,
813ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
814ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
8152b15cb3dSCy Schubert      /* opt state flags  */ PASSWORD_FLAGS, 0,
8162b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --password */
817ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
818ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
819ea906c41SOllivier Robert      /* option proc      */ NULL,
8202b15cb3dSCy Schubert      /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name,
821ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
822ea906c41SOllivier Robert 
8232b15cb3dSCy Schubert   {  /* entry idx, value */ 15, VALUE_OPT_EXPORT_PASSWD,
8242b15cb3dSCy Schubert      /* equiv idx, value */ 15, VALUE_OPT_EXPORT_PASSWD,
825ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
826ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
8272b15cb3dSCy Schubert      /* opt state flags  */ EXPORT_PASSWD_FLAGS, 0,
8282b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --export-passwd */
829ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
830ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
831ea906c41SOllivier Robert      /* option proc      */ NULL,
8322b15cb3dSCy Schubert      /* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name,
833ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
834ea906c41SOllivier Robert 
8352b15cb3dSCy Schubert   {  /* entry idx, value */ 16, VALUE_OPT_SIGN_KEY,
8362b15cb3dSCy Schubert      /* equiv idx, value */ 16, VALUE_OPT_SIGN_KEY,
837ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
838ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
839ea906c41SOllivier Robert      /* opt state flags  */ SIGN_KEY_FLAGS, 0,
8402b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --sign-key */
841ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
842ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
843ea906c41SOllivier Robert      /* option proc      */ NULL,
8442b15cb3dSCy Schubert      /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name,
845ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
846ea906c41SOllivier Robert 
8472b15cb3dSCy Schubert   {  /* entry idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
8482b15cb3dSCy Schubert      /* equiv idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
849ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
850ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
851ea906c41SOllivier Robert      /* opt state flags  */ SUBJECT_NAME_FLAGS, 0,
8522b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --subject-name */
853ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
854ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
855ea906c41SOllivier Robert      /* option proc      */ NULL,
8562b15cb3dSCy Schubert      /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name,
857ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
858ea906c41SOllivier Robert 
8592b15cb3dSCy Schubert   {  /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT,
8602b15cb3dSCy Schubert      /* equiv idx, value */ 18, VALUE_OPT_TRUSTED_CERT,
861ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
862ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
863ea906c41SOllivier Robert      /* opt state flags  */ TRUSTED_CERT_FLAGS, 0,
8642b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --trusted-cert */
865ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
866ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
867ea906c41SOllivier Robert      /* option proc      */ NULL,
8682b15cb3dSCy Schubert      /* desc, NAME, name */ TRUSTED_CERT_DESC, TRUSTED_CERT_NAME, TRUSTED_CERT_name,
869ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
870ea906c41SOllivier Robert 
8712b15cb3dSCy Schubert   {  /* entry idx, value */ 19, VALUE_OPT_MV_PARAMS,
8722b15cb3dSCy Schubert      /* equiv idx, value */ 19, VALUE_OPT_MV_PARAMS,
873ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
874ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
875ea906c41SOllivier Robert      /* opt state flags  */ MV_PARAMS_FLAGS, 0,
8762b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --mv-params */
877ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
878ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
879ea906c41SOllivier Robert      /* option proc      */ optionNumericVal,
8802b15cb3dSCy Schubert      /* desc, NAME, name */ MV_PARAMS_DESC, MV_PARAMS_NAME, MV_PARAMS_name,
881ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
882ea906c41SOllivier Robert 
8832b15cb3dSCy Schubert   {  /* entry idx, value */ 20, VALUE_OPT_MV_KEYS,
8842b15cb3dSCy Schubert      /* equiv idx, value */ 20, VALUE_OPT_MV_KEYS,
885ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
886ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
887ea906c41SOllivier Robert      /* opt state flags  */ MV_KEYS_FLAGS, 0,
8882b15cb3dSCy Schubert      /* last opt argumnt */ { NULL }, /* --mv-keys */
889ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
890ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
891ea906c41SOllivier Robert      /* option proc      */ optionNumericVal,
8922b15cb3dSCy Schubert      /* desc, NAME, name */ MV_KEYS_DESC, MV_KEYS_NAME, MV_KEYS_name,
893ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
894ea906c41SOllivier Robert 
895ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
8962b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
897ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
898ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
8992b15cb3dSCy Schubert      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
900ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
901ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
902ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
9032b15cb3dSCy Schubert      /* option proc      */ VER_PROC,
9042b15cb3dSCy Schubert      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
905ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
906ea906c41SOllivier Robert 
907ea906c41SOllivier Robert 
908ea906c41SOllivier Robert 
909ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
9102b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
911ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
912ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
9132b15cb3dSCy Schubert      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
914ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
915ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
916ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
917ea906c41SOllivier Robert      /* option proc      */ doUsageOpt,
9182b15cb3dSCy Schubert      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
919ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
920ea906c41SOllivier Robert 
921ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
9222b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
923ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
924ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
9252b15cb3dSCy Schubert      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
926ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
927ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
928ea906c41SOllivier Robert      /* must/cannot opts */ NULL,  NULL,
929ea906c41SOllivier Robert      /* option proc      */ optionPagedUsage,
9302b15cb3dSCy Schubert      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
931ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
932ea906c41SOllivier Robert 
933ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
9342b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
935ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
936ea906c41SOllivier Robert      /* min, max, act ct */ 0, 1, 0,
937ea906c41SOllivier Robert      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
9382b15cb3dSCy Schubert                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
939ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
940ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
941ea906c41SOllivier Robert      /* must/cannot opts */ NULL,  NULL,
942ea906c41SOllivier Robert      /* option proc      */ NULL,
9432b15cb3dSCy Schubert      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
944ea906c41SOllivier Robert      /* disablement strs */ NULL, NULL },
945ea906c41SOllivier Robert 
946ea906c41SOllivier Robert   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
9472b15cb3dSCy Schubert      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
948ea906c41SOllivier Robert      /* equivalenced to  */ NO_EQUIVALENT,
949ea906c41SOllivier Robert      /* min, max, act ct */ 0, NOLIMIT, 0,
9502b15cb3dSCy Schubert      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
9512b15cb3dSCy Schubert 			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
952ea906c41SOllivier Robert      /* last opt argumnt */ { NULL },
953ea906c41SOllivier Robert      /* arg list/cookie  */ NULL,
954ea906c41SOllivier Robert      /* must/cannot opts */ NULL, NULL,
955ea906c41SOllivier Robert      /* option proc      */ optionLoadOpt,
9562b15cb3dSCy Schubert      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
9572b15cb3dSCy Schubert      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
958ea906c41SOllivier Robert };
959ea906c41SOllivier Robert 
960ea906c41SOllivier Robert 
9612b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
9622b15cb3dSCy Schubert /** Reference to the upper cased version of ntp-keygen. */
963*f0574f5cSXin LI #define zPROGNAME       (ntp_keygen_opt_strs+2219)
9642b15cb3dSCy Schubert /** Reference to the title line for ntp-keygen usage. */
965*f0574f5cSXin LI #define zUsageTitle     (ntp_keygen_opt_strs+2230)
9662b15cb3dSCy Schubert /** ntp-keygen configuration file name. */
967*f0574f5cSXin LI #define zRcName         (ntp_keygen_opt_strs+2353)
9682b15cb3dSCy Schubert /** Directories to search for ntp-keygen config files. */
9692b15cb3dSCy Schubert static char const * const apzHomeList[3] = {
970*f0574f5cSXin LI     ntp_keygen_opt_strs+2345,
971*f0574f5cSXin LI     ntp_keygen_opt_strs+2351,
9722b15cb3dSCy Schubert     NULL };
9732b15cb3dSCy Schubert /** The ntp-keygen program bug email address. */
974*f0574f5cSXin LI #define zBugsAddr       (ntp_keygen_opt_strs+2360)
9752b15cb3dSCy Schubert /** Clarification/explanation of what ntp-keygen does. */
976*f0574f5cSXin LI #define zExplain        (ntp_keygen_opt_strs+2394)
9772b15cb3dSCy Schubert /** Extra detail explaining what ntp-keygen does. */
9782b15cb3dSCy Schubert #define zDetail         (NULL)
9792b15cb3dSCy Schubert /** The full version string for ntp-keygen. */
980*f0574f5cSXin LI #define zFullVersion    (ntp_keygen_opt_strs+2396)
9812b15cb3dSCy Schubert /* extracted from optcode.tlib near line 364 */
982ea906c41SOllivier Robert 
983ea906c41SOllivier Robert #if defined(ENABLE_NLS)
984ea906c41SOllivier Robert # define OPTPROC_BASE OPTPROC_TRANSLATE
985ea906c41SOllivier Robert   static tOptionXlateProc translate_option_strings;
986ea906c41SOllivier Robert #else
987ea906c41SOllivier Robert # define OPTPROC_BASE OPTPROC_NONE
988ea906c41SOllivier Robert # define translate_option_strings NULL
989ea906c41SOllivier Robert #endif /* ENABLE_NLS */
990ea906c41SOllivier Robert 
9912b15cb3dSCy Schubert #define ntp_keygen_full_usage (NULL)
9922b15cb3dSCy Schubert #define ntp_keygen_short_usage (NULL)
9932b15cb3dSCy Schubert 
9942b15cb3dSCy Schubert #endif /* not defined __doxygen__ */
9952b15cb3dSCy Schubert 
9962b15cb3dSCy Schubert /*
9972b15cb3dSCy Schubert  *  Create the static procedure(s) declared above.
9982b15cb3dSCy Schubert  */
9992b15cb3dSCy Schubert /**
10002b15cb3dSCy Schubert  * The callout function that invokes the optionUsage function.
10012b15cb3dSCy Schubert  *
10022b15cb3dSCy Schubert  * @param[in] opts the AutoOpts option description structure
10032b15cb3dSCy Schubert  * @param[in] od   the descriptor for the "help" (usage) option.
10042b15cb3dSCy Schubert  * @noreturn
10052b15cb3dSCy Schubert  */
10062b15cb3dSCy Schubert static void
10072b15cb3dSCy Schubert doUsageOpt(tOptions * opts, tOptDesc * od)
10082b15cb3dSCy Schubert {
10092b15cb3dSCy Schubert     int ex_code;
10102b15cb3dSCy Schubert     ex_code = NTP_KEYGEN_EXIT_SUCCESS;
10112b15cb3dSCy Schubert     optionUsage(&ntp_keygenOptions, ex_code);
10122b15cb3dSCy Schubert     /* NOTREACHED */
10132b15cb3dSCy Schubert     exit(1);
10142b15cb3dSCy Schubert     (void)opts;
10152b15cb3dSCy Schubert     (void)od;
10162b15cb3dSCy Schubert }
10172b15cb3dSCy Schubert 
10182b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10192b15cb3dSCy Schubert /**
10202b15cb3dSCy Schubert  * Code to handle the imbits option, when AUTOKEY is #define-d.
10212b15cb3dSCy Schubert  * The number of bits in the identity modulus.  The default is 256.
10222b15cb3dSCy Schubert  * @param[in] pOptions the ntp-keygen options data structure
10232b15cb3dSCy Schubert  * @param[in,out] pOptDesc the option descriptor for this option.
10242b15cb3dSCy Schubert  */
10252b15cb3dSCy Schubert #ifdef AUTOKEY
10262b15cb3dSCy Schubert static void
10272b15cb3dSCy Schubert doOptImbits(tOptions* pOptions, tOptDesc* pOptDesc)
10282b15cb3dSCy Schubert {
10292b15cb3dSCy Schubert     static struct {long rmin, rmax;} const rng[1] = {
10302b15cb3dSCy Schubert         { 256, 2048 } };
10312b15cb3dSCy Schubert     int  ix;
10322b15cb3dSCy Schubert 
10332b15cb3dSCy Schubert     if (pOptions <= OPTPROC_EMIT_LIMIT)
10342b15cb3dSCy Schubert         goto emit_ranges;
10352b15cb3dSCy Schubert     optionNumericVal(pOptions, pOptDesc);
10362b15cb3dSCy Schubert 
10372b15cb3dSCy Schubert     for (ix = 0; ix < 1; ix++) {
10382b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt < rng[ix].rmin)
10392b15cb3dSCy Schubert             continue;  /* ranges need not be ordered. */
10402b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt == rng[ix].rmin)
10412b15cb3dSCy Schubert             return;
10422b15cb3dSCy Schubert         if (rng[ix].rmax == LONG_MIN)
10432b15cb3dSCy Schubert             continue;
10442b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
10452b15cb3dSCy Schubert             return;
10462b15cb3dSCy Schubert     }
10472b15cb3dSCy Schubert 
10482b15cb3dSCy Schubert     option_usage_fp = stderr;
10492b15cb3dSCy Schubert 
10502b15cb3dSCy Schubert  emit_ranges:
1051276da39aSCy Schubert optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
10522b15cb3dSCy Schubert }
10532b15cb3dSCy Schubert #endif /* defined AUTOKEY */
10542b15cb3dSCy Schubert 
10552b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10562b15cb3dSCy Schubert /**
10572b15cb3dSCy Schubert  * Code to handle the debug-level option.
10582b15cb3dSCy Schubert  *
10592b15cb3dSCy Schubert  * @param[in] pOptions the ntp-keygen options data structure
10602b15cb3dSCy Schubert  * @param[in,out] pOptDesc the option descriptor for this option.
10612b15cb3dSCy Schubert  */
10622b15cb3dSCy Schubert static void
10632b15cb3dSCy Schubert doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
10642b15cb3dSCy Schubert {
10652b15cb3dSCy Schubert     /*
10662b15cb3dSCy Schubert      * Be sure the flag-code[0] handles special values for the options pointer
10672b15cb3dSCy Schubert      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
10682b15cb3dSCy Schubert      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
10692b15cb3dSCy Schubert      * reset its state.
10702b15cb3dSCy Schubert      */
10712b15cb3dSCy Schubert     /* extracted from debug-opt.def, line 15 */
10722b15cb3dSCy Schubert OPT_VALUE_SET_DEBUG_LEVEL++;
10732b15cb3dSCy Schubert     (void)pOptDesc;
10742b15cb3dSCy Schubert     (void)pOptions;
10752b15cb3dSCy Schubert }
10762b15cb3dSCy Schubert 
10772b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10782b15cb3dSCy Schubert /**
10792b15cb3dSCy Schubert  * Code to handle the modulus option, when AUTOKEY is #define-d.
10802b15cb3dSCy Schubert  * The number of bits in the prime modulus.  The default is 512.
10812b15cb3dSCy Schubert  * @param[in] pOptions the ntp-keygen options data structure
10822b15cb3dSCy Schubert  * @param[in,out] pOptDesc the option descriptor for this option.
10832b15cb3dSCy Schubert  */
10842b15cb3dSCy Schubert #ifdef AUTOKEY
10852b15cb3dSCy Schubert static void
10862b15cb3dSCy Schubert doOptModulus(tOptions* pOptions, tOptDesc* pOptDesc)
10872b15cb3dSCy Schubert {
10882b15cb3dSCy Schubert     static struct {long rmin, rmax;} const rng[1] = {
10892b15cb3dSCy Schubert         { 256, 2048 } };
10902b15cb3dSCy Schubert     int  ix;
10912b15cb3dSCy Schubert 
10922b15cb3dSCy Schubert     if (pOptions <= OPTPROC_EMIT_LIMIT)
10932b15cb3dSCy Schubert         goto emit_ranges;
10942b15cb3dSCy Schubert     optionNumericVal(pOptions, pOptDesc);
10952b15cb3dSCy Schubert 
10962b15cb3dSCy Schubert     for (ix = 0; ix < 1; ix++) {
10972b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt < rng[ix].rmin)
10982b15cb3dSCy Schubert             continue;  /* ranges need not be ordered. */
10992b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt == rng[ix].rmin)
11002b15cb3dSCy Schubert             return;
11012b15cb3dSCy Schubert         if (rng[ix].rmax == LONG_MIN)
11022b15cb3dSCy Schubert             continue;
11032b15cb3dSCy Schubert         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
11042b15cb3dSCy Schubert             return;
11052b15cb3dSCy Schubert     }
11062b15cb3dSCy Schubert 
11072b15cb3dSCy Schubert     option_usage_fp = stderr;
11082b15cb3dSCy Schubert 
11092b15cb3dSCy Schubert  emit_ranges:
1110276da39aSCy Schubert optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
11112b15cb3dSCy Schubert }
11122b15cb3dSCy Schubert #endif /* defined AUTOKEY */
1113276da39aSCy Schubert /* extracted from optmain.tlib near line 1250 */
11142b15cb3dSCy Schubert 
11152b15cb3dSCy Schubert /**
11162b15cb3dSCy Schubert  * The directory containing the data associated with ntp-keygen.
11172b15cb3dSCy Schubert  */
11182b15cb3dSCy Schubert #ifndef  PKGDATADIR
11192b15cb3dSCy Schubert # define PKGDATADIR ""
11202b15cb3dSCy Schubert #endif
11212b15cb3dSCy Schubert 
11222b15cb3dSCy Schubert /**
11232b15cb3dSCy Schubert  * Information about the person or institution that packaged ntp-keygen
11242b15cb3dSCy Schubert  * for the current distribution.
11252b15cb3dSCy Schubert  */
11262b15cb3dSCy Schubert #ifndef  WITH_PACKAGER
11272b15cb3dSCy Schubert # define ntp_keygen_packager_info NULL
11282b15cb3dSCy Schubert #else
11292b15cb3dSCy Schubert /** Packager information for ntp-keygen. */
11302b15cb3dSCy Schubert static char const ntp_keygen_packager_info[] =
11312b15cb3dSCy Schubert     "Packaged by " WITH_PACKAGER
11322b15cb3dSCy Schubert 
11332b15cb3dSCy Schubert # ifdef WITH_PACKAGER_VERSION
11342b15cb3dSCy Schubert         " ("WITH_PACKAGER_VERSION")"
11352b15cb3dSCy Schubert # endif
11362b15cb3dSCy Schubert 
11372b15cb3dSCy Schubert # ifdef WITH_PACKAGER_BUG_REPORTS
11382b15cb3dSCy Schubert     "\nReport ntp_keygen bugs to " WITH_PACKAGER_BUG_REPORTS
11392b15cb3dSCy Schubert # endif
11402b15cb3dSCy Schubert     "\n";
11412b15cb3dSCy Schubert #endif
11422b15cb3dSCy Schubert #ifndef __doxygen__
11432b15cb3dSCy Schubert 
11442b15cb3dSCy Schubert #endif /* __doxygen__ */
11452b15cb3dSCy Schubert /**
11462b15cb3dSCy Schubert  * The option definitions for ntp-keygen.  The one structure that
11472b15cb3dSCy Schubert  * binds them all.
11482b15cb3dSCy Schubert  */
1149ea906c41SOllivier Robert tOptions ntp_keygenOptions = {
1150ea906c41SOllivier Robert     OPTIONS_STRUCT_VERSION,
1151ea906c41SOllivier Robert     0, NULL,                    /* original argc + argv    */
1152ea906c41SOllivier Robert     ( OPTPROC_BASE
1153ea906c41SOllivier Robert     + OPTPROC_ERRSTOP
1154ea906c41SOllivier Robert     + OPTPROC_SHORTOPT
1155ea906c41SOllivier Robert     + OPTPROC_LONGOPT
1156ea906c41SOllivier Robert     + OPTPROC_NO_REQ_OPT
1157ea906c41SOllivier Robert     + OPTPROC_ENVIRON
1158ea906c41SOllivier Robert     + OPTPROC_NO_ARGS
11592b15cb3dSCy Schubert     + OPTPROC_MISUSE ),
1160ea906c41SOllivier Robert     0, NULL,                    /* current option index, current option */
1161ea906c41SOllivier Robert     NULL,         NULL,         zPROGNAME,
11622b15cb3dSCy Schubert     zRcName,      zCopyright,   zLicenseDescrip,
1163ea906c41SOllivier Robert     zFullVersion, apzHomeList,  zUsageTitle,
1164ea906c41SOllivier Robert     zExplain,     zDetail,      optDesc,
1165ea906c41SOllivier Robert     zBugsAddr,                  /* address to send bugs to */
1166ea906c41SOllivier Robert     NULL, NULL,                 /* extensions/saved state  */
1167ea906c41SOllivier Robert     optionUsage, /* usage procedure */
1168ea906c41SOllivier Robert     translate_option_strings,   /* translation procedure */
1169ea906c41SOllivier Robert     /*
1170ea906c41SOllivier Robert      *  Indexes to special options
1171ea906c41SOllivier Robert      */
11722b15cb3dSCy Schubert     { INDEX_OPT_MORE_HELP, /* more-help option index */
11732b15cb3dSCy Schubert       INDEX_OPT_SAVE_OPTS, /* save option index */
11742b15cb3dSCy Schubert       NO_EQUIVALENT, /* '-#' option index */
1175ea906c41SOllivier Robert       NO_EQUIVALENT /* index of default opt */
1176ea906c41SOllivier Robert     },
11772b15cb3dSCy Schubert     26 /* full option count */, 21 /* user option count */,
11782b15cb3dSCy Schubert     ntp_keygen_full_usage, ntp_keygen_short_usage,
11792b15cb3dSCy Schubert     NULL, NULL,
11802b15cb3dSCy Schubert     PKGDATADIR, ntp_keygen_packager_info
1181ea906c41SOllivier Robert };
1182ea906c41SOllivier Robert 
1183ea906c41SOllivier Robert #if ENABLE_NLS
11842b15cb3dSCy Schubert /**
11852b15cb3dSCy Schubert  * This code is designed to translate translatable option text for the
11862b15cb3dSCy Schubert  * ntp-keygen program.  These translations happen upon entry
11872b15cb3dSCy Schubert  * to optionProcess().
11882b15cb3dSCy Schubert  */
1189ea906c41SOllivier Robert #include <stdio.h>
1190ea906c41SOllivier Robert #include <stdlib.h>
1191ea906c41SOllivier Robert #include <string.h>
1192ea906c41SOllivier Robert #include <unistd.h>
11932b15cb3dSCy Schubert #ifdef HAVE_DCGETTEXT
11942b15cb3dSCy Schubert # include <gettext.h>
11952b15cb3dSCy Schubert #endif
1196ea906c41SOllivier Robert #include <autoopts/usage-txt.h>
1197ea906c41SOllivier Robert 
1198ea906c41SOllivier Robert static char * AO_gettext(char const * pz);
1199ea906c41SOllivier Robert static void   coerce_it(void ** s);
1200ea906c41SOllivier Robert 
12012b15cb3dSCy Schubert /**
12022b15cb3dSCy Schubert  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
12032b15cb3dSCy Schubert  * to convert from English to the target language, then strdup-duplicates the
12042b15cb3dSCy Schubert  * result string.  It tries the "libopts" domain first, then whatever has been
12052b15cb3dSCy Schubert  * set via the \a textdomain(3) call.
12062b15cb3dSCy Schubert  *
12072b15cb3dSCy Schubert  * @param[in] pz the input text used as a lookup key.
12082b15cb3dSCy Schubert  * @returns the translated text (if there is one),
12092b15cb3dSCy Schubert  *   or the original text (if not).
12102b15cb3dSCy Schubert  */
1211ea906c41SOllivier Robert static char *
1212ea906c41SOllivier Robert AO_gettext(char const * pz)
1213ea906c41SOllivier Robert {
12142b15cb3dSCy Schubert     char * res;
1215ea906c41SOllivier Robert     if (pz == NULL)
1216ea906c41SOllivier Robert         return NULL;
12172b15cb3dSCy Schubert #ifdef HAVE_DCGETTEXT
1218ea906c41SOllivier Robert     /*
12192b15cb3dSCy Schubert      * While processing the option_xlateable_txt data, try to use the
12202b15cb3dSCy Schubert      * "libopts" domain.  Once we switch to the option descriptor data,
12212b15cb3dSCy Schubert      * do *not* use that domain.
12222b15cb3dSCy Schubert      */
12232b15cb3dSCy Schubert     if (option_xlateable_txt.field_ct != 0) {
12242b15cb3dSCy Schubert         res = dgettext("libopts", pz);
12252b15cb3dSCy Schubert         if (res == pz)
1226276da39aSCy Schubert             res = (char *)VOIDP(_(pz));
12272b15cb3dSCy Schubert     } else
1228276da39aSCy Schubert         res = (char *)VOIDP(_(pz));
12292b15cb3dSCy Schubert #else
1230276da39aSCy Schubert     res = (char *)VOIDP(_(pz));
12312b15cb3dSCy Schubert #endif
12322b15cb3dSCy Schubert     if (res == pz)
12332b15cb3dSCy Schubert         return res;
12342b15cb3dSCy Schubert     res = strdup(res);
12352b15cb3dSCy Schubert     if (res == NULL) {
12362b15cb3dSCy Schubert         fputs(_("No memory for duping translated strings\n"), stderr);
12372b15cb3dSCy Schubert         exit(NTP_KEYGEN_EXIT_FAILURE);
12382b15cb3dSCy Schubert     }
12392b15cb3dSCy Schubert     return res;
12402b15cb3dSCy Schubert }
12412b15cb3dSCy Schubert 
12422b15cb3dSCy Schubert /**
12432b15cb3dSCy Schubert  * All the pointers we use are marked "* const", but they are stored in
12442b15cb3dSCy Schubert  * writable memory.  Coerce the mutability and set the pointer.
12452b15cb3dSCy Schubert  */
12462b15cb3dSCy Schubert static void coerce_it(void ** s) { *s = AO_gettext(*s);
12472b15cb3dSCy Schubert }
12482b15cb3dSCy Schubert 
12492b15cb3dSCy Schubert /**
12502b15cb3dSCy Schubert  * Translate all the translatable strings in the ntp_keygenOptions
12512b15cb3dSCy Schubert  * structure defined above.  This is done only once.
1252ea906c41SOllivier Robert  */
1253ea906c41SOllivier Robert static void
1254ea906c41SOllivier Robert translate_option_strings(void)
1255ea906c41SOllivier Robert {
12562b15cb3dSCy Schubert     tOptions * const opts = &ntp_keygenOptions;
12572b15cb3dSCy Schubert 
1258ea906c41SOllivier Robert     /*
1259ea906c41SOllivier Robert      *  Guard against re-translation.  It won't work.  The strings will have
1260ea906c41SOllivier Robert      *  been changed by the first pass through this code.  One shot only.
1261ea906c41SOllivier Robert      */
12622b15cb3dSCy Schubert     if (option_xlateable_txt.field_ct != 0) {
1263ea906c41SOllivier Robert         /*
12642b15cb3dSCy Schubert          *  Do the translations.  The first pointer follows the field count
12652b15cb3dSCy Schubert          *  field.  The field count field is the size of a pointer.
1266ea906c41SOllivier Robert          */
1267276da39aSCy Schubert         char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
12682b15cb3dSCy Schubert         int     ix  = option_xlateable_txt.field_ct;
1269ea906c41SOllivier Robert 
1270ea906c41SOllivier Robert         do {
12712b15cb3dSCy Schubert             ppz++; /* skip over field_ct */
1272ea906c41SOllivier Robert             *ppz = AO_gettext(*ppz);
1273ea906c41SOllivier Robert         } while (--ix > 0);
12742b15cb3dSCy Schubert         /* prevent re-translation and disable "libopts" domain lookup */
12752b15cb3dSCy Schubert         option_xlateable_txt.field_ct = 0;
1276ea906c41SOllivier Robert 
1277276da39aSCy Schubert         coerce_it(VOIDP(&(opts->pzCopyright)));
1278276da39aSCy Schubert         coerce_it(VOIDP(&(opts->pzCopyNotice)));
1279276da39aSCy Schubert         coerce_it(VOIDP(&(opts->pzFullVersion)));
1280276da39aSCy Schubert         coerce_it(VOIDP(&(opts->pzUsageTitle)));
1281276da39aSCy Schubert         coerce_it(VOIDP(&(opts->pzExplain)));
1282276da39aSCy Schubert         coerce_it(VOIDP(&(opts->pzDetail)));
1283ea906c41SOllivier Robert         {
12842b15cb3dSCy Schubert             tOptDesc * od = opts->pOptDesc;
12852b15cb3dSCy Schubert             for (ix = opts->optCt; ix > 0; ix--, od++)
1286276da39aSCy Schubert                 coerce_it(VOIDP(&(od->pzText)));
1287ea906c41SOllivier Robert         }
1288ea906c41SOllivier Robert     }
1289ea906c41SOllivier Robert }
1290ea906c41SOllivier Robert #endif /* ENABLE_NLS */
1291ea906c41SOllivier Robert 
12922b15cb3dSCy Schubert #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
12932b15cb3dSCy Schubert /** I18N function strictly for xgettext.  Do not compile. */
12942b15cb3dSCy Schubert static void bogus_function(void) {
12952b15cb3dSCy Schubert   /* TRANSLATORS:
12962b15cb3dSCy Schubert 
12972b15cb3dSCy Schubert      The following dummy function was crated solely so that xgettext can
12982b15cb3dSCy Schubert      extract the correct strings.  These strings are actually referenced
12992b15cb3dSCy Schubert      by a field name in the ntp_keygenOptions structure noted in the
13002b15cb3dSCy Schubert      comments below.  The literal text is defined in ntp_keygen_opt_strs.
13012b15cb3dSCy Schubert 
13022b15cb3dSCy Schubert      NOTE: the strings below are segmented with respect to the source string
13032b15cb3dSCy Schubert      ntp_keygen_opt_strs.  The strings above are handed off for translation
13042b15cb3dSCy Schubert      at run time a paragraph at a time.  Consequently, they are presented here
13052b15cb3dSCy Schubert      for translation a paragraph at a time.
13062b15cb3dSCy Schubert 
13072b15cb3dSCy Schubert      ALSO: often the description for an option will reference another option
13082b15cb3dSCy Schubert      by name.  These are set off with apostrophe quotes (I hope).  Do not
13092b15cb3dSCy Schubert      translate option names.
13102b15cb3dSCy Schubert    */
13112b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzCopyright */
1312*f0574f5cSXin LI   puts(_("ntp-keygen (ntp) 4.2.8p10\n\
1313*f0574f5cSXin LI Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
13142b15cb3dSCy Schubert This is free software. It is licensed for use, modification and\n\
13152b15cb3dSCy Schubert redistribution under the terms of the NTP License, copies of which\n\
13162b15cb3dSCy Schubert can be seen at:\n"));
13172b15cb3dSCy Schubert   puts(_("  <http://ntp.org/license>\n\
13182b15cb3dSCy Schubert   <http://opensource.org/licenses/ntp-license.php>\n"));
13192b15cb3dSCy Schubert 
13202b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzCopyNotice */
13212b15cb3dSCy Schubert   puts(_("Permission to use, copy, modify, and distribute this software and its\n\
13222b15cb3dSCy Schubert documentation for any purpose with or without fee is hereby granted,\n\
13232b15cb3dSCy Schubert provided that the above copyright notice appears in all copies and that\n\
13242b15cb3dSCy Schubert both the copyright notice and this permission notice appear in supporting\n\
13252b15cb3dSCy Schubert documentation, and that the name The University of Delaware not be used in\n\
13262b15cb3dSCy Schubert advertising or publicity pertaining to distribution of the software without\n\
13272b15cb3dSCy Schubert specific, written prior permission.  The University of Delaware and Network\n\
13282b15cb3dSCy Schubert Time Foundation makes no representations about the suitability this\n\
13292b15cb3dSCy Schubert software for any purpose.  It is provided \"as is\" without express or\n\
13302b15cb3dSCy Schubert implied warranty.\n"));
13312b15cb3dSCy Schubert 
13322b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13332b15cb3dSCy Schubert   puts(_("identity modulus bits"));
13342b15cb3dSCy Schubert 
13352b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13362b15cb3dSCy Schubert   puts(_("certificate scheme"));
13372b15cb3dSCy Schubert 
13382b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13392b15cb3dSCy Schubert   puts(_("privatekey cipher"));
13402b15cb3dSCy Schubert 
13412b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13422b15cb3dSCy Schubert   puts(_("Increase debug verbosity level"));
13432b15cb3dSCy Schubert 
13442b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13452b15cb3dSCy Schubert   puts(_("Set the debug verbosity level"));
13462b15cb3dSCy Schubert 
13472b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13482b15cb3dSCy Schubert   puts(_("Write IFF or GQ identity keys"));
13492b15cb3dSCy Schubert 
13502b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13512b15cb3dSCy Schubert   puts(_("Generate GQ parameters and keys"));
13522b15cb3dSCy Schubert 
13532b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13542b15cb3dSCy Schubert   puts(_("generate RSA host key"));
13552b15cb3dSCy Schubert 
13562b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13572b15cb3dSCy Schubert   puts(_("generate IFF parameters"));
13582b15cb3dSCy Schubert 
13592b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13602b15cb3dSCy Schubert   puts(_("set Autokey group name"));
13612b15cb3dSCy Schubert 
13622b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13632b15cb3dSCy Schubert   puts(_("set certificate lifetime"));
13642b15cb3dSCy Schubert 
13652b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13662b15cb3dSCy Schubert   puts(_("generate MD5 keys"));
13672b15cb3dSCy Schubert 
13682b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13692b15cb3dSCy Schubert   puts(_("modulus"));
13702b15cb3dSCy Schubert 
13712b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13722b15cb3dSCy Schubert   puts(_("generate PC private certificate"));
13732b15cb3dSCy Schubert 
13742b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13752b15cb3dSCy Schubert   puts(_("local private password"));
13762b15cb3dSCy Schubert 
13772b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13782b15cb3dSCy Schubert   puts(_("export IFF or GQ group keys with password"));
13792b15cb3dSCy Schubert 
13802b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13812b15cb3dSCy Schubert   puts(_("generate sign key (RSA or DSA)"));
13822b15cb3dSCy Schubert 
13832b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13842b15cb3dSCy Schubert   puts(_("set host and optionally group name"));
13852b15cb3dSCy Schubert 
13862b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13872b15cb3dSCy Schubert   puts(_("trusted certificate (TC scheme)"));
13882b15cb3dSCy Schubert 
13892b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13902b15cb3dSCy Schubert   puts(_("generate <num> MV parameters"));
13912b15cb3dSCy Schubert 
13922b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13932b15cb3dSCy Schubert   puts(_("update <num> MV keys"));
13942b15cb3dSCy Schubert 
13952b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13962b15cb3dSCy Schubert   puts(_("display extended usage information and exit"));
13972b15cb3dSCy Schubert 
13982b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
13992b15cb3dSCy Schubert   puts(_("extended usage information passed thru pager"));
14002b15cb3dSCy Schubert 
14012b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
14022b15cb3dSCy Schubert   puts(_("output version information and exit"));
14032b15cb3dSCy Schubert 
14042b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
14052b15cb3dSCy Schubert   puts(_("save the option state to a config file"));
14062b15cb3dSCy Schubert 
14072b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pOptDesc->pzText */
14082b15cb3dSCy Schubert   puts(_("load options from a config file"));
14092b15cb3dSCy Schubert 
14102b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzUsageTitle */
1411*f0574f5cSXin LI   puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p10\n\
14122b15cb3dSCy Schubert Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
14132b15cb3dSCy Schubert 
14142b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzExplain */
14152b15cb3dSCy Schubert   puts(_("\n"));
14162b15cb3dSCy Schubert 
14172b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzFullVersion */
1418*f0574f5cSXin LI   puts(_("ntp-keygen (ntp) 4.2.8p10"));
14192b15cb3dSCy Schubert 
14202b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzFullUsage */
14212b15cb3dSCy Schubert   puts(_("<<<NOT-FOUND>>>"));
14222b15cb3dSCy Schubert 
14232b15cb3dSCy Schubert   /* referenced via ntp_keygenOptions.pzShortUsage */
14242b15cb3dSCy Schubert   puts(_("<<<NOT-FOUND>>>"));
14252b15cb3dSCy Schubert   /* LIBOPTS-MESSAGES: */
14262b15cb3dSCy Schubert #line 67 "../autoopts.c"
14272b15cb3dSCy Schubert   puts(_("allocation of %d bytes failed\n"));
14282b15cb3dSCy Schubert #line 93 "../autoopts.c"
14292b15cb3dSCy Schubert   puts(_("allocation of %d bytes failed\n"));
14302b15cb3dSCy Schubert #line 53 "../init.c"
14312b15cb3dSCy Schubert   puts(_("AutoOpts function called without option descriptor\n"));
14322b15cb3dSCy Schubert #line 86 "../init.c"
14332b15cb3dSCy Schubert   puts(_("\tThis exceeds the compiled library version:  "));
14342b15cb3dSCy Schubert #line 84 "../init.c"
14352b15cb3dSCy Schubert   puts(_("Automated Options Processing Error!\n"
14362b15cb3dSCy Schubert        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
14372b15cb3dSCy Schubert #line 80 "../autoopts.c"
14382b15cb3dSCy Schubert   puts(_("realloc of %d bytes at 0x%p failed\n"));
14392b15cb3dSCy Schubert #line 88 "../init.c"
14402b15cb3dSCy Schubert   puts(_("\tThis is less than the minimum library version:  "));
14412b15cb3dSCy Schubert #line 121 "../version.c"
14422b15cb3dSCy Schubert   puts(_("Automated Options version %s\n"
14432b15cb3dSCy Schubert        "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
1444276da39aSCy Schubert #line 87 "../makeshell.c"
14452b15cb3dSCy Schubert   puts(_("(AutoOpts bug):  %s.\n"));
14462b15cb3dSCy Schubert #line 90 "../reset.c"
14472b15cb3dSCy Schubert   puts(_("optionResetOpt() called, but reset-option not configured"));
14482b15cb3dSCy Schubert #line 292 "../usage.c"
14492b15cb3dSCy Schubert   puts(_("could not locate the 'help' option"));
14502b15cb3dSCy Schubert #line 336 "../autoopts.c"
14512b15cb3dSCy Schubert   puts(_("optionProcess() was called with invalid data"));
14522b15cb3dSCy Schubert #line 748 "../usage.c"
14532b15cb3dSCy Schubert   puts(_("invalid argument type specified"));
14542b15cb3dSCy Schubert #line 598 "../find.c"
14552b15cb3dSCy Schubert   puts(_("defaulted to option with optional arg"));
14562b15cb3dSCy Schubert #line 76 "../alias.c"
14572b15cb3dSCy Schubert   puts(_("aliasing option is out of range."));
14582b15cb3dSCy Schubert #line 234 "../enum.c"
14592b15cb3dSCy Schubert   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
14602b15cb3dSCy Schubert #line 108 "../find.c"
14612b15cb3dSCy Schubert   puts(_("  The following options match:\n"));
14622b15cb3dSCy Schubert #line 293 "../find.c"
14632b15cb3dSCy Schubert   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
14642b15cb3dSCy Schubert #line 161 "../check.c"
14652b15cb3dSCy Schubert   puts(_("%s: Command line arguments required\n"));
14662b15cb3dSCy Schubert #line 43 "../alias.c"
14672b15cb3dSCy Schubert   puts(_("%d %s%s options allowed\n"));
1468276da39aSCy Schubert #line 94 "../makeshell.c"
14692b15cb3dSCy Schubert   puts(_("%s error %d (%s) calling %s for '%s'\n"));
1470276da39aSCy Schubert #line 306 "../makeshell.c"
14712b15cb3dSCy Schubert   puts(_("interprocess pipe"));
14722b15cb3dSCy Schubert #line 168 "../version.c"
14732b15cb3dSCy Schubert   puts(_("error: version option argument '%c' invalid.  Use:\n"
14742b15cb3dSCy Schubert        "\t'v' - version only\n"
14752b15cb3dSCy Schubert        "\t'c' - version and copyright\n"
14762b15cb3dSCy Schubert        "\t'n' - version and full copyright notice\n"));
14772b15cb3dSCy Schubert #line 58 "../check.c"
14782b15cb3dSCy Schubert   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
14792b15cb3dSCy Schubert #line 217 "../find.c"
14802b15cb3dSCy Schubert   puts(_("%s: The '%s' option has been disabled."));
14812b15cb3dSCy Schubert #line 430 "../find.c"
14822b15cb3dSCy Schubert   puts(_("%s: The '%s' option has been disabled."));
14832b15cb3dSCy Schubert #line 38 "../alias.c"
14842b15cb3dSCy Schubert   puts(_("-equivalence"));
14852b15cb3dSCy Schubert #line 469 "../find.c"
14862b15cb3dSCy Schubert   puts(_("%s: illegal option -- %c\n"));
14872b15cb3dSCy Schubert #line 110 "../reset.c"
14882b15cb3dSCy Schubert   puts(_("%s: illegal option -- %c\n"));
14892b15cb3dSCy Schubert #line 271 "../find.c"
14902b15cb3dSCy Schubert   puts(_("%s: illegal option -- %s\n"));
14912b15cb3dSCy Schubert #line 755 "../find.c"
14922b15cb3dSCy Schubert   puts(_("%s: illegal option -- %s\n"));
14932b15cb3dSCy Schubert #line 118 "../reset.c"
14942b15cb3dSCy Schubert   puts(_("%s: illegal option -- %s\n"));
14952b15cb3dSCy Schubert #line 335 "../find.c"
14962b15cb3dSCy Schubert   puts(_("%s: unknown vendor extension option -- %s\n"));
14972b15cb3dSCy Schubert #line 159 "../enum.c"
14982b15cb3dSCy Schubert   puts(_("  or an integer from %d through %d\n"));
14992b15cb3dSCy Schubert #line 169 "../enum.c"
15002b15cb3dSCy Schubert   puts(_("  or an integer from %d through %d\n"));
15012b15cb3dSCy Schubert #line 747 "../usage.c"
15022b15cb3dSCy Schubert   puts(_("%s error:  invalid option descriptor for %s\n"));
15032b15cb3dSCy Schubert #line 1081 "../usage.c"
15042b15cb3dSCy Schubert   puts(_("%s error:  invalid option descriptor for %s\n"));
15052b15cb3dSCy Schubert #line 385 "../find.c"
15062b15cb3dSCy Schubert   puts(_("%s: invalid option name: %s\n"));
15072b15cb3dSCy Schubert #line 527 "../find.c"
15082b15cb3dSCy Schubert   puts(_("%s: The '%s' option requires an argument.\n"));
15092b15cb3dSCy Schubert #line 156 "../autoopts.c"
15102b15cb3dSCy Schubert   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
15112b15cb3dSCy Schubert        "\t'%s' and '%s'."));
15122b15cb3dSCy Schubert #line 94 "../check.c"
15132b15cb3dSCy Schubert   puts(_("%s error:  The %s option is required\n"));
15142b15cb3dSCy Schubert #line 632 "../find.c"
15152b15cb3dSCy Schubert   puts(_("%s: The '%s' option cannot have an argument.\n"));
15162b15cb3dSCy Schubert #line 151 "../check.c"
15172b15cb3dSCy Schubert   puts(_("%s: Command line arguments are not allowed.\n"));
15182b15cb3dSCy Schubert #line 535 "../save.c"
15192b15cb3dSCy Schubert   puts(_("error %d (%s) creating %s\n"));
15202b15cb3dSCy Schubert #line 234 "../enum.c"
15212b15cb3dSCy Schubert   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
15222b15cb3dSCy Schubert #line 93 "../reset.c"
15232b15cb3dSCy Schubert   puts(_("%s error: The '%s' option requires an argument.\n"));
15242b15cb3dSCy Schubert #line 184 "../save.c"
15252b15cb3dSCy Schubert   puts(_("error %d (%s) stat-ing %s\n"));
15262b15cb3dSCy Schubert #line 238 "../save.c"
15272b15cb3dSCy Schubert   puts(_("error %d (%s) stat-ing %s\n"));
15282b15cb3dSCy Schubert #line 143 "../restore.c"
15292b15cb3dSCy Schubert   puts(_("%s error: no saved option state\n"));
15302b15cb3dSCy Schubert #line 231 "../autoopts.c"
15312b15cb3dSCy Schubert   puts(_("'%s' is not a command line option.\n"));
15322b15cb3dSCy Schubert #line 111 "../time.c"
15332b15cb3dSCy Schubert   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
15342b15cb3dSCy Schubert #line 132 "../save.c"
15352b15cb3dSCy Schubert   puts(_("'%s' not defined\n"));
15362b15cb3dSCy Schubert #line 50 "../time.c"
15372b15cb3dSCy Schubert   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
15382b15cb3dSCy Schubert #line 92 "../check.c"
15392b15cb3dSCy Schubert   puts(_("%s error:  The %s option must appear %d times.\n"));
15402b15cb3dSCy Schubert #line 164 "../numeric.c"
15412b15cb3dSCy Schubert   puts(_("%s error:  '%s' is not a recognizable number.\n"));
15422b15cb3dSCy Schubert #line 200 "../enum.c"
15432b15cb3dSCy Schubert   puts(_("%s error:  %s exceeds %s keyword count\n"));
15442b15cb3dSCy Schubert #line 330 "../usage.c"
15452b15cb3dSCy Schubert   puts(_("Try '%s %s' for more information.\n"));
15462b15cb3dSCy Schubert #line 45 "../alias.c"
15472b15cb3dSCy Schubert   puts(_("one %s%s option allowed\n"));
1548276da39aSCy Schubert #line 208 "../makeshell.c"
15492b15cb3dSCy Schubert   puts(_("standard output"));
1550276da39aSCy Schubert #line 943 "../makeshell.c"
15512b15cb3dSCy Schubert   puts(_("standard output"));
15522b15cb3dSCy Schubert #line 274 "../usage.c"
15532b15cb3dSCy Schubert   puts(_("standard output"));
15542b15cb3dSCy Schubert #line 415 "../usage.c"
15552b15cb3dSCy Schubert   puts(_("standard output"));
15562b15cb3dSCy Schubert #line 625 "../usage.c"
15572b15cb3dSCy Schubert   puts(_("standard output"));
15582b15cb3dSCy Schubert #line 175 "../version.c"
15592b15cb3dSCy Schubert   puts(_("standard output"));
15602b15cb3dSCy Schubert #line 274 "../usage.c"
15612b15cb3dSCy Schubert   puts(_("standard error"));
15622b15cb3dSCy Schubert #line 415 "../usage.c"
15632b15cb3dSCy Schubert   puts(_("standard error"));
15642b15cb3dSCy Schubert #line 625 "../usage.c"
15652b15cb3dSCy Schubert   puts(_("standard error"));
15662b15cb3dSCy Schubert #line 175 "../version.c"
15672b15cb3dSCy Schubert   puts(_("standard error"));
1568276da39aSCy Schubert #line 208 "../makeshell.c"
15692b15cb3dSCy Schubert   puts(_("write"));
1570276da39aSCy Schubert #line 943 "../makeshell.c"
15712b15cb3dSCy Schubert   puts(_("write"));
15722b15cb3dSCy Schubert #line 273 "../usage.c"
15732b15cb3dSCy Schubert   puts(_("write"));
15742b15cb3dSCy Schubert #line 414 "../usage.c"
15752b15cb3dSCy Schubert   puts(_("write"));
15762b15cb3dSCy Schubert #line 624 "../usage.c"
15772b15cb3dSCy Schubert   puts(_("write"));
15782b15cb3dSCy Schubert #line 174 "../version.c"
15792b15cb3dSCy Schubert   puts(_("write"));
15802b15cb3dSCy Schubert #line 60 "../numeric.c"
15812b15cb3dSCy Schubert   puts(_("%s error:  %s option value %ld is out of range.\n"));
15822b15cb3dSCy Schubert #line 44 "../check.c"
15832b15cb3dSCy Schubert   puts(_("%s error:  %s option requires the %s option\n"));
15842b15cb3dSCy Schubert #line 131 "../save.c"
15852b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
15862b15cb3dSCy Schubert #line 183 "../save.c"
15872b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
15882b15cb3dSCy Schubert #line 237 "../save.c"
15892b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
15902b15cb3dSCy Schubert #line 256 "../save.c"
15912b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
15922b15cb3dSCy Schubert #line 534 "../save.c"
15932b15cb3dSCy Schubert   puts(_("%s warning:  cannot save options - %s not regular file\n"));
15942b15cb3dSCy Schubert   /* END-LIBOPTS-MESSAGES */
15952b15cb3dSCy Schubert 
15962b15cb3dSCy Schubert   /* USAGE-TEXT: */
15972b15cb3dSCy Schubert #line 873 "../usage.c"
15982b15cb3dSCy Schubert   puts(_("\t\t\t\t- an alternate for '%s'\n"));
15992b15cb3dSCy Schubert #line 1148 "../usage.c"
16002b15cb3dSCy Schubert   puts(_("Version, usage and configuration options:"));
16012b15cb3dSCy Schubert #line 924 "../usage.c"
16022b15cb3dSCy Schubert   puts(_("\t\t\t\t- default option for unnamed options\n"));
16032b15cb3dSCy Schubert #line 837 "../usage.c"
16042b15cb3dSCy Schubert   puts(_("\t\t\t\t- disabled as '--%s'\n"));
16052b15cb3dSCy Schubert #line 1117 "../usage.c"
16062b15cb3dSCy Schubert   puts(_(" --- %-14s %s\n"));
16072b15cb3dSCy Schubert #line 1115 "../usage.c"
16082b15cb3dSCy Schubert   puts(_("This option has been disabled"));
16092b15cb3dSCy Schubert #line 864 "../usage.c"
16102b15cb3dSCy Schubert   puts(_("\t\t\t\t- enabled by default\n"));
16112b15cb3dSCy Schubert #line 40 "../alias.c"
16122b15cb3dSCy Schubert   puts(_("%s error:  only "));
16132b15cb3dSCy Schubert #line 1194 "../usage.c"
16142b15cb3dSCy Schubert   puts(_(" - examining environment variables named %s_*\n"));
16152b15cb3dSCy Schubert #line 168 "../file.c"
16162b15cb3dSCy Schubert   puts(_("\t\t\t\t- file must not pre-exist\n"));
16172b15cb3dSCy Schubert #line 172 "../file.c"
16182b15cb3dSCy Schubert   puts(_("\t\t\t\t- file must pre-exist\n"));
16192b15cb3dSCy Schubert #line 380 "../usage.c"
16202b15cb3dSCy Schubert   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
16212b15cb3dSCy Schubert        "hyphen and the flag character.\n"));
1622276da39aSCy Schubert #line 921 "../makeshell.c"
16232b15cb3dSCy Schubert   puts(_("\n"
16242b15cb3dSCy Schubert        "= = = = = = = =\n\n"
16252b15cb3dSCy Schubert        "This incarnation of genshell will produce\n"
16262b15cb3dSCy Schubert        "a shell script to parse the options for %s:\n\n"));
16272b15cb3dSCy Schubert #line 166 "../enum.c"
16282b15cb3dSCy Schubert   puts(_("  or an integer mask with any of the lower %d bits set\n"));
16292b15cb3dSCy Schubert #line 897 "../usage.c"
16302b15cb3dSCy Schubert   puts(_("\t\t\t\t- is a set membership option\n"));
16312b15cb3dSCy Schubert #line 918 "../usage.c"
16322b15cb3dSCy Schubert   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
16332b15cb3dSCy Schubert #line 382 "../usage.c"
16342b15cb3dSCy Schubert   puts(_("Options are specified by single or double hyphens and their name.\n"));
16352b15cb3dSCy Schubert #line 904 "../usage.c"
16362b15cb3dSCy Schubert   puts(_("\t\t\t\t- may appear multiple times\n"));
16372b15cb3dSCy Schubert #line 891 "../usage.c"
16382b15cb3dSCy Schubert   puts(_("\t\t\t\t- may not be preset\n"));
16392b15cb3dSCy Schubert #line 1309 "../usage.c"
16402b15cb3dSCy Schubert   puts(_("   Arg Option-Name    Description\n"));
16412b15cb3dSCy Schubert #line 1245 "../usage.c"
16422b15cb3dSCy Schubert   puts(_("  Flg Arg Option-Name    Description\n"));
16432b15cb3dSCy Schubert #line 1303 "../usage.c"
16442b15cb3dSCy Schubert   puts(_("  Flg Arg Option-Name    Description\n"));
16452b15cb3dSCy Schubert #line 1304 "../usage.c"
16462b15cb3dSCy Schubert   puts(_(" %3s %s"));
16472b15cb3dSCy Schubert #line 1310 "../usage.c"
16482b15cb3dSCy Schubert   puts(_(" %3s %s"));
16492b15cb3dSCy Schubert #line 387 "../usage.c"
16502b15cb3dSCy Schubert   puts(_("The '-#<number>' option may omit the hash char\n"));
16512b15cb3dSCy Schubert #line 383 "../usage.c"
16522b15cb3dSCy Schubert   puts(_("All arguments are named options.\n"));
16532b15cb3dSCy Schubert #line 971 "../usage.c"
16542b15cb3dSCy Schubert   puts(_(" - reading file %s"));
16552b15cb3dSCy Schubert #line 409 "../usage.c"
16562b15cb3dSCy Schubert   puts(_("\n"
16572b15cb3dSCy Schubert        "Please send bug reports to:  <%s>\n"));
16582b15cb3dSCy Schubert #line 100 "../version.c"
16592b15cb3dSCy Schubert   puts(_("\n"
16602b15cb3dSCy Schubert        "Please send bug reports to:  <%s>\n"));
16612b15cb3dSCy Schubert #line 129 "../version.c"
16622b15cb3dSCy Schubert   puts(_("\n"
16632b15cb3dSCy Schubert        "Please send bug reports to:  <%s>\n"));
16642b15cb3dSCy Schubert #line 903 "../usage.c"
16652b15cb3dSCy Schubert   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
16662b15cb3dSCy Schubert #line 944 "../usage.c"
16672b15cb3dSCy Schubert   puts(_("\n"
16682b15cb3dSCy Schubert        "The following option preset mechanisms are supported:\n"));
16692b15cb3dSCy Schubert #line 1192 "../usage.c"
16702b15cb3dSCy Schubert   puts(_("\n"
16712b15cb3dSCy Schubert        "The following option preset mechanisms are supported:\n"));
16722b15cb3dSCy Schubert #line 682 "../usage.c"
16732b15cb3dSCy Schubert   puts(_("prohibits these options:\n"));
16742b15cb3dSCy Schubert #line 677 "../usage.c"
16752b15cb3dSCy Schubert   puts(_("prohibits the option '%s'\n"));
16762b15cb3dSCy Schubert #line 81 "../numeric.c"
16772b15cb3dSCy Schubert   puts(_("%s%ld to %ld"));
16782b15cb3dSCy Schubert #line 79 "../numeric.c"
16792b15cb3dSCy Schubert   puts(_("%sgreater than or equal to %ld"));
16802b15cb3dSCy Schubert #line 75 "../numeric.c"
16812b15cb3dSCy Schubert   puts(_("%s%ld exactly"));
16822b15cb3dSCy Schubert #line 68 "../numeric.c"
16832b15cb3dSCy Schubert   puts(_("%sit must lie in one of the ranges:\n"));
16842b15cb3dSCy Schubert #line 68 "../numeric.c"
16852b15cb3dSCy Schubert   puts(_("%sit must be in the range:\n"));
16862b15cb3dSCy Schubert #line 88 "../numeric.c"
16872b15cb3dSCy Schubert   puts(_(", or\n"));
16882b15cb3dSCy Schubert #line 66 "../numeric.c"
16892b15cb3dSCy Schubert   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
16902b15cb3dSCy Schubert #line 77 "../numeric.c"
16912b15cb3dSCy Schubert   puts(_("%sless than or equal to %ld"));
16922b15cb3dSCy Schubert #line 390 "../usage.c"
16932b15cb3dSCy Schubert   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
16942b15cb3dSCy Schubert #line 652 "../usage.c"
16952b15cb3dSCy Schubert   puts(_("requires the option '%s'\n"));
16962b15cb3dSCy Schubert #line 655 "../usage.c"
16972b15cb3dSCy Schubert   puts(_("requires these options:\n"));
16982b15cb3dSCy Schubert #line 1321 "../usage.c"
16992b15cb3dSCy Schubert   puts(_("   Arg Option-Name   Req?  Description\n"));
17002b15cb3dSCy Schubert #line 1315 "../usage.c"
17012b15cb3dSCy Schubert   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
17022b15cb3dSCy Schubert #line 167 "../enum.c"
17032b15cb3dSCy Schubert   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
17042b15cb3dSCy Schubert        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
17052b15cb3dSCy Schubert        "will set them all.  Multiple entries may be passed as an option\n"
17062b15cb3dSCy Schubert        "argument list.\n"));
17072b15cb3dSCy Schubert #line 910 "../usage.c"
17082b15cb3dSCy Schubert   puts(_("\t\t\t\t- may appear up to %d times\n"));
17092b15cb3dSCy Schubert #line 77 "../enum.c"
17102b15cb3dSCy Schubert   puts(_("The valid \"%s\" option keywords are:\n"));
17112b15cb3dSCy Schubert #line 1152 "../usage.c"
17122b15cb3dSCy Schubert   puts(_("The next option supports vendor supported extra options:"));
17132b15cb3dSCy Schubert #line 773 "../usage.c"
17142b15cb3dSCy Schubert   puts(_("These additional options are:"));
17152b15cb3dSCy Schubert   /* END-USAGE-TEXT */
17162b15cb3dSCy Schubert }
17172b15cb3dSCy Schubert #endif /* uncompilable code */
1718ea906c41SOllivier Robert #ifdef  __cplusplus
1719ea906c41SOllivier Robert }
1720ea906c41SOllivier Robert #endif
1721ea906c41SOllivier Robert /* ntp-keygen-opts.c ends here */
1722