root/1.8.3/tags/p6/hdrs/case.h
| Revision 919, 417 bytes (checked in by shawnw, 19 months ago) |
|---|
| Line | |
|---|---|
| 1 | #ifndef CASE_H |
| 2 | #define CASE_H |
| 3 | #include <ctype.h> |
| 4 | #include "config.h" |
| 5 | |
| 6 | #ifdef HAVE_SAFE_TOUPPER |
| 7 | #define DOWNCASE(x) tolower((unsigned char)x) |
| 8 | #define UPCASE(x) toupper((unsigned char)x) |
| 9 | #else |
| 10 | #define DOWNCASE(x) (isupper((unsigned char)x) ? tolower((unsigned char)x) : (x)) |
| 11 | #define UPCASE(x) (islower((unsigned char)x) ? toupper((unsigned char)x) : (x)) |
| 12 | #endif |
| 13 | #endif /* CASE_H */ |
Note: See TracBrowser
for help on using the browser.
