19171f18ff70171b4c3f4934e3724354df4944d3
[reactos.git] / lib / msvcrt / direct / getdrive.c
1 #include <windows.h>
2 #include <msvcrt/ctype.h>
3 #include <msvcrt/direct.h>
4
5
6 extern int cur_drive;
7
8 /*
9  * @implemented
10  */
11 int _getdrive(void)
12 {
13     char Buffer[MAX_PATH];
14
15     if (cur_drive == 0) {
16         GetCurrentDirectoryA(MAX_PATH, Buffer);
17         cur_drive = toupper(Buffer[0] - '@');
18     }
19     return cur_drive;
20 }
21
22 /*
23  * @unimplemented
24  */
25 unsigned long _getdrives(void)
26 {
27     //fixme get logical drives
28     //return GetLogicalDrives();
29     return 5;  // drive A and C
30 }