mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Restored _wmakepath(). Grrr. :-/
svn path=/trunk/; revision=2075
This commit is contained in:
parent
d24d5849fe
commit
7192939c7d
1 changed files with 33 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue