mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
Create a branch for header work.
svn path=/branches/header-work/; revision=45691
This commit is contained in:
parent
14fe274b1c
commit
9ea495ba33
19538 changed files with 0 additions and 1063950 deletions
55
lib/sdk/crt/stdlib/wmakpath.c
Normal file
55
lib/sdk/crt/stdlib/wmakpath.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CRT library
|
||||
* LICENSE: See COPYING in the top level directory
|
||||
* FILE: lib/sdk/crt/stdlib/wmakpath.c
|
||||
* PURPOSE: Creates a unicode path
|
||||
* PROGRAMMERS: Wine team
|
||||
* Copyright 1996,1998 Marcus Meissner
|
||||
* Copyright 1996 Jukka Iivonen
|
||||
* Copyright 1997,2000 Uwe Bonnes
|
||||
* Copyright 2000 Jon Griffiths
|
||||
*
|
||||
*/
|
||||
|
||||
/* $Id$
|
||||
*/
|
||||
#include <precomp.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void _wmakepath(wchar_t* path, const wchar_t* drive, const wchar_t* dir, const wchar_t* fname, const wchar_t* ext)
|
||||
{
|
||||
wchar_t *p = path;
|
||||
|
||||
if ( !path )
|
||||
return;
|
||||
|
||||
if (drive && drive[0])
|
||||
{
|
||||
*p++ = drive[0];
|
||||
*p++ = ':';
|
||||
}
|
||||
if (dir && dir[0])
|
||||
{
|
||||
unsigned int len = strlenW(dir);
|
||||
memmove(p, dir, len * sizeof(wchar_t));
|
||||
p += len;
|
||||
if (p[-1] != '/' && p[-1] != '\\')
|
||||
*p++ = '\\';
|
||||
}
|
||||
if (fname && fname[0])
|
||||
{
|
||||
unsigned int len = strlenW(fname);
|
||||
memmove(p, fname, len * sizeof(wchar_t));
|
||||
p += len;
|
||||
}
|
||||
if (ext && ext[0])
|
||||
{
|
||||
if (ext[0] != '.')
|
||||
*p++ = '.';
|
||||
strcpyW(p, ext);
|
||||
}
|
||||
else
|
||||
*p = '\0';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue