|
Packit |
aea12f |
/* -*- buffer-read-only: t -*- vi: set ro:
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* DO NOT EDIT THIS FILE (genshell.c)
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* It has been AutoGen-ed
|
|
Packit |
aea12f |
* From the definitions genshell.def
|
|
Packit |
aea12f |
* and the template file options
|
|
Packit |
aea12f |
*
|
|
Packit Service |
991b93 |
* Generated from AutoOpts 42:1:17 templates.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* AutoOpts is a copyrighted work. This source file is not encumbered
|
|
Packit |
aea12f |
* by AutoOpts licensing, but is provided under the licensing terms chosen
|
|
Packit |
aea12f |
* by the genshellopt author or copyright holder. AutoOpts is
|
|
Packit |
aea12f |
* licensed under the terms of the LGPL. The redistributable library
|
|
Packit |
aea12f |
* (``libopts'') is licensed under the terms of either the LGPL or, at the
|
|
Packit |
aea12f |
* users discretion, the BSD license. See the AutoOpts and/or libopts sources
|
|
Packit |
aea12f |
* for details.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* The genshellopt program is copyrighted and licensed
|
|
Packit |
aea12f |
* under the following terms:
|
|
Packit |
aea12f |
*
|
|
Packit Service |
991b93 |
* Copyright (C) 1999-2018 Bruce Korb, all rights reserved.
|
|
Packit |
aea12f |
* This is free software. It is licensed for use, modification and
|
|
Packit |
aea12f |
* redistribution under the terms of the GNU Lesser General Public License,
|
|
Packit Service |
991b93 |
* version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* The genshellopt library is free software; you can redistribute it and/or
|
|
Packit |
aea12f |
* modify it under the terms of the GNU Library General Public License as
|
|
Packit |
aea12f |
* published by the Free Software Foundation; either version 2 of the
|
|
Packit |
aea12f |
* License, or (at your option) any later version.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* This library is distributed in the hope that it will be useful, but
|
|
Packit |
aea12f |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
aea12f |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
aea12f |
* Library General Public License for more details.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
aea12f |
* License along with this library; if not, see
|
|
Packit Service |
991b93 |
* <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#ifndef __doxygen__
|
|
Packit |
aea12f |
#define OPTION_CODE_COMPILE 1
|
|
Packit |
aea12f |
#include "genshell.h"
|
|
Packit |
aea12f |
#include <sys/types.h>
|
|
Packit Service |
991b93 |
#include <sys/stat.h>
|
|
Packit |
aea12f |
|
|
Packit Service |
991b93 |
#include <errno.h>
|
|
Packit Service |
991b93 |
#include <fcntl.h>
|
|
Packit |
aea12f |
#include <limits.h>
|
|
Packit |
aea12f |
#include <stdio.h>
|
|
Packit |
aea12f |
#include <stdlib.h>
|
|
Packit Service |
991b93 |
#include <string.h>
|
|
Packit Service |
991b93 |
#include <unistd.h>
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#ifdef __cplusplus
|
|
Packit |
aea12f |
extern "C" {
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
extern FILE * option_usage_fp;
|
|
Packit |
aea12f |
#define zCopyright (genshellopt_opt_strs+0)
|
|
Packit |
aea12f |
#define zLicenseDescrip (genshellopt_opt_strs+285)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
extern tUsageProc genshelloptUsage;
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#ifndef NULL
|
|
Packit |
aea12f |
# define NULL 0
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* static const strings for genshellopt options
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
static char const genshellopt_opt_strs[1769] =
|
|
Packit |
aea12f |
/* 0 */ "genshellopt 1\n"
|
|
Packit Service |
991b93 |
"Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n"
|
|
Packit |
aea12f |
"This is free software. It is licensed for use, modification and\n"
|
|
Packit |
aea12f |
"redistribution under the terms of the GNU Lesser General Public License,\n"
|
|
Packit Service |
991b93 |
"version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
|
|
Packit |
aea12f |
/* 285 */ "The genshellopt library is free software; you can redistribute it and/or\n"
|
|
Packit |
aea12f |
"modify it under the terms of the GNU Library General Public License as\n"
|
|
Packit |
aea12f |
"published by the Free Software Foundation; either version 2 of the License,\n"
|
|
Packit |
aea12f |
"or (at your option) any later version.\n\n"
|
|
Packit |
aea12f |
"This library is distributed in the hope that it will be useful, but WITHOUT\n"
|
|
Packit |
aea12f |
"ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n"
|
|
Packit |
aea12f |
"FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public\n"
|
|
Packit |
aea12f |
"License for more details.\n\n"
|
|
Packit |
aea12f |
"You should have received a copy of the GNU Library General Public License\n"
|
|
Packit |
aea12f |
"along with this library; if not, see\n"
|
|
Packit Service |
991b93 |
"<http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n\0"
|
|
Packit |
aea12f |
/* 957 */ "Output Script File\0"
|
|
Packit |
aea12f |
/* 976 */ "SCRIPT\0"
|
|
Packit |
aea12f |
/* 983 */ "script\0"
|
|
Packit |
aea12f |
/* 990 */ "Shell name (follows \"#!\" magic)\0"
|
|
Packit |
aea12f |
/* 1022 */ "SHELL\0"
|
|
Packit |
aea12f |
/* 1028 */ "no-shell\0"
|
|
Packit |
aea12f |
/* 1037 */ "no\0"
|
|
Packit |
aea12f |
/* 1040 */ "display extended usage information and exit\0"
|
|
Packit |
aea12f |
/* 1084 */ "help\0"
|
|
Packit |
aea12f |
/* 1089 */ "extended usage information passed thru pager\0"
|
|
Packit |
aea12f |
/* 1134 */ "more-help\0"
|
|
Packit |
aea12f |
/* 1144 */ "output version information and exit\0"
|
|
Packit |
aea12f |
/* 1180 */ "version\0"
|
|
Packit |
aea12f |
/* 1188 */ "GENSHELLOPT\0"
|
|
Packit |
aea12f |
/* 1200 */ "genshellopt - Generate Shell Option Processing Script - Ver. 1\n"
|
|
Packit |
aea12f |
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
|
|
Packit |
aea12f |
/* 1321 */ "autogen-users@lists.sourceforge.net\0"
|
|
Packit |
aea12f |
/* 1357 */ "Note that 'shell' is only useful if the output file does not already exist.\n"
|
|
Packit |
aea12f |
"If it does, then the shell name and optional first argument will be\n"
|
|
Packit |
aea12f |
"extracted from the script file.\n\0"
|
|
Packit |
aea12f |
/* 1534 */ "If the script file already exists and contains Automated Option Processing\n"
|
|
Packit |
aea12f |
"text, the second line of the file through the ending tag will be replaced\n"
|
|
Packit |
aea12f |
"by the newly generated text. The first '#!' line will be regenerated.\n\0"
|
|
Packit |
aea12f |
/* 1755 */ "genshellopt 1";
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* script option description:
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
/** Descriptive text for the script option */
|
|
Packit |
aea12f |
#define SCRIPT_DESC (genshellopt_opt_strs+957)
|
|
Packit |
aea12f |
/** Upper-cased name for the script option */
|
|
Packit |
aea12f |
#define SCRIPT_NAME (genshellopt_opt_strs+976)
|
|
Packit |
aea12f |
/** Name string for the script option */
|
|
Packit |
aea12f |
#define SCRIPT_name (genshellopt_opt_strs+983)
|
|
Packit |
aea12f |
/** Compiled in flag settings for the script option */
|
|
Packit |
aea12f |
#define SCRIPT_FLAGS (OPTST_DISABLED \
|
|
Packit |
aea12f |
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* shell option description:
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
/** Descriptive text for the shell option */
|
|
Packit |
aea12f |
#define SHELL_DESC (genshellopt_opt_strs+990)
|
|
Packit |
aea12f |
/** Upper-cased name for the shell option */
|
|
Packit |
aea12f |
#define SHELL_NAME (genshellopt_opt_strs+1022)
|
|
Packit |
aea12f |
/** disablement name for the shell option */
|
|
Packit |
aea12f |
#define NOT_SHELL_name (genshellopt_opt_strs+1028)
|
|
Packit |
aea12f |
/** disablement prefix for the shell option */
|
|
Packit |
aea12f |
#define NOT_SHELL_PFX (genshellopt_opt_strs+1037)
|
|
Packit |
aea12f |
/** Name string for the shell option */
|
|
Packit |
aea12f |
#define SHELL_name (NOT_SHELL_name + 3)
|
|
Packit |
aea12f |
/** Compiled in flag settings for the shell option */
|
|
Packit |
aea12f |
#define SHELL_FLAGS (OPTST_INITENABLED \
|
|
Packit |
aea12f |
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/*
|
|
Packit |
aea12f |
* Help/More_Help/Version option descriptions:
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
#define HELP_DESC (genshellopt_opt_strs+1040)
|
|
Packit |
aea12f |
#define HELP_name (genshellopt_opt_strs+1084)
|
|
Packit |
aea12f |
#ifdef HAVE_WORKING_FORK
|
|
Packit |
aea12f |
#define MORE_HELP_DESC (genshellopt_opt_strs+1089)
|
|
Packit |
aea12f |
#define MORE_HELP_name (genshellopt_opt_strs+1134)
|
|
Packit |
aea12f |
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
|
|
Packit |
aea12f |
#else
|
|
Packit |
aea12f |
#define MORE_HELP_DESC HELP_DESC
|
|
Packit |
aea12f |
#define MORE_HELP_name HELP_name
|
|
Packit |
aea12f |
#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
#ifdef NO_OPTIONAL_OPT_ARGS
|
|
Packit |
aea12f |
# define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT)
|
|
Packit |
aea12f |
#else
|
|
Packit |
aea12f |
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
|
|
Packit |
aea12f |
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
#define VER_DESC (genshellopt_opt_strs+1144)
|
|
Packit |
aea12f |
#define VER_name (genshellopt_opt_strs+1180)
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* Declare option callback procedures
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
extern tOptProc
|
|
Packit |
aea12f |
optionBooleanVal, optionNestedVal, optionNumericVal,
|
|
Packit |
aea12f |
optionPagedUsage, optionPrintVersion, optionResetOpt,
|
|
Packit |
aea12f |
optionStackArg, optionTimeDate, optionTimeVal,
|
|
Packit |
aea12f |
optionUnstackArg, optionVendorOption;
|
|
Packit |
aea12f |
static tOptProc
|
|
Packit |
aea12f |
doUsageOpt;
|
|
Packit |
aea12f |
#define VER_PROC optionPrintVersion
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* Define the genshellopt Option Descriptions.
|
|
Packit |
aea12f |
* This is an array of GENSHELL_OPTION_CT entries, one for each
|
|
Packit |
aea12f |
* option that the genshellopt program responds to.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
|
|
Packit |
aea12f |
{ /* entry idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT,
|
|
Packit |
aea12f |
/* equiv idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT,
|
|
Packit |
aea12f |
/* equivalenced to */ NO_EQUIVALENT,
|
|
Packit |
aea12f |
/* min, max, act ct */ 0, 1, 0,
|
|
Packit |
aea12f |
/* opt state flags */ SCRIPT_FLAGS, 0,
|
|
Packit |
aea12f |
/* last opt argumnt */ { NULL }, /* --script */
|
|
Packit |
aea12f |
/* arg list/cookie */ NULL,
|
|
Packit |
aea12f |
/* must/cannot opts */ NULL, NULL,
|
|
Packit |
aea12f |
/* option proc */ NULL,
|
|
Packit |
aea12f |
/* desc, NAME, name */ SCRIPT_DESC, SCRIPT_NAME, SCRIPT_name,
|
|
Packit |
aea12f |
/* disablement strs */ NULL, NULL },
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
{ /* entry idx, value */ 1, VALUE_GENSHELL_OPT_SHELL,
|
|
Packit |
aea12f |
/* equiv idx, value */ 1, VALUE_GENSHELL_OPT_SHELL,
|
|
Packit |
aea12f |
/* equivalenced to */ NO_EQUIVALENT,
|
|
Packit |
aea12f |
/* min, max, act ct */ 0, 1, 0,
|
|
Packit |
aea12f |
/* opt state flags */ SHELL_FLAGS, 0,
|
|
Packit |
aea12f |
/* last opt argumnt */ { NULL }, /* --shell */
|
|
Packit |
aea12f |
/* arg list/cookie */ NULL,
|
|
Packit |
aea12f |
/* must/cannot opts */ NULL, NULL,
|
|
Packit |
aea12f |
/* option proc */ NULL,
|
|
Packit |
aea12f |
/* desc, NAME, name */ SHELL_DESC, SHELL_NAME, SHELL_name,
|
|
Packit |
aea12f |
/* disablement strs */ NOT_SHELL_name, NOT_SHELL_PFX },
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
{ /* entry idx, value */ INDEX_GENSHELL_OPT_VERSION, VALUE_GENSHELL_OPT_VERSION,
|
|
Packit |
aea12f |
/* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_VERSION,
|
|
Packit |
aea12f |
/* equivalenced to */ NO_EQUIVALENT,
|
|
Packit |
aea12f |
/* min, max, act ct */ 0, 1, 0,
|
|
Packit |
aea12f |
/* opt state flags */ VER_FLAGS, AOUSE_VERSION,
|
|
Packit |
aea12f |
/* last opt argumnt */ { NULL },
|
|
Packit |
aea12f |
/* arg list/cookie */ NULL,
|
|
Packit |
aea12f |
/* must/cannot opts */ NULL, NULL,
|
|
Packit |
aea12f |
/* option proc */ VER_PROC,
|
|
Packit |
aea12f |
/* desc, NAME, name */ VER_DESC, NULL, VER_name,
|
|
Packit |
aea12f |
/* disablement strs */ NULL, NULL },
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
{ /* entry idx, value */ INDEX_GENSHELL_OPT_HELP, VALUE_GENSHELL_OPT_HELP,
|
|
Packit |
aea12f |
/* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_HELP,
|
|
Packit |
aea12f |
/* equivalenced to */ NO_EQUIVALENT,
|
|
Packit |
aea12f |
/* min, max, act ct */ 0, 1, 0,
|
|
Packit |
aea12f |
/* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
|
|
Packit |
aea12f |
/* last opt argumnt */ { NULL },
|
|
Packit |
aea12f |
/* arg list/cookie */ NULL,
|
|
Packit |
aea12f |
/* must/cannot opts */ NULL, NULL,
|
|
Packit |
aea12f |
/* option proc */ doUsageOpt,
|
|
Packit |
aea12f |
/* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
|
|
Packit |
aea12f |
/* disablement strs */ NULL, NULL },
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
{ /* entry idx, value */ INDEX_GENSHELL_OPT_MORE_HELP, VALUE_GENSHELL_OPT_MORE_HELP,
|
|
Packit |
aea12f |
/* equiv idx value */ NO_EQUIVALENT, VALUE_GENSHELL_OPT_MORE_HELP,
|
|
Packit |
aea12f |
/* equivalenced to */ NO_EQUIVALENT,
|
|
Packit |
aea12f |
/* min, max, act ct */ 0, 1, 0,
|
|
Packit |
aea12f |
/* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
|
|
Packit |
aea12f |
/* last opt argumnt */ { NULL },
|
|
Packit |
aea12f |
/* arg list/cookie */ NULL,
|
|
Packit |
aea12f |
/* must/cannot opts */ NULL, NULL,
|
|
Packit |
aea12f |
/* option proc */ optionPagedUsage,
|
|
Packit |
aea12f |
/* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
|
|
Packit |
aea12f |
/* disablement strs */ NULL, NULL }
|
|
Packit |
aea12f |
};
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
Packit |
aea12f |
/** Reference to the upper cased version of genshellopt. */
|
|
Packit |
aea12f |
#define zPROGNAME (genshellopt_opt_strs+1188)
|
|
Packit |
aea12f |
/** Reference to the title line for genshellopt usage. */
|
|
Packit |
aea12f |
#define zUsageTitle (genshellopt_opt_strs+1200)
|
|
Packit |
aea12f |
/** There is no genshellopt configuration file. */
|
|
Packit |
aea12f |
#define zRcName NULL
|
|
Packit |
aea12f |
/** There are no directories to search for genshellopt config files. */
|
|
Packit |
aea12f |
#define apzHomeList NULL
|
|
Packit |
aea12f |
/** The genshellopt program bug email address. */
|
|
Packit |
aea12f |
#define zBugsAddr (genshellopt_opt_strs+1321)
|
|
Packit |
aea12f |
/** Clarification/explanation of what genshellopt does. */
|
|
Packit |
aea12f |
#define zExplain (genshellopt_opt_strs+1357)
|
|
Packit |
aea12f |
/** Extra detail explaining what genshellopt does. */
|
|
Packit |
aea12f |
#define zDetail (genshellopt_opt_strs+1534)
|
|
Packit |
aea12f |
/** The full version string for genshellopt. */
|
|
Packit |
aea12f |
#define zFullVersion (genshellopt_opt_strs+1755)
|
|
Packit Service |
991b93 |
/* extracted from optcode.tlib near line 342 */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#if defined(ENABLE_NLS)
|
|
Packit |
aea12f |
# define OPTPROC_BASE OPTPROC_TRANSLATE
|
|
Packit |
aea12f |
static tOptionXlateProc translate_option_strings;
|
|
Packit |
aea12f |
#else
|
|
Packit |
aea12f |
# define OPTPROC_BASE OPTPROC_NONE
|
|
Packit |
aea12f |
# define translate_option_strings NULL
|
|
Packit |
aea12f |
#endif /* ENABLE_NLS */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#define genshellopt_full_usage (NULL)
|
|
Packit |
aea12f |
#define genshellopt_short_usage (NULL)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#endif /* not defined __doxygen__ */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/*
|
|
Packit |
aea12f |
* Create the static procedure(s) declared above.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* The callout function that invokes the genshelloptUsage function.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* @param[in] opts the AutoOpts option description structure
|
|
Packit |
aea12f |
* @param[in] od the descriptor for the "help" (usage) option.
|
|
Packit |
aea12f |
* @noreturn
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
static void
|
|
Packit |
aea12f |
doUsageOpt(tOptions * opts, tOptDesc * od)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
int ex_code;
|
|
Packit |
aea12f |
ex_code = GENSHELLOPT_EXIT_SUCCESS;
|
|
Packit |
aea12f |
genshelloptUsage(&genshelloptOptions, ex_code);
|
|
Packit |
aea12f |
/* NOTREACHED */
|
|
Packit |
aea12f |
exit(GENSHELLOPT_EXIT_FAILURE);
|
|
Packit |
aea12f |
(void)opts;
|
|
Packit |
aea12f |
(void)od;
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
/* extracted from optmain.tlib near line 1250 */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* The directory containing the data associated with genshellopt.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
#ifndef PKGDATADIR
|
|
Packit |
aea12f |
# define PKGDATADIR ""
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* Information about the person or institution that packaged genshellopt
|
|
Packit |
aea12f |
* for the current distribution.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
#ifndef WITH_PACKAGER
|
|
Packit |
aea12f |
# define genshellopt_packager_info NULL
|
|
Packit |
aea12f |
#else
|
|
Packit |
aea12f |
/** Packager information for genshellopt. */
|
|
Packit |
aea12f |
static char const genshellopt_packager_info[] =
|
|
Packit |
aea12f |
"Packaged by " WITH_PACKAGER
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
# ifdef WITH_PACKAGER_VERSION
|
|
Packit |
aea12f |
" ("WITH_PACKAGER_VERSION")"
|
|
Packit |
aea12f |
# endif
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
# ifdef WITH_PACKAGER_BUG_REPORTS
|
|
Packit |
aea12f |
"\nReport genshellopt bugs to " WITH_PACKAGER_BUG_REPORTS
|
|
Packit |
aea12f |
# endif
|
|
Packit |
aea12f |
"\n";
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
#ifndef __doxygen__
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#endif /* __doxygen__ */
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* The option definitions for genshellopt. The one structure that
|
|
Packit |
aea12f |
* binds them all.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
tOptions genshelloptOptions = {
|
|
Packit |
aea12f |
OPTIONS_STRUCT_VERSION,
|
|
Packit |
aea12f |
0, NULL, /* original argc + argv */
|
|
Packit |
aea12f |
( OPTPROC_BASE
|
|
Packit |
aea12f |
+ OPTPROC_ERRSTOP
|
|
Packit |
aea12f |
+ OPTPROC_SHORTOPT
|
|
Packit |
aea12f |
+ OPTPROC_LONGOPT
|
|
Packit |
aea12f |
+ OPTPROC_NO_REQ_OPT
|
|
Packit |
aea12f |
+ OPTPROC_NEGATIONS
|
|
Packit |
aea12f |
+ OPTPROC_NO_ARGS ),
|
|
Packit |
aea12f |
0, NULL, /* current option index, current option */
|
|
Packit |
aea12f |
NULL, NULL, zPROGNAME,
|
|
Packit |
aea12f |
zRcName, zCopyright, zLicenseDescrip,
|
|
Packit |
aea12f |
zFullVersion, apzHomeList, zUsageTitle,
|
|
Packit |
aea12f |
zExplain, zDetail, optDesc,
|
|
Packit |
aea12f |
zBugsAddr, /* address to send bugs to */
|
|
Packit |
aea12f |
NULL, NULL, /* extensions/saved state */
|
|
Packit |
aea12f |
genshelloptUsage, /* usage procedure */
|
|
Packit |
aea12f |
translate_option_strings, /* translation procedure */
|
|
Packit |
aea12f |
/*
|
|
Packit |
aea12f |
* Indexes to special options
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
{ INDEX_GENSHELL_OPT_MORE_HELP, /* more-help option index */
|
|
Packit |
aea12f |
NO_EQUIVALENT, /* save option index */
|
|
Packit |
aea12f |
NO_EQUIVALENT, /* '-#' option index */
|
|
Packit |
aea12f |
NO_EQUIVALENT /* index of default opt */
|
|
Packit |
aea12f |
},
|
|
Packit |
aea12f |
5 /* full option count */, 2 /* user option count */,
|
|
Packit |
aea12f |
genshellopt_full_usage, genshellopt_short_usage,
|
|
Packit |
aea12f |
NULL, NULL,
|
|
Packit |
aea12f |
PKGDATADIR, genshellopt_packager_info
|
|
Packit |
aea12f |
};
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#if ENABLE_NLS
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* This code is designed to translate translatable option text for the
|
|
Packit |
aea12f |
* genshellopt program. These translations happen upon entry
|
|
Packit |
aea12f |
* to optionProcess().
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
#include <stdio.h>
|
|
Packit |
aea12f |
#include <stdlib.h>
|
|
Packit |
aea12f |
#include <string.h>
|
|
Packit |
aea12f |
#include <unistd.h>
|
|
Packit |
aea12f |
#ifdef HAVE_DCGETTEXT
|
|
Packit |
aea12f |
# include <gettext.h>
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
#include <autoopts/usage-txt.h>
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
static char * AO_gettext(char const * pz);
|
|
Packit |
aea12f |
static void coerce_it(void ** s);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* AutoGen specific wrapper function for gettext. It relies on the macro _()
|
|
Packit |
aea12f |
* to convert from English to the target language, then strdup-duplicates the
|
|
Packit |
aea12f |
* result string. It tries the "libopts" domain first, then whatever has been
|
|
Packit |
aea12f |
* set via the \a textdomain(3) call.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* @param[in] pz the input text used as a lookup key.
|
|
Packit |
aea12f |
* @returns the translated text (if there is one),
|
|
Packit |
aea12f |
* or the original text (if not).
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
static char *
|
|
Packit |
aea12f |
AO_gettext(char const * pz)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
char * res;
|
|
Packit |
aea12f |
if (pz == NULL)
|
|
Packit |
aea12f |
return NULL;
|
|
Packit |
aea12f |
#ifdef HAVE_DCGETTEXT
|
|
Packit |
aea12f |
/*
|
|
Packit |
aea12f |
* While processing the option_xlateable_txt data, try to use the
|
|
Packit |
aea12f |
* "libopts" domain. Once we switch to the option descriptor data,
|
|
Packit |
aea12f |
* do *not* use that domain.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
if (option_xlateable_txt.field_ct != 0) {
|
|
Packit |
aea12f |
res = dgettext("libopts", pz);
|
|
Packit |
aea12f |
if (res == pz)
|
|
Packit |
aea12f |
res = (char *)VOIDP(_(pz));
|
|
Packit |
aea12f |
} else
|
|
Packit |
aea12f |
res = (char *)VOIDP(_(pz));
|
|
Packit |
aea12f |
#else
|
|
Packit |
aea12f |
res = (char *)VOIDP(_(pz));
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
if (res == pz)
|
|
Packit |
aea12f |
return res;
|
|
Packit |
aea12f |
res = strdup(res);
|
|
Packit |
aea12f |
if (res == NULL) {
|
|
Packit |
aea12f |
fputs(_("No memory for duping translated strings\n"), stderr);
|
|
Packit |
aea12f |
exit(GENSHELLOPT_EXIT_FAILURE);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
return res;
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* All the pointers we use are marked "* const", but they are stored in
|
|
Packit |
aea12f |
* writable memory. Coerce the mutability and set the pointer.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
static void coerce_it(void ** s) { *s = AO_gettext(*s);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/**
|
|
Packit |
aea12f |
* Translate all the translatable strings in the genshelloptOptions
|
|
Packit |
aea12f |
* structure defined above. This is done only once.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
static void
|
|
Packit |
aea12f |
translate_option_strings(void)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
tOptions * const opts = &genshelloptOptions;
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/*
|
|
Packit |
aea12f |
* Guard against re-translation. It won't work. The strings will have
|
|
Packit |
aea12f |
* been changed by the first pass through this code. One shot only.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
if (option_xlateable_txt.field_ct != 0) {
|
|
Packit |
aea12f |
/*
|
|
Packit |
aea12f |
* Do the translations. The first pointer follows the field count
|
|
Packit |
aea12f |
* field. The field count field is the size of a pointer.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
|
|
Packit |
aea12f |
int ix = option_xlateable_txt.field_ct;
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
do {
|
|
Packit |
aea12f |
ppz++; /* skip over field_ct */
|
|
Packit |
aea12f |
*ppz = AO_gettext(*ppz);
|
|
Packit |
aea12f |
} while (--ix > 0);
|
|
Packit |
aea12f |
/* prevent re-translation and disable "libopts" domain lookup */
|
|
Packit |
aea12f |
option_xlateable_txt.field_ct = 0;
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
coerce_it(VOIDP(&(opts->pzCopyright)));
|
|
Packit |
aea12f |
coerce_it(VOIDP(&(opts->pzCopyNotice)));
|
|
Packit |
aea12f |
coerce_it(VOIDP(&(opts->pzFullVersion)));
|
|
Packit |
aea12f |
coerce_it(VOIDP(&(opts->pzUsageTitle)));
|
|
Packit |
aea12f |
coerce_it(VOIDP(&(opts->pzExplain)));
|
|
Packit |
aea12f |
coerce_it(VOIDP(&(opts->pzDetail)));
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
tOptDesc * od = opts->pOptDesc;
|
|
Packit |
aea12f |
for (ix = opts->optCt; ix > 0; ix--, od++)
|
|
Packit |
aea12f |
coerce_it(VOIDP(&(od->pzText)));
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
#endif /* ENABLE_NLS */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
|
|
Packit |
aea12f |
/** I18N function strictly for xgettext. Do not compile. */
|
|
Packit |
aea12f |
static void bogus_function(void) {
|
|
Packit |
aea12f |
/* TRANSLATORS:
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
The following dummy function was crated solely so that xgettext can
|
|
Packit |
aea12f |
extract the correct strings. These strings are actually referenced
|
|
Packit |
aea12f |
by a field name in the genshelloptOptions structure noted in the
|
|
Packit |
aea12f |
comments below. The literal text is defined in genshellopt_opt_strs.
|
|
Packit Service |
991b93 |
|
|
Packit |
aea12f |
NOTE: the strings below are segmented with respect to the source string
|
|
Packit |
aea12f |
genshellopt_opt_strs. The strings above are handed off for translation
|
|
Packit |
aea12f |
at run time a paragraph at a time. Consequently, they are presented here
|
|
Packit |
aea12f |
for translation a paragraph at a time.
|
|
Packit Service |
991b93 |
|
|
Packit |
aea12f |
ALSO: often the description for an option will reference another option
|
|
Packit |
aea12f |
by name. These are set off with apostrophe quotes (I hope). Do not
|
|
Packit |
aea12f |
translate option names.
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzCopyright */
|
|
Packit |
aea12f |
puts(_("genshellopt 1\n\
|
|
Packit Service |
991b93 |
Copyright (C) 1999-2018 Bruce Korb, all rights reserved.\n\
|
|
Packit |
aea12f |
This is free software. It is licensed for use, modification and\n\
|
|
Packit |
aea12f |
redistribution under the terms of the GNU Lesser General Public License,\n\
|
|
Packit Service |
991b93 |
version 2 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzCopyNotice */
|
|
Packit |
aea12f |
puts(_("The genshellopt library is free software; you can redistribute it and/or\n\
|
|
Packit |
aea12f |
modify it under the terms of the GNU Library General Public License as\n\
|
|
Packit |
aea12f |
published by the Free Software Foundation; either version 2 of the License,\n\
|
|
Packit |
aea12f |
or (at your option) any later version.\n\n"));
|
|
Packit |
aea12f |
puts(_("This library is distributed in the hope that it will be useful, but WITHOUT\n\
|
|
Packit |
aea12f |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n\
|
|
Packit |
aea12f |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public\n\
|
|
Packit |
aea12f |
License for more details.\n\n"));
|
|
Packit |
aea12f |
puts(_("You should have received a copy of the GNU Library General Public License\n\
|
|
Packit |
aea12f |
along with this library; if not, see\n\
|
|
Packit Service |
991b93 |
<http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html>\n"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pOptDesc->pzText */
|
|
Packit |
aea12f |
puts(_("Output Script File"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pOptDesc->pzText */
|
|
Packit |
aea12f |
puts(_("Shell name (follows \"#!\" magic)"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pOptDesc->pzText */
|
|
Packit |
aea12f |
puts(_("display extended usage information and exit"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pOptDesc->pzText */
|
|
Packit |
aea12f |
puts(_("extended usage information passed thru pager"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pOptDesc->pzText */
|
|
Packit |
aea12f |
puts(_("output version information and exit"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzUsageTitle */
|
|
Packit |
aea12f |
puts(_("genshellopt - Generate Shell Option Processing Script - Ver. 1\n\
|
|
Packit |
aea12f |
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzExplain */
|
|
Packit |
aea12f |
puts(_("Note that 'shell' is only useful if the output file does not already exist.\n\
|
|
Packit |
aea12f |
If it does, then the shell name and optional first argument will be\n\
|
|
Packit |
aea12f |
extracted from the script file.\n"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzDetail */
|
|
Packit |
aea12f |
puts(_("If the script file already exists and contains Automated Option Processing\n\
|
|
Packit |
aea12f |
text, the second line of the file through the ending tag will be replaced\n\
|
|
Packit |
aea12f |
by the newly generated text. The first '#!' line will be regenerated.\n"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzFullVersion */
|
|
Packit |
aea12f |
puts(_("genshellopt 1"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzFullUsage */
|
|
Packit |
aea12f |
puts(_("<<<NOT-FOUND>>>"));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* referenced via genshelloptOptions.pzShortUsage */
|
|
Packit |
aea12f |
puts(_("<<<NOT-FOUND>>>"));
|
|
Packit |
aea12f |
/* LIBOPTS-MESSAGES: */
|
|
Packit |
aea12f |
#line 67 "../autoopts.c"
|
|
Packit |
aea12f |
puts(_("allocation of %d bytes failed\n"));
|
|
Packit Service |
991b93 |
#line 89 "../autoopts.c"
|
|
Packit |
aea12f |
puts(_("allocation of %d bytes failed\n"));
|
|
Packit Service |
991b93 |
#line 48 "../init.c"
|
|
Packit |
aea12f |
puts(_("AutoOpts function called without option descriptor\n"));
|
|
Packit Service |
991b93 |
#line 81 "../init.c"
|
|
Packit |
aea12f |
puts(_("\tThis exceeds the compiled library version: "));
|
|
Packit Service |
991b93 |
#line 79 "../init.c"
|
|
Packit |
aea12f |
puts(_("Automated Options Processing Error!\n"
|
|
Packit |
aea12f |
"\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
|
|
Packit Service |
991b93 |
#line 78 "../autoopts.c"
|
|
Packit |
aea12f |
puts(_("realloc of %d bytes at 0x%p failed\n"));
|
|
Packit Service |
991b93 |
#line 83 "../init.c"
|
|
Packit |
aea12f |
puts(_("\tThis is less than the minimum library version: "));
|
|
Packit |
aea12f |
#line 121 "../version.c"
|
|
Packit |
aea12f |
puts(_("Automated Options version %s\n"
|
|
Packit Service |
991b93 |
"\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
|
|
Packit Service |
991b93 |
#line 49 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("(AutoOpts bug): %s.\n"));
|
|
Packit |
aea12f |
#line 90 "../reset.c"
|
|
Packit |
aea12f |
puts(_("optionResetOpt() called, but reset-option not configured"));
|
|
Packit Service |
991b93 |
#line 241 "../usage.c"
|
|
Packit |
aea12f |
puts(_("could not locate the 'help' option"));
|
|
Packit Service |
991b93 |
#line 330 "../autoopts.c"
|
|
Packit |
aea12f |
puts(_("optionProcess() was called with invalid data"));
|
|
Packit Service |
991b93 |
#line 697 "../usage.c"
|
|
Packit |
aea12f |
puts(_("invalid argument type specified"));
|
|
Packit Service |
991b93 |
#line 568 "../find.c"
|
|
Packit |
aea12f |
puts(_("defaulted to option with optional arg"));
|
|
Packit |
aea12f |
#line 76 "../alias.c"
|
|
Packit |
aea12f |
puts(_("aliasing option is out of range."));
|
|
Packit Service |
991b93 |
#line 210 "../enum.c"
|
|
Packit |
aea12f |
puts(_("%s error: the keyword '%s' is ambiguous for %s\n"));
|
|
Packit Service |
991b93 |
#line 78 "../find.c"
|
|
Packit |
aea12f |
puts(_(" The following options match:\n"));
|
|
Packit Service |
991b93 |
#line 263 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
|
|
Packit |
aea12f |
#line 161 "../check.c"
|
|
Packit |
aea12f |
puts(_("%s: Command line arguments required\n"));
|
|
Packit |
aea12f |
#line 43 "../alias.c"
|
|
Packit |
aea12f |
puts(_("%d %s%s options allowed\n"));
|
|
Packit Service |
991b93 |
#line 56 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("%s error %d (%s) calling %s for '%s'\n"));
|
|
Packit Service |
991b93 |
#line 268 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("interprocess pipe"));
|
|
Packit Service |
991b93 |
#line 171 "../version.c"
|
|
Packit |
aea12f |
puts(_("error: version option argument '%c' invalid. Use:\n"
|
|
Packit |
aea12f |
"\t'v' - version only\n"
|
|
Packit |
aea12f |
"\t'c' - version and copyright\n"
|
|
Packit |
aea12f |
"\t'n' - version and full copyright notice\n"));
|
|
Packit |
aea12f |
#line 58 "../check.c"
|
|
Packit |
aea12f |
puts(_("%s error: the '%s' and '%s' options conflict\n"));
|
|
Packit Service |
991b93 |
#line 187 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: The '%s' option has been disabled."));
|
|
Packit Service |
991b93 |
#line 400 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: The '%s' option has been disabled."));
|
|
Packit |
aea12f |
#line 38 "../alias.c"
|
|
Packit |
aea12f |
puts(_("-equivalence"));
|
|
Packit Service |
991b93 |
#line 439 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: illegal option -- %c\n"));
|
|
Packit |
aea12f |
#line 110 "../reset.c"
|
|
Packit |
aea12f |
puts(_("%s: illegal option -- %c\n"));
|
|
Packit Service |
991b93 |
#line 241 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: illegal option -- %s\n"));
|
|
Packit Service |
991b93 |
#line 740 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: illegal option -- %s\n"));
|
|
Packit |
aea12f |
#line 118 "../reset.c"
|
|
Packit |
aea12f |
puts(_("%s: illegal option -- %s\n"));
|
|
Packit Service |
991b93 |
#line 305 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: unknown vendor extension option -- %s\n"));
|
|
Packit Service |
991b93 |
#line 135 "../enum.c"
|
|
Packit |
aea12f |
puts(_(" or an integer from %d through %d\n"));
|
|
Packit Service |
991b93 |
#line 145 "../enum.c"
|
|
Packit |
aea12f |
puts(_(" or an integer from %d through %d\n"));
|
|
Packit Service |
991b93 |
#line 696 "../usage.c"
|
|
Packit |
aea12f |
puts(_("%s error: invalid option descriptor for %s\n"));
|
|
Packit Service |
991b93 |
#line 1030 "../usage.c"
|
|
Packit |
aea12f |
puts(_("%s error: invalid option descriptor for %s\n"));
|
|
Packit Service |
991b93 |
#line 355 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: invalid option name: %s\n"));
|
|
Packit Service |
991b93 |
#line 497 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: The '%s' option requires an argument.\n"));
|
|
Packit Service |
991b93 |
#line 150 "../autoopts.c"
|
|
Packit |
aea12f |
puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n"
|
|
Packit |
aea12f |
"\t'%s' and '%s'."));
|
|
Packit |
aea12f |
#line 94 "../check.c"
|
|
Packit |
aea12f |
puts(_("%s error: The %s option is required\n"));
|
|
Packit Service |
991b93 |
#line 602 "../find.c"
|
|
Packit |
aea12f |
puts(_("%s: The '%s' option cannot have an argument.\n"));
|
|
Packit |
aea12f |
#line 151 "../check.c"
|
|
Packit |
aea12f |
puts(_("%s: Command line arguments are not allowed.\n"));
|
|
Packit Service |
991b93 |
#line 568 "../save.c"
|
|
Packit |
aea12f |
puts(_("error %d (%s) creating %s\n"));
|
|
Packit Service |
991b93 |
#line 210 "../enum.c"
|
|
Packit |
aea12f |
puts(_("%s error: '%s' does not match any %s keywords.\n"));
|
|
Packit |
aea12f |
#line 93 "../reset.c"
|
|
Packit |
aea12f |
puts(_("%s error: The '%s' option requires an argument.\n"));
|
|
Packit Service |
991b93 |
#line 122 "../save.c"
|
|
Packit |
aea12f |
puts(_("error %d (%s) stat-ing %s\n"));
|
|
Packit Service |
991b93 |
#line 175 "../save.c"
|
|
Packit |
aea12f |
puts(_("error %d (%s) stat-ing %s\n"));
|
|
Packit |
aea12f |
#line 143 "../restore.c"
|
|
Packit |
aea12f |
puts(_("%s error: no saved option state\n"));
|
|
Packit Service |
991b93 |
#line 225 "../autoopts.c"
|
|
Packit |
aea12f |
puts(_("'%s' is not a command line option.\n"));
|
|
Packit |
aea12f |
#line 113 "../time.c"
|
|
Packit |
aea12f |
puts(_("%s error: '%s' is not a recognizable date/time.\n"));
|
|
Packit |
aea12f |
#line 50 "../time.c"
|
|
Packit |
aea12f |
puts(_("%s error: '%s' is not a recognizable time duration.\n"));
|
|
Packit |
aea12f |
#line 92 "../check.c"
|
|
Packit |
aea12f |
puts(_("%s error: The %s option must appear %d times.\n"));
|
|
Packit |
aea12f |
#line 165 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%s error: '%s' is not a recognizable number.\n"));
|
|
Packit Service |
991b93 |
#line 176 "../enum.c"
|
|
Packit |
aea12f |
puts(_("%s error: %s exceeds %s keyword count\n"));
|
|
Packit Service |
991b93 |
#line 279 "../usage.c"
|
|
Packit |
aea12f |
puts(_("Try '%s %s' for more information.\n"));
|
|
Packit |
aea12f |
#line 45 "../alias.c"
|
|
Packit |
aea12f |
puts(_("one %s%s option allowed\n"));
|
|
Packit Service |
991b93 |
#line 170 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("standard output"));
|
|
Packit Service |
991b93 |
#line 905 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("standard output"));
|
|
Packit Service |
991b93 |
#line 223 "../usage.c"
|
|
Packit |
aea12f |
puts(_("standard output"));
|
|
Packit Service |
991b93 |
#line 364 "../usage.c"
|
|
Packit |
aea12f |
puts(_("standard output"));
|
|
Packit Service |
991b93 |
#line 574 "../usage.c"
|
|
Packit |
aea12f |
puts(_("standard output"));
|
|
Packit Service |
991b93 |
#line 178 "../version.c"
|
|
Packit |
aea12f |
puts(_("standard output"));
|
|
Packit Service |
991b93 |
#line 223 "../usage.c"
|
|
Packit |
aea12f |
puts(_("standard error"));
|
|
Packit Service |
991b93 |
#line 364 "../usage.c"
|
|
Packit |
aea12f |
puts(_("standard error"));
|
|
Packit Service |
991b93 |
#line 574 "../usage.c"
|
|
Packit |
aea12f |
puts(_("standard error"));
|
|
Packit Service |
991b93 |
#line 178 "../version.c"
|
|
Packit |
aea12f |
puts(_("standard error"));
|
|
Packit Service |
991b93 |
#line 170 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("write"));
|
|
Packit Service |
991b93 |
#line 905 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("write"));
|
|
Packit Service |
991b93 |
#line 222 "../usage.c"
|
|
Packit |
aea12f |
puts(_("write"));
|
|
Packit Service |
991b93 |
#line 363 "../usage.c"
|
|
Packit |
aea12f |
puts(_("write"));
|
|
Packit Service |
991b93 |
#line 573 "../usage.c"
|
|
Packit |
aea12f |
puts(_("write"));
|
|
Packit Service |
991b93 |
#line 177 "../version.c"
|
|
Packit |
aea12f |
puts(_("write"));
|
|
Packit |
aea12f |
#line 60 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%s error: %s option value %ld is out of range.\n"));
|
|
Packit |
aea12f |
#line 44 "../check.c"
|
|
Packit |
aea12f |
puts(_("%s error: %s option requires the %s option\n"));
|
|
Packit Service |
991b93 |
#line 121 "../save.c"
|
|
Packit |
aea12f |
puts(_("%s warning: cannot save options - %s not regular file\n"));
|
|
Packit Service |
991b93 |
#line 174 "../save.c"
|
|
Packit |
aea12f |
puts(_("%s warning: cannot save options - %s not regular file\n"));
|
|
Packit Service |
991b93 |
#line 193 "../save.c"
|
|
Packit |
aea12f |
puts(_("%s warning: cannot save options - %s not regular file\n"));
|
|
Packit Service |
991b93 |
#line 567 "../save.c"
|
|
Packit |
aea12f |
puts(_("%s warning: cannot save options - %s not regular file\n"));
|
|
Packit |
aea12f |
/* END-LIBOPTS-MESSAGES */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* USAGE-TEXT: */
|
|
Packit Service |
991b93 |
#line 822 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- an alternate for '%s'\n"));
|
|
Packit Service |
991b93 |
#line 1097 "../usage.c"
|
|
Packit |
aea12f |
puts(_("Version, usage and configuration options:"));
|
|
Packit Service |
991b93 |
#line 873 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- default option for unnamed options\n"));
|
|
Packit Service |
991b93 |
#line 786 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- disabled as '--%s'\n"));
|
|
Packit Service |
991b93 |
#line 1066 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" --- %-14s %s\n"));
|
|
Packit Service |
991b93 |
#line 1064 "../usage.c"
|
|
Packit |
aea12f |
puts(_("This option has been disabled"));
|
|
Packit Service |
991b93 |
#line 813 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- enabled by default\n"));
|
|
Packit |
aea12f |
#line 40 "../alias.c"
|
|
Packit |
aea12f |
puts(_("%s error: only "));
|
|
Packit Service |
991b93 |
#line 1143 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" - examining environment variables named %s_*\n"));
|
|
Packit |
aea12f |
#line 168 "../file.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- file must not pre-exist\n"));
|
|
Packit |
aea12f |
#line 172 "../file.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- file must pre-exist\n"));
|
|
Packit Service |
991b93 |
#line 329 "../usage.c"
|
|
Packit |
aea12f |
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
|
|
Packit |
aea12f |
"hyphen and the flag character.\n"));
|
|
Packit Service |
991b93 |
#line 882 "../makeshell.c"
|
|
Packit |
aea12f |
puts(_("\n"
|
|
Packit |
aea12f |
"= = = = = = = =\n\n"
|
|
Packit |
aea12f |
"This incarnation of genshell will produce\n"
|
|
Packit |
aea12f |
"a shell script to parse the options for %s:\n\n"));
|
|
Packit Service |
991b93 |
#line 142 "../enum.c"
|
|
Packit |
aea12f |
puts(_(" or an integer mask with any of the lower %d bits set\n"));
|
|
Packit Service |
991b93 |
#line 846 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- is a set membership option\n"));
|
|
Packit Service |
991b93 |
#line 867 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- must appear between %d and %d times\n"));
|
|
Packit Service |
991b93 |
#line 331 "../usage.c"
|
|
Packit |
aea12f |
puts(_("Options are specified by single or double hyphens and their name.\n"));
|
|
Packit Service |
991b93 |
#line 853 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- may appear multiple times\n"));
|
|
Packit Service |
991b93 |
#line 840 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- may not be preset\n"));
|
|
Packit Service |
991b93 |
#line 1258 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" Arg Option-Name Description\n"));
|
|
Packit Service |
991b93 |
#line 1194 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" Flg Arg Option-Name Description\n"));
|
|
Packit Service |
991b93 |
#line 1252 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" Flg Arg Option-Name Description\n"));
|
|
Packit Service |
991b93 |
#line 1253 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" %3s %s"));
|
|
Packit Service |
991b93 |
#line 1259 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" %3s %s"));
|
|
Packit Service |
991b93 |
#line 336 "../usage.c"
|
|
Packit |
aea12f |
puts(_("The '-#<number>' option may omit the hash char\n"));
|
|
Packit Service |
991b93 |
#line 332 "../usage.c"
|
|
Packit |
aea12f |
puts(_("All arguments are named options.\n"));
|
|
Packit Service |
991b93 |
#line 920 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" - reading file %s"));
|
|
Packit Service |
991b93 |
#line 358 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\n"
|
|
Packit |
aea12f |
"Please send bug reports to: <%s>\n"));
|
|
Packit |
aea12f |
#line 100 "../version.c"
|
|
Packit |
aea12f |
puts(_("\n"
|
|
Packit |
aea12f |
"Please send bug reports to: <%s>\n"));
|
|
Packit |
aea12f |
#line 129 "../version.c"
|
|
Packit |
aea12f |
puts(_("\n"
|
|
Packit |
aea12f |
"Please send bug reports to: <%s>\n"));
|
|
Packit Service |
991b93 |
#line 852 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- may NOT appear - preset only\n"));
|
|
Packit Service |
991b93 |
#line 893 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\n"
|
|
Packit |
aea12f |
"The following option preset mechanisms are supported:\n"));
|
|
Packit Service |
991b93 |
#line 1141 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\n"
|
|
Packit |
aea12f |
"The following option preset mechanisms are supported:\n"));
|
|
Packit Service |
991b93 |
#line 631 "../usage.c"
|
|
Packit |
aea12f |
puts(_("prohibits these options:\n"));
|
|
Packit Service |
991b93 |
#line 626 "../usage.c"
|
|
Packit |
aea12f |
puts(_("prohibits the option '%s'\n"));
|
|
Packit |
aea12f |
#line 81 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%s%ld to %ld"));
|
|
Packit |
aea12f |
#line 79 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%sgreater than or equal to %ld"));
|
|
Packit |
aea12f |
#line 75 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%s%ld exactly"));
|
|
Packit |
aea12f |
#line 68 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%sit must lie in one of the ranges:\n"));
|
|
Packit |
aea12f |
#line 68 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%sit must be in the range:\n"));
|
|
Packit |
aea12f |
#line 88 "../numeric.c"
|
|
Packit |
aea12f |
puts(_(", or\n"));
|
|
Packit |
aea12f |
#line 66 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
|
|
Packit |
aea12f |
#line 77 "../numeric.c"
|
|
Packit |
aea12f |
puts(_("%sless than or equal to %ld"));
|
|
Packit Service |
991b93 |
#line 339 "../usage.c"
|
|
Packit |
aea12f |
puts(_("Operands and options may be intermixed. They will be reordered.\n"));
|
|
Packit Service |
991b93 |
#line 601 "../usage.c"
|
|
Packit |
aea12f |
puts(_("requires the option '%s'\n"));
|
|
Packit Service |
991b93 |
#line 604 "../usage.c"
|
|
Packit |
aea12f |
puts(_("requires these options:\n"));
|
|
Packit Service |
991b93 |
#line 1270 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" Arg Option-Name Req? Description\n"));
|
|
Packit Service |
991b93 |
#line 1264 "../usage.c"
|
|
Packit |
aea12f |
puts(_(" Flg Arg Option-Name Req? Description\n"));
|
|
Packit Service |
991b93 |
#line 143 "../enum.c"
|
|
Packit |
aea12f |
puts(_("or you may use a numeric representation. Preceding these with a '!'\n"
|
|
Packit |
aea12f |
"will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
|
|
Packit |
aea12f |
"will set them all. Multiple entries may be passed as an option\n"
|
|
Packit |
aea12f |
"argument list.\n"));
|
|
Packit Service |
991b93 |
#line 859 "../usage.c"
|
|
Packit |
aea12f |
puts(_("\t\t\t\t- may appear up to %d times\n"));
|
|
Packit Service |
991b93 |
#line 52 "../enum.c"
|
|
Packit |
aea12f |
puts(_("The valid \"%s\" option keywords are:\n"));
|
|
Packit Service |
991b93 |
#line 1101 "../usage.c"
|
|
Packit |
aea12f |
puts(_("The next option supports vendor supported extra options:"));
|
|
Packit Service |
991b93 |
#line 722 "../usage.c"
|
|
Packit |
aea12f |
puts(_("These additional options are:"));
|
|
Packit |
aea12f |
/* END-USAGE-TEXT */
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
#endif /* uncompilable code */
|
|
Packit |
aea12f |
#ifdef __cplusplus
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
/* genshell.c ends here */
|