View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002017 | 1003.1(2024)/Issue8 | System Interfaces | public | 2026-12-02 00:36 | 2026-12-02 00:36 |
| Reporter | romanzilka | Assigned To | |||
| Priority | normal | Severity | Editorial | Type | Enhancement Request |
| Status | New | Resolution | Open | ||
| Name | Roman Žilka | ||||
| Organization | |||||
| User Reference | |||||
| Section | string.h | ||||
| Page Number | 0 | ||||
| Line Number | 0 | ||||
| Interp Status | |||||
| Final Accepted Text | |||||
| Summary | 0002017: string.h: Add mempcpy(), analog of stpncpy() | ||||
| Description | I propose adding the function mempcpy() into string.h, as known from the GNU C Library. See: https://man7.org/linux/man-pages/man3/mempcpy.3.html It will complement well the recently added stpcpy() and stpncpy() (or, rather, the other way around). Desired Action doesn't include the obligatory function prototype in the section on string.h. | ||||
| Desired Action | NAME mempcpy — copy bytes in memory, returning a pointer just behind target area SYNOPSIS [CX] #include <string.h> void *mempcpy(void *restrict s1, const void *restrict s2, size_t n); [/CX] DESCRIPTION The mempcpy() function shall copy n bytes from the object pointed to by s2 into the object pointed to by s1. If copying takes place between objects that overlap, the behavior is undefined. The function shall behave as if the copying were performed by memcpy(). The mempcpy() function shall not change the setting of errno on valid input. RETURN VALUE The mempcpy() function shall return a pointer one past the last element of the array (unsigned char *)s1 of size n, i.e., (unsigned char *)s1 + n. No return value is reserved to indicate an error. ERRORS No errors are defined. | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-12-02 00:36 | romanzilka | New Issue |