1: /* $Header: macro.h,v 1.2 85/03/19 09:18:02 nicklin Exp $ */
2:
3: /*
4: * General macro function definitions
5: *
6: * Author: Peter J. Nicklin
7: */
8:
9: int strcmp(); /* string comparison */
10:
11: #undef CHDIR
12: #define CHDIR(d) \
13: (chdir(d) == 0) /* change directory */
14:
15: #undef DOTDIR
16: #define DOTDIR(dp) \
17: (dp->d_name[0] == '.' && dp->d_name[1] == '\0')
18: /* current directory? */
19: #undef DOTDOTDIR
20: #define DOTDOTDIR(dp) \
21: (dp->d_name[0] == '.' && dp->d_name[1] == '.' && dp->d_name[2] == '\0')
22: /* parent directory? */
23: #undef EQUAL
24: #define EQUAL(s1,s2) \
25: (strcmp(s1,s2) == 0) /* string comparison */
26:
27: #undef MIN
28: #define MIN(a,b) \
29: (((a) < (b)) ? (a) : (b)) /* minimum of two values */
30:
31: #undef MAX
32: #define MAX(a,b) \
33: (((a) > (b)) ? (a) : (b)) /* maximum of two values */
34:
35: #undef WHITESPACE
36: #define WHITESPACE(c) \
37: (c == ' ' || c == '\t') /* unseen space in a file */
Defined macros
CHDIR
defined in line
12; used 1 times
EQUAL
defined in line
24; used 20 times
MAX
defined in line
32; used 2 times
MIN
defined in line
28; used 1 times
Usage of this include