blob: da35665e7aba3e6bc5b891e4043f1779ed47228e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef JOEDOG_DEFS_H
#define JOEDOG_DEFS_H
#define private static
#define public
#include <ctype.h>
#define ISUPPER(x) (((unsigned)(x) >= 'A') && ((unsigned)(x) <= 'Z'))
#define ISLOWER(x) (((unsigned)(x) >= 'a') && ((unsigned)(x) <= 'z'))
#define ISCOMMENT(x) (x == '#')
#define ISSEPARATOR(x) (('='==(x))||(':'==(x)))
#define ISSPACE(x) isspace((unsigned char)(x))
#define ISOPERAND(x) ('<'==(x)||'>'==(x)||'='==(x))
#define ISDIGIT(x) isdigit ((unsigned char)(x))
#define ISQUOTE(x) (x == '"' || x == '\'')
#if STDC_HEADERS
# define TOLOWER(Ch) tolower (Ch)
# define TOUPPER(Ch) toupper (Ch)
#else
# define TOLOWER(Ch) (ISUPPER (Ch) ? tolower (Ch) : (Ch))
# define TOUPPER(Ch) (ISLOWER (Ch) ? toupper (Ch) : (Ch))
#endif
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif /*EXIT_SUCESS*/
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif /*EXIT_FAILURE*/
#endif/*JOEDOG_DEFS_H*/
|