diff options
author | Nick Clifton <nickc@redhat.com> | 2021-11-29 14:52:42 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-11-29 14:52:42 +0000 |
commit | 8fee99c3c8e25f2708bddde345c192dd2f3e7e08 (patch) | |
tree | dd4fe56c646e97a99a74debac3b652fb90891557 /binutils | |
parent | c2611492786971de47464246b8271d6a6ab9421a (diff) | |
download | fsf-binutils-gdb-8fee99c3c8e25f2708bddde345c192dd2f3e7e08.zip fsf-binutils-gdb-8fee99c3c8e25f2708bddde345c192dd2f3e7e08.tar.gz fsf-binutils-gdb-8fee99c3c8e25f2708bddde345c192dd2f3e7e08.tar.bz2 |
Update description of string's -n option.
PR 28632
* strings.c (usage): Update desciption of -n option.
* doc/binutils.texi: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/doc/binutils.texi | 9 | ||||
-rw-r--r-- | binutils/strings.c | 7 |
3 files changed, 17 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index cc742ec..4c9879b 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2021-11-29 Nick Clifton <nickc@redhat.com> + + PR 28632 + * strings.c (usage): Update desciption of -n option. + * doc/binutils.texi: Likewise. + 2021-11-24 Nick Clifton <nickc@redhat.com> PR 28564 diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index fb5dc8e..1f3e6c7 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 13db60f..f594299 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\ - -<number> least [number] characters (default 4).\n\ + -n <number> Locate & print any sequence of at least <number>\n\ + --bytes=<number> 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\ |