5638c652c03265e78e5035cf92aa933f713b949c
[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 int _getdrive(void)
9 {
10     char Buffer[MAX_PATH];
11
12     if (cur_drive == 0) {
13         GetCurrentDirectoryA(MAX_PATH, Buffer);
14         cur_drive = toupper(Buffer[0] - '@');
15     }
16     return cur_drive;
17 }
18
19 unsigned long _getdrives(void)
20 {
21     //fixme get logical drives
22     //return GetLogicalDrives();
23     return 5;  // drive A and C
24 }