mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-16 19:40:07 +08:00
380c9f6165
*libc/include/wchar.h: Add restrict keyword. *libc/stdio/fgetws.c (fgetws): ditto. *libc/stdio/fputws.c (fputws): ditto. *libc/stdio/fwprintf.c (fwprintf): ditto. *libc/stdio/fwscanf.c (fwscanf): ditto. *libc/stdio/swprintf.c (swprintf): ditto. *libc/stdio/swscanf.c (swscanf): ditto. *libc/stdio/vfwprintf.c (vfwprintf): ditto. *libc/stdio/vfwscanf.c (vfwscanf): ditto. *libc/stdio/vswprintf.c (vswprintf): ditto. *libc/stdio/vswscanf.c (vswscanf): ditto. *libc/stdio/vwprintf.c (vwprintf): ditto. *libc/stdio/vwscanf.c (vwscanf): ditto. *libc/stdio/wprintf.c (wprintf): ditto. *libc/stdio/wscanf.c (wscanf): ditto. *libc/stdlib/mbrlen.c (mbrlen): ditto. *libc/stdlib/mbrtowc.c (mbrtowc): ditto. *libc/stdlib/mbsnrtowcs.c (mbsnrtowcs): ditto. *libc/stdlib/mbsrtowcs.c (mbsrtowcs): ditto. *libc/stdlib/wcrtomb.c (wcrtomb): ditto. *libc/stdlib/wcsnrtombs.c (wcsnrtombs): ditto. *libc/stdlib/wcsrtombs.c (wcsrtombs): ditto. *libc/stdlib/wcstod.c (wcstod): ditto. *libc/stdlib/wcstol.c (wcstol): ditto. *libc/stdlib/wcstold.c (wcstold): ditto. *libc/stdlib/wcstoll.c (wcstoll): ditto. *libc/stdlib/wcstoul.c (wcstoul): ditto. *libc/stdlib/wcstoull.c (cstoull): ditto. *libc/string/wcpcpy.c (wcpcpy): ditto. *libc/string/wcpncpy.c (wcpncpy): ditto. *libc/string/wcscat.c (wcscat): ditto. *libc/string/wcscpy.c (wcscpy): ditto. *libc/string/wcsncat.c (wcsncat): ditto. *libc/string/wcsncpy.c (wcsncpy): ditto. *libc/string/wcsstr.c (wcsstr): ditto. *libc/string/wcstok.c (wcstok): ditto. *libc/string/wcsxfrm.c (wcsxfrm): ditto. *libc/string/wmemcpy.c (wmemcpy): ditto.
54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
/*
|
|
FUNCTION
|
|
<<wcsxfrm>>---locale-specific wide-character string transformation
|
|
|
|
INDEX
|
|
wcsxfrm
|
|
|
|
ANSI_SYNOPSIS
|
|
#include <wchar.h>
|
|
int wcsxfrm(wchar_t *__restrict <[stra]>,
|
|
const wchar_t *__restrict <[strb]>, size_t <[n]>);
|
|
|
|
TRAD_SYNOPSIS
|
|
#include <wchar.h>
|
|
size_t wcsxfrm(<[stra]>, <[strb]>, <[n]>)
|
|
wchar_t *__restrict <[stra]>;
|
|
wchar_t *__restrict <[strb]>;
|
|
size_t <[n]>
|
|
|
|
DESCRIPTION
|
|
<<wcsxfrm>> transforms the wide-character string pointed to by
|
|
<[strb]> to the wide-character string pointed to by <[stra]>,
|
|
Comparing two transformed wide strings with <<wcscmp>> should return
|
|
the same result as comparing the original strings with <<wcscoll>>.
|
|
No more than <[n]> wide characters are transformed, including the
|
|
trailing null character.
|
|
|
|
If <[n]> is 0, <[stra]> may be a NULL pointer.
|
|
|
|
The current implementation of <<wcsxfrm>> simply uses <<wcslcpy>>
|
|
and does not support any language-specific transformations.
|
|
|
|
RETURNS
|
|
<<wcsxfrm>> returns the length of the transformed wide character
|
|
string. if the return value is greater or equal to <[n]>, the
|
|
content of <[stra]> is undefined.
|
|
|
|
PORTABILITY
|
|
<<wcsxfrm>> is ISO/IEC 9899/AMD1:1995 (ISO C).
|
|
*/
|
|
|
|
#include <_ansi.h>
|
|
#include <wchar.h>
|
|
|
|
size_t
|
|
_DEFUN (wcsxfrm, (a, b, n),
|
|
wchar_t *__restrict a _AND
|
|
_CONST wchar_t *__restrict b _AND
|
|
size_t n)
|
|
|
|
{
|
|
return wcslcpy (a, b, n);
|
|
}
|