Commit | Line | Data |
---|---|---|
79072805 | 1 | /* $RCSfile: handy.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:19 $ |
a687059c | 2 | * |
6e21c824 | 3 | * Copyright (c) 1991, Larry Wall |
a687059c | 4 | * |
6e21c824 LW |
5 | * You may distribute under the terms of either the GNU General Public |
6 | * License or the Artistic License, as specified in the README file. | |
8d063cd8 LW |
7 | * |
8 | * $Log: handy.h,v $ | |
79072805 LW |
9 | * Revision 4.1 92/08/07 18:29:19 lwall |
10 | * | |
6e21c824 LW |
11 | * Revision 4.0.1.2 91/06/07 12:15:43 lwall |
12 | * patch4: new copyright notice | |
13 | * | |
1c3d792e LW |
14 | * Revision 4.0.1.1 91/04/12 09:29:08 lwall |
15 | * patch1: random cleanup in cpp namespace | |
16 | * | |
fe14fcc3 LW |
17 | * Revision 4.0 91/03/20 01:57:45 lwall |
18 | * 4.0 baseline. | |
8d063cd8 LW |
19 | * |
20 | */ | |
21 | ||
22 | #define Null(type) ((type)0) | |
23 | #define Nullch Null(char*) | |
24 | #define Nullfp Null(FILE*) | |
25 | ||
26 | #define bool char | |
1c3d792e LW |
27 | #ifdef TRUE |
28 | #undef TRUE | |
29 | #endif | |
30 | #ifdef FALSE | |
31 | #undef FALSE | |
32 | #endif | |
8d063cd8 LW |
33 | #define TRUE (1) |
34 | #define FALSE (0) | |
35 | ||
36 | #define Ctl(ch) (ch & 037) | |
37 | ||
38 | #define strNE(s1,s2) (strcmp(s1,s2)) | |
39 | #define strEQ(s1,s2) (!strcmp(s1,s2)) | |
40 | #define strLT(s1,s2) (strcmp(s1,s2) < 0) | |
41 | #define strLE(s1,s2) (strcmp(s1,s2) <= 0) | |
42 | #define strGT(s1,s2) (strcmp(s1,s2) > 0) | |
43 | #define strGE(s1,s2) (strcmp(s1,s2) >= 0) | |
44 | #define strnNE(s1,s2,l) (strncmp(s1,s2,l)) | |
45 | #define strnEQ(s1,s2,l) (!strncmp(s1,s2,l)) |