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