Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ memmove(S) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     MEMMOVE(S)                UNIX System V                MEMMOVE(S)



     Name
          memmove - copies characters between objects

     Syntax
          #include <string.h>

          void *memmove(dest, src, count)
          void *dest;
          const void *src;
          size_t count;


     Description
          The memmove function copies count characters from src to
          dest.  If some regions of src and dest overlap, memmove
          ensures that the original src bytes in the overlapping
          region are copied before being overwritten.

     Return Value
          The value of dest, the destination object.

     See Also
          memccpy(S), memcpy(S)

     Example
          #include <stdio.h>
          #include <string.h>

          char Source[] = ">>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<";
          char Target[] = "We will copy the characters in here: "
                    "and will see if it correctly moves "
                    "in the string";
          char *ToPrint;

          main()
           {
                  printf("Target Before: %s\n\n", Target);
                  ToPrint = memmove(&Target[32], Source, sizeof(Source));
                  printf("Target After:  %s\n", Target);
           }

          Using memmove, string Source is copied into string Target.
          sizeof returns the size of the string, including the end-
          of-string character, effectively shortening Target.


     Standards Conformance
          memmove is conformant with:
          ANSI X3.159-198X C Language Draft Standard, May 13, 1988.






                                             (printed 6/20/89)



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