Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

memmove(3) Guardian Native C 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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
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 Species 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 overow 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 rst 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).
452 Hewlett-Packard Company 527192-005