summaryrefslogtreecommitdiffstats
path: root/private/ole32/stg/wclib/wcscpy.c
blob: 91424e62d4192e23be8e5ad8788daba3f77a3652 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/***
*wcscpy.c - contains wcscpy()
*
*       Copyright (c) 1985-1988, Microsoft Corporation. All Rights Reserved.
*
*Purpose:
*       wcscpy() copies one wide character string onto another.
*
*Revision History:
*       04-07-91  IanJa C version created.
*
*******************************************************************************/

#include <stdlib.h>

/***
*wchar_t *wcscpy(dst, src) - copy one wide character string over another
*
*Purpose:
*       Copies the wide character string src into the spot specified by
*       dest; assumes enough room.
*
*Entry:
*       wchar_t * dst - wide character string over which "src" is to be copied
*       const wchar_t * src - string to be copied over "dst"
*
*Exit:
*       The address of "dst"
*
*Exceptions:
*******************************************************************************/

wchar_t * _CRTAPI1 wcscpy(wchar_t * dst, const wchar_t * src)
{
    wchar_t * cp = dst;

    while( *cp++ = *src++ )
            ;               /* Copy src over dst */

    return dst;
}