1*19924Ssam #define numeric(c) (c>='0' && c<='9')
2*19924Ssam #define max(a,b) (a<b ? b : a)
3*19924Ssam #define min(a,b) (a>b ? b : a)
4*19924Ssam #define abs(x) (x<0 ? -x : x)
5*19924Ssam 
6*19924Ssam #define copy(src,dest) cat(dest,src,0)
7*19924Ssam #define compare(str1,str2) strcmp(str1,str2)
8*19924Ssam #define equal(str1,str2) !strcmp(str1,str2)
9*19924Ssam #define length(str) strlen(str)
10*19924Ssam #define size(str) (1+strlen(str))
11*19924Ssam 
12*19924Ssam #include "sys/types.h"
13*19924Ssam #include "sys/stat.h"
14*19924Ssam struct stat Statbuf;
15*19924Ssam #define exists(file) (stat(file,&Statbuf)<0 ? 0:Statbuf.st_mode)
16*19924Ssam 
17*19924Ssam #define xfopen(file,mode) fdopen(xopen(file,mode),mode==0?"r":mode==1?"w":"r+w")
18*19924Ssam #define xfcreat(file,mode) fdopen(xcreat(file,mode),"w")
19*19924Ssam #define remove(file) xunlink(file)
20*19924Ssam 
21*19924Ssam #define SCCSID(arg) static char Sccsid[] "arg"
22*19924Ssam 
23*19924Ssam #define USXALLOC()
24*19924Ssam 
25*19924Ssam #define NONBLANK(p) while (*p==' ' || *p=='\t') p++
26*19924Ssam 
27*19924Ssam char Null[1];
28*19924Ssam char Error[128];
29