Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ memory(3C) — sys5 — Apollo Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought



MEMORY(3C)               DOMAIN/IX SYS5                MEMORY(3C)



NAME
     memccpy, memchr, memcmp, memcpy, memset - memory operations

USAGE
     #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 on memory areas (i.e., arrays of
     characters that are bounded by a count and are not ter-
     minated by a null character).  These functions do not check
     for overflow of the receiving memory area.

     Memccpy copies characters from memory area s2 into s1, stop-
     ping after character c is copied the first time, or after n
     characters are copied, whichever comes first.  The function
     returns a pointer to the character after the copy of c in
     s1, or a NULL pointer if c did not exist in the first n
     characters of s2.

     Memchr returns a pointer to the first occurrence of charac-
     ter 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, and returns an integer less than, equal to, or
     greater than zero, depending on whether s1 is lexicographi-
     cally less than, equal to, or greater than s2.





Printed 12/4/86                                          MEMORY-1







MEMORY(3C)               DOMAIN/IX SYS5                MEMORY(3C)



     Memcpy copies n characters from memory area s2 to s1, and
     returns s1.

     Memset sets the first n characters in memory area s to the
     value of character c.  It returns s.

NOTES
     For convenience, all these functions are declared in the
     optional <memory.h> header file.

     Memcmp uses native character comparison.  The sign of the
     value returned when one of the characters has its high-order
     bit set is implementation-dependent.

     Character movement is also performed differently in dif-
     ferent implementations.  Thus, overlapping moves may not
     operate logically.




































MEMORY-2                                          Printed 12/4/86





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