|
|
1.1 root 1: /* GEN_DEFS.H */
2:
3: /* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */
4:
5: #ifndef _GEN_DEFS_H
6: #define _GEN_DEFS_H
7:
8: /************************************************************************/
9: /* General (application independant) type definitions and macros */
10: /* tabstop: 4 (as usual) */
11: /************************************************************************/
12:
13: /* Control characters */
14: #define STX 0x02 /* Start of text ^B */
15: #define ETX 0x03 /* End of text ^C */
16: #define BS 0x08 /* Back space ^H */
17: #define TAB 0x09 /* Horizontal tabulation ^I */
18: #define LF 0x0a /* Line feed ^J */
19: #define FF 0x0c /* Form feed ^L */
20: #define CR 0x0d /* Carriage return ^M */
21: #define ESC 0x1b /* Escape ^[ */
22: #define SP 0x20 /* Space */
23:
24: /* Unsigned type short-hands */
25: #define uchar unsigned char
26: #define ushort unsigned short
27: #define uint unsigned int
28: #define ulong unsigned long
29:
30: /****************************************************************************/
31: /* MALLOC/FREE Macros for various compilers and environments */
32: /* MALLOC is used for allocations of 64k or less */
33: /* FREE is used to free buffers allocated with MALLOC */
34: /* LMALLOC is used for allocations of possibly larger than 64k */
35: /* LFREE is used to free buffers allocated with LMALLOC */
36: /* REALLOC is used to re-size a previously MALLOCed or LMALLOCed buffer */
37: /* FAR16 is used to create a far (32-bit) pointer in 16-bit compilers */
38: /* HUGE16 is used to create a huge (32-bit) pointer in 16-bit compilers */
39: /****************************************************************************/
40: #if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)
41: #define HUGE16 huge
42: #define FAR16 far
43: #if defined(__TURBOC__)
44: #define REALLOC(x,y) farrealloc(x,y)
45: #define LMALLOC(x) farmalloc(x)
46: #define MALLOC(x) farmalloc(x)
47: #define LFREE(x) farfree(x)
48: #define FREE(x) farfree(x)
49: #elif defined(__WATCOMC__)
50: #define REALLOC realloc
51: #define LMALLOC(x) halloc(x,1) /* far heap, but slow */
52: #define MALLOC malloc /* far heap, but 64k max */
53: #define LFREE hfree
54: #define FREE free
55: #else /* Other 16-bit Compiler */
56: #define REALLOC realloc
57: #define LMALLOC malloc
58: #define MALLOC malloc
59: #define LFREE free
60: #define FREE free
61: #endif
62: #else /* 32-bit Compiler or Small Memory Model */
63: #define HUGE16
64: #define FAR16
65: #define REALLOC realloc
66: #define LMALLOC malloc
67: #define MALLOC malloc
68: #define LFREE free
69: #define FREE free
70: #endif
71:
72:
73: #endif /* Don't add anything after this #endif statement */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.