maskfd.c 568 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * \file maskfd.c
  3. *
  4. * \brief GIS Library - Mask 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 "G.h"
  17. /**
  18. * \brief Test for MASK.
  19. *
  20. * \return -1 if no MASK
  21. * \return file descriptor if MASK
  22. */
  23. int G_maskfd(void)
  24. {
  25. G__check_for_auto_masking();
  26. return G__.auto_mask > 0 ? G__.mask_fd : -1;
  27. }