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:
@@ -17,7 +17,6 @@
|
||||
/* Written by Roland McGrath. */
|
||||
|
||||
#include <config.h>
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
1
src/dd.c
1
src/dd.c
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include "system.h"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
1
src/ls.c
1
src/ls.c
@@ -36,7 +36,6 @@
|
||||
Greg Lee <lee@uhunix.uhcc.hawaii.edu>. */
|
||||
|
||||
#include <config.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <termios.h>
|
||||
|
||||
@@ -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>
|
||||
|
||||
1
src/od.c
1
src/od.c
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <endian.h>
|
||||
#include <float.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -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>
|
||||
|
||||
1
src/pr.c
1
src/pr.c
@@ -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>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "system.h"
|
||||
#include <ctype.h>
|
||||
#include "c-ctype.h"
|
||||
#include "quote.h"
|
||||
#include "set-fields.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
the shell builtin version. */
|
||||
|
||||
#include <config.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
1
src/tr.c
1
src/tr.c
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <getopt.h>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
Reference in New Issue
Block a user