Commit 08af06c1 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Implemented _wmakepath.

parent fd33517a
......@@ -694,6 +694,52 @@ VOID _makepath(char * path, const char * drive,
TRACE("returning %s\n",path);
}
/*********************************************************************
* _wmakepath (MSVCRT.@)
*/
VOID _wmakepath(WCHAR *path, const WCHAR *drive, const WCHAR *directory,
const WCHAR *filename, const WCHAR *extension)
{
WCHAR ch;
TRACE("%s %s %s %s\n", debugstr_w(drive), debugstr_w(directory),
debugstr_w(filename), debugstr_w(extension));
if ( !path )
return;
path[0] = 0;
if (drive && drive[0])
{
path[0] = drive[0];
path[1] = ':';
path[2] = 0;
}
if (directory && directory[0])
{
strcatW(path, directory);
ch = path[strlenW(path) - 1];
if (ch != '/' && ch != '\\')
{
static const WCHAR backslashW[] = {'\\',0};
strcatW(path, backslashW);
}
}
if (filename && filename[0])
{
strcatW(path, filename);
if (extension && extension[0])
{
if ( extension[0] != '.' )
{
static const WCHAR dotW[] = {'.',0};
strcatW(path, dotW);
}
strcatW(path, extension);
}
}
TRACE("returning %s\n", debugstr_w(path));
}
/*********************************************************************
* _searchenv (MSVCRT.@)
......
......@@ -534,7 +534,7 @@ debug_channels (msvcrt)
@ extern _winmajor MSVCRT__winmajor
@ extern _winminor MSVCRT__winminor
@ extern _winver MSVCRT__winver
@ stub _wmakepath #(wstr wstr wstr wstr wstr)
@ cdecl _wmakepath(wstr wstr wstr wstr wstr) _wmakepath
@ cdecl _wmkdir(wstr) _wmkdir
@ cdecl _wmktemp(wstr) _wmktemp
@ varargs _wopen(wstr long) _wopen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment