From: Nick Clifton Date: Mon, 29 Nov 2021 14:52:42 +0000 (+0000) Subject: Update description of string's -n option. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8fee99c3c8e25f2708bddde345c192dd2f3e7e08;p=binutils-gdb.git Update description of string's -n option. PR 28632 * strings.c (usage): Update desciption of -n option. * doc/binutils.texi: Likewise. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index cc742ec4951..4c9879b52e4 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2021-11-29 Nick Clifton + + PR 28632 + * strings.c (usage): Update desciption of -n option. + * doc/binutils.texi: Likewise. + 2021-11-24 Nick Clifton PR 28564 diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index fb5dc8ed568..1f3e6c7bc85 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -3297,8 +3297,13 @@ Print a summary of the program usage on the standard output and exit. @item -@var{min-len} @itemx -n @var{min-len} @itemx --bytes=@var{min-len} -Print sequences of characters that are at least @var{min-len} characters -long, instead of the default 4. +Print sequences of displayable characters that are at least +@var{min-len} characters long. If not specified a default minimum +length of 4 is used. The distinction between displayable and +non-displayable characters depends upon the setting of the +@option{-e} and @option{-U} options. Sequences are always terminated +at control characters such as new-line and carriage-return, but not +the tab character. @item -o Like @samp{-t o}. Some other versions of @command{strings} have @option{-o} diff --git a/binutils/strings.c b/binutils/strings.c index 13db60f57a5..f594299939f 100644 --- a/binutils/strings.c +++ b/binutils/strings.c @@ -32,7 +32,8 @@ --bytes=min-len -n min-len -min-len Print graphic char sequences, MIN-LEN or more bytes long, - that are followed by a NUL or a newline. Default is 4. + that are followed by a NUL or a non-displayable character. + Default is 4. --radix={o,x,d} -t {o,x,d} Print the offset within the file before each string, @@ -1323,8 +1324,8 @@ usage (FILE *stream, int status) fprintf (stream, _("\ -f --print-file-name Print the name of the file before each string\n\ - -n --bytes=[number] Locate & print any NUL-terminated sequence of at\n\ - - least [number] characters (default 4).\n\ + -n Locate & print any sequence of at least \n\ + --bytes= displayable characters. (The default is 4).\n\ -t --radix={o,d,x} Print the location of the string in base 8, 10 or 16\n\ -w --include-all-whitespace Include all whitespace as valid string characters\n\ -o An alias for --radix=o\n\