Last change
on this file since 444 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
1.1 KB
|
Rev | Line | |
---|
[444] | 1 | /* |
---|
| 2 | FUNCTION |
---|
| 3 | <<wmempcpy>>---copy wide characters in memory and return end pointer |
---|
| 4 | |
---|
| 5 | SYNOPSIS |
---|
| 6 | #define _GNU_SOURCE |
---|
| 7 | #include <wchar.h> |
---|
| 8 | wchar_t *wmempcpy(wchar_t *<[d]>, |
---|
| 9 | const wchar_t *<[s]>, size_t <[n]>); |
---|
| 10 | |
---|
| 11 | DESCRIPTION |
---|
| 12 | The <<wmemcpy>> function copies <[n]> wide characters from the object |
---|
| 13 | pointed to by <[s]> to the object pointed to be <[d]>. This function |
---|
| 14 | is not affected by locale and all wchar_t values are treated |
---|
| 15 | identically. The null wide character and wchar_t values not |
---|
| 16 | corresponding to valid characters are not treated specially. |
---|
| 17 | |
---|
| 18 | If <[n]> is zero, <[d]> and <[s]> must be a valid pointers, and the |
---|
| 19 | function copies zero wide characters. |
---|
| 20 | |
---|
| 21 | RETURNS |
---|
| 22 | <<wmempcpy>> returns a pointer to the wide character following the |
---|
| 23 | last wide character copied to the <[out]> region. |
---|
| 24 | |
---|
| 25 | PORTABILITY |
---|
| 26 | <<wmempcpy>> is a GNU extension. |
---|
| 27 | |
---|
| 28 | No supporting OS subroutines are required. |
---|
| 29 | */ |
---|
| 30 | |
---|
| 31 | #define _GNU_SOURCE |
---|
| 32 | #include <_ansi.h> |
---|
| 33 | #include <string.h> |
---|
| 34 | #include <wchar.h> |
---|
| 35 | |
---|
| 36 | wchar_t * |
---|
| 37 | wmempcpy (wchar_t *__restrict d, |
---|
| 38 | const wchar_t *__restrict s, |
---|
| 39 | size_t n) |
---|
| 40 | { |
---|
| 41 | return (wchar_t *) mempcpy (d, s, n * sizeof (wchar_t)); |
---|
| 42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.