ReactOS  0.4.13-dev-257-gfabbd7c
tcsncpy.h
Go to the documentation of this file.
1 
2 #include <stddef.h>
3 #include <tchar.h>
4 
5 #if defined(_MSC_VER) && defined(_M_ARM)
6 #pragma function(_tcsncpy)
7 #endif /* _MSC_VER */
8 
9 _TCHAR * _tcsncpy(_TCHAR * dst, const _TCHAR * src, size_t n)
10 {
11  if(n != 0)
12  {
13  _TCHAR * d = dst;
14  const _TCHAR * s = src;
15 
16  do
17  {
18  if((*d ++ = *s ++) == 0)
19  {
20  while (-- n != 0) *d ++ = 0;
21  break;
22  }
23  }
24  while(-- n != 0);
25  }
26 
27  return dst;
28 }
29 
30 /* EOF */
_TCHAR * _tcsncpy(_TCHAR *dst, const _TCHAR *src, size_t n)
Definition: tcsncpy.h:9
GLdouble n
Definition: glext.h:7729
char _TCHAR
Definition: tchar.h:1392
#define d
Definition: ke_i.h:81
GLdouble s
Definition: gl.h:2039
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340