/[gnats]/gnats/libiberty/memcpy.c
ViewVC logotype

Diff of /gnats/libiberty/memcpy.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jsm, Tue Oct 26 07:10:16 1999 UTC revision 1.3 by chewie, Sat Nov 13 05:14:17 2004 UTC
# Line 2  Line 2 
2     This function is in the public domain.  */     This function is in the public domain.  */
3    
4  /*  /*
 NAME  
         memcpy -- copy memory regions of arbitary length  
5    
6  SYNOPSIS  @deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, size_t @var{length})
7          void* memcpy (void *out, const void *in, size_t n);  
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    
 DESCRIPTION  
         Copy LENGTH bytes from memory region pointed to by IN to memory  
         region pointed to by OUT.  
13  */  */
14    
15  #include <ansidecl.h>  #include <ansidecl.h>
16  #ifdef __STDC__  #ifdef ANSI_PROTOTYPES
17  #include <stddef.h>  #include <stddef.h>
18  #else  #else
19  #define size_t unsigned long  #define size_t unsigned long
20  #endif  #endif
21    
22    void bcopy PARAMS((const void*, void*, size_t));
23    
24  PTR  PTR
25  DEFUN(memcpy, (out, in, length), PTR out AND const PTR in AND size_t length)  memcpy (out, in, length)
26         PTR out;
27         const PTR in;
28         size_t length;
29  {  {
30      bcopy(in, out, length);      bcopy(in, out, length);
31      return out;      return out;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26