xref: /freebsd/contrib/ntp/sntp/libopts/genshell.c (revision a466cc55)
1 /*   -*- buffer-read-only: t -*- vi: set ro:
2  *
3  *  DO NOT EDIT THIS FILE   (genshell.c)
4  *
5  *  It has been AutoGen-ed
6  *  From the definitions    genshell.def
7  *  and the template file   options
8  *
9  * Generated from AutoOpts 42:1:17 templates.
10  *
11  *  AutoOpts is a copyrighted work.  This source file is not encumbered
12  *  by AutoOpts licensing, but is provided under the licensing terms chosen
13  *  by the genshellopt author or copyright holder.  AutoOpts is
14  *  licensed under the terms of the LGPL.  The redistributable library
15  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
16  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
17  *  for details.
18  *
19  * The genshellopt program is copyrighted and licensed
20  * under the following terms:
21  *
22  *  Copyright (C) 1999-2018 Bruce Korb, all rights reserved.
23  *  This is free software. It is licensed for use, modification and
24  *  redistribution under the terms of the GNU Lesser General Public License,
25  *  version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
26  *
27  *  The genshellopt library is free software; you can redistribute it and/or
28  *  modify it under the terms of the GNU Library General Public License as
29  *  published by the Free Software Foundation; either version 2 of the
30  *  License, or (at your option) any later version.
31  *
32  *  This library is distributed in the hope that it will be useful, but
33  *  WITHOUT ANY WARRANTY; without even the implied warranty of
34  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
35  *  Library General Public License for more details.
36  *
37  *  You should have received a copy of the GNU Library General Public
38  *  License along with this library; if not, see
39  *  <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
40  */
41 
42 #ifndef __doxygen__
43 #define OPTION_CODE_COMPILE 1
44 #include "genshell.h"
45 #include <sys/types.h>
46 #include <sys/stat.h>
47 
48 #include <errno.h>
49 #include <fcntl.h>
50 #include <limits.h>
51 #include <stdio.h>
52 #include <stdlib.h>
53 #include <string.h>
54 #include <unistd.h>
55 
56 #ifdef  __cplusplus
57 extern "C" {
58 #endif
59 extern FILE * option_usage_fp;
60 #define zCopyright      (genshellopt_opt_strs+0)
61 #define zLicenseDescrip (genshellopt_opt_strs+285)
62 
63 extern tUsageProc genshelloptUsage;
64 
65 #ifndef NULL
66 #  define NULL 0
67 #endif
68 
69 /**
70  *  static const strings for genshellopt options
71  */
72 static char const genshellopt_opt_strs[1769] =
73 /*     0 */ "genshellopt 1\n"
74             "Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n"
75             "This is free software. It is licensed for use, modification and\n"
76             "redistribution under the terms of the GNU Lesser General Public License,\n"
77             "version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
78 /*   285 */ "The genshellopt library is free software; you can redistribute it and/or\n"
79             "modify it under the terms of the GNU Library General Public License as\n"
80             "published by the Free Software Foundation; either version 2 of the License,\n"
81             "or (at your option) any later version.\n\n"
82             "This library is distributed in the hope that it will be useful, but WITHOUT\n"
83             "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
84             "FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public\n"
85             "License for more details.\n\n"
86             "You should have received a copy of the GNU Library General Public License\n"
87             "along with this library; if not, see\n"
88             "<http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
89 /*   957 */ "Output Script File\0"
90 /*   976 */ "SCRIPT\0"
91 /*   983 */ "script\0"
92 /*   990 */ "Shell name (follows \"#!\" magic)\0"
93 /*  1022 */ "SHELL\0"
94 /*  1028 */ "no-shell\0"
95 /*  1037 */ "no\0"
96 /*  1040 */ "display extended usage information and exit\0"
97 /*  1084 */ "help\0"
98 /*  1089 */ "extended usage information passed thru pager\0"
99 /*  1134 */ "more-help\0"
100 /*  1144 */ "output version information and exit\0"
101 /*  1180 */ "version\0"
102 /*  1188 */ "GENSHELLOPT\0"
103 /*  1200 */ "genshellopt - Generate Shell Option Processing Script - Ver. 1\n"
104             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
105 /*  1321 */ "autogen-users@lists.sourceforge.net\0"
106 /*  1357 */ "Note that 'shell' is only useful if the output file does not already exist.\n"
107             "If it does, then the shell name and optional first argument will be\n"
108             "extracted from the script file.\n\0"
109 /*  1534 */ "If the script file already exists and contains Automated Option Processing\n"
110             "text, the second line of the file through the ending tag will be replaced\n"
111             "by the newly generated text.  The first '#!' line will be regenerated.\n\0"
112 /*  1755 */ "genshellopt 1";
113 
114 /**
115  *  script option description:
116  */
117 /** Descriptive text for the script option */
118 #define SCRIPT_DESC      (genshellopt_opt_strs+957)
119 /** Upper-cased name for the script option */
120 #define SCRIPT_NAME      (genshellopt_opt_strs+976)
121 /** Name string for the script option */
122 #define SCRIPT_name      (genshellopt_opt_strs+983)
123 /** Compiled in flag settings for the script option */
124 #define SCRIPT_FLAGS     (OPTST_DISABLED \
125         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
126 
127 /**
128  *  shell option description:
129  */
130 /** Descriptive text for the shell option */
131 #define SHELL_DESC      (genshellopt_opt_strs+990)
132 /** Upper-cased name for the shell option */
133 #define SHELL_NAME      (genshellopt_opt_strs+1022)
134 /** disablement name for the shell option */
135 #define NOT_SHELL_name  (genshellopt_opt_strs+1028)
136 /** disablement prefix for the shell option */
137 #define NOT_SHELL_PFX   (genshellopt_opt_strs+1037)
138 /** Name string for the shell option */
139 #define SHELL_name      (NOT_SHELL_name + 3)
140 /** Compiled in flag settings for the shell option */
141 #define SHELL_FLAGS     (OPTST_INITENABLED \
142         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
143 
144 /*
145  *  Help/More_Help/Version option descriptions:
146  */
147 #define HELP_DESC       (genshellopt_opt_strs+1040)
148 #define HELP_name       (genshellopt_opt_strs+1084)
149 #ifdef HAVE_WORKING_FORK
150 #define MORE_HELP_DESC  (genshellopt_opt_strs+1089)
151 #define MORE_HELP_name  (genshellopt_opt_strs+1134)
152 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
153 #else
154 #define MORE_HELP_DESC  HELP_DESC
155 #define MORE_HELP_name  HELP_name
156 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
157 #endif
158 #ifdef NO_OPTIONAL_OPT_ARGS
159 #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
160 #else
161 #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
162                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
163 #endif
164 #define VER_DESC        (genshellopt_opt_strs+1144)
165 #define VER_name        (genshellopt_opt_strs+1180)
166 /**
167  *  Declare option callback procedures
168  */
169 extern tOptProc
170     optionBooleanVal,   optionNestedVal,    optionNumericVal,
171     optionPagedUsage,   optionPrintVersion, optionResetOpt,
172     optionStackArg,     optionTimeDate,     optionTimeVal,
173     optionUnstackArg,   optionVendorOption;
174 static tOptProc
175     doUsageOpt;
176 #define VER_PROC        optionPrintVersion
177 
178 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
179 /**
180  *  Define the genshellopt Option Descriptions.
181  * This is an array of GENSHELL_OPTION_CT entries, one for each
182  * option that the genshellopt program responds to.
183  */
184 static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
185   {  /* entry idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT,
186      /* equiv idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT,
187      /* equivalenced to  */ NO_EQUIVALENT,
188      /* min, max, act ct */ 0, 1, 0,
189      /* opt state flags  */ SCRIPT_FLAGS, 0,
190      /* last opt argumnt */ { NULL }, /* --script */
191      /* arg list/cookie  */ NULL,
192      /* must/cannot opts */ NULL, NULL,
193      /* option proc      */ NULL,
194      /* desc, NAME, name */ SCRIPT_DESC, SCRIPT_NAME, SCRIPT_name,
195      /* disablement strs */ NULL, NULL },
196 
197   {  /* entry idx, value */ 1, VALUE_GENSHELL_OPT_SHELL,
198      /* equiv idx, value */ 1, VALUE_GENSHELL_OPT_SHELL,
199      /* equivalenced to  */ NO_EQUIVALENT,
200      /* min, max, act ct */ 0, 1, 0,
201      /* opt state flags  */ SHELL_FLAGS, 0,
202      /* last opt argumnt */ { NULL }, /* --shell */
203      /* arg list/cookie  */ NULL,
204      /* must/cannot opts */ NULL, NULL,
205      /* option proc      */ NULL,
206      /* desc, NAME, name */ SHELL_DESC, SHELL_NAME, SHELL_name,
207      /* disablement strs */ NOT_SHELL_name, NOT_SHELL_PFX },
208 
209   {  /* entry idx, value */ INDEX_GENSHELL_OPT_VERSION, VALUE_GENSHELL_OPT_VERSION,
210      /* equiv idx value  */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_VERSION,
211      /* equivalenced to  */ NO_EQUIVALENT,
212      /* min, max, act ct */ 0, 1, 0,
213      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
214      /* last opt argumnt */ { NULL },
215      /* arg list/cookie  */ NULL,
216      /* must/cannot opts */ NULL, NULL,
217      /* option proc      */ VER_PROC,
218      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
219      /* disablement strs */ NULL, NULL },
220 
221 
222 
223   {  /* entry idx, value */ INDEX_GENSHELL_OPT_HELP, VALUE_GENSHELL_OPT_HELP,
224      /* equiv idx value  */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_HELP,
225      /* equivalenced to  */ NO_EQUIVALENT,
226      /* min, max, act ct */ 0, 1, 0,
227      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
228      /* last opt argumnt */ { NULL },
229      /* arg list/cookie  */ NULL,
230      /* must/cannot opts */ NULL, NULL,
231      /* option proc      */ doUsageOpt,
232      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
233      /* disablement strs */ NULL, NULL },
234 
235   {  /* entry idx, value */ INDEX_GENSHELL_OPT_MORE_HELP, VALUE_GENSHELL_OPT_MORE_HELP,
236      /* equiv idx value  */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_MORE_HELP,
237      /* equivalenced to  */ NO_EQUIVALENT,
238      /* min, max, act ct */ 0, 1, 0,
239      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
240      /* last opt argumnt */ { NULL },
241      /* arg list/cookie  */ NULL,
242      /* must/cannot opts */ NULL,  NULL,
243      /* option proc      */ optionPagedUsage,
244      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
245      /* disablement strs */ NULL, NULL }
246 };
247 
248 
249 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
250 /** Reference to the upper cased version of genshellopt. */
251 #define zPROGNAME       (genshellopt_opt_strs+1188)
252 /** Reference to the title line for genshellopt usage. */
253 #define zUsageTitle     (genshellopt_opt_strs+1200)
254 /** There is no genshellopt configuration file. */
255 #define zRcName         NULL
256 /** There are no directories to search for genshellopt config files. */
257 #define apzHomeList     NULL
258 /** The genshellopt program bug email address. */
259 #define zBugsAddr       (genshellopt_opt_strs+1321)
260 /** Clarification/explanation of what genshellopt does. */
261 #define zExplain        (genshellopt_opt_strs+1357)
262 /** Extra detail explaining what genshellopt does. */
263 #define zDetail         (genshellopt_opt_strs+1534)
264 /** The full version string for genshellopt. */
265 #define zFullVersion    (genshellopt_opt_strs+1755)
266 /* extracted from optcode.tlib near line 342 */
267 
268 #if defined(ENABLE_NLS)
269 # define OPTPROC_BASE OPTPROC_TRANSLATE
270   static tOptionXlateProc translate_option_strings;
271 #else
272 # define OPTPROC_BASE OPTPROC_NONE
273 # define translate_option_strings NULL
274 #endif /* ENABLE_NLS */
275 
276 #define genshellopt_full_usage (NULL)
277 #define genshellopt_short_usage (NULL)
278 
279 #endif /* not defined __doxygen__ */
280 
281 /*
282  *  Create the static procedure(s) declared above.
283  */
284 /**
285  * The callout function that invokes the genshelloptUsage function.
286  *
287  * @param[in] opts the AutoOpts option description structure
288  * @param[in] od   the descriptor for the "help" (usage) option.
289  * @noreturn
290  */
291 static void
doUsageOpt(tOptions * opts,tOptDesc * od)292 doUsageOpt(tOptions * opts, tOptDesc * od)
293 {
294     int ex_code;
295     ex_code = GENSHELLOPT_EXIT_SUCCESS;
296     genshelloptUsage(&genshelloptOptions, ex_code);
297     /* NOTREACHED */
298     exit(GENSHELLOPT_EXIT_FAILURE);
299     (void)opts;
300     (void)od;
301 }
302 /* extracted from optmain.tlib near line 1250 */
303 
304 /**
305  * The directory containing the data associated with genshellopt.
306  */
307 #ifndef  PKGDATADIR
308 # define PKGDATADIR ""
309 #endif
310 
311 /**
312  * Information about the person or institution that packaged genshellopt
313  * for the current distribution.
314  */
315 #ifndef  WITH_PACKAGER
316 # define genshellopt_packager_info NULL
317 #else
318 /** Packager information for genshellopt. */
319 static char const genshellopt_packager_info[] =
320     "Packaged by " WITH_PACKAGER
321 
322 # ifdef WITH_PACKAGER_VERSION
323         " ("WITH_PACKAGER_VERSION")"
324 # endif
325 
326 # ifdef WITH_PACKAGER_BUG_REPORTS
327     "\nReport genshellopt bugs to " WITH_PACKAGER_BUG_REPORTS
328 # endif
329     "\n";
330 #endif
331 #ifndef __doxygen__
332 
333 #endif /* __doxygen__ */
334 /**
335  * The option definitions for genshellopt.  The one structure that
336  * binds them all.
337  */
338 tOptions genshelloptOptions = {
339     OPTIONS_STRUCT_VERSION,
340     0, NULL,                    /* original argc + argv    */
341     ( OPTPROC_BASE
342     + OPTPROC_ERRSTOP
343     + OPTPROC_SHORTOPT
344     + OPTPROC_LONGOPT
345     + OPTPROC_NO_REQ_OPT
346     + OPTPROC_NEGATIONS
347     + OPTPROC_NO_ARGS ),
348     0, NULL,                    /* current option index, current option */
349     NULL,         NULL,         zPROGNAME,
350     zRcName,      zCopyright,   zLicenseDescrip,
351     zFullVersion, apzHomeList,  zUsageTitle,
352     zExplain,     zDetail,      optDesc,
353     zBugsAddr,                  /* address to send bugs to */
354     NULL, NULL,                 /* extensions/saved state  */
355     genshelloptUsage, /* usage procedure */
356     translate_option_strings,   /* translation procedure */
357     /*
358      *  Indexes to special options
359      */
360     { INDEX_GENSHELL_OPT_MORE_HELP, /* more-help option index */
361       NO_EQUIVALENT, /* save option index */
362       NO_EQUIVALENT, /* '-#' option index */
363       NO_EQUIVALENT /* index of default opt */
364     },
365     5 /* full option count */, 2 /* user option count */,
366     genshellopt_full_usage, genshellopt_short_usage,
367     NULL, NULL,
368     PKGDATADIR, genshellopt_packager_info
369 };
370 
371 #if ENABLE_NLS
372 /**
373  * This code is designed to translate translatable option text for the
374  * genshellopt program.  These translations happen upon entry
375  * to optionProcess().
376  */
377 #include <stdio.h>
378 #include <stdlib.h>
379 #include <string.h>
380 #include <unistd.h>
381 #ifdef HAVE_DCGETTEXT
382 # include <gettext.h>
383 #endif
384 #include <autoopts/usage-txt.h>
385 
386 static char * AO_gettext(char const * pz);
387 static void   coerce_it(void ** s);
388 
389 /**
390  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
391  * to convert from English to the target language, then strdup-duplicates the
392  * result string.  It tries the "libopts" domain first, then whatever has been
393  * set via the \a textdomain(3) call.
394  *
395  * @param[in] pz the input text used as a lookup key.
396  * @returns the translated text (if there is one),
397  *   or the original text (if not).
398  */
399 static char *
AO_gettext(char const * pz)400 AO_gettext(char const * pz)
401 {
402     char * res;
403     if (pz == NULL)
404         return NULL;
405 #ifdef HAVE_DCGETTEXT
406     /*
407      * While processing the option_xlateable_txt data, try to use the
408      * "libopts" domain.  Once we switch to the option descriptor data,
409      * do *not* use that domain.
410      */
411     if (option_xlateable_txt.field_ct != 0) {
412         res = dgettext("libopts", pz);
413         if (res == pz)
414             res = (char *)VOIDP(_(pz));
415     } else
416         res = (char *)VOIDP(_(pz));
417 #else
418     res = (char *)VOIDP(_(pz));
419 #endif
420     if (res == pz)
421         return res;
422     res = strdup(res);
423     if (res == NULL) {
424         fputs(_("No memory for duping translated strings\n"), stderr);
425         exit(GENSHELLOPT_EXIT_FAILURE);
426     }
427     return res;
428 }
429 
430 /**
431  * All the pointers we use are marked "* const", but they are stored in
432  * writable memory.  Coerce the mutability and set the pointer.
433  */
coerce_it(void ** s)434 static void coerce_it(void ** s) { *s = AO_gettext(*s);
435 }
436 
437 /**
438  * Translate all the translatable strings in the genshelloptOptions
439  * structure defined above.  This is done only once.
440  */
441 static void
translate_option_strings(void)442 translate_option_strings(void)
443 {
444     tOptions * const opts = &genshelloptOptions;
445 
446     /*
447      *  Guard against re-translation.  It won't work.  The strings will have
448      *  been changed by the first pass through this code.  One shot only.
449      */
450     if (option_xlateable_txt.field_ct != 0) {
451         /*
452          *  Do the translations.  The first pointer follows the field count
453          *  field.  The field count field is the size of a pointer.
454          */
455         char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
456         int     ix  = option_xlateable_txt.field_ct;
457 
458         do {
459             ppz++; /* skip over field_ct */
460             *ppz = AO_gettext(*ppz);
461         } while (--ix > 0);
462         /* prevent re-translation and disable "libopts" domain lookup */
463         option_xlateable_txt.field_ct = 0;
464 
465         coerce_it(VOIDP(&(opts->pzCopyright)));
466         coerce_it(VOIDP(&(opts->pzCopyNotice)));
467         coerce_it(VOIDP(&(opts->pzFullVersion)));
468         coerce_it(VOIDP(&(opts->pzUsageTitle)));
469         coerce_it(VOIDP(&(opts->pzExplain)));
470         coerce_it(VOIDP(&(opts->pzDetail)));
471         {
472             tOptDesc * od = opts->pOptDesc;
473             for (ix = opts->optCt; ix > 0; ix--, od++)
474                 coerce_it(VOIDP(&(od->pzText)));
475         }
476     }
477 }
478 #endif /* ENABLE_NLS */
479 
480 #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
481 /** I18N function strictly for xgettext.  Do not compile. */
bogus_function(void)482 static void bogus_function(void) {
483   /* TRANSLATORS:
484 
485      The following dummy function was crated solely so that xgettext can
486      extract the correct strings.  These strings are actually referenced
487      by a field name in the genshelloptOptions structure noted in the
488      comments below.  The literal text is defined in genshellopt_opt_strs.
489 
490      NOTE: the strings below are segmented with respect to the source string
491      genshellopt_opt_strs.  The strings above are handed off for translation
492      at run time a paragraph at a time.  Consequently, they are presented here
493      for translation a paragraph at a time.
494 
495      ALSO: often the description for an option will reference another option
496      by name.  These are set off with apostrophe quotes (I hope).  Do not
497      translate option names.
498    */
499   /* referenced via genshelloptOptions.pzCopyright */
500   puts(_("genshellopt 1\n\
501 Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n\
502 This is free software. It is licensed for use, modification and\n\
503 redistribution under the terms of the GNU Lesser General Public License,\n\
504 version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
505 
506   /* referenced via genshelloptOptions.pzCopyNotice */
507   puts(_("The genshellopt library is free software; you can redistribute it and/or\n\
508 modify it under the terms of the GNU Library General Public License as\n\
509 published by the Free Software Foundation; either version 2 of the License,\n\
510 or (at your option) any later version.\n\n"));
511   puts(_("This library is distributed in the hope that it will be useful, but WITHOUT\n\
512 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
513 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public\n\
514 License for more details.\n\n"));
515   puts(_("You should have received a copy of the GNU Library General Public License\n\
516 along with this library; if not, see\n\
517 <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
518 
519   /* referenced via genshelloptOptions.pOptDesc->pzText */
520   puts(_("Output Script File"));
521 
522   /* referenced via genshelloptOptions.pOptDesc->pzText */
523   puts(_("Shell name (follows \"#!\" magic)"));
524 
525   /* referenced via genshelloptOptions.pOptDesc->pzText */
526   puts(_("display extended usage information and exit"));
527 
528   /* referenced via genshelloptOptions.pOptDesc->pzText */
529   puts(_("extended usage information passed thru pager"));
530 
531   /* referenced via genshelloptOptions.pOptDesc->pzText */
532   puts(_("output version information and exit"));
533 
534   /* referenced via genshelloptOptions.pzUsageTitle */
535   puts(_("genshellopt - Generate Shell Option Processing Script - Ver. 1\n\
536 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
537 
538   /* referenced via genshelloptOptions.pzExplain */
539   puts(_("Note that 'shell' is only useful if the output file does not already exist.\n\
540 If it does, then the shell name and optional first argument will be\n\
541 extracted from the script file.\n"));
542 
543   /* referenced via genshelloptOptions.pzDetail */
544   puts(_("If the script file already exists and contains Automated Option Processing\n\
545 text, the second line of the file through the ending tag will be replaced\n\
546 by the newly generated text.  The first '#!' line will be regenerated.\n"));
547 
548   /* referenced via genshelloptOptions.pzFullVersion */
549   puts(_("genshellopt 1"));
550 
551   /* referenced via genshelloptOptions.pzFullUsage */
552   puts(_("<<<NOT-FOUND>>>"));
553 
554   /* referenced via genshelloptOptions.pzShortUsage */
555   puts(_("<<<NOT-FOUND>>>"));
556   /* LIBOPTS-MESSAGES: */
557 #line 67 "../autoopts.c"
558   puts(_("allocation of %d bytes failed\n"));
559 #line 89 "../autoopts.c"
560   puts(_("allocation of %d bytes failed\n"));
561 #line 48 "../init.c"
562   puts(_("AutoOpts function called without option descriptor\n"));
563 #line 81 "../init.c"
564   puts(_("\tThis exceeds the compiled library version:  "));
565 #line 79 "../init.c"
566   puts(_("Automated Options Processing Error!\n"
567        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
568 #line 78 "../autoopts.c"
569   puts(_("realloc of %d bytes at 0x%p failed\n"));
570 #line 83 "../init.c"
571   puts(_("\tThis is less than the minimum library version:  "));
572 #line 121 "../version.c"
573   puts(_("Automated Options version %s\n"
574        "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
575 #line 49 "../makeshell.c"
576   puts(_("(AutoOpts bug):  %s.\n"));
577 #line 90 "../reset.c"
578   puts(_("optionResetOpt() called, but reset-option not configured"));
579 #line 241 "../usage.c"
580   puts(_("could not locate the 'help' option"));
581 #line 330 "../autoopts.c"
582   puts(_("optionProcess() was called with invalid data"));
583 #line 697 "../usage.c"
584   puts(_("invalid argument type specified"));
585 #line 568 "../find.c"
586   puts(_("defaulted to option with optional arg"));
587 #line 76 "../alias.c"
588   puts(_("aliasing option is out of range."));
589 #line 210 "../enum.c"
590   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
591 #line 78 "../find.c"
592   puts(_("  The following options match:\n"));
593 #line 263 "../find.c"
594   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
595 #line 161 "../check.c"
596   puts(_("%s: Command line arguments required\n"));
597 #line 43 "../alias.c"
598   puts(_("%d %s%s options allowed\n"));
599 #line 56 "../makeshell.c"
600   puts(_("%s error %d (%s) calling %s for '%s'\n"));
601 #line 268 "../makeshell.c"
602   puts(_("interprocess pipe"));
603 #line 171 "../version.c"
604   puts(_("error: version option argument '%c' invalid.  Use:\n"
605        "\t'v' - version only\n"
606        "\t'c' - version and copyright\n"
607        "\t'n' - version and full copyright notice\n"));
608 #line 58 "../check.c"
609   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
610 #line 187 "../find.c"
611   puts(_("%s: The '%s' option has been disabled."));
612 #line 400 "../find.c"
613   puts(_("%s: The '%s' option has been disabled."));
614 #line 38 "../alias.c"
615   puts(_("-equivalence"));
616 #line 439 "../find.c"
617   puts(_("%s: illegal option -- %c\n"));
618 #line 110 "../reset.c"
619   puts(_("%s: illegal option -- %c\n"));
620 #line 241 "../find.c"
621   puts(_("%s: illegal option -- %s\n"));
622 #line 740 "../find.c"
623   puts(_("%s: illegal option -- %s\n"));
624 #line 118 "../reset.c"
625   puts(_("%s: illegal option -- %s\n"));
626 #line 305 "../find.c"
627   puts(_("%s: unknown vendor extension option -- %s\n"));
628 #line 135 "../enum.c"
629   puts(_("  or an integer from %d through %d\n"));
630 #line 145 "../enum.c"
631   puts(_("  or an integer from %d through %d\n"));
632 #line 696 "../usage.c"
633   puts(_("%s error:  invalid option descriptor for %s\n"));
634 #line 1030 "../usage.c"
635   puts(_("%s error:  invalid option descriptor for %s\n"));
636 #line 355 "../find.c"
637   puts(_("%s: invalid option name: %s\n"));
638 #line 497 "../find.c"
639   puts(_("%s: The '%s' option requires an argument.\n"));
640 #line 150 "../autoopts.c"
641   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
642        "\t'%s' and '%s'."));
643 #line 94 "../check.c"
644   puts(_("%s error:  The %s option is required\n"));
645 #line 602 "../find.c"
646   puts(_("%s: The '%s' option cannot have an argument.\n"));
647 #line 151 "../check.c"
648   puts(_("%s: Command line arguments are not allowed.\n"));
649 #line 568 "../save.c"
650   puts(_("error %d (%s) creating %s\n"));
651 #line 210 "../enum.c"
652   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
653 #line 93 "../reset.c"
654   puts(_("%s error: The '%s' option requires an argument.\n"));
655 #line 122 "../save.c"
656   puts(_("error %d (%s) stat-ing %s\n"));
657 #line 175 "../save.c"
658   puts(_("error %d (%s) stat-ing %s\n"));
659 #line 143 "../restore.c"
660   puts(_("%s error: no saved option state\n"));
661 #line 225 "../autoopts.c"
662   puts(_("'%s' is not a command line option.\n"));
663 #line 113 "../time.c"
664   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
665 #line 50 "../time.c"
666   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
667 #line 92 "../check.c"
668   puts(_("%s error:  The %s option must appear %d times.\n"));
669 #line 165 "../numeric.c"
670   puts(_("%s error:  '%s' is not a recognizable number.\n"));
671 #line 176 "../enum.c"
672   puts(_("%s error:  %s exceeds %s keyword count\n"));
673 #line 279 "../usage.c"
674   puts(_("Try '%s %s' for more information.\n"));
675 #line 45 "../alias.c"
676   puts(_("one %s%s option allowed\n"));
677 #line 170 "../makeshell.c"
678   puts(_("standard output"));
679 #line 905 "../makeshell.c"
680   puts(_("standard output"));
681 #line 223 "../usage.c"
682   puts(_("standard output"));
683 #line 364 "../usage.c"
684   puts(_("standard output"));
685 #line 574 "../usage.c"
686   puts(_("standard output"));
687 #line 178 "../version.c"
688   puts(_("standard output"));
689 #line 223 "../usage.c"
690   puts(_("standard error"));
691 #line 364 "../usage.c"
692   puts(_("standard error"));
693 #line 574 "../usage.c"
694   puts(_("standard error"));
695 #line 178 "../version.c"
696   puts(_("standard error"));
697 #line 170 "../makeshell.c"
698   puts(_("write"));
699 #line 905 "../makeshell.c"
700   puts(_("write"));
701 #line 222 "../usage.c"
702   puts(_("write"));
703 #line 363 "../usage.c"
704   puts(_("write"));
705 #line 573 "../usage.c"
706   puts(_("write"));
707 #line 177 "../version.c"
708   puts(_("write"));
709 #line 60 "../numeric.c"
710   puts(_("%s error:  %s option value %ld is out of range.\n"));
711 #line 44 "../check.c"
712   puts(_("%s error:  %s option requires the %s option\n"));
713 #line 121 "../save.c"
714   puts(_("%s warning:  cannot save options - %s not regular file\n"));
715 #line 174 "../save.c"
716   puts(_("%s warning:  cannot save options - %s not regular file\n"));
717 #line 193 "../save.c"
718   puts(_("%s warning:  cannot save options - %s not regular file\n"));
719 #line 567 "../save.c"
720   puts(_("%s warning:  cannot save options - %s not regular file\n"));
721   /* END-LIBOPTS-MESSAGES */
722 
723   /* USAGE-TEXT: */
724 #line 822 "../usage.c"
725   puts(_("\t\t\t\t- an alternate for '%s'\n"));
726 #line 1097 "../usage.c"
727   puts(_("Version, usage and configuration options:"));
728 #line 873 "../usage.c"
729   puts(_("\t\t\t\t- default option for unnamed options\n"));
730 #line 786 "../usage.c"
731   puts(_("\t\t\t\t- disabled as '--%s'\n"));
732 #line 1066 "../usage.c"
733   puts(_(" --- %-14s %s\n"));
734 #line 1064 "../usage.c"
735   puts(_("This option has been disabled"));
736 #line 813 "../usage.c"
737   puts(_("\t\t\t\t- enabled by default\n"));
738 #line 40 "../alias.c"
739   puts(_("%s error:  only "));
740 #line 1143 "../usage.c"
741   puts(_(" - examining environment variables named %s_*\n"));
742 #line 168 "../file.c"
743   puts(_("\t\t\t\t- file must not pre-exist\n"));
744 #line 172 "../file.c"
745   puts(_("\t\t\t\t- file must pre-exist\n"));
746 #line 329 "../usage.c"
747   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
748        "hyphen and the flag character.\n"));
749 #line 882 "../makeshell.c"
750   puts(_("\n"
751        "= = = = = = = =\n\n"
752        "This incarnation of genshell will produce\n"
753        "a shell script to parse the options for %s:\n\n"));
754 #line 142 "../enum.c"
755   puts(_("  or an integer mask with any of the lower %d bits set\n"));
756 #line 846 "../usage.c"
757   puts(_("\t\t\t\t- is a set membership option\n"));
758 #line 867 "../usage.c"
759   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
760 #line 331 "../usage.c"
761   puts(_("Options are specified by single or double hyphens and their name.\n"));
762 #line 853 "../usage.c"
763   puts(_("\t\t\t\t- may appear multiple times\n"));
764 #line 840 "../usage.c"
765   puts(_("\t\t\t\t- may not be preset\n"));
766 #line 1258 "../usage.c"
767   puts(_("   Arg Option-Name    Description\n"));
768 #line 1194 "../usage.c"
769   puts(_("  Flg Arg Option-Name    Description\n"));
770 #line 1252 "../usage.c"
771   puts(_("  Flg Arg Option-Name    Description\n"));
772 #line 1253 "../usage.c"
773   puts(_(" %3s %s"));
774 #line 1259 "../usage.c"
775   puts(_(" %3s %s"));
776 #line 336 "../usage.c"
777   puts(_("The '-#<number>' option may omit the hash char\n"));
778 #line 332 "../usage.c"
779   puts(_("All arguments are named options.\n"));
780 #line 920 "../usage.c"
781   puts(_(" - reading file %s"));
782 #line 358 "../usage.c"
783   puts(_("\n"
784        "Please send bug reports to:  <%s>\n"));
785 #line 100 "../version.c"
786   puts(_("\n"
787        "Please send bug reports to:  <%s>\n"));
788 #line 129 "../version.c"
789   puts(_("\n"
790        "Please send bug reports to:  <%s>\n"));
791 #line 852 "../usage.c"
792   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
793 #line 893 "../usage.c"
794   puts(_("\n"
795        "The following option preset mechanisms are supported:\n"));
796 #line 1141 "../usage.c"
797   puts(_("\n"
798        "The following option preset mechanisms are supported:\n"));
799 #line 631 "../usage.c"
800   puts(_("prohibits these options:\n"));
801 #line 626 "../usage.c"
802   puts(_("prohibits the option '%s'\n"));
803 #line 81 "../numeric.c"
804   puts(_("%s%ld to %ld"));
805 #line 79 "../numeric.c"
806   puts(_("%sgreater than or equal to %ld"));
807 #line 75 "../numeric.c"
808   puts(_("%s%ld exactly"));
809 #line 68 "../numeric.c"
810   puts(_("%sit must lie in one of the ranges:\n"));
811 #line 68 "../numeric.c"
812   puts(_("%sit must be in the range:\n"));
813 #line 88 "../numeric.c"
814   puts(_(", or\n"));
815 #line 66 "../numeric.c"
816   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
817 #line 77 "../numeric.c"
818   puts(_("%sless than or equal to %ld"));
819 #line 339 "../usage.c"
820   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
821 #line 601 "../usage.c"
822   puts(_("requires the option '%s'\n"));
823 #line 604 "../usage.c"
824   puts(_("requires these options:\n"));
825 #line 1270 "../usage.c"
826   puts(_("   Arg Option-Name   Req?  Description\n"));
827 #line 1264 "../usage.c"
828   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
829 #line 143 "../enum.c"
830   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
831        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
832        "will set them all.  Multiple entries may be passed as an option\n"
833        "argument list.\n"));
834 #line 859 "../usage.c"
835   puts(_("\t\t\t\t- may appear up to %d times\n"));
836 #line 52 "../enum.c"
837   puts(_("The valid \"%s\" option keywords are:\n"));
838 #line 1101 "../usage.c"
839   puts(_("The next option supports vendor supported extra options:"));
840 #line 722 "../usage.c"
841   puts(_("These additional options are:"));
842   /* END-USAGE-TEXT */
843 }
844 #endif /* uncompilable code */
845 #ifdef  __cplusplus
846 }
847 #endif
848 /* genshell.c ends here */
849