forget.c 636 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*!
  2. \file rowio/forget.c
  3. \brief RowIO library - Release a row
  4. (C) 2001-2009 by the GRASS Development Team
  5. This program is free software under the GNU General Public License
  6. (>=v2). Read the file COPYING that comes with GRASS for details.
  7. \author Original author CERL
  8. */
  9. #include <grass/rowio.h>
  10. /*!
  11. \brief Release row from memory
  12. \param R pointer to ROWIO structure
  13. \param row row number
  14. */
  15. void Rowio_forget(ROWIO * R, int row)
  16. {
  17. int i;
  18. if (row < 0)
  19. return;
  20. for (i = 0; i < R->nrows; i++)
  21. if (row == R->rcb[i].row) {
  22. R->rcb[i].row = -1; /* no longer in memory */
  23. break;
  24. }
  25. }