|
|
1.1 root 1: /***
2: *io.h - declarations for low-level file handling and I/O functions
3: *
1.1.1.4 ! root 4: * Copyright (c) 1985-1993, Microsoft Corporation. All rights reserved.
1.1 root 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: #ifndef _INC_IO
13:
1.1.1.3 root 14: #ifndef _POSIX_
15:
1.1 root 16: #ifdef __cplusplus
17: extern "C" {
18: #endif
19:
20:
1.1.1.3 root 21: /*
22: * Conditional macro definition for function calling type and variable type
23: * qualifiers.
24: */
25: #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
26:
27: /*
28: * Definitions for MS C8-32 (386/486) compiler
29: */
30: #define _CRTAPI1 __cdecl
31: #define _CRTAPI2 __cdecl
32:
33: #else
34:
35: /*
36: * Other compilers (e.g., MIPS)
37: */
38: #define _CRTAPI1
39: #define _CRTAPI2
40:
1.1.1.2 root 41: #endif
1.1 root 42:
1.1.1.3 root 43:
1.1 root 44: #ifndef _TIME_T_DEFINED
45: typedef long time_t; /* time value */
46: #define _TIME_T_DEFINED /* avoid multiple def's of time_t */
47: #endif
48:
49: #ifndef _FSIZE_T_DEFINED
1.1.1.3 root 50: typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
1.1 root 51: #define _FSIZE_T_DEFINED
52: #endif
53:
54: #ifndef _FINDDATA_T_DEFINED
55:
56: struct _finddata_t {
57: unsigned attrib;
1.1.1.3 root 58: time_t time_create; /* -1 for FAT file systems */
59: time_t time_access; /* -1 for FAT file systems */
1.1 root 60: time_t time_write;
61: _fsize_t size;
1.1.1.4 ! root 62: char name[260];
1.1 root 63: };
64:
65: #define _FINDDATA_T_DEFINED
66:
67: #endif
68:
69: /* File attribute constants for _findfirst() */
70:
71: #define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
72: #define _A_RDONLY 0x01 /* Read only file */
73: #define _A_HIDDEN 0x02 /* Hidden file */
74: #define _A_SYSTEM 0x04 /* System file */
75: #define _A_SUBDIR 0x10 /* Subdirectory */
76: #define _A_ARCH 0x20 /* Archive file */
77:
78: /* function prototypes */
1.1.1.3 root 79:
80: int _CRTAPI1 _access(const char *, int);
81: int _CRTAPI1 _chmod(const char *, int);
82: int _CRTAPI1 _chsize(int, long);
83: int _CRTAPI1 _close(int);
84: int _CRTAPI1 _commit(int);
85: int _CRTAPI1 _creat(const char *, int);
86: int _CRTAPI1 _dup(int);
87: int _CRTAPI1 _dup2(int, int);
88: int _CRTAPI1 _eof(int);
89: long _CRTAPI1 _filelength(int);
90: long _CRTAPI1 _findfirst(char *, struct _finddata_t *);
91: int _CRTAPI1 _findnext(long, struct _finddata_t *);
92: int _CRTAPI1 _findclose(long);
93: int _CRTAPI1 _isatty(int);
94: int _CRTAPI1 _locking(int, int, long);
95: long _CRTAPI1 _lseek(int, long, int);
96: char * _CRTAPI1 _mktemp(char *);
97: int _CRTAPI2 _open(const char *, int, ...);
98: int _CRTAPI1 _pipe(int *, unsigned int, int);
99: int _CRTAPI1 _read(int, void *, unsigned int);
100: int _CRTAPI1 remove(const char *);
101: int _CRTAPI1 rename(const char *, const char *);
102: int _CRTAPI1 _setmode(int, int);
103: int _CRTAPI2 _sopen(const char *, int, int, ...);
104: long _CRTAPI1 _tell(int);
105: int _CRTAPI1 _umask(int);
106: int _CRTAPI1 _unlink(const char *);
107: int _CRTAPI1 _write(int, const void *, unsigned int);
1.1 root 108:
109:
1.1.1.3 root 110: long _CRTAPI1 _get_osfhandle(int);
111: int _CRTAPI1 _open_osfhandle(long, int);
1.1 root 112:
1.1.1.3 root 113: #if !(__STDC__ || defined(__cplusplus))
1.1 root 114: /* Non-ANSI names for compatibility */
115: #define access _access
116: #define chmod _chmod
117: #define chsize _chsize
118: #define close _close
119: #define creat _creat
120: #define dup _dup
121: #define dup2 _dup2
122: #define eof _eof
123: #define filelength _filelength
124: #define isatty _isatty
125: #define locking _locking
126: #define lseek _lseek
127: #define mktemp _mktemp
128: #define open _open
129: #define read _read
130: #define setmode _setmode
131: #define sopen _sopen
132: #define tell _tell
133: #define umask _umask
134: #define unlink _unlink
135: #define write _write
136: #endif /* __STDC__ */
137:
138: #ifdef __cplusplus
139: }
140: #endif
141:
1.1.1.3 root 142:
143: #endif /* _POSIX_ */
144:
1.1 root 145: #define _INC_IO
146: #endif /* _INC_IO */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.