File: case.h

package info (click to toggle)
pennmush 1.8.0p4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,068 kB
  • ctags: 6,319
  • sloc: ansic: 68,221; sh: 7,056; perl: 1,150; makefile: 284
file content (13 lines) | stat: -rw-r--r-- 394 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef CASE_H
#define CASE_H
#include <ctype.h>
#include "config.h"

#ifdef HAS_SAFE_TOUPPER
#define DOWNCASE(x)     tolower((unsigned char)x)
#define UPCASE(x)       toupper((unsigned char)x)
#else
#define DOWNCASE(x) (isupper((unsigned char)x) ? tolower((unsigned char)x) : (x))
#define UPCASE(x)   (islower((unsigned char)x) ? toupper((unsigned char)x) : (x))
#endif
#endif				/* CASE_H */