mirror of
https://github.com/reactos/reactos.git
synced 2025-08-10 20:45:30 +00:00

- TSVN choked repeatedly when attempting to merge ~9000 revs into the branch (tried 3 times on 2 different computers) - If someone wants to delete aicom-network-fixes, they are welcome to - Lesson learned: Letting a branch get thousands of revs out of date is a horrible idea svn path=/branches/aicom-network-branch/; revision=44353
35 lines
589 B
C
35 lines
589 B
C
#include <precomp.h>
|
|
#include <ctype.h>
|
|
#include <direct.h>
|
|
|
|
|
|
/*
|
|
* @implemented
|
|
*
|
|
* _getdrive (MSVCRT.@)
|
|
*
|
|
* Get the current drive number.
|
|
*
|
|
* PARAMS
|
|
* None.
|
|
*
|
|
* RETURNS
|
|
* Success: The drive letter number from 1 to 26 ("A:" to "Z:").
|
|
* Failure: 0.
|
|
*/
|
|
int _getdrive(void)
|
|
{
|
|
WCHAR buffer[MAX_PATH];
|
|
if (GetCurrentDirectoryW( MAX_PATH, buffer ) &&
|
|
buffer[0] >= 'A' && buffer[0] <= 'z' && buffer[1] == ':')
|
|
return towupper(buffer[0]) - 'A' + 1;
|
|
return 0;
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
unsigned long _getdrives(void)
|
|
{
|
|
return GetLogicalDrives();
|
|
}
|