c89-ification

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@387 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
Nishi 2025-10-17 00:16:02 +00:00
commit 758ae46138
8 changed files with 80 additions and 30 deletions

View file

@ -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
}