home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / bm_src / bm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-16  |  680 b   |  25 lines

  1. #define FIRSTCHAR ' '
  2. #define MAXCHAR 0377
  3. #define MAXBUFF 8192
  4. #define MAXSIZE 100
  5. #define MAXPATS 100 /* max number of patterns */
  6. #define PSIZEDEF 1024 /* space for patterns if they come from a tty */
  7. #ifndef min
  8. #define min(x,y) ((x) < (y) ? (x) : (y))
  9. #endif
  10. #ifndef max
  11. #define max(x,y) ((x) > (y) ? (x) : (y))
  12. #endif
  13. struct PattDesc {
  14.     unsigned short *Skip1, *Skip2; /* pointers to skip tables */
  15.     char *Pattern;
  16.     int PatLen; /* pattern length */
  17.     char *Start;
  18.     /* starting position of search (at beginning of pattern) */
  19.     int Success; /* true when pattern found */
  20. };
  21. #define index(a,b) strchr(a,b)
  22. #define cfree(a) free(a)
  23.  
  24. extern char *strchr();
  25.