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/] [wcsxfrm.c] - Blame information for rev 194

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

Line No. Rev Author Line
1 148 jeremybenn
/*
2
FUNCTION
3
        <<wcsxfrm>>---locale-specific wide-character string transformation
4
 
5
INDEX
6
        wcsxfrm
7
 
8
ANSI_SYNOPSIS
9
        #include <wchar.h>
10
        int wcsxfrm(wchar_t *<[stra]>, const wchar_t * <[strb]>, size_t <[n]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <wchar.h>
14
        size_t wcsxfrm(<[stra]>, <[strb]>, <[n]>)
15
        wchar_t *<[stra]>;
16
        wchar_t *<[strb]>;
17
        size_t   <[n]>
18
 
19
DESCRIPTION
20
        <<wcsxfrm>> transforms the wide-character string pointed to by
21
        <[strb]> to the wide-character string pointed to by <[stra]>,
22
        Comparing two transformed wide strings with <<wcscmp>> should return
23
        the same result as comparing the original strings with <<wcscoll>>.
24
        No more than <[n]> wide characters are transformed, including the
25
        trailing null character.
26
 
27
        If <[n]> is 0, <[stra]> may be a NULL pointer.
28
 
29
        The current implementation of <<wcsxfrm>> simply uses <<wcslcpy>>
30
        and does not support any language-specific transformations.
31
 
32
RETURNS
33
        <<wcsxfrm>> returns the length of the transformed wide character
34
        string.  if the return value is greater or equal to <[n]>, the
35
        content of <[stra]> is undefined.
36
 
37
PORTABILITY
38
<<wcsxfrm>> is ISO/IEC 9899/AMD1:1995 (ISO C).
39
*/
40
 
41
#include <_ansi.h>
42
#include <wchar.h>
43
 
44
size_t
45
_DEFUN (wcsxfrm, (a, b, n),
46
        wchar_t *a _AND
47
        _CONST wchar_t *b _AND
48
        size_t n)
49
 
50
{
51
  return wcslcpy (a, b, n);
52
}

powered by: WebSVN 2.1.0

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