~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to libiberty/memcpy.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
   This function is in the public domain.  */
3
3
 
4
4
/*
5
 
NAME
6
 
        memcpy -- copy memory regions of arbitary length
7
 
 
8
 
SYNOPSIS
9
 
        void* memcpy (void *out, const void *in, size_t n);
10
 
 
11
 
DESCRIPTION
12
 
        Copy LENGTH bytes from memory region pointed to by IN to memory
13
 
        region pointed to by OUT.
 
5
 
 
6
@deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, size_t @var{length})
 
7
 
 
8
Copies @var{length} bytes from memory region @var{in} to region
 
9
@var{out}.  Returns a pointer to @var{out}.
 
10
 
 
11
@end deftypefn
 
12
 
14
13
*/
15
14
 
16
15
#include <ansidecl.h>
17
 
#ifdef __STDC__
 
16
#ifdef ANSI_PROTOTYPES
18
17
#include <stddef.h>
19
18
#else
20
19
#define size_t unsigned long
21
20
#endif
22
21
 
 
22
void bcopy PARAMS((const void*, void*, size_t));
 
23
 
23
24
PTR
24
 
DEFUN(memcpy, (out, in, length), PTR out AND const PTR in AND size_t length)
 
25
memcpy (out, in, length)
 
26
     PTR out;
 
27
     const PTR in;
 
28
     size_t length;
25
29
{
26
30
    bcopy(in, out, length);
27
31
    return out;