Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenio.h
Go to the documentation of this file.
00001 00007 #ifndef _IO_H_ 00008 #define _IO_H_ 00009 00010 #include <crtdefs.h> 00011 #include <string.h> 00012 00013 #pragma pack(push,_CRT_PACKING) 00014 00015 #ifndef _POSIX_ 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 _CRTIMP char* __cdecl _getcwd (char*, int); 00022 #ifndef _FSIZE_T_DEFINED 00023 typedef unsigned long _fsize_t; 00024 #define _FSIZE_T_DEFINED 00025 #endif 00026 00027 #ifndef _FINDDATA_T_DEFINED 00028 00029 struct _finddata_t { 00030 unsigned attrib; 00031 time_t time_create; 00032 time_t time_access; 00033 time_t time_write; 00034 _fsize_t size; 00035 char name[260]; 00036 }; 00037 00038 struct _finddata32_t { 00039 unsigned attrib; 00040 __time32_t time_create; 00041 __time32_t time_access; 00042 __time32_t time_write; 00043 _fsize_t size; 00044 char name[260]; 00045 }; 00046 00047 #if _INTEGRAL_MAX_BITS >= 64 00048 00049 struct _finddatai64_t { 00050 unsigned attrib; 00051 time_t time_create; 00052 time_t time_access; 00053 time_t time_write; 00054 __MINGW_EXTENSION __int64 size; 00055 char name[260]; 00056 }; 00057 00058 struct _finddata32i64_t { 00059 unsigned attrib; 00060 __time32_t time_create; 00061 __time32_t time_access; 00062 __time32_t time_write; 00063 __MINGW_EXTENSION __int64 size; 00064 char name[260]; 00065 }; 00066 00067 struct _finddata64i32_t { 00068 unsigned attrib; 00069 __time64_t time_create; 00070 __time64_t time_access; 00071 __time64_t time_write; 00072 _fsize_t size; 00073 char name[260]; 00074 }; 00075 00076 struct __finddata64_t { 00077 unsigned attrib; 00078 __time64_t time_create; 00079 __time64_t time_access; 00080 __time64_t time_write; 00081 __MINGW_EXTENSION __int64 size; 00082 char name[260]; 00083 }; 00084 #endif /* _INTEGRAL_MAX_BITS >= 64 */ 00085 00086 #define _FINDDATA_T_DEFINED 00087 #endif 00088 00089 #ifndef _WFINDDATA_T_DEFINED 00090 00091 struct _wfinddata_t { 00092 unsigned attrib; 00093 time_t time_create; 00094 time_t time_access; 00095 time_t time_write; 00096 _fsize_t size; 00097 wchar_t name[260]; 00098 }; 00099 00100 struct _wfinddata32_t { 00101 unsigned attrib; 00102 __time32_t time_create; 00103 __time32_t time_access; 00104 __time32_t time_write; 00105 _fsize_t size; 00106 wchar_t name[260]; 00107 }; 00108 00109 #if _INTEGRAL_MAX_BITS >= 64 00110 00111 struct _wfinddatai64_t { 00112 unsigned attrib; 00113 time_t time_create; 00114 time_t time_access; 00115 time_t time_write; 00116 __MINGW_EXTENSION __int64 size; 00117 wchar_t name[260]; 00118 }; 00119 00120 struct _wfinddata32i64_t { 00121 unsigned attrib; 00122 __time32_t time_create; 00123 __time32_t time_access; 00124 __time32_t time_write; 00125 __MINGW_EXTENSION __int64 size; 00126 wchar_t name[260]; 00127 }; 00128 00129 struct _wfinddata64i32_t { 00130 unsigned attrib; 00131 __time64_t time_create; 00132 __time64_t time_access; 00133 __time64_t time_write; 00134 _fsize_t size; 00135 wchar_t name[260]; 00136 }; 00137 00138 struct _wfinddata64_t { 00139 unsigned attrib; 00140 __time64_t time_create; 00141 __time64_t time_access; 00142 __time64_t time_write; 00143 __MINGW_EXTENSION __int64 size; 00144 wchar_t name[260]; 00145 }; 00146 #endif 00147 00148 #define _WFINDDATA_T_DEFINED 00149 #endif 00150 00151 #define _A_NORMAL 0x00 00152 #define _A_RDONLY 0x01 00153 #define _A_HIDDEN 0x02 00154 #define _A_SYSTEM 0x04 00155 #define _A_SUBDIR 0x10 00156 #define _A_ARCH 0x20 00157 00158 /* Some defines for _access nAccessMode (MS doesn't define them, but 00159 * it doesn't seem to hurt to add them). */ 00160 #define F_OK 0 /* Check for file existence */ 00161 #define X_OK 1 /* Check for execute permission. */ 00162 #define W_OK 2 /* Check for write permission */ 00163 #define R_OK 4 /* Check for read permission */ 00164 00165 _CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode); 00166 _CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode); 00167 _CRTIMP int __cdecl _chsize(int _FileHandle,long _Size); 00168 _CRTIMP int __cdecl _close(int _FileHandle); 00169 _CRTIMP int __cdecl _commit(int _FileHandle); 00170 _CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode); 00171 _CRTIMP int __cdecl _dup(int _FileHandle); 00172 _CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst); 00173 _CRTIMP int __cdecl _eof(int _FileHandle); 00174 _CRTIMP long __cdecl _filelength(int _FileHandle); 00175 _CRTIMP intptr_t __cdecl _findfirst(const char *_Filename, struct _finddata_t *_FindData); 00176 _CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData); 00177 _CRTIMP int __cdecl _findnext(intptr_t _FindHandle,struct _finddata_t *_FindData); 00178 _CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData); 00179 _CRTIMP int __cdecl _findclose(intptr_t _FindHandle); 00180 _CRTIMP int __cdecl _isatty(int _FileHandle); 00181 _CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes); 00182 _CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin); 00183 _CRTIMP char *__cdecl _mktemp(char *_TemplateName); 00184 _CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode); 00185 _CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount); 00186 00187 #ifndef _CRT_DIRECTORY_DEFINED 00188 #define _CRT_DIRECTORY_DEFINED 00189 int __cdecl remove(const char *_Filename); 00190 int __cdecl rename(const char *_OldFilename,const char *_NewFilename); 00191 _CRTIMP int __cdecl _unlink(const char *_Filename); 00192 #ifndef NO_OLDNAMES 00193 _CRTIMP int __cdecl unlink(const char *_Filename); 00194 #endif 00195 #endif 00196 00197 _CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode); 00198 _CRTIMP long __cdecl _tell(int _FileHandle); 00199 _CRTIMP int __cdecl _umask(int _Mode); 00200 _CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount); 00201 00202 #if _INTEGRAL_MAX_BITS >= 64 00203 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle); 00204 _CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData); 00205 _CRTIMP intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData); 00206 _CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData); 00207 _CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData); 00208 _CRTIMP int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData); 00209 _CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData); 00210 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin); 00211 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _telli64(int _FileHandle); 00212 #ifdef __cplusplus 00213 #include <string.h> 00214 #endif 00215 __CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData) 00216 { 00217 struct __finddata64_t fd; 00218 intptr_t ret = _findfirst64(_Filename,&fd); 00219 _FindData->attrib=fd.attrib; 00220 _FindData->time_create=fd.time_create; 00221 _FindData->time_access=fd.time_access; 00222 _FindData->time_write=fd.time_write; 00223 _FindData->size=(_fsize_t) fd.size; 00224 strncpy(_FindData->name,fd.name,260); 00225 return ret; 00226 } 00227 __CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData) 00228 { 00229 struct __finddata64_t fd; 00230 int ret = _findnext64(_FindHandle,&fd); 00231 _FindData->attrib=fd.attrib; 00232 _FindData->time_create=fd.time_create; 00233 _FindData->time_access=fd.time_access; 00234 _FindData->time_write=fd.time_write; 00235 _FindData->size=(_fsize_t) fd.size; 00236 strncpy(_FindData->name,fd.name,260); 00237 return ret; 00238 } 00239 #endif 00240 00241 #ifndef NO_OLDNAMES 00242 #ifndef _UWIN 00243 _CRTIMP int __cdecl chdir (const char *); 00244 _CRTIMP char *__cdecl getcwd (char *, int); 00245 _CRTIMP int __cdecl mkdir (const char *); 00246 _CRTIMP char *__cdecl mktemp(char *); 00247 _CRTIMP int __cdecl rmdir (const char*); 00248 _CRTIMP int __cdecl chmod (const char *, int); 00249 #endif /* _UWIN */ 00250 #endif /* Not NO_OLDNAMES */ 00251 00252 _CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode); 00253 00254 #ifndef __cplusplus 00255 _CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...); 00256 _CRTIMP int __cdecl _sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...); 00257 #else 00258 extern "C++" _CRTIMP int __cdecl _open(const char *_Filename,int _Openflag,int _PermissionMode = 0); 00259 extern "C++" _CRTIMP int __cdecl _sopen(const char *_Filename,int _Openflag,int _ShareFlag,int _PermissionMode = 0); 00260 #endif 00261 00262 #ifndef _WIO_DEFINED 00263 #define _WIO_DEFINED 00264 _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode); 00265 _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode); 00266 _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode); 00267 _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData); 00268 _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData); 00269 _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename); 00270 _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename); 00271 _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName); 00272 00273 #if _INTEGRAL_MAX_BITS >= 64 00274 _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData); 00275 intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData); 00276 _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData); 00277 _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData); 00278 int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData); 00279 _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData); 00280 #endif 00281 00282 _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag); 00283 00284 #if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64)) 00285 _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...); 00286 _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...); 00287 #else 00288 extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0); 00289 extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0); 00290 #endif 00291 00292 #endif /* !_WIO_DEFINED */ 00293 00294 int __cdecl __lock_fhandle(int _Filehandle); 00295 void __cdecl _unlock_fhandle(int _Filehandle); 00296 _CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle); 00297 _CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags); 00298 00299 #ifndef NO_OLDNAMES 00300 _CRTIMP int __cdecl access(const char *_Filename,int _AccessMode); 00301 _CRTIMP int __cdecl chmod(const char *_Filename,int _AccessMode); 00302 _CRTIMP int __cdecl chsize(int _FileHandle,long _Size); 00303 _CRTIMP int __cdecl close(int _FileHandle); 00304 _CRTIMP int __cdecl creat(const char *_Filename,int _PermissionMode); 00305 _CRTIMP int __cdecl dup(int _FileHandle); 00306 _CRTIMP int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst); 00307 _CRTIMP int __cdecl eof(int _FileHandle); 00308 _CRTIMP long __cdecl filelength(int _FileHandle); 00309 _CRTIMP int __cdecl isatty(int _FileHandle); 00310 _CRTIMP int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes); 00311 _CRTIMP long __cdecl lseek(int _FileHandle,long _Offset,int _Origin); 00312 _CRTIMP char *__cdecl mktemp(char *_TemplateName); 00313 _CRTIMP int __cdecl open(const char *_Filename,int _OpenFlag,...); 00314 _CRTIMP int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount); 00315 _CRTIMP int __cdecl setmode(int _FileHandle,int _Mode); 00316 _CRTIMP int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...); 00317 _CRTIMP long __cdecl tell(int _FileHandle); 00318 _CRTIMP int __cdecl umask(int _Mode); 00319 _CRTIMP int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount); 00320 #endif 00321 00322 #ifdef __cplusplus 00323 } 00324 #endif 00325 #endif 00326 00327 #ifdef __cplusplus 00328 extern "C" { 00329 #endif 00330 00331 /* Misc stuff */ 00332 char *getlogin(void); 00333 #ifdef __USE_MINGW_ALARM 00334 unsigned int alarm(unsigned int seconds); 00335 #endif 00336 00337 #ifdef __USE_MINGW_ACCESS 00338 /* Old versions of MSVCRT access() just ignored X_OK, while the version 00339 shipped with Vista, returns an error code. This will restore the 00340 old behaviour */ 00341 static inline int __mingw_access (const char *__fname, int __mode) { 00342 return _access (__fname, __mode & ~X_OK); 00343 } 00344 00345 #define access(__f,__m) __mingw_access (__f, __m) 00346 #endif 00347 00348 00349 #ifdef __cplusplus 00350 } 00351 #endif 00352 00353 00354 #pragma pack(pop) 00355 00356 #include <sec_api/io_s.h> 00357 00358 #endif /* End _IO_H_ */ 00359 Generated on Wed May 23 2012 04:27:50 for ReactOS by
1.7.6.1
|