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