|
|
1.1 ! root 1: /* ! 2: ** USEFUL.H -- useful stuff. ! 3: ** ! 4: ** Version: ! 5: ** @(#)useful.h 7.1 2/5/81 ! 6: */ ! 7: ! 8: # ifndef TRUE ! 9: # define TRUE 1 /* logical one, true, yes, ok, etc.*/ ! 10: # define FALSE 0 /* logical zero, false, no, nop, etc. */ ! 11: ! 12: typedef char bool; /* the boolean type */ ! 13: # endif TRUE ! 14: ! 15: # ifndef NULL ! 16: # define NULL 0 /* the null pointer */ ! 17: # endif NULL ! 18: ! 19: # ifndef bitset ! 20: # define bitset(bit, word) ((bit) & (word)) ! 21: # define setbit(bit, word) word |= bit ! 22: # define clrbit(bit, word) word &= ~bit ! 23: # endif bitset ! 24: ! 25: # ifndef min ! 26: # define min(a, b) (((a) < (b))? (a): (b)) ! 27: # define max(a, b) (((a) > (b))? (a): (b)) ! 28: # endif min
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.