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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc2/] [newlib/] [libc/] [string/] [wcpcpy.c] - Diff between revs 207 and 520

Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 520
/*
/*
FUNCTION
FUNCTION
        <<wcpcpy>>---copy a wide-character string returning a pointer to its end
        <<wcpcpy>>---copy a wide-character string returning a pointer to its end
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <wchar.h>
        #include <wchar.h>
        wchar_t *wcpcpy(wchar_t *<[s1]>, const wchar_t *,<[s2]>);
        wchar_t *wcpcpy(wchar_t *<[s1]>, const wchar_t *,<[s2]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        wchar_t *wcpcpy(<[s1]>, <[s2]>
        wchar_t *wcpcpy(<[s1]>, <[s2]>
        wchar_t *<[s1]>;
        wchar_t *<[s1]>;
        const wchar_t *<[s2]>;
        const wchar_t *<[s2]>;
 
 
DESCRIPTION
DESCRIPTION
        The <<wcpcpy>> function copies the wide-character string pointed to by
        The <<wcpcpy>> function copies the wide-character string pointed to by
        <[s2]> (including the terminating null wide-character code) into the
        <[s2]> (including the terminating null wide-character code) into the
        array pointed to by <[s1]>. If copying takes place between objects that
        array pointed to by <[s1]>. If copying takes place between objects that
        overlap, the behaviour is undefined.
        overlap, the behaviour is undefined.
 
 
RETURNS
RETURNS
        This function returns a pointer to the end of the destination string,
        This function returns a pointer to the end of the destination string,
        thus pointing to the trailing '\0'.
        thus pointing to the trailing '\0'.
 
 
PORTABILITY
PORTABILITY
<<wcpcpy>> is a GNU extension.
<<wcpcpy>> is a GNU extension.
 
 
No supporting OS subroutines are required.
No supporting OS subroutines are required.
*/
*/
 
 
#include <_ansi.h>
#include <_ansi.h>
#include <wchar.h>
#include <wchar.h>
 
 
wchar_t *
wchar_t *
_DEFUN (wcpcpy, (s1, s2),
_DEFUN (wcpcpy, (s1, s2),
        wchar_t * s1 _AND
        wchar_t * s1 _AND
        _CONST wchar_t * s2)
        _CONST wchar_t * s2)
{
{
  while ((*s1++ = *s2++))
  while ((*s1++ = *s2++))
    ;
    ;
  return --s1;
  return --s1;
}
}
 
 

powered by: WebSVN 2.1.0

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