1ea906c41SOllivier Robert /* -*- buffer-read-only: t -*- vi: set ro: 2ea906c41SOllivier Robert * 3ea906c41SOllivier Robert * DO NOT EDIT THIS FILE (genshell.c) 4ea906c41SOllivier Robert * 52b15cb3dSCy Schubert * It has been AutoGen-ed 6ea906c41SOllivier Robert * From the definitions genshell.def 7ea906c41SOllivier Robert * and the template file options 8ea906c41SOllivier Robert * 92b15cb3dSCy Schubert * Generated from AutoOpts 41:0:16 templates. 10ea906c41SOllivier Robert * 112b15cb3dSCy Schubert * AutoOpts is a copyrighted work. This source file is not encumbered 122b15cb3dSCy Schubert * by AutoOpts licensing, but is provided under the licensing terms chosen 132b15cb3dSCy Schubert * by the genshellopt author or copyright holder. AutoOpts is 142b15cb3dSCy Schubert * licensed under the terms of the LGPL. The redistributable library 152b15cb3dSCy Schubert * (``libopts'') is licensed under the terms of either the LGPL or, at the 162b15cb3dSCy Schubert * users discretion, the BSD license. See the AutoOpts and/or libopts sources 172b15cb3dSCy Schubert * for details. 18ea906c41SOllivier Robert * 192b15cb3dSCy Schubert * The genshellopt program is copyrighted and licensed 202b15cb3dSCy Schubert * under the following terms: 21ea906c41SOllivier Robert * 222b15cb3dSCy Schubert * Copyright (C) 1999-2014 Bruce Korb, all rights reserved. 232b15cb3dSCy Schubert * This is free software. It is licensed for use, modification and 242b15cb3dSCy Schubert * redistribution under the terms of the GNU Lesser General Public License, 252b15cb3dSCy Schubert * version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html> 26ea906c41SOllivier Robert * 272b15cb3dSCy Schubert * The genshellopt library is free software; you can redistribute it and/or 282b15cb3dSCy Schubert * modify it under the terms of the GNU Library General Public License as 292b15cb3dSCy Schubert * published by the Free Software Foundation; either version 2 of the 302b15cb3dSCy Schubert * License, or (at your option) any later version. 312b15cb3dSCy Schubert * 322b15cb3dSCy Schubert * This library is distributed in the hope that it will be useful, but 332b15cb3dSCy Schubert * WITHOUT ANY WARRANTY; without even the implied warranty of 34ea906c41SOllivier Robert * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 352b15cb3dSCy Schubert * Library General Public License for more details. 36ea906c41SOllivier Robert * 372b15cb3dSCy Schubert * You should have received a copy of the GNU Library General Public 382b15cb3dSCy Schubert * License along with this library; if not, see 392b15cb3dSCy Schubert * <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html> 40ea906c41SOllivier Robert */ 41ea906c41SOllivier Robert 422b15cb3dSCy Schubert #ifndef __doxygen__ 43ea906c41SOllivier Robert #define OPTION_CODE_COMPILE 1 44ea906c41SOllivier Robert #include "genshell.h" 452b15cb3dSCy Schubert #include <sys/types.h> 462b15cb3dSCy Schubert 472b15cb3dSCy Schubert #include <limits.h> 482b15cb3dSCy Schubert #include <stdio.h> 492b15cb3dSCy Schubert #include <stdlib.h> 50ea906c41SOllivier Robert 51ea906c41SOllivier Robert #ifdef __cplusplus 52ea906c41SOllivier Robert extern "C" { 53ea906c41SOllivier Robert #endif 542b15cb3dSCy Schubert extern FILE * option_usage_fp; 552b15cb3dSCy Schubert #define zCopyright (genshellopt_opt_strs+0) 562b15cb3dSCy Schubert #define zLicenseDescrip (genshellopt_opt_strs+285) 572b15cb3dSCy Schubert 58ea906c41SOllivier Robert extern tUsageProc genshelloptUsage; 59ea906c41SOllivier Robert 60ea906c41SOllivier Robert #ifndef NULL 61ea906c41SOllivier Robert # define NULL 0 62ea906c41SOllivier Robert #endif 632b15cb3dSCy Schubert 642b15cb3dSCy Schubert /** 652b15cb3dSCy Schubert * static const strings for genshellopt options 66ea906c41SOllivier Robert */ 672b15cb3dSCy Schubert static char const genshellopt_opt_strs[1769] = 682b15cb3dSCy Schubert /* 0 */ "genshellopt 1\n" 692b15cb3dSCy Schubert "Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n" 702b15cb3dSCy Schubert "This is free software. It is licensed for use, modification and\n" 712b15cb3dSCy Schubert "redistribution under the terms of the GNU Lesser General Public License,\n" 722b15cb3dSCy Schubert "version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0" 732b15cb3dSCy Schubert /* 285 */ "The genshellopt library is free software; you can redistribute it and/or\n" 742b15cb3dSCy Schubert "modify it under the terms of the GNU Library General Public License as\n" 752b15cb3dSCy Schubert "published by the Free Software Foundation; either version 2 of the License,\n" 762b15cb3dSCy Schubert "or (at your option) any later version.\n\n" 772b15cb3dSCy Schubert "This library is distributed in the hope that it will be useful, but WITHOUT\n" 782b15cb3dSCy Schubert "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n" 792b15cb3dSCy Schubert "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public\n" 802b15cb3dSCy Schubert "License for more details.\n\n" 812b15cb3dSCy Schubert "You should have received a copy of the GNU Library General Public License\n" 822b15cb3dSCy Schubert "along with this library; if not, see\n" 832b15cb3dSCy Schubert "<http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0" 842b15cb3dSCy Schubert /* 957 */ "Output Script File\0" 852b15cb3dSCy Schubert /* 976 */ "SCRIPT\0" 862b15cb3dSCy Schubert /* 983 */ "script\0" 872b15cb3dSCy Schubert /* 990 */ "Shell name (follows \"#!\" magic)\0" 882b15cb3dSCy Schubert /* 1022 */ "SHELL\0" 892b15cb3dSCy Schubert /* 1028 */ "no-shell\0" 902b15cb3dSCy Schubert /* 1037 */ "no\0" 912b15cb3dSCy Schubert /* 1040 */ "display extended usage information and exit\0" 922b15cb3dSCy Schubert /* 1084 */ "help\0" 932b15cb3dSCy Schubert /* 1089 */ "extended usage information passed thru pager\0" 942b15cb3dSCy Schubert /* 1134 */ "more-help\0" 952b15cb3dSCy Schubert /* 1144 */ "output version information and exit\0" 962b15cb3dSCy Schubert /* 1180 */ "version\0" 972b15cb3dSCy Schubert /* 1188 */ "GENSHELLOPT\0" 982b15cb3dSCy Schubert /* 1200 */ "genshellopt - Generate Shell Option Processing Script - Ver. 1\n" 992b15cb3dSCy Schubert "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" 1002b15cb3dSCy Schubert /* 1321 */ "autogen-users@lists.sourceforge.net\0" 1012b15cb3dSCy Schubert /* 1357 */ "Note that 'shell' is only useful if the output file does not already exist.\n" 1022b15cb3dSCy Schubert "If it does, then the shell name and optional first argument will be\n" 1032b15cb3dSCy Schubert "extracted from the script file.\n\0" 1042b15cb3dSCy Schubert /* 1534 */ "If the script file already exists and contains Automated Option Processing\n" 1052b15cb3dSCy Schubert "text, the second line of the file through the ending tag will be replaced\n" 1062b15cb3dSCy Schubert "by the newly generated text. The first '#!' line will be regenerated.\n\0" 1072b15cb3dSCy Schubert /* 1755 */ "genshellopt 1"; 1082b15cb3dSCy Schubert 1092b15cb3dSCy Schubert /** 1102b15cb3dSCy Schubert * script option description: 1112b15cb3dSCy Schubert */ 1122b15cb3dSCy Schubert /** Descriptive text for the script option */ 1132b15cb3dSCy Schubert #define SCRIPT_DESC (genshellopt_opt_strs+957) 1142b15cb3dSCy Schubert /** Upper-cased name for the script option */ 1152b15cb3dSCy Schubert #define SCRIPT_NAME (genshellopt_opt_strs+976) 1162b15cb3dSCy Schubert /** Name string for the script option */ 1172b15cb3dSCy Schubert #define SCRIPT_name (genshellopt_opt_strs+983) 1182b15cb3dSCy Schubert /** Compiled in flag settings for the script option */ 119ea906c41SOllivier Robert #define SCRIPT_FLAGS (OPTST_DISABLED \ 120ea906c41SOllivier Robert | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 121ea906c41SOllivier Robert 1222b15cb3dSCy Schubert /** 1232b15cb3dSCy Schubert * shell option description: 124ea906c41SOllivier Robert */ 1252b15cb3dSCy Schubert /** Descriptive text for the shell option */ 1262b15cb3dSCy Schubert #define SHELL_DESC (genshellopt_opt_strs+990) 1272b15cb3dSCy Schubert /** Upper-cased name for the shell option */ 1282b15cb3dSCy Schubert #define SHELL_NAME (genshellopt_opt_strs+1022) 1292b15cb3dSCy Schubert /** disablement name for the shell option */ 1302b15cb3dSCy Schubert #define NOT_SHELL_name (genshellopt_opt_strs+1028) 1312b15cb3dSCy Schubert /** disablement prefix for the shell option */ 1322b15cb3dSCy Schubert #define NOT_SHELL_PFX (genshellopt_opt_strs+1037) 1332b15cb3dSCy Schubert /** Name string for the shell option */ 1342b15cb3dSCy Schubert #define SHELL_name (NOT_SHELL_name + 3) 1352b15cb3dSCy Schubert /** Compiled in flag settings for the shell option */ 136ea906c41SOllivier Robert #define SHELL_FLAGS (OPTST_INITENABLED \ 137ea906c41SOllivier Robert | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 138ea906c41SOllivier Robert 139ea906c41SOllivier Robert /* 140ea906c41SOllivier Robert * Help/More_Help/Version option descriptions: 141ea906c41SOllivier Robert */ 1422b15cb3dSCy Schubert #define HELP_DESC (genshellopt_opt_strs+1040) 1432b15cb3dSCy Schubert #define HELP_name (genshellopt_opt_strs+1084) 1442b15cb3dSCy Schubert #ifdef HAVE_WORKING_FORK 1452b15cb3dSCy Schubert #define MORE_HELP_DESC (genshellopt_opt_strs+1089) 1462b15cb3dSCy Schubert #define MORE_HELP_name (genshellopt_opt_strs+1134) 1472b15cb3dSCy Schubert #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) 1482b15cb3dSCy Schubert #else 1492b15cb3dSCy Schubert #define MORE_HELP_DESC HELP_DESC 1502b15cb3dSCy Schubert #define MORE_HELP_name HELP_name 1512b15cb3dSCy Schubert #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 1522b15cb3dSCy Schubert #endif 1532b15cb3dSCy Schubert #ifdef NO_OPTIONAL_OPT_ARGS 1542b15cb3dSCy Schubert # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) 1552b15cb3dSCy Schubert #else 1562b15cb3dSCy Schubert # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ 1572b15cb3dSCy Schubert OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) 1582b15cb3dSCy Schubert #endif 1592b15cb3dSCy Schubert #define VER_DESC (genshellopt_opt_strs+1144) 1602b15cb3dSCy Schubert #define VER_name (genshellopt_opt_strs+1180) 1612b15cb3dSCy Schubert /** 162ea906c41SOllivier Robert * Declare option callback procedures 163ea906c41SOllivier Robert */ 164ea906c41SOllivier Robert extern tOptProc 1652b15cb3dSCy Schubert optionBooleanVal, optionNestedVal, optionNumericVal, 1662b15cb3dSCy Schubert optionPagedUsage, optionPrintVersion, optionResetOpt, 1672b15cb3dSCy Schubert optionStackArg, optionTimeDate, optionTimeVal, 1682b15cb3dSCy Schubert optionUnstackArg, optionVendorOption; 169ea906c41SOllivier Robert static tOptProc 170ea906c41SOllivier Robert doUsageOpt; 1712b15cb3dSCy Schubert #define VER_PROC optionPrintVersion 172ea906c41SOllivier Robert 1732b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1742b15cb3dSCy Schubert /** 1752b15cb3dSCy Schubert * Define the genshellopt Option Descriptions. 1762b15cb3dSCy Schubert * This is an array of GENSHELL_OPTION_CT entries, one for each 1772b15cb3dSCy Schubert * option that the genshellopt program responds to. 178ea906c41SOllivier Robert */ 1792b15cb3dSCy Schubert static tOptDesc optDesc[GENSHELL_OPTION_CT] = { 1802b15cb3dSCy Schubert { /* entry idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT, 1812b15cb3dSCy Schubert /* equiv idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT, 182ea906c41SOllivier Robert /* equivalenced to */ NO_EQUIVALENT, 183ea906c41SOllivier Robert /* min, max, act ct */ 0, 1, 0, 184ea906c41SOllivier Robert /* opt state flags */ SCRIPT_FLAGS, 0, 1852b15cb3dSCy Schubert /* last opt argumnt */ { NULL }, /* --script */ 186ea906c41SOllivier Robert /* arg list/cookie */ NULL, 187ea906c41SOllivier Robert /* must/cannot opts */ NULL, NULL, 188ea906c41SOllivier Robert /* option proc */ NULL, 1892b15cb3dSCy Schubert /* desc, NAME, name */ SCRIPT_DESC, SCRIPT_NAME, SCRIPT_name, 190ea906c41SOllivier Robert /* disablement strs */ NULL, NULL }, 191ea906c41SOllivier Robert 1922b15cb3dSCy Schubert { /* entry idx, value */ 1, VALUE_GENSHELL_OPT_SHELL, 1932b15cb3dSCy Schubert /* equiv idx, value */ 1, VALUE_GENSHELL_OPT_SHELL, 194ea906c41SOllivier Robert /* equivalenced to */ NO_EQUIVALENT, 195ea906c41SOllivier Robert /* min, max, act ct */ 0, 1, 0, 196ea906c41SOllivier Robert /* opt state flags */ SHELL_FLAGS, 0, 1972b15cb3dSCy Schubert /* last opt argumnt */ { NULL }, /* --shell */ 198ea906c41SOllivier Robert /* arg list/cookie */ NULL, 199ea906c41SOllivier Robert /* must/cannot opts */ NULL, NULL, 200ea906c41SOllivier Robert /* option proc */ NULL, 2012b15cb3dSCy Schubert /* desc, NAME, name */ SHELL_DESC, SHELL_NAME, SHELL_name, 2022b15cb3dSCy Schubert /* disablement strs */ NOT_SHELL_name, NOT_SHELL_PFX }, 203ea906c41SOllivier Robert 2042b15cb3dSCy Schubert { /* entry idx, value */ INDEX_GENSHELL_OPT_VERSION, VALUE_GENSHELL_OPT_VERSION, 2052b15cb3dSCy Schubert /* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_VERSION, 206ea906c41SOllivier Robert /* equivalenced to */ NO_EQUIVALENT, 207ea906c41SOllivier Robert /* min, max, act ct */ 0, 1, 0, 2082b15cb3dSCy Schubert /* opt state flags */ VER_FLAGS, AOUSE_VERSION, 209ea906c41SOllivier Robert /* last opt argumnt */ { NULL }, 210ea906c41SOllivier Robert /* arg list/cookie */ NULL, 211ea906c41SOllivier Robert /* must/cannot opts */ NULL, NULL, 2122b15cb3dSCy Schubert /* option proc */ VER_PROC, 2132b15cb3dSCy Schubert /* desc, NAME, name */ VER_DESC, NULL, VER_name, 214ea906c41SOllivier Robert /* disablement strs */ NULL, NULL }, 215ea906c41SOllivier Robert 216ea906c41SOllivier Robert 217ea906c41SOllivier Robert 2182b15cb3dSCy Schubert { /* entry idx, value */ INDEX_GENSHELL_OPT_HELP, VALUE_GENSHELL_OPT_HELP, 2192b15cb3dSCy Schubert /* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_HELP, 220ea906c41SOllivier Robert /* equivalenced to */ NO_EQUIVALENT, 221ea906c41SOllivier Robert /* min, max, act ct */ 0, 1, 0, 2222b15cb3dSCy Schubert /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, 223ea906c41SOllivier Robert /* last opt argumnt */ { NULL }, 224ea906c41SOllivier Robert /* arg list/cookie */ NULL, 225ea906c41SOllivier Robert /* must/cannot opts */ NULL, NULL, 226ea906c41SOllivier Robert /* option proc */ doUsageOpt, 2272b15cb3dSCy Schubert /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, 228ea906c41SOllivier Robert /* disablement strs */ NULL, NULL }, 229ea906c41SOllivier Robert 2302b15cb3dSCy Schubert { /* entry idx, value */ INDEX_GENSHELL_OPT_MORE_HELP, VALUE_GENSHELL_OPT_MORE_HELP, 2312b15cb3dSCy Schubert /* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_MORE_HELP, 232ea906c41SOllivier Robert /* equivalenced to */ NO_EQUIVALENT, 233ea906c41SOllivier Robert /* min, max, act ct */ 0, 1, 0, 2342b15cb3dSCy Schubert /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, 235ea906c41SOllivier Robert /* last opt argumnt */ { NULL }, 236ea906c41SOllivier Robert /* arg list/cookie */ NULL, 237ea906c41SOllivier Robert /* must/cannot opts */ NULL, NULL, 238ea906c41SOllivier Robert /* option proc */ optionPagedUsage, 2392b15cb3dSCy Schubert /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, 240ea906c41SOllivier Robert /* disablement strs */ NULL, NULL } 241ea906c41SOllivier Robert }; 242ea906c41SOllivier Robert 243ea906c41SOllivier Robert 2442b15cb3dSCy Schubert /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 2452b15cb3dSCy Schubert /** Reference to the upper cased version of genshellopt. */ 2462b15cb3dSCy Schubert #define zPROGNAME (genshellopt_opt_strs+1188) 2472b15cb3dSCy Schubert /** Reference to the title line for genshellopt usage. */ 2482b15cb3dSCy Schubert #define zUsageTitle (genshellopt_opt_strs+1200) 2492b15cb3dSCy Schubert /** There is no genshellopt configuration file. */ 2502b15cb3dSCy Schubert #define zRcName NULL 2512b15cb3dSCy Schubert /** There are no directories to search for genshellopt config files. */ 2522b15cb3dSCy Schubert #define apzHomeList NULL 2532b15cb3dSCy Schubert /** The genshellopt program bug email address. */ 2542b15cb3dSCy Schubert #define zBugsAddr (genshellopt_opt_strs+1321) 2552b15cb3dSCy Schubert /** Clarification/explanation of what genshellopt does. */ 2562b15cb3dSCy Schubert #define zExplain (genshellopt_opt_strs+1357) 2572b15cb3dSCy Schubert /** Extra detail explaining what genshellopt does. */ 2582b15cb3dSCy Schubert #define zDetail (genshellopt_opt_strs+1534) 2592b15cb3dSCy Schubert /** The full version string for genshellopt. */ 2602b15cb3dSCy Schubert #define zFullVersion (genshellopt_opt_strs+1755) 2612b15cb3dSCy Schubert /* extracted from optcode.tlib near line 364 */ 262ea906c41SOllivier Robert 263ea906c41SOllivier Robert #if defined(ENABLE_NLS) 264ea906c41SOllivier Robert # define OPTPROC_BASE OPTPROC_TRANSLATE 265ea906c41SOllivier Robert static tOptionXlateProc translate_option_strings; 266ea906c41SOllivier Robert #else 267ea906c41SOllivier Robert # define OPTPROC_BASE OPTPROC_NONE 268ea906c41SOllivier Robert # define translate_option_strings NULL 269ea906c41SOllivier Robert #endif /* ENABLE_NLS */ 270ea906c41SOllivier Robert 2712b15cb3dSCy Schubert #define genshellopt_full_usage (NULL) 2722b15cb3dSCy Schubert #define genshellopt_short_usage (NULL) 2732b15cb3dSCy Schubert 2742b15cb3dSCy Schubert #endif /* not defined __doxygen__ */ 2752b15cb3dSCy Schubert 2762b15cb3dSCy Schubert /* 2772b15cb3dSCy Schubert * Create the static procedure(s) declared above. 2782b15cb3dSCy Schubert */ 2792b15cb3dSCy Schubert /** 2802b15cb3dSCy Schubert * The callout function that invokes the genshelloptUsage function. 2812b15cb3dSCy Schubert * 2822b15cb3dSCy Schubert * @param[in] opts the AutoOpts option description structure 2832b15cb3dSCy Schubert * @param[in] od the descriptor for the "help" (usage) option. 2842b15cb3dSCy Schubert * @noreturn 2852b15cb3dSCy Schubert */ 2862b15cb3dSCy Schubert static void 2872b15cb3dSCy Schubert doUsageOpt(tOptions * opts, tOptDesc * od) 2882b15cb3dSCy Schubert { 2892b15cb3dSCy Schubert int ex_code; 2902b15cb3dSCy Schubert ex_code = GENSHELLOPT_EXIT_SUCCESS; 2912b15cb3dSCy Schubert genshelloptUsage(&genshelloptOptions, ex_code); 2922b15cb3dSCy Schubert /* NOTREACHED */ 2932b15cb3dSCy Schubert exit(1); 2942b15cb3dSCy Schubert (void)opts; 2952b15cb3dSCy Schubert (void)od; 2962b15cb3dSCy Schubert } 297*276da39aSCy Schubert /* extracted from optmain.tlib near line 1250 */ 2982b15cb3dSCy Schubert 2992b15cb3dSCy Schubert /** 3002b15cb3dSCy Schubert * The directory containing the data associated with genshellopt. 3012b15cb3dSCy Schubert */ 3022b15cb3dSCy Schubert #ifndef PKGDATADIR 3032b15cb3dSCy Schubert # define PKGDATADIR "" 3042b15cb3dSCy Schubert #endif 3052b15cb3dSCy Schubert 3062b15cb3dSCy Schubert /** 3072b15cb3dSCy Schubert * Information about the person or institution that packaged genshellopt 3082b15cb3dSCy Schubert * for the current distribution. 3092b15cb3dSCy Schubert */ 3102b15cb3dSCy Schubert #ifndef WITH_PACKAGER 3112b15cb3dSCy Schubert # define genshellopt_packager_info NULL 3122b15cb3dSCy Schubert #else 3132b15cb3dSCy Schubert /** Packager information for genshellopt. */ 3142b15cb3dSCy Schubert static char const genshellopt_packager_info[] = 3152b15cb3dSCy Schubert "Packaged by " WITH_PACKAGER 3162b15cb3dSCy Schubert 3172b15cb3dSCy Schubert # ifdef WITH_PACKAGER_VERSION 3182b15cb3dSCy Schubert " ("WITH_PACKAGER_VERSION")" 3192b15cb3dSCy Schubert # endif 3202b15cb3dSCy Schubert 3212b15cb3dSCy Schubert # ifdef WITH_PACKAGER_BUG_REPORTS 3222b15cb3dSCy Schubert "\nReport genshellopt bugs to " WITH_PACKAGER_BUG_REPORTS 3232b15cb3dSCy Schubert # endif 3242b15cb3dSCy Schubert "\n"; 3252b15cb3dSCy Schubert #endif 3262b15cb3dSCy Schubert #ifndef __doxygen__ 3272b15cb3dSCy Schubert 3282b15cb3dSCy Schubert #endif /* __doxygen__ */ 3292b15cb3dSCy Schubert /** 3302b15cb3dSCy Schubert * The option definitions for genshellopt. The one structure that 3312b15cb3dSCy Schubert * binds them all. 3322b15cb3dSCy Schubert */ 333ea906c41SOllivier Robert tOptions genshelloptOptions = { 334ea906c41SOllivier Robert OPTIONS_STRUCT_VERSION, 335ea906c41SOllivier Robert 0, NULL, /* original argc + argv */ 336ea906c41SOllivier Robert ( OPTPROC_BASE 337ea906c41SOllivier Robert + OPTPROC_ERRSTOP 338ea906c41SOllivier Robert + OPTPROC_SHORTOPT 339ea906c41SOllivier Robert + OPTPROC_LONGOPT 340ea906c41SOllivier Robert + OPTPROC_NO_REQ_OPT 341ea906c41SOllivier Robert + OPTPROC_NEGATIONS 342ea906c41SOllivier Robert + OPTPROC_NO_ARGS ), 343ea906c41SOllivier Robert 0, NULL, /* current option index, current option */ 344ea906c41SOllivier Robert NULL, NULL, zPROGNAME, 3452b15cb3dSCy Schubert zRcName, zCopyright, zLicenseDescrip, 346ea906c41SOllivier Robert zFullVersion, apzHomeList, zUsageTitle, 347ea906c41SOllivier Robert zExplain, zDetail, optDesc, 348ea906c41SOllivier Robert zBugsAddr, /* address to send bugs to */ 349ea906c41SOllivier Robert NULL, NULL, /* extensions/saved state */ 350ea906c41SOllivier Robert genshelloptUsage, /* usage procedure */ 351ea906c41SOllivier Robert translate_option_strings, /* translation procedure */ 352ea906c41SOllivier Robert /* 353ea906c41SOllivier Robert * Indexes to special options 354ea906c41SOllivier Robert */ 3552b15cb3dSCy Schubert { INDEX_GENSHELL_OPT_MORE_HELP, /* more-help option index */ 3562b15cb3dSCy Schubert NO_EQUIVALENT, /* save option index */ 3572b15cb3dSCy Schubert NO_EQUIVALENT, /* '-#' option index */ 358ea906c41SOllivier Robert NO_EQUIVALENT /* index of default opt */ 359ea906c41SOllivier Robert }, 3602b15cb3dSCy Schubert 5 /* full option count */, 2 /* user option count */, 3612b15cb3dSCy Schubert genshellopt_full_usage, genshellopt_short_usage, 3622b15cb3dSCy Schubert NULL, NULL, 3632b15cb3dSCy Schubert PKGDATADIR, genshellopt_packager_info 364ea906c41SOllivier Robert }; 365ea906c41SOllivier Robert 366ea906c41SOllivier Robert #if ENABLE_NLS 3672b15cb3dSCy Schubert /** 3682b15cb3dSCy Schubert * This code is designed to translate translatable option text for the 3692b15cb3dSCy Schubert * genshellopt program. These translations happen upon entry 3702b15cb3dSCy Schubert * to optionProcess(). 3712b15cb3dSCy Schubert */ 372ea906c41SOllivier Robert #include <stdio.h> 373ea906c41SOllivier Robert #include <stdlib.h> 374ea906c41SOllivier Robert #include <string.h> 375ea906c41SOllivier Robert #include <unistd.h> 3762b15cb3dSCy Schubert #ifdef HAVE_DCGETTEXT 3772b15cb3dSCy Schubert # include <gettext.h> 3782b15cb3dSCy Schubert #endif 379ea906c41SOllivier Robert #include <autoopts/usage-txt.h> 380ea906c41SOllivier Robert 381ea906c41SOllivier Robert static char * AO_gettext(char const * pz); 382ea906c41SOllivier Robert static void coerce_it(void ** s); 383ea906c41SOllivier Robert 3842b15cb3dSCy Schubert /** 3852b15cb3dSCy Schubert * AutoGen specific wrapper function for gettext. It relies on the macro _() 3862b15cb3dSCy Schubert * to convert from English to the target language, then strdup-duplicates the 3872b15cb3dSCy Schubert * result string. It tries the "libopts" domain first, then whatever has been 3882b15cb3dSCy Schubert * set via the \a textdomain(3) call. 3892b15cb3dSCy Schubert * 3902b15cb3dSCy Schubert * @param[in] pz the input text used as a lookup key. 3912b15cb3dSCy Schubert * @returns the translated text (if there is one), 3922b15cb3dSCy Schubert * or the original text (if not). 3932b15cb3dSCy Schubert */ 394ea906c41SOllivier Robert static char * 395ea906c41SOllivier Robert AO_gettext(char const * pz) 396ea906c41SOllivier Robert { 3972b15cb3dSCy Schubert char * res; 398ea906c41SOllivier Robert if (pz == NULL) 399ea906c41SOllivier Robert return NULL; 4002b15cb3dSCy Schubert #ifdef HAVE_DCGETTEXT 401ea906c41SOllivier Robert /* 4022b15cb3dSCy Schubert * While processing the option_xlateable_txt data, try to use the 4032b15cb3dSCy Schubert * "libopts" domain. Once we switch to the option descriptor data, 4042b15cb3dSCy Schubert * do *not* use that domain. 4052b15cb3dSCy Schubert */ 4062b15cb3dSCy Schubert if (option_xlateable_txt.field_ct != 0) { 4072b15cb3dSCy Schubert res = dgettext("libopts", pz); 4082b15cb3dSCy Schubert if (res == pz) 409*276da39aSCy Schubert res = (char *)VOIDP(_(pz)); 4102b15cb3dSCy Schubert } else 411*276da39aSCy Schubert res = (char *)VOIDP(_(pz)); 4122b15cb3dSCy Schubert #else 413*276da39aSCy Schubert res = (char *)VOIDP(_(pz)); 4142b15cb3dSCy Schubert #endif 4152b15cb3dSCy Schubert if (res == pz) 4162b15cb3dSCy Schubert return res; 4172b15cb3dSCy Schubert res = strdup(res); 4182b15cb3dSCy Schubert if (res == NULL) { 4192b15cb3dSCy Schubert fputs(_("No memory for duping translated strings\n"), stderr); 4202b15cb3dSCy Schubert exit(GENSHELLOPT_EXIT_FAILURE); 4212b15cb3dSCy Schubert } 4222b15cb3dSCy Schubert return res; 4232b15cb3dSCy Schubert } 4242b15cb3dSCy Schubert 4252b15cb3dSCy Schubert /** 4262b15cb3dSCy Schubert * All the pointers we use are marked "* const", but they are stored in 4272b15cb3dSCy Schubert * writable memory. Coerce the mutability and set the pointer. 4282b15cb3dSCy Schubert */ 4292b15cb3dSCy Schubert static void coerce_it(void ** s) { *s = AO_gettext(*s); 4302b15cb3dSCy Schubert } 4312b15cb3dSCy Schubert 4322b15cb3dSCy Schubert /** 4332b15cb3dSCy Schubert * Translate all the translatable strings in the genshelloptOptions 4342b15cb3dSCy Schubert * structure defined above. This is done only once. 435ea906c41SOllivier Robert */ 436ea906c41SOllivier Robert static void 437ea906c41SOllivier Robert translate_option_strings(void) 438ea906c41SOllivier Robert { 4392b15cb3dSCy Schubert tOptions * const opts = &genshelloptOptions; 4402b15cb3dSCy Schubert 441ea906c41SOllivier Robert /* 442ea906c41SOllivier Robert * Guard against re-translation. It won't work. The strings will have 443ea906c41SOllivier Robert * been changed by the first pass through this code. One shot only. 444ea906c41SOllivier Robert */ 4452b15cb3dSCy Schubert if (option_xlateable_txt.field_ct != 0) { 446ea906c41SOllivier Robert /* 4472b15cb3dSCy Schubert * Do the translations. The first pointer follows the field count 4482b15cb3dSCy Schubert * field. The field count field is the size of a pointer. 449ea906c41SOllivier Robert */ 450*276da39aSCy Schubert char ** ppz = (char**)VOIDP(&(option_xlateable_txt)); 4512b15cb3dSCy Schubert int ix = option_xlateable_txt.field_ct; 452ea906c41SOllivier Robert 453ea906c41SOllivier Robert do { 4542b15cb3dSCy Schubert ppz++; /* skip over field_ct */ 455ea906c41SOllivier Robert *ppz = AO_gettext(*ppz); 456ea906c41SOllivier Robert } while (--ix > 0); 4572b15cb3dSCy Schubert /* prevent re-translation and disable "libopts" domain lookup */ 4582b15cb3dSCy Schubert option_xlateable_txt.field_ct = 0; 459ea906c41SOllivier Robert 460*276da39aSCy Schubert coerce_it(VOIDP(&(opts->pzCopyright))); 461*276da39aSCy Schubert coerce_it(VOIDP(&(opts->pzCopyNotice))); 462*276da39aSCy Schubert coerce_it(VOIDP(&(opts->pzFullVersion))); 463*276da39aSCy Schubert coerce_it(VOIDP(&(opts->pzUsageTitle))); 464*276da39aSCy Schubert coerce_it(VOIDP(&(opts->pzExplain))); 465*276da39aSCy Schubert coerce_it(VOIDP(&(opts->pzDetail))); 466ea906c41SOllivier Robert { 4672b15cb3dSCy Schubert tOptDesc * od = opts->pOptDesc; 4682b15cb3dSCy Schubert for (ix = opts->optCt; ix > 0; ix--, od++) 469*276da39aSCy Schubert coerce_it(VOIDP(&(od->pzText))); 470ea906c41SOllivier Robert } 471ea906c41SOllivier Robert } 472ea906c41SOllivier Robert } 473ea906c41SOllivier Robert #endif /* ENABLE_NLS */ 474ea906c41SOllivier Robert 4752b15cb3dSCy Schubert #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT 4762b15cb3dSCy Schubert /** I18N function strictly for xgettext. Do not compile. */ 4772b15cb3dSCy Schubert static void bogus_function(void) { 4782b15cb3dSCy Schubert /* TRANSLATORS: 4792b15cb3dSCy Schubert 4802b15cb3dSCy Schubert The following dummy function was crated solely so that xgettext can 4812b15cb3dSCy Schubert extract the correct strings. These strings are actually referenced 4822b15cb3dSCy Schubert by a field name in the genshelloptOptions structure noted in the 4832b15cb3dSCy Schubert comments below. The literal text is defined in genshellopt_opt_strs. 4842b15cb3dSCy Schubert 4852b15cb3dSCy Schubert NOTE: the strings below are segmented with respect to the source string 4862b15cb3dSCy Schubert genshellopt_opt_strs. The strings above are handed off for translation 4872b15cb3dSCy Schubert at run time a paragraph at a time. Consequently, they are presented here 4882b15cb3dSCy Schubert for translation a paragraph at a time. 4892b15cb3dSCy Schubert 4902b15cb3dSCy Schubert ALSO: often the description for an option will reference another option 4912b15cb3dSCy Schubert by name. These are set off with apostrophe quotes (I hope). Do not 4922b15cb3dSCy Schubert translate option names. 4932b15cb3dSCy Schubert */ 4942b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzCopyright */ 4952b15cb3dSCy Schubert puts(_("genshellopt 1\n\ 4962b15cb3dSCy Schubert Copyright (C) 1999-2014 Bruce Korb, all rights reserved.\n\ 4972b15cb3dSCy Schubert This is free software. It is licensed for use, modification and\n\ 4982b15cb3dSCy Schubert redistribution under the terms of the GNU Lesser General Public License,\n\ 4992b15cb3dSCy Schubert version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n")); 5002b15cb3dSCy Schubert 5012b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzCopyNotice */ 5022b15cb3dSCy Schubert puts(_("The genshellopt library is free software; you can redistribute it and/or\n\ 5032b15cb3dSCy Schubert modify it under the terms of the GNU Library General Public License as\n\ 5042b15cb3dSCy Schubert published by the Free Software Foundation; either version 2 of the License,\n\ 5052b15cb3dSCy Schubert or (at your option) any later version.\n\n")); 5062b15cb3dSCy Schubert puts(_("This library is distributed in the hope that it will be useful, but WITHOUT\n\ 5072b15cb3dSCy Schubert ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\ 5082b15cb3dSCy Schubert FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public\n\ 5092b15cb3dSCy Schubert License for more details.\n\n")); 5102b15cb3dSCy Schubert puts(_("You should have received a copy of the GNU Library General Public License\n\ 5112b15cb3dSCy Schubert along with this library; if not, see\n\ 5122b15cb3dSCy Schubert <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n")); 5132b15cb3dSCy Schubert 5142b15cb3dSCy Schubert /* referenced via genshelloptOptions.pOptDesc->pzText */ 5152b15cb3dSCy Schubert puts(_("Output Script File")); 5162b15cb3dSCy Schubert 5172b15cb3dSCy Schubert /* referenced via genshelloptOptions.pOptDesc->pzText */ 5182b15cb3dSCy Schubert puts(_("Shell name (follows \"#!\" magic)")); 5192b15cb3dSCy Schubert 5202b15cb3dSCy Schubert /* referenced via genshelloptOptions.pOptDesc->pzText */ 5212b15cb3dSCy Schubert puts(_("display extended usage information and exit")); 5222b15cb3dSCy Schubert 5232b15cb3dSCy Schubert /* referenced via genshelloptOptions.pOptDesc->pzText */ 5242b15cb3dSCy Schubert puts(_("extended usage information passed thru pager")); 5252b15cb3dSCy Schubert 5262b15cb3dSCy Schubert /* referenced via genshelloptOptions.pOptDesc->pzText */ 5272b15cb3dSCy Schubert puts(_("output version information and exit")); 5282b15cb3dSCy Schubert 5292b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzUsageTitle */ 5302b15cb3dSCy Schubert puts(_("genshellopt - Generate Shell Option Processing Script - Ver. 1\n\ 5312b15cb3dSCy Schubert Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); 5322b15cb3dSCy Schubert 5332b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzExplain */ 5342b15cb3dSCy Schubert puts(_("Note that 'shell' is only useful if the output file does not already exist.\n\ 5352b15cb3dSCy Schubert If it does, then the shell name and optional first argument will be\n\ 5362b15cb3dSCy Schubert extracted from the script file.\n")); 5372b15cb3dSCy Schubert 5382b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzDetail */ 5392b15cb3dSCy Schubert puts(_("If the script file already exists and contains Automated Option Processing\n\ 5402b15cb3dSCy Schubert text, the second line of the file through the ending tag will be replaced\n\ 5412b15cb3dSCy Schubert by the newly generated text. The first '#!' line will be regenerated.\n")); 5422b15cb3dSCy Schubert 5432b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzFullVersion */ 5442b15cb3dSCy Schubert puts(_("genshellopt 1")); 5452b15cb3dSCy Schubert 5462b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzFullUsage */ 5472b15cb3dSCy Schubert puts(_("<<<NOT-FOUND>>>")); 5482b15cb3dSCy Schubert 5492b15cb3dSCy Schubert /* referenced via genshelloptOptions.pzShortUsage */ 5502b15cb3dSCy Schubert puts(_("<<<NOT-FOUND>>>")); 5512b15cb3dSCy Schubert /* LIBOPTS-MESSAGES: */ 5522b15cb3dSCy Schubert #line 67 "../autoopts.c" 5532b15cb3dSCy Schubert puts(_("allocation of %d bytes failed\n")); 5542b15cb3dSCy Schubert #line 93 "../autoopts.c" 5552b15cb3dSCy Schubert puts(_("allocation of %d bytes failed\n")); 5562b15cb3dSCy Schubert #line 53 "../init.c" 5572b15cb3dSCy Schubert puts(_("AutoOpts function called without option descriptor\n")); 558*276da39aSCy Schubert #line 86 "../init.c" 5592b15cb3dSCy Schubert puts(_("\tThis exceeds the compiled library version: ")); 560*276da39aSCy Schubert #line 84 "../init.c" 5612b15cb3dSCy Schubert puts(_("Automated Options Processing Error!\n" 5622b15cb3dSCy Schubert "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); 5632b15cb3dSCy Schubert #line 80 "../autoopts.c" 5642b15cb3dSCy Schubert puts(_("realloc of %d bytes at 0x%p failed\n")); 565*276da39aSCy Schubert #line 88 "../init.c" 5662b15cb3dSCy Schubert puts(_("\tThis is less than the minimum library version: ")); 5672b15cb3dSCy Schubert #line 121 "../version.c" 5682b15cb3dSCy Schubert puts(_("Automated Options version %s\n" 5692b15cb3dSCy Schubert "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n")); 570*276da39aSCy Schubert #line 87 "../makeshell.c" 5712b15cb3dSCy Schubert puts(_("(AutoOpts bug): %s.\n")); 5722b15cb3dSCy Schubert #line 90 "../reset.c" 5732b15cb3dSCy Schubert puts(_("optionResetOpt() called, but reset-option not configured")); 5742b15cb3dSCy Schubert #line 292 "../usage.c" 5752b15cb3dSCy Schubert puts(_("could not locate the 'help' option")); 5762b15cb3dSCy Schubert #line 336 "../autoopts.c" 5772b15cb3dSCy Schubert puts(_("optionProcess() was called with invalid data")); 5782b15cb3dSCy Schubert #line 748 "../usage.c" 5792b15cb3dSCy Schubert puts(_("invalid argument type specified")); 5802b15cb3dSCy Schubert #line 598 "../find.c" 5812b15cb3dSCy Schubert puts(_("defaulted to option with optional arg")); 5822b15cb3dSCy Schubert #line 76 "../alias.c" 5832b15cb3dSCy Schubert puts(_("aliasing option is out of range.")); 5842b15cb3dSCy Schubert #line 234 "../enum.c" 5852b15cb3dSCy Schubert puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); 5862b15cb3dSCy Schubert #line 108 "../find.c" 5872b15cb3dSCy Schubert puts(_(" The following options match:\n")); 5882b15cb3dSCy Schubert #line 293 "../find.c" 5892b15cb3dSCy Schubert puts(_("%s: ambiguous option name: %s (matches %d options)\n")); 5902b15cb3dSCy Schubert #line 161 "../check.c" 5912b15cb3dSCy Schubert puts(_("%s: Command line arguments required\n")); 5922b15cb3dSCy Schubert #line 43 "../alias.c" 5932b15cb3dSCy Schubert puts(_("%d %s%s options allowed\n")); 594*276da39aSCy Schubert #line 94 "../makeshell.c" 5952b15cb3dSCy Schubert puts(_("%s error %d (%s) calling %s for '%s'\n")); 596*276da39aSCy Schubert #line 306 "../makeshell.c" 5972b15cb3dSCy Schubert puts(_("interprocess pipe")); 5982b15cb3dSCy Schubert #line 168 "../version.c" 5992b15cb3dSCy Schubert puts(_("error: version option argument '%c' invalid. Use:\n" 6002b15cb3dSCy Schubert "\t'v' - version only\n" 6012b15cb3dSCy Schubert "\t'c' - version and copyright\n" 6022b15cb3dSCy Schubert "\t'n' - version and full copyright notice\n")); 6032b15cb3dSCy Schubert #line 58 "../check.c" 6042b15cb3dSCy Schubert puts(_("%s error: the '%s' and '%s' options conflict\n")); 6052b15cb3dSCy Schubert #line 217 "../find.c" 6062b15cb3dSCy Schubert puts(_("%s: The '%s' option has been disabled.")); 6072b15cb3dSCy Schubert #line 430 "../find.c" 6082b15cb3dSCy Schubert puts(_("%s: The '%s' option has been disabled.")); 6092b15cb3dSCy Schubert #line 38 "../alias.c" 6102b15cb3dSCy Schubert puts(_("-equivalence")); 6112b15cb3dSCy Schubert #line 469 "../find.c" 6122b15cb3dSCy Schubert puts(_("%s: illegal option -- %c\n")); 6132b15cb3dSCy Schubert #line 110 "../reset.c" 6142b15cb3dSCy Schubert puts(_("%s: illegal option -- %c\n")); 6152b15cb3dSCy Schubert #line 271 "../find.c" 6162b15cb3dSCy Schubert puts(_("%s: illegal option -- %s\n")); 6172b15cb3dSCy Schubert #line 755 "../find.c" 6182b15cb3dSCy Schubert puts(_("%s: illegal option -- %s\n")); 6192b15cb3dSCy Schubert #line 118 "../reset.c" 6202b15cb3dSCy Schubert puts(_("%s: illegal option -- %s\n")); 6212b15cb3dSCy Schubert #line 335 "../find.c" 6222b15cb3dSCy Schubert puts(_("%s: unknown vendor extension option -- %s\n")); 6232b15cb3dSCy Schubert #line 159 "../enum.c" 6242b15cb3dSCy Schubert puts(_(" or an integer from %d through %d\n")); 6252b15cb3dSCy Schubert #line 169 "../enum.c" 6262b15cb3dSCy Schubert puts(_(" or an integer from %d through %d\n")); 6272b15cb3dSCy Schubert #line 747 "../usage.c" 6282b15cb3dSCy Schubert puts(_("%s error: invalid option descriptor for %s\n")); 6292b15cb3dSCy Schubert #line 1081 "../usage.c" 6302b15cb3dSCy Schubert puts(_("%s error: invalid option descriptor for %s\n")); 6312b15cb3dSCy Schubert #line 385 "../find.c" 6322b15cb3dSCy Schubert puts(_("%s: invalid option name: %s\n")); 6332b15cb3dSCy Schubert #line 527 "../find.c" 6342b15cb3dSCy Schubert puts(_("%s: The '%s' option requires an argument.\n")); 6352b15cb3dSCy Schubert #line 156 "../autoopts.c" 6362b15cb3dSCy Schubert puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" 6372b15cb3dSCy Schubert "\t'%s' and '%s'.")); 6382b15cb3dSCy Schubert #line 94 "../check.c" 6392b15cb3dSCy Schubert puts(_("%s error: The %s option is required\n")); 6402b15cb3dSCy Schubert #line 632 "../find.c" 6412b15cb3dSCy Schubert puts(_("%s: The '%s' option cannot have an argument.\n")); 6422b15cb3dSCy Schubert #line 151 "../check.c" 6432b15cb3dSCy Schubert puts(_("%s: Command line arguments are not allowed.\n")); 6442b15cb3dSCy Schubert #line 535 "../save.c" 6452b15cb3dSCy Schubert puts(_("error %d (%s) creating %s\n")); 6462b15cb3dSCy Schubert #line 234 "../enum.c" 6472b15cb3dSCy Schubert puts(_("%s error: '%s' does not match any %s keywords.\n")); 6482b15cb3dSCy Schubert #line 93 "../reset.c" 6492b15cb3dSCy Schubert puts(_("%s error: The '%s' option requires an argument.\n")); 6502b15cb3dSCy Schubert #line 184 "../save.c" 6512b15cb3dSCy Schubert puts(_("error %d (%s) stat-ing %s\n")); 6522b15cb3dSCy Schubert #line 238 "../save.c" 6532b15cb3dSCy Schubert puts(_("error %d (%s) stat-ing %s\n")); 6542b15cb3dSCy Schubert #line 143 "../restore.c" 6552b15cb3dSCy Schubert puts(_("%s error: no saved option state\n")); 6562b15cb3dSCy Schubert #line 231 "../autoopts.c" 6572b15cb3dSCy Schubert puts(_("'%s' is not a command line option.\n")); 6582b15cb3dSCy Schubert #line 111 "../time.c" 6592b15cb3dSCy Schubert puts(_("%s error: '%s' is not a recognizable date/time.\n")); 6602b15cb3dSCy Schubert #line 132 "../save.c" 6612b15cb3dSCy Schubert puts(_("'%s' not defined\n")); 6622b15cb3dSCy Schubert #line 50 "../time.c" 6632b15cb3dSCy Schubert puts(_("%s error: '%s' is not a recognizable time duration.\n")); 6642b15cb3dSCy Schubert #line 92 "../check.c" 6652b15cb3dSCy Schubert puts(_("%s error: The %s option must appear %d times.\n")); 6662b15cb3dSCy Schubert #line 164 "../numeric.c" 6672b15cb3dSCy Schubert puts(_("%s error: '%s' is not a recognizable number.\n")); 6682b15cb3dSCy Schubert #line 200 "../enum.c" 6692b15cb3dSCy Schubert puts(_("%s error: %s exceeds %s keyword count\n")); 6702b15cb3dSCy Schubert #line 330 "../usage.c" 6712b15cb3dSCy Schubert puts(_("Try '%s %s' for more information.\n")); 6722b15cb3dSCy Schubert #line 45 "../alias.c" 6732b15cb3dSCy Schubert puts(_("one %s%s option allowed\n")); 674*276da39aSCy Schubert #line 208 "../makeshell.c" 6752b15cb3dSCy Schubert puts(_("standard output")); 676*276da39aSCy Schubert #line 943 "../makeshell.c" 6772b15cb3dSCy Schubert puts(_("standard output")); 6782b15cb3dSCy Schubert #line 274 "../usage.c" 6792b15cb3dSCy Schubert puts(_("standard output")); 6802b15cb3dSCy Schubert #line 415 "../usage.c" 6812b15cb3dSCy Schubert puts(_("standard output")); 6822b15cb3dSCy Schubert #line 625 "../usage.c" 6832b15cb3dSCy Schubert puts(_("standard output")); 6842b15cb3dSCy Schubert #line 175 "../version.c" 6852b15cb3dSCy Schubert puts(_("standard output")); 6862b15cb3dSCy Schubert #line 274 "../usage.c" 6872b15cb3dSCy Schubert puts(_("standard error")); 6882b15cb3dSCy Schubert #line 415 "../usage.c" 6892b15cb3dSCy Schubert puts(_("standard error")); 6902b15cb3dSCy Schubert #line 625 "../usage.c" 6912b15cb3dSCy Schubert puts(_("standard error")); 6922b15cb3dSCy Schubert #line 175 "../version.c" 6932b15cb3dSCy Schubert puts(_("standard error")); 694*276da39aSCy Schubert #line 208 "../makeshell.c" 6952b15cb3dSCy Schubert puts(_("write")); 696*276da39aSCy Schubert #line 943 "../makeshell.c" 6972b15cb3dSCy Schubert puts(_("write")); 6982b15cb3dSCy Schubert #line 273 "../usage.c" 6992b15cb3dSCy Schubert puts(_("write")); 7002b15cb3dSCy Schubert #line 414 "../usage.c" 7012b15cb3dSCy Schubert puts(_("write")); 7022b15cb3dSCy Schubert #line 624 "../usage.c" 7032b15cb3dSCy Schubert puts(_("write")); 7042b15cb3dSCy Schubert #line 174 "../version.c" 7052b15cb3dSCy Schubert puts(_("write")); 7062b15cb3dSCy Schubert #line 60 "../numeric.c" 7072b15cb3dSCy Schubert puts(_("%s error: %s option value %ld is out of range.\n")); 7082b15cb3dSCy Schubert #line 44 "../check.c" 7092b15cb3dSCy Schubert puts(_("%s error: %s option requires the %s option\n")); 7102b15cb3dSCy Schubert #line 131 "../save.c" 7112b15cb3dSCy Schubert puts(_("%s warning: cannot save options - %s not regular file\n")); 7122b15cb3dSCy Schubert #line 183 "../save.c" 7132b15cb3dSCy Schubert puts(_("%s warning: cannot save options - %s not regular file\n")); 7142b15cb3dSCy Schubert #line 237 "../save.c" 7152b15cb3dSCy Schubert puts(_("%s warning: cannot save options - %s not regular file\n")); 7162b15cb3dSCy Schubert #line 256 "../save.c" 7172b15cb3dSCy Schubert puts(_("%s warning: cannot save options - %s not regular file\n")); 7182b15cb3dSCy Schubert #line 534 "../save.c" 7192b15cb3dSCy Schubert puts(_("%s warning: cannot save options - %s not regular file\n")); 7202b15cb3dSCy Schubert /* END-LIBOPTS-MESSAGES */ 7212b15cb3dSCy Schubert 7222b15cb3dSCy Schubert /* USAGE-TEXT: */ 7232b15cb3dSCy Schubert #line 873 "../usage.c" 7242b15cb3dSCy Schubert puts(_("\t\t\t\t- an alternate for '%s'\n")); 7252b15cb3dSCy Schubert #line 1148 "../usage.c" 7262b15cb3dSCy Schubert puts(_("Version, usage and configuration options:")); 7272b15cb3dSCy Schubert #line 924 "../usage.c" 7282b15cb3dSCy Schubert puts(_("\t\t\t\t- default option for unnamed options\n")); 7292b15cb3dSCy Schubert #line 837 "../usage.c" 7302b15cb3dSCy Schubert puts(_("\t\t\t\t- disabled as '--%s'\n")); 7312b15cb3dSCy Schubert #line 1117 "../usage.c" 7322b15cb3dSCy Schubert puts(_(" --- %-14s %s\n")); 7332b15cb3dSCy Schubert #line 1115 "../usage.c" 7342b15cb3dSCy Schubert puts(_("This option has been disabled")); 7352b15cb3dSCy Schubert #line 864 "../usage.c" 7362b15cb3dSCy Schubert puts(_("\t\t\t\t- enabled by default\n")); 7372b15cb3dSCy Schubert #line 40 "../alias.c" 7382b15cb3dSCy Schubert puts(_("%s error: only ")); 7392b15cb3dSCy Schubert #line 1194 "../usage.c" 7402b15cb3dSCy Schubert puts(_(" - examining environment variables named %s_*\n")); 7412b15cb3dSCy Schubert #line 168 "../file.c" 7422b15cb3dSCy Schubert puts(_("\t\t\t\t- file must not pre-exist\n")); 7432b15cb3dSCy Schubert #line 172 "../file.c" 7442b15cb3dSCy Schubert puts(_("\t\t\t\t- file must pre-exist\n")); 7452b15cb3dSCy Schubert #line 380 "../usage.c" 7462b15cb3dSCy Schubert puts(_("Options are specified by doubled hyphens and their name or by a single\n" 7472b15cb3dSCy Schubert "hyphen and the flag character.\n")); 748*276da39aSCy Schubert #line 921 "../makeshell.c" 7492b15cb3dSCy Schubert puts(_("\n" 7502b15cb3dSCy Schubert "= = = = = = = =\n\n" 7512b15cb3dSCy Schubert "This incarnation of genshell will produce\n" 7522b15cb3dSCy Schubert "a shell script to parse the options for %s:\n\n")); 7532b15cb3dSCy Schubert #line 166 "../enum.c" 7542b15cb3dSCy Schubert puts(_(" or an integer mask with any of the lower %d bits set\n")); 7552b15cb3dSCy Schubert #line 897 "../usage.c" 7562b15cb3dSCy Schubert puts(_("\t\t\t\t- is a set membership option\n")); 7572b15cb3dSCy Schubert #line 918 "../usage.c" 7582b15cb3dSCy Schubert puts(_("\t\t\t\t- must appear between %d and %d times\n")); 7592b15cb3dSCy Schubert #line 382 "../usage.c" 7602b15cb3dSCy Schubert puts(_("Options are specified by single or double hyphens and their name.\n")); 7612b15cb3dSCy Schubert #line 904 "../usage.c" 7622b15cb3dSCy Schubert puts(_("\t\t\t\t- may appear multiple times\n")); 7632b15cb3dSCy Schubert #line 891 "../usage.c" 7642b15cb3dSCy Schubert puts(_("\t\t\t\t- may not be preset\n")); 7652b15cb3dSCy Schubert #line 1309 "../usage.c" 7662b15cb3dSCy Schubert puts(_(" Arg Option-Name Description\n")); 7672b15cb3dSCy Schubert #line 1245 "../usage.c" 7682b15cb3dSCy Schubert puts(_(" Flg Arg Option-Name Description\n")); 7692b15cb3dSCy Schubert #line 1303 "../usage.c" 7702b15cb3dSCy Schubert puts(_(" Flg Arg Option-Name Description\n")); 7712b15cb3dSCy Schubert #line 1304 "../usage.c" 7722b15cb3dSCy Schubert puts(_(" %3s %s")); 7732b15cb3dSCy Schubert #line 1310 "../usage.c" 7742b15cb3dSCy Schubert puts(_(" %3s %s")); 7752b15cb3dSCy Schubert #line 387 "../usage.c" 7762b15cb3dSCy Schubert puts(_("The '-#<number>' option may omit the hash char\n")); 7772b15cb3dSCy Schubert #line 383 "../usage.c" 7782b15cb3dSCy Schubert puts(_("All arguments are named options.\n")); 7792b15cb3dSCy Schubert #line 971 "../usage.c" 7802b15cb3dSCy Schubert puts(_(" - reading file %s")); 7812b15cb3dSCy Schubert #line 409 "../usage.c" 7822b15cb3dSCy Schubert puts(_("\n" 7832b15cb3dSCy Schubert "Please send bug reports to: <%s>\n")); 7842b15cb3dSCy Schubert #line 100 "../version.c" 7852b15cb3dSCy Schubert puts(_("\n" 7862b15cb3dSCy Schubert "Please send bug reports to: <%s>\n")); 7872b15cb3dSCy Schubert #line 129 "../version.c" 7882b15cb3dSCy Schubert puts(_("\n" 7892b15cb3dSCy Schubert "Please send bug reports to: <%s>\n")); 7902b15cb3dSCy Schubert #line 903 "../usage.c" 7912b15cb3dSCy Schubert puts(_("\t\t\t\t- may NOT appear - preset only\n")); 7922b15cb3dSCy Schubert #line 944 "../usage.c" 7932b15cb3dSCy Schubert puts(_("\n" 7942b15cb3dSCy Schubert "The following option preset mechanisms are supported:\n")); 7952b15cb3dSCy Schubert #line 1192 "../usage.c" 7962b15cb3dSCy Schubert puts(_("\n" 7972b15cb3dSCy Schubert "The following option preset mechanisms are supported:\n")); 7982b15cb3dSCy Schubert #line 682 "../usage.c" 7992b15cb3dSCy Schubert puts(_("prohibits these options:\n")); 8002b15cb3dSCy Schubert #line 677 "../usage.c" 8012b15cb3dSCy Schubert puts(_("prohibits the option '%s'\n")); 8022b15cb3dSCy Schubert #line 81 "../numeric.c" 8032b15cb3dSCy Schubert puts(_("%s%ld to %ld")); 8042b15cb3dSCy Schubert #line 79 "../numeric.c" 8052b15cb3dSCy Schubert puts(_("%sgreater than or equal to %ld")); 8062b15cb3dSCy Schubert #line 75 "../numeric.c" 8072b15cb3dSCy Schubert puts(_("%s%ld exactly")); 8082b15cb3dSCy Schubert #line 68 "../numeric.c" 8092b15cb3dSCy Schubert puts(_("%sit must lie in one of the ranges:\n")); 8102b15cb3dSCy Schubert #line 68 "../numeric.c" 8112b15cb3dSCy Schubert puts(_("%sit must be in the range:\n")); 8122b15cb3dSCy Schubert #line 88 "../numeric.c" 8132b15cb3dSCy Schubert puts(_(", or\n")); 8142b15cb3dSCy Schubert #line 66 "../numeric.c" 8152b15cb3dSCy Schubert puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); 8162b15cb3dSCy Schubert #line 77 "../numeric.c" 8172b15cb3dSCy Schubert puts(_("%sless than or equal to %ld")); 8182b15cb3dSCy Schubert #line 390 "../usage.c" 8192b15cb3dSCy Schubert puts(_("Operands and options may be intermixed. They will be reordered.\n")); 8202b15cb3dSCy Schubert #line 652 "../usage.c" 8212b15cb3dSCy Schubert puts(_("requires the option '%s'\n")); 8222b15cb3dSCy Schubert #line 655 "../usage.c" 8232b15cb3dSCy Schubert puts(_("requires these options:\n")); 8242b15cb3dSCy Schubert #line 1321 "../usage.c" 8252b15cb3dSCy Schubert puts(_(" Arg Option-Name Req? Description\n")); 8262b15cb3dSCy Schubert #line 1315 "../usage.c" 8272b15cb3dSCy Schubert puts(_(" Flg Arg Option-Name Req? Description\n")); 8282b15cb3dSCy Schubert #line 167 "../enum.c" 8292b15cb3dSCy Schubert puts(_("or you may use a numeric representation. Preceding these with a '!'\n" 8302b15cb3dSCy Schubert "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" 8312b15cb3dSCy Schubert "will set them all. Multiple entries may be passed as an option\n" 8322b15cb3dSCy Schubert "argument list.\n")); 8332b15cb3dSCy Schubert #line 910 "../usage.c" 8342b15cb3dSCy Schubert puts(_("\t\t\t\t- may appear up to %d times\n")); 8352b15cb3dSCy Schubert #line 77 "../enum.c" 8362b15cb3dSCy Schubert puts(_("The valid \"%s\" option keywords are:\n")); 8372b15cb3dSCy Schubert #line 1152 "../usage.c" 8382b15cb3dSCy Schubert puts(_("The next option supports vendor supported extra options:")); 8392b15cb3dSCy Schubert #line 773 "../usage.c" 8402b15cb3dSCy Schubert puts(_("These additional options are:")); 8412b15cb3dSCy Schubert /* END-USAGE-TEXT */ 8422b15cb3dSCy Schubert } 8432b15cb3dSCy Schubert #endif /* uncompilable code */ 844ea906c41SOllivier Robert #ifdef __cplusplus 845ea906c41SOllivier Robert } 846ea906c41SOllivier Robert #endif 847ea906c41SOllivier Robert /* genshell.c ends here */ 848