copy.c 661 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * \file copy.c
  3. *
  4. * \brief GIS Library - Memory copy functions.
  5. *
  6. * (C) 2001-2008 by the GRASS Development Team
  7. *
  8. * This program is free software under the GNU General Public License
  9. * (>=v2). Read the file COPYING that comes with GRASS for details.
  10. *
  11. * \author GRASS GIS Development Team
  12. *
  13. * \date 1999-2008
  14. */
  15. #include <grass/gis.h>
  16. #include <string.h>
  17. /**
  18. * \brief Copies <b>n</b> bytes starting at address <b>b</b> into
  19. * address <b>a</b>.
  20. *
  21. * \param[out] a destination (to)
  22. * \param[in] b source (from)
  23. * \param[in] n number of bytes to copy
  24. *
  25. * \return
  26. */
  27. void G_copy(void *a, const void *b, int n)
  28. {
  29. memcpy(a, b, n);
  30. }