Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

reentrant(3)

memory(3C)



bcopy(3C)                      DG/UX R4.11MU05                     bcopy(3C)


NAME
       bcopy - copy bytes from one area to another

SYNOPSIS
       int bcopy(), length;
       char *source, *destination;
       ...
       bcopy(source, destination, length);

   where:
       source         The start of the area to copy from
       destination    The start of the area to copy the bytes to
       length         The number of bytes to move

DESCRIPTION
       The bcopy function copies the number of bytes that you specify from
       one memory location to another; this function comes from the
       University of California Berkeley UNIX (BSD) system.  Unlike the
       memcpy function, bcopy behaves well if the two areas overlap.  Also
       note that the source and destination arguments are reversed as
       compared to memcpy's calling sequence.


   Considerations for Threads Programming
                     +---------+-----------------------------+
                     |         |                      async- |
                     |function | reentrant   cancel   cancel |
                     |         |             point     safe  |
                     +---------+-----------------------------+
                     |bcopy    |     Y         N        N    |
                     +---------+-----------------------------+

EXAMPLE
       The following program copies a string into a buffer and then prints
       it.

       /* Program test for the bcopy() function */

       #include <stdio.h>

       int bcopy();
       char buffer[80];

       main() {
           bcopy("Copy string with bcopy.\n", buffer, 24);
           fputs(buffer, stdout);
           return 0;
       }

RETURN VALUE
       The bcopy function returns no value.

SEE ALSO
       reentrant(3), memory(3C).


Licensed material--property of copyright holder(s)

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