mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-05-31 06:46:37 +02:00
indent cpp-directives
This commit is contained in:
+4
-4
@@ -119,14 +119,14 @@ void free();
|
||||
* Compensate for this here.
|
||||
*/
|
||||
#ifdef isascii
|
||||
# undef HAVE_ISASCII /* just in case */
|
||||
# define HAVE_ISASCII 1
|
||||
# undef HAVE_ISASCII /* just in case */
|
||||
# define HAVE_ISASCII 1
|
||||
#else
|
||||
#endif
|
||||
#if STDC_HEADERS || !HAVE_ISASCII
|
||||
# define is_ascii(c) 1
|
||||
# define is_ascii(c) 1
|
||||
#else
|
||||
# define is_ascii(c) isascii(c)
|
||||
# define is_ascii(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#define is_space(c) (is_ascii(c) && isspace(c))
|
||||
|
||||
+8
-8
@@ -48,13 +48,13 @@ on System V systems with the -E option.
|
||||
#define V9_DEFAULT
|
||||
|
||||
#if defined (V9_ECHO)
|
||||
# if defined (V9_DEFAULT)
|
||||
# define VALID_ECHO_OPTIONS "neE"
|
||||
# else
|
||||
# define VALID_ECHO_OPTIONS "ne"
|
||||
# endif /* !V9_DEFAULT */
|
||||
# if defined (V9_DEFAULT)
|
||||
# define VALID_ECHO_OPTIONS "neE"
|
||||
# else
|
||||
# define VALID_ECHO_OPTIONS "ne"
|
||||
# endif /* !V9_DEFAULT */
|
||||
#else /* !V9_ECHO */
|
||||
# define VALID_ECHO_OPTIONS "n"
|
||||
# define VALID_ECHO_OPTIONS "n"
|
||||
#endif /* !V9_ECHO */
|
||||
|
||||
/* The name this program was run with. */
|
||||
@@ -152,10 +152,10 @@ main (int argc, char **argv)
|
||||
#if defined (V9_ECHO)
|
||||
else if (*temp == 'e')
|
||||
do_v9 = 1;
|
||||
#if defined (V9_DEFAULT)
|
||||
# if defined (V9_DEFAULT)
|
||||
else if (*temp == 'E')
|
||||
do_v9 = 0;
|
||||
#endif /* V9_DEFAULT */
|
||||
# endif /* V9_DEFAULT */
|
||||
#endif /* V9_ECHO */
|
||||
else
|
||||
goto just_echo;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
#define NDEBUG 1
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
# include <limits.h>
|
||||
#endif /* HAVE_LIMITS_H */
|
||||
|
||||
#ifndef UINT_MAX
|
||||
|
||||
+3
-3
@@ -27,8 +27,8 @@
|
||||
|
||||
#if !defined(HAVE_SETHOSTNAME) && defined(HAVE_SYSINFO) && \
|
||||
defined (HAVE_SYS_SYSTEMINFO_H) && defined(HAVE_LIMITS_H)
|
||||
#include <limits.h>
|
||||
#include <sys/systeminfo.h>
|
||||
# include <limits.h>
|
||||
# include <sys/systeminfo.h>
|
||||
|
||||
int
|
||||
sethostname (name, namelen)
|
||||
@@ -43,7 +43,7 @@ sethostname (name, namelen)
|
||||
return (result == -1 ? result : 0);
|
||||
}
|
||||
|
||||
#define HAVE_SETHOSTNAME 1 /* Now we have it... */
|
||||
# define HAVE_SETHOSTNAME 1 /* Now we have it... */
|
||||
#endif
|
||||
|
||||
char *xgethostname ();
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "error.h"
|
||||
|
||||
#ifdef _POSIX_VERSION
|
||||
#include <limits.h>
|
||||
# include <limits.h>
|
||||
|
||||
#else /* not _POSIX_VERSION */
|
||||
struct passwd *getpwuid ();
|
||||
@@ -39,7 +39,7 @@ uid_t getuid ();
|
||||
gid_t getgid ();
|
||||
uid_t geteuid ();
|
||||
gid_t getegid ();
|
||||
#include <sys/param.h>
|
||||
# include <sys/param.h>
|
||||
#endif /* not _POSIX_VERSION */
|
||||
|
||||
char *xmalloc ();
|
||||
|
||||
+4
-4
@@ -26,8 +26,8 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef NICE_PRIORITY
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
# include <sys/time.h>
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include "system.h"
|
||||
@@ -35,9 +35,9 @@
|
||||
#include "error.h"
|
||||
|
||||
#ifdef NICE_PRIORITY
|
||||
#define GET_PRIORITY() nice (0)
|
||||
# define GET_PRIORITY() nice (0)
|
||||
#else
|
||||
#define GET_PRIORITY() getpriority (PRIO_PROCESS, 0)
|
||||
# define GET_PRIORITY() getpriority (PRIO_PROCESS, 0)
|
||||
#endif
|
||||
|
||||
static int isinteger __P ((char *s));
|
||||
|
||||
+26
-26
@@ -47,47 +47,47 @@
|
||||
#include "error.h"
|
||||
|
||||
#ifdef _POSIX_VERSION
|
||||
#include <limits.h>
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX_FOR(p) pathconf ((p), _PC_PATH_MAX)
|
||||
#endif /* not PATH_MAX */
|
||||
#ifndef NAME_MAX
|
||||
#define NAME_MAX_FOR(p) pathconf ((p), _PC_NAME_MAX);
|
||||
#endif /* not NAME_MAX */
|
||||
# include <limits.h>
|
||||
# ifndef PATH_MAX
|
||||
# define PATH_MAX_FOR(p) pathconf ((p), _PC_PATH_MAX)
|
||||
# endif /* not PATH_MAX */
|
||||
# ifndef NAME_MAX
|
||||
# define NAME_MAX_FOR(p) pathconf ((p), _PC_NAME_MAX);
|
||||
# endif /* not NAME_MAX */
|
||||
|
||||
#else /* not _POSIX_VERSION */
|
||||
|
||||
#include <sys/param.h>
|
||||
#ifndef PATH_MAX
|
||||
#ifdef MAXPATHLEN
|
||||
#define PATH_MAX MAXPATHLEN
|
||||
#else /* not MAXPATHLEN */
|
||||
#define PATH_MAX _POSIX_PATH_MAX
|
||||
#endif /* not MAXPATHLEN */
|
||||
#endif /* not PATH_MAX */
|
||||
# include <sys/param.h>
|
||||
# ifndef PATH_MAX
|
||||
# ifdef MAXPATHLEN
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# else /* not MAXPATHLEN */
|
||||
# define PATH_MAX _POSIX_PATH_MAX
|
||||
# endif /* not MAXPATHLEN */
|
||||
# endif /* not PATH_MAX */
|
||||
|
||||
#ifndef NAME_MAX
|
||||
#ifdef MAXNAMLEN
|
||||
#define NAME_MAX MAXNAMLEN
|
||||
#else /* not MAXNAMLEN */
|
||||
#define NAME_MAX _POSIX_NAME_MAX
|
||||
#endif /* not MAXNAMLEN */
|
||||
#endif /* not NAME_MAX */
|
||||
# ifndef NAME_MAX
|
||||
# ifdef MAXNAMLEN
|
||||
# define NAME_MAX MAXNAMLEN
|
||||
# else /* not MAXNAMLEN */
|
||||
# define NAME_MAX _POSIX_NAME_MAX
|
||||
# endif /* not MAXNAMLEN */
|
||||
# endif /* not NAME_MAX */
|
||||
|
||||
#endif /* not _POSIX_VERSION */
|
||||
|
||||
#ifndef _POSIX_PATH_MAX
|
||||
#define _POSIX_PATH_MAX 255
|
||||
# define _POSIX_PATH_MAX 255
|
||||
#endif
|
||||
#ifndef _POSIX_NAME_MAX
|
||||
#define _POSIX_NAME_MAX 14
|
||||
# define _POSIX_NAME_MAX 14
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX_FOR
|
||||
#define PATH_MAX_FOR(p) PATH_MAX
|
||||
# define PATH_MAX_FOR(p) PATH_MAX
|
||||
#endif
|
||||
#ifndef NAME_MAX_FOR
|
||||
#define NAME_MAX_FOR(p) NAME_MAX
|
||||
# define NAME_MAX_FOR(p) NAME_MAX
|
||||
#endif
|
||||
|
||||
char *xstrdup ();
|
||||
|
||||
+6
-6
@@ -75,13 +75,13 @@ Non-numeric data in the input is ignored.
|
||||
/* #define DOUBLE */
|
||||
|
||||
#ifdef DOUBLE
|
||||
#define double real; /* Type used for data storage. */
|
||||
#define IFMT "%F" /* Input format. */
|
||||
#define OFMT "%18.14g %18.14g\n" /* Output format. */
|
||||
# define double real; /* Type used for data storage. */
|
||||
# define IFMT "%F" /* Input format. */
|
||||
# define OFMT "%18.14g %18.14g\n" /* Output format. */
|
||||
#else
|
||||
#define float real; /* Type used for data storage. */
|
||||
#define IFMT "%f" /* Input format. */
|
||||
#define OFMT "%8.5g %8.5g\n" /* Output format. */
|
||||
# define float real; /* Type used for data storage. */
|
||||
# define IFMT "%f" /* Input format. */
|
||||
# define OFMT "%8.5g %8.5g\n" /* Output format. */
|
||||
#endif
|
||||
|
||||
/* Numerical constants: These may be machine and/or precision dependent. */
|
||||
|
||||
+29
-29
@@ -31,29 +31,29 @@
|
||||
#define TEST_STANDALONE 1
|
||||
|
||||
#if !defined (TEST_STANDALONE)
|
||||
# include "shell.h"
|
||||
# include "posixstat.h"
|
||||
# include "filecntl.h"
|
||||
# include "shell.h"
|
||||
# include "posixstat.h"
|
||||
# include "filecntl.h"
|
||||
#else /* TEST_STANDALONE */
|
||||
# include "system.h"
|
||||
# include "group-member.h"
|
||||
# include "error.h"
|
||||
# if !defined (S_IXUGO)
|
||||
# define S_IXUGO 0111
|
||||
# endif /* S_IXUGO */
|
||||
# if defined (_POSIX_VERSION)
|
||||
# include <limits.h>
|
||||
# else /* !_POSIX_VERSION */
|
||||
# include <sys/param.h>
|
||||
# endif /* _POSIX_VERSION */
|
||||
#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
|
||||
#define digit(c) ((c) >= '0' && (c) <= '9')
|
||||
#define digit_value(c) ((c) - '0')
|
||||
# include "system.h"
|
||||
# include "group-member.h"
|
||||
# include "error.h"
|
||||
# if !defined (S_IXUGO)
|
||||
# define S_IXUGO 0111
|
||||
# endif /* S_IXUGO */
|
||||
# if defined (_POSIX_VERSION)
|
||||
# include <limits.h>
|
||||
# else /* !_POSIX_VERSION */
|
||||
# include <sys/param.h>
|
||||
# endif /* _POSIX_VERSION */
|
||||
# define whitespace(c) (((c) == ' ') || ((c) == '\t'))
|
||||
# define digit(c) ((c) >= '0' && (c) <= '9')
|
||||
# define digit_value(c) ((c) - '0')
|
||||
char *program_name;
|
||||
#endif /* TEST_STANDALONE */
|
||||
|
||||
#if !defined (_POSIX_VERSION)
|
||||
# include <sys/file.h>
|
||||
# include <sys/file.h>
|
||||
#endif /* !_POSIX_VERSION */
|
||||
|
||||
#include <errno.h>
|
||||
@@ -62,21 +62,21 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
#if !defined (STREQ)
|
||||
# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp (a, b) == 0)
|
||||
# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp (a, b) == 0)
|
||||
#endif /* !STREQ */
|
||||
|
||||
#if !defined (member)
|
||||
# define member(c, s) ((c) ? (strchr ((s), (c)) ? 1 : 0) : 0)
|
||||
# define member(c, s) ((c) ? (strchr ((s), (c)) ? 1 : 0) : 0)
|
||||
#endif /* !member */
|
||||
|
||||
extern gid_t getegid ();
|
||||
extern uid_t geteuid ();
|
||||
|
||||
#if !defined (R_OK)
|
||||
#define R_OK 4
|
||||
#define W_OK 2
|
||||
#define X_OK 1
|
||||
#define F_OK 0
|
||||
# define R_OK 4
|
||||
# define W_OK 2
|
||||
# define X_OK 1
|
||||
# define F_OK 0
|
||||
#endif /* R_OK */
|
||||
|
||||
/* This name is used solely when printing --version information. */
|
||||
@@ -96,11 +96,11 @@ extern uid_t geteuid ();
|
||||
#define TRUTH_AND(a, b) ((a) & (b))
|
||||
|
||||
#if defined (TEST_STANDALONE)
|
||||
# define test_exit(val) exit (val)
|
||||
# define test_exit(val) exit (val)
|
||||
#else
|
||||
static jmp_buf test_exit_buf;
|
||||
static int test_error_return = 0;
|
||||
# define test_exit(val) test_error_return = val, longjmp (test_exit_buf, 1)
|
||||
# define test_exit(val) test_error_return = val, longjmp (test_exit_buf, 1)
|
||||
#endif /* !TEST_STANDALONE */
|
||||
|
||||
char *xrealloc ();
|
||||
@@ -124,9 +124,9 @@ static int or __P ((void));
|
||||
|
||||
#if __GNUC__ >= 2 && defined (__GNUC_MINOR__) \
|
||||
&& __GNUC_MINOR__ >= 5 && !defined (__STRICT_ANSI__)
|
||||
#define NO_RETURN_ATTRIBUTE __attribute__ ((noreturn))
|
||||
# define NO_RETURN_ATTRIBUTE __attribute__ ((noreturn))
|
||||
#else
|
||||
#define NO_RETURN_ATTRIBUTE /* empty */
|
||||
# define NO_RETURN_ATTRIBUTE /* empty */
|
||||
#endif
|
||||
|
||||
static void test_syntax_error __P ((char *format, char *arg)) NO_RETURN_ATTRIBUTE;
|
||||
@@ -962,7 +962,7 @@ posixtest (void)
|
||||
}
|
||||
|
||||
#if defined (TEST_STANDALONE)
|
||||
#include "long-options.h"
|
||||
# include "long-options.h"
|
||||
|
||||
static void
|
||||
usage (int status)
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ static void usage __P ((int status));
|
||||
#define PRINT_MACHINE 16
|
||||
|
||||
/* Host processor type. */
|
||||
# define PRINT_PROCESSOR 32
|
||||
#define PRINT_PROCESSOR 32
|
||||
|
||||
/* Mask indicating which elements of the name to print. */
|
||||
static unsigned char toprint;
|
||||
|
||||
Reference in New Issue
Block a user