diff options
| author | Pádraig Brady <P@draigBrady.com> | 2026-01-04 15:11:57 +0000 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2026-01-21 13:51:39 +0000 |
| commit | 3ec554d4dd76b2560cb03d930b9381bebb3e99ea (patch) | |
| tree | 91683ead20d0ca6b4132b37fa361779b006d1047 /src | |
| parent | cc002057b3a33d79db6ff3330783e5118b6f4479 (diff) | |
| download | coreutils-3ec554d4dd76b2560cb03d930b9381bebb3e99ea.tar.gz coreutils-3ec554d4dd76b2560cb03d930b9381bebb3e99ea.zip | |
doc: parse any whitespace as an option/description delimiter
* src/system.c (oputs_): Use isspace() rather than hardcoding.
Note we don't use c_isspace() as we need to support anything
coming from translations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/chroot.c | 1 | ||||
| -rw-r--r-- | src/csplit.c | 1 | ||||
| -rw-r--r-- | src/dd.c | 1 | ||||
| -rw-r--r-- | src/expand-common.c | 1 | ||||
| -rw-r--r-- | src/expand.c | 1 | ||||
| -rw-r--r-- | src/fmt.c | 1 | ||||
| -rw-r--r-- | src/fold.c | 1 | ||||
| -rw-r--r-- | src/ls.c | 1 | ||||
| -rw-r--r-- | src/numfmt.c | 1 | ||||
| -rw-r--r-- | src/od.c | 1 | ||||
| -rw-r--r-- | src/pinky.c | 1 | ||||
| -rw-r--r-- | src/pr.c | 1 | ||||
| -rw-r--r-- | src/ptx.c | 1 | ||||
| -rw-r--r-- | src/seq.c | 1 | ||||
| -rw-r--r-- | src/set-fields.c | 1 | ||||
| -rw-r--r-- | src/sort.c | 1 | ||||
| -rw-r--r-- | src/split.c | 1 | ||||
| -rw-r--r-- | src/system.h | 5 | ||||
| -rw-r--r-- | src/test.c | 1 | ||||
| -rw-r--r-- | src/tr.c | 1 | ||||
| -rw-r--r-- | src/truncate.c | 1 | ||||
| -rw-r--r-- | src/unexpand.c | 1 | ||||
| -rw-r--r-- | src/wc.c | 1 |
23 files changed, 3 insertions, 24 deletions
diff --git a/src/chroot.c b/src/chroot.c index 8db28ecf2..48ef38d73 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -17,7 +17,6 @@ /* Written by Roland McGrath. */ #include <config.h> -#include <ctype.h> #include <getopt.h> #include <stdio.h> #include <sys/types.h> diff --git a/src/csplit.c b/src/csplit.c index a28f2fa5f..2fdc5e819 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -19,7 +19,6 @@ #include <config.h> -#include <ctype.h> #include <getopt.h> #include <sys/types.h> #include <signal.h> @@ -18,7 +18,6 @@ #include <config.h> -#include <ctype.h> #include <sys/types.h> #include <signal.h> diff --git a/src/expand-common.c b/src/expand-common.c index afe613dc6..0d4f8955a 100644 --- a/src/expand-common.c +++ b/src/expand-common.c @@ -16,7 +16,6 @@ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <sys/types.h> #include "system.h" diff --git a/src/expand.c b/src/expand.c index 8539da3e4..ef74ab0f6 100644 --- a/src/expand.c +++ b/src/expand.c @@ -34,7 +34,6 @@ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <getopt.h> #include <sys/types.h> @@ -17,7 +17,6 @@ /* Written by Ross Paterson <rap@doc.ic.ac.uk>. */ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <sys/types.h> #include <getopt.h> diff --git a/src/fold.c b/src/fold.c index 09a7f144a..1a6432dea 100644 --- a/src/fold.c +++ b/src/fold.c @@ -18,7 +18,6 @@ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <getopt.h> #include <sys/types.h> @@ -36,7 +36,6 @@ Greg Lee <lee@uhunix.uhcc.hawaii.edu>. */ #include <config.h> -#include <ctype.h> #include <sys/types.h> #include <termios.h> diff --git a/src/numfmt.c b/src/numfmt.c index ac5cd9b7b..dbb008027 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -15,7 +15,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include <config.h> -#include <ctype.h> #include <float.h> #include <getopt.h> #include <stdio.h> @@ -18,7 +18,6 @@ #include <config.h> -#include <ctype.h> #include <endian.h> #include <float.h> #include <stdio.h> diff --git a/src/pinky.c b/src/pinky.c index 887b32fc4..bcc936ac8 100644 --- a/src/pinky.c +++ b/src/pinky.c @@ -17,7 +17,6 @@ /* Created by hacking who.c by Kaveh Ghazi ghazi@caip.rutgers.edu */ #include <config.h> -#include <ctype.h> #include <getopt.h> #include <pwd.h> #include <stdio.h> @@ -309,7 +309,6 @@ #include <config.h> -#include <ctype.h> #include <getopt.h> #include <sys/types.h> #include "system.h" @@ -19,7 +19,6 @@ #include <config.h> -#include <ctype.h> #include <getopt.h> #include <sys/types.h> #include "system.h" @@ -17,7 +17,6 @@ /* Written by Ulrich Drepper. */ #include <config.h> -#include <ctype.h> #include <getopt.h> #include <stdio.h> #include <sys/types.h> diff --git a/src/set-fields.c b/src/set-fields.c index 523549214..5b3264d35 100644 --- a/src/set-fields.c +++ b/src/set-fields.c @@ -19,7 +19,6 @@ #include <config.h> #include "system.h" -#include <ctype.h> #include "c-ctype.h" #include "quote.h" #include "set-fields.h" diff --git a/src/sort.c b/src/sort.c index e5f31b179..c5bf44d31 100644 --- a/src/sort.c +++ b/src/sort.c @@ -22,7 +22,6 @@ #include <config.h> -#include <ctype.h> #include <getopt.h> #include <pthread.h> #include <sys/resource.h> diff --git a/src/split.c b/src/split.c index deeff03c3..9878c09f3 100644 --- a/src/split.c +++ b/src/split.c @@ -21,7 +21,6 @@ * support --suppress-matched as in csplit. */ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <getopt.h> #include <signal.h> diff --git a/src/system.h b/src/system.h index e77a8fe9f..f6d67450d 100644 --- a/src/system.h +++ b/src/system.h @@ -20,6 +20,8 @@ #include <alloca.h> +#include <ctype.h> + #include <sys/stat.h> /* Commonly used file permission combination. */ @@ -568,8 +570,7 @@ oputs_ (MAYBE_UNUSED char const* program, char const *option) /* Set desc_text to spacing after the full option text */ char const *desc_text = option_text + anchor_len; - while (*desc_text && (! (*desc_text == ' ' || *desc_text == '\n') - || *(desc_text + 1) == '-')) + while (*desc_text && (! isspace (*desc_text) || *(desc_text + 1) == '-')) desc_text++; /* write spaces before option text. */ diff --git a/src/test.c b/src/test.c index 9e791c905..c540c62fa 100644 --- a/src/test.c +++ b/src/test.c @@ -21,7 +21,6 @@ the shell builtin version. */ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <sys/types.h> @@ -18,7 +18,6 @@ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <sys/types.h> #include <getopt.h> diff --git a/src/truncate.c b/src/truncate.c index 50e6f70b1..43134c921 100644 --- a/src/truncate.c +++ b/src/truncate.c @@ -21,7 +21,6 @@ to better fit the "GNU" environment. */ #include <config.h> /* sets _FILE_OFFSET_BITS=64 etc. */ -#include <ctype.h> #include <stdio.h> #include <getopt.h> #include <sys/types.h> diff --git a/src/unexpand.c b/src/unexpand.c index ec6b222ba..d7954bbb6 100644 --- a/src/unexpand.c +++ b/src/unexpand.c @@ -35,7 +35,6 @@ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <getopt.h> #include <sys/types.h> @@ -19,7 +19,6 @@ #include <config.h> -#include <ctype.h> #include <stdio.h> #include <getopt.h> #include <sys/types.h> |
