Merge in our rev 1.2 changes: Restore traditional behavior by acknowledging

tabs in strings.
This commit is contained in:
David E. O'Brien 2000-05-13 16:53:47 +00:00
parent caf0b2ed4a
commit eccf7968d0

View File

@ -1,5 +1,6 @@
/* strings -- print the strings of printable characters in files
Copyright (C) 1993, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -15,6 +16,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* $FreeBSD$ */
/* Usage: strings [options] file...
@ -122,6 +125,12 @@ main (argc, argv)
int exit_status = 0;
boolean files_given = false;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
program_name = argv[0];
xmalloc_set_program_name (program_name);
string_min = -1;
@ -150,9 +159,7 @@ main (argc, argv)
string_min = integer_arg (optarg);
if (string_min < 1)
{
fprintf (stderr, "%s: invalid number %s\n",
program_name, optarg);
exit (1);
fatal (_("invalid number %s"), optarg);
}
break;
@ -197,7 +204,7 @@ main (argc, argv)
default:
if (string_min < 0)
string_min = optc;
string_min = optc - '0';
else
string_min = string_min * 10 + optc - '0';
break;
@ -485,8 +492,7 @@ integer_arg (s)
if (*p)
{
fprintf (stderr, "%s: invalid integer argument %s\n", program_name, s);
exit (1);
fatal (_("invalid integer argument %s"), s);
}
return value;
}
@ -496,13 +502,13 @@ usage (stream, status)
FILE *stream;
int status;
{
fprintf (stream, "\
fprintf (stream, _("\
Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-]\n\
[--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n\
[--target=bfdname] [--help] [--version] file...\n",
[--target=bfdname] [--help] [--version] file...\n"),
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
fprintf (stream, "Report bugs to bug-gnu-utils@gnu.org\n");
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}