summaryrefslogtreecommitdiff
path: root/v4.0/src/TOOLS/BLD/INC
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/TOOLS/BLD/INC
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/TOOLS/BLD/INC')
-rw-r--r--v4.0/src/TOOLS/BLD/INC/ASSERT.H35
-rw-r--r--v4.0/src/TOOLS/BLD/INC/BIOS.H181
-rw-r--r--v4.0/src/TOOLS/BLD/INC/CONIO.H34
-rw-r--r--v4.0/src/TOOLS/BLD/INC/CTYPE.H66
-rw-r--r--v4.0/src/TOOLS/BLD/INC/DIRECT.H24
-rw-r--r--v4.0/src/TOOLS/BLD/INC/DOS.H220
-rw-r--r--v4.0/src/TOOLS/BLD/INC/ERRNO.H50
-rw-r--r--v4.0/src/TOOLS/BLD/INC/FCNTL.H35
-rw-r--r--v4.0/src/TOOLS/BLD/INC/FLOAT.H137
-rw-r--r--v4.0/src/TOOLS/BLD/INC/GRAPH.H216
-rw-r--r--v4.0/src/TOOLS/BLD/INC/IO.H43
-rw-r--r--v4.0/src/TOOLS/BLD/INC/LIMITS.H32
-rw-r--r--v4.0/src/TOOLS/BLD/INC/MALLOC.H124
-rw-r--r--v4.0/src/TOOLS/BLD/INC/MATH.H112
-rw-r--r--v4.0/src/TOOLS/BLD/INC/MEMORY.H34
-rw-r--r--v4.0/src/TOOLS/BLD/INC/PROCESS.H65
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SEARCH.H31
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SETJMP.H35
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SHARE.H15
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SIGNAL.H59
-rw-r--r--v4.0/src/TOOLS/BLD/INC/STDARG.H20
-rw-r--r--v4.0/src/TOOLS/BLD/INC/STDDEF.H48
-rw-r--r--v4.0/src/TOOLS/BLD/INC/STDIO.H165
-rw-r--r--v4.0/src/TOOLS/BLD/INC/STDLIB.H151
-rw-r--r--v4.0/src/TOOLS/BLD/INC/STRING.H61
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SYS/LOCKING.H16
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SYS/STAT.H56
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SYS/TIMEB.H39
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SYS/TYPES.H31
-rw-r--r--v4.0/src/TOOLS/BLD/INC/SYS/UTIME.H40
-rw-r--r--v4.0/src/TOOLS/BLD/INC/TIME.H75
-rw-r--r--v4.0/src/TOOLS/BLD/INC/VARARGS.H21
32 files changed, 2271 insertions, 0 deletions
diff --git a/v4.0/src/TOOLS/BLD/INC/ASSERT.H b/v4.0/src/TOOLS/BLD/INC/ASSERT.H
new file mode 100644
index 0000000..3a9809f
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/ASSERT.H
@@ -0,0 +1,35 @@
1/***
2*assert.h - define the assert macro
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* Defines the assert(exp) macro.
8* [ANSI/System V]
9*
10*******************************************************************************/
11
12
13#ifndef _ASSERT_DEFINED
14
15#ifndef NDEBUG
16
17static char _assertstring[] = "Assertion failed: %s, file %s, line %d\n";
18
19#define assert(exp) { \
20 if (!(exp)) { \
21 fprintf(stderr, _assertstring, #exp, __FILE__, __LINE__); \
22 fflush(stderr); \
23 abort(); \
24 } \
25 }
26
27#else
28
29#define assert(exp)
30
31#endif /* NDEBUG */
32
33#define _ASSERT_DEFINED
34
35#endif /* _ASSERT_DEFINED */
diff --git a/v4.0/src/TOOLS/BLD/INC/BIOS.H b/v4.0/src/TOOLS/BLD/INC/BIOS.H
new file mode 100644
index 0000000..0844857
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/BIOS.H
@@ -0,0 +1,181 @@
1/***
2*bios.h - declarations for bios interface functions and supporting definitions
3*
4* Copyright (c) 1987-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file declares the constants, structures, and functions
8* used for accessing and using various BIOS interfaces.
9*
10*******************************************************************************/
11
12
13#ifndef NO_EXT_KEYS /* extensions enabled */
14 #define _CDECL cdecl
15#else /* extensions not enabled */
16 #define _CDECL
17#endif /* NO_EXT_KEYS */
18
19/* manifest constants for BIOS serial communications (RS-232) support */
20
21/* serial port services */
22
23#define _COM_INIT 0 /* init serial port */
24#define _COM_SEND 1 /* send character */
25#define _COM_RECEIVE 2 /* receive character */
26#define _COM_STATUS 3 /* get serial port status */
27
28/* serial port initializers. One and only one constant from each of the
29 * following four groups - character size, stop bit, parity, and baud rate -
30 * must be specified in the initialization byte.
31 */
32
33/* character size initializers */
34
35#define _COM_CHR7 2 /* 7 bits characters */
36#define _COM_CHR8 3 /* 8 bits characters */
37
38/* stop bit values - on or off */
39
40#define _COM_STOP1 0 /* 1 stop bit */
41#define _COM_STOP2 4 /* 2 stop bits */
42
43/* parity initializers */
44
45#define _COM_NOPARITY 0 /* no parity */
46#define _COM_ODDPARITY 8 /* odd parity */
47#define _COM_EVENPARITY 24 /* even parity */
48
49/* baud rate initializers */
50
51#define _COM_110 0 /* 110 baud */
52#define _COM_150 32 /* 150 baud */
53#define _COM_300 64 /* 300 baud */
54#define _COM_600 96 /* 600 baud */
55#define _COM_1200 128 /* 1200 baud */
56#define _COM_2400 160 /* 2400 baud */
57#define _COM_4800 192 /* 4800 baud */
58#define _COM_9600 224 /* 9600 baud */
59
60
61/* manifest constants for BIOS disk support */
62
63/* disk services */
64
65#define _DISK_RESET 0 /* reset disk controller */
66#define _DISK_STATUS 1 /* get disk status */
67#define _DISK_READ 2 /* read disk sectors */
68#define _DISK_WRITE 3 /* write disk sectors */
69#define _DISK_VERIFY 4 /* verify disk sectors */
70#define _DISK_FORMAT 5 /* format disk track */
71
72/* struct used to send/receive information to/from the BIOS disk services */
73
74#ifndef NO_EXT_KEYS /* extensions must be enabled */
75
76#ifndef _DISKINFO_T_DEFINED
77
78struct diskinfo_t {
79 unsigned drive;
80 unsigned head;
81 unsigned track;
82 unsigned sector;
83 unsigned nsectors;
84 void far *buffer;
85 };
86
87#define _DISKINFO_T_DEFINED
88
89#endif
90
91#endif /* NO_EXT_KEYS */
92
93
94/* manifest constants for BIOS keyboard support */
95
96/* keyboard services */
97
98#define _KEYBRD_READ 0 /* read next character from keyboard */
99#define _KEYBRD_READY 1 /* check for keystroke */
100#define _KEYBRD_SHIFTSTATUS 2 /* get current shift key status */
101
102
103/* manifest constants for BIOS printer support */
104
105/* printer services */
106
107#define _PRINTER_WRITE 0 /* write character to printer */
108#define _PRINTER_INIT 1 /* intialize printer */
109#define _PRINTER_STATUS 2 /* get printer status */
110
111
112/* manifest constants for BIOS time of day support */
113
114/* time of day services */
115
116#define _TIME_GETCLOCK 0 /* get current clock count */
117#define _TIME_SETCLOCK 1 /* set current clock count */
118
119
120#ifndef _REGS_DEFINED
121
122/* word registers */
123
124struct WORDREGS {
125 unsigned int ax;
126 unsigned int bx;
127 unsigned int cx;
128 unsigned int dx;
129 unsigned int si;
130 unsigned int di;
131 unsigned int cflag;
132 };
133
134/* byte registers */
135
136struct BYTEREGS {
137 unsigned char al, ah;
138 unsigned char bl, bh;
139 unsigned char cl, ch;
140 unsigned char dl, dh;
141 };
142
143/* general purpose registers union -
144 * overlays the corresponding word and byte registers.
145 */
146
147union REGS {
148 struct WORDREGS x;
149 struct BYTEREGS h;
150 };
151
152/* segment registers */
153
154struct SREGS {
155 unsigned int es;
156 unsigned int cs;
157 unsigned int ss;
158 unsigned int ds;
159 };
160
161#define _REGS_DEFINED
162
163#endif /* _REGS_DEFINED */
164
165
166/* function prototypes */
167
168unsigned _CDECL _bios_equiplist(void);
169unsigned _CDECL _bios_keybrd(unsigned);
170unsigned _CDECL _bios_memsize(void);
171unsigned _CDECL _bios_printer(unsigned, unsigned, unsigned);
172unsigned _CDECL _bios_serialcom(unsigned, unsigned, unsigned);
173unsigned _CDECL _bios_timeofday(unsigned, long *);
174int _CDECL int86(int, union REGS *, union REGS *);
175int _CDECL int86x(int, union REGS *, union REGS *, struct SREGS *);
176
177#ifndef NO_EXT_KEYS /* extensions must be enabled */
178
179unsigned _CDECL _bios_disk(unsigned, struct diskinfo_t *);
180
181#endif /* NO_EXT_KEYS */
diff --git a/v4.0/src/TOOLS/BLD/INC/CONIO.H b/v4.0/src/TOOLS/BLD/INC/CONIO.H
new file mode 100644
index 0000000..7941e2e
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/CONIO.H
@@ -0,0 +1,34 @@
1/***
2*conio.h - console and port I/O declarations
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This include file contains the function declarations for
8* the MS C V2.03 compatible console and port I/O routines.
9*
10*******************************************************************************/
11
12
13#ifndef NO_EXT_KEYS /* extensions enabled */
14 #define _CDECL cdecl
15#else /* extensions not enabled */
16 #define _CDECL
17#endif /* NO_EXT_KEYS */
18
19/* function prototypes */
20
21char * _CDECL cgets(char *);
22int _CDECL cprintf(char *, ...);
23int _CDECL cputs(char *);
24int _CDECL cscanf(char *, ...);
25int _CDECL getch(void);
26int _CDECL getche(void);
27int _CDECL inp(unsigned int);
28unsigned _CDECL inpw(unsigned int);
29int _CDECL kbhit(void);
30int _CDECL outp(unsigned int, int);
31unsigned _CDECL outpw(unsigned int, unsigned int);
32int _CDECL putch(int);
33int _CDECL ungetch(int);
34
diff --git a/v4.0/src/TOOLS/BLD/INC/CTYPE.H b/v4.0/src/TOOLS/BLD/INC/CTYPE.H
new file mode 100644
index 0000000..c65d021
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/CTYPE.H
@@ -0,0 +1,66 @@
1/***
2*ctype.h - character conversion macros and ctype macros
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* Defines macros for character classification/conversion.
8* [ANSI/System V]
9*
10*******************************************************************************/
11
12
13#ifndef NO_EXT_KEYS /* extensions enabled */
14 #define _CDECL cdecl
15 #define _NEAR near
16#else /* extensions not enabled */
17 #define _CDECL
18 #define _NEAR
19#endif /* NO_EXT_KEYS */
20
21/*
22 * This declaration allows the user access to the ctype look-up
23 * array _ctype defined in ctype.obj by simply including ctype.h
24 */
25
26extern unsigned char _NEAR _CDECL _ctype[];
27
28/* set bit masks for the possible character types */
29
30#define _UPPER 0x1 /* upper case letter */
31#define _LOWER 0x2 /* lower case letter */
32#define _DIGIT 0x4 /* digit[0-9] */
33#define _SPACE 0x8 /* tab, carriage return, newline, */
34 /* vertical tab or form feed */
35#define _PUNCT 0x10 /* punctuation character */
36#define _CONTROL 0x20 /* control character */
37#define _BLANK 0x40 /* space char */
38#define _HEX 0x80 /* hexadecimal digit */
39
40/* the character classification macro definitions */
41
42#define isalpha(c) ( (_ctype+1)[c] & (_UPPER|_LOWER) )
43#define isupper(c) ( (_ctype+1)[c] & _UPPER )
44#define islower(c) ( (_ctype+1)[c] & _LOWER )
45#define isdigit(c) ( (_ctype+1)[c] & _DIGIT )
46#define isxdigit(c) ( (_ctype+1)[c] & _HEX )
47#define isspace(c) ( (_ctype+1)[c] & _SPACE )
48#define ispunct(c) ( (_ctype+1)[c] & _PUNCT )
49#define isalnum(c) ( (_ctype+1)[c] & (_UPPER|_LOWER|_DIGIT) )
50#define isprint(c) ( (_ctype+1)[c] & (_BLANK|_PUNCT|_UPPER|_LOWER|_DIGIT) )
51#define isgraph(c) ( (_ctype+1)[c] & (_PUNCT|_UPPER|_LOWER|_DIGIT) )
52#define iscntrl(c) ( (_ctype+1)[c] & _CONTROL )
53
54#define toupper(c) ( (islower(c)) ? _toupper(c) : (c) )
55#define tolower(c) ( (isupper(c)) ? _tolower(c) : (c) )
56
57#define _tolower(c) ( (c)-'A'+'a' )
58#define _toupper(c) ( (c)-'a'+'A' )
59
60#define isascii(c) ( (unsigned)(c) < 0x80 )
61#define toascii(c) ( (c) & 0x7f )
62
63/* MS C version 2.0 extended ctype macros */
64
65#define iscsymf(c) (isalpha(c) || ((c) == '_'))
66#define iscsym(c) (isalnum(c) || ((c) == '_'))
diff --git a/v4.0/src/TOOLS/BLD/INC/DIRECT.H b/v4.0/src/TOOLS/BLD/INC/DIRECT.H
new file mode 100644
index 0000000..2e2ebde
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/DIRECT.H
@@ -0,0 +1,24 @@
1/***
2*direct.h - function declarations for directory handling/creation
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This include file contains the function declarations for the library
8* functions related to directory handling and creation.
9*
10*******************************************************************************/
11
12
13#ifndef NO_EXT_KEYS /* extensions enabled */
14 #define _CDECL cdecl
15#else /* extensions not enabled */
16 #define _CDECL
17#endif /* NO_EXT_KEYS */
18
19/* function prototypes */
20
21int _CDECL chdir(char *);
22char * _CDECL getcwd(char *, int);
23int _CDECL mkdir(char *);
24int _CDECL rmdir(char *);
diff --git a/v4.0/src/TOOLS/BLD/INC/DOS.H b/v4.0/src/TOOLS/BLD/INC/DOS.H
new file mode 100644
index 0000000..5539156
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/DOS.H
@@ -0,0 +1,220 @@
1/***
2*dos.h - definitions for MS-DOS interface routines
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* Defines the structs and unions used for the direct DOS interface
8* routines; includes macros to access the segment and offset
9* values of far pointers, so that they may be used by the routines; and
10* provides function prototypes for direct DOS interface functions.
11*
12*******************************************************************************/
13
14
15#ifndef NO_EXT_KEYS /* extensions enabled */
16 #define _CDECL cdecl
17 #define _NEAR near
18#else /* extensions not enabled */
19 #define _CDECL
20 #define _NEAR
21#endif /* NO_EXT_KEYS */
22
23
24#ifndef _REGS_DEFINED
25
26/* word registers */
27
28struct WORDREGS {
29 unsigned int ax;
30 unsigned int bx;
31 unsigned int cx;
32 unsigned int dx;
33 unsigned int si;
34 unsigned int di;
35 unsigned int cflag;
36 };
37
38
39/* byte registers */
40
41struct BYTEREGS {
42 unsigned char al, ah;
43 unsigned char bl, bh;
44 unsigned char cl, ch;
45 unsigned char dl, dh;
46 };
47
48
49/* general purpose registers union -
50 * overlays the corresponding word and byte registers.
51 */
52
53union REGS {
54 struct WORDREGS x;
55 struct BYTEREGS h;
56 };
57
58
59/* segment registers */
60
61struct SREGS {
62 unsigned int es;
63 unsigned int cs;
64 unsigned int ss;
65 unsigned int ds;
66 };
67
68#define _REGS_DEFINED
69
70#endif
71
72
73/* dosexterror structure */
74
75#ifndef _DOSERROR_DEFINED
76
77struct DOSERROR {
78 int exterror;
79 char class;
80 char action;
81 char locus;
82 };
83
84#define _DOSERROR_DEFINED
85
86#endif
87
88
89/* _dos_findfirst structure */
90
91#ifndef _FIND_T_DEFINED
92
93struct find_t {
94 char reserved[21];
95 char attrib;
96 unsigned wr_time;
97 unsigned wr_date;
98 long size;
99 char name[13];
100 };
101
102#define _FIND_T_DEFINED
103
104#endif
105
106
107/* _dos_getdate/_dossetdate and _dos_gettime/_dos_settime structures */
108
109#ifndef _DATETIME_T_DEFINED
110
111struct dosdate_t {
112 unsigned char day; /* 1-31 */
113 unsigned char month; /* 1-12 */
114 unsigned int year; /* 1980-2099 */
115 unsigned char dayofweek; /* 0-6, 0=Sunday */
116 };
117
118struct dostime_t {
119 unsigned char hour; /* 0-23 */
120 unsigned char minute; /* 0-59 */
121 unsigned char second; /* 0-59 */
122 unsigned char hsecond; /* 0-99 */
123 };
124
125#define _DATETIME_T_DEFINED
126
127#endif
128
129
130/* _dos_getdiskfree structure */
131
132#ifndef _DISKFREE_T_DEFINED
133
134struct diskfree_t {
135 unsigned total_clusters;
136 unsigned avail_clusters;
137 unsigned sectors_per_cluster;
138 unsigned bytes_per_sector;
139 };
140
141#define _DISKFREE_T_DEFINED
142
143#endif
144
145
146/* manifest constants for _hardresume result parameter */
147
148#define _HARDERR_IGNORE 0 /* Ignore the error */
149#define _HARDERR_RETRY 1 /* Retry the operation */
150#define _HARDERR_ABORT 2 /* Abort program issuing Interrupt 23h */
151#define _HARDERR_FAIL 3 /* Fail the system call in progress */
152 /* _HARDERR_FAIL is not supported on DOS 2.x */
153
154/* File attribute constants */
155
156#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
157#define _A_RDONLY 0x01 /* Read only file */
158#define _A_HIDDEN 0x02 /* Hidden file */
159#define _A_SYSTEM 0x04 /* System file */
160#define _A_VOLID 0x08 /* Volume ID file */
161#define _A_SUBDIR 0x10 /* Subdirectory */
162#define _A_ARCH 0x20 /* Archive file */
163
164/* macros to break MS C "far" pointers into their segment and offset
165 * components
166 */
167
168#define FP_SEG(fp) (*((unsigned *)&(fp) + 1))
169#define FP_OFF(fp) (*((unsigned *)&(fp)))
170
171
172/* external variable declarations */
173
174extern unsigned int _NEAR _CDECL _osversion;
175
176
177/* function prototypes */
178
179int _CDECL bdos(int, unsigned int, unsigned int);
180void _CDECL _disable(void);
181unsigned _CDECL _dos_allocmem(unsigned, unsigned *);
182unsigned _CDECL _dos_close(int);
183unsigned _CDECL _dos_creat(char *, unsigned, int *);
184unsigned _CDECL _dos_creatnew(char *, unsigned, int *);
185unsigned _CDECL _dos_findfirst(char *, unsigned, struct find_t *);
186unsigned _CDECL _dos_findnext(struct find_t *);
187unsigned _CDECL _dos_freemem(unsigned);
188void _CDECL _dos_getdate(struct dosdate_t *);
189void _CDECL _dos_getdrive(unsigned *);
190unsigned _CDECL _dos_getdiskfree(unsigned, struct diskfree_t *);
191unsigned _CDECL _dos_getfileattr(char *, unsigned *);
192unsigned _CDECL _dos_getftime(int, unsigned *, unsigned *);
193void _CDECL _dos_gettime(struct dostime_t *);
194void _CDECL _dos_keep(unsigned, unsigned);
195unsigned _CDECL _dos_open(char *, unsigned, int *);
196unsigned _CDECL _dos_setblock(unsigned, unsigned, unsigned *);
197unsigned _CDECL _dos_setdate(struct dosdate_t *);
198void _CDECL _dos_setdrive(unsigned, unsigned *);
199unsigned _CDECL _dos_setfileattr(char *, unsigned);
200unsigned _CDECL _dos_setftime(int, unsigned, unsigned);
201unsigned _CDECL _dos_settime(struct dostime_t *);
202int _CDECL dosexterr(struct DOSERROR *);
203void _CDECL _enable(void);
204void _CDECL _hardresume(int);
205void _CDECL _hardretn(int);
206int _CDECL intdos(union REGS *, union REGS *);
207int _CDECL intdosx(union REGS *, union REGS *, struct SREGS *);
208int _CDECL int86(int, union REGS *, union REGS *);
209int _CDECL int86x(int, union REGS *, union REGS *, struct SREGS *);
210void _CDECL segread(struct SREGS *);
211
212
213#ifndef NO_EXT_KEYS /* extensions enabled */
214void _CDECL _chain_intr(void (_CDECL interrupt far *)());
215void (_CDECL interrupt far * _CDECL _dos_getvect(unsigned))();
216unsigned _CDECL _dos_read(int, void far *, unsigned, unsigned *);
217void _CDECL _dos_setvect(unsigned, void (_CDECL interrupt far *)());
218unsigned _CDECL _dos_write(int, void far *, unsigned, unsigned *);
219void _CDECL _harderr(void (far *)());
220#endif /* NO_EXT_KEYS */
diff --git a/v4.0/src/TOOLS/BLD/INC/ERRNO.H b/v4.0/src/TOOLS/BLD/INC/ERRNO.H
new file mode 100644
index 0000000..0925338
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/ERRNO.H
@@ -0,0 +1,50 @@
1/***
2*errno.h - system wide error numbers (set by system calls)
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the system-wide error numbers (set by
8* system calls). Conforms to the XENIX standard. Extended
9* for compatibility with Uniforum standard.
10* [System V]
11*
12*******************************************************************************/
13
14#define EZERO 0
15#define EPERM 1
16#define ENOENT 2
17#define ESRCH 3
18#define EINTR 4
19#define EIO 5
20#define ENXIO 6
21#define E2BIG 7
22#define ENOEXEC 8
23#define EBADF 9
24#define ECHILD 10
25#define EAGAIN 11
26#define ENOMEM 12
27#define EACCES 13
28#define EFAULT 14
29#define ENOTBLK 15
30#define EBUSY 16
31#define EEXIST 17
32#define EXDEV 18
33#define ENODEV 19
34#define ENOTDIR 20
35#define EISDIR 21
36#define EINVAL 22
37#define ENFILE 23
38#define EMFILE 24
39#define ENOTTY 25
40#define ETXTBSY 26
41#define EFBIG 27
42#define ENOSPC 28
43#define ESPIPE 29
44#define EROFS 30
45#define EMLINK 31
46#define EPIPE 32
47#define EDOM 33
48#define ERANGE 34
49#define EUCLEAN 35
50#define EDEADLOCK 36
diff --git a/v4.0/src/TOOLS/BLD/INC/FCNTL.H b/v4.0/src/TOOLS/BLD/INC/FCNTL.H
new file mode 100644
index 0000000..08ad549
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/FCNTL.H
@@ -0,0 +1,35 @@
1/***
2*fcntl.h - file control options used by open()
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines constants for the file control options used
8* by the open() function.
9* [System V]
10*
11*******************************************************************************/
12
13#define O_RDONLY 0x0000 /* open for reading only */
14#define O_WRONLY 0x0001 /* open for writing only */
15#define O_RDWR 0x0002 /* open for reading and writing */
16#define O_APPEND 0x0008 /* writes done at eof */
17
18#define O_CREAT 0x0100 /* create and open file */
19#define O_TRUNC 0x0200 /* open and truncate */
20#define O_EXCL 0x0400 /* open only if file doesn't already exist */
21
22/* O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
23** and <lf> sequences translated to <cr><lf> on write()'s
24*/
25
26#define O_TEXT 0x4000 /* file mode is text (translated) */
27#define O_BINARY 0x8000 /* file mode is binary (untranslated) */
28
29/* macro to translate the C 2.0 name used to force binary mode for files */
30
31#define O_RAW O_BINARY
32
33/* Open handle inherit bit */
34
35#define O_NOINHERIT 0x0080 /* child process doesn't inherit file */
diff --git a/v4.0/src/TOOLS/BLD/INC/FLOAT.H b/v4.0/src/TOOLS/BLD/INC/FLOAT.H
new file mode 100644
index 0000000..2d73f85
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/FLOAT.H
@@ -0,0 +1,137 @@
1/***
2*float.h - constants for floating point values
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file contains defines for a number of implementation dependent
8* values which are commonly used by sophisticated numerical (floating
9* point) programs.
10* [ANSI]
11*
12*******************************************************************************/
13
14
15#ifndef NO_EXT_KEYS /* extensions enabled */
16 #define _CDECL cdecl
17#else /* extensions not enabled */
18 #define _CDECL
19#endif /* NO_EXT_KEYS */
20
21#define DBL_DIG 15 /* # of decimal digits of precision */
22#define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */
23#define DBL_MANT_DIG 53 /* # of bits in mantissa */
24#define DBL_MAX 1.7976931348623158e+308 /* max value */
25#define DBL_MAX_10_EXP 308 /* max decimal exponent */
26#define DBL_MAX_EXP 1024 /* max binary exponent */
27#define DBL_MIN 2.2250738585072014e-308 /* min positive value */
28#define DBL_MIN_10_EXP -307 /* min decimal exponent
29#define DBL_MIN_EXP -1021 /* min binary exponent */
30#define DBL_RADIX 2 /* exponent radix */
31#define DBL_ROUNDS 0 /* addition rounding: chops */
32
33#define FLT_DIG 6 /* # of decimal digits of precision */
34#define FLT_EPSILON 1.192092896e-07 /* smallest such that 1.0+FLT_EPSILON != 1.0 */
35#define FLT_GUARD 0
36#define FLT_MANT_DIG 24 /* # of bits in mantissa */
37#define FLT_MAX 3.402823466e+38 /* max value */
38#define FLT_MAX_10_EXP 38 /* max decimal exponent */
39#define FLT_MAX_EXP 128 /* max binary exponent */
40#define FLT_MIN 1.175494351e-38 /* min positive value */
41#define FLT_MIN_10_EXP -37 /* min decimal exponent */
42#define FLT_MIN_EXP -125 /* min binary exponent */
43#define FLT_NORMALIZE 0
44#define FLT_RADIX 2 /* exponent radix */
45#define FLT_ROUNDS 0 /* addition rounding: chops */
46
47#define LDBL_DIG DBL_DIG /* # of decimal digits of precision */
48#define LDBL_EPSILON DBL_EPSILON /* smallest such that 1.0+LDBL_EPSILON != 1.0 */
49#define LDBL_MANT_DIG DBL_MANT_DIG /* # of bits in mantissa */
50#define LDBL_MAX DBL_MAX /* max value */
51#define LDBL_MAX_10_EXP DBL_MAX_10_EXP /* max decimal exponent */
52#define LDBL_MAX_EXP DBL_MAX_EXP /* max binary exponent */
53#define LDBL_MIN DBL_MIN /* min positive value */
54#define LDBL_MIN_10_EXP DBL_MIN_10_EXP /* min deimal exponent
55#define LDBL_MIN_EXP DBL_MIN_EXP /* min binary exponent */
56#define LDBL_RADIX DBL_RADIX /* exponent radix */
57#define LDBL_ROUNDS DBL_ROUNDS /* addition rounding: chops */
58
59
60/*
61 * 8087/80287 math control information
62 */
63
64
65/* User Control Word Mask and bit definitions.
66 * These definitions match the 8087/80287
67 */
68
69#define MCW_EM 0x003f /* interrupt Exception Masks */
70#define EM_INVALID 0x0001 /* invalid */
71#define EM_DENORMAL 0x0002 /* denormal */
72#define EM_ZERODIVIDE 0x0004 /* zero divide */
73#define EM_OVERFLOW 0x0008 /* overflow */
74#define EM_UNDERFLOW 0x0010 /* underflow */
75#define EM_INEXACT 0x0020 /* inexact (precision) */
76
77#define MCW_IC 0x1000 /* Infinity Control */
78#define IC_AFFINE 0x1000 /* affine */
79#define IC_PROJECTIVE 0x0000 /* projective */
80
81#define MCW_RC 0x0c00 /* Rounding Control */
82#define RC_CHOP 0x0c00 /* chop */
83#define RC_UP 0x0800 /* up */
84#define RC_DOWN 0x0400 /* down */
85#define RC_NEAR 0x0000 /* near */
86
87#define MCW_PC 0x0300 /* Precision Control */
88#define PC_24 0x0000 /* 24 bits */
89#define PC_53 0x0200 /* 53 bits */
90#define PC_64 0x0300 /* 64 bits */
91
92
93/* initial Control Word value */
94
95#define CW_DEFAULT ( IC_AFFINE + RC_NEAR + PC_64 + EM_DENORMAL + EM_UNDERFLOW + EM_INEXACT )
96
97
98/* user Status Word bit definitions */
99
100#define SW_INVALID 0x0001 /* invalid */
101#define SW_DENORMAL 0x0002 /* denormal */
102#define SW_ZERODIVIDE 0x0004 /* zero divide */
103#define SW_OVERFLOW 0x0008 /* overflow */
104#define SW_UNDERFLOW 0x0010 /* underflow */
105#define SW_INEXACT 0x0020 /* inexact (precision) */
106
107
108/* invalid subconditions (SW_INVALID also set) */
109
110#define SW_UNEMULATED 0x0040 /* unemulated instruction */
111#define SW_SQRTNEG 0x0080 /* square root of a neg number */
112#define SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
113#define SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
114
115
116/* Floating point error signals and return codes */
117
118#define FPE_INVALID 0x81
119#define FPE_DENORMAL 0x82
120#define FPE_ZERODIVIDE 0x83
121#define FPE_OVERFLOW 0x84
122#define FPE_UNDERFLOW 0x85
123#define FPE_INEXACT 0x86
124
125#define FPE_UNEMULATED 0x87
126#define FPE_SQRTNEG 0x88
127#define FPE_STACKOVERFLOW 0x8a
128#define FPE_STACKUNDERFLOW 0x8b
129
130#define FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
131
132/* function prototypes */
133
134unsigned int _CDECL _clear87(void);
135unsigned int _CDECL _control87(unsigned int,unsigned int);
136void _CDECL _fpreset(void);
137unsigned int _CDECL _status87(void);
diff --git a/v4.0/src/TOOLS/BLD/INC/GRAPH.H b/v4.0/src/TOOLS/BLD/INC/GRAPH.H
new file mode 100644
index 0000000..7b69c51
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/GRAPH.H
@@ -0,0 +1,216 @@
1/***
2*graph.h - declare constants and functions for graphics library
3*
4* Copyright (c) 1987-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file declares the graphics library functions and
8* the manifest constants that are used with them.
9*
10*******************************************************************************/
11
12/* user-visible declarations for Quick-C Graphics Library */
13
14#ifndef _GRAPH_T_DEFINED
15
16/* structure for _getvideoconfig() as visible to user */
17struct videoconfig {
18 short numxpixels; /* number of pixels on X axis */
19 short numypixels; /* number of pixels on Y axis */
20 short numtextcols; /* number of text columns available */
21 short numtextrows; /* number of text rows available */
22 short numcolors; /* number of actual colors */
23 short bitsperpixel; /* number of bits per pixel */
24 short numvideopages; /* number of available video pages */
25 short mode; /* current video mode */
26 short adapter; /* active display adapter */
27 short monitor; /* active display monitor */
28 short memory; /* adapter video memory in K bytes */
29};
30
31/* return value of _setlogorg(), etc. */
32struct xycoord {
33 short xcoord;
34 short ycoord;
35};
36
37/* structure for text position */
38struct rccoord {
39 short row;
40 short col;
41};
42
43#define _GRAPH_T_DEFINED
44
45#endif
46
47
48/* SETUP AND CONFIGURATION */
49
50short far cdecl _setvideomode(short);
51
52/* arguments to _setvideomode() */
53#define _DEFAULTMODE -1 /* restore screen to original mode */
54#define _TEXTBW40 0 /* 40 x 25 text, 16 grey */
55#define _TEXTC40 1 /* 40 x 25 text, 16/8 color */
56#define _TEXTBW80 2 /* 80 x 25 text, 16 grey */
57#define _TEXTC80 3 /* 80 x 25 text, 16/8 color */
58#define _MRES4COLOR 4 /* 320 x 200, 4 color */
59#define _MRESNOCOLOR 5 /* 320 x 200, 4 grey */
60#define _HRESBW 6 /* 640 x 200, BW */
61#define _TEXTMONO 7 /* 80 x 25 text, BW */
62#define _HERCMONO 8 /* 720 x 348, BW for HGC */
63#define _MRES16COLOR 13 /* 320 x 200, 16 color */
64#define _HRES16COLOR 14 /* 640 x 200, 16 color */
65#define _ERESNOCOLOR 15 /* 640 x 350, BW */
66#define _ERESCOLOR 16 /* 640 x 350, 4 or 16 color */
67#define _VRES2COLOR 17 /* 640 x 480, BW */
68#define _VRES16COLOR 18 /* 640 x 480, 16 color */
69#define _MRES256COLOR 19 /* 320 x 200, 256 color */
70
71short far cdecl _setactivepage(short);
72short far cdecl _setvisualpage(short);
73
74/* videoconfig adapter values */
75/* these manifest constants can be used to determine the type of monitor in */
76/* use, using either simple comparisons or the bitwise-AND operator (&) */
77#define _MDPA 0x0001 /* Monochrome Display Adapter (MDPA) */
78#define _CGA 0x0002 /* Color Graphics Adapter (CGA) */
79#define _EGA 0x0004 /* Enhanced Graphics Adapter (EGA) */
80#define _VGA 0x0008 /* Video Graphics Array (VGA) */
81#define _MCGA 0x0010 /* MultiColor Graphics Array (MCGA) */
82#define _HGC 0x0020 /* Hercules Graphics Card (HGC) */
83
84/* videoconfig monitor values */
85/* these manifest constants can be used to determine the type of the active */
86/* adapter, using either simple comparisons or the bitwise-AND operator (&) */
87#define _MONO 0x0001 /* Monochrome */
88#define _COLOR 0x0002 /* Color (or Enhanced emulating color) */
89#define _ENHCOLOR 0x0004 /* Enhanced Color */
90#define _ANALOG 0x0018 /* Analog */
91
92struct videoconfig far * far cdecl _getvideoconfig(struct videoconfig far *);
93
94
95/* COORDINATE SYSTEMS */
96
97struct xycoord far cdecl _setlogorg(short, short);
98struct xycoord far cdecl _getlogcoord(short, short);
99struct xycoord far cdecl _getphyscoord(short, short);
100
101void far cdecl _setcliprgn(short, short, short, short);
102void far cdecl _setviewport(short, short, short, short);
103
104
105/* OUTPUT ROUTINES */
106
107/* control parameters for Rectangle, Ellipse and Pie */
108#define _GBORDER 2 /* draw outline only */
109#define _GFILLINTERIOR 3 /* fill using current fill mask */
110
111#define _GCLEARSCREEN 0
112#define _GVIEWPORT 1
113#define _GWINDOW 2
114
115void far cdecl _clearscreen(short);
116
117struct xycoord far cdecl _moveto(short, short);
118struct xycoord far cdecl _getcurrentposition(void);
119
120short far cdecl _lineto(short, short);
121short far cdecl _rectangle(short, short, short, short, short);
122short far cdecl _ellipse(short, short, short, short, short);
123short far cdecl _arc(short, short, short, short, short, short, short, short);
124short far cdecl _pie(short, short, short, short, short, short, short, short, short);
125
126short far cdecl _setpixel(short, short);
127short far cdecl _getpixel(short, short);
128short far cdecl _floodfill(short, short, short);
129
130
131/* PEN COLOR, LINE STYLE, FILL PATTERN */
132
133short far cdecl _setcolor(short);
134short far cdecl _getcolor(void);
135
136void far cdecl _setlinestyle(unsigned short);
137unsigned short far cdecl _getlinestyle(void);
138
139void far cdecl _setfillmask(unsigned char far *);
140unsigned char far * far cdecl _getfillmask(unsigned char far *);
141
142/* COLOR SELECTION */
143
144long far cdecl _setbkcolor(long);
145long far cdecl _getbkcolor(void);
146
147long far cdecl _remappalette(short, long);
148short far cdecl _remapallpalette(long far *);
149short far cdecl _selectpalette(short);
150
151
152/* TEXT */
153#define _GCURSOROFF 0
154#define _GCURSORON 1
155
156#define _GWRAPOFF 0
157#define _GWRAPON 1
158
159void far cdecl _settextwindow(short, short, short, short);
160void far cdecl _outtext(char far *);
161short far cdecl _wrapon(short);
162short far cdecl _displaycursor(short);
163
164struct rccoord far cdecl _settextposition(short, short);
165struct rccoord far cdecl _gettextposition(void);
166
167short far cdecl _settextcolor(short);
168short far cdecl _gettextcolor(void);
169
170
171/* SCREEN IMAGES */
172
173void far cdecl _getimage(short, short, short, short, char far *);
174void far cdecl _putimage(short, short, char far *, short);
175long far cdecl _imagesize(short, short, short, short);
176
177/* "action verbs" for _putimage() */
178#define _GPSET 3
179#define _GPRESET 2
180#define _GAND 1
181#define _GOR 0
182#define _GXOR 4
183
184/* universal color values: */
185#define _BLACK 0x000000L
186#define _BLUE 0x2a0000L
187#define _GREEN 0x002a00L
188#define _CYAN 0x2a2a00L
189#define _RED 0x00002aL
190#define _MAGENTA 0x2a002aL
191#define _BROWN 0x00152aL
192#define _WHITE 0x2a2a2aL
193#define _GRAY 0x151515L
194#define _LIGHTBLUE 0x3F1515L
195#define _LIGHTGREEN 0x153f15L
196#define _LIGHTCYAN 0x3f3f15L
197#define _LIGHTRED 0x15153fL
198#define _LIGHTMAGENTA 0x3f153fL
199#define _LIGHTYELLOW 0x153f3fL
200#define _BRIGHTWHITE 0x3f3f3fL
201
202/* mono mode F color values: */
203#define _MODEFOFF 0L
204#define _MODEFOFFTOON 1L
205#define _MODEFOFFTOHI 2L
206#define _MODEFONTOOFF 3L
207#define _MODEFON 4L
208#define _MODEFONTOHI 5L
209#define _MODEFHITOOFF 6L
210#define _MODEFHITOON 7L
211#define _MODEFHI 8L
212
213/* mono mode 7 color values: */
214#define _MODE7OFF 0L
215#define _MODE7ON 1L
216#define _MODE7HI 2L
diff --git a/v4.0/src/TOOLS/BLD/INC/IO.H b/v4.0/src/TOOLS/BLD/INC/IO.H
new file mode 100644
index 0000000..7261295
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/IO.H
@@ -0,0 +1,43 @@
1/***
2*io.h - declarations for low-level file handling and I/O functions
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file contains the function declarations for the low-level
8* file handling and I/O functions.
9*
10*******************************************************************************/
11
12
13#ifndef NO_EXT_KEYS /* extensions enabled */
14 #define _CDECL cdecl
15#else /* extensions not enabled */
16 #define _CDECL
17#endif /* NO_EXT_KEYS */
18
19/* function prototypes */
20
21int _CDECL access(char *, int);
22int _CDECL chmod(char *, int);
23int _CDECL chsize(int, long);
24int _CDECL close(int);
25int _CDECL creat(char *, int);
26int _CDECL dup(int);
27int _CDECL dup2(int, int);
28int _CDECL eof(int);
29long _CDECL filelength(int);
30int _CDECL isatty(int);
31int _CDECL locking(int, int, long);
32long _CDECL lseek(int, long, int);
33char * _CDECL mktemp(char *);
34int _CDECL open(char *, int, ...);
35int _CDECL read(int, char *, unsigned int);
36int _CDECL remove(const char *);
37int _CDECL rename(const char *, const char *);
38int _CDECL setmode(int, int);
39int _CDECL sopen(char *, int, int, ...);
40long _CDECL tell(int);
41int _CDECL umask(int);
42int _CDECL unlink(const char *);
43int _CDECL write(int, char *, unsigned int);
diff --git a/v4.0/src/TOOLS/BLD/INC/LIMITS.H b/v4.0/src/TOOLS/BLD/INC/LIMITS.H
new file mode 100644
index 0000000..21e907f
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/LIMITS.H
@@ -0,0 +1,32 @@
1/***
2*limits.h - implementation dependent values
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* contains defines for a number of implementation dependent values
8* which are commonly used in C programs.
9* [ANSI]
10*
11*******************************************************************************/
12
13#ifndef _CHAR_UNSIGNED
14#define CHAR_MAX 127 /* maximum char value */
15#define CHAR_MIN -127 /* mimimum char value */
16#else
17#define CHAR_MAX 255
18#define CHAR_MIN 0
19#endif
20#define SCHAR_MAX 127 /* maximum signed char value */
21#define SCHAR_MIN -127 /* minimum signed char value */
22#define UCHAR_MAX 255 /* maximum unsigned char value */
23#define CHAR_BIT 8 /* number of bits in a char */
24#define USHRT_MAX 0xffff /* maximum unsigned short value */
25#define SHRT_MAX 32767 /* maximum (signed) short value */
26#define SHRT_MIN -32767 /* minimum (signed) short value */
27#define UINT_MAX 0xffff /* maximum unsigned int value */
28#define ULONG_MAX 0xffffffff /* maximum unsigned long value */
29#define INT_MAX 32767 /* maximum (signed) int value */
30#define INT_MIN -32767 /* minimum (signed) int value */
31#define LONG_MAX 2147483647 /* maximum (signed) long value */
32#define LONG_MIN -2147483647 /* minimum (signed) long value */
diff --git a/v4.0/src/TOOLS/BLD/INC/MALLOC.H b/v4.0/src/TOOLS/BLD/INC/MALLOC.H
new file mode 100644
index 0000000..e2aa979
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/MALLOC.H
@@ -0,0 +1,124 @@
1/***
2*malloc.h - declarations and definitions for memory allocation functions
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* Contains the function declarations for memory allocation functions;
8* also defines manifest constants and types used by the heap routines.
9* [System V]
10*
11*******************************************************************************/
12
13
14#define _HEAPEMPTY -1
15#define _HEAPOK -2
16#define _HEAPBADBEGIN -3
17#define _HEAPBADNODE -4
18#define _HEAPEND -5
19#define _HEAPBADPTR -6
20#define _FREEENTRY 0
21#define _USEDENTRY 1
22
23#ifndef _SIZE_T_DEFINED
24typedef unsigned int size_t;
25#define _SIZE_T_DEFINED
26#endif
27
28#if (!defined(NO_EXT_KEYS))
29
30#ifndef _HEAPINFO_DEFINED
31typedef struct _heapinfo {
32 int far * _pentry;
33 size_t _size;
34 int _useflag;
35 } _HEAPINFO;
36#define _HEAPINFO_DEFINED
37#endif
38
39#else /* NO_EXT_KEYS */
40#if (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
41
42#ifndef _HEAPINFO_DEFINED
43
44typedef struct _heapinfo {
45 int * _pentry;
46 size_t _size;
47 int _useflag;
48 } _HEAPINFO;
49
50#define _HEAPINFO_DEFINED
51#endif
52
53#endif /* M_I86CM || M_I86LM || M_I86HM */
54
55#endif /* NO_EXT_KEYS */
56
57
58#if (defined(M_I86SM) || defined(M_I86MM))
59#define _heapchk _nheapchk
60#define _heapset _nheapset
61#define _heapwalk _nheapwalk
62#endif
63#if (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
64#define _heapchk _fheapchk
65#define _heapset _fheapset
66#define _heapwalk _fheapwalk
67#endif
68
69#ifndef NO_EXT_KEYS /* extensions enabled */
70 #define _CDECL cdecl
71 #define _NEAR near
72#else /* extensions not enabled */
73 #define _CDECL
74 #define _NEAR
75#endif /* NO_EXT_KEYS */
76
77
78/* external variable declarations */
79extern unsigned int _NEAR _CDECL _amblksiz;
80
81/* function prototypes */
82
83void * _CDECL alloca(size_t);
84void * _CDECL calloc(size_t, size_t);
85void * _CDECL _expand(void *, size_t);
86int _CDECL _fheapchk(void);
87int _CDECL _fheapset(unsigned int);
88unsigned int _CDECL _freect(size_t);
89void _CDECL free(void *);
90void * _CDECL malloc(size_t);
91size_t _CDECL _memavl(void);
92size_t _CDECL _memmax(void);
93size_t _CDECL _msize(void *);
94int _CDECL _nheapchk(void);
95int _CDECL _nheapset(unsigned int);
96void * _CDECL realloc(void *, size_t);
97void * _CDECL sbrk(int);
98size_t _CDECL stackavail(void);
99
100
101#ifndef NO_EXT_KEYS /* extensions enabled */
102
103void cdecl _ffree(void far *);
104void far * cdecl _fmalloc(size_t);
105size_t cdecl _fmsize(void far *);
106#ifndef _QC
107void huge * cdecl halloc(long, size_t);
108void cdecl hfree(void huge *);
109#endif
110void cdecl _nfree(void near *);
111void near * cdecl _nmalloc(size_t);
112size_t cdecl _nmsize(void near *);
113int cdecl _nheapwalk(struct _heapinfo *);
114int cdecl _fheapwalk(struct _heapinfo *);
115
116#else
117#if (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
118
119int _nheapwalk(struct _heapinfo *);
120int _fheapwalk(struct _heapinfo *);
121
122#endif /* M_I86CM || M_I86LM || M_I86HM */
123
124#endif /* NO_EXT_KEYS */
diff --git a/v4.0/src/TOOLS/BLD/INC/MATH.H b/v4.0/src/TOOLS/BLD/INC/MATH.H
new file mode 100644
index 0000000..9c0e701
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/MATH.H
@@ -0,0 +1,112 @@
1/***
2*math.h - definitions and declarations for math library
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file contains constant definitions and external subroutine
8* declarations for the math subroutine library.
9* [ANSI/System V]
10*
11*******************************************************************************/
12
13
14#ifndef NO_EXT_KEYS /* extensions enabled */
15 #define _CDECL cdecl
16#else /* extensions not enabled */
17 #define _CDECL
18#endif /* NO_EXT_KEYS */
19
20
21/* definition of exception struct - this struct is passed to the matherr
22 * routine when a floating point exception is detected
23 */
24
25#ifndef _EXCEPTION_DEFINED
26struct exception {
27 int type; /* exception type - see below */
28 char *name; /* name of function where error occured */
29 double arg1; /* first argument to function */
30 double arg2; /* second argument (if any) to function */
31 double retval; /* value to be returned by function */
32 } ;
33#define _EXCEPTION_DEFINED
34#endif
35
36
37/* definition of a complex struct to be used by those who use cabs and
38 * want type checking on their argument
39 */
40
41#ifndef _COMPLEX_DEFINED
42struct complex {
43 double x,y; /* real and imaginary parts */
44 } ;
45#define _COMPLEX_DEFINED
46#endif
47
48
49/* Constant definitions for the exception type passed in the exception struct
50 */
51
52#define DOMAIN 1 /* argument domain error */
53#define SING 2 /* argument singularity */
54#define OVERFLOW 3 /* overflow range error */
55#define UNDERFLOW 4 /* underflow range error */
56#define TLOSS 5 /* total loss of precision */
57#define PLOSS 6 /* partial loss of precision */
58
59#define EDOM 33
60#define ERANGE 34
61
62
63/* definitions of HUGE and HUGE_VAL - respectively the XENIX and ANSI names
64 * for a value returned in case of error by a number of the floating point
65 * math routines
66 */
67
68extern double HUGE;
69#define HUGE_VAL HUGE
70
71
72
73/* function prototypes */
74
75int _CDECL abs(int);
76double _CDECL acos(double);
77double _CDECL asin(double);
78double _CDECL atan(double);
79double _CDECL atan2(double, double);
80double _CDECL atof(const char *);
81double _CDECL cabs(struct complex);
82double _CDECL ceil(double);
83double _CDECL cos(double);
84double _CDECL cosh(double);
85int _CDECL dieeetomsbin(double *, double *);
86int _CDECL dmsbintoieee(double *, double *);
87double _CDECL exp(double);
88double _CDECL fabs(double);
89int _CDECL fieeetomsbin(float *, float *);
90double _CDECL floor(double);
91double _CDECL fmod(double, double);
92int _CDECL fmsbintoieee(float *, float *);
93double _CDECL frexp(double, int *);
94double _CDECL hypot(double, double);
95double _CDECL j0(double);
96double _CDECL j1(double);
97double _CDECL jn(int, double);
98long _CDECL labs(long);
99double _CDECL ldexp(double, int);
100double _CDECL log(double);
101double _CDECL log10(double);
102int _CDECL matherr(struct exception *);
103double _CDECL modf(double, double *);
104double _CDECL pow(double, double);
105double _CDECL sin(double);
106double _CDECL sinh(double);
107double _CDECL sqrt(double);
108double _CDECL tan(double);
109double _CDECL tanh(double);
110double _CDECL y0(double);
111double _CDECL y1(double);
112double _CDECL yn(int, double);
diff --git a/v4.0/src/TOOLS/BLD/INC/MEMORY.H b/v4.0/src/TOOLS/BLD/INC/MEMORY.H
new file mode 100644
index 0000000..519b71d
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/MEMORY.H
@@ -0,0 +1,34 @@
1/***
2*memory.h - declarations for buffer (memory) manipulation routines
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This include file contains the function declarations for the
8* buffer (memory) manipulation routines.
9* [System V]
10*
11*******************************************************************************/
12
13
14#ifndef _SIZE_T_DEFINED
15typedef unsigned int size_t;
16#define _SIZE_T_DEFINED
17#endif
18
19#ifndef NO_EXT_KEYS /* extensions enabled */
20 #define _CDECL cdecl
21#else /* extensions not enabled */
22 #define _CDECL
23#endif /* NO_EXT_KEYS */
24
25
26/* function prototypes */
27
28void * _CDECL memccpy(void *, void *, int, unsigned int);
29void * _CDECL memchr(const void *, int, size_t);
30int _CDECL memcmp(const void *, const void *, size_t);
31void * _CDECL memcpy(void *, const void *, size_t);
32int _CDECL memicmp(void *, void *, unsigned int);
33void * _CDECL memset(void *, int, size_t);
34void _CDECL movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
diff --git a/v4.0/src/TOOLS/BLD/INC/PROCESS.H b/v4.0/src/TOOLS/BLD/INC/PROCESS.H
new file mode 100644
index 0000000..f0c85f3
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/PROCESS.H
@@ -0,0 +1,65 @@
1/***
2*process.h - definition and declarations for process control functions
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the modeflag values for spawnxx calls. Only
8* P_WAIT and P_OVERLAY are currently implemented on DOS 2 & 3.
9* P_NOWAIT is also enabled on DOS 4. Also contains the function
10* argument declarations for all process control related routines.
11*
12*******************************************************************************/
13
14
15#ifndef NO_EXT_KEYS /* extensions enabled */
16 #define _CDECL cdecl
17 #define _NEAR near
18#else /* extensions not enabled */
19 #define _CDECL
20 #define _NEAR
21#endif /* NO_EXT_KEYS */
22
23
24/* modeflag values for spawnxx routines */
25
26extern int _NEAR _CDECL _p_overlay;
27
28#define P_WAIT 0
29#define P_NOWAIT 1
30#define P_OVERLAY _p_overlay
31#define OLD_P_OVERLAY 2
32#define P_NOWAITO 3
33
34
35/* Action Codes used with Cwait() */
36
37#define WAIT_CHILD 0
38#define WAIT_GRANDCHILD 1
39
40
41/* function prototypes */
42
43void _CDECL abort(void);
44int _CDECL cwait(int *, int, int);
45int _CDECL execl(char *, char *, ...);
46int _CDECL execle(char *, char *, ...);
47int _CDECL execlp(char *, char *, ...);
48int _CDECL execlpe(char *, char *, ...);
49int _CDECL execv(char *, char * *);
50int _CDECL execve(char *, char * *, char * *);
51int _CDECL execvp(char *, char * *);
52int _CDECL execvpe(char *, char * *, char * *);
53void _CDECL exit(int);
54void _CDECL _exit(int);
55int _CDECL getpid(void);
56int _CDECL spawnl(int, char *, char *, ...);
57int _CDECL spawnle(int, char *, char *, ...);
58int _CDECL spawnlp(int, char *, char *, ...);
59int _CDECL spawnlpe(int, char *, char *, ...);
60int _CDECL spawnv(int, char *, char * *);
61int _CDECL spawnve(int, char *, char * *, char * *);
62int _CDECL spawnvp(int, char *, char * *);
63int _CDECL spawnvpe(int, char *, char * *, char * *);
64int _CDECL system(const char *);
65int _CDECL wait(int *);
diff --git a/v4.0/src/TOOLS/BLD/INC/SEARCH.H b/v4.0/src/TOOLS/BLD/INC/SEARCH.H
new file mode 100644
index 0000000..88ea976
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SEARCH.H
@@ -0,0 +1,31 @@
1/***
2*search.h - declarations for searcing/sorting routines
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file contains the declarations for the sorting and
8* searching routines.
9* [System V]
10*
11*******************************************************************************/
12
13
14#ifndef _SIZE_T_DEFINED
15typedef unsigned int size_t;
16#define _SIZE_T_DEFINED
17#endif
18
19#ifndef NO_EXT_KEYS /* extensions enabled */
20 #define _CDECL cdecl
21#else /* extensions not enabled */
22 #define _CDECL
23#endif /* NO_EXT_KEYS */
24
25
26/* function prototypes */
27
28char * _CDECL lsearch(char *, char *, unsigned int *, unsigned int, int (_CDECL *)(void *, void *));
29char * _CDECL lfind(char *, char *, unsigned int *, unsigned int, int (_CDECL *)(void *, void *));
30void * _CDECL bsearch(const void *, const void *, size_t, size_t, int (_CDECL *)(const void *, const void *));
31void _CDECL qsort(void *, size_t, size_t, int (_CDECL *)(const void *, const void *));
diff --git a/v4.0/src/TOOLS/BLD/INC/SETJMP.H b/v4.0/src/TOOLS/BLD/INC/SETJMP.H
new file mode 100644
index 0000000..6f74793
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SETJMP.H
@@ -0,0 +1,35 @@
1/***
2*setjmp.h - definitions/declarations for setjmp/longjmp routines
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the machine-dependent buffer used by
8* setjmp/longjmp to save and restore the program state, and
9* declarations for those routines.
10* [ANSI/System V]
11*
12*******************************************************************************/
13
14
15#ifndef NO_EXT_KEYS /* extensions enabled */
16 #define _CDECL cdecl
17#else /* extensions not enabled */
18 #define _CDECL
19#endif /* NO_EXT_KEYS */
20
21
22/* define the buffer type for holding the state information */
23
24#define _JBLEN 9 /* bp, di, si, sp, ret addr, ds */
25
26#ifndef _JMP_BUF_DEFINED
27typedef int jmp_buf[_JBLEN];
28#define _JMP_BUF_DEFINED
29#endif
30
31
32/* function prototypes */
33
34int _CDECL setjmp(jmp_buf);
35void _CDECL longjmp(jmp_buf, int);
diff --git a/v4.0/src/TOOLS/BLD/INC/SHARE.H b/v4.0/src/TOOLS/BLD/INC/SHARE.H
new file mode 100644
index 0000000..2a34f71
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SHARE.H
@@ -0,0 +1,15 @@
1/***
2*share.h - defines file sharing modes for sopen
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the file sharing modes for sopen().
8*
9*******************************************************************************/
10
11#define SH_COMPAT 0x00 /* compatibility mode */
12#define SH_DENYRW 0x10 /* deny read/write mode */
13#define SH_DENYWR 0x20 /* deny write mode */
14#define SH_DENYRD 0x30 /* deny read mode */
15#define SH_DENYNO 0x40 /* deny none mode */
diff --git a/v4.0/src/TOOLS/BLD/INC/SIGNAL.H b/v4.0/src/TOOLS/BLD/INC/SIGNAL.H
new file mode 100644
index 0000000..18b8f10
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SIGNAL.H
@@ -0,0 +1,59 @@
1/***
2*signal.h - defines signal values and routines
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the signal values and declares the signal functions.
8* [ANSI/System V]
9*
10*******************************************************************************/
11
12
13#ifndef NO_EXT_KEYS /* extensions enabled */
14 #define _CDECL cdecl
15#else /* extensions not enabled */
16 #define _CDECL
17#endif /* NO_EXT_KEYS */
18
19#ifndef _SIG_ATOMIC_T_DEFINED
20typedef int sig_atomic_t;
21#define _SIG_ATOMIC_T_DEFINED
22#endif
23
24
25#define NSIG 23 /* maximum signal number + 1 */
26
27/* signal types */
28/* SIGINT, SIGFPE, SIGILL, SIGSEGV, and SIGABRT are recognized on DOS 3.x */
29
30#define SIGINT 2 /* interrupt - corresponds to DOS 3.x int 23H */
31#define SIGILL 4 /* illegal instruction - invalid function image */
32#define SIGFPE 8 /* floating point exception */
33#define SIGSEGV 11 /* segment violation */
34#define SIGTERM 15 /* Software termination signal from kill */
35#define SIGUSR1 16 /* User defined signal 1 */
36#define SIGUSR2 17 /* User defined signal 2 */
37#define SIGUSR3 20 /* User defined signal 3 */
38#define SIGBREAK 21 /* Ctrl-Break sequence */
39#define SIGABRT 22 /* abnormal termination triggered by abort call */
40
41
42/* signal action codes */
43/* SIG_DFL and SIG_IGN are recognized on DOS 3.x */
44
45#define SIG_DFL (void (*)())0 /* default signal action */
46#define SIG_IGN (void (*)())1 /* ignore */
47#define SIG_SGE (void (*)())3 /* signal gets error */
48#define SIG_ACK (void (*)())4 /* error if handler not setup */
49
50
51/* signal error value (returned by signal call on error) */
52
53#define SIG_ERR (void (*)())-1 /* signal error value */
54
55
56/* function prototypes */
57
58void (_CDECL * _CDECL signal(int, void (_CDECL *)()))();
59int _CDECL raise(int);
diff --git a/v4.0/src/TOOLS/BLD/INC/STDARG.H b/v4.0/src/TOOLS/BLD/INC/STDARG.H
new file mode 100644
index 0000000..d261cfa
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/STDARG.H
@@ -0,0 +1,20 @@
1/***
2*stdarg.h - defines ANSI-style macros for variable argument functions
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines ANSI-style macros for accessing arguments
8* of functions which take a variable number of arguments.
9* [ANSI]
10*
11*******************************************************************************/
12
13#ifndef _VA_LIST_DEFINED
14typedef char *va_list;
15#define _VA_LIST_DEFINED
16#endif
17
18#define va_start(ap,v) ap = (va_list)&v + sizeof(v)
19#define va_arg(ap,t) ((t *)(ap += sizeof(t)))[-1]
20#define va_end(ap) ap = NULL
diff --git a/v4.0/src/TOOLS/BLD/INC/STDDEF.H b/v4.0/src/TOOLS/BLD/INC/STDDEF.H
new file mode 100644
index 0000000..b9637b0
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/STDDEF.H
@@ -0,0 +1,48 @@
1/***
2*stddef.h - definitions/declarations for common constants, types, variables
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file contains definitions and declarations for some commonly
8* used constants, types, and variables.
9* [ANSI]
10*
11*******************************************************************************/
12
13
14#ifndef NO_EXT_KEYS /* extensions enabled */
15 #define _CDECL cdecl
16 #define _NEAR near
17#else /* extensions not enabled */
18 #define _CDECL
19 #define _NEAR
20#endif /* NO_EXT_KEYS */
21
22
23/* define NULL pointer value */
24
25#if (defined(M_I86SM) || defined(M_I86MM))
26#define NULL 0
27#elif (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
28#define NULL 0L
29#endif
30
31
32/* declare reference to errno */
33
34extern int _NEAR _CDECL errno;
35
36
37/* define the implementation dependent size types */
38
39#ifndef _PTRDIFF_T_DEFINED
40typedef int ptrdiff_t;
41#define _PTRDIFF_T_DEFINED
42#endif
43
44#ifndef _SIZE_T_DEFINED
45typedef unsigned int size_t;
46#define _SIZE_T_DEFINED
47#endif
48
diff --git a/v4.0/src/TOOLS/BLD/INC/STDIO.H b/v4.0/src/TOOLS/BLD/INC/STDIO.H
new file mode 100644
index 0000000..0c7f7b3
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/STDIO.H
@@ -0,0 +1,165 @@
1/***
2*stdio.h - definitions/declarations for standard I/O routines
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the structures, values, macros, and functions
8* used by the level 2 I/O ("standard I/O") routines.
9* [ANSI/System V]
10*
11*******************************************************************************/
12
13
14#ifndef _SIZE_T_DEFINED
15typedef unsigned int size_t;
16#define _SIZE_T_DEFINED
17#endif
18
19#ifndef _VA_LIST_DEFINED
20typedef char *va_list;
21#define _VA_LIST_DEFINED
22#endif
23
24#ifndef NO_EXT_KEYS /* extensions enabled */
25 #define _CDECL cdecl
26 #define _NEAR near
27#else /* extensions not enabled */
28 #define _CDECL
29 #define _NEAR
30#endif /* NO_EXT_KEYS */
31
32
33/* buffered I/O macros */
34
35#define BUFSIZ 512
36#define _NFILE 20
37#define EOF (-1)
38
39#ifndef _FILE_DEFINED
40#define FILE struct _iobuf
41#define _FILE_DEFINED
42#endif
43
44/* P_tmpnam: Directory where temporary files may be created.
45 * L_tmpnam size = size of P_tmpdir
46 * + 1 (in case P_tmpdir does not end in "\\")
47 * + 6 (for the temp number string)
48 * + 1 (for the null terminator)
49 */
50
51#define P_tmpdir "\\"
52#define L_tmpnam sizeof(P_tmpdir)+8
53
54#define SEEK_CUR 1
55#define SEEK_END 2
56#define SEEK_SET 0
57
58#define SYS_OPEN 20
59#define TMP_MAX 32767
60
61
62/* define NULL pointer value */
63
64#if (defined(M_I86SM) || defined(M_I86MM))
65#define NULL 0
66#elif (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
67#define NULL 0L
68#endif
69
70
71/* define file control block */
72
73#ifndef _IOB_DEFINED
74extern FILE {
75 char *_ptr;
76 int _cnt;
77 char *_base;
78 char _flag;
79 char _file;
80 } _NEAR _CDECL _iob[];
81#define _IOB_DEFINED
82#endif
83
84#define fpos_t long /* file position variable */
85
86#define stdin (&_iob[0])
87#define stdout (&_iob[1])
88#define stderr (&_iob[2])
89#define stdaux (&_iob[3])
90#define stdprn (&_iob[4])
91
92#define _IOREAD 0x01
93#define _IOWRT 0x02
94
95#define _IOFBF 0x0
96#define _IOLBF 0x40
97#define _IONBF 0x04
98
99#define _IOMYBUF 0x08
100#define _IOEOF 0x10
101#define _IOERR 0x20
102#define _IOSTRG 0x40
103#define _IORW 0x80
104
105#define getc(f) (--(f)->_cnt >= 0 ? 0xff & *(f)->_ptr++ : _filbuf(f))
106#define putc(c,f) (--(f)->_cnt >= 0 ? 0xff & (*(f)->_ptr++ = (char)(c)) \
107 : _flsbuf((c),(f)))
108#define getchar() getc(stdin)
109#define putchar(c) putc((c),stdout)
110
111#define feof(f) ((f)->_flag & _IOEOF)
112#define ferror(f) ((f)->_flag & _IOERR)
113#define fileno(f) ((f)->_file)
114
115
116/* function prototypes */
117
118int _CDECL _filbuf(FILE *);
119int _CDECL _flsbuf(int, FILE *);
120void _CDECL clearerr(FILE *);
121int _CDECL fclose(FILE *);
122int _CDECL fcloseall(void);
123FILE * _CDECL fdopen(int, char *);
124int _CDECL fflush(FILE *);
125int _CDECL fgetc(FILE *);
126int _CDECL fgetchar(void);
127int _CDECL fgetpos(FILE *, fpos_t *);
128char * _CDECL fgets(char *, int, FILE *);
129int _CDECL flushall(void);
130FILE * _CDECL fopen(const char *, const char *);
131int _CDECL fprintf(FILE *, const char *, ...);
132int _CDECL fputc(int, FILE *);
133int _CDECL fputchar(int);
134int _CDECL fputs(const char *, FILE *);
135size_t _CDECL fread(void *, size_t, size_t, FILE *);
136FILE * _CDECL freopen(const char *, const char *, FILE *);
137int _CDECL fscanf(FILE *, const char *, ...);
138int _CDECL fsetpos(FILE *, const fpos_t *);
139int _CDECL fseek(FILE *, long, int);
140long _CDECL ftell(FILE *);
141size_t _CDECL fwrite(const void *, size_t, size_t, FILE *);
142char * _CDECL gets(char *);
143int _CDECL getw(FILE *);
144void _CDECL perror(const char *);
145int _CDECL printf(const char *, ...);
146int _CDECL puts(const char *);
147int _CDECL putw(int, FILE *);
148int _CDECL remove(const char *);
149int _CDECL rename(const char *, const char *);
150void _CDECL rewind(FILE *);
151int _CDECL rmtmp(void);
152int _CDECL scanf(const char *, ...);
153void _CDECL setbuf(FILE *, char *);
154int _CDECL setvbuf(FILE *, char *, int, size_t);
155int _CDECL sprintf(char *, const char *, ...);
156int _CDECL sscanf(const char *, const char *, ...);
157char * _CDECL tempnam(char *, char *);
158FILE * _CDECL tmpfile(void);
159char * _CDECL tmpnam(char *);
160int _CDECL ungetc(int, FILE *);
161int _CDECL unlink(const char *);
162int _CDECL vfprintf(FILE *, const char *, va_list);
163int _CDECL vprintf(const char *, va_list);
164int _CDECL vsprintf(char *, const char *, va_list);
165
diff --git a/v4.0/src/TOOLS/BLD/INC/STDLIB.H b/v4.0/src/TOOLS/BLD/INC/STDLIB.H
new file mode 100644
index 0000000..5fb67d7
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/STDLIB.H
@@ -0,0 +1,151 @@
1/***
2*stdlib.h - declarations/definitions for commonly used library functions
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This include file contains the function declarations for
8* commonly used library functions which either don't fit somewhere
9* else, or, like toupper/tolower, can't be declared in the normal
10* place (ctype.h in the case of toupper/tolower) for other reasons.
11* [ANSI]
12*
13*******************************************************************************/
14
15
16#ifndef _SIZE_T_DEFINED
17typedef unsigned int size_t;
18#define _SIZE_T_DEFINED
19#endif
20
21#ifndef NO_EXT_KEYS /* extensions enabled */
22 #define _CDECL cdecl
23 #define _NEAR near
24#else /* extensions not enabled */
25 #define _CDECL
26 #define _NEAR
27#endif /* NO_EXT_KEYS */
28
29
30/* definition of the return type for the onexit() function */
31
32#ifndef _ONEXIT_T_DEFINED
33typedef int (_CDECL * _CDECL onexit_t)();
34#define _ONEXIT_T_DEFINED
35#endif
36
37
38/* Data structure definitions for div and ldiv runtimes. */
39
40#ifndef _DIV_T_DEFINED
41
42typedef struct {
43 int quot;
44 int rem;
45} div_t;
46
47typedef struct {
48 long quot;
49 long rem;
50} ldiv_t;
51
52#define _DIV_T_DEFINED
53#endif
54
55/* Maximum value that can be returned by the rand function. */
56
57#define RAND_MAX 0x7fff
58
59
60/* min and max macros */
61
62#define max(a,b) (((a) > (b)) ? (a) : (b))
63#define min(a,b) (((a) < (b)) ? (a) : (b))
64
65
66/* sizes for buffers used by the _makepath() and _splitpath() functions.
67 * note that the sizes include space for 0-terminator
68 */
69
70#define _MAX_PATH 144 /* max. length of full pathname */
71#define _MAX_DRIVE 3 /* max. length of drive component */
72#define _MAX_DIR 130 /* max. length of path component */
73#define _MAX_FNAME 9 /* max. length of file name component */
74#define _MAX_EXT 5 /* max. length of extension component */
75
76/* external variable declarations */
77
78extern int _NEAR _CDECL errno; /* XENIX style error number */
79extern int _NEAR _CDECL _doserrno; /* MS-DOS system error value */
80extern char * _NEAR _CDECL sys_errlist[]; /* perror error message table */
81extern int _NEAR _CDECL sys_nerr; /* # of entries in sys_errlist table */
82
83extern char ** _NEAR _CDECL environ; /* pointer to environment table */
84
85extern unsigned int _NEAR _CDECL _psp; /* Program Segment Prefix */
86
87extern int _NEAR _CDECL _fmode; /* default file translation mode */
88
89/* DOS major/minor version numbers */
90
91extern unsigned char _NEAR _CDECL _osmajor;
92extern unsigned char _NEAR _CDECL _osminor;
93
94#define DOS_MODE 0 /* Real Address Mode */
95#define OS2_MODE 1 /* Protected Address Mode */
96
97extern unsigned char _NEAR _CDECL _osmode;
98
99
100/* function prototypes */
101
102double _CDECL atof(const char *);
103double _CDECL strtod(const char *, char * *);
104ldiv_t _CDECL ldiv(long, long);
105
106void _CDECL abort(void);
107int _CDECL abs(int);
108int _CDECL atexit(void (_CDECL *)(void));
109int _CDECL atoi(const char *);
110long _CDECL atol(const char *);
111void * _CDECL bsearch(const void *, const void *, size_t, size_t, int (_CDECL *)(const void *, const void *));
112void * _CDECL calloc(size_t, size_t);
113div_t _CDECL div(int, int);
114char * _CDECL ecvt(double, int, int *, int *);
115void _CDECL exit(int);
116void _CDECL _exit(int);
117char * _CDECL fcvt(double, int, int *, int *);
118void _CDECL free(void *);
119char * _CDECL gcvt(double, int, char *);
120char * _CDECL getenv(const char *);
121char * _CDECL itoa(int, char *, int);
122long _CDECL labs(long);
123unsigned long _CDECL _lrotl(unsigned long, int);
124unsigned long _CDECL _lrotr(unsigned long, int);
125char * _CDECL ltoa(long, char *, int);
126void _CDECL _makepath(char *, char *, char *, char *, char *);
127void * _CDECL malloc(size_t);
128onexit_t _CDECL onexit(onexit_t);
129void _CDECL perror(const char *);
130int _CDECL putenv(char *);
131void _CDECL qsort(void *, size_t, size_t, int (_CDECL *)(const void *, const void *));
132unsigned int _CDECL _rotl(unsigned int, int);
133unsigned int _CDECL _rotr(unsigned int, int);
134int _CDECL rand(void);
135void * _CDECL realloc(void *, size_t);
136void _CDECL _searchenv(char *, char *, char *);
137void _CDECL _splitpath(char *, char *, char *, char *, char *);
138void _CDECL srand(unsigned int);
139long _CDECL strtol(const char *, char * *, int);
140unsigned long _CDECL strtoul(const char *, char * *, int);
141void _CDECL swab(char *, char *, int);
142int _CDECL system(const char *);
143char * _CDECL ultoa(unsigned long, char *, int);
144
145#ifndef tolower /* tolower has been undefined - use function */
146int _CDECL tolower(int);
147#endif /* tolower */
148
149#ifndef toupper /* toupper has been undefined - use function */
150int _CDECL toupper(int);
151#endif /* toupper */
diff --git a/v4.0/src/TOOLS/BLD/INC/STRING.H b/v4.0/src/TOOLS/BLD/INC/STRING.H
new file mode 100644
index 0000000..8340688
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/STRING.H
@@ -0,0 +1,61 @@
1/***
2*string.h - declarations for string manipulation functions
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file contains the function declarations for the string
8* manipulation functions.
9* [ANSI/System V]
10*
11*******************************************************************************/
12
13
14#ifndef _SIZE_T_DEFINED
15typedef unsigned int size_t;
16#define _SIZE_T_DEFINED
17#endif
18
19#ifndef NO_EXT_KEYS /* extensions enabled */
20 #define _CDECL cdecl
21#else /* extensions not enabled */
22 #define _CDECL
23#endif /* NO_EXT_KEYS */
24
25
26/* function prototypes */
27
28void * _CDECL memccpy(void *, void *, int, unsigned int);
29void * _CDECL memchr(const void *, int, size_t);
30int _CDECL memcmp(const void *, const void *, size_t);
31int _CDECL memicmp(void *, void *, unsigned int);
32void * _CDECL memcpy(void *, const void *, size_t);
33void * _CDECL memmove(void *, const void *, size_t);
34void * _CDECL memset(void *, int, size_t);
35void _CDECL movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
36
37char * _CDECL strcat(char *, const char *);
38char * _CDECL strchr(const char *, int);
39int _CDECL strcmp(const char *, const char *);
40int _CDECL strcmpi(const char *, const char *);
41int _CDECL stricmp(const char *, const char *);
42char * _CDECL strcpy(char *, const char *);
43size_t _CDECL strcspn(const char *, const char *);
44char * _CDECL strdup(const char *);
45char * _CDECL _strerror(char *);
46char * _CDECL strerror(int);
47size_t _CDECL strlen(const char *);
48char * _CDECL strlwr(char *);
49char * _CDECL strncat(char *, const char *, size_t);
50int _CDECL strncmp(const char *, const char *, size_t);
51int _CDECL strnicmp(const char *, const char *, size_t);
52char * _CDECL strncpy(char *, const char *, size_t);
53char * _CDECL strnset(char *, int, size_t);
54char * _CDECL strpbrk(const char *, const char *);
55char * _CDECL strrchr(const char *, int);
56char * _CDECL strrev(char *);
57char * _CDECL strset(char *, int);
58size_t _CDECL strspn(const char *, const char *);
59char * _CDECL strstr(const char *, const char *);
60char * _CDECL strtok(char *, const char *);
61char * _CDECL strupr(char *);
diff --git a/v4.0/src/TOOLS/BLD/INC/SYS/LOCKING.H b/v4.0/src/TOOLS/BLD/INC/SYS/LOCKING.H
new file mode 100644
index 0000000..fb76160
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SYS/LOCKING.H
@@ -0,0 +1,16 @@
1/***
2*sys\locking.h - flags for locking() function
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the flags for the locking() function.
8* [System V]
9*
10*******************************************************************************/
11
12#define LK_UNLCK 0 /* unlock the file region */
13#define LK_LOCK 1 /* lock the file region */
14#define LK_NBLCK 2 /* non-blocking lock */
15#define LK_RLCK 3 /* lock for writing */
16#define LK_NBRLCK 4 /* non-blocking lock for writing */
diff --git a/v4.0/src/TOOLS/BLD/INC/SYS/STAT.H b/v4.0/src/TOOLS/BLD/INC/SYS/STAT.H
new file mode 100644
index 0000000..4259208
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SYS/STAT.H
@@ -0,0 +1,56 @@
1/***
2*sys\stat.h - defines structure used by stat() and fstat()
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the structure used by the stat() and fstat()
8* routines.
9* [System V]
10*
11*******************************************************************************/
12
13
14#ifndef NO_EXT_KEYS /* extensions enabled */
15 #define CDECL cdecl
16#else /* extensions not enabled */
17 #define CDECL
18#endif /* NO_EXT_KEYS */
19
20#ifndef _TIME_T_DEFINED
21typedef long time_t;
22#define _TIME_T_DEFINED
23#endif
24
25/* define structure for returning status information */
26
27#ifndef _STAT_DEFINED
28struct stat {
29 dev_t st_dev;
30 ino_t st_ino;
31 unsigned short st_mode;
32 short st_nlink;
33 short st_uid;
34 short st_gid;
35 dev_t st_rdev;
36 off_t st_size;
37 time_t st_atime;
38 time_t st_mtime;
39 time_t st_ctime;
40 };
41#define _STAT_DEFINED
42#endif
43
44#define S_IFMT 0170000 /* file type mask */
45#define S_IFDIR 0040000 /* directory */
46#define S_IFCHR 0020000 /* character special */
47#define S_IFREG 0100000 /* regular */
48#define S_IREAD 0000400 /* read permission, owner */
49#define S_IWRITE 0000200 /* write permission, owner */
50#define S_IEXEC 0000100 /* execute/search permission, owner */
51
52
53/* function prototypes */
54
55int CDECL fstat(int, struct stat *);
56int CDECL stat(char *, struct stat *);
diff --git a/v4.0/src/TOOLS/BLD/INC/SYS/TIMEB.H b/v4.0/src/TOOLS/BLD/INC/SYS/TIMEB.H
new file mode 100644
index 0000000..46bf4ac
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SYS/TIMEB.H
@@ -0,0 +1,39 @@
1/***
2*sys\timeb.h - definition/declarations for ftime()
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file define the ftime() function and the types it uses.
8* [System V]
9*
10*******************************************************************************/
11
12
13#ifndef NO_EXT_KEYS /* extensions enabled */
14 #define CDECL cdecl
15#else /* extensions not enabled */
16 #define CDECL
17#endif /* NO_EXT_KEYS */
18
19#ifndef _TIME_T_DEFINED
20typedef long time_t;
21#define _TIME_T_DEFINED
22#endif
23
24/* structure returned by ftime system call */
25
26#ifndef _TIMEB_DEFINED
27struct timeb {
28 time_t time;
29 unsigned short millitm;
30 short timezone;
31 short dstflag;
32 };
33#define _TIMEB_DEFINED
34#endif
35
36
37/* function prototypes */
38
39void CDECL ftime(struct timeb *);
diff --git a/v4.0/src/TOOLS/BLD/INC/SYS/TYPES.H b/v4.0/src/TOOLS/BLD/INC/SYS/TYPES.H
new file mode 100644
index 0000000..84fc6b6
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SYS/TYPES.H
@@ -0,0 +1,31 @@
1/***
2*sys\types.h - types returned by system level calls for file and time info
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines types used in defining values returned by system
8* level calls for file status and time information.
9* [System V]
10*
11*******************************************************************************/
12
13#ifndef _INO_T_DEFINED
14typedef unsigned short ino_t; /* i-node number (not used on DOS) */
15#define _INO_T_DEFINED
16#endif
17
18#ifndef _TIME_T_DEFINED
19typedef long time_t;
20#define _TIME_T_DEFINED
21#endif
22
23#ifndef _DEV_T_DEFINED
24typedef short dev_t; /* device code */
25#define _DEV_T_DEFINED
26#endif
27
28#ifndef _OFF_T_DEFINED
29typedef long off_t; /* file offset value */
30#define _OFF_T_DEFINED
31#endif
diff --git a/v4.0/src/TOOLS/BLD/INC/SYS/UTIME.H b/v4.0/src/TOOLS/BLD/INC/SYS/UTIME.H
new file mode 100644
index 0000000..868756c
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/SYS/UTIME.H
@@ -0,0 +1,40 @@
1/***
2*sys\utime.h - definitions/declarations for utime()
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines the structure used by the utime routine to set
8* new file access and modification times. NOTE - MS-DOS
9* does not recognize access time, so this field will
10* always be ignored and the modification time field will be
11* used to set the new time.
12*
13*******************************************************************************/
14
15
16#ifndef NO_EXT_KEYS /* extensions enabled */
17 #define CDECL cdecl
18#else /* extensions not enabled */
19 #define CDECL
20#endif /* NO_EXT_KEYS */
21
22#ifndef _TIME_T_DEFINED
23typedef long time_t;
24#define _TIME_T_DEFINED
25#endif
26
27/* define struct used by utime() function */
28
29#ifndef _UTIMBUF_DEFINED
30struct utimbuf {
31 time_t actime; /* access time */
32 time_t modtime; /* modification time */
33 };
34#define _UTIMBUF_DEFINED
35#endif
36
37
38/* function prototypes */
39
40int CDECL utime(char *, struct utimbuf *);
diff --git a/v4.0/src/TOOLS/BLD/INC/TIME.H b/v4.0/src/TOOLS/BLD/INC/TIME.H
new file mode 100644
index 0000000..d9a1681
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/TIME.H
@@ -0,0 +1,75 @@
1/***
2*time.h - definitions/declarations for time routines
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file has declarations of time routines and defines
8* the structure returned by the localtime and gmtime routines and
9* used by asctime.
10* [ANSI/System V]
11*
12*******************************************************************************/
13
14
15#ifndef NO_EXT_KEYS /* extensions enabled */
16 #define _CDECL cdecl
17 #define _NEAR near
18#else /* extensions not enabled */
19 #define _CDECL
20 #define _NEAR
21#endif /* NO_EXT_KEYS */
22
23
24/* define the implementation defined time type */
25
26#ifndef _TIME_T_DEFINED
27typedef long time_t; /* time value */
28#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
29#endif
30
31#ifndef _CLOCK_T_DEFINED
32typedef long clock_t;
33#define _CLOCK_T_DEFINED
34#endif
35
36#ifndef _TM_DEFINED
37struct tm {
38 int tm_sec; /* seconds after the minute - [0,59] */
39 int tm_min; /* minutes after the hour - [0,59] */
40 int tm_hour; /* hours since midnight - [0,23] */
41 int tm_mday; /* day of the month - [1,31] */
42 int tm_mon; /* months since January - [0,11] */
43 int tm_year; /* years since 1900 */
44 int tm_wday; /* days since Sunday - [0,6] */
45 int tm_yday; /* days since January 1 - [0,365] */
46 int tm_isdst; /* daylight savings time flag */
47 };
48#define _TM_DEFINED
49#endif
50
51#define CLK_TCK 1000
52
53
54/* extern declarations for the global variables used by the ctime family of
55 * routines.
56 */
57
58extern int _NEAR _CDECL daylight; /* non-zero if daylight savings time is used */
59extern long _NEAR _CDECL timezone; /* difference in seconds between GMT and local time */
60extern char * _NEAR _CDECL tzname[2]; /* standard/daylight savings time zone names */
61
62
63/* function prototypes */
64
65char * _CDECL asctime(const struct tm *);
66char * _CDECL ctime(const time_t *);
67clock_t _CDECL clock(void);
68double _CDECL difftime(time_t, time_t);
69struct tm * _CDECL gmtime(const time_t *);
70struct tm * _CDECL localtime(const time_t *);
71time_t _CDECL mktime(struct tm *);
72char * _CDECL _strdate(char *);
73char * _CDECL _strtime(char *);
74time_t _CDECL time(time_t *);
75void _CDECL tzset(void);
diff --git a/v4.0/src/TOOLS/BLD/INC/VARARGS.H b/v4.0/src/TOOLS/BLD/INC/VARARGS.H
new file mode 100644
index 0000000..e96d04e
--- /dev/null
+++ b/v4.0/src/TOOLS/BLD/INC/VARARGS.H
@@ -0,0 +1,21 @@
1/***
2*varargs.h - XENIX style macros for variable argument functions
3*
4* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
5*
6*Purpose:
7* This file defines XENIX style macros for accessing arguments of a
8* function which takes a variable number of arguments.
9* [System V]
10*
11*******************************************************************************/
12
13#ifndef _VA_LIST_DEFINED
14typedef char *va_list;
15#define _VA_LIST_DEFINED
16#endif
17
18#define va_dcl va_list va_alist;
19#define va_start(ap) ap = (va_list)&va_alist
20#define va_arg(ap,t) ((t *)(ap += sizeof(t)))[-1]
21#define va_end(ap) ap = NULL