Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

Guardian Native C Library Calls (j - m) memset(3)
NAME
memset - Sets characters 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 *memset(
void *s,
int c,
size_t n);
PARAMETERS
s Points to the location of a string.
c Species a byte for which c is the target of the copy.
n Species the number of bytes to copy.
DESCRIPTION
The memset() function operates on strings in memory areas. A memory area is a group of con-
tiguous 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. However, for systems running G-
series RVUs, the largest acceptable value for n is 2147483647. If a greater value is specified, the
function returns without altering any memory.
The memset() function copies the value of the byte specified by the c parameter, which is con-
verted to an unsigned char, into each of the first n locations of the string pointed to by the s
parameter.
RETURN VALUES
The memset() function returns the string pointed to by the s parameter.
RELATED INFORMATION
Functions: memccpy(3), memchr(3), memcmp(3), memcpy(3), memmove(3), strcat(3).
527192-018 Hewlett-Packard Company 4105