update for HEAD-2003021201
[reactos.git] / include / msvcrt / direct.h
1 /*
2  * direct.h
3  *
4  * Functions for manipulating paths and directories (included from io.h)
5  * plus functions for setting the current drive.
6  *
7  * This file is part of the Mingw32 package.
8  *
9  * Contributors:
10  *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11  *
12  *  THIS SOFTWARE IS NOT COPYRIGHTED
13  *
14  *  This source code is offered for use in the public domain. You may
15  *  use, modify or distribute it freely.
16  *
17  *  This code is distributed in the hope that it will be useful but
18  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
19  *  DISCLAIMED. This includes but is not limited to warranties of
20  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21  *
22  * $Revision$
23  * $Author$
24  * $Date$
25  *
26  */
27
28 #ifndef _DIRECT_H_
29 #define _DIRECT_H_
30
31 #ifndef _WCHAR_T_
32 typedef unsigned short wchar_t;
33 #define _WCHAR_T_
34 #endif
35
36 #ifndef _SIZE_T_
37 typedef unsigned int size_t;
38 #define _SIZE_T_
39 #endif
40
41 #ifdef  __cplusplus
42 extern "C" {
43 #endif
44
45 struct _diskfree_t {
46     unsigned short total_clusters;
47     unsigned short avail_clusters;
48     unsigned short sectors_per_cluster;
49     unsigned short bytes_per_sector;
50 };
51
52 int _getdrive(void);
53 int _chdrive(int);
54 char* _getcwd(char*, int);
55
56 unsigned int _getdiskfree(unsigned int, struct _diskfree_t*);
57
58 int _chdir(const char*);
59 int _mkdir(const char*);
60 int _rmdir(const char*);
61
62 #define chdir  _chdir
63 #define getcwd _getcwd
64 #define mkdir  _mkdir
65 #define rmdir  _rmdir
66
67 char* _getdcwd(int nDrive, char* caBuffer, int nBufLen);
68
69 wchar_t* _wgetcwd(wchar_t *buffer, int maxlen);
70 wchar_t* _wgetdcwd(int nDrive, wchar_t* caBuffer, int nBufLen);
71
72 int _wchdir(const wchar_t* _path);
73 int _wmkdir(const wchar_t* _path);
74 int _wrmdir(const wchar_t* _path);
75
76 #ifdef  __cplusplus
77 }
78 #endif
79
80 #endif  /* Not _DIRECT_H_ */
81