c89-ification
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@387 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
f4eed938cf
commit
758ae46138
8 changed files with 80 additions and 30 deletions
|
|
@ -103,3 +103,16 @@ void MwDirectoryFreeEntry(MwDirectoryEntry* entry) {
|
|||
free(entry->name);
|
||||
free(entry);
|
||||
}
|
||||
|
||||
char* MwDirectoryCurrent(void) {
|
||||
#ifdef _WIN32
|
||||
int len = GetCurrentDirectory(0, NULL);
|
||||
char* out = malloc(len);
|
||||
|
||||
GetCurrentDirectory(len, out);
|
||||
|
||||
return out;
|
||||
#else
|
||||
return getcwd(NULL, 0);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue