maskfd.c 585 B

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. * \file lib/raster/maskfd.c
  3. *
  4. * \brief Raster Library - Mask functions.
  5. *
  6. * (C) 2001-2009 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 Original author CERL
  12. */
  13. #include <grass/gis.h>
  14. #include <grass/raster.h>
  15. #include "R.h"
  16. /*!
  17. * \brief Test for MASK.
  18. *
  19. * \return -1 if no MASK
  20. * \return file descriptor if MASK
  21. */
  22. int Rast_maskfd(void)
  23. {
  24. Rast__check_for_auto_masking();
  25. return R__.auto_mask > 0 ? R__.mask_fd : -1;
  26. }