diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-03-19 19:25:49 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-03-19 19:25:49 +0000 |
commit | 7ef54de6726c3d0c0e7e94fab3a22496db03297e (patch) | |
tree | 954f5487f4fabaa9daab75773b083c653b35c609 | |
parent | b183dfad2daea713e712470d206b0f0287331083 (diff) | |
download | busybox-w32-7ef54de6726c3d0c0e7e94fab3a22496db03297e.tar.gz busybox-w32-7ef54de6726c3d0c0e7e94fab3a22496db03297e.tar.bz2 busybox-w32-7ef54de6726c3d0c0e7e94fab3a22496db03297e.zip |
locale correction patch from Vladimir
-rw-r--r-- | coreutils/printf.c | 21 | ||||
-rw-r--r-- | printf.c | 21 |
2 files changed, 2 insertions, 40 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c index 003423d56..d579a9b4e 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c | |||
@@ -92,28 +92,9 @@ static const int S_IFMT = 0170000; | |||
92 | 92 | ||
93 | #define IN_CTYPE_DOMAIN(c) 1 | 93 | #define IN_CTYPE_DOMAIN(c) 1 |
94 | 94 | ||
95 | #ifdef isblank | ||
96 | # define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c)) | ||
97 | #else | ||
98 | # define ISBLANK(c) ((c) == ' ' || (c) == '\t') | ||
99 | #endif | ||
100 | #ifdef isgraph | ||
101 | # define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c)) | ||
102 | #else | ||
103 | # define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (c) && !isspace (c)) | ||
104 | #endif | ||
105 | |||
106 | #define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) | ||
107 | #define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) | ||
108 | #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) | ||
109 | #define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c)) | ||
110 | #define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) | ||
111 | #define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct (c)) | ||
112 | #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) | ||
113 | #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) | ||
114 | #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) | 95 | #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) |
115 | #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) | 96 | #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) |
116 | #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) | 97 | #define ISDIGIT(c) (((unsigned char) (c)) - '0' <= 9) |
117 | 98 | ||
118 | #define isodigit(c) ((c) >= '0' && (c) <= '7') | 99 | #define isodigit(c) ((c) >= '0' && (c) <= '7') |
119 | #define hextobin(c) ((c)>='a'&&(c)<='f' ? (c)-'a'+10 : (c)>='A'&&(c)<='F' ? (c)-'A'+10 : (c)-'0') | 100 | #define hextobin(c) ((c)>='a'&&(c)<='f' ? (c)-'a'+10 : (c)>='A'&&(c)<='F' ? (c)-'A'+10 : (c)-'0') |
@@ -92,28 +92,9 @@ static const int S_IFMT = 0170000; | |||
92 | 92 | ||
93 | #define IN_CTYPE_DOMAIN(c) 1 | 93 | #define IN_CTYPE_DOMAIN(c) 1 |
94 | 94 | ||
95 | #ifdef isblank | ||
96 | # define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c)) | ||
97 | #else | ||
98 | # define ISBLANK(c) ((c) == ' ' || (c) == '\t') | ||
99 | #endif | ||
100 | #ifdef isgraph | ||
101 | # define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c)) | ||
102 | #else | ||
103 | # define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (c) && !isspace (c)) | ||
104 | #endif | ||
105 | |||
106 | #define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) | ||
107 | #define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) | ||
108 | #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) | ||
109 | #define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c)) | ||
110 | #define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) | ||
111 | #define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct (c)) | ||
112 | #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) | ||
113 | #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) | ||
114 | #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) | 95 | #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) |
115 | #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) | 96 | #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) |
116 | #define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) | 97 | #define ISDIGIT(c) (((unsigned char) (c)) - '0' <= 9) |
117 | 98 | ||
118 | #define isodigit(c) ((c) >= '0' && (c) <= '7') | 99 | #define isodigit(c) ((c) >= '0' && (c) <= '7') |
119 | #define hextobin(c) ((c)>='a'&&(c)<='f' ? (c)-'a'+10 : (c)>='A'&&(c)<='F' ? (c)-'A'+10 : (c)-'0') | 100 | #define hextobin(c) ((c)>='a'&&(c)<='f' ? (c)-'a'+10 : (c)>='A'&&(c)<='F' ? (c)-'A'+10 : (c)-'0') |