ReactOS  0.4.15-dev-2522-g9e0a3cd
wmakpath.c File Reference
#include <precomp.h>
Include dependency graph for wmakpath.c:

Go to the source code of this file.

Functions

void _wmakepath (wchar_t *path, const wchar_t *drive, const wchar_t *dir, const wchar_t *fname, const wchar_t *ext)
 

Function Documentation

◆ _wmakepath()

void _wmakepath ( wchar_t path,
const wchar_t drive,
const wchar_t dir,
const wchar_t fname,
const wchar_t ext 
)

Definition at line 19 of file wmakpath.c.

20 {
21  wchar_t *p = path;
22 
23  if ( !path )
24  return;
25 
26  if (drive && drive[0])
27  {
28  *p++ = drive[0];
29  *p++ = ':';
30  }
31  if (dir && dir[0])
32  {
33  size_t len = strlenW(dir);
34  memmove(p, dir, len * sizeof(wchar_t));
35  p += len;
36  if (p[-1] != '/' && p[-1] != '\\')
37  *p++ = '\\';
38  }
39  if (fname && fname[0])
40  {
41  size_t len = strlenW(fname);
42  memmove(p, fname, len * sizeof(wchar_t));
43  p += len;
44  }
45  if (ext && ext[0])
46  {
47  if (ext[0] != '.')
48  *p++ = '.';
49  strcpyW(p, ext);
50  }
51  else
52  *p = '\0';
53 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLsizei const GLchar ** path
Definition: glext.h:7234
char ext[3]
Definition: mkdosfs.c:358
unsigned int dir
Definition: maze.c:112
GLenum GLsizei len
Definition: glext.h:6722
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
GLfloat GLfloat p
Definition: glext.h:8902