home *** CD-ROM | disk | FTP | other *** search
/ Total Destruction / Total_Destruction.iso / addons / Lccwin32.exe / Lccwin32 / lccpub / include / stdio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-24  |  4.0 KB  |  199 lines

  1. #ifndef _INC_STDIO
  2. #define _INC_STDIO
  3.  
  4. #ifndef _SIZE_T_DEFINED
  5. typedef unsigned int size_t;
  6. #define _SIZE_T_DEFINED
  7. #endif
  8.  
  9. #ifndef _WCHAR_T_DEFINED
  10. typedef unsigned short wchar_t;
  11. #define _WCHAR_T_DEFINED
  12. #endif
  13.  
  14.  
  15. #ifndef _WCTYPE_T_DEFINED
  16. typedef wchar_t wint_t;
  17. typedef wchar_t wctype_t;
  18. #define _WCTYPE_T_DEFINED
  19. #endif
  20.  
  21.  
  22. #ifndef _VA_LIST_DEFINED
  23. typedef char *    va_list;
  24. #define _VA_LIST_DEFINED
  25. #endif
  26.  
  27.  
  28. #define BUFSIZ    512
  29.  
  30.  
  31. /*
  32.  * Number of supported streams. _NFILE is confusing and obsolete, but
  33.  * supported anyway for backwards compatibility.
  34.  */
  35. #define _NSTREAM_   20
  36.  
  37. #define EOF    (-1)
  38.  
  39.  
  40. #ifndef _FILE_DEFINED
  41. struct _iobuf {
  42.     char *_ptr;
  43.     int   _cnt;
  44.     char *_base;
  45.     int   _flag;
  46.     int   _file;
  47.     int   _charbuf;
  48.     int   _bufsiz;
  49.     char *_tmpfname;
  50.     };
  51. typedef struct _iobuf FILE;
  52. #define _FILE_DEFINED
  53. #endif
  54.  
  55.  
  56. /* Directory where temporary files may be created. */
  57.  
  58. #define _P_tmpdir   "\\"
  59. #define _wP_tmpdir  L"\\"
  60.  
  61.  
  62. #define L_tmpnam sizeof(_P_tmpdir)+12
  63.  
  64. /* Seek method constants */
  65.  
  66. #define SEEK_CUR    1
  67. #define SEEK_END    2
  68. #define SEEK_SET    0
  69.  
  70.  
  71. #define FILENAME_MAX    260
  72. #define FOPEN_MAX    20
  73. #define _SYS_OPEN    20
  74. #define TMP_MAX     32767
  75.  
  76.  
  77. /* Define NULL pointer value */
  78.  
  79. #ifndef NULL
  80. #define NULL    ((void *)0)
  81. #endif
  82.  
  83.  
  84. /* Declare _iob[] array */
  85.  
  86. extern FILE *_iob;
  87.  
  88.  
  89. /* Define file position type */
  90.  
  91. #ifndef _FPOS_T_DEFINED
  92. typedef long fpos_t;
  93. #define _FPOS_T_DEFINED
  94. #endif
  95.  
  96. #if 0
  97. #define stdin  (&_iob[0])
  98. #define stdout (&_iob[1])
  99. #define stderr (&_iob[2])
  100. #else
  101. extern FILE *stdin;
  102. extern FILE *stdout;
  103. extern FILE *stderr;
  104. #endif
  105.  
  106. #define _IOREAD     0x0001
  107. #define _IOWRT        0x0002
  108.  
  109. #define _IOFBF        0x0000
  110. #define _IOLBF        0x0040
  111. #define _IONBF        0x0004
  112.  
  113. #define _IOMYBUF    0x0008
  114. #define _IOEOF        0x0010
  115. #define _IOERR        0x0020
  116. #define _IOSTRG     0x0040
  117. #define _IORW        0x0080
  118. #define    _IOAPPEND    0x0200
  119.  
  120.  
  121. /* Function prototypes */
  122.  
  123.  
  124. int _filbuf(FILE *);
  125. int flsbuf(int, FILE *);
  126.  
  127. FILE * _fsopen(const char *, const char *, int);
  128.  
  129. void clearerr(FILE *);
  130. int fclose(FILE *);
  131. int _fcloseall(void);
  132.  
  133. FILE * fdopen(int, const char *);
  134.  
  135. int feof(FILE *);
  136. int ferror(FILE *);
  137. int fflush(FILE *);
  138. int fgetc(FILE *);
  139. int _fgetchar(void);
  140. int fgetpos(FILE *, fpos_t *);
  141. char * fgets(char *, int, FILE *);
  142.  
  143. int fileno(FILE *);
  144. #define _fileno fileno
  145.  
  146. int _flushall(void);
  147. FILE * fopen(const char *, const char *);
  148. int fprintf(FILE *, const char *, ...);
  149. int fputc(int, FILE *);
  150. int _fputchar(int);
  151. int fputs(const char *, FILE *);
  152. size_t fread(void *, size_t, size_t, FILE *);
  153. FILE * freopen(const char *, const char *, FILE *);
  154. int fscanf(FILE *, const char *, ...);
  155. int fsetpos(FILE *, const fpos_t *);
  156. int fseek(FILE *, long, int);
  157. long ftell(FILE *);
  158. size_t fwrite(const void *, size_t, size_t, FILE *);
  159. int getc(FILE *);
  160. int getchar(void);
  161. char * gets(char *);
  162. int _getw(FILE *);
  163. int _pclose(FILE *);
  164. #define _pclose pclose
  165. FILE * popen(const char *, const char *);
  166. #define _popen popen
  167. int printf(const char *, ...);
  168. int putc(int, FILE *);
  169. int putchar(int);
  170. int puts(const char *);
  171. int _putw(int, FILE *);
  172. int remove(char *);
  173. int rename(char *, char *);
  174. void rewind(FILE *);
  175. int _rmtmp(void);
  176. int scanf(const char *, ...);
  177. void setbuf(FILE *, char *);
  178. int setvbuf(FILE *, char *, int, size_t);
  179. int _snprintf(char *, size_t, const char *, ...);
  180. int sprintf(char *, const char *, ...);
  181. int sscanf(const char *, const char *, ...);
  182. char * _tempnam(char *, char *);
  183. FILE * tmpfile(void);
  184. char * tmpnam(char *);
  185. int ungetc(int, FILE *);
  186. int _unlink(char *);
  187. #define unlink _unlink
  188. int vfprintf(FILE *, const char *, va_list);
  189. int vprintf(const char *, va_list);
  190. int _vsnprintf(char *, size_t, const char *, va_list);
  191. int vsprintf(char *, const char *, va_list);
  192. #include <_syslist.h>
  193. #ifndef STD_INPUT_HANDLE
  194. #define STD_INPUT_HANDLE   ((unsigned long)-10)
  195. #define STD_OUTPUT_HANDLE ((unsigned long)-11)
  196. #define STD_ERROR_HANDLE  ((unsigned long)-12)
  197. #endif
  198. #endif    /* _INC_STDIO */
  199.