OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [string/] [wcpcpy.c] - Blame information for rev 171

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/*
2
FUNCTION
3
        <<wcpcpy>>---copy a wide-character string returning a pointer to its end
4
 
5
ANSI_SYNOPSIS
6
        #include <wchar.h>
7
        wchar_t *wcpcpy(wchar_t *<[s1]>, const wchar_t *,<[s2]>);
8
 
9
TRAD_SYNOPSIS
10
        wchar_t *wcpcpy(<[s1]>, <[s2]>
11
        wchar_t *<[s1]>;
12
        const wchar_t *<[s2]>;
13
 
14
DESCRIPTION
15
        The <<wcpcpy>> function copies the wide-character string pointed to by
16
        <[s2]> (including the terminating null wide-character code) into the
17
        array pointed to by <[s1]>. If copying takes place between objects that
18
        overlap, the behaviour is undefined.
19
 
20
RETURNS
21
        This function returns a pointer to the end of the destination string,
22
        thus pointing to the trailing '\0'.
23
 
24
PORTABILITY
25
<<wcpcpy>> is a GNU extension.
26
 
27
No supporting OS subroutines are required.
28
*/
29
 
30
#include <_ansi.h>
31
#include <wchar.h>
32
 
33
wchar_t *
34
_DEFUN (wcpcpy, (s1, s2),
35
        wchar_t * s1 _AND
36
        _CONST wchar_t * s2)
37
{
38
  while ((*s1++ = *s2++))
39
    ;
40
  return --s1;
41
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.