mingw-5.1.4/win32/include/direct.h
changeset 0 76b1f169d9fe
equal deleted inserted replaced
-1:000000000000 0:76b1f169d9fe
       
     1 /*
       
     2  * direct.h
       
     3  * This file has no copyright assigned and is placed in the Public Domain.
       
     4  * This file is a part of the mingw-runtime package.
       
     5  * No warranty is given; refer to the file DISCLAIMER within the package.
       
     6  *
       
     7  * Functions for manipulating paths and directories (included from io.h)
       
     8  * plus functions for setting the current drive.
       
     9  *
       
    10  */
       
    11 #ifndef	_DIRECT_H_
       
    12 #define	_DIRECT_H_
       
    13 
       
    14 /* All the headers include this file. */
       
    15 #include <_mingw.h>
       
    16 
       
    17 #define __need_wchar_t
       
    18 #ifndef RC_INVOKED
       
    19 #include <stddef.h>
       
    20 #endif	/* Not RC_INVOKED */
       
    21 
       
    22 #include <io.h>
       
    23 
       
    24 #ifndef RC_INVOKED
       
    25 
       
    26 #ifdef	__cplusplus
       
    27 extern "C" {
       
    28 #endif
       
    29 
       
    30 #ifndef _DISKFREE_T_DEFINED
       
    31 /* needed by _getdiskfree (also in dos.h) */
       
    32 struct _diskfree_t {
       
    33 	unsigned total_clusters;
       
    34 	unsigned avail_clusters;
       
    35 	unsigned sectors_per_cluster;
       
    36 	unsigned bytes_per_sector;
       
    37 };
       
    38 #define _DISKFREE_T_DEFINED
       
    39 #endif  
       
    40 
       
    41 /*
       
    42  * You really shouldn't be using these. Use the Win32 API functions instead.
       
    43  * However, it does make it easier to port older code.
       
    44  */
       
    45 _CRTIMP int __cdecl __MINGW_NOTHROW _getdrive (void);
       
    46 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW _getdrives(void);
       
    47 _CRTIMP int __cdecl __MINGW_NOTHROW _chdrive (int);
       
    48 _CRTIMP char* __cdecl __MINGW_NOTHROW _getdcwd (int, char*, int);
       
    49 _CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfree_t *);
       
    50 
       
    51 #ifndef	_NO_OLDNAMES
       
    52 # define diskfree_t _diskfree_t
       
    53 #endif
       
    54 
       
    55 #ifndef _WDIRECT_DEFINED
       
    56 /* wide character versions. Also in wchar.h */
       
    57 #ifdef __MSVCRT__ 
       
    58 _CRTIMP int __cdecl __MINGW_NOTHROW _wchdir(const wchar_t*);
       
    59 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd(wchar_t*, int);
       
    60 _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd(int, wchar_t*, int);
       
    61 _CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir(const wchar_t*);
       
    62 _CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir(const wchar_t*);
       
    63 #endif	/* __MSVCRT__ */
       
    64 #define _WDIRECT_DEFINED
       
    65 #endif
       
    66 
       
    67 #ifdef	__cplusplus
       
    68 }
       
    69 #endif
       
    70 
       
    71 #endif	/* Not RC_INVOKED */
       
    72 
       
    73 #endif	/* Not _DIRECT_H_ */