/contrib/cvs/lib/memmove.c

https://bitbucket.org/freebsd/freebsd-head/ · C · 54 lines · 17 code · 5 blank · 32 comment · 0 complexity · 383d4e146dbbad776631e31d1f9f15d6 MD5 · raw file

  1. /* memmove -- copy memory regions of arbitary length
  2. Copyright (C) 1991 Free Software Foundation, Inc.
  3. This file is part of the libiberty library.
  4. Libiberty is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. Libiberty is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. */
  13. /*
  14. NAME
  15. memmove -- copy memory regions of arbitary length
  16. SYNOPSIS
  17. void memmove (void *out, const void *in, size_t n);
  18. DESCRIPTION
  19. Copy LENGTH bytes from memory region pointed to by IN to memory
  20. region pointed to by OUT.
  21. Regions can be overlapping.
  22. */
  23. #ifdef HAVE_CONFIG_H
  24. #include "config.h"
  25. #endif
  26. #ifdef __STDC__
  27. #include <stddef.h>
  28. #else
  29. #define size_t unsigned long
  30. #endif
  31. void *
  32. memmove (out, in, length)
  33. void *out;
  34. const void* in;
  35. size_t length;
  36. {
  37. bcopy(in, out, length);
  38. return out;
  39. }