Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

memmove(3) OSS Library Calls Reference Manual
NAME
memmove - Copies characters with overlapping areas in memory
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <string.h>
void *memmove(
void *s1,
const void *s2,
size_t n);
PARAMETERS
s1 Points to the location of a destination string.
s2 Points to the location of a source string.
n Specifies the number of bytes to copy.
DESCRIPTION
The memmove( ) function operates on strings in memory areas. A memory area is a group of
contiguous bytes bound by a count and not terminated by a null character. This memory function
does not check for overflow of the receiving memory area.
The memmove( ) function copies n bytes from the string at the location pointed to by the s2
parameter to the string at the location pointed to by the s1 parameter. Copying takes place as
though the n number of bytes from string s2 are first copied into a temporary location having n
bytes that do not overlap either of the strings pointed to by s1 and s2. Then, n number of bytes
from the temporary location are copied to the string pointed to by s1. Consequently, this opera-
tion is nondestructive and proceeds from left to right.
RETURN VALUES
The memmove( ) function returns the string pointed to by the s1 parameter.
RELATED INFORMATION
Functions: memccpy(3), memchr(3), memcmp(3), memcpy(3), memset(3), strcat(3).
4194 Hewlett-Packard Company 527187-017