mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Reflecting changes in crtdll.
svn path=/trunk/; revision=1659
This commit is contained in:
parent
afe0e9f601
commit
d5d8d819b8
1 changed files with 8 additions and 4 deletions
|
@ -5,16 +5,18 @@ void _makepath( char *path, const char *drive, const char *dir, const char *fnam
|
|||
{
|
||||
int dir_len;
|
||||
if ( drive != NULL ) {
|
||||
strcat(path,drive);
|
||||
strcpy(path,drive);
|
||||
strcat(path,":");
|
||||
}
|
||||
else
|
||||
(*path)=0;
|
||||
|
||||
if ( dir != NULL ) {
|
||||
strcat(path,dir);
|
||||
if ( *dir != '\\' )
|
||||
strcat(path,"\\");
|
||||
dir_len = strlen(dir);
|
||||
if ( *(dir + dir_len - 1) != '\\' )
|
||||
if (dir_len && *(dir + dir_len - 1) != '\\' )
|
||||
strcat(path,"\\");
|
||||
}
|
||||
if ( fname != NULL ) {
|
||||
|
@ -31,16 +33,18 @@ void _wmakepath( wchar_t *path, const wchar_t *drive, const wchar_t *dir, const
|
|||
{
|
||||
int dir_len;
|
||||
if ( drive != NULL ) {
|
||||
wcscat(path,drive);
|
||||
wcscpy(path,drive);
|
||||
wcscat(path,L":");
|
||||
}
|
||||
else
|
||||
(*path)=0;
|
||||
|
||||
if ( dir != NULL ) {
|
||||
wcscat(path,dir);
|
||||
if ( *dir != L'\\' )
|
||||
wcscat(path,L"\\");
|
||||
dir_len = wcslen(dir);
|
||||
if ( *(dir + dir_len - 1) != L'\\' )
|
||||
if ( dir_len && *(dir + dir_len - 1) != L'\\' )
|
||||
wcscat(path,L"\\");
|
||||
}
|
||||
if ( fname != NULL ) {
|
||||
|
|
Loading…
Reference in a new issue