direct.h 1.54 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * Path and directory definitions
 *
 * Derived from the mingw header written by Colin Peters.
 * Modified for Wine use by Jon Griffiths and Francois Gouget.
 * This file is in the public domain.
 */
#ifndef __WINE_DIRECT_H
#define __WINE_DIRECT_H
10 11

#include <crtdefs.h>
12

13 14
#include <pshpack8.h>

15 16 17 18
#ifdef __cplusplus
extern "C" {
#endif

19 20 21
#ifndef _DISKFREE_T_DEFINED
#define _DISKFREE_T_DEFINED
struct _diskfree_t {
22 23 24 25 26
  unsigned int total_clusters;
  unsigned int avail_clusters;
  unsigned int sectors_per_cluster;
  unsigned int bytes_per_sector;
};
27
#endif /* _DISKFREE_T_DEFINED */
28

29 30 31 32 33
int           __cdecl _chdir(const char*);
int           __cdecl _chdrive(int);
char*         __cdecl _getcwd(char*,int);
char*         __cdecl _getdcwd(int,char*,int);
int           __cdecl _getdrive(void);
34
__msvcrt_ulong __cdecl _getdrives(void);
35 36
int           __cdecl _mkdir(const char*);
int           __cdecl _rmdir(const char*);
37

38 39
#ifndef _WDIRECT_DEFINED
#define _WDIRECT_DEFINED
40 41 42 43 44
int      __cdecl _wchdir(const wchar_t*);
wchar_t* __cdecl _wgetcwd(wchar_t*,int);
wchar_t* __cdecl _wgetdcwd(int,wchar_t*,int);
int      __cdecl _wmkdir(const wchar_t*);
int      __cdecl _wrmdir(const wchar_t*);
45
#endif /* _WDIRECT_DEFINED */
46 47 48 49 50 51

#ifdef __cplusplus
}
#endif


52 53 54 55
static inline int chdir(const char* newdir) { return _chdir(newdir); }
static inline char* getcwd(char * buf, int size) { return _getcwd(buf, size); }
static inline int mkdir(const char* newdir) { return _mkdir(newdir); }
static inline int rmdir(const char* dir) { return _rmdir(dir); }
56

57 58
#include <poppack.h>

59
#endif /* __WINE_DIRECT_H */