/* Parse command line options. */
- while ((c = getopt_long (argc, argv, "benstuvAET", long_options, (int *) 0))
- != EOF)
+ while ((c = getopt_long (argc, argv, "benstuvAET", long_options, NULL)) != -1)
{
switch (c)
{
have_read_stdin = 0;
- while ((c = getopt_long (argc, argv, "", long_options, (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "", long_options, NULL)) != -1)
{
switch (c)
{
only_file_2 = 1;
both = 1;
- while ((c = getopt_long (argc, argv, "123", long_options, (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "123", long_options, NULL)) != -1)
switch (c)
{
case 0:
signal (SIGTERM, interrupt_handler);
#endif /* not SA_INTERRUPT */
- while ((optc = getopt_long (argc, argv, "f:b:kn:sqz", longopts, (int *) 0))
- != EOF)
+ while ((optc = getopt_long (argc, argv, "f:b:kn:sqz", longopts, NULL)) != -1)
switch (optc)
{
case 0:
delim = '\0';
have_read_stdin = 0;
- while ((optc = getopt_long (argc, argv, "b:c:d:f:ns", longopts, (int *) 0))
- != EOF)
+ while ((optc = getopt_long (argc, argv, "b:c:d:f:ns", longopts, NULL)) != -1)
{
switch (optc)
{
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- while ((c = getopt_long (argc, argv, "it:,0123456789", longopts, (int *) 0))
- != EOF)
+ while ((c = getopt_long (argc, argv, "it:,0123456789", longopts, NULL)) != -1)
{
switch (c)
{
while ((optchar = getopt_long (argc, argv, "0123456789cstuw:p:",
long_options, NULL))
- != EOF)
+ != -1)
switch (optchar)
{
default:
}
}
- while ((optc = getopt_long (argc, argv, "bsw:", longopts, (int *) 0))
- != EOF)
+ while ((optc = getopt_long (argc, argv, "bsw:", longopts, NULL)) != -1)
{
switch (optc)
{
argc--;
}
- while ((c = getopt_long (argc, argv, "c:n:qv", long_options, (int *) 0))
- != EOF)
+ while ((c = getopt_long (argc, argv, "c:n:qv", long_options, NULL)) != -1)
{
switch (c)
{
print_pairables = 1;
while ((optc = getopt_long_only (argc, argv, "-a:e:i1:2:o:t:v:", longopts,
- (int *) 0)) != EOF)
+ NULL)) != -1)
{
long int val;
int opt;
char **string = NULL;
size_t n_strings = 0;
- size_t i;
size_t err = 0;
int file_type_specified = 0;
parse_long_options (argc, argv, "md5sum", GNU_PACKAGE, VERSION, usage);
- while ((opt = getopt_long (argc, argv, "bctw", long_options, NULL))
- != EOF)
+ while ((opt = getopt_long (argc, argv, "bctw", long_options, NULL)) != -1)
switch (opt)
{
case 0: /* long option */
if (n_strings > 0)
{
+ size_t i;
+
if (optind < argc)
{
error (0, 0, _("no files may be specified when using --string"));
have_read_stdin = 0;
while ((c = getopt_long (argc, argv, "h:b:f:v:i:pl:s:w:n:d:", longopts,
- (int *) 0)) != EOF)
+ NULL)) != -1)
{
switch (c)
{
flag_dump_strings = 0;
while ((c = getopt_long (argc, argv, "abcdfhilos::xw::A:j:N:t:v",
- long_options, (int *) 0))
- != EOF)
+ long_options, NULL)) != -1)
{
unsigned long int tmp;
enum strtol_error s_err;
strcpy (delims, "\t");
strcpy (zero_delims, "\\0");
- while ((optc = getopt_long (argc, argv, "d:s", longopts, (int *) 0))
- != EOF)
+ while ((optc = getopt_long (argc, argv, "d:s", longopts, NULL)) != -1)
{
switch (optc)
{
have_read_stdin = 0;
- while ((optc = getopt_long (argc, argv, "rs", longopts, (int *) 0)) != -1)
+ while ((optc = getopt_long (argc, argv, "rs", longopts, NULL)) != -1)
{
switch (optc)
{
sentinel_length = 1;
separator_ends_record = 1;
- while ((optc = getopt_long (argc, argv, "brs:", longopts, (int *) 0))
- != EOF)
+ while ((optc = getopt_long (argc, argv, "brs:", longopts, NULL)) != -1)
{
switch (optc)
{
count_lines = 1;
forever = forever_multiple = from_start = print_headers = 0;
- while ((c = getopt_long (argc, argv, "c:n:fqv", long_options, (int *) 0))
- != EOF)
+ while ((c = getopt_long (argc, argv, "c:n:fqv", long_options, NULL)) != -1)
{
switch (c)
{
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- while ((c = getopt_long (argc, argv, "cdst", long_options,
- (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "cdst", long_options, NULL)) != -1)
{
switch (c)
{
tab_list = NULL;
first_free_tab = 0;
- while ((c = getopt_long (argc, argv, "at:,0123456789", longopts, (int *) 0))
- != EOF)
+ while ((c = getopt_long (argc, argv, "at:,0123456789", longopts, NULL)) != -1)
{
switch (c)
{
countmode = count_none;
while ((optc = getopt_long (argc, argv, "0123456789cdf:is:uw:", longopts,
- (int *) 0)) != EOF)
+ NULL)) != -1)
{
switch (optc)
{
print_lines = print_words = print_chars = 0;
total_lines = total_words = total_chars = 0;
- while ((optc = getopt_long (argc, argv, "clw", longopts, (int *) 0)) != EOF)
+ while ((optc = getopt_long (argc, argv, "clw", longopts, NULL)) != -1)
switch (optc)
{
case 0: