ReactOS 0.4.15-dev-8393-g61b7fb9
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 */
GLdouble s
Definition: gl.h:2039
GLdouble n
Definition: glext.h:7729
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
#define _tcsncpy
Definition: tchar.h:1410
char _TCHAR
Definition: tchar.h:1392
#define d
Definition: ke_i.h:81