1/*   -*- buffer-read-only: t -*- vi: set ro:
2 *
3 *  DO NOT EDIT THIS FILE   (unshar-opts.c)
4 *
5 *  It has been AutoGen-ed
6 *  From the definitions    unshar-opts.def
7 *  and the template file   options
8 *
9 * Generated from AutoOpts 41:1:16 templates.
10 *
11 *  AutoOpts is a copyrighted work.  This source file is not encumbered
12 *  by AutoOpts licensing, but is provided under the licensing terms chosen
13 *  by the unshar author or copyright holder.  AutoOpts is
14 *  licensed under the terms of the LGPL.  The redistributable library
15 *  (``libopts'') is licensed under the terms of either the LGPL or, at the
16 *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
17 *  for details.
18 *
19 * The unshar program is copyrighted and licensed
20 * under the following terms:
21 *
22 *  Copyright (C) 1994-2015 Free Software Foundation, Inc., all rights reserved.
23 *  This is free software. It is licensed for use, modification and
24 *  redistribution under the terms of the GNU General Public License,
25 *  version 3 or later <http://gnu.org/licenses/gpl.html>
26 *
27 *  unshar is free software: you can redistribute it and/or modify it
28 *  under the terms of the GNU General Public License as published by the
29 *  Free Software Foundation, either version 3 of the License, or
30 *  (at your option) any later version.
31 *
32 *  unshar is distributed in the hope that it will be useful, but
33 *  WITHOUT ANY WARRANTY; without even the implied warranty of
34 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35 *  See the GNU General Public License for more details.
36 *
37 *  You should have received a copy of the GNU General Public License along
38 *  with this program.  If not, see <http://www.gnu.org/licenses/>.
39 */
40
41#ifndef __doxygen__
42#define OPTION_CODE_COMPILE 1
43#include "unshar-opts.h"
44#include <sys/types.h>
45#include <sys/stat.h>
46
47#include <ctype.h>
48#include <errno.h>
49#include <fcntl.h>
50#include <limits.h>
51#include <stdio.h>
52#include <stdlib.h>
53#include <string.h>
54#include <unistd.h>
55
56#ifdef  __cplusplus
57extern "C" {
58#endif
59extern FILE * option_usage_fp;
60#define zCopyright      (unshar_opt_strs+0)
61#define zLicenseDescrip (unshar_opt_strs+292)
62
63/*
64 *  global included definitions
65 */
66size_t separator_str_len = 6;
67
68extern void init_unshar (void);
69
70char const * const program_name = "unshar";
71
72#ifndef NULL
73#  define NULL 0
74#endif
75
76/**
77 *  static const strings for unshar options
78 */
79static char const unshar_opt_strs[3905] =
80/*     0 */ "unshar (GNU sharutils) 4.15.2\n"
81            "Copyright (C) 1994-2015 Free Software Foundation, Inc., all rights reserved.\n"
82            "This is free software. It is licensed for use, modification and\n"
83            "redistribution under the terms of the GNU General Public License,\n"
84            "version 3 or later <http://gnu.org/licenses/gpl.html>\n\0"
85/*   292 */ "unshar is free software: you can redistribute it and/or modify it under the\n"
86            "terms of the GNU General Public License as published by the Free Software\n"
87            "Foundation, either version 3 of the License, or (at your option) any later\n"
88            "version.\n\n"
89            "unshar is distributed in the hope that it will be useful, but WITHOUT ANY\n"
90            "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
91            "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n"
92            "details.\n\n"
93            "You should have received a copy of the GNU General Public License along\n"
94            "with this program.  If not, see <http://www.gnu.org/licenses/>.\n\0"
95/*   893 */ "unpack into the directory dir\0"
96/*   923 */ "DIRECTORY\0"
97/*   933 */ "directory\0"
98/*   943 */ "overwrite any pre-existing files\0"
99/*   976 */ "OVERWRITE\0"
100/*   986 */ "overwrite\0"
101/*   996 */ "an alias for the 'overwrite' option\0"
102/*  1032 */ "force\0"
103/*  1038 */ "split input on split-mark lines\0"
104/*  1070 */ "SPLIT_AT\0"
105/*  1079 */ "split-at\0"
106/*  1088 */ "exit 0\0"
107/*  1095 */ "split input on \"exit 0\" lines\0"
108/*  1125 */ "EXIT_0\0"
109/*  1132 */ "exit-0\0"
110/*  1139 */ "debug the shell code\0"
111/*  1160 */ "DEBUG\0"
112/*  1166 */ "debug\0"
113/*  1172 */ "display extended usage information and exit\0"
114/*  1216 */ "help\0"
115/*  1221 */ "extended usage information passed thru pager\0"
116/*  1266 */ "more-help\0"
117/*  1276 */ "output version information and exit\0"
118/*  1312 */ "version\0"
119/*  1320 */ "save the option state to a config file\0"
120/*  1359 */ "save-opts\0"
121/*  1369 */ "load options from a config file\0"
122/*  1401 */ "LOAD_OPTS\0"
123/*  1411 */ "no-load-opts\0"
124/*  1424 */ "no\0"
125/*  1427 */ "UNSHAR\0"
126/*  1434 */ "unshar (GNU sharutils) - unpack a shar archive\n"
127            "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\0"
128/*  1551 */ "$HOME\0"
129/*  1557 */ ".sharrc\0"
130/*  1565 */ "bug-gnu-utils@gnu.org\0"
131/*  1587 */ "\n"
132            "If no arguments are provided, input arguments are read from stdin,\n"
133            "one per line; blank and '#'-prefixed lines are comments.\n"
134            "'stdin' may not be a terminal (tty).\n\0"
135/*  1750 */ "Unshar scans the input files (typically email messages) looking for the\n"
136            "start of a shell archive.  If no files are given, then standard input is\n"
137            "processed instead.  It then passes each archive discovered through an\n"
138            "invocation of the shell program to unpack it.\n\0"
139/*  2012 */ "unshar (GNU sharutils) 4.15.2\0"
140/*  2042 */ "unshar (GNU sharutils) - unpack a shar archive\n"
141            "Usage:  unshar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\n"
142            "   -d, --directory=DIR        unpack into the directory DIR\n"
143            "   -c, --overwrite            overwrite any pre-existing files\n"
144            "   -f, --force                an alias for the 'overwrite' option\n"
145            "   -E, --split-at=SPLIT-PAT   split input on SPLIT-PAT lines\n"
146            "   -e, --exit-0               split input on \"exit 0\" lines\n"
147            "                                - prohibits the option 'split-at'\n"
148            "   -D, --debug                debug the shell code\n"
149            "   -v, --version[=MODE]       output version information and exit\n"
150            "   -h, --help                 display extended usage information and exit\n"
151            "   -!, --more-help            extended usage information passed thru pager\n"
152            "   -R, --save-opts[=FILE]     save the option state to the config file FILE\n"
153            "   -r, --load-opts=FILE       load options from the config file FILE\n"
154            "                                - disabled as '--no-load-opts'\n"
155            "                                - may appear multiple times\n\n"
156            "Options are specified by doubled hyphens and their name or by a single\n"
157            "hyphen and the flag character.\n\n"
158            "If no arguments are provided, input arguments are read from stdin,\n"
159            "one per line; blank and '#'-prefixed lines are comments.\n"
160            "'stdin' may not be a terminal (tty).\n\n"
161            "The following option preset mechanisms are supported:\n"
162            " - reading file $HOME/.sharrc\n\n"
163            "'unshar' scans the input files (typically email messages) looking for the\n"
164            "start of a shell archive.  If no files are given, then standard input is\n"
165            "processed instead.  It then passes each archive discovered through an\n"
166            "invocation of the shell program to unpack it.\n\n"
167            "Please send bug reports to:  <bug-gnu-utils@gnu.org>\n\0"
168/*  3742 */ "unshar (GNU sharutils) - unpack a shar archive\n"
169            "Usage:  unshar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n"
170            "Try 'unshar --help' for more information.\n";
171
172/**
173 *  directory option description:
174 */
175/** Descriptive text for the directory option */
176#define DIRECTORY_DESC      (unshar_opt_strs+893)
177/** Upper-cased name for the directory option */
178#define DIRECTORY_NAME      (unshar_opt_strs+923)
179/** Name string for the directory option */
180#define DIRECTORY_name      (unshar_opt_strs+933)
181/** Compiled in flag settings for the directory option */
182#define DIRECTORY_FLAGS     (OPTST_DISABLED \
183        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
184
185/**
186 *  overwrite option description:
187 */
188/** Descriptive text for the overwrite option */
189#define OVERWRITE_DESC      (unshar_opt_strs+943)
190/** Upper-cased name for the overwrite option */
191#define OVERWRITE_NAME      (unshar_opt_strs+976)
192/** Name string for the overwrite option */
193#define OVERWRITE_name      (unshar_opt_strs+986)
194/** Compiled in flag settings for the overwrite option */
195#define OVERWRITE_FLAGS     (OPTST_DISABLED)
196
197/**
198 *  force option description:
199 */
200/** Descriptive text for the force option */
201#define FORCE_DESC    (unshar_opt_strs+996)
202#define FORCE_NAME    NULL
203/** Unmodified name string for the force option */
204#define FORCE_name    (unshar_opt_strs+1032)
205/** Compiled in flag settings for the force option */
206#define FORCE_FLAGS     (OVERWRITE_FLAGS | OPTST_ALIAS)
207
208/**
209 *  split-at option description:
210 */
211/** Descriptive text for the split-at option */
212#define SPLIT_AT_DESC      (unshar_opt_strs+1038)
213/** Upper-cased name for the split-at option */
214#define SPLIT_AT_NAME      (unshar_opt_strs+1070)
215/** Name string for the split-at option */
216#define SPLIT_AT_name      (unshar_opt_strs+1079)
217/** The compiled in default value for the split-at option argument */
218#define SPLIT_AT_DFT_ARG   (unshar_opt_strs+1088)
219/** Compiled in flag settings for the split-at option */
220#define SPLIT_AT_FLAGS     (OPTST_DISABLED \
221        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
222
223/**
224 *  exit-0 option description with
225 *  "Must also have options" and "Incompatible options":
226 */
227/** Descriptive text for the exit-0 option */
228#define EXIT_0_DESC      (unshar_opt_strs+1095)
229/** Upper-cased name for the exit-0 option */
230#define EXIT_0_NAME      (unshar_opt_strs+1125)
231/** Name string for the exit-0 option */
232#define EXIT_0_name      (unshar_opt_strs+1132)
233/** Other options that appear in conjunction with the exit-0 option */
234static int const aExit_0CantList[] = {
235    INDEX_OPT_SPLIT_AT, NO_EQUIVALENT };
236/** Compiled in flag settings for the exit-0 option */
237#define EXIT_0_FLAGS     (OPTST_DISABLED)
238
239/**
240 *  debug option description:
241 */
242/** Descriptive text for the debug option */
243#define DEBUG_DESC      (unshar_opt_strs+1139)
244/** Upper-cased name for the debug option */
245#define DEBUG_NAME      (unshar_opt_strs+1160)
246/** Name string for the debug option */
247#define DEBUG_name      (unshar_opt_strs+1166)
248/** Compiled in flag settings for the debug option */
249#define DEBUG_FLAGS     (OPTST_DISABLED)
250
251/*
252 *  Help/More_Help/Version option descriptions:
253 */
254#define HELP_DESC       (unshar_opt_strs+1172)
255#define HELP_name       (unshar_opt_strs+1216)
256#ifdef HAVE_WORKING_FORK
257#define MORE_HELP_DESC  (unshar_opt_strs+1221)
258#define MORE_HELP_name  (unshar_opt_strs+1266)
259#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
260#else
261#define MORE_HELP_DESC  HELP_DESC
262#define MORE_HELP_name  HELP_name
263#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
264#endif
265#ifdef NO_OPTIONAL_OPT_ARGS
266#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
267#else
268#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
269                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
270#endif
271#define VER_DESC        (unshar_opt_strs+1276)
272#define VER_name        (unshar_opt_strs+1312)
273#define SAVE_OPTS_DESC  (unshar_opt_strs+1320)
274#define SAVE_OPTS_name  (unshar_opt_strs+1359)
275#define LOAD_OPTS_DESC     (unshar_opt_strs+1369)
276#define LOAD_OPTS_NAME     (unshar_opt_strs+1401)
277#define NO_LOAD_OPTS_name  (unshar_opt_strs+1411)
278#define LOAD_OPTS_pfx      (unshar_opt_strs+1424)
279#define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
280/**
281 *  Declare option callback procedures
282 */
283extern tOptProc
284    optionBooleanVal,   optionNestedVal,    optionNumericVal,
285    optionPagedUsage,   optionPrintVersion, optionResetOpt,
286    optionStackArg,     optionTimeDate,     optionTimeVal,
287    optionUnstackArg,   optionVendorOption;
288static tOptProc
289    doOptExit_0, doOptForce, doOptSplit_At, doUsageOpt;
290#define VER_PROC        optionPrintVersion
291
292/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
293/**
294 *  Define the unshar Option Descriptions.
295 * This is an array of OPTION_CT entries, one for each
296 * option that the unshar program responds to.
297 */
298static tOptDesc optDesc[OPTION_CT] = {
299  {  /* entry idx, value */ 0, VALUE_OPT_DIRECTORY,
300     /* equiv idx, value */ 0, VALUE_OPT_DIRECTORY,
301     /* equivalenced to  */ NO_EQUIVALENT,
302     /* min, max, act ct */ 0, 1, 0,
303     /* opt state flags  */ DIRECTORY_FLAGS, 0,
304     /* last opt argumnt */ { NULL }, /* --directory */
305     /* arg list/cookie  */ NULL,
306     /* must/cannot opts */ NULL, NULL,
307     /* option proc      */ NULL,
308     /* desc, NAME, name */ DIRECTORY_DESC, DIRECTORY_NAME, DIRECTORY_name,
309     /* disablement strs */ NULL, NULL },
310
311  {  /* entry idx, value */ 1, VALUE_OPT_OVERWRITE,
312     /* equiv idx, value */ 1, VALUE_OPT_OVERWRITE,
313     /* equivalenced to  */ NO_EQUIVALENT,
314     /* min, max, act ct */ 0, 1, 0,
315     /* opt state flags  */ OVERWRITE_FLAGS, 0,
316     /* last opt argumnt */ { NULL }, /* --overwrite */
317     /* arg list/cookie  */ NULL,
318     /* must/cannot opts */ NULL, NULL,
319     /* option proc      */ NULL,
320     /* desc, NAME, name */ OVERWRITE_DESC, OVERWRITE_NAME, OVERWRITE_name,
321     /* disablement strs */ NULL, NULL },
322
323  {  /* entry idx, value */ 2, VALUE_OPT_FORCE,
324     /* equiv idx, value */ 2, VALUE_OPT_FORCE,
325     /* equivalenced to  */ NO_EQUIVALENT,
326     /* min, max, act ct */ 0, 1, 0,
327     /* opt state flags  */ FORCE_FLAGS, 0,
328     /* last opt argumnt */ { NULL }, /* --force */
329     /* arg list/cookie  */ NULL,
330     /* must/cannot opts */ NULL, NULL,
331     /* option proc      */ doOptForce,
332     /* desc, NAME, name */ FORCE_DESC, FORCE_NAME, FORCE_name,
333     /* disablement strs */ 0, 0 },
334
335  {  /* entry idx, value */ 3, VALUE_OPT_SPLIT_AT,
336     /* equiv idx, value */ 3, VALUE_OPT_SPLIT_AT,
337     /* equivalenced to  */ NO_EQUIVALENT,
338     /* min, max, act ct */ 0, 1, 0,
339     /* opt state flags  */ SPLIT_AT_FLAGS, 0,
340     /* last opt argumnt */ { SPLIT_AT_DFT_ARG },
341     /* arg list/cookie  */ NULL,
342     /* must/cannot opts */ NULL, NULL,
343     /* option proc      */ doOptSplit_At,
344     /* desc, NAME, name */ SPLIT_AT_DESC, SPLIT_AT_NAME, SPLIT_AT_name,
345     /* disablement strs */ NULL, NULL },
346
347  {  /* entry idx, value */ 4, VALUE_OPT_EXIT_0,
348     /* equiv idx, value */ 4, VALUE_OPT_EXIT_0,
349     /* equivalenced to  */ NO_EQUIVALENT,
350     /* min, max, act ct */ 0, 1, 0,
351     /* opt state flags  */ EXIT_0_FLAGS, 0,
352     /* last opt argumnt */ { NULL }, /* --exit-0 */
353     /* arg list/cookie  */ NULL,
354     /* must/cannot opts */ NULL, aExit_0CantList,
355     /* option proc      */ doOptExit_0,
356     /* desc, NAME, name */ EXIT_0_DESC, EXIT_0_NAME, EXIT_0_name,
357     /* disablement strs */ NULL, NULL },
358
359  {  /* entry idx, value */ 5, VALUE_OPT_DEBUG,
360     /* equiv idx, value */ 5, VALUE_OPT_DEBUG,
361     /* equivalenced to  */ NO_EQUIVALENT,
362     /* min, max, act ct */ 0, 1, 0,
363     /* opt state flags  */ DEBUG_FLAGS, 0,
364     /* last opt argumnt */ { NULL }, /* --debug */
365     /* arg list/cookie  */ NULL,
366     /* must/cannot opts */ NULL, NULL,
367     /* option proc      */ NULL,
368     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
369     /* disablement strs */ NULL, NULL },
370
371  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
372     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
373     /* equivalenced to  */ NO_EQUIVALENT,
374     /* min, max, act ct */ 0, 1, 0,
375     /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
376     /* last opt argumnt */ { NULL },
377     /* arg list/cookie  */ NULL,
378     /* must/cannot opts */ NULL, NULL,
379     /* option proc      */ VER_PROC,
380     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
381     /* disablement strs */ NULL, NULL },
382
383
384
385  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
386     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
387     /* equivalenced to  */ NO_EQUIVALENT,
388     /* min, max, act ct */ 0, 1, 0,
389     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
390     /* last opt argumnt */ { NULL },
391     /* arg list/cookie  */ NULL,
392     /* must/cannot opts */ NULL, NULL,
393     /* option proc      */ doUsageOpt,
394     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
395     /* disablement strs */ NULL, NULL },
396
397  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
398     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
399     /* equivalenced to  */ NO_EQUIVALENT,
400     /* min, max, act ct */ 0, 1, 0,
401     /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
402     /* last opt argumnt */ { NULL },
403     /* arg list/cookie  */ NULL,
404     /* must/cannot opts */ NULL,  NULL,
405     /* option proc      */ optionPagedUsage,
406     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
407     /* disablement strs */ NULL, NULL },
408
409  {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
410     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
411     /* equivalenced to  */ NO_EQUIVALENT,
412     /* min, max, act ct */ 0, 1, 0,
413     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
414                       | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
415     /* last opt argumnt */ { NULL },
416     /* arg list/cookie  */ NULL,
417     /* must/cannot opts */ NULL,  NULL,
418     /* option proc      */ NULL,
419     /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
420     /* disablement strs */ NULL, NULL },
421
422  {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
423     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
424     /* equivalenced to  */ NO_EQUIVALENT,
425     /* min, max, act ct */ 0, NOLIMIT, 0,
426     /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
427			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
428     /* last opt argumnt */ { NULL },
429     /* arg list/cookie  */ NULL,
430     /* must/cannot opts */ NULL, NULL,
431     /* option proc      */ optionLoadOpt,
432     /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
433     /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
434};
435
436
437/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
438/** Reference to the upper cased version of unshar. */
439#define zPROGNAME       (unshar_opt_strs+1427)
440/** Reference to the title line for unshar usage. */
441#define zUsageTitle     (unshar_opt_strs+1434)
442/** unshar configuration file name. */
443#define zRcName         (unshar_opt_strs+1557)
444/** Directories to search for unshar config files. */
445static char const * const apzHomeList[2] = {
446    unshar_opt_strs+1551,
447    NULL };
448/** The unshar program bug email address. */
449#define zBugsAddr       (unshar_opt_strs+1565)
450/** Clarification/explanation of what unshar does. */
451#define zExplain        (unshar_opt_strs+1587)
452/** Extra detail explaining what unshar does. */
453#define zDetail         (unshar_opt_strs+1750)
454/** The full version string for unshar. */
455#define zFullVersion    (unshar_opt_strs+2012)
456/* extracted from optcode.tlib near line 364 */
457
458#if defined(ENABLE_NLS)
459# define OPTPROC_BASE OPTPROC_TRANSLATE
460  static tOptionXlateProc translate_option_strings;
461#else
462# define OPTPROC_BASE OPTPROC_NONE
463# define translate_option_strings NULL
464#endif /* ENABLE_NLS */
465
466#define unshar_full_usage (unshar_opt_strs+2042)
467#define unshar_short_usage (unshar_opt_strs+3742)
468
469#endif /* not defined __doxygen__ */
470
471/*
472 *  Create the static procedure(s) declared above.
473 */
474/**
475 * The callout function that invokes the optionUsage function.
476 *
477 * @param[in] opts the AutoOpts option description structure
478 * @param[in] od   the descriptor for the "help" (usage) option.
479 * @noreturn
480 */
481static void
482doUsageOpt(tOptions * opts, tOptDesc * od)
483{
484    int ex_code;
485    ex_code = UNSHAR_EXIT_SUCCESS;
486    optionUsage(&unsharOptions, ex_code);
487    /* NOTREACHED */
488    exit(1);
489    (void)opts;
490    (void)od;
491}
492
493/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
494/**
495 * Code to handle the force option.
496 *
497 * @param[in] pOptions the unshar options data structure
498 * @param[in,out] pOptDesc the option descriptor for this option.
499 */
500static void
501doOptForce(tOptions* pOptions, tOptDesc* pOptDesc)
502{
503    int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_OVERWRITE);
504    if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
505        USAGE(UNSHAR_EXIT_USAGE_ERROR);
506
507}
508
509/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
510/**
511 * Code to handle the split-at option.
512 * With this option, @command{unshar} isolates each different shell archive
513 * from the others which have been placed in the same file, unpacking each
514 * in turn, from the beginning of the file to the end.  Its proper
515 * operation relies on the fact that many shar files are terminated by a
516 * readily identifiable string at the start of the last line.
517 *
518 * For example, noticing that most `.signatures' have a double hyphen
519 * ("--") on a line right before them, one can then sometimes use
520 * @code{--split-at=--}.  The signature will then be skipped, along with
521 * the headers of the following message.
522 * @param[in] pOptions the unshar options data structure
523 * @param[in,out] pOptDesc the option descriptor for this option.
524 */
525static void
526doOptSplit_At(tOptions* pOptions, tOptDesc* pOptDesc)
527{
528    /*
529     * Be sure the flag-code[0] handles special values for the options pointer
530     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
531     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
532     * reset its state.
533     */
534    /* extracted from unshar-opts.def, line 95 */
535    separator_str_len = strlen (pOptDesc->optArg.argString);
536    (void)pOptions;
537}
538
539/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
540/**
541 * Code to handle the exit-0 option.
542 * Most shell archives end with a line consisting of simply "exit 0".
543 * This option is equivalent to (and conflicts with)
544 * @code{--split-at="exit 0"}.
545 * @param[in] pOptions the unshar options data structure
546 * @param[in,out] pOptDesc the option descriptor for this option.
547 */
548static void
549doOptExit_0(tOptions* pOptions, tOptDesc* pOptDesc)
550{
551    /*
552     * Be sure the flag-code[0] handles special values for the options pointer
553     * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
554     * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
555     * reset its state.
556     */
557    /* extracted from unshar-opts.def, line 118 */
558    SET_OPT_SPLIT_AT("exit 0");
559    (void)pOptDesc;
560    (void)pOptions;
561}
562/* extracted from optmain.tlib near line 116 */
563
564
565extern int unshar_file(char const * fname, FILE * entry_fp);
566/* extracted from optmain.tlib near line 204 */
567
568/**
569 * validate file name and dispach callout procedure.
570 * This procedure is generated by AutoOpts.
571 * It will make sure that the input file name refers to a file
572 * that exists and has been opened for reading.
573 *
574 * @param fname the name of the file to process
575 * @returns program exit code flag
576 */
577static unshar_exit_code_t
578validate_fname(char const * fname)
579{
580    static char const * err_str = NULL;
581
582    if (err_str == NULL)
583        err_str = _("fs error %d (%s) %s-ing %s\n");
584    if ((fname[0] == '-') && (fname[1] == '\0'))
585        return unshar_file(_("standard input"), stdin);
586    {
587        struct stat sb;
588        if (stat(fname, &sb) < 0) {
589            fprintf(stderr, err_str, errno, strerror(errno), "stat",
590                    fname);
591            return UNSHAR_EXIT_NO_CONFIG_INPUT;
592        }
593    }
594/* extracted from optmain.tlib near line 295 */
595
596    {
597        int res;
598        FILE* fp = fopen(fname, "r");
599        if (fp == NULL) {
600            fprintf(stderr, err_str, errno, strerror(errno), "fopen",
601                    fname);
602            return UNSHAR_EXIT_NO_CONFIG_INPUT;
603        }
604        res = unshar_file(fname, fp);
605        fclose(fp);
606        return res;
607    }
608}
609/* extracted from optmain.tlib near line 131 */
610
611/**
612 * Generated main procedure.  This will call the validate_fname procedure
613 * for every operand on the command line.  If there are no operands, then stdin
614 * is read for a list of file names to process.  stdin must not be a terminal.
615 * It must be a pipe or a file.
616 *
617 * @param[in] argc argument count
618 * @param[in] argv argument vector
619 * @returns program exit code
620 */
621int
622main(int argc, char ** argv)
623{
624    int res     = 0;
625    int proc_ct = 0;
626    int arg_ix  = optionProcess(&unsharOptions, argc, argv);
627
628/* extracted from unshar-opts.def near line 34 */
629
630    init_unshar ();
631/* extracted from optmain.tlib near line 160 */
632
633    /*
634     *  IF the input list is from the command line...
635     */
636    if (arg_ix < argc) {
637        for (; arg_ix < argc; arg_ix++) {
638            char * arg = argv[arg_ix];
639            res |= validate_fname(arg);
640            proc_ct++;
641        }
642    }
643    else
644        /*
645         * process standard input as input file
646         */
647        res = unshar_file(_("standard input"), stdin);
648    return res;
649}
650/* extracted from optmain.tlib near line 1250 */
651
652/**
653 * Print a usage message with a format and va_list argument.
654 * The optionUsage function is then invoked to print
655 * the error usage text (somewhat abbreviated) and then exit.
656 *
657 * @param[in] fmt the message format string
658 * @param[in] ap  the var-arg list.
659 * @noreturn
660 */
661void
662vusage_message(char const * fmt, va_list ap)
663{
664    char const * er_leader = _("unshar usage error:\n");
665    fputs(er_leader, stderr);
666    vfprintf(stderr, fmt, ap);
667    optionUsage(&unsharOptions, UNSHAR_EXIT_USAGE_ERROR);
668    /* NOTREACHED */
669    exit(1);
670}
671
672/**
673 * Print a usage message with a format and a variable argument list.
674 * vusage_message() is called to do the work.
675 *
676 * @param[in] fmt the message format string
677 * @param[in] ... the argument list for the message
678 * @noreturn
679 */
680void
681usage_message(char const * fmt, ...)
682{
683    va_list ap;
684    va_start(ap, fmt);
685    vusage_message(fmt, ap);
686    /* NOTREACHED */
687    va_end(ap);
688}
689
690/**
691 * Print a fatal error message and die, \a va_list style.
692 *
693 * @param[in] exit_code  the value to call exit(3) with
694 * @param[in] fmt        the death rattle message
695 * @param[in] ap         the argument list for the message
696 * @noreturn
697 */
698void
699vdie(int exit_code, char const * fmt, va_list ap)
700{
701    char const * die_leader = _("unshar fatal error:\n");
702    fputs(die_leader, stderr);
703    vfprintf(stderr, fmt, ap);
704    fflush(stderr);
705    exit(exit_code);
706    /* NOTREACHED */
707}
708
709/**
710 * Print a fatal error message and die, var-arg style.
711 *
712 * @param[in] exit_code  the value to call exit(3) with
713 * @param[in] fmt        the death rattle message
714 * @param[in] ...        the list of arguments for the message
715 * @noreturn
716 */
717void
718die(int exit_code, char const * fmt, ...)
719{
720    va_list ap;
721    va_start(ap, fmt);
722    vdie(exit_code, fmt, ap);
723    /* NOTREACHED */
724    va_end(ap);
725}
726
727/**
728 * Print a file system error fatal error message and die.
729 *
730 * @param[in] exit_code  the value to call exit(3) with.
731 * @param[in] op         the operation that failed.
732 * @param[in] fname      the file name the operation was on.
733 * @noreturn
734 */
735void
736fserr(int exit_code, char const * op, char const * fname)
737{
738    char const * fserr_fmt = _("fserr %d (%s) performing '%s' on %s\n");
739    die(exit_code, fserr_fmt, errno, strerror(errno), op, fname);
740    /* NOTREACHED */
741}
742
743/**
744 * The directory containing the data associated with unshar.
745 */
746#ifndef  PKGDATADIR
747# define PKGDATADIR ""
748#endif
749
750/**
751 * Information about the person or institution that packaged unshar
752 * for the current distribution.
753 */
754#ifndef  WITH_PACKAGER
755# define unshar_packager_info NULL
756#else
757/** Packager information for unshar. */
758static char const unshar_packager_info[] =
759    "Packaged by " WITH_PACKAGER
760
761# ifdef WITH_PACKAGER_VERSION
762        " ("WITH_PACKAGER_VERSION")"
763# endif
764
765# ifdef WITH_PACKAGER_BUG_REPORTS
766    "\nReport unshar bugs to " WITH_PACKAGER_BUG_REPORTS
767# endif
768    "\n";
769#endif
770#ifndef __doxygen__
771
772#endif /* __doxygen__ */
773/**
774 * The option definitions for unshar.  The one structure that
775 * binds them all.
776 */
777tOptions unsharOptions = {
778    OPTIONS_STRUCT_VERSION,
779    0, NULL,                    /* original argc + argv    */
780    ( OPTPROC_BASE
781    + OPTPROC_ERRSTOP
782    + OPTPROC_SHORTOPT
783    + OPTPROC_LONGOPT
784    + OPTPROC_NO_REQ_OPT
785    + OPTPROC_GNUUSAGE
786    + OPTPROC_MISUSE ),
787    0, NULL,                    /* current option index, current option */
788    NULL,         NULL,         zPROGNAME,
789    zRcName,      zCopyright,   zLicenseDescrip,
790    zFullVersion, apzHomeList,  zUsageTitle,
791    zExplain,     zDetail,      optDesc,
792    zBugsAddr,                  /* address to send bugs to */
793    NULL, NULL,                 /* extensions/saved state  */
794    optionUsage, /* usage procedure */
795    translate_option_strings,   /* translation procedure */
796    /*
797     *  Indexes to special options
798     */
799    { INDEX_OPT_MORE_HELP, /* more-help option index */
800      INDEX_OPT_SAVE_OPTS, /* save option index */
801      NO_EQUIVALENT, /* '-#' option index */
802      NO_EQUIVALENT /* index of default opt */
803    },
804    11 /* full option count */, 6 /* user option count */,
805    unshar_full_usage, unshar_short_usage,
806    NULL, NULL,
807    PKGDATADIR, unshar_packager_info
808};
809
810#if ENABLE_NLS
811/**
812 * This code is designed to translate translatable option text for the
813 * unshar program.  These translations happen upon entry
814 * to optionProcess().
815 */
816#include <stdio.h>
817#include <stdlib.h>
818#include <string.h>
819#include <unistd.h>
820#ifdef HAVE_DCGETTEXT
821# include <gettext.h>
822#endif
823#include <autoopts/usage-txt.h>
824
825static char * AO_gettext(char const * pz);
826static void   coerce_it(void ** s);
827
828/**
829 * AutoGen specific wrapper function for gettext.  It relies on the macro _()
830 * to convert from English to the target language, then strdup-duplicates the
831 * result string.  It tries the "libopts" domain first, then whatever has been
832 * set via the \a textdomain(3) call.
833 *
834 * @param[in] pz the input text used as a lookup key.
835 * @returns the translated text (if there is one),
836 *   or the original text (if not).
837 */
838static char *
839AO_gettext(char const * pz)
840{
841    char * res;
842    if (pz == NULL)
843        return NULL;
844#ifdef HAVE_DCGETTEXT
845    /*
846     * While processing the option_xlateable_txt data, try to use the
847     * "libopts" domain.  Once we switch to the option descriptor data,
848     * do *not* use that domain.
849     */
850    if (option_xlateable_txt.field_ct != 0) {
851        res = dgettext("libopts", pz);
852        if (res == pz)
853            res = (char *)VOIDP(_(pz));
854    } else
855        res = (char *)VOIDP(_(pz));
856#else
857    res = (char *)VOIDP(_(pz));
858#endif
859    if (res == pz)
860        return res;
861    res = strdup(res);
862    if (res == NULL) {
863        fputs(_("No memory for duping translated strings\n"), stderr);
864        exit(UNSHAR_EXIT_NOMEM);
865    }
866    return res;
867}
868
869/**
870 * All the pointers we use are marked "* const", but they are stored in
871 * writable memory.  Coerce the mutability and set the pointer.
872 */
873static void coerce_it(void ** s) { *s = AO_gettext(*s);
874}
875
876/**
877 * Translate all the translatable strings in the unsharOptions
878 * structure defined above.  This is done only once.
879 */
880static void
881translate_option_strings(void)
882{
883    tOptions * const opts = &unsharOptions;
884
885    /*
886     *  Guard against re-translation.  It won't work.  The strings will have
887     *  been changed by the first pass through this code.  One shot only.
888     */
889    if (option_xlateable_txt.field_ct != 0) {
890        /*
891         *  Do the translations.  The first pointer follows the field count
892         *  field.  The field count field is the size of a pointer.
893         */
894        char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
895        int     ix  = option_xlateable_txt.field_ct;
896
897        do {
898            ppz++; /* skip over field_ct */
899            *ppz = AO_gettext(*ppz);
900        } while (--ix > 0);
901        /* prevent re-translation and disable "libopts" domain lookup */
902        option_xlateable_txt.field_ct = 0;
903
904        coerce_it(VOIDP(&(opts->pzCopyright)));
905        coerce_it(VOIDP(&(opts->pzCopyNotice)));
906        coerce_it(VOIDP(&(opts->pzFullVersion)));
907    }
908}
909#endif /* ENABLE_NLS */
910
911#ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
912/** I18N function strictly for xgettext.  Do not compile. */
913static void bogus_function(void) {
914  /* TRANSLATORS:
915
916     The following dummy function was crated solely so that xgettext can
917     extract the correct strings.  These strings are actually referenced
918     by a field name in the unsharOptions structure noted in the
919     comments below.  The literal text is defined in unshar_opt_strs.
920
921     NOTE: the strings below are segmented with respect to the source string
922     unshar_opt_strs.  The strings above are handed off for translation
923     at run time a paragraph at a time.  Consequently, they are presented here
924     for translation a paragraph at a time.
925
926     ALSO: often the description for an option will reference another option
927     by name.  These are set off with apostrophe quotes (I hope).  Do not
928     translate option names.
929   */
930  /* referenced via unsharOptions.pzCopyright */
931  puts(_("unshar (GNU sharutils) 4.15.2\n\
932Copyright (C) 1994-2015 Free Software Foundation, Inc., all rights reserved.\n\
933This is free software. It is licensed for use, modification and\n\
934redistribution under the terms of the GNU General Public License,\n\
935version 3 or later <http://gnu.org/licenses/gpl.html>\n"));
936
937  /* referenced via unsharOptions.pzCopyNotice */
938  puts(_("unshar is free software: you can redistribute it and/or modify it under the\n\
939terms of the GNU General Public License as published by the Free Software\n\
940Foundation, either version 3 of the License, or (at your option) any later\n\
941version.\n\n"));
942  puts(_("unshar is distributed in the hope that it will be useful, but WITHOUT ANY\n\
943WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\
944FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n\
945details.\n\n"));
946  puts(_("You should have received a copy of the GNU General Public License along\n\
947with this program.  If not, see <http://www.gnu.org/licenses/>.\n"));
948
949  /* referenced via unsharOptions.pzUsageTitle */
950  puts(_("unshar (GNU sharutils) - unpack a shar archive\n\
951Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n"));
952
953  /* referenced via unsharOptions.pzExplain */
954  puts(_("\n\
955If no arguments are provided, input arguments are read from stdin,\n\
956one per line; blank and '#'-prefixed lines are comments.\n\
957'stdin' may not be a terminal (tty).\n"));
958
959  /* referenced via unsharOptions.pzDetail */
960  puts(_("Unshar scans the input files (typically email messages) looking for the\n\
961start of a shell archive.  If no files are given, then standard input is\n\
962processed instead.  It then passes each archive discovered through an\n\
963invocation of the shell program to unpack it.\n"));
964
965  /* referenced via unsharOptions.pzFullVersion */
966  puts(_("unshar (GNU sharutils) 4.15.2"));
967
968  /* referenced via unsharOptions.pzFullUsage */
969  puts(_("unshar (GNU sharutils) - unpack a shar archive\n\
970Usage:  unshar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\n"));
971  puts(_("   -d, --directory=DIR        unpack into the directory DIR\n"));
972  puts(_("   -c, --overwrite            overwrite any pre-existing files\n"));
973  puts(_("   -f, --force                an alias for the 'overwrite' option\n"));
974  puts(_("   -E, --split-at=SPLIT-PAT   split input on SPLIT-PAT lines\n"));
975  puts(_("   -e, --exit-0               split input on \"exit 0\" lines\n\
976                                - prohibits the option 'split-at'\n"));
977  puts(_("   -D, --debug                debug the shell code\n"));
978  puts(_("   -v, --version[=MODE]       output version information and exit\n"));
979  puts(_("   -h, --help                 display extended usage information and exit\n"));
980  puts(_("   -!, --more-help            extended usage information passed thru pager\n"));
981  puts(_("   -R, --save-opts[=FILE]     save the option state to the config file FILE\n"));
982  puts(_("   -r, --load-opts=FILE       load options from the config file FILE\n\
983                                - disabled as '--no-load-opts'\n\
984                                - may appear multiple times\n\n"));
985  puts(_("Options are specified by doubled hyphens and their name or by a single\n\
986hyphen and the flag character.\n\n"));
987  puts(_("If no arguments are provided, input arguments are read from stdin,\n\
988one per line; blank and '#'-prefixed lines are comments.\n\
989'stdin' may not be a terminal (tty).\n\n"));
990  puts(_("The following option preset mechanisms are supported:\n"));
991  puts(_(" - reading file $HOME/.sharrc\n\n\
992'unshar' scans the input files (typically email messages) looking for the\n\
993start of a shell archive.  If no files are given, then standard input is\n\
994processed instead.  It then passes each archive discovered through an\n\
995invocation of the shell program to unpack it.\n\n"));
996  puts(_("Please send bug reports to:  <bug-gnu-utils@gnu.org>\n"));
997
998  /* referenced via unsharOptions.pzShortUsage */
999  puts(_("unshar (GNU sharutils) - unpack a shar archive\n\
1000Usage:  unshar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\
1001Try 'unshar --help' for more information.\n"));
1002  /* LIBOPTS-MESSAGES: */
1003#line 67 "../autoopts.c"
1004  puts(_("allocation of %d bytes failed\n"));
1005#line 93 "../autoopts.c"
1006  puts(_("allocation of %d bytes failed\n"));
1007#line 53 "../init.c"
1008  puts(_("AutoOpts function called without option descriptor\n"));
1009#line 86 "../init.c"
1010  puts(_("\tThis exceeds the compiled library version:  "));
1011#line 84 "../init.c"
1012  puts(_("Automated Options Processing Error!\n"
1013       "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
1014#line 80 "../autoopts.c"
1015  puts(_("realloc of %d bytes at 0x%p failed\n"));
1016#line 88 "../init.c"
1017  puts(_("\tThis is less than the minimum library version:  "));
1018#line 121 "../version.c"
1019  puts(_("Automated Options version %s\n"
1020       "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
1021#line 87 "../makeshell.c"
1022  puts(_("(AutoOpts bug):  %s.\n"));
1023#line 90 "../reset.c"
1024  puts(_("optionResetOpt() called, but reset-option not configured"));
1025#line 292 "../usage.c"
1026  puts(_("could not locate the 'help' option"));
1027#line 336 "../autoopts.c"
1028  puts(_("optionProcess() was called with invalid data"));
1029#line 748 "../usage.c"
1030  puts(_("invalid argument type specified"));
1031#line 598 "../find.c"
1032  puts(_("defaulted to option with optional arg"));
1033#line 76 "../alias.c"
1034  puts(_("aliasing option is out of range."));
1035#line 234 "../enum.c"
1036  puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
1037#line 108 "../find.c"
1038  puts(_("  The following options match:\n"));
1039#line 293 "../find.c"
1040  puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
1041#line 161 "../check.c"
1042  puts(_("%s: Command line arguments required\n"));
1043#line 43 "../alias.c"
1044  puts(_("%d %s%s options allowed\n"));
1045#line 94 "../makeshell.c"
1046  puts(_("%s error %d (%s) calling %s for '%s'\n"));
1047#line 306 "../makeshell.c"
1048  puts(_("interprocess pipe"));
1049#line 168 "../version.c"
1050  puts(_("error: version option argument '%c' invalid.  Use:\n"
1051       "\t'v' - version only\n"
1052       "\t'c' - version and copyright\n"
1053       "\t'n' - version and full copyright notice\n"));
1054#line 58 "../check.c"
1055  puts(_("%s error:  the '%s' and '%s' options conflict\n"));
1056#line 217 "../find.c"
1057  puts(_("%s: The '%s' option has been disabled."));
1058#line 430 "../find.c"
1059  puts(_("%s: The '%s' option has been disabled."));
1060#line 38 "../alias.c"
1061  puts(_("-equivalence"));
1062#line 469 "../find.c"
1063  puts(_("%s: illegal option -- %c\n"));
1064#line 110 "../reset.c"
1065  puts(_("%s: illegal option -- %c\n"));
1066#line 271 "../find.c"
1067  puts(_("%s: illegal option -- %s\n"));
1068#line 755 "../find.c"
1069  puts(_("%s: illegal option -- %s\n"));
1070#line 118 "../reset.c"
1071  puts(_("%s: illegal option -- %s\n"));
1072#line 335 "../find.c"
1073  puts(_("%s: unknown vendor extension option -- %s\n"));
1074#line 159 "../enum.c"
1075  puts(_("  or an integer from %d through %d\n"));
1076#line 169 "../enum.c"
1077  puts(_("  or an integer from %d through %d\n"));
1078#line 747 "../usage.c"
1079  puts(_("%s error:  invalid option descriptor for %s\n"));
1080#line 1081 "../usage.c"
1081  puts(_("%s error:  invalid option descriptor for %s\n"));
1082#line 385 "../find.c"
1083  puts(_("%s: invalid option name: %s\n"));
1084#line 527 "../find.c"
1085  puts(_("%s: The '%s' option requires an argument.\n"));
1086#line 156 "../autoopts.c"
1087  puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
1088       "\t'%s' and '%s'."));
1089#line 94 "../check.c"
1090  puts(_("%s error:  The %s option is required\n"));
1091#line 632 "../find.c"
1092  puts(_("%s: The '%s' option cannot have an argument.\n"));
1093#line 151 "../check.c"
1094  puts(_("%s: Command line arguments are not allowed.\n"));
1095#line 535 "../save.c"
1096  puts(_("error %d (%s) creating %s\n"));
1097#line 234 "../enum.c"
1098  puts(_("%s error:  '%s' does not match any %s keywords.\n"));
1099#line 93 "../reset.c"
1100  puts(_("%s error: The '%s' option requires an argument.\n"));
1101#line 184 "../save.c"
1102  puts(_("error %d (%s) stat-ing %s\n"));
1103#line 238 "../save.c"
1104  puts(_("error %d (%s) stat-ing %s\n"));
1105#line 143 "../restore.c"
1106  puts(_("%s error: no saved option state\n"));
1107#line 231 "../autoopts.c"
1108  puts(_("'%s' is not a command line option.\n"));
1109#line 111 "../time.c"
1110  puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
1111#line 132 "../save.c"
1112  puts(_("'%s' not defined\n"));
1113#line 50 "../time.c"
1114  puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
1115#line 92 "../check.c"
1116  puts(_("%s error:  The %s option must appear %d times.\n"));
1117#line 164 "../numeric.c"
1118  puts(_("%s error:  '%s' is not a recognizable number.\n"));
1119#line 200 "../enum.c"
1120  puts(_("%s error:  %s exceeds %s keyword count\n"));
1121#line 330 "../usage.c"
1122  puts(_("Try '%s %s' for more information.\n"));
1123#line 45 "../alias.c"
1124  puts(_("one %s%s option allowed\n"));
1125#line 208 "../makeshell.c"
1126  puts(_("standard output"));
1127#line 943 "../makeshell.c"
1128  puts(_("standard output"));
1129#line 274 "../usage.c"
1130  puts(_("standard output"));
1131#line 415 "../usage.c"
1132  puts(_("standard output"));
1133#line 625 "../usage.c"
1134  puts(_("standard output"));
1135#line 175 "../version.c"
1136  puts(_("standard output"));
1137#line 274 "../usage.c"
1138  puts(_("standard error"));
1139#line 415 "../usage.c"
1140  puts(_("standard error"));
1141#line 625 "../usage.c"
1142  puts(_("standard error"));
1143#line 175 "../version.c"
1144  puts(_("standard error"));
1145#line 208 "../makeshell.c"
1146  puts(_("write"));
1147#line 943 "../makeshell.c"
1148  puts(_("write"));
1149#line 273 "../usage.c"
1150  puts(_("write"));
1151#line 414 "../usage.c"
1152  puts(_("write"));
1153#line 624 "../usage.c"
1154  puts(_("write"));
1155#line 174 "../version.c"
1156  puts(_("write"));
1157#line 60 "../numeric.c"
1158  puts(_("%s error:  %s option value %ld is out of range.\n"));
1159#line 44 "../check.c"
1160  puts(_("%s error:  %s option requires the %s option\n"));
1161#line 131 "../save.c"
1162  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1163#line 183 "../save.c"
1164  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1165#line 237 "../save.c"
1166  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1167#line 256 "../save.c"
1168  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1169#line 534 "../save.c"
1170  puts(_("%s warning:  cannot save options - %s not regular file\n"));
1171  /* END-LIBOPTS-MESSAGES */
1172}
1173#endif /* uncompilable code */
1174#ifdef  __cplusplus
1175}
1176#endif
1177/* unshar-opts.c ends here */
1178