diff options
Diffstat (limited to 'sntp/libopts/genshell.c')
| -rw-r--r-- | sntp/libopts/genshell.c | 227 |
1 files changed, 114 insertions, 113 deletions
diff --git a/sntp/libopts/genshell.c b/sntp/libopts/genshell.c index 0f05b3efbc44..05182a6014f1 100644 --- a/sntp/libopts/genshell.c +++ b/sntp/libopts/genshell.c @@ -6,7 +6,7 @@ * From the definitions genshell.def * and the template file options * - * Generated from AutoOpts 41:0:16 templates. + * Generated from AutoOpts 42:1:17 templates. * * AutoOpts is a copyrighted work. This source file is not encumbered * by AutoOpts licensing, but is provided under the licensing terms chosen @@ -19,7 +19,7 @@ * The genshellopt program is copyrighted and licensed * under the following terms: * - * Copyright (C) 1999-2014 Bruce Korb, all rights reserved. + * Copyright (C) 1999-2018 Bruce Korb, all rights reserved. * This is free software. It is licensed for use, modification and * redistribution under the terms of the GNU Lesser General Public License, * version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html> @@ -43,10 +43,15 @@ #define OPTION_CODE_COMPILE 1 #include "genshell.h" #include <sys/types.h> +#include <sys/stat.h> +#include <errno.h> +#include <fcntl.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> +#include <unistd.h> #ifdef __cplusplus extern "C" { @@ -66,7 +71,7 @@ extern tUsageProc genshelloptUsage; */ static char const genshellopt_opt_strs[1769] = /* 0 */ "genshellopt 1\n" - "Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n" + "Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the GNU Lesser General Public License,\n" "version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0" @@ -258,7 +263,7 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = { #define zDetail (genshellopt_opt_strs+1534) /** The full version string for genshellopt. */ #define zFullVersion (genshellopt_opt_strs+1755) -/* extracted from optcode.tlib near line 364 */ +/* extracted from optcode.tlib near line 342 */ #if defined(ENABLE_NLS) # define OPTPROC_BASE OPTPROC_TRANSLATE @@ -290,7 +295,7 @@ doUsageOpt(tOptions * opts, tOptDesc * od) ex_code = GENSHELLOPT_EXIT_SUCCESS; genshelloptUsage(&genshelloptOptions, ex_code); /* NOTREACHED */ - exit(1); + exit(GENSHELLOPT_EXIT_FAILURE); (void)opts; (void)od; } @@ -481,19 +486,19 @@ static void bogus_function(void) { extract the correct strings. These strings are actually referenced by a field name in the genshelloptOptions structure noted in the comments below. The literal text is defined in genshellopt_opt_strs. - + NOTE: the strings below are segmented with respect to the source string genshellopt_opt_strs. The strings above are handed off for translation at run time a paragraph at a time. Consequently, they are presented here for translation a paragraph at a time. - + ALSO: often the description for an option will reference another option by name. These are set off with apostrophe quotes (I hope). Do not translate option names. */ /* referenced via genshelloptOptions.pzCopyright */ puts(_("genshellopt 1\n\ -Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n\ +Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n\ This is free software. It is licensed for use, modification and\n\ redistribution under the terms of the GNU Lesser General Public License,\n\ version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n")); @@ -551,234 +556,230 @@ by the newly generated text. The first '#!' line will be regenerated.\n")); /* LIBOPTS-MESSAGES: */ #line 67 "../autoopts.c" puts(_("allocation of %d bytes failed\n")); -#line 93 "../autoopts.c" +#line 89 "../autoopts.c" puts(_("allocation of %d bytes failed\n")); -#line 53 "../init.c" +#line 48 "../init.c" puts(_("AutoOpts function called without option descriptor\n")); -#line 86 "../init.c" +#line 81 "../init.c" puts(_("\tThis exceeds the compiled library version: ")); -#line 84 "../init.c" +#line 79 "../init.c" puts(_("Automated Options Processing Error!\n" "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); -#line 80 "../autoopts.c" +#line 78 "../autoopts.c" puts(_("realloc of %d bytes at 0x%p failed\n")); -#line 88 "../init.c" +#line 83 "../init.c" puts(_("\tThis is less than the minimum library version: ")); #line 121 "../version.c" puts(_("Automated Options version %s\n" - "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); -#line 87 "../makeshell.c" + "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n")); +#line 49 "../makeshell.c" puts(_("(AutoOpts bug): %s.\n")); #line 90 "../reset.c" puts(_("optionResetOpt() called, but reset-option not configured")); -#line 292 "../usage.c" +#line 241 "../usage.c" puts(_("could not locate the 'help' option")); -#line 336 "../autoopts.c" +#line 330 "../autoopts.c" puts(_("optionProcess() was called with invalid data")); -#line 748 "../usage.c" +#line 697 "../usage.c" puts(_("invalid argument type specified")); -#line 598 "../find.c" +#line 568 "../find.c" puts(_("defaulted to option with optional arg")); #line 76 "../alias.c" puts(_("aliasing option is out of range.")); -#line 234 "../enum.c" +#line 210 "../enum.c" puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); -#line 108 "../find.c" +#line 78 "../find.c" puts(_(" The following options match:\n")); -#line 293 "../find.c" +#line 263 "../find.c" puts(_("%s: ambiguous option name: %s (matches %d options)\n")); #line 161 "../check.c" puts(_("%s: Command line arguments required\n")); #line 43 "../alias.c" puts(_("%d %s%s options allowed\n")); -#line 94 "../makeshell.c" +#line 56 "../makeshell.c" puts(_("%s error %d (%s) calling %s for '%s'\n")); -#line 306 "../makeshell.c" +#line 268 "../makeshell.c" puts(_("interprocess pipe")); -#line 168 "../version.c" +#line 171 "../version.c" puts(_("error: version option argument '%c' invalid. Use:\n" "\t'v' - version only\n" "\t'c' - version and copyright\n" "\t'n' - version and full copyright notice\n")); #line 58 "../check.c" puts(_("%s error: the '%s' and '%s' options conflict\n")); -#line 217 "../find.c" +#line 187 "../find.c" puts(_("%s: The '%s' option has been disabled.")); -#line 430 "../find.c" +#line 400 "../find.c" puts(_("%s: The '%s' option has been disabled.")); #line 38 "../alias.c" puts(_("-equivalence")); -#line 469 "../find.c" +#line 439 "../find.c" puts(_("%s: illegal option -- %c\n")); #line 110 "../reset.c" puts(_("%s: illegal option -- %c\n")); -#line 271 "../find.c" +#line 241 "../find.c" puts(_("%s: illegal option -- %s\n")); -#line 755 "../find.c" +#line 740 "../find.c" puts(_("%s: illegal option -- %s\n")); #line 118 "../reset.c" puts(_("%s: illegal option -- %s\n")); -#line 335 "../find.c" +#line 305 "../find.c" puts(_("%s: unknown vendor extension option -- %s\n")); -#line 159 "../enum.c" +#line 135 "../enum.c" puts(_(" or an integer from %d through %d\n")); -#line 169 "../enum.c" +#line 145 "../enum.c" puts(_(" or an integer from %d through %d\n")); -#line 747 "../usage.c" +#line 696 "../usage.c" puts(_("%s error: invalid option descriptor for %s\n")); -#line 1081 "../usage.c" +#line 1030 "../usage.c" puts(_("%s error: invalid option descriptor for %s\n")); -#line 385 "../find.c" +#line 355 "../find.c" puts(_("%s: invalid option name: %s\n")); -#line 527 "../find.c" +#line 497 "../find.c" puts(_("%s: The '%s' option requires an argument.\n")); -#line 156 "../autoopts.c" +#line 150 "../autoopts.c" puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" "\t'%s' and '%s'.")); #line 94 "../check.c" puts(_("%s error: The %s option is required\n")); -#line 632 "../find.c" +#line 602 "../find.c" puts(_("%s: The '%s' option cannot have an argument.\n")); #line 151 "../check.c" puts(_("%s: Command line arguments are not allowed.\n")); -#line 535 "../save.c" +#line 568 "../save.c" puts(_("error %d (%s) creating %s\n")); -#line 234 "../enum.c" +#line 210 "../enum.c" puts(_("%s error: '%s' does not match any %s keywords.\n")); #line 93 "../reset.c" puts(_("%s error: The '%s' option requires an argument.\n")); -#line 184 "../save.c" +#line 122 "../save.c" puts(_("error %d (%s) stat-ing %s\n")); -#line 238 "../save.c" +#line 175 "../save.c" puts(_("error %d (%s) stat-ing %s\n")); #line 143 "../restore.c" puts(_("%s error: no saved option state\n")); -#line 231 "../autoopts.c" +#line 225 "../autoopts.c" puts(_("'%s' is not a command line option.\n")); -#line 111 "../time.c" +#line 113 "../time.c" puts(_("%s error: '%s' is not a recognizable date/time.\n")); -#line 132 "../save.c" - puts(_("'%s' not defined\n")); #line 50 "../time.c" puts(_("%s error: '%s' is not a recognizable time duration.\n")); #line 92 "../check.c" puts(_("%s error: The %s option must appear %d times.\n")); -#line 164 "../numeric.c" +#line 165 "../numeric.c" puts(_("%s error: '%s' is not a recognizable number.\n")); -#line 200 "../enum.c" +#line 176 "../enum.c" puts(_("%s error: %s exceeds %s keyword count\n")); -#line 330 "../usage.c" +#line 279 "../usage.c" puts(_("Try '%s %s' for more information.\n")); #line 45 "../alias.c" puts(_("one %s%s option allowed\n")); -#line 208 "../makeshell.c" +#line 170 "../makeshell.c" puts(_("standard output")); -#line 943 "../makeshell.c" +#line 905 "../makeshell.c" puts(_("standard output")); -#line 274 "../usage.c" +#line 223 "../usage.c" puts(_("standard output")); -#line 415 "../usage.c" +#line 364 "../usage.c" puts(_("standard output")); -#line 625 "../usage.c" +#line 574 "../usage.c" puts(_("standard output")); -#line 175 "../version.c" +#line 178 "../version.c" puts(_("standard output")); -#line 274 "../usage.c" +#line 223 "../usage.c" puts(_("standard error")); -#line 415 "../usage.c" +#line 364 "../usage.c" puts(_("standard error")); -#line 625 "../usage.c" +#line 574 "../usage.c" puts(_("standard error")); -#line 175 "../version.c" +#line 178 "../version.c" puts(_("standard error")); -#line 208 "../makeshell.c" +#line 170 "../makeshell.c" puts(_("write")); -#line 943 "../makeshell.c" +#line 905 "../makeshell.c" puts(_("write")); -#line 273 "../usage.c" +#line 222 "../usage.c" puts(_("write")); -#line 414 "../usage.c" +#line 363 "../usage.c" puts(_("write")); -#line 624 "../usage.c" +#line 573 "../usage.c" puts(_("write")); -#line 174 "../version.c" +#line 177 "../version.c" puts(_("write")); #line 60 "../numeric.c" puts(_("%s error: %s option value %ld is out of range.\n")); #line 44 "../check.c" puts(_("%s error: %s option requires the %s option\n")); -#line 131 "../save.c" - puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 183 "../save.c" +#line 121 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 237 "../save.c" +#line 174 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 256 "../save.c" +#line 193 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); -#line 534 "../save.c" +#line 567 "../save.c" puts(_("%s warning: cannot save options - %s not regular file\n")); /* END-LIBOPTS-MESSAGES */ /* USAGE-TEXT: */ -#line 873 "../usage.c" +#line 822 "../usage.c" puts(_("\t\t\t\t- an alternate for '%s'\n")); -#line 1148 "../usage.c" +#line 1097 "../usage.c" puts(_("Version, usage and configuration options:")); -#line 924 "../usage.c" +#line 873 "../usage.c" puts(_("\t\t\t\t- default option for unnamed options\n")); -#line 837 "../usage.c" +#line 786 "../usage.c" puts(_("\t\t\t\t- disabled as '--%s'\n")); -#line 1117 "../usage.c" +#line 1066 "../usage.c" puts(_(" --- %-14s %s\n")); -#line 1115 "../usage.c" +#line 1064 "../usage.c" puts(_("This option has been disabled")); -#line 864 "../usage.c" +#line 813 "../usage.c" puts(_("\t\t\t\t- enabled by default\n")); #line 40 "../alias.c" puts(_("%s error: only ")); -#line 1194 "../usage.c" +#line 1143 "../usage.c" puts(_(" - examining environment variables named %s_*\n")); #line 168 "../file.c" puts(_("\t\t\t\t- file must not pre-exist\n")); #line 172 "../file.c" puts(_("\t\t\t\t- file must pre-exist\n")); -#line 380 "../usage.c" +#line 329 "../usage.c" puts(_("Options are specified by doubled hyphens and their name or by a single\n" "hyphen and the flag character.\n")); -#line 921 "../makeshell.c" +#line 882 "../makeshell.c" puts(_("\n" "= = = = = = = =\n\n" "This incarnation of genshell will produce\n" "a shell script to parse the options for %s:\n\n")); -#line 166 "../enum.c" +#line 142 "../enum.c" puts(_(" or an integer mask with any of the lower %d bits set\n")); -#line 897 "../usage.c" +#line 846 "../usage.c" puts(_("\t\t\t\t- is a set membership option\n")); -#line 918 "../usage.c" +#line 867 "../usage.c" puts(_("\t\t\t\t- must appear between %d and %d times\n")); -#line 382 "../usage.c" +#line 331 "../usage.c" puts(_("Options are specified by single or double hyphens and their name.\n")); -#line 904 "../usage.c" +#line 853 "../usage.c" puts(_("\t\t\t\t- may appear multiple times\n")); -#line 891 "../usage.c" +#line 840 "../usage.c" puts(_("\t\t\t\t- may not be preset\n")); -#line 1309 "../usage.c" +#line 1258 "../usage.c" puts(_(" Arg Option-Name Description\n")); -#line 1245 "../usage.c" +#line 1194 "../usage.c" puts(_(" Flg Arg Option-Name Description\n")); -#line 1303 "../usage.c" +#line 1252 "../usage.c" puts(_(" Flg Arg Option-Name Description\n")); -#line 1304 "../usage.c" +#line 1253 "../usage.c" puts(_(" %3s %s")); -#line 1310 "../usage.c" +#line 1259 "../usage.c" puts(_(" %3s %s")); -#line 387 "../usage.c" +#line 336 "../usage.c" puts(_("The '-#<number>' option may omit the hash char\n")); -#line 383 "../usage.c" +#line 332 "../usage.c" puts(_("All arguments are named options.\n")); -#line 971 "../usage.c" +#line 920 "../usage.c" puts(_(" - reading file %s")); -#line 409 "../usage.c" +#line 358 "../usage.c" puts(_("\n" "Please send bug reports to: <%s>\n")); #line 100 "../version.c" @@ -787,17 +788,17 @@ by the newly generated text. The first '#!' line will be regenerated.\n")); #line 129 "../version.c" puts(_("\n" "Please send bug reports to: <%s>\n")); -#line 903 "../usage.c" +#line 852 "../usage.c" puts(_("\t\t\t\t- may NOT appear - preset only\n")); -#line 944 "../usage.c" +#line 893 "../usage.c" puts(_("\n" "The following option preset mechanisms are supported:\n")); -#line 1192 "../usage.c" +#line 1141 "../usage.c" puts(_("\n" "The following option preset mechanisms are supported:\n")); -#line 682 "../usage.c" +#line 631 "../usage.c" puts(_("prohibits these options:\n")); -#line 677 "../usage.c" +#line 626 "../usage.c" puts(_("prohibits the option '%s'\n")); #line 81 "../numeric.c" puts(_("%s%ld to %ld")); @@ -815,28 +816,28 @@ by the newly generated text. The first '#!' line will be regenerated.\n")); puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); #line 77 "../numeric.c" puts(_("%sless than or equal to %ld")); -#line 390 "../usage.c" +#line 339 "../usage.c" puts(_("Operands and options may be intermixed. They will be reordered.\n")); -#line 652 "../usage.c" +#line 601 "../usage.c" puts(_("requires the option '%s'\n")); -#line 655 "../usage.c" +#line 604 "../usage.c" puts(_("requires these options:\n")); -#line 1321 "../usage.c" +#line 1270 "../usage.c" puts(_(" Arg Option-Name Req? Description\n")); -#line 1315 "../usage.c" +#line 1264 "../usage.c" puts(_(" Flg Arg Option-Name Req? Description\n")); -#line 167 "../enum.c" +#line 143 "../enum.c" puts(_("or you may use a numeric representation. Preceding these with a '!'\n" "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" "will set them all. Multiple entries may be passed as an option\n" "argument list.\n")); -#line 910 "../usage.c" +#line 859 "../usage.c" puts(_("\t\t\t\t- may appear up to %d times\n")); -#line 77 "../enum.c" +#line 52 "../enum.c" puts(_("The valid \"%s\" option keywords are:\n")); -#line 1152 "../usage.c" +#line 1101 "../usage.c" puts(_("The next option supports vendor supported extra options:")); -#line 773 "../usage.c" +#line 722 "../usage.c" puts(_("These additional options are:")); /* END-USAGE-TEXT */ } |
