perl 4.0 patch 1: (combined patch)
[p5sagit/p5-mst-13.2.git] / x2p / handy.h
CommitLineData
1c3d792e 1/* $RCSfile: handy.h,v $$Revision: 4.0.1.1 $$Date: 91/04/12 09:29:08 $
a687059c 2 *
3 * Copyright (c) 1989, Larry Wall
4 *
5 * You may distribute under the terms of the GNU General Public License
6 * as specified in the README file that comes with the perl 3.0 kit.
8d063cd8 7 *
8 * $Log: handy.h,v $
1c3d792e 9 * Revision 4.0.1.1 91/04/12 09:29:08 lwall
10 * patch1: random cleanup in cpp namespace
11 *
fe14fcc3 12 * Revision 4.0 91/03/20 01:57:45 lwall
13 * 4.0 baseline.
8d063cd8 14 *
15 */
16
17#define Null(type) ((type)0)
18#define Nullch Null(char*)
19#define Nullfp Null(FILE*)
20
21#define bool char
1c3d792e 22#ifdef TRUE
23#undef TRUE
24#endif
25#ifdef FALSE
26#undef FALSE
27#endif
8d063cd8 28#define TRUE (1)
29#define FALSE (0)
30
31#define Ctl(ch) (ch & 037)
32
33#define strNE(s1,s2) (strcmp(s1,s2))
34#define strEQ(s1,s2) (!strcmp(s1,s2))
35#define strLT(s1,s2) (strcmp(s1,s2) < 0)
36#define strLE(s1,s2) (strcmp(s1,s2) <= 0)
37#define strGT(s1,s2) (strcmp(s1,s2) > 0)
38#define strGE(s1,s2) (strcmp(s1,s2) >= 0)
39#define strnNE(s1,s2,l) (strncmp(s1,s2,l))
40#define strnEQ(s1,s2,l) (!strncmp(s1,s2,l))