diff options
author | Jim Meyering <jim@meyering.net> | 1992-12-07 04:54:04 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1992-12-07 04:54:04 +0000 |
commit | d179df1b06718b950b54963c0c11b619e28ba016 (patch) | |
tree | dc0cab0f46a3bf082ae42a20d8eeeea84bb7aece /src/sort.c | |
parent | 57e56eb7ecaf708b248af8faebd972a0ce6f03c1 (diff) | |
download | coreutils-d179df1b06718b950b54963c0c11b619e28ba016.tar.xz |
Remove inclusion of <ctype.h> and definitions of is* ctype macros to system.h.
Change a few more uses of is* ctype macros to (protected) upper case versions.
Diffstat (limited to 'src/sort.c')
-rw-r--r-- | src/sort.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/sort.c b/src/sort.c index c2f15ec8b..e514284b8 100644 --- a/src/sort.c +++ b/src/sort.c @@ -21,10 +21,7 @@ /* Get isblank from GNU libc. */ #define _GNU_SOURCE -#include <ctype.h> -#ifndef isblank -#define isblank(c) ((c) == ' ' || (c) == '\t') -#endif + #include <sys/types.h> #include <signal.h> #include <stdio.h> @@ -49,18 +46,6 @@ static void usage (); #define UCHAR_LIM (UCHAR_MAX + 1) #define UCHAR(c) ((unsigned char) (c)) -#ifdef isascii -#define ISALNUM(c) (isascii(c) && isalnum(c)) -#define ISDIGIT(c) (isascii(c) && isdigit(c)) -#define ISPRINT(c) (isascii(c) && isprint(c)) -#define ISLOWER(c) (isascii(c) && islower(c)) -#else -#define ISALNUM(c) isalnum(c) -#define ISDIGIT(c) isdigit(c) -#define ISPRINT(c) isprint(c) -#define ISLOWER(c) islower(c) -#endif - /* The kind of blanks for '-b' to skip in various options. */ enum blanktype { bl_start, bl_end, bl_both }; @@ -353,13 +338,13 @@ inittables () for (i = 0; i < UCHAR_LIM; ++i) { - if (isblank (i)) + if (ISBLANK (i)) blanks[i] = 1; if (ISDIGIT (i)) digits[i] = 1; if (!ISPRINT (i)) nonprinting[i] = 1; - if (!ISALNUM (i) && !isblank (i)) + if (!ISALNUM (i) && !ISBLANK (i)) nondictionary[i] = 1; if (ISLOWER (i)) fold_toupper[i] = toupper (i); |