1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-24 02:08:57 +03:00

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.
This commit is contained in:
Pádraig Brady
2026-01-04 15:11:57 +00:00
parent cc002057b3
commit 3ec554d4dd
23 changed files with 3 additions and 24 deletions

View File

@@ -17,7 +17,6 @@
/* Written by Roland McGrath. */
#include <config.h>
#include <ctype.h>
#include <getopt.h>
#include <stdio.h>
#include <sys/types.h>

View File

@@ -19,7 +19,6 @@
#include <config.h>
#include <ctype.h>
#include <getopt.h>
#include <sys/types.h>
#include <signal.h>

View File

@@ -18,7 +18,6 @@
#include <config.h>
#include <ctype.h>
#include <sys/types.h>
#include <signal.h>

View File

@@ -16,7 +16,6 @@
#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
#include "system.h"

View File

@@ -34,7 +34,6 @@
#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>

View File

@@ -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>

View File

@@ -18,7 +18,6 @@
#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>

View File

@@ -36,7 +36,6 @@
Greg Lee <lee@uhunix.uhcc.hawaii.edu>. */
#include <config.h>
#include <ctype.h>
#include <sys/types.h>
#include <termios.h>

View File

@@ -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>

View File

@@ -18,7 +18,6 @@
#include <config.h>
#include <ctype.h>
#include <endian.h>
#include <float.h>
#include <stdio.h>

View File

@@ -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>

View File

@@ -309,7 +309,6 @@
#include <config.h>
#include <ctype.h>
#include <getopt.h>
#include <sys/types.h>
#include "system.h"

View File

@@ -19,7 +19,6 @@
#include <config.h>
#include <ctype.h>
#include <getopt.h>
#include <sys/types.h>
#include "system.h"

View File

@@ -17,7 +17,6 @@
/* Written by Ulrich Drepper. */
#include <config.h>
#include <ctype.h>
#include <getopt.h>
#include <stdio.h>
#include <sys/types.h>

View File

@@ -19,7 +19,6 @@
#include <config.h>
#include "system.h"
#include <ctype.h>
#include "c-ctype.h"
#include "quote.h"
#include "set-fields.h"

View File

@@ -22,7 +22,6 @@
#include <config.h>
#include <ctype.h>
#include <getopt.h>
#include <pthread.h>
#include <sys/resource.h>

View File

@@ -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>

View File

@@ -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. */

View File

@@ -21,7 +21,6 @@
the shell builtin version. */
#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>

View File

@@ -18,7 +18,6 @@
#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
#include <getopt.h>

View File

@@ -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>

View File

@@ -35,7 +35,6 @@
#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>

View File

@@ -19,7 +19,6 @@
#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <getopt.h>
#include <sys/types.h>