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
28
lib/sdk/crt/string/tcsncpy.h
Normal file
28
lib/sdk/crt/string/tcsncpy.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* $Id$
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <tchar.h>
|
||||
|
||||
_TCHAR * _tcsncpy(_TCHAR * dst, const _TCHAR * src, size_t n)
|
||||
{
|
||||
if(n != 0)
|
||||
{
|
||||
_TCHAR * d = dst;
|
||||
const _TCHAR * s = src;
|
||||
|
||||
do
|
||||
{
|
||||
if((*d ++ = *s ++) == 0)
|
||||
{
|
||||
while (-- n != 0) *d ++ = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while(-- n != 0);
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue