1 /*   -*- buffer-read-only: t -*- vi: set ro:
2  *
3  *  DO NOT EDIT THIS FILE   (shar-opts.c)
4  *
5  *  It has been AutoGen-ed
6  *  From the definitions    shar-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 shar 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 shar 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  *  shar 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  *  shar 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 "shar-opts.h"
44 #include <sys/types.h>
45 
46 #include <limits.h>
47 #include <stdio.h>
48 #include <stdlib.h>
49 #include <errno.h>
50 
51 #ifdef  __cplusplus
52 extern "C" {
53 #endif
54 extern FILE * option_usage_fp;
55 #define zCopyright      (shar_opt_strs+0)
56 #define zLicenseDescrip (shar_opt_strs+290)
57 
58 /*
59  *  global included definitions
60  */
61 
62 bool initialization_done = false;
63 int optidx = 0;
64 
65 #ifndef NULL
66 #  define NULL 0
67 #endif
68 
69 /**
70  *  static const strings for shar options
71  */
72 static char const shar_opt_strs[10327] =
73 /*     0 */ "shar (GNU sharutils) 4.15.2\n"
74             "Copyright (C) 1994-2015 Free Software Foundation, Inc., all rights reserved.\n"
75             "This is free software. It is licensed for use, modification and\n"
76             "redistribution under the terms of the GNU General Public License,\n"
77             "version 3 or later <http://gnu.org/licenses/gpl.html>\n\0"
78 /*   290 */ "shar is free software: you can redistribute it and/or modify it under the\n"
79             "terms of the GNU General Public License as published by the Free Software\n"
80             "Foundation, either version 3 of the License, or (at your option) any later\n"
81             "version.\n\n"
82             "shar is distributed in the hope that it will be useful, but WITHOUT ANY\n"
83             "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
84             "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n"
85             "details.\n\n"
86             "You should have received a copy of the GNU General Public License along\n"
87             "with this program.  If not, see <http://www.gnu.org/licenses/>.\n\0"
88 /*   887 */ "Specifying compression:\0"
89 /*   911 */ "specify compression for input files\0"
90 /*   947 */ "INTERMIX_TYPE\0"
91 /*   961 */ "intermix-type\0"
92 /*   975 */ "specify compaction (compression) program\0"
93 /*  1016 */ "COMPACTOR\0"
94 /*  1026 */ "compactor\0"
95 /*  1036 */ "pass LEVEL for compression\0"
96 /*  1063 */ "LEVEL_OF_COMPRESSION\0"
97 /*  1084 */ "level-of-compression\0"
98 /*  1105 */ "bzip2 and uuencode files (deprecated)\0"
99 /*  1143 */ "BZIP2\0"
100 /*  1149 */ "bzip2\0"
101 /*  1155 */ "gzip and uuencode files (deprecated)\0"
102 /*  1192 */ "GZIP\0"
103 /*  1197 */ "gzip\0"
104 /*  1202 */ "compress and uuencode files (deprecated)\0"
105 /*  1243 */ "COMPRESS\0"
106 /*  1252 */ "compress\0"
107 /*  1261 */ "an alias for the 'level-of-compression' option (deprecated)\0"
108 /*  1321 */ "level-for-gzip\0"
109 /*  1336 */ "pass bits (default 12) to compress (deprecated)\0"
110 /*  1384 */ "BITS_PER_CODE\0"
111 /*  1398 */ "bits-per-code\0"
112 /*  1412 */ "12\0"
113 /*  1415 */ "Specifying file encoding methodology:\0"
114 /*  1453 */ "decide uuencoding for each file\0"
115 /*  1485 */ "MIXED_UUENCODE\0"
116 /*  1500 */ "mixed-uuencode\0"
117 /*  1515 */ "treat all files as binary\0"
118 /*  1541 */ "UUENCODE\0"
119 /*  1550 */ "uuencode\0"
120 /*  1559 */ "treat all files as text\0"
121 /*  1583 */ "TEXT_FILES\0"
122 /*  1594 */ "text-files\0"
123 /*  1605 */ "Specifying file selection and output modes:\0"
124 /*  1649 */ "print output to file PREFIX.nn\0"
125 /*  1680 */ "OUTPUT_PREFIX\0"
126 /*  1694 */ "output-prefix\0"
127 /*  1708 */ "split archive, not files, to size\0"
128 /*  1742 */ "WHOLE_SIZE_LIMIT\0"
129 /*  1759 */ "whole-size-limit\0"
130 /*  1776 */ "split archive or files to size\0"
131 /*  1807 */ "SPLIT_SIZE_LIMIT\0"
132 /*  1824 */ "split-size-limit\0"
133 /*  1841 */ "read file list from a file\0"
134 /*  1868 */ "INPUT_FILE_LIST\0"
135 /*  1884 */ "input-file-list\0"
136 /*  1900 */ "read file list from standard input (deprecated)\0"
137 /*  1948 */ "STDIN_FILE_LIST\0"
138 /*  1964 */ "stdin-file-list\0"
139 /*  1980 */ "Controlling the shar headers:\0"
140 /*  2010 */ "use name to document the archive\0"
141 /*  2043 */ "ARCHIVE_NAME\0"
142 /*  2056 */ "archive-name\0"
143 /*  2069 */ "override the submitter name\0"
144 /*  2097 */ "SUBMITTER\0"
145 /*  2107 */ "submitter\0"
146 /*  2117 */ "output Submitted-by: & Archive-name: headers\0"
147 /*  2162 */ "NET_HEADERS\0"
148 /*  2174 */ "net-headers\0"
149 /*  2186 */ "start the shar with a cut line\0"
150 /*  2217 */ "CUT_MARK\0"
151 /*  2226 */ "cut-mark\0"
152 /*  2235 */ "translate messages in the script\0"
153 /*  2268 */ "TRANSLATE\0"
154 /*  2278 */ "translate\0"
155 /*  2288 */ "Protecting against transmission issues:\0"
156 /*  2328 */ "do not use `wc -c' to check size\0"
157 /*  2361 */ "NO_CHARACTER_COUNT\0"
158 /*  2380 */ "no-character-count\0"
159 /*  2399 */ "do not use md5sum digest to verify\0"
160 /*  2434 */ "NO_MD5_DIGEST\0"
161 /*  2448 */ "no-md5-digest\0"
162 /*  2462 */ "apply the prefix character on every line\0"
163 /*  2503 */ "FORCE_PREFIX\0"
164 /*  2516 */ "force-prefix\0"
165 /*  2529 */ "use delim to delimit the files\0"
166 /*  2560 */ "HERE_DELIMITER\0"
167 /*  2575 */ "here-delimiter\0"
168 /*  2590 */ "SHAR_EOF\0"
169 /*  2599 */ "Producing different kinds of shars:\0"
170 /*  2635 */ "produce very simple shars\0"
171 /*  2661 */ "VANILLA_OPERATION\0"
172 /*  2679 */ "vanilla-operation\0"
173 /*  2697 */ "use temporary files between programs\0"
174 /*  2734 */ "NO_PIPING\0"
175 /*  2744 */ "no-piping\0"
176 /*  2754 */ "blindly overwrite existing files\0"
177 /*  2787 */ "NO_CHECK_EXISTING\0"
178 /*  2805 */ "no-check-existing\0"
179 /*  2823 */ "ask user before overwriting files\0"
180 /*  2857 */ "QUERY_USER\0"
181 /*  2868 */ "query-user\0"
182 /*  2879 */ "do not restore modification times\0"
183 /*  2913 */ "NO_TIMESTAMP\0"
184 /*  2926 */ "no-timestamp\0"
185 /*  2939 */ "avoid verbose messages at unshar time\0"
186 /*  2977 */ "QUIET_UNSHAR\0"
187 /*  2990 */ "quiet-unshar\0"
188 /*  3003 */ "restore in one directory, despite hierarchy\0"
189 /*  3047 */ "BASENAME\0"
190 /*  3056 */ "basename\0"
191 /*  3065 */ "Internationalization options:\0"
192 /*  3095 */ "do not internationalize\0"
193 /*  3119 */ "NO_I18N\0"
194 /*  3127 */ "no-i18n\0"
195 /*  3135 */ "print directory with shar messages\0"
196 /*  3170 */ "PRINT_TEXT_DOMAIN_DIR\0"
197 /*  3192 */ "print-text-domain-dir\0"
198 /*  3214 */ "User feedback/entertainment:\0"
199 /*  3243 */ "do not output verbose messages\0"
200 /*  3274 */ "QUIET\0"
201 /*  3280 */ "quiet\0"
202 /*  3286 */ "an alias for the 'quiet' option\0"
203 /*  3318 */ "silent\0"
204 /*  3325 */ "display extended usage information and exit\0"
205 /*  3369 */ "help\0"
206 /*  3374 */ "extended usage information passed thru pager\0"
207 /*  3419 */ "more-help\0"
208 /*  3429 */ "output version information and exit\0"
209 /*  3465 */ "version\0"
210 /*  3473 */ "save the option state to a config file\0"
211 /*  3512 */ "save-opts\0"
212 /*  3522 */ "load options from a config file\0"
213 /*  3554 */ "LOAD_OPTS\0"
214 /*  3564 */ "no-load-opts\0"
215 /*  3577 */ "no\0"
216 /*  3580 */ "SHAR\0"
217 /*  3585 */ "shar (GNU sharutils) - create a shell archive\n"
218             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\0"
219 /*  3701 */ "$HOME\0"
220 /*  3707 */ ".sharrc\0"
221 /*  3715 */ "bug-gnu-utils@gnu.org\0"
222 /*  3737 */ "If no 'file's are specified, the list of input files is read from standard\n"
223             "input.  Standard input must not be a terminal.\n\0"
224 /*  3860 */ "'shar' creates \"shell archives\" (or shar files) which are in text format\n"
225             "and can be emailed.  These files may be unpacked later by executing them\n"
226             "with '/bin/sh'.  The resulting archive is sent to standard out unless the\n"
227             "'-o' option is given.  A wide range of features provide extensive\n"
228             "flexibility in manufacturing shars and in specifying 'shar' \"smartness\".\n"
229             "Archives may be fairly simple ('--vanilla-operation') or essentially a\n"
230             "mailable 'tar' archive.\n\n"
231             "Options may be specified in any order until a 'file' argument is\n"
232             "recognized.  If the '--intermix-type' option has been specified, more\n"
233             "compression and encoding options will be recognized between the 'file'\n"
234             "arguments.\n\n"
235             "Though this program supports 'uuencode'-d files, they are deprecated.  If\n"
236             "you are emailing files, please consider mime-encoded files.  If you do\n"
237             "'uuencode', base64 is the preferred encoding method.\n\0"
238 /*  4732 */ "shar (GNU sharutils) 4.15.2\0"
239 /*  4760 */ "shar (GNU sharutils) - create a shell archive\n"
240             "Usage:  shar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\n"
241             "Specify compression:\n"
242             "   -p, --intermix-type        specify compression for input files\n"
243             "                                - prohibits the option 'vanilla-operation'\n"
244             "   -C, --compactor=PROG       specify compaction (compression) program PROG\n"
245             "                                - prohibits the option 'vanilla-operation'\n"
246             "                                - may appear multiple times\n"
247             "                                - it must be known to shar: xz gzip bzip2\n"
248             "   -g, --level-of-compression=LEVEL\n"
249             "                              pass LEVEL for compression\n"
250             "                                - it must be in the range: 1 to 9\n\n"
251             "Specify file encoding methodology:\n"
252             "   -M, --mixed-uuencode       decide uuencoding for each file\n"
253             "   -B, --uuencode             treat all files as binary\n"
254             "                                - an alternate for mixed-uuencode\n"
255             "   -T, --text-files           treat all files as text\n"
256             "                                - an alternate for mixed-uuencode\n\n"
257             "Specifying file selection and output modes:\n"
258             "   -o, --output-prefix=str    print output to file PREFIX.nn\n"
259             "   -l, --whole-size-limit=SIZE\n"
260             "                              split archive, not files, to SIZE\n"
261             "                                - requires the option 'output-prefix'\n"
262             "                                - is scalable with a suffix: k/K/m/M/g/G/t/T\n"
263             "                                - it must lie in one of the ranges:\n"
264             "                                  8 to 1023, or 8192 to 4194304\n"
265             "   -L, --split-size-limit=SIZE\n"
266             "                              split archive or files to SIZE\n"
267             "                                - requires the option 'output-prefix'\n"
268             "                                - is scalable with a suffix: k/K/m/M/g/G/t/T\n"
269             "                                - it must lie in one of the ranges:\n"
270             "                                  8 to 1023, or 8192 to 4194304\n"
271             "                                - an alternate for 'whole-size-limit'\n"
272             "   -I, --input-file-list=FILE read file list from FILE\n\n"
273             "Controlling the shar headers:\n"
274             "   -n, --archive-name=NAME    use NAME to document the archive\n"
275             "   -s, --submitter=NAME       override the submitter name with NAME\n"
276             "   -a, --net-headers          output Submitted-by: & Archive-name: headers\n"
277             "                                - requires the option 'archive-name'\n"
278             "   -c, --cut-mark             start the shar with a cut line\n"
279             "   -t, --translate            translate messages in the script\n\n"
280             "Protecting against transmission issues:\n"
281             "       --no-character-count   do not use `wc -c' to check size\n"
282             "   -D, --no-md5-digest        do not use md5sum digest to verify\n"
283             "   -F, --force-prefix         apply the prefix character on every line\n"
284             "   -d, --here-delimiter=DELIM use DELIM to delimit the files\n\n"
285             "Producing different kinds of shars:\n"
286             "   -V, --vanilla-operation    produce very simple shars\n"
287             "   -P, --no-piping            use temporary files between programs\n"
288             "   -x, --no-check-existing    blindly overwrite existing files\n"
289             "   -X, --query-user           ask user before overwriting files\n"
290             "                                - prohibits the option 'vanilla-operation'\n"
291             "   -m, --no-timestamp         do not restore modification times\n"
292             "   -Q, --quiet-unshar         avoid verbose messages at unshar time\n"
293             "   -f, --basename             restore in one directory, despite hierarchy\n\n"
294             "Internationalization options:\n"
295             "       --no-i18n              do not internationalize\n"
296             "       --print-text-domain-dir  print directory with shar messages\n\n"
297             "User feedback/entertainment:\n"
298             "   -q, --quiet                do not output verbose messages\n"
299             "       --silent               an alias for the 'quiet' option\n\n"
300             "Version, usage and configuration options:\n"
301             "   -v, --version[=MODE]       output version information and exit\n"
302             "   -h, --help                 display extended usage information and exit\n"
303             "   -!, --more-help            extended usage information passed thru pager\n"
304             "   -R, --save-opts[=FILE]     save the option state to a config file FILE\n"
305             "   -r, --load-opts=FILE       load options from the config file FILE\n"
306             "                                - disabled with '--no-load-opts'\n"
307             "                                - may appear multiple times\n\n"
308             "Options are specified by doubled hyphens and their name or by a single\n"
309             "hyphen and the flag character.\n"
310             "If no 'file's are specified, the list of input files is read from a\n"
311             "standard input.  Standard input must not be a terminal.\n\n"
312             "The following option preset mechanisms are supported:\n"
313             " - reading file $HOME/.sharrc\n\n"
314             "'shar' creates \"shell archives\" (or shar files) which are in text format\n"
315             "and can be emailed.  These files may be unpacked later by executing them\n"
316             "with '/bin/sh'.  The resulting archive is sent to standard out unless the\n"
317             "'-o' option is given.  A wide range of features provide extensive\n"
318             "flexibility in manufacturing shars and in specifying 'shar' \"smartness\".\n"
319             "Archives may be fairly simple ('--vanilla-operation') or essentially a\n"
320             "mailable 'tar' archive.\n\n"
321             "Options may be specified in any order until a 'file' argument is\n"
322             "recognized.  If the '--intermix-type' option has been specified, more\n"
323             "compression and encoding options will be recognized between the 'file'\n"
324             "arguments.\n\n"
325             "Though this program supports 'uuencode'-d files, they are deprecated.  If\n"
326             "you are emailing files, please consider mime-encoded files.  If you do\n"
327             "'uuencode', base64 is the preferred encoding method.\n\n"
328             "Please send bug reports to:  <bug-gnu-utils@gnu.org>\n\0"
329 /* 10169 */ "shar (GNU sharutils) - create a shell archive\n"
330             "Usage:  shar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n"
331             "Try 'shar --help' for more information.\n";
332 
333 /**
334  *  compression option description:
335  */
336 /** compression option separation text */
337 #define COMPRESSION_DESC      (shar_opt_strs+887)
338 #define COMPRESSION_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
339 
340 /**
341  *  intermix-type option description with
342  *  "Must also have options" and "Incompatible options":
343  */
344 /** Descriptive text for the intermix-type option */
345 #define INTERMIX_TYPE_DESC      (shar_opt_strs+911)
346 /** Upper-cased name for the intermix-type option */
347 #define INTERMIX_TYPE_NAME      (shar_opt_strs+947)
348 /** Name string for the intermix-type option */
349 #define INTERMIX_TYPE_name      (shar_opt_strs+961)
350 /** Other options that appear in conjunction with the intermix-type option */
351 static int const aIntermix_TypeCantList[] = {
352     INDEX_OPT_VANILLA_OPERATION, NO_EQUIVALENT };
353 /** Compiled in flag settings for the intermix-type option */
354 #define INTERMIX_TYPE_FLAGS     (OPTST_DISABLED)
355 
356 /**
357  *  compactor option description with
358  *  "Must also have options" and "Incompatible options":
359  */
360 /** Descriptive text for the compactor option */
361 #define COMPACTOR_DESC      (shar_opt_strs+975)
362 /** Upper-cased name for the compactor option */
363 #define COMPACTOR_NAME      (shar_opt_strs+1016)
364 /** Name string for the compactor option */
365 #define COMPACTOR_name      (shar_opt_strs+1026)
366 /** Other options that appear in conjunction with the compactor option */
367 static int const aCompactorCantList[] = {
368     INDEX_OPT_VANILLA_OPERATION, NO_EQUIVALENT };
369 /** Compiled in flag settings for the compactor option */
370 #define COMPACTOR_FLAGS     (OPTST_DISABLED \
371         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
372 
373 /**
374  *  level-of-compression option description:
375  */
376 /** Descriptive text for the level-of-compression option */
377 #define LEVEL_OF_COMPRESSION_DESC      (shar_opt_strs+1036)
378 /** Upper-cased name for the level-of-compression option */
379 #define LEVEL_OF_COMPRESSION_NAME      (shar_opt_strs+1063)
380 /** Name string for the level-of-compression option */
381 #define LEVEL_OF_COMPRESSION_name      (shar_opt_strs+1084)
382 /** The compiled in default value for the level-of-compression option argument */
383 #define LEVEL_OF_COMPRESSION_DFT_ARG   ((char const*)9)
384 /** Compiled in flag settings for the level-of-compression option */
385 #define LEVEL_OF_COMPRESSION_FLAGS     (OPTST_DISABLED \
386         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
387 
388 /**
389  *  bzip2 option description:
390  */
391 /** Descriptive text for the bzip2 option */
392 #define BZIP2_DESC      (shar_opt_strs+1105)
393 /** Upper-cased name for the bzip2 option */
394 #define BZIP2_NAME      (shar_opt_strs+1143)
395 /** Name string for the bzip2 option */
396 #define BZIP2_name      (shar_opt_strs+1149)
397 /** Compiled in flag settings for the bzip2 option */
398 #define BZIP2_FLAGS     (OPTST_DISABLED | OPTST_DEPRECATED)
399 
400 /**
401  *  gzip option description:
402  */
403 /** Descriptive text for the gzip option */
404 #define GZIP_DESC      (shar_opt_strs+1155)
405 /** Upper-cased name for the gzip option */
406 #define GZIP_NAME      (shar_opt_strs+1192)
407 /** Name string for the gzip option */
408 #define GZIP_name      (shar_opt_strs+1197)
409 /** Compiled in flag settings for the gzip option */
410 #define GZIP_FLAGS     (OPTST_DISABLED | OPTST_DEPRECATED)
411 
412 /**
413  *  compress option description:
414  */
415 #ifdef HAVE_COMPRESS
416 /** Descriptive text for the compress option */
417 #define COMPRESS_DESC      (shar_opt_strs+1202)
418 /** Upper-cased name for the compress option */
419 #define COMPRESS_NAME      (shar_opt_strs+1243)
420 /** Name string for the compress option */
421 #define COMPRESS_name      (shar_opt_strs+1252)
422 /** Compiled in flag settings for the compress option */
423 #define COMPRESS_FLAGS     (OPTST_DISABLED | OPTST_DEPRECATED)
424 
425 #else   /* disable compress */
426 #define COMPRESS_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
427 #define COMPRESS_NAME      NULL
428 #define COMPRESS_DESC      NULL
429 #define COMPRESS_name      NULL
430 #endif  /* HAVE_COMPRESS */
431 
432 /**
433  *  level-for-gzip option description:
434  */
435 /** Descriptive text for the level-for-gzip option */
436 #define LEVEL_FOR_GZIP_DESC    (shar_opt_strs+1261)
437 #define LEVEL_FOR_GZIP_NAME    NULL
438 /** Unmodified name string for the level-for-gzip option */
439 #define LEVEL_FOR_GZIP_name    (shar_opt_strs+1321)
440 /** Compiled in flag settings for the level-for-gzip option */
441 #define LEVEL_FOR_GZIP_FLAGS     (LEVEL_OF_COMPRESSION_FLAGS | OPTST_ALIAS | OPTST_DEPRECATED)
442 
443 /**
444  *  bits-per-code option description:
445  */
446 #ifdef HAVE_COMPRESS
447 /** Descriptive text for the bits-per-code option */
448 #define BITS_PER_CODE_DESC      (shar_opt_strs+1336)
449 /** Upper-cased name for the bits-per-code option */
450 #define BITS_PER_CODE_NAME      (shar_opt_strs+1384)
451 /** Name string for the bits-per-code option */
452 #define BITS_PER_CODE_name      (shar_opt_strs+1398)
453 /** The compiled in default value for the bits-per-code option argument */
454 #define BITS_PER_CODE_DFT_ARG   (shar_opt_strs+1412)
455 /** Compiled in flag settings for the bits-per-code option */
456 #define BITS_PER_CODE_FLAGS     (OPTST_DISABLED | OPTST_DEPRECATED \
457         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
458 
459 #else   /* disable bits-per-code */
460 #define BITS_PER_CODE_FLAGS     (OPTST_OMITTED | OPTST_NO_INIT)
461 #define BITS_PER_CODE_DFT_ARG   NULL
462 #define BITS_PER_CODE_NAME      NULL
463 #define BITS_PER_CODE_DESC      NULL
464 #define BITS_PER_CODE_name      NULL
465 #endif  /* HAVE_COMPRESS */
466 
467 /**
468  *  encoding option description:
469  */
470 /** encoding option separation text */
471 #define ENCODING_DESC      (shar_opt_strs+1415)
472 #define ENCODING_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
473 
474 /**
475  *  mixed-uuencode option description:
476  */
477 /** Descriptive text for the mixed-uuencode option */
478 #define MIXED_UUENCODE_DESC      (shar_opt_strs+1453)
479 /** Upper-cased name for the mixed-uuencode option */
480 #define MIXED_UUENCODE_NAME      (shar_opt_strs+1485)
481 /** Name string for the mixed-uuencode option */
482 #define MIXED_UUENCODE_name      (shar_opt_strs+1500)
483 /** Compiled in flag settings for the mixed-uuencode option */
484 #define MIXED_UUENCODE_FLAGS     (OPTST_DISABLED)
485 
486 /**
487  *  uuencode option description:
488  */
489 /** Descriptive text for the uuencode option */
490 #define UUENCODE_DESC      (shar_opt_strs+1515)
491 /** Upper-cased name for the uuencode option */
492 #define UUENCODE_NAME      (shar_opt_strs+1541)
493 /** Name string for the uuencode option */
494 #define UUENCODE_name      (shar_opt_strs+1550)
495 /** Compiled in flag settings for the uuencode option */
496 #define UUENCODE_FLAGS     (OPTST_DISABLED)
497 
498 /**
499  *  text-files option description:
500  */
501 /** Descriptive text for the text-files option */
502 #define TEXT_FILES_DESC      (shar_opt_strs+1559)
503 /** Upper-cased name for the text-files option */
504 #define TEXT_FILES_NAME      (shar_opt_strs+1583)
505 /** Name string for the text-files option */
506 #define TEXT_FILES_name      (shar_opt_strs+1594)
507 /** Compiled in flag settings for the text-files option */
508 #define TEXT_FILES_FLAGS     (OPTST_DISABLED)
509 
510 /**
511  *  in-out option description:
512  */
513 /** in-out option separation text */
514 #define IN_OUT_DESC      (shar_opt_strs+1605)
515 #define IN_OUT_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
516 
517 /**
518  *  output-prefix option description:
519  */
520 /** Descriptive text for the output-prefix option */
521 #define OUTPUT_PREFIX_DESC      (shar_opt_strs+1649)
522 /** Upper-cased name for the output-prefix option */
523 #define OUTPUT_PREFIX_NAME      (shar_opt_strs+1680)
524 /** Name string for the output-prefix option */
525 #define OUTPUT_PREFIX_name      (shar_opt_strs+1694)
526 /** Compiled in flag settings for the output-prefix option */
527 #define OUTPUT_PREFIX_FLAGS     (OPTST_DISABLED \
528         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
529 
530 /**
531  *  whole-size-limit option description with
532  *  "Must also have options" and "Incompatible options":
533  */
534 /** Descriptive text for the whole-size-limit option */
535 #define WHOLE_SIZE_LIMIT_DESC      (shar_opt_strs+1708)
536 /** Upper-cased name for the whole-size-limit option */
537 #define WHOLE_SIZE_LIMIT_NAME      (shar_opt_strs+1742)
538 /** Name string for the whole-size-limit option */
539 #define WHOLE_SIZE_LIMIT_name      (shar_opt_strs+1759)
540 /** Other options that are required by the whole-size-limit option */
541 static int const aWhole_Size_LimitMustList[] = {
542     INDEX_OPT_OUTPUT_PREFIX, NO_EQUIVALENT };
543 /** Compiled in flag settings for the whole-size-limit option */
544 #define WHOLE_SIZE_LIMIT_FLAGS     (OPTST_DISABLED \
545         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC) \
546         | OPTST_SCALED_NUM)
547 
548 /**
549  *  split-size-limit option description with
550  *  "Must also have options" and "Incompatible options":
551  */
552 /** Descriptive text for the split-size-limit option */
553 #define SPLIT_SIZE_LIMIT_DESC      (shar_opt_strs+1776)
554 /** Upper-cased name for the split-size-limit option */
555 #define SPLIT_SIZE_LIMIT_NAME      (shar_opt_strs+1807)
556 /** Name string for the split-size-limit option */
557 #define SPLIT_SIZE_LIMIT_name      (shar_opt_strs+1824)
558 /** Other options that are required by the split-size-limit option */
559 static int const aSplit_Size_LimitMustList[] = {
560     INDEX_OPT_OUTPUT_PREFIX, NO_EQUIVALENT };
561 /** Compiled in flag settings for the split-size-limit option */
562 #define SPLIT_SIZE_LIMIT_FLAGS     (OPTST_DISABLED \
563         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC) \
564         | OPTST_SCALED_NUM)
565 
566 /**
567  *  input-file-list option description:
568  */
569 /** Descriptive text for the input-file-list option */
570 #define INPUT_FILE_LIST_DESC      (shar_opt_strs+1841)
571 /** Upper-cased name for the input-file-list option */
572 #define INPUT_FILE_LIST_NAME      (shar_opt_strs+1868)
573 /** Name string for the input-file-list option */
574 #define INPUT_FILE_LIST_name      (shar_opt_strs+1884)
575 /** Compiled in flag settings for the input-file-list option */
576 #define INPUT_FILE_LIST_FLAGS     (OPTST_DISABLED \
577         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
578 
579 /**
580  *  stdin-file-list option description:
581  */
582 /** Descriptive text for the stdin-file-list option */
583 #define STDIN_FILE_LIST_DESC      (shar_opt_strs+1900)
584 /** Upper-cased name for the stdin-file-list option */
585 #define STDIN_FILE_LIST_NAME      (shar_opt_strs+1948)
586 /** Name string for the stdin-file-list option */
587 #define STDIN_FILE_LIST_name      (shar_opt_strs+1964)
588 /** Compiled in flag settings for the stdin-file-list option */
589 #define STDIN_FILE_LIST_FLAGS     (OPTST_DISABLED | OPTST_DEPRECATED)
590 
591 /**
592  *  headers option description:
593  */
594 /** headers option separation text */
595 #define HEADERS_DESC      (shar_opt_strs+1980)
596 #define HEADERS_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
597 
598 /**
599  *  archive-name option description:
600  */
601 /** Descriptive text for the archive-name option */
602 #define ARCHIVE_NAME_DESC      (shar_opt_strs+2010)
603 /** Upper-cased name for the archive-name option */
604 #define ARCHIVE_NAME_NAME      (shar_opt_strs+2043)
605 /** Name string for the archive-name option */
606 #define ARCHIVE_NAME_name      (shar_opt_strs+2056)
607 /** Compiled in flag settings for the archive-name option */
608 #define ARCHIVE_NAME_FLAGS     (OPTST_DISABLED \
609         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
610 
611 /**
612  *  submitter option description:
613  */
614 /** Descriptive text for the submitter option */
615 #define SUBMITTER_DESC      (shar_opt_strs+2069)
616 /** Upper-cased name for the submitter option */
617 #define SUBMITTER_NAME      (shar_opt_strs+2097)
618 /** Name string for the submitter option */
619 #define SUBMITTER_name      (shar_opt_strs+2107)
620 /** Compiled in flag settings for the submitter option */
621 #define SUBMITTER_FLAGS     (OPTST_DISABLED \
622         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
623 
624 /**
625  *  net-headers option description with
626  *  "Must also have options" and "Incompatible options":
627  */
628 /** Descriptive text for the net-headers option */
629 #define NET_HEADERS_DESC      (shar_opt_strs+2117)
630 /** Upper-cased name for the net-headers option */
631 #define NET_HEADERS_NAME      (shar_opt_strs+2162)
632 /** Name string for the net-headers option */
633 #define NET_HEADERS_name      (shar_opt_strs+2174)
634 /** Other options that are required by the net-headers option */
635 static int const aNet_HeadersMustList[] = {
636     INDEX_OPT_ARCHIVE_NAME, NO_EQUIVALENT };
637 /** Compiled in flag settings for the net-headers option */
638 #define NET_HEADERS_FLAGS     (OPTST_DISABLED)
639 
640 /**
641  *  cut-mark option description:
642  */
643 /** Descriptive text for the cut-mark option */
644 #define CUT_MARK_DESC      (shar_opt_strs+2186)
645 /** Upper-cased name for the cut-mark option */
646 #define CUT_MARK_NAME      (shar_opt_strs+2217)
647 /** Name string for the cut-mark option */
648 #define CUT_MARK_name      (shar_opt_strs+2226)
649 /** Compiled in flag settings for the cut-mark option */
650 #define CUT_MARK_FLAGS     (OPTST_DISABLED)
651 
652 /**
653  *  translate option description:
654  */
655 /** Descriptive text for the translate option */
656 #define TRANSLATE_DESC      (shar_opt_strs+2235)
657 /** Upper-cased name for the translate option */
658 #define TRANSLATE_NAME      (shar_opt_strs+2268)
659 /** Name string for the translate option */
660 #define TRANSLATE_name      (shar_opt_strs+2278)
661 /** Compiled in flag settings for the translate option */
662 #define TRANSLATE_FLAGS     (OPTST_DISABLED)
663 
664 /**
665  *  xmit-defenses option description:
666  */
667 /** xmit-defenses option separation text */
668 #define XMIT_DEFENSES_DESC      (shar_opt_strs+2288)
669 #define XMIT_DEFENSES_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
670 
671 /**
672  *  no-character-count option description:
673  */
674 /** Descriptive text for the no-character-count option */
675 #define NO_CHARACTER_COUNT_DESC      (shar_opt_strs+2328)
676 /** Upper-cased name for the no-character-count option */
677 #define NO_CHARACTER_COUNT_NAME      (shar_opt_strs+2361)
678 /** Name string for the no-character-count option */
679 #define NO_CHARACTER_COUNT_name      (shar_opt_strs+2380)
680 /** Compiled in flag settings for the no-character-count option */
681 #define NO_CHARACTER_COUNT_FLAGS     (OPTST_DISABLED)
682 
683 /**
684  *  no-md5-digest option description:
685  */
686 /** Descriptive text for the no-md5-digest option */
687 #define NO_MD5_DIGEST_DESC      (shar_opt_strs+2399)
688 /** Upper-cased name for the no-md5-digest option */
689 #define NO_MD5_DIGEST_NAME      (shar_opt_strs+2434)
690 /** Name string for the no-md5-digest option */
691 #define NO_MD5_DIGEST_name      (shar_opt_strs+2448)
692 /** Compiled in flag settings for the no-md5-digest option */
693 #define NO_MD5_DIGEST_FLAGS     (OPTST_DISABLED)
694 
695 /**
696  *  force-prefix option description:
697  */
698 /** Descriptive text for the force-prefix option */
699 #define FORCE_PREFIX_DESC      (shar_opt_strs+2462)
700 /** Upper-cased name for the force-prefix option */
701 #define FORCE_PREFIX_NAME      (shar_opt_strs+2503)
702 /** Name string for the force-prefix option */
703 #define FORCE_PREFIX_name      (shar_opt_strs+2516)
704 /** Compiled in flag settings for the force-prefix option */
705 #define FORCE_PREFIX_FLAGS     (OPTST_DISABLED)
706 
707 /**
708  *  here-delimiter option description:
709  */
710 /** Descriptive text for the here-delimiter option */
711 #define HERE_DELIMITER_DESC      (shar_opt_strs+2529)
712 /** Upper-cased name for the here-delimiter option */
713 #define HERE_DELIMITER_NAME      (shar_opt_strs+2560)
714 /** Name string for the here-delimiter option */
715 #define HERE_DELIMITER_name      (shar_opt_strs+2575)
716 /** The compiled in default value for the here-delimiter option argument */
717 #define HERE_DELIMITER_DFT_ARG   (shar_opt_strs+2590)
718 /** Compiled in flag settings for the here-delimiter option */
719 #define HERE_DELIMITER_FLAGS     (OPTST_DISABLED \
720         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
721 
722 /**
723  *  shar-flavors option description:
724  */
725 /** shar-flavors option separation text */
726 #define SHAR_FLAVORS_DESC      (shar_opt_strs+2599)
727 #define SHAR_FLAVORS_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
728 
729 /**
730  *  vanilla-operation option description:
731  */
732 /** Descriptive text for the vanilla-operation option */
733 #define VANILLA_OPERATION_DESC      (shar_opt_strs+2635)
734 /** Upper-cased name for the vanilla-operation option */
735 #define VANILLA_OPERATION_NAME      (shar_opt_strs+2661)
736 /** Name string for the vanilla-operation option */
737 #define VANILLA_OPERATION_name      (shar_opt_strs+2679)
738 /** Compiled in flag settings for the vanilla-operation option */
739 #define VANILLA_OPERATION_FLAGS     (OPTST_DISABLED)
740 
741 /**
742  *  no-piping option description:
743  */
744 /** Descriptive text for the no-piping option */
745 #define NO_PIPING_DESC      (shar_opt_strs+2697)
746 /** Upper-cased name for the no-piping option */
747 #define NO_PIPING_NAME      (shar_opt_strs+2734)
748 /** Name string for the no-piping option */
749 #define NO_PIPING_name      (shar_opt_strs+2744)
750 /** Compiled in flag settings for the no-piping option */
751 #define NO_PIPING_FLAGS     (OPTST_DISABLED)
752 
753 /**
754  *  no-check-existing option description:
755  */
756 /** Descriptive text for the no-check-existing option */
757 #define NO_CHECK_EXISTING_DESC      (shar_opt_strs+2754)
758 /** Upper-cased name for the no-check-existing option */
759 #define NO_CHECK_EXISTING_NAME      (shar_opt_strs+2787)
760 /** Name string for the no-check-existing option */
761 #define NO_CHECK_EXISTING_name      (shar_opt_strs+2805)
762 /** Compiled in flag settings for the no-check-existing option */
763 #define NO_CHECK_EXISTING_FLAGS     (OPTST_DISABLED)
764 
765 /**
766  *  query-user option description with
767  *  "Must also have options" and "Incompatible options":
768  */
769 /** Descriptive text for the query-user option */
770 #define QUERY_USER_DESC      (shar_opt_strs+2823)
771 /** Upper-cased name for the query-user option */
772 #define QUERY_USER_NAME      (shar_opt_strs+2857)
773 /** Name string for the query-user option */
774 #define QUERY_USER_name      (shar_opt_strs+2868)
775 /** Other options that appear in conjunction with the query-user option */
776 static int const aQuery_UserCantList[] = {
777     INDEX_OPT_VANILLA_OPERATION, NO_EQUIVALENT };
778 /** Compiled in flag settings for the query-user option */
779 #define QUERY_USER_FLAGS     (OPTST_DISABLED)
780 
781 /**
782  *  no-timestamp option description:
783  */
784 /** Descriptive text for the no-timestamp option */
785 #define NO_TIMESTAMP_DESC      (shar_opt_strs+2879)
786 /** Upper-cased name for the no-timestamp option */
787 #define NO_TIMESTAMP_NAME      (shar_opt_strs+2913)
788 /** Name string for the no-timestamp option */
789 #define NO_TIMESTAMP_name      (shar_opt_strs+2926)
790 /** Compiled in flag settings for the no-timestamp option */
791 #define NO_TIMESTAMP_FLAGS     (OPTST_DISABLED)
792 
793 /**
794  *  quiet-unshar option description:
795  */
796 /** Descriptive text for the quiet-unshar option */
797 #define QUIET_UNSHAR_DESC      (shar_opt_strs+2939)
798 /** Upper-cased name for the quiet-unshar option */
799 #define QUIET_UNSHAR_NAME      (shar_opt_strs+2977)
800 /** Name string for the quiet-unshar option */
801 #define QUIET_UNSHAR_name      (shar_opt_strs+2990)
802 /** Compiled in flag settings for the quiet-unshar option */
803 #define QUIET_UNSHAR_FLAGS     (OPTST_DISABLED)
804 
805 /**
806  *  basename option description:
807  */
808 /** Descriptive text for the basename option */
809 #define BASENAME_DESC      (shar_opt_strs+3003)
810 /** Upper-cased name for the basename option */
811 #define BASENAME_NAME      (shar_opt_strs+3047)
812 /** Name string for the basename option */
813 #define BASENAME_name      (shar_opt_strs+3056)
814 /** Compiled in flag settings for the basename option */
815 #define BASENAME_FLAGS     (OPTST_DISABLED)
816 
817 /**
818  *  internationalization option description:
819  */
820 /** internationalization option separation text */
821 #define INTERNATIONALIZATION_DESC      (shar_opt_strs+3065)
822 #define INTERNATIONALIZATION_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
823 
824 /**
825  *  no-i18n option description:
826  */
827 /** Descriptive text for the no-i18n option */
828 #define NO_I18N_DESC      (shar_opt_strs+3095)
829 /** Upper-cased name for the no-i18n option */
830 #define NO_I18N_NAME      (shar_opt_strs+3119)
831 /** Name string for the no-i18n option */
832 #define NO_I18N_name      (shar_opt_strs+3127)
833 /** Compiled in flag settings for the no-i18n option */
834 #define NO_I18N_FLAGS     (OPTST_DISABLED)
835 
836 /**
837  *  print-text-domain-dir option description:
838  */
839 /** Descriptive text for the print-text-domain-dir option */
840 #define PRINT_TEXT_DOMAIN_DIR_DESC      (shar_opt_strs+3135)
841 /** Upper-cased name for the print-text-domain-dir option */
842 #define PRINT_TEXT_DOMAIN_DIR_NAME      (shar_opt_strs+3170)
843 /** Name string for the print-text-domain-dir option */
844 #define PRINT_TEXT_DOMAIN_DIR_name      (shar_opt_strs+3192)
845 /** Compiled in flag settings for the print-text-domain-dir option */
846 #define PRINT_TEXT_DOMAIN_DIR_FLAGS     (OPTST_DISABLED)
847 
848 /**
849  *  feedback option description:
850  */
851 /** feedback option separation text */
852 #define FEEDBACK_DESC      (shar_opt_strs+3214)
853 #define FEEDBACK_FLAGS     (OPTST_DOCUMENT | OPTST_NO_INIT)
854 
855 /**
856  *  quiet option description:
857  */
858 /** Descriptive text for the quiet option */
859 #define QUIET_DESC      (shar_opt_strs+3243)
860 /** Upper-cased name for the quiet option */
861 #define QUIET_NAME      (shar_opt_strs+3274)
862 /** Name string for the quiet option */
863 #define QUIET_name      (shar_opt_strs+3280)
864 /** Compiled in flag settings for the quiet option */
865 #define QUIET_FLAGS     (OPTST_DISABLED)
866 
867 /**
868  *  silent option description:
869  */
870 /** Descriptive text for the silent option */
871 #define SILENT_DESC    (shar_opt_strs+3286)
872 #define SILENT_NAME    NULL
873 /** Unmodified name string for the silent option */
874 #define SILENT_name    (shar_opt_strs+3318)
875 /** Compiled in flag settings for the silent option */
876 #define SILENT_FLAGS     (QUIET_FLAGS | OPTST_ALIAS)
877 
878 /*
879  *  Help/More_Help/Version option descriptions:
880  */
881 #define HELP_DESC       (shar_opt_strs+3325)
882 #define HELP_name       (shar_opt_strs+3369)
883 #ifdef HAVE_WORKING_FORK
884 #define MORE_HELP_DESC  (shar_opt_strs+3374)
885 #define MORE_HELP_name  (shar_opt_strs+3419)
886 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
887 #else
888 #define MORE_HELP_DESC  HELP_DESC
889 #define MORE_HELP_name  HELP_name
890 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
891 #endif
892 #ifdef NO_OPTIONAL_OPT_ARGS
893 #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
894 #else
895 #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
896                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
897 #endif
898 #define VER_DESC        (shar_opt_strs+3429)
899 #define VER_name        (shar_opt_strs+3465)
900 #define SAVE_OPTS_DESC  (shar_opt_strs+3473)
901 #define SAVE_OPTS_name  (shar_opt_strs+3512)
902 #define LOAD_OPTS_DESC     (shar_opt_strs+3522)
903 #define LOAD_OPTS_NAME     (shar_opt_strs+3554)
904 #define NO_LOAD_OPTS_name  (shar_opt_strs+3564)
905 #define LOAD_OPTS_pfx      (shar_opt_strs+3577)
906 #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
907 /**
908  *  Declare option callback procedures
909  */
910 #ifdef HAVE_COMPRESS
911   static tOptProc doOptCompress;
912 #else /* not HAVE_COMPRESS */
913 # define doOptCompress NULL
914 #endif /* def/not HAVE_COMPRESS */
915 #ifdef HAVE_COMPRESS
916   static tOptProc doOptBits_Per_Code;
917 #else /* not HAVE_COMPRESS */
918 # define doOptBits_Per_Code NULL
919 #endif /* def/not HAVE_COMPRESS */
920 extern tOptProc
921     check_intermixing,    optionBooleanVal,     optionNestedVal,
922     optionNumericVal,     optionPagedUsage,     optionPrintVersion,
923     optionResetOpt,       optionStackArg,       optionTimeDate,
924     optionTimeVal,        optionUnstackArg,     optionVendorOption,
925     set_compaction,       validate_opt_context;
926 static tOptProc
927     doOptBzip2,                 doOptGzip,
928     doOptInput_File_List,       doOptLevel_For_Gzip,
929     doOptLevel_Of_Compression,  doOptPrint_Text_Domain_Dir,
930     doOptSilent,                doOptSplit_Size_Limit,
931     doOptStdin_File_List,       doOptVanilla_Operation,
932     doOptWhole_Size_Limit,      doUsageOpt;
933 #define VER_PROC        optionPrintVersion
934 
935 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
936 /**
937  *  Define the shar Option Descriptions.
938  * This is an array of OPTION_CT entries, one for each
939  * option that the shar program responds to.
940  */
941 static tOptDesc optDesc[OPTION_CT] = {
942   {  /* entry idx, value */ 0, 0,
943      /* equiv idx, value */ 0, 0,
944      /* equivalenced to  */ NO_EQUIVALENT,
945      /* min, max, act ct */ 0, 0, 0,
946      /* opt state flags  */ COMPRESSION_FLAGS, 0,
947      /* last opt argumnt */ { NULL },
948      /* arg list/cookie  */ NULL,
949      /* must/cannot opts */ NULL, NULL,
950      /* option proc      */ NULL,
951      /* desc, NAME, name */ COMPRESSION_DESC, NULL, NULL,
952      /* disablement strs */ NULL, NULL },
953 
954   {  /* entry idx, value */ 1, VALUE_OPT_INTERMIX_TYPE,
955      /* equiv idx, value */ 1, VALUE_OPT_INTERMIX_TYPE,
956      /* equivalenced to  */ NO_EQUIVALENT,
957      /* min, max, act ct */ 0, 1, 0,
958      /* opt state flags  */ INTERMIX_TYPE_FLAGS, 0,
959      /* last opt argumnt */ { NULL }, /* --intermix-type */
960      /* arg list/cookie  */ NULL,
961      /* must/cannot opts */ NULL, aIntermix_TypeCantList,
962      /* option proc      */ validate_opt_context,
963      /* desc, NAME, name */ INTERMIX_TYPE_DESC, INTERMIX_TYPE_NAME, INTERMIX_TYPE_name,
964      /* disablement strs */ NULL, NULL },
965 
966   {  /* entry idx, value */ 2, VALUE_OPT_COMPACTOR,
967      /* equiv idx, value */ 2, VALUE_OPT_COMPACTOR,
968      /* equivalenced to  */ NO_EQUIVALENT,
969      /* min, max, act ct */ 0, NOLIMIT, 0,
970      /* opt state flags  */ COMPACTOR_FLAGS, 0,
971      /* last opt argumnt */ { NULL }, /* --compactor */
972      /* arg list/cookie  */ NULL,
973      /* must/cannot opts */ NULL, aCompactorCantList,
974      /* option proc      */ set_compaction,
975      /* desc, NAME, name */ COMPACTOR_DESC, COMPACTOR_NAME, COMPACTOR_name,
976      /* disablement strs */ NULL, NULL },
977 
978   {  /* entry idx, value */ 3, VALUE_OPT_LEVEL_OF_COMPRESSION,
979      /* equiv idx, value */ 3, VALUE_OPT_LEVEL_OF_COMPRESSION,
980      /* equivalenced to  */ NO_EQUIVALENT,
981      /* min, max, act ct */ 0, 1, 0,
982      /* opt state flags  */ LEVEL_OF_COMPRESSION_FLAGS, 0,
983      /* last opt argumnt */ { LEVEL_OF_COMPRESSION_DFT_ARG },
984      /* arg list/cookie  */ NULL,
985      /* must/cannot opts */ NULL, NULL,
986      /* option proc      */ doOptLevel_Of_Compression,
987      /* desc, NAME, name */ LEVEL_OF_COMPRESSION_DESC, LEVEL_OF_COMPRESSION_NAME, LEVEL_OF_COMPRESSION_name,
988      /* disablement strs */ NULL, NULL },
989 
990   {  /* entry idx, value */ 4, VALUE_OPT_BZIP2,
991      /* equiv idx, value */ 4, VALUE_OPT_BZIP2,
992      /* equivalenced to  */ NO_EQUIVALENT,
993      /* min, max, act ct */ 0, NOLIMIT, 0,
994      /* opt state flags  */ BZIP2_FLAGS, 0,
995      /* last opt argumnt */ { NULL }, /* --bzip2 */
996      /* arg list/cookie  */ NULL,
997      /* must/cannot opts */ NULL, NULL,
998      /* option proc      */ doOptBzip2,
999      /* desc, NAME, name */ BZIP2_DESC, BZIP2_NAME, BZIP2_name,
1000      /* disablement strs */ NULL, NULL },
1001 
1002   {  /* entry idx, value */ 5, VALUE_OPT_GZIP,
1003      /* equiv idx, value */ 5, VALUE_OPT_GZIP,
1004      /* equivalenced to  */ NO_EQUIVALENT,
1005      /* min, max, act ct */ 0, NOLIMIT, 0,
1006      /* opt state flags  */ GZIP_FLAGS, 0,
1007      /* last opt argumnt */ { NULL }, /* --gzip */
1008      /* arg list/cookie  */ NULL,
1009      /* must/cannot opts */ NULL, NULL,
1010      /* option proc      */ doOptGzip,
1011      /* desc, NAME, name */ GZIP_DESC, GZIP_NAME, GZIP_name,
1012      /* disablement strs */ NULL, NULL },
1013 
1014   {  /* entry idx, value */ 6, VALUE_OPT_COMPRESS,
1015      /* equiv idx, value */ 6, VALUE_OPT_COMPRESS,
1016      /* equivalenced to  */ NO_EQUIVALENT,
1017      /* min, max, act ct */ 0, NOLIMIT, 0,
1018      /* opt state flags  */ COMPRESS_FLAGS, 0,
1019      /* last opt argumnt */ { NULL }, /* --compress */
1020      /* arg list/cookie  */ NULL,
1021      /* must/cannot opts */ NULL, NULL,
1022      /* option proc      */ doOptCompress,
1023      /* desc, NAME, name */ COMPRESS_DESC, COMPRESS_NAME, COMPRESS_name,
1024      /* disablement strs */ NULL, NULL },
1025 
1026   {  /* entry idx, value */ 7, VALUE_OPT_LEVEL_FOR_GZIP,
1027      /* equiv idx, value */ 7, VALUE_OPT_LEVEL_FOR_GZIP,
1028      /* equivalenced to  */ NO_EQUIVALENT,
1029      /* min, max, act ct */ 0, 1, 0,
1030      /* opt state flags  */ LEVEL_FOR_GZIP_FLAGS, 0,
1031      /* last opt argumnt */ { NULL }, /* --level-for-gzip */
1032      /* arg list/cookie  */ NULL,
1033      /* must/cannot opts */ NULL, NULL,
1034      /* option proc      */ doOptLevel_For_Gzip,
1035      /* desc, NAME, name */ LEVEL_FOR_GZIP_DESC, LEVEL_FOR_GZIP_NAME, LEVEL_FOR_GZIP_name,
1036      /* disablement strs */ 0, 0 },
1037 
1038   {  /* entry idx, value */ 8, VALUE_OPT_BITS_PER_CODE,
1039      /* equiv idx, value */ 8, VALUE_OPT_BITS_PER_CODE,
1040      /* equivalenced to  */ NO_EQUIVALENT,
1041      /* min, max, act ct */ 0, 1, 0,
1042      /* opt state flags  */ BITS_PER_CODE_FLAGS, 0,
1043      /* last opt argumnt */ { BITS_PER_CODE_DFT_ARG },
1044      /* arg list/cookie  */ NULL,
1045      /* must/cannot opts */ NULL, NULL,
1046      /* option proc      */ doOptBits_Per_Code,
1047      /* desc, NAME, name */ BITS_PER_CODE_DESC, BITS_PER_CODE_NAME, BITS_PER_CODE_name,
1048      /* disablement strs */ NULL, NULL },
1049 
1050   {  /* entry idx, value */ 0, 0,
1051      /* equiv idx, value */ 0, 0,
1052      /* equivalenced to  */ NO_EQUIVALENT,
1053      /* min, max, act ct */ 0, 0, 0,
1054      /* opt state flags  */ ENCODING_FLAGS, 0,
1055      /* last opt argumnt */ { NULL },
1056      /* arg list/cookie  */ NULL,
1057      /* must/cannot opts */ NULL, NULL,
1058      /* option proc      */ NULL,
1059      /* desc, NAME, name */ ENCODING_DESC, NULL, NULL,
1060      /* disablement strs */ NULL, NULL },
1061 
1062   {  /* entry idx, value */ 10, VALUE_OPT_MIXED_UUENCODE,
1063      /* equiv idx, value */ NO_EQUIVALENT, 0,
1064      /* equivalenced to  */ NO_EQUIVALENT,
1065      /* min, max, act ct */ 0, 1, 0,
1066      /* opt state flags  */ MIXED_UUENCODE_FLAGS, 0,
1067      /* last opt argumnt */ { NULL }, /* --mixed-uuencode */
1068      /* arg list/cookie  */ NULL,
1069      /* must/cannot opts */ NULL, NULL,
1070      /* option proc      */ check_intermixing,
1071      /* desc, NAME, name */ MIXED_UUENCODE_DESC, MIXED_UUENCODE_NAME, MIXED_UUENCODE_name,
1072      /* disablement strs */ NULL, NULL },
1073 
1074   {  /* entry idx, value */ 11, VALUE_OPT_UUENCODE,
1075      /* equiv idx, value */ NOLIMIT, NOLIMIT,
1076      /* equivalenced to  */ INDEX_OPT_MIXED_UUENCODE,
1077      /* min, max, act ct */ 0, 1, 0,
1078      /* opt state flags  */ UUENCODE_FLAGS, 0,
1079      /* last opt argumnt */ { NULL }, /* --uuencode */
1080      /* arg list/cookie  */ NULL,
1081      /* must/cannot opts */ NULL, NULL,
1082      /* option proc      */ check_intermixing,
1083      /* desc, NAME, name */ UUENCODE_DESC, UUENCODE_NAME, UUENCODE_name,
1084      /* disablement strs */ NULL, NULL },
1085 
1086   {  /* entry idx, value */ 12, VALUE_OPT_TEXT_FILES,
1087      /* equiv idx, value */ NOLIMIT, NOLIMIT,
1088      /* equivalenced to  */ INDEX_OPT_MIXED_UUENCODE,
1089      /* min, max, act ct */ 0, 1, 0,
1090      /* opt state flags  */ TEXT_FILES_FLAGS, 0,
1091      /* last opt argumnt */ { NULL }, /* --text-files */
1092      /* arg list/cookie  */ NULL,
1093      /* must/cannot opts */ NULL, NULL,
1094      /* option proc      */ check_intermixing,
1095      /* desc, NAME, name */ TEXT_FILES_DESC, TEXT_FILES_NAME, TEXT_FILES_name,
1096      /* disablement strs */ NULL, NULL },
1097 
1098   {  /* entry idx, value */ 0, 0,
1099      /* equiv idx, value */ 0, 0,
1100      /* equivalenced to  */ NO_EQUIVALENT,
1101      /* min, max, act ct */ 0, 0, 0,
1102      /* opt state flags  */ IN_OUT_FLAGS, 0,
1103      /* last opt argumnt */ { NULL },
1104      /* arg list/cookie  */ NULL,
1105      /* must/cannot opts */ NULL, NULL,
1106      /* option proc      */ NULL,
1107      /* desc, NAME, name */ IN_OUT_DESC, NULL, NULL,
1108      /* disablement strs */ NULL, NULL },
1109 
1110   {  /* entry idx, value */ 14, VALUE_OPT_OUTPUT_PREFIX,
1111      /* equiv idx, value */ 14, VALUE_OPT_OUTPUT_PREFIX,
1112      /* equivalenced to  */ NO_EQUIVALENT,
1113      /* min, max, act ct */ 0, 1, 0,
1114      /* opt state flags  */ OUTPUT_PREFIX_FLAGS, 0,
1115      /* last opt argumnt */ { NULL }, /* --output-prefix */
1116      /* arg list/cookie  */ NULL,
1117      /* must/cannot opts */ NULL, NULL,
1118      /* option proc      */ validate_opt_context,
1119      /* desc, NAME, name */ OUTPUT_PREFIX_DESC, OUTPUT_PREFIX_NAME, OUTPUT_PREFIX_name,
1120      /* disablement strs */ NULL, NULL },
1121 
1122   {  /* entry idx, value */ 15, VALUE_OPT_WHOLE_SIZE_LIMIT,
1123      /* equiv idx, value */ NO_EQUIVALENT, 0,
1124      /* equivalenced to  */ NO_EQUIVALENT,
1125      /* min, max, act ct */ 0, 1, 0,
1126      /* opt state flags  */ WHOLE_SIZE_LIMIT_FLAGS, 0,
1127      /* last opt argumnt */ { NULL }, /* --whole-size-limit */
1128      /* arg list/cookie  */ NULL,
1129      /* must/cannot opts */ aWhole_Size_LimitMustList, NULL,
1130      /* option proc      */ doOptWhole_Size_Limit,
1131      /* desc, NAME, name */ WHOLE_SIZE_LIMIT_DESC, WHOLE_SIZE_LIMIT_NAME, WHOLE_SIZE_LIMIT_name,
1132      /* disablement strs */ NULL, NULL },
1133 
1134   {  /* entry idx, value */ 16, VALUE_OPT_SPLIT_SIZE_LIMIT,
1135      /* equiv idx, value */ NOLIMIT, NOLIMIT,
1136      /* equivalenced to  */ INDEX_OPT_WHOLE_SIZE_LIMIT,
1137      /* min, max, act ct */ 0, 1, 0,
1138      /* opt state flags  */ SPLIT_SIZE_LIMIT_FLAGS, 0,
1139      /* last opt argumnt */ { NULL }, /* --split-size-limit */
1140      /* arg list/cookie  */ NULL,
1141      /* must/cannot opts */ aSplit_Size_LimitMustList, NULL,
1142      /* option proc      */ doOptSplit_Size_Limit,
1143      /* desc, NAME, name */ SPLIT_SIZE_LIMIT_DESC, SPLIT_SIZE_LIMIT_NAME, SPLIT_SIZE_LIMIT_name,
1144      /* disablement strs */ NULL, NULL },
1145 
1146   {  /* entry idx, value */ 17, VALUE_OPT_INPUT_FILE_LIST,
1147      /* equiv idx, value */ 17, VALUE_OPT_INPUT_FILE_LIST,
1148      /* equivalenced to  */ NO_EQUIVALENT,
1149      /* min, max, act ct */ 0, 1, 0,
1150      /* opt state flags  */ INPUT_FILE_LIST_FLAGS, 0,
1151      /* last opt argumnt */ { NULL }, /* --input-file-list */
1152      /* arg list/cookie  */ NULL,
1153      /* must/cannot opts */ NULL, NULL,
1154      /* option proc      */ doOptInput_File_List,
1155      /* desc, NAME, name */ INPUT_FILE_LIST_DESC, INPUT_FILE_LIST_NAME, INPUT_FILE_LIST_name,
1156      /* disablement strs */ NULL, NULL },
1157 
1158   {  /* entry idx, value */ 18, VALUE_OPT_STDIN_FILE_LIST,
1159      /* equiv idx, value */ 18, VALUE_OPT_STDIN_FILE_LIST,
1160      /* equivalenced to  */ NO_EQUIVALENT,
1161      /* min, max, act ct */ 0, 1, 0,
1162      /* opt state flags  */ STDIN_FILE_LIST_FLAGS, 0,
1163      /* last opt argumnt */ { NULL }, /* --stdin-file-list */
1164      /* arg list/cookie  */ NULL,
1165      /* must/cannot opts */ NULL, NULL,
1166      /* option proc      */ doOptStdin_File_List,
1167      /* desc, NAME, name */ STDIN_FILE_LIST_DESC, STDIN_FILE_LIST_NAME, STDIN_FILE_LIST_name,
1168      /* disablement strs */ NULL, NULL },
1169 
1170   {  /* entry idx, value */ 0, 0,
1171      /* equiv idx, value */ 0, 0,
1172      /* equivalenced to  */ NO_EQUIVALENT,
1173      /* min, max, act ct */ 0, 0, 0,
1174      /* opt state flags  */ HEADERS_FLAGS, 0,
1175      /* last opt argumnt */ { NULL },
1176      /* arg list/cookie  */ NULL,
1177      /* must/cannot opts */ NULL, NULL,
1178      /* option proc      */ NULL,
1179      /* desc, NAME, name */ HEADERS_DESC, NULL, NULL,
1180      /* disablement strs */ NULL, NULL },
1181 
1182   {  /* entry idx, value */ 20, VALUE_OPT_ARCHIVE_NAME,
1183      /* equiv idx, value */ 20, VALUE_OPT_ARCHIVE_NAME,
1184      /* equivalenced to  */ NO_EQUIVALENT,
1185      /* min, max, act ct */ 0, 1, 0,
1186      /* opt state flags  */ ARCHIVE_NAME_FLAGS, 0,
1187      /* last opt argumnt */ { NULL }, /* --archive-name */
1188      /* arg list/cookie  */ NULL,
1189      /* must/cannot opts */ NULL, NULL,
1190      /* option proc      */ validate_opt_context,
1191      /* desc, NAME, name */ ARCHIVE_NAME_DESC, ARCHIVE_NAME_NAME, ARCHIVE_NAME_name,
1192      /* disablement strs */ NULL, NULL },
1193 
1194   {  /* entry idx, value */ 21, VALUE_OPT_SUBMITTER,
1195      /* equiv idx, value */ 21, VALUE_OPT_SUBMITTER,
1196      /* equivalenced to  */ NO_EQUIVALENT,
1197      /* min, max, act ct */ 0, 1, 0,
1198      /* opt state flags  */ SUBMITTER_FLAGS, 0,
1199      /* last opt argumnt */ { NULL }, /* --submitter */
1200      /* arg list/cookie  */ NULL,
1201      /* must/cannot opts */ NULL, NULL,
1202      /* option proc      */ validate_opt_context,
1203      /* desc, NAME, name */ SUBMITTER_DESC, SUBMITTER_NAME, SUBMITTER_name,
1204      /* disablement strs */ NULL, NULL },
1205 
1206   {  /* entry idx, value */ 22, VALUE_OPT_NET_HEADERS,
1207      /* equiv idx, value */ 22, VALUE_OPT_NET_HEADERS,
1208      /* equivalenced to  */ NO_EQUIVALENT,
1209      /* min, max, act ct */ 0, 1, 0,
1210      /* opt state flags  */ NET_HEADERS_FLAGS, 0,
1211      /* last opt argumnt */ { NULL }, /* --net-headers */
1212      /* arg list/cookie  */ NULL,
1213      /* must/cannot opts */ aNet_HeadersMustList, NULL,
1214      /* option proc      */ validate_opt_context,
1215      /* desc, NAME, name */ NET_HEADERS_DESC, NET_HEADERS_NAME, NET_HEADERS_name,
1216      /* disablement strs */ NULL, NULL },
1217 
1218   {  /* entry idx, value */ 23, VALUE_OPT_CUT_MARK,
1219      /* equiv idx, value */ 23, VALUE_OPT_CUT_MARK,
1220      /* equivalenced to  */ NO_EQUIVALENT,
1221      /* min, max, act ct */ 0, 1, 0,
1222      /* opt state flags  */ CUT_MARK_FLAGS, 0,
1223      /* last opt argumnt */ { NULL }, /* --cut-mark */
1224      /* arg list/cookie  */ NULL,
1225      /* must/cannot opts */ NULL, NULL,
1226      /* option proc      */ validate_opt_context,
1227      /* desc, NAME, name */ CUT_MARK_DESC, CUT_MARK_NAME, CUT_MARK_name,
1228      /* disablement strs */ NULL, NULL },
1229 
1230   {  /* entry idx, value */ 24, VALUE_OPT_TRANSLATE,
1231      /* equiv idx, value */ 24, VALUE_OPT_TRANSLATE,
1232      /* equivalenced to  */ NO_EQUIVALENT,
1233      /* min, max, act ct */ 0, 1, 0,
1234      /* opt state flags  */ TRANSLATE_FLAGS, 0,
1235      /* last opt argumnt */ { NULL }, /* --translate */
1236      /* arg list/cookie  */ NULL,
1237      /* must/cannot opts */ NULL, NULL,
1238      /* option proc      */ validate_opt_context,
1239      /* desc, NAME, name */ TRANSLATE_DESC, TRANSLATE_NAME, TRANSLATE_name,
1240      /* disablement strs */ NULL, NULL },
1241 
1242   {  /* entry idx, value */ 0, 0,
1243      /* equiv idx, value */ 0, 0,
1244      /* equivalenced to  */ NO_EQUIVALENT,
1245      /* min, max, act ct */ 0, 0, 0,
1246      /* opt state flags  */ XMIT_DEFENSES_FLAGS, 0,
1247      /* last opt argumnt */ { NULL },
1248      /* arg list/cookie  */ NULL,
1249      /* must/cannot opts */ NULL, NULL,
1250      /* option proc      */ NULL,
1251      /* desc, NAME, name */ XMIT_DEFENSES_DESC, NULL, NULL,
1252      /* disablement strs */ NULL, NULL },
1253 
1254   {  /* entry idx, value */ 26, VALUE_OPT_NO_CHARACTER_COUNT,
1255      /* equiv idx, value */ 26, VALUE_OPT_NO_CHARACTER_COUNT,
1256      /* equivalenced to  */ NO_EQUIVALENT,
1257      /* min, max, act ct */ 0, 1, 0,
1258      /* opt state flags  */ NO_CHARACTER_COUNT_FLAGS, 0,
1259      /* last opt argumnt */ { NULL }, /* --no-character-count */
1260      /* arg list/cookie  */ NULL,
1261      /* must/cannot opts */ NULL, NULL,
1262      /* option proc      */ validate_opt_context,
1263      /* desc, NAME, name */ NO_CHARACTER_COUNT_DESC, NO_CHARACTER_COUNT_NAME, NO_CHARACTER_COUNT_name,
1264      /* disablement strs */ NULL, NULL },
1265 
1266   {  /* entry idx, value */ 27, VALUE_OPT_NO_MD5_DIGEST,
1267      /* equiv idx, value */ 27, VALUE_OPT_NO_MD5_DIGEST,
1268      /* equivalenced to  */ NO_EQUIVALENT,
1269      /* min, max, act ct */ 0, 1, 0,
1270      /* opt state flags  */ NO_MD5_DIGEST_FLAGS, 0,
1271      /* last opt argumnt */ { NULL }, /* --no-md5-digest */
1272      /* arg list/cookie  */ NULL,
1273      /* must/cannot opts */ NULL, NULL,
1274      /* option proc      */ validate_opt_context,
1275      /* desc, NAME, name */ NO_MD5_DIGEST_DESC, NO_MD5_DIGEST_NAME, NO_MD5_DIGEST_name,
1276      /* disablement strs */ NULL, NULL },
1277 
1278   {  /* entry idx, value */ 28, VALUE_OPT_FORCE_PREFIX,
1279      /* equiv idx, value */ 28, VALUE_OPT_FORCE_PREFIX,
1280      /* equivalenced to  */ NO_EQUIVALENT,
1281      /* min, max, act ct */ 0, 1, 0,
1282      /* opt state flags  */ FORCE_PREFIX_FLAGS, 0,
1283      /* last opt argumnt */ { NULL }, /* --force-prefix */
1284      /* arg list/cookie  */ NULL,
1285      /* must/cannot opts */ NULL, NULL,
1286      /* option proc      */ validate_opt_context,
1287      /* desc, NAME, name */ FORCE_PREFIX_DESC, FORCE_PREFIX_NAME, FORCE_PREFIX_name,
1288      /* disablement strs */ NULL, NULL },
1289 
1290   {  /* entry idx, value */ 29, VALUE_OPT_HERE_DELIMITER,
1291      /* equiv idx, value */ 29, VALUE_OPT_HERE_DELIMITER,
1292      /* equivalenced to  */ NO_EQUIVALENT,
1293      /* min, max, act ct */ 0, 1, 0,
1294      /* opt state flags  */ HERE_DELIMITER_FLAGS, 0,
1295      /* last opt argumnt */ { HERE_DELIMITER_DFT_ARG },
1296      /* arg list/cookie  */ NULL,
1297      /* must/cannot opts */ NULL, NULL,
1298      /* option proc      */ validate_opt_context,
1299      /* desc, NAME, name */ HERE_DELIMITER_DESC, HERE_DELIMITER_NAME, HERE_DELIMITER_name,
1300      /* disablement strs */ NULL, NULL },
1301 
1302   {  /* entry idx, value */ 0, 0,
1303      /* equiv idx, value */ 0, 0,
1304      /* equivalenced to  */ NO_EQUIVALENT,
1305      /* min, max, act ct */ 0, 0, 0,
1306      /* opt state flags  */ SHAR_FLAVORS_FLAGS, 0,
1307      /* last opt argumnt */ { NULL },
1308      /* arg list/cookie  */ NULL,
1309      /* must/cannot opts */ NULL, NULL,
1310      /* option proc      */ NULL,
1311      /* desc, NAME, name */ SHAR_FLAVORS_DESC, NULL, NULL,
1312      /* disablement strs */ NULL, NULL },
1313 
1314   {  /* entry idx, value */ 31, VALUE_OPT_VANILLA_OPERATION,
1315      /* equiv idx, value */ 31, VALUE_OPT_VANILLA_OPERATION,
1316      /* equivalenced to  */ NO_EQUIVALENT,
1317      /* min, max, act ct */ 0, 1, 0,
1318      /* opt state flags  */ VANILLA_OPERATION_FLAGS, 0,
1319      /* last opt argumnt */ { NULL }, /* --vanilla-operation */
1320      /* arg list/cookie  */ NULL,
1321      /* must/cannot opts */ NULL, NULL,
1322      /* option proc      */ doOptVanilla_Operation,
1323      /* desc, NAME, name */ VANILLA_OPERATION_DESC, VANILLA_OPERATION_NAME, VANILLA_OPERATION_name,
1324      /* disablement strs */ NULL, NULL },
1325 
1326   {  /* entry idx, value */ 32, VALUE_OPT_NO_PIPING,
1327      /* equiv idx, value */ 32, VALUE_OPT_NO_PIPING,
1328      /* equivalenced to  */ NO_EQUIVALENT,
1329      /* min, max, act ct */ 0, 1, 0,
1330      /* opt state flags  */ NO_PIPING_FLAGS, 0,
1331      /* last opt argumnt */ { NULL }, /* --no-piping */
1332      /* arg list/cookie  */ NULL,
1333      /* must/cannot opts */ NULL, NULL,
1334      /* option proc      */ validate_opt_context,
1335      /* desc, NAME, name */ NO_PIPING_DESC, NO_PIPING_NAME, NO_PIPING_name,
1336      /* disablement strs */ NULL, NULL },
1337 
1338   {  /* entry idx, value */ 33, VALUE_OPT_NO_CHECK_EXISTING,
1339      /* equiv idx, value */ 33, VALUE_OPT_NO_CHECK_EXISTING,
1340      /* equivalenced to  */ NO_EQUIVALENT,
1341      /* min, max, act ct */ 0, 1, 0,
1342      /* opt state flags  */ NO_CHECK_EXISTING_FLAGS, 0,
1343      /* last opt argumnt */ { NULL }, /* --no-check-existing */
1344      /* arg list/cookie  */ NULL,
1345      /* must/cannot opts */ NULL, NULL,
1346      /* option proc      */ validate_opt_context,
1347      /* desc, NAME, name */ NO_CHECK_EXISTING_DESC, NO_CHECK_EXISTING_NAME, NO_CHECK_EXISTING_name,
1348      /* disablement strs */ NULL, NULL },
1349 
1350   {  /* entry idx, value */ 34, VALUE_OPT_QUERY_USER,
1351      /* equiv idx, value */ 34, VALUE_OPT_QUERY_USER,
1352      /* equivalenced to  */ NO_EQUIVALENT,
1353      /* min, max, act ct */ 0, 1, 0,
1354      /* opt state flags  */ QUERY_USER_FLAGS, 0,
1355      /* last opt argumnt */ { NULL }, /* --query-user */
1356      /* arg list/cookie  */ NULL,
1357      /* must/cannot opts */ NULL, aQuery_UserCantList,
1358      /* option proc      */ validate_opt_context,
1359      /* desc, NAME, name */ QUERY_USER_DESC, QUERY_USER_NAME, QUERY_USER_name,
1360      /* disablement strs */ NULL, NULL },
1361 
1362   {  /* entry idx, value */ 35, VALUE_OPT_NO_TIMESTAMP,
1363      /* equiv idx, value */ 35, VALUE_OPT_NO_TIMESTAMP,
1364      /* equivalenced to  */ NO_EQUIVALENT,
1365      /* min, max, act ct */ 0, 1, 0,
1366      /* opt state flags  */ NO_TIMESTAMP_FLAGS, 0,
1367      /* last opt argumnt */ { NULL }, /* --no-timestamp */
1368      /* arg list/cookie  */ NULL,
1369      /* must/cannot opts */ NULL, NULL,
1370      /* option proc      */ validate_opt_context,
1371      /* desc, NAME, name */ NO_TIMESTAMP_DESC, NO_TIMESTAMP_NAME, NO_TIMESTAMP_name,
1372      /* disablement strs */ NULL, NULL },
1373 
1374   {  /* entry idx, value */ 36, VALUE_OPT_QUIET_UNSHAR,
1375      /* equiv idx, value */ 36, VALUE_OPT_QUIET_UNSHAR,
1376      /* equivalenced to  */ NO_EQUIVALENT,
1377      /* min, max, act ct */ 0, 1, 0,
1378      /* opt state flags  */ QUIET_UNSHAR_FLAGS, 0,
1379      /* last opt argumnt */ { NULL }, /* --quiet-unshar */
1380      /* arg list/cookie  */ NULL,
1381      /* must/cannot opts */ NULL, NULL,
1382      /* option proc      */ validate_opt_context,
1383      /* desc, NAME, name */ QUIET_UNSHAR_DESC, QUIET_UNSHAR_NAME, QUIET_UNSHAR_name,
1384      /* disablement strs */ NULL, NULL },
1385 
1386   {  /* entry idx, value */ 37, VALUE_OPT_BASENAME,
1387      /* equiv idx, value */ 37, VALUE_OPT_BASENAME,
1388      /* equivalenced to  */ NO_EQUIVALENT,
1389      /* min, max, act ct */ 0, 1, 0,
1390      /* opt state flags  */ BASENAME_FLAGS, 0,
1391      /* last opt argumnt */ { NULL }, /* --basename */
1392      /* arg list/cookie  */ NULL,
1393      /* must/cannot opts */ NULL, NULL,
1394      /* option proc      */ validate_opt_context,
1395      /* desc, NAME, name */ BASENAME_DESC, BASENAME_NAME, BASENAME_name,
1396      /* disablement strs */ NULL, NULL },
1397 
1398   {  /* entry idx, value */ 0, 0,
1399      /* equiv idx, value */ 0, 0,
1400      /* equivalenced to  */ NO_EQUIVALENT,
1401      /* min, max, act ct */ 0, 0, 0,
1402      /* opt state flags  */ INTERNATIONALIZATION_FLAGS, 0,
1403      /* last opt argumnt */ { NULL },
1404      /* arg list/cookie  */ NULL,
1405      /* must/cannot opts */ NULL, NULL,
1406      /* option proc      */ NULL,
1407      /* desc, NAME, name */ INTERNATIONALIZATION_DESC, NULL, NULL,
1408      /* disablement strs */ NULL, NULL },
1409 
1410   {  /* entry idx, value */ 39, VALUE_OPT_NO_I18N,
1411      /* equiv idx, value */ 39, VALUE_OPT_NO_I18N,
1412      /* equivalenced to  */ NO_EQUIVALENT,
1413      /* min, max, act ct */ 0, 1, 0,
1414      /* opt state flags  */ NO_I18N_FLAGS, 0,
1415      /* last opt argumnt */ { NULL }, /* --no-i18n */
1416      /* arg list/cookie  */ NULL,
1417      /* must/cannot opts */ NULL, NULL,
1418      /* option proc      */ validate_opt_context,
1419      /* desc, NAME, name */ NO_I18N_DESC, NO_I18N_NAME, NO_I18N_name,
1420      /* disablement strs */ NULL, NULL },
1421 
1422   {  /* entry idx, value */ 40, VALUE_OPT_PRINT_TEXT_DOMAIN_DIR,
1423      /* equiv idx, value */ 40, VALUE_OPT_PRINT_TEXT_DOMAIN_DIR,
1424      /* equivalenced to  */ NO_EQUIVALENT,
1425      /* min, max, act ct */ 0, 1, 0,
1426      /* opt state flags  */ PRINT_TEXT_DOMAIN_DIR_FLAGS, 0,
1427      /* last opt argumnt */ { NULL }, /* --print-text-domain-dir */
1428      /* arg list/cookie  */ NULL,
1429      /* must/cannot opts */ NULL, NULL,
1430      /* option proc      */ doOptPrint_Text_Domain_Dir,
1431      /* desc, NAME, name */ PRINT_TEXT_DOMAIN_DIR_DESC, PRINT_TEXT_DOMAIN_DIR_NAME, PRINT_TEXT_DOMAIN_DIR_name,
1432      /* disablement strs */ NULL, NULL },
1433 
1434   {  /* entry idx, value */ 0, 0,
1435      /* equiv idx, value */ 0, 0,
1436      /* equivalenced to  */ NO_EQUIVALENT,
1437      /* min, max, act ct */ 0, 0, 0,
1438      /* opt state flags  */ FEEDBACK_FLAGS, 0,
1439      /* last opt argumnt */ { NULL },
1440      /* arg list/cookie  */ NULL,
1441      /* must/cannot opts */ NULL, NULL,
1442      /* option proc      */ NULL,
1443      /* desc, NAME, name */ FEEDBACK_DESC, NULL, NULL,
1444      /* disablement strs */ NULL, NULL },
1445 
1446   {  /* entry idx, value */ 42, VALUE_OPT_QUIET,
1447      /* equiv idx, value */ 42, VALUE_OPT_QUIET,
1448      /* equivalenced to  */ NO_EQUIVALENT,
1449      /* min, max, act ct */ 0, 1, 0,
1450      /* opt state flags  */ QUIET_FLAGS, 0,
1451      /* last opt argumnt */ { NULL }, /* --quiet */
1452      /* arg list/cookie  */ NULL,
1453      /* must/cannot opts */ NULL, NULL,
1454      /* option proc      */ validate_opt_context,
1455      /* desc, NAME, name */ QUIET_DESC, QUIET_NAME, QUIET_name,
1456      /* disablement strs */ NULL, NULL },
1457 
1458   {  /* entry idx, value */ 43, VALUE_OPT_SILENT,
1459      /* equiv idx, value */ 43, VALUE_OPT_SILENT,
1460      /* equivalenced to  */ NO_EQUIVALENT,
1461      /* min, max, act ct */ 0, 1, 0,
1462      /* opt state flags  */ SILENT_FLAGS, 0,
1463      /* last opt argumnt */ { NULL }, /* --silent */
1464      /* arg list/cookie  */ NULL,
1465      /* must/cannot opts */ NULL, NULL,
1466      /* option proc      */ doOptSilent,
1467      /* desc, NAME, name */ SILENT_DESC, SILENT_NAME, SILENT_name,
1468      /* disablement strs */ 0, 0 },
1469 
1470   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
1471      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
1472      /* equivalenced to  */ NO_EQUIVALENT,
1473      /* min, max, act ct */ 0, 1, 0,
1474      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
1475      /* last opt argumnt */ { NULL },
1476      /* arg list/cookie  */ NULL,
1477      /* must/cannot opts */ NULL, NULL,
1478      /* option proc      */ VER_PROC,
1479      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
1480      /* disablement strs */ NULL, NULL },
1481 
1482 
1483 
1484   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
1485      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
1486      /* equivalenced to  */ NO_EQUIVALENT,
1487      /* min, max, act ct */ 0, 1, 0,
1488      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
1489      /* last opt argumnt */ { NULL },
1490      /* arg list/cookie  */ NULL,
1491      /* must/cannot opts */ NULL, NULL,
1492      /* option proc      */ doUsageOpt,
1493      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
1494      /* disablement strs */ NULL, NULL },
1495 
1496   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
1497      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
1498      /* equivalenced to  */ NO_EQUIVALENT,
1499      /* min, max, act ct */ 0, 1, 0,
1500      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
1501      /* last opt argumnt */ { NULL },
1502      /* arg list/cookie  */ NULL,
1503      /* must/cannot opts */ NULL,  NULL,
1504      /* option proc      */ optionPagedUsage,
1505      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
1506      /* disablement strs */ NULL, NULL },
1507 
1508   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
1509      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
1510      /* equivalenced to  */ NO_EQUIVALENT,
1511      /* min, max, act ct */ 0, 1, 0,
1512      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
1513                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
1514      /* last opt argumnt */ { NULL },
1515      /* arg list/cookie  */ NULL,
1516      /* must/cannot opts */ NULL,  NULL,
1517      /* option proc      */ NULL,
1518      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
1519      /* disablement strs */ NULL, NULL },
1520 
1521   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
1522      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
1523      /* equivalenced to  */ NO_EQUIVALENT,
1524      /* min, max, act ct */ 0, NOLIMIT, 0,
1525      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
1526 			  | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
1527      /* last opt argumnt */ { NULL },
1528      /* arg list/cookie  */ NULL,
1529      /* must/cannot opts */ NULL, NULL,
1530      /* option proc      */ optionLoadOpt,
1531      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
1532      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
1533 };
1534 
1535 
1536 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1537 /** Reference to the upper cased version of shar. */
1538 #define zPROGNAME       (shar_opt_strs+3580)
1539 /** Reference to the title line for shar usage. */
1540 #define zUsageTitle     (shar_opt_strs+3585)
1541 /** shar configuration file name. */
1542 #define zRcName         (shar_opt_strs+3707)
1543 /** Directories to search for shar config files. */
1544 static char const * const apzHomeList[2] = {
1545     shar_opt_strs+3701,
1546     NULL };
1547 /** The shar program bug email address. */
1548 #define zBugsAddr       (shar_opt_strs+3715)
1549 /** Clarification/explanation of what shar does. */
1550 #define zExplain        (shar_opt_strs+3737)
1551 /** Extra detail explaining what shar does. */
1552 #define zDetail         (shar_opt_strs+3860)
1553 /** The full version string for shar. */
1554 #define zFullVersion    (shar_opt_strs+4732)
1555 /* extracted from optcode.tlib near line 364 */
1556 
1557 #if defined(ENABLE_NLS)
1558 # define OPTPROC_BASE OPTPROC_TRANSLATE
1559   static tOptionXlateProc translate_option_strings;
1560 #else
1561 # define OPTPROC_BASE OPTPROC_NONE
1562 # define translate_option_strings NULL
1563 #endif /* ENABLE_NLS */
1564 
1565 #define shar_full_usage (shar_opt_strs+4760)
1566 #define shar_short_usage (shar_opt_strs+10169)
1567 
1568 #endif /* not defined __doxygen__ */
1569 
1570 /*
1571  *  Create the static procedure(s) declared above.
1572  */
1573 /**
1574  * The callout function that invokes the optionUsage function.
1575  *
1576  * @param[in] opts the AutoOpts option description structure
1577  * @param[in] od   the descriptor for the "help" (usage) option.
1578  * @noreturn
1579  */
1580 static void
doUsageOpt(tOptions * opts,tOptDesc * od)1581 doUsageOpt(tOptions * opts, tOptDesc * od)
1582 {
1583     int ex_code;
1584     ex_code = SHAR_EXIT_SUCCESS;
1585     optionUsage(&sharOptions, ex_code);
1586     /* NOTREACHED */
1587     exit(1);
1588     (void)opts;
1589     (void)od;
1590 }
1591 
1592 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1593 /**
1594  * Code to handle the level-of-compression option.
1595  * Some compression programs allow for a level of compression.  The
1596  * default is @code{9}, but this option allows you to specify something
1597  * else.  This value is used by @command{gzip}, @command{bzip2} and
1598  * @command{xz}, but not @command{compress}.
1599  * @param[in] pOptions the shar options data structure
1600  * @param[in,out] pOptDesc the option descriptor for this option.
1601  */
1602 static void
doOptLevel_Of_Compression(tOptions * pOptions,tOptDesc * pOptDesc)1603 doOptLevel_Of_Compression(tOptions* pOptions, tOptDesc* pOptDesc)
1604 {
1605     static struct {long rmin, rmax;} const rng[1] = {
1606         { 1, 9 } };
1607     int  ix;
1608 
1609     if (pOptions <= OPTPROC_EMIT_LIMIT)
1610         goto emit_ranges;
1611     optionNumericVal(pOptions, pOptDesc);
1612 
1613     for (ix = 0; ix < 1; ix++) {
1614         if (pOptDesc->optArg.argInt < rng[ix].rmin)
1615             continue;  /* ranges need not be ordered. */
1616         if (pOptDesc->optArg.argInt == rng[ix].rmin)
1617             return;
1618         if (rng[ix].rmax == LONG_MIN)
1619             continue;
1620         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1621             return;
1622     }
1623 
1624     option_usage_fp = stderr;
1625 
1626  emit_ranges:
1627 optionShowRange(pOptions, pOptDesc, VOIDP(rng), 1);
1628 }
1629 
1630 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1631 /**
1632  * Code to handle the bzip2 option.
1633  * @command{bzip2} compress and @command{uuencode} all files
1634  * prior to packing.  The recipient must have @command{uudecode}
1635  * @command{bzip2} in order to unpack.
1636  * @param[in] pOptions the shar options data structure
1637  * @param[in,out] pOptDesc the option descriptor for this option.
1638  */
1639 static void
doOptBzip2(tOptions * pOptions,tOptDesc * pOptDesc)1640 doOptBzip2(tOptions* pOptions, tOptDesc* pOptDesc)
1641 {
1642     /*
1643      * Be sure the flag-code[0] handles special values for the options pointer
1644      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1645      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1646      * reset its state.
1647      */
1648     /* extracted from shar-opts.def, line 139 */
1649     SET_OPT_COMPACTOR("bzip2");
1650     (void)pOptDesc;
1651     (void)pOptions;
1652 }
1653 
1654 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1655 /**
1656  * Code to handle the gzip option.
1657  * @command{gzip} compress and @command{uuencode} all files prior
1658  * to packing.  The recipient must have @command{uudecode} and
1659  * @command{gzip} in order to unpack.
1660  * @param[in] pOptions the shar options data structure
1661  * @param[in,out] pOptDesc the option descriptor for this option.
1662  */
1663 static void
doOptGzip(tOptions * pOptions,tOptDesc * pOptDesc)1664 doOptGzip(tOptions* pOptions, tOptDesc* pOptDesc)
1665 {
1666     /*
1667      * Be sure the flag-code[0] handles special values for the options pointer
1668      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1669      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1670      * reset its state.
1671      */
1672     /* extracted from shar-opts.def, line 153 */
1673     SET_OPT_COMPACTOR("gzip");
1674     (void)pOptDesc;
1675     (void)pOptions;
1676 }
1677 
1678 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1679 /**
1680  * Code to handle the compress option, when HAVE_COMPRESS is #define-d.
1681  * @command{compress} and @command{uuencode} all files prior to
1682  * packing.  The recipient must have @command{uudecode} and
1683  * @command{compress} in order to unpack.
1684  * @param[in] pOptions the shar options data structure
1685  * @param[in,out] pOptDesc the option descriptor for this option.
1686  */
1687 #ifdef HAVE_COMPRESS
1688 static void
doOptCompress(tOptions * pOptions,tOptDesc * pOptDesc)1689 doOptCompress(tOptions* pOptions, tOptDesc* pOptDesc)
1690 {
1691     /*
1692      * Be sure the flag-code[0] handles special values for the options pointer
1693      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1694      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1695      * reset its state.
1696      */
1697     /* extracted from shar-opts.def, line 168 */
1698     SET_OPT_COMPACTOR("compress");
1699     (void)pOptDesc;
1700     (void)pOptions;
1701 }
1702 #endif /* defined HAVE_COMPRESS */
1703 
1704 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1705 /**
1706  * Code to handle the level-for-gzip option.
1707  *
1708  * @param[in] pOptions the shar options data structure
1709  * @param[in,out] pOptDesc the option descriptor for this option.
1710  */
1711 static void
doOptLevel_For_Gzip(tOptions * pOptions,tOptDesc * pOptDesc)1712 doOptLevel_For_Gzip(tOptions* pOptions, tOptDesc* pOptDesc)
1713 {
1714     int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_LEVEL_OF_COMPRESSION);
1715     if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
1716         USAGE(SHAR_EXIT_USAGE_ERROR);
1717 
1718 }
1719 
1720 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1721 /**
1722  * Code to handle the bits-per-code option, when HAVE_COMPRESS is #define-d.
1723  * This is the compression factor used by the @command{compress} program.
1724  * @param[in] pOptions the shar options data structure
1725  * @param[in,out] pOptDesc the option descriptor for this option.
1726  */
1727 #ifdef HAVE_COMPRESS
1728 static void
doOptBits_Per_Code(tOptions * pOptions,tOptDesc * pOptDesc)1729 doOptBits_Per_Code(tOptions* pOptions, tOptDesc* pOptDesc)
1730 {
1731     /*
1732      * Be sure the flag-code[0] handles special values for the options pointer
1733      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1734      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1735      * reset its state.
1736      */
1737     /* extracted from shar-opts.def, line 190 */
1738     check_intermixing(pOptions, pOptDesc);
1739     SET_OPT_COMPACTOR("compress");
1740 }
1741 #endif /* defined HAVE_COMPRESS */
1742 
1743 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1744 /**
1745  * Code to handle the whole-size-limit option.
1746  * Limit the output file size to @file{size} bytes, but don't split input
1747  * files.  If @file{size} is less than 1024, then it will be multiplied
1748  * by 1024.  The value may also be specified with a k, K, m or M suffix.
1749  * The number is then multiplied by 1000, 1024, 1000000, or 1048576,
1750  * respectively.  4M (4194304) is the maximum allowed.
1751  *
1752  * Unlike the @code{split-size-limit} option, this allows the recipient
1753  * of the shar files to unpack them in any order.
1754  * @param[in] pOptions the shar options data structure
1755  * @param[in,out] pOptDesc the option descriptor for this option.
1756  */
1757 static void
doOptWhole_Size_Limit(tOptions * pOptions,tOptDesc * pOptDesc)1758 doOptWhole_Size_Limit(tOptions* pOptions, tOptDesc* pOptDesc)
1759 {
1760     static struct {long rmin, rmax;} const rng[2] = {
1761         { 8, 1023 },       { 8192, 4194304 } };
1762     int  ix;
1763 
1764     if (pOptions <= OPTPROC_EMIT_LIMIT)
1765         goto emit_ranges;
1766     optionNumericVal(pOptions, pOptDesc);
1767 
1768     for (ix = 0; ix < 2; ix++) {
1769         if (pOptDesc->optArg.argInt < rng[ix].rmin)
1770             continue;  /* ranges need not be ordered. */
1771         if (pOptDesc->optArg.argInt == rng[ix].rmin)
1772             return;
1773         if (rng[ix].rmax == LONG_MIN)
1774             continue;
1775         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1776             return;
1777     }
1778 
1779     option_usage_fp = stderr;
1780 
1781  emit_ranges:
1782 optionShowRange(pOptions, pOptDesc, VOIDP(rng), 2);
1783 }
1784 
1785 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1786 /**
1787  * Code to handle the split-size-limit option.
1788  * Limit output file size to @file{size} bytes, splitting files if
1789  * necessary.  The allowed values are specified as with the
1790  * @option{--whole-size-limit} option.
1791  *
1792  * The archive parts created with this option must be unpacked in the
1793  * correct order.  If the recipient of the shell archives wants to put
1794  * all of them in a single email folder (file), they will have to be
1795  * saved in the correct order for @command{unshar} to unpack them all at
1796  * once (using one of the split archive options).
1797  * @xref{unshar Invocation}.
1798  * @param[in] pOptions the shar options data structure
1799  * @param[in,out] pOptDesc the option descriptor for this option.
1800  */
1801 static void
doOptSplit_Size_Limit(tOptions * pOptions,tOptDesc * pOptDesc)1802 doOptSplit_Size_Limit(tOptions* pOptions, tOptDesc* pOptDesc)
1803 {
1804     static struct {long rmin, rmax;} const rng[2] = {
1805         { 8, 1023 },       { 8192, 4194304 } };
1806     int  ix;
1807 
1808     if (pOptions <= OPTPROC_EMIT_LIMIT)
1809         goto emit_ranges;
1810     optionNumericVal(pOptions, pOptDesc);
1811 
1812     for (ix = 0; ix < 2; ix++) {
1813         if (pOptDesc->optArg.argInt < rng[ix].rmin)
1814             continue;  /* ranges need not be ordered. */
1815         if (pOptDesc->optArg.argInt == rng[ix].rmin)
1816             return;
1817         if (rng[ix].rmax == LONG_MIN)
1818             continue;
1819         if (pOptDesc->optArg.argInt <= rng[ix].rmax)
1820             return;
1821     }
1822 
1823     option_usage_fp = stderr;
1824 
1825  emit_ranges:
1826 optionShowRange(pOptions, pOptDesc, VOIDP(rng), 2);
1827 }
1828 
1829 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1830 /**
1831  * Code to handle the input-file-list option.
1832  * This option causes @file{file} to be reopened as standard input.  If
1833  * no files are found on the input line, then standard input is read for
1834  * input file names.  Use of this option will prohibit input files from
1835  * being listed on the command line.
1836  *
1837  * Input must be in a form similar to that generated by @command{find},
1838  * one filename per line.  This switch is especially useful when the
1839  * command line will not hold the list of files to be archived.
1840  *
1841  * If the @option{--intermix-type} option is specified on the command
1842  * line, then the compression options may be included in the standard
1843  * input on lines by themselves and no file name may begin with a hyphen.
1844  *
1845  * For example:
1846  * @example
1847  * @{ echo --compact xz
1848  *    find . -type f -print | sort
1849  * @} | shar -S -p -L50K -o /somewhere/big
1850  * @end example
1851  * @param[in] pOptions the shar options data structure
1852  * @param[in,out] pOptDesc the option descriptor for this option.
1853  */
1854 static void
doOptInput_File_List(tOptions * pOptions,tOptDesc * pOptDesc)1855 doOptInput_File_List(tOptions* pOptions, tOptDesc* pOptDesc)
1856 {
1857     /*
1858      * Be sure the flag-code[0] handles special values for the options pointer
1859      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1860      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1861      * reset its state.
1862      */
1863     /* extracted from shar-opts.def, line 358 */
1864     char const * fnm = pOptDesc->optArg.argString;
1865     validate_opt_context (pOptions, pOptDesc);
1866     if (strcmp (fnm, "-") != 0) {
1867         FILE * fp = freopen(fnm, "r", stdin);
1868         if (fp != stdin)
1869             usage_message(_("Cannot reopen %s as stdin"), fnm);
1870     }
1871 }
1872 
1873 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1874 /**
1875  * Code to handle the stdin-file-list option.
1876  * This option is actually a no-op.  It is a wrapper for
1877  * @option{--input-file-list=-}.
1878  * @param[in] pOptions the shar options data structure
1879  * @param[in,out] pOptDesc the option descriptor for this option.
1880  */
1881 static void
doOptStdin_File_List(tOptions * pOptions,tOptDesc * pOptDesc)1882 doOptStdin_File_List(tOptions* pOptions, tOptDesc* pOptDesc)
1883 {
1884     /*
1885      * Be sure the flag-code[0] handles special values for the options pointer
1886      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1887      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1888      * reset its state.
1889      */
1890     /* extracted from shar-opts.def, line 394 */
1891     SET_OPT_INPUT_FILE_LIST("-");
1892     (void)pOptDesc;
1893     (void)pOptions;
1894 }
1895 
1896 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1897 /**
1898  * Code to handle the vanilla-operation option.
1899  * This option produces @samp{vanilla} shars which rely only upon the
1900  * existence of @command{echo}, @command{test} and @command{sed} in the
1901  * unpacking environment.
1902  *
1903  * It changes the default behavior from mixed mode
1904  * (@option{--mixed-uuencode}) to text mode (@option{--text-files}).
1905  * Warnings are produced if options are specified that will require
1906  * decompression or decoding in the unpacking environment.
1907  *
1908  * @param[in] pOptions the shar options data structure
1909  * @param[in,out] pOptDesc the option descriptor for this option.
1910  */
1911 static void
doOptVanilla_Operation(tOptions * pOptions,tOptDesc * pOptDesc)1912 doOptVanilla_Operation(tOptions* pOptions, tOptDesc* pOptDesc)
1913 {
1914     /*
1915      * Be sure the flag-code[0] handles special values for the options pointer
1916      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1917      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1918      * reset its state.
1919      */
1920     /* extracted from shar-opts.def, line 590 */
1921     validate_opt_context (pOptions, pOptDesc);
1922 
1923     SET_OPT_NO_CHARACTER_COUNT;
1924     SET_OPT_NO_TIMESTAMP;
1925     SET_OPT_NO_MD5_DIGEST;
1926     SET_OPT_NO_I18N;
1927     SET_OPT_NO_PIPING;
1928     SET_OPT_FORCE_PREFIX;
1929 }
1930 
1931 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1932 /**
1933  * Code to handle the print-text-domain-dir option.
1934  * Prints the directory shar looks in to find messages files
1935  * for different languages, then immediately exits.
1936  * @param[in] pOptions the shar options data structure
1937  * @param[in,out] pOptDesc the option descriptor for this option.
1938  */
1939 static void
doOptPrint_Text_Domain_Dir(tOptions * pOptions,tOptDesc * pOptDesc)1940 doOptPrint_Text_Domain_Dir(tOptions* pOptions, tOptDesc* pOptDesc)
1941 {
1942     /*
1943      * Be sure the flag-code[0] handles special values for the options pointer
1944      * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit
1945      * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to
1946      * reset its state.
1947      */
1948     /* extracted from shar-opts.def, line 745 */
1949     validate_opt_context (pOptions, pOptDesc);
1950 
1951 #if !defined ENABLE_NLS || defined HAVE_CATGETS \
1952     || (defined HAVE_GETTEXT && !defined __USE_GNU_GETTEXT)
1953     exit (EXIT_FAILURE);
1954 #else
1955     puts (LOCALEDIR);
1956     exit (EXIT_SUCCESS);
1957 #endif
1958 }
1959 
1960 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1961 /**
1962  * Code to handle the silent option.
1963  *
1964  * @param[in] pOptions the shar options data structure
1965  * @param[in,out] pOptDesc the option descriptor for this option.
1966  */
1967 static void
doOptSilent(tOptions * pOptions,tOptDesc * pOptDesc)1968 doOptSilent(tOptions* pOptions, tOptDesc* pOptDesc)
1969 {
1970     int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_QUIET);
1971     if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
1972         USAGE(SHAR_EXIT_USAGE_ERROR);
1973 
1974 }
1975 /* extracted from optmain.tlib near line 1250 */
1976 
1977 /**
1978  * Print a usage message with a format and va_list argument.
1979  * The optionUsage function is then invoked to print
1980  * the error usage text (somewhat abbreviated) and then exit.
1981  *
1982  * @param[in] fmt the message format string
1983  * @param[in] ap  the var-arg list.
1984  * @noreturn
1985  */
1986 void
vusage_message(char const * fmt,va_list ap)1987 vusage_message(char const * fmt, va_list ap)
1988 {
1989     char const * er_leader = _("shar usage error:\n");
1990     fputs(er_leader, stderr);
1991     vfprintf(stderr, fmt, ap);
1992     optionUsage(&sharOptions, SHAR_EXIT_USAGE_ERROR);
1993     /* NOTREACHED */
1994     exit(1);
1995 }
1996 
1997 /**
1998  * Print a usage message with a format and a variable argument list.
1999  * vusage_message() is called to do the work.
2000  *
2001  * @param[in] fmt the message format string
2002  * @param[in] ... the argument list for the message
2003  * @noreturn
2004  */
2005 void
usage_message(char const * fmt,...)2006 usage_message(char const * fmt, ...)
2007 {
2008     va_list ap;
2009     va_start(ap, fmt);
2010     vusage_message(fmt, ap);
2011     /* NOTREACHED */
2012     va_end(ap);
2013 }
2014 
2015 /**
2016  * Print a fatal error message and die, \a va_list style.
2017  *
2018  * @param[in] exit_code  the value to call exit(3) with
2019  * @param[in] fmt        the death rattle message
2020  * @param[in] ap         the argument list for the message
2021  * @noreturn
2022  */
2023 void
vdie(int exit_code,char const * fmt,va_list ap)2024 vdie(int exit_code, char const * fmt, va_list ap)
2025 {
2026     char const * die_leader = _("shar fatal error:\n");
2027     fputs(die_leader, stderr);
2028     vfprintf(stderr, fmt, ap);
2029     fflush(stderr);
2030     exit(exit_code);
2031     /* NOTREACHED */
2032 }
2033 
2034 /**
2035  * Print a fatal error message and die, var-arg style.
2036  *
2037  * @param[in] exit_code  the value to call exit(3) with
2038  * @param[in] fmt        the death rattle message
2039  * @param[in] ...        the list of arguments for the message
2040  * @noreturn
2041  */
2042 void
die(int exit_code,char const * fmt,...)2043 die(int exit_code, char const * fmt, ...)
2044 {
2045     va_list ap;
2046     va_start(ap, fmt);
2047     vdie(exit_code, fmt, ap);
2048     /* NOTREACHED */
2049     va_end(ap);
2050 }
2051 
2052 /**
2053  * Print a file system error fatal error message and die.
2054  *
2055  * @param[in] exit_code  the value to call exit(3) with.
2056  * @param[in] op         the operation that failed.
2057  * @param[in] fname      the file name the operation was on.
2058  * @noreturn
2059  */
2060 void
fserr(int exit_code,char const * op,char const * fname)2061 fserr(int exit_code, char const * op, char const * fname)
2062 {
2063     char const * fserr_fmt = _("fserr %d (%s) performing '%s' on %s\n");
2064     die(exit_code, fserr_fmt, errno, strerror(errno), op, fname);
2065     /* NOTREACHED */
2066 }
2067 
2068 /**
2069  * The directory containing the data associated with shar.
2070  */
2071 #ifndef  PKGDATADIR
2072 # define PKGDATADIR ""
2073 #endif
2074 
2075 /**
2076  * Information about the person or institution that packaged shar
2077  * for the current distribution.
2078  */
2079 #ifndef  WITH_PACKAGER
2080 # define shar_packager_info NULL
2081 #else
2082 /** Packager information for shar. */
2083 static char const shar_packager_info[] =
2084     "Packaged by " WITH_PACKAGER
2085 
2086 # ifdef WITH_PACKAGER_VERSION
2087         " ("WITH_PACKAGER_VERSION")"
2088 # endif
2089 
2090 # ifdef WITH_PACKAGER_BUG_REPORTS
2091     "\nReport shar bugs to " WITH_PACKAGER_BUG_REPORTS
2092 # endif
2093     "\n";
2094 #endif
2095 #ifndef __doxygen__
2096 
2097 #endif /* __doxygen__ */
2098 /**
2099  * The option definitions for shar.  The one structure that
2100  * binds them all.
2101  */
2102 tOptions sharOptions = {
2103     OPTIONS_STRUCT_VERSION,
2104     0, NULL,                    /* original argc + argv    */
2105     ( OPTPROC_BASE
2106     + OPTPROC_ERRSTOP
2107     + OPTPROC_SHORTOPT
2108     + OPTPROC_LONGOPT
2109     + OPTPROC_NO_REQ_OPT
2110     + OPTPROC_GNUUSAGE
2111     + OPTPROC_MISUSE ),
2112     0, NULL,                    /* current option index, current option */
2113     NULL,         NULL,         zPROGNAME,
2114     zRcName,      zCopyright,   zLicenseDescrip,
2115     zFullVersion, apzHomeList,  zUsageTitle,
2116     zExplain,     zDetail,      optDesc,
2117     zBugsAddr,                  /* address to send bugs to */
2118     NULL, NULL,                 /* extensions/saved state  */
2119     optionUsage, /* usage procedure */
2120     translate_option_strings,   /* translation procedure */
2121     /*
2122      *  Indexes to special options
2123      */
2124     { INDEX_OPT_MORE_HELP, /* more-help option index */
2125       INDEX_OPT_SAVE_OPTS, /* save option index */
2126       NO_EQUIVALENT, /* '-#' option index */
2127       NO_EQUIVALENT /* index of default opt */
2128     },
2129     49 /* full option count */, 44 /* user option count */,
2130     shar_full_usage, shar_short_usage,
2131     NULL, NULL,
2132     PKGDATADIR, shar_packager_info
2133 };
2134 
2135 #if ENABLE_NLS
2136 /**
2137  * This code is designed to translate translatable option text for the
2138  * shar program.  These translations happen upon entry
2139  * to optionProcess().
2140  */
2141 #include <stdio.h>
2142 #include <stdlib.h>
2143 #include <string.h>
2144 #include <unistd.h>
2145 #ifdef HAVE_DCGETTEXT
2146 # include <gettext.h>
2147 #endif
2148 #include <autoopts/usage-txt.h>
2149 
2150 static char * AO_gettext(char const * pz);
2151 static void   coerce_it(void ** s);
2152 
2153 /**
2154  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
2155  * to convert from English to the target language, then strdup-duplicates the
2156  * result string.  It tries the "libopts" domain first, then whatever has been
2157  * set via the \a textdomain(3) call.
2158  *
2159  * @param[in] pz the input text used as a lookup key.
2160  * @returns the translated text (if there is one),
2161  *   or the original text (if not).
2162  */
2163 static char *
AO_gettext(char const * pz)2164 AO_gettext(char const * pz)
2165 {
2166     char * res;
2167     if (pz == NULL)
2168         return NULL;
2169 #ifdef HAVE_DCGETTEXT
2170     /*
2171      * While processing the option_xlateable_txt data, try to use the
2172      * "libopts" domain.  Once we switch to the option descriptor data,
2173      * do *not* use that domain.
2174      */
2175     if (option_xlateable_txt.field_ct != 0) {
2176         res = dgettext("libopts", pz);
2177         if (res == pz)
2178             res = (char *)VOIDP(_(pz));
2179     } else
2180         res = (char *)VOIDP(_(pz));
2181 #else
2182     res = (char *)VOIDP(_(pz));
2183 #endif
2184     if (res == pz)
2185         return res;
2186     res = strdup(res);
2187     if (res == NULL) {
2188         fputs(_("No memory for duping translated strings\n"), stderr);
2189         exit(SHAR_EXIT_OPTION_ERROR);
2190     }
2191     return res;
2192 }
2193 
2194 /**
2195  * All the pointers we use are marked "* const", but they are stored in
2196  * writable memory.  Coerce the mutability and set the pointer.
2197  */
coerce_it(void ** s)2198 static void coerce_it(void ** s) { *s = AO_gettext(*s);
2199 }
2200 
2201 /**
2202  * Translate all the translatable strings in the sharOptions
2203  * structure defined above.  This is done only once.
2204  */
2205 static void
translate_option_strings(void)2206 translate_option_strings(void)
2207 {
2208     tOptions * const opts = &sharOptions;
2209 
2210     /*
2211      *  Guard against re-translation.  It won't work.  The strings will have
2212      *  been changed by the first pass through this code.  One shot only.
2213      */
2214     if (option_xlateable_txt.field_ct != 0) {
2215         /*
2216          *  Do the translations.  The first pointer follows the field count
2217          *  field.  The field count field is the size of a pointer.
2218          */
2219         char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
2220         int     ix  = option_xlateable_txt.field_ct;
2221 
2222         do {
2223             ppz++; /* skip over field_ct */
2224             *ppz = AO_gettext(*ppz);
2225         } while (--ix > 0);
2226         /* prevent re-translation and disable "libopts" domain lookup */
2227         option_xlateable_txt.field_ct = 0;
2228 
2229         coerce_it(VOIDP(&(opts->pzCopyright)));
2230         coerce_it(VOIDP(&(opts->pzCopyNotice)));
2231         coerce_it(VOIDP(&(opts->pzFullVersion)));
2232     }
2233 }
2234 #endif /* ENABLE_NLS */
2235 
2236 #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
2237 /** I18N function strictly for xgettext.  Do not compile. */
bogus_function(void)2238 static void bogus_function(void) {
2239   /* TRANSLATORS:
2240 
2241      The following dummy function was crated solely so that xgettext can
2242      extract the correct strings.  These strings are actually referenced
2243      by a field name in the sharOptions structure noted in the
2244      comments below.  The literal text is defined in shar_opt_strs.
2245 
2246      NOTE: the strings below are segmented with respect to the source string
2247      shar_opt_strs.  The strings above are handed off for translation
2248      at run time a paragraph at a time.  Consequently, they are presented here
2249      for translation a paragraph at a time.
2250 
2251      ALSO: often the description for an option will reference another option
2252      by name.  These are set off with apostrophe quotes (I hope).  Do not
2253      translate option names.
2254    */
2255   /* referenced via sharOptions.pzCopyright */
2256   puts(_("shar (GNU sharutils) 4.15.2\n\
2257 Copyright (C) 1994-2015 Free Software Foundation, Inc., all rights reserved.\n\
2258 This is free software. It is licensed for use, modification and\n\
2259 redistribution under the terms of the GNU General Public License,\n\
2260 version 3 or later <http://gnu.org/licenses/gpl.html>\n"));
2261 
2262   /* referenced via sharOptions.pzCopyNotice */
2263   puts(_("shar is free software: you can redistribute it and/or modify it under the\n\
2264 terms of the GNU General Public License as published by the Free Software\n\
2265 Foundation, either version 3 of the License, or (at your option) any later\n\
2266 version.\n\n"));
2267   puts(_("shar is distributed in the hope that it will be useful, but WITHOUT ANY\n\
2268 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\
2269 FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n\
2270 details.\n\n"));
2271   puts(_("You should have received a copy of the GNU General Public License along\n\
2272 with this program.  If not, see <http://www.gnu.org/licenses/>.\n"));
2273 
2274   /* referenced via sharOptions.pzUsageTitle */
2275   puts(_("shar (GNU sharutils) - create a shell archive\n\
2276 Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n"));
2277 
2278   /* referenced via sharOptions.pzExplain */
2279   puts(_("If no 'file's are specified, the list of input files is read from standard\n\
2280 input.  Standard input must not be a terminal.\n"));
2281 
2282   /* referenced via sharOptions.pzDetail */
2283   puts(_("'shar' creates \"shell archives\" (or shar files) which are in text format\n\
2284 and can be emailed.  These files may be unpacked later by executing them\n\
2285 with '/bin/sh'.  The resulting archive is sent to standard out unless the\n\
2286 '-o' option is given.  A wide range of features provide extensive\n\
2287 flexibility in manufacturing shars and in specifying 'shar' \"smartness\".\n\
2288 Archives may be fairly simple ('--vanilla-operation') or essentially a\n\
2289 mailable 'tar' archive.\n\n"));
2290   puts(_("Options may be specified in any order until a 'file' argument is\n\
2291 recognized.  If the '--intermix-type' option has been specified, more\n\
2292 compression and encoding options will be recognized between the 'file'\n\
2293 arguments.\n\n"));
2294   puts(_("Though this program supports 'uuencode'-d files, they are deprecated.  If\n\
2295 you are emailing files, please consider mime-encoded files.  If you do\n\
2296 'uuencode', base64 is the preferred encoding method.\n"));
2297 
2298   /* referenced via sharOptions.pzFullVersion */
2299   puts(_("shar (GNU sharutils) 4.15.2"));
2300 
2301   /* referenced via sharOptions.pzFullUsage */
2302   puts(_("shar (GNU sharutils) - create a shell archive\n\
2303 Usage:  shar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\n"));
2304   puts(_("Specify compression:\n\
2305    -p, --intermix-type        specify compression for input files\n\
2306                                 - prohibits the option 'vanilla-operation'\n"));
2307   puts(_("   -C, --compactor=PROG       specify compaction (compression) program PROG\n\
2308                                 - prohibits the option 'vanilla-operation'\n\
2309                                 - may appear multiple times\n\
2310                                 - it must be known to shar: xz gzip bzip2\n"));
2311   puts(_("   -g, --level-of-compression=LEVEL\n\
2312                               pass LEVEL for compression\n\
2313                                 - it must be in the range: 1 to 9\n\n"));
2314   puts(_("Specify file encoding methodology:\n\
2315    -M, --mixed-uuencode       decide uuencoding for each file\n"));
2316   puts(_("   -B, --uuencode             treat all files as binary\n\
2317                                 - an alternate for mixed-uuencode\n"));
2318   puts(_("   -T, --text-files           treat all files as text\n\
2319                                 - an alternate for mixed-uuencode\n\n"));
2320   puts(_("Specifying file selection and output modes:\n"));
2321   puts(_("   -o, --output-prefix=str    print output to file PREFIX.nn\n"));
2322   puts(_("   -l, --whole-size-limit=SIZE\n\
2323                               split archive, not files, to SIZE\n\
2324                                 - requires the option 'output-prefix'\n\
2325                                 - is scalable with a suffix: k/K/m/M/g/G/t/T\n\
2326                                 - it must lie in one of the ranges:\n\
2327                                   8 to 1023, or 8192 to 4194304\n"));
2328   puts(_("   -L, --split-size-limit=SIZE\n\
2329                               split archive or files to SIZE\n\
2330                                 - requires the option 'output-prefix'\n\
2331                                 - is scalable with a suffix: k/K/m/M/g/G/t/T\n\
2332                                 - it must lie in one of the ranges:\n\
2333                                   8 to 1023, or 8192 to 4194304\n\
2334                                 - an alternate for 'whole-size-limit'\n"));
2335   puts(_("   -I, --input-file-list=FILE read file list from FILE\n\n"));
2336   puts(_("Controlling the shar headers:\n\
2337    -n, --archive-name=NAME    use NAME to document the archive\n"));
2338   puts(_("   -s, --submitter=NAME       override the submitter name with NAME\n"));
2339   puts(_("   -a, --net-headers          output Submitted-by: & Archive-name: headers\n\
2340                                 - requires the option 'archive-name'\n"));
2341   puts(_("   -c, --cut-mark             start the shar with a cut line\n"));
2342   puts(_("   -t, --translate            translate messages in the script\n\n"));
2343   puts(_("Protecting against transmission issues:\n\
2344        --no-character-count   do not use `wc -c' to check size\n"));
2345   puts(_("   -D, --no-md5-digest        do not use md5sum digest to verify\n"));
2346   puts(_("   -F, --force-prefix         apply the prefix character on every line\n"));
2347   puts(_("   -d, --here-delimiter=DELIM use DELIM to delimit the files\n\n"));
2348   puts(_("Producing different kinds of shars:\n\
2349    -V, --vanilla-operation    produce very simple shars\n"));
2350   puts(_("   -P, --no-piping            use temporary files between programs\n"));
2351   puts(_("   -x, --no-check-existing    blindly overwrite existing files\n"));
2352   puts(_("   -X, --query-user           ask user before overwriting files\n\
2353                                 - prohibits the option 'vanilla-operation'\n"));
2354   puts(_("   -m, --no-timestamp         do not restore modification times\n"));
2355   puts(_("   -Q, --quiet-unshar         avoid verbose messages at unshar time\n"));
2356   puts(_("   -f, --basename             restore in one directory, despite hierarchy\n\n"));
2357   puts(_("Internationalization options:\n\
2358        --no-i18n              do not internationalize\n"));
2359   puts(_("       --print-text-domain-dir  print directory with shar messages\n\n"));
2360   puts(_("User feedback/entertainment:\n\
2361    -q, --quiet                do not output verbose messages\n"));
2362   puts(_("       --silent               an alias for the 'quiet' option\n\n"));
2363   puts(_("Version, usage and configuration options:\n"));
2364   puts(_("   -v, --version[=MODE]       output version information and exit\n"));
2365   puts(_("   -h, --help                 display extended usage information and exit\n"));
2366   puts(_("   -!, --more-help            extended usage information passed thru pager\n"));
2367   puts(_("   -R, --save-opts[=FILE]     save the option state to a config file FILE\n"));
2368   puts(_("   -r, --load-opts=FILE       load options from the config file FILE\n\
2369                                 - disabled with '--no-load-opts'\n\
2370                                 - may appear multiple times\n\n"));
2371   puts(_("Options are specified by doubled hyphens and their name or by a single\n\
2372 hyphen and the flag character.\n\
2373 If no 'file's are specified, the list of input files is read from a\n\
2374 standard input.  Standard input must not be a terminal.\n\n"));
2375   puts(_("The following option preset mechanisms are supported:\n"));
2376   puts(_(" - reading file $HOME/.sharrc\n\n\
2377 'shar' creates \"shell archives\" (or shar files) which are in text format\n\
2378 and can be emailed.  These files may be unpacked later by executing them\n\
2379 with '/bin/sh'.  The resulting archive is sent to standard out unless the\n\
2380 '-o' option is given.  A wide range of features provide extensive\n\
2381 flexibility in manufacturing shars and in specifying 'shar' \"smartness\".\n\
2382 Archives may be fairly simple ('--vanilla-operation') or essentially a\n\
2383 mailable 'tar' archive.\n\n"));
2384   puts(_("Options may be specified in any order until a 'file' argument is\n\
2385 recognized.  If the '--intermix-type' option has been specified, more\n\
2386 compression and encoding options will be recognized between the 'file'\n\
2387 arguments.\n\n"));
2388   puts(_("Though this program supports 'uuencode'-d files, they are deprecated.  If\n\
2389 you are emailing files, please consider mime-encoded files.  If you do\n\
2390 'uuencode', base64 is the preferred encoding method.\n\n\
2391 Please send bug reports to:  <bug-gnu-utils@gnu.org>\n"));
2392 
2393   /* referenced via sharOptions.pzShortUsage */
2394   puts(_("shar (GNU sharutils) - create a shell archive\n\
2395 Usage:  shar [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [<file>...]\n\
2396 Try 'shar --help' for more information.\n"));
2397   /* LIBOPTS-MESSAGES: */
2398 #line 67 "../autoopts.c"
2399   puts(_("allocation of %d bytes failed\n"));
2400 #line 93 "../autoopts.c"
2401   puts(_("allocation of %d bytes failed\n"));
2402 #line 53 "../init.c"
2403   puts(_("AutoOpts function called without option descriptor\n"));
2404 #line 86 "../init.c"
2405   puts(_("\tThis exceeds the compiled library version:  "));
2406 #line 84 "../init.c"
2407   puts(_("Automated Options Processing Error!\n"
2408        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
2409 #line 80 "../autoopts.c"
2410   puts(_("realloc of %d bytes at 0x%p failed\n"));
2411 #line 88 "../init.c"
2412   puts(_("\tThis is less than the minimum library version:  "));
2413 #line 121 "../version.c"
2414   puts(_("Automated Options version %s\n"
2415        "\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
2416 #line 87 "../makeshell.c"
2417   puts(_("(AutoOpts bug):  %s.\n"));
2418 #line 90 "../reset.c"
2419   puts(_("optionResetOpt() called, but reset-option not configured"));
2420 #line 292 "../usage.c"
2421   puts(_("could not locate the 'help' option"));
2422 #line 336 "../autoopts.c"
2423   puts(_("optionProcess() was called with invalid data"));
2424 #line 748 "../usage.c"
2425   puts(_("invalid argument type specified"));
2426 #line 598 "../find.c"
2427   puts(_("defaulted to option with optional arg"));
2428 #line 76 "../alias.c"
2429   puts(_("aliasing option is out of range."));
2430 #line 234 "../enum.c"
2431   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
2432 #line 108 "../find.c"
2433   puts(_("  The following options match:\n"));
2434 #line 293 "../find.c"
2435   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
2436 #line 161 "../check.c"
2437   puts(_("%s: Command line arguments required\n"));
2438 #line 43 "../alias.c"
2439   puts(_("%d %s%s options allowed\n"));
2440 #line 94 "../makeshell.c"
2441   puts(_("%s error %d (%s) calling %s for '%s'\n"));
2442 #line 306 "../makeshell.c"
2443   puts(_("interprocess pipe"));
2444 #line 168 "../version.c"
2445   puts(_("error: version option argument '%c' invalid.  Use:\n"
2446        "\t'v' - version only\n"
2447        "\t'c' - version and copyright\n"
2448        "\t'n' - version and full copyright notice\n"));
2449 #line 58 "../check.c"
2450   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
2451 #line 217 "../find.c"
2452   puts(_("%s: The '%s' option has been disabled."));
2453 #line 430 "../find.c"
2454   puts(_("%s: The '%s' option has been disabled."));
2455 #line 38 "../alias.c"
2456   puts(_("-equivalence"));
2457 #line 469 "../find.c"
2458   puts(_("%s: illegal option -- %c\n"));
2459 #line 110 "../reset.c"
2460   puts(_("%s: illegal option -- %c\n"));
2461 #line 271 "../find.c"
2462   puts(_("%s: illegal option -- %s\n"));
2463 #line 755 "../find.c"
2464   puts(_("%s: illegal option -- %s\n"));
2465 #line 118 "../reset.c"
2466   puts(_("%s: illegal option -- %s\n"));
2467 #line 335 "../find.c"
2468   puts(_("%s: unknown vendor extension option -- %s\n"));
2469 #line 159 "../enum.c"
2470   puts(_("  or an integer from %d through %d\n"));
2471 #line 169 "../enum.c"
2472   puts(_("  or an integer from %d through %d\n"));
2473 #line 747 "../usage.c"
2474   puts(_("%s error:  invalid option descriptor for %s\n"));
2475 #line 1081 "../usage.c"
2476   puts(_("%s error:  invalid option descriptor for %s\n"));
2477 #line 385 "../find.c"
2478   puts(_("%s: invalid option name: %s\n"));
2479 #line 527 "../find.c"
2480   puts(_("%s: The '%s' option requires an argument.\n"));
2481 #line 156 "../autoopts.c"
2482   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
2483        "\t'%s' and '%s'."));
2484 #line 94 "../check.c"
2485   puts(_("%s error:  The %s option is required\n"));
2486 #line 632 "../find.c"
2487   puts(_("%s: The '%s' option cannot have an argument.\n"));
2488 #line 151 "../check.c"
2489   puts(_("%s: Command line arguments are not allowed.\n"));
2490 #line 535 "../save.c"
2491   puts(_("error %d (%s) creating %s\n"));
2492 #line 234 "../enum.c"
2493   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
2494 #line 93 "../reset.c"
2495   puts(_("%s error: The '%s' option requires an argument.\n"));
2496 #line 184 "../save.c"
2497   puts(_("error %d (%s) stat-ing %s\n"));
2498 #line 238 "../save.c"
2499   puts(_("error %d (%s) stat-ing %s\n"));
2500 #line 143 "../restore.c"
2501   puts(_("%s error: no saved option state\n"));
2502 #line 231 "../autoopts.c"
2503   puts(_("'%s' is not a command line option.\n"));
2504 #line 111 "../time.c"
2505   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
2506 #line 132 "../save.c"
2507   puts(_("'%s' not defined\n"));
2508 #line 50 "../time.c"
2509   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
2510 #line 92 "../check.c"
2511   puts(_("%s error:  The %s option must appear %d times.\n"));
2512 #line 164 "../numeric.c"
2513   puts(_("%s error:  '%s' is not a recognizable number.\n"));
2514 #line 200 "../enum.c"
2515   puts(_("%s error:  %s exceeds %s keyword count\n"));
2516 #line 330 "../usage.c"
2517   puts(_("Try '%s %s' for more information.\n"));
2518 #line 45 "../alias.c"
2519   puts(_("one %s%s option allowed\n"));
2520 #line 208 "../makeshell.c"
2521   puts(_("standard output"));
2522 #line 943 "../makeshell.c"
2523   puts(_("standard output"));
2524 #line 274 "../usage.c"
2525   puts(_("standard output"));
2526 #line 415 "../usage.c"
2527   puts(_("standard output"));
2528 #line 625 "../usage.c"
2529   puts(_("standard output"));
2530 #line 175 "../version.c"
2531   puts(_("standard output"));
2532 #line 274 "../usage.c"
2533   puts(_("standard error"));
2534 #line 415 "../usage.c"
2535   puts(_("standard error"));
2536 #line 625 "../usage.c"
2537   puts(_("standard error"));
2538 #line 175 "../version.c"
2539   puts(_("standard error"));
2540 #line 208 "../makeshell.c"
2541   puts(_("write"));
2542 #line 943 "../makeshell.c"
2543   puts(_("write"));
2544 #line 273 "../usage.c"
2545   puts(_("write"));
2546 #line 414 "../usage.c"
2547   puts(_("write"));
2548 #line 624 "../usage.c"
2549   puts(_("write"));
2550 #line 174 "../version.c"
2551   puts(_("write"));
2552 #line 60 "../numeric.c"
2553   puts(_("%s error:  %s option value %ld is out of range.\n"));
2554 #line 44 "../check.c"
2555   puts(_("%s error:  %s option requires the %s option\n"));
2556 #line 131 "../save.c"
2557   puts(_("%s warning:  cannot save options - %s not regular file\n"));
2558 #line 183 "../save.c"
2559   puts(_("%s warning:  cannot save options - %s not regular file\n"));
2560 #line 237 "../save.c"
2561   puts(_("%s warning:  cannot save options - %s not regular file\n"));
2562 #line 256 "../save.c"
2563   puts(_("%s warning:  cannot save options - %s not regular file\n"));
2564 #line 534 "../save.c"
2565   puts(_("%s warning:  cannot save options - %s not regular file\n"));
2566   /* END-LIBOPTS-MESSAGES */
2567 }
2568 #endif /* uncompilable code */
2569 #ifdef  __cplusplus
2570 }
2571 #endif
2572 /* shar-opts.c ends here */
2573