Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-161
setmem (supplementary)
Most of the locale categories specify a portion of the locale to change or query. The
sole exception is the LC_ALL category that specifies the entire locale. The locale
categories are as follows:
setmem (supplementary)
The setmem function initializes a block of memory to a specified character value.
mem_blk
points to the block to initialize.
block_size
specifies the size in bytes of the block.
value
specifies the initialization value.
Return Value
none.
Example
This example initializes 20 bytes of memory to the character value a:
#include <memoryh>
char base[20];
unsigned nbytes;
char value;
nbytes = 20;
value = 'a';
setmem(base, nbytes, value);
Name Behavior Affected
LC_ALL All behavior
LC_COLLATE Sorting information
LC_CTYPE Character classification
information
LC_MONETARY Currency printing information
LC_NUMERIC Numeric printing information
LC_TIME Date and time printing information
#include <memoryh>
void setmem(char *mem_blk, size_t block_size, int value);