zero.c 579 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * \file zero.c
  3. *
  4. * \brief GIS Library - Zeroing 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 <string.h>
  16. #include <grass/gis.h>
  17. /**
  18. * \brief Zero out a buffer, <b>buf</b>, of length <b>i</b>.
  19. *
  20. * \param[in,out] buf
  21. * \param[in] i number of bytes to be zeroed
  22. * \return
  23. */
  24. void G_zero(void *buf, int i)
  25. {
  26. memset(buf, 0, i);
  27. }