Drop -Wuninitialized until GDB compiles with it.
[deliverable/binutils-gdb.git] / libiberty / bcopy.c
CommitLineData
252b5132
RH
1/* bcopy -- copy memory regions of arbitary length
2
3NAME
4 bcopy -- copy memory regions of arbitrary length
5
6SYNOPSIS
7 void bcopy (char *in, char *out, int length)
8
9DESCRIPTION
10 Copy LENGTH bytes from memory region pointed to by IN to memory
11 region pointed to by OUT.
12
13BUGS
14 Significant speed improvements can be made in some cases by
15 implementing copies of multiple bytes simultaneously, or unrolling
16 the copy loop.
17
18*/
19
20void
21bcopy (src, dest, len)
22 register char *src, *dest;
23 int len;
24{
25 if (dest < src)
26 while (len--)
27 *dest++ = *src++;
28 else
29 {
30 char *lasts = src + (len-1);
31 char *lastd = dest + (len-1);
32 while (len--)
33 *(char *)lastd-- = *(char *)lasts--;
34 }
35}
This page took 0.060363 seconds and 4 git commands to generate.