From 7192939c7dea8dc7009572b162c376b4d5795b49 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Thu, 19 Jul 2001 18:53:29 +0000 Subject: [PATCH] Restored _wmakepath(). Grrr. :-/ svn path=/trunk/; revision=2075 --- reactos/lib/msvcrt/stdlib/makepath.c | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/reactos/lib/msvcrt/stdlib/makepath.c b/reactos/lib/msvcrt/stdlib/makepath.c index 9621be4bd32..b05cf85b20e 100644 --- a/reactos/lib/msvcrt/stdlib/makepath.c +++ b/reactos/lib/msvcrt/stdlib/makepath.c @@ -32,3 +32,36 @@ void _makepath(char *path, const char *drive, const char *dir, const char *fname } } } + + +void _wmakepath(wchar_t *path, const wchar_t *drive, const wchar_t *dir, const wchar_t *fname, const wchar_t *ext) +{ + int dir_len; + + if ((drive != NULL) && (*drive)) + { + wcscpy(path, drive); + wcscat(path, ":"); + } + else + (*path)=0; + + if (dir != NULL) + { + wcscat(path, dir); + dir_len = wcslen(dir); + if (dir_len && *(dir + dir_len - 1) != '\\') + wcscat(path, "\\"); + } + + if (fname != NULL) + { + wcscat(path, fname); + if (ext != NULL) + { + if (*ext != '.') + wcscat(path, "."); + wcscat(path, ext); + } + } +}