diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-09-22 18:49:07 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-09-22 18:49:07 +0000 |
commit | c182e1c896482e9645589b7fe00637637f5fd8ee (patch) | |
tree | f36b5da2ab92cefdda813b59897bd952a9208272 /libiberty/bcopy.c | |
parent | 148551e5315b1908ddedeb35c817900fd915675b (diff) | |
download | gdb-c182e1c896482e9645589b7fe00637637f5fd8ee.tar.gz |
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Fix misapplied patch.
Diffstat (limited to 'libiberty/bcopy.c')
-rw-r--r-- | libiberty/bcopy.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libiberty/bcopy.c b/libiberty/bcopy.c new file mode 100644 index 00000000000..70fa7e328cc --- /dev/null +++ b/libiberty/bcopy.c @@ -0,0 +1,27 @@ +/* bcopy -- copy memory regions of arbitary length + +@deftypefn Supplemental void bcopy (char *@var{in}, char *@var{out}, int @var{length}) + +Copies @var{length} bytes from memory region @var{in} to region +@var{out}. The use of @code{bcopy} is deprecated in new programs. + +@end deftypefn + +*/ + +void +bcopy (src, dest, len) + register char *src, *dest; + int len; +{ + if (dest < src) + while (len--) + *dest++ = *src++; + else + { + char *lasts = src + (len-1); + char *lastd = dest + (len-1); + while (len--) + *(char *)lastd-- = *(char *)lasts--; + } +} |