Atlas - STDIO.H
Home / ext / JunkDrawer / DOS / BuildTools / v4.0 / BLD / INC Lines: 1 | Size: 4335 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]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 166[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.