summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-05-13 16:53:47 +0000
committerobrien <obrien@FreeBSD.org>2000-05-13 16:53:47 +0000
commit9bb07774c7a126ad8f40b8eef84c413082e66128 (patch)
treeb32d6556f689b64eb2a9629b3a7c76aba979590a
parent82c8d12f222ab1c1d7ddd23edf467d9c33fffadb (diff)
downloadFreeBSD-src-9bb07774c7a126ad8f40b8eef84c413082e66128.zip
FreeBSD-src-9bb07774c7a126ad8f40b8eef84c413082e66128.tar.gz
Merge in our rev 1.2 changes: Restore traditional behavior by acknowledging
tabs in strings.
-rw-r--r--contrib/binutils/binutils/strings.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c
index 603841e..d3247ea 100644
--- a/contrib/binutils/binutils/strings.c
+++ b/contrib/binutils/binutils/strings.c
@@ -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);
}
OpenPOWER on IntegriCloud