Commit | Line | Data |
---|---|---|
d14a8a06 SC |
1 | #include <errno.h> |
2 | #include <sys/types.h> | |
3 | #include <unistd.h> | |
4 | ||
5 | #include <string.h> | |
6 | #include <fcntl.h> | |
7 | #include <sys/stat.h> | |
8 | #include <time.h> | |
9 | #include <ctype.h> | |
10 | ||
11 | #include <stdio.h> | |
12 | ||
13 | #ifndef DONTDECLARE_MALLOC | |
14 | extern PROTO(PTR,malloc,(unsigned)); | |
15 | extern PROTO(PTR ,realloc, (PTR, unsigned)); | |
16 | #endif | |
17 | extern PROTO(int, abort,(void)); | |
18 | extern PROTO(int, free,(PTR)); | |
19 | extern PROTO(void, bcopy,(char*,char*,int)); | |
20 | extern PROTO(void, exit,(int)); | |
21 | extern int strtol(); | |
22 | extern PROTO(void, bzero,(char *, int)); | |
23 | ||
24 | /* EXACT TYPES */ | |
25 | typedef char int8e_type; | |
26 | typedef unsigned char uint8e_type; | |
27 | typedef short int16e_type; | |
28 | typedef unsigned short uint16e_type; | |
29 | typedef int int32e_type; | |
30 | typedef unsigned int uint32e_type; | |
31 | ||
32 | /* CORRECT SIZE OR GREATER */ | |
33 | typedef char int8_type; | |
34 | typedef unsigned char uint8_type; | |
35 | typedef short int16_type; | |
36 | typedef unsigned short uint16_type; | |
37 | typedef int int32_type; | |
38 | typedef unsigned int uint32_type; | |
33b6c262 SC |
39 | /* Macros for the 'type' part of an fopen, freopen or fdopen. |
40 | <Read|Write>[Update]<Binary file><text file> | |
41 | */ | |
42 | #define FOPEN_RB "r" | |
43 | #define FOPEN_WB "w" | |
44 | #define FOPEN_AB "a" | |
45 | #define FOPEN_RUB "r+" | |
46 | #define FOPEN_WUB "w+" | |
47 | #define FOPEN_AUB "a+" | |
48 | #define FOPEN_RT "r" | |
49 | #define FOPEN_WT "w" | |
50 | #define FOPEN_AT "a" | |
51 | #define FOPEN_RUT "r+" | |
52 | #define FOPEN_WUT "w+" | |
53 | #define FOPEN_AUT "a+" |