|
|
1.1.1.2 root 1: /* usuals.h - The usual typedefs, etc.
2: */
3: #ifndef USUALS /* Assures no redefinitions of usual types...*/
4: #define USUALS
5:
6: typedef unsigned char boolean; /* values are TRUE or FALSE */
7: typedef unsigned char byte; /* values are 0-255 */
8: typedef byte *byteptr; /* pointer to byte */
9: typedef char *string; /* pointer to ASCII character string */
10: typedef unsigned short word16; /* values are 0-65535 */
1.1.1.3 root 11: #ifdef __alpha
12: typedef unsigned int word32; /* values are 0-4294967295 */
13: #else
1.1.1.2 root 14: typedef unsigned long word32; /* values are 0-4294967295 */
1.1.1.3 root 15: #endif
1.1.1.2 root 16:
17: #ifndef TRUE
18: #define FALSE 0
19: #define TRUE (!FALSE)
20: #endif /* if TRUE not already defined */
21:
22: #ifndef min /* if min macro not already defined */
1.1.1.4 ! root 23: #define min(a,b) (((a)<(b)) ? (a) : (b) )
! 24: #define max(a,b) (((a)>(b)) ? (a) : (b) )
1.1.1.2 root 25: #endif /* if min macro not already defined */
26:
27: /* void for use in pointers */
1.1.1.3 root 28: #ifndef NO_VOID_STAR
1.1.1.2 root 29: #define VOID void
30: #else
31: #define VOID char
32: #endif
33:
1.1.1.4 ! root 34: /* Zero-fill the byte buffer. */
! 35: #define fill0(buffer,count) memset( buffer, 0, count )
! 36:
! 37: /* This macro is for burning sensitive data. Many of the
! 38: file I/O routines use it for zapping buffers */
! 39: #define burn(x) fill0((VOID *)&(x),sizeof(x))
1.1.1.2 root 40:
1.1.1.4 ! root 41: #endif /* if USUALS not already defined */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.