mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Update stpcpy(3) and wcpcpy(3) to current coding conventions.
This commit is contained in:
parent
9d3bf0f164
commit
163ecfcf55
2 changed files with 11 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
|
||||
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012.
|
||||
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2014.
|
||||
|
||||
This file is part of the Sortix C Library.
|
||||
|
||||
|
|
@ -26,8 +26,9 @@
|
|||
|
||||
extern "C" char* stpcpy(char* dest, const char* src)
|
||||
{
|
||||
while ( *src )
|
||||
*dest++ = *src++;
|
||||
*dest = '\0';
|
||||
return dest;
|
||||
size_t index;
|
||||
for ( index = 0; src[index]; index++ )
|
||||
dest[index] = src[index];
|
||||
dest[index] = '\0';
|
||||
return dest + index;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,9 @@
|
|||
|
||||
extern "C" wchar_t* wcpcpy(wchar_t* restrict dest, const wchar_t* restrict src)
|
||||
{
|
||||
while ( *src )
|
||||
*dest++ = *src++;
|
||||
*dest = L'\0';
|
||||
return dest;
|
||||
size_t index;
|
||||
for ( index = 0; src[index]; index++ )
|
||||
dest[index] = src[index];
|
||||
dest[index] = L'\0';
|
||||
return dest + index;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue