Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ memset(3C) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought




memory(3C) memory(3C)
NAME memccpy, memchr, memcmp, memcpy, memset - memory operations SYNOPSIS #include <memory.h> char *memccpy(s1, s2, c, n) char *s1, *s2; int c, n; char *memchr(s, c, n) char *s; int c, n; int memcmp(s1, s2, n) char *s1, *s2; int n; char *memcpy(s1, s2, n) char *s1, *s2; int n; char *memset(s, c, n) char *s; int c, n; DESCRIPTION These functions operate efficiently on memory areas (arrays of characters bounded by a count, not terminated by a null character). They do not check for the overflow of any re- ceiving memory area. memccpy copies characters from memory area s2 into s1, stop- ping after the first occurrence of character c has been copied or after n characters have been copied, whichever comes first. It returns either a pointer to the character after the copy of c in s1 or a NULL pointer if c was not found in the first n characters of s2. memchr returns either a pointer to the first occurrence of character c in the first n characters of memory area s or a NULL pointer if c does not occur. memcmp compares its arguments, looking at the first n char- acters only. It returns an integer less than, equal to, or greater than 0, depending on whether s1 is lexicographically less than, equal to, or greater than s2. memcpy copies n characters from memory area s2 to s1. It returns s1. April, 1990 1



memory(3C) memory(3C)
memset sets the first n characters in memory area s to the value of character c. It returns s . NOTES For user convenience, all these functions are declared in the optional <memory.h> header file. BUGS memcmp uses native character comparison. Because character movement is performed differently in dif- ferent implementations, overlapping moves may yield unex- pected results. 2 April, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026