#endif
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "safe-read.h"
/* The official name of this program (e.g., no `g' prefix). */
#if O_BINARY
{"binary", no_argument, NULL, 'B'},
#endif
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
/* Parse command line options. */
while ((c = getopt_long (argc, argv,
output_tabs = 0;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (EXIT_FAILURE);
}
#include <sys/types.h>
#include "system.h"
#include "linebuffer.h"
-#include "long-options.h"
#include "error.h"
/* The official name of this program (e.g., no `g' prefix). */
static struct option const long_options[] =
{
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{0, 0, 0, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
only_file_1 = 1;
only_file_2 = 1;
both = 1;
both = 0;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
#include <regex.h>
#include "error.h"
-#include "long-options.h"
#include "safe-read.h"
#include "xstrtoul.h"
#include "xalloc.h"
{"elide-empty-files", no_argument, NULL, 'z'},
{"prefix", required_argument, NULL, 'f'},
{"suffix-format", required_argument, NULL, 'b'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
global_argv = argv;
controls = NULL;
control_used = 0;
elide_empty_files = TRUE;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
#include <getopt.h>
#include <sys/types.h>
#include "system.h"
-#include "long-options.h"
#include "error.h"
/* The official name of this program (e.g., no `g' prefix). */
{"delimiter", required_argument, 0, 'd'},
{"only-delimited", no_argument, 0, 's'},
{"output-delimiter", required_argument, 0, CHAR_MAX + 1},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{0, 0, 0, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
operating_mode = undefined_mode;
/* By default, all non-delimited lines are printed. */
suppress_non_delimited = 1;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (2);
}
#include <sys/types.h>
#include "system.h"
#include "error.h"
-#include "long-options.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "expand"
{
{"tabs", required_argument, NULL, 't'},
{"initial", no_argument, NULL, 'i'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
while ((c = getopt_long (argc, argv, "it:,0123456789", longopts, NULL)) != -1)
{
switch (c)
add_tabstop (tabval);
tabval = -1;
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
if (tabval == -1)
tabval = 0;
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "xstrtol.h"
/* The official name of this program (e.g., no `g' prefix). */
{"tagged-paragraph", no_argument, NULL, 't'},
{"uniform-spacing", no_argument, NULL, 'u'},
{"width", required_argument, NULL, 'w'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{0, 0, 0, 0},
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
crown = tagged = split = uniform = FALSE;
max_width = WIDTH;
prefix = "";
set_prefix (optarg);
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
}
best_width = max_width * (2 * (100 - LEEWAY) + 1) / 200;
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "xstrtol.h"
/* The official name of this program (e.g., no `g' prefix). */
{"bytes", no_argument, NULL, 'b'},
{"spaces", no_argument, NULL, 's'},
{"width", required_argument, NULL, 'w'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
break_spaces = count_bytes = have_read_stdin = 0;
/* Turn any numeric options into -w options. */
}
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
#include <sys/types.h>
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "xstrtoul.h"
#include "safe-read.h"
{"quiet", no_argument, NULL, 'q'},
{"silent", no_argument, NULL, 'q'},
{"verbose", no_argument, NULL, 'v'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
have_read_stdin = 0;
print_headers = 0;
header_mode = always;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
#endif
#include "system.h"
-#include "long-options.h"
-#include "xstrtol.h"
#include "error.h"
#include "memcasecmp.h"
+#include "xstrtol.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "join"
{"j", required_argument, NULL, 'j'},
{"j1", required_argument, NULL, '1'},
{"j2", required_argument, NULL, '2'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
it may be increased. */
uni_blank.nfields = 1;
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
nfiles = 0;
print_pairables = 1;
names[nfiles++] = optarg;
break;
- case '?':
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
+ default:
usage (1);
}
prev_optc = optc;
#include <stdio.h>
#include <sys/types.h>
-#include "long-options.h"
#include "md5.h"
#include "getline.h"
#include "system.h"
{ "string", required_argument, 0, 1 },
{ "text", no_argument, 0, 't' },
{ "warn", no_argument, 0, 'w' },
+ { GETOPT_HELP_OPTION_DECL },
+ { GETOPT_VERSION_OPTION_DECL },
{ NULL, 0, NULL, 0 }
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
while ((opt = getopt_long (argc, argv, "bctw", long_options, NULL)) != -1)
switch (opt)
{
status_only = 0;
warn = 1;
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (EXIT_FAILURE);
}
#include "error.h"
#include "linebuffer.h"
-#include "long-options.h"
#include "xstrtol.h"
/* The official name of this program (e.g., no `g' prefix). */
{"number-width", required_argument, NULL, 'w'},
{"number-format", required_argument, NULL, 'n'},
{"section-delimiter", required_argument, NULL, 'd'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
have_read_stdin = 0;
while ((c = getopt_long (argc, argv, "h:b:f:v:i:pl:s:w:n:d:", longopts,
case 'd':
section_del = optarg;
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (2);
break;
#include <sys/types.h>
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "xstrtoul.h"
/* The official name of this program (e.g., no `g' prefix). */
{"strings", optional_argument, NULL, 's'},
{"traditional", no_argument, NULL, 'B'},
{"width", optional_argument, NULL, 'w'},
+
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
err = 0;
for (i = 0; i <= MAX_INTEGRAL_TYPE_SIZE; i++)
}
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
break;
#include <sys/types.h>
#include "system.h"
#include "error.h"
-#include "long-options.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "paste"
{
{"serial", no_argument, 0, 's'},
{"delimiters", required_argument, 0, 'd'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{0, 0, 0, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
have_read_stdin = 0;
serial_merge = 0;
delims = default_delims;
serial_merge++;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
#include <time.h>
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "xstrtol.h"
/* The official name of this program (e.g., no `g' prefix). */
{"show-nonprinting", no_argument, NULL, 'v'},
{"width", required_argument, NULL, 'w'},
{"page-width", required_argument, NULL, 'W'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{0, 0, 0, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
n_files = 0;
file_names = (argc > 1
? (char **) xmalloc ((argc - 1) * sizeof (char *))
#include "bumpalloc.h"
#include "diacrit.h"
#include "error.h"
-#include "long-options.h"
#include "regex.h"
/* The official name of this program (e.g., no `g' prefix). */
{"typeset-mode", no_argument, NULL, 't'},
{"width", required_argument, NULL, 'w'},
{"word-regexp", required_argument, NULL, 'W'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{0, 0, 0, 0},
};
setchrclass (NULL);
#endif
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
while (optchar = getopt_long (argc, argv, "ACF:GM:ORS:TW:b:i:fg:o:trw:",
long_options, NULL),
optchar != EOF)
case 10:
output_format = XARGMATCH ("--format", optarg,
format_args, format_vals);
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
}
}
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "safe-read.h"
#include "xstrtol.h"
{"lines", required_argument, NULL, 'l'},
{"line-bytes", required_argument, NULL, 'C'},
{"verbose", no_argument, NULL, 2},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
/* Parse command line options. */
infile = "-";
verbose = 1;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (EXIT_FAILURE);
}
#include <getopt.h>
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "safe-read.h"
/* The official name of this program (e.g., no `g' prefix). */
static struct option const longopts[] =
{
{"sysv", no_argument, NULL, 's'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
have_read_stdin = 0;
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
while ((optc = getopt_long (argc, argv, "rs", longopts, NULL)) != -1)
{
switch (optc)
sum_func = sysv_sum_file;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
#include <regex.h>
#include "error.h"
-#include "long-options.h"
#include "safe-read.h"
/* The official name of this program (e.g., no `g' prefix). */
{"before", no_argument, NULL, 'b'},
{"regex", no_argument, NULL, 'r'},
{"separator", required_argument, NULL, 's'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
errors = 0;
separator = "\n";
sentinel_length = 1;
if (*separator == 0)
error (EXIT_FAILURE, 0, _("separator cannot be empty"));
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
usage (1);
}
#include "system.h"
#include "argmatch.h"
#include "error.h"
-#include "long-options.h"
#include "safe-read.h"
#include "xstrtoul.h"
{"silent", no_argument, NULL, 'q'},
{"sleep-interval", required_argument, NULL, 's'},
{"verbose", no_argument, NULL, 'v'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
*header_mode = always;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
have_read_stdin = 0;
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
{
int found_obsolescent;
int fail;
#include "system.h"
#include "error.h"
-#include "long-options.h"
#include "safe-read.h"
/* The official name of this program (e.g., no `g' prefix). */
{"delete", no_argument, NULL, 'd'},
{"squeeze-repeats", no_argument, NULL, 's'},
{"truncate-set1", no_argument, NULL, 't'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
\f
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
while ((c = getopt_long (argc, argv, "cdst", long_options, NULL)) != -1)
{
switch (c)
truncate_set1 = 1;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (2);
break;
#include <sys/types.h>
#include "system.h"
-#include "long-options.h"
#include "error.h"
/* The official name of this program (e.g., no `g' prefix). */
{
{"tabs", required_argument, NULL, 't'},
{"all", no_argument, NULL, 'a'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
have_read_stdin = 0;
exit_status = 0;
convert_entire_line = 0;
add_tabstop (tabval);
tabval = -1;
break;
+ case_GETOPT_HELP_CHAR;
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
if (tabval == -1)
tabval = 0;
#include "system.h"
#include "linebuffer.h"
-#include "long-options.h"
#include "error.h"
#include "xstrtol.h"
#include "memcasecmp.h"
{"skip-fields", required_argument, NULL, 'f'},
{"skip-chars", required_argument, NULL, 's'},
{"check-chars", required_argument, NULL, 'w'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
skip_chars = 0;
skip_fields = 0;
check_chars = 0;
}
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}
#include "system.h"
#include "error.h"
#include "human.h"
-#include "long-options.h"
#include "safe-read.h"
/* The official name of this program (e.g., no `g' prefix). */
{"lines", no_argument, NULL, 'l'},
{"words", no_argument, NULL, 'w'},
{"max-line-length", no_argument, NULL, 'L'},
+ {GETOPT_HELP_OPTION_DECL},
+ {GETOPT_VERSION_OPTION_DECL},
{NULL, 0, NULL, 0}
};
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
- AUTHORS, usage);
-
exit_status = 0;
print_lines = print_words = print_chars = print_linelength = 0;
total_lines = total_words = total_chars = max_line_length = 0;
print_linelength = 1;
break;
+ case_GETOPT_HELP_CHAR;
+
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+
default:
usage (1);
}