/* LOCAL.H Definitions for use with Learning to Program in C */ #ifndef FAIL #include #define FAIL 1 #define FOREVER for (;;) #define NO 0 #define SUCCEED 0 #define YES 1 #define bits ushort #define bool int #define metachar short #define tbool char #define ushort unsigned short #define getln(s, n) ((fgets(s, n, stdin)==NULL) ? EOF : strlen(s)) #define ABS(x) (((x) < 0) ? -(x) : (x)) #define MAX(x, y) (((x) < (y)) ? (y) : (x)) #define MIN(x, y) (((x) < (y)) ? (x) : (y)) #endif