dig_macros.h 659 B

12345678910111213141516171819
  1. /*!
  2. \file include/vect/dig_macros.h
  3. \brief Macros for diglib (part of vector library
  4. */
  5. /* ALIVE MACROS take a pointer the the structure in question */
  6. /* and return 0 or non-zero */
  7. #define LINE_ALIVE(p) ((p)->type<16) /* assume DEAD are .GT. 1 << 3 */
  8. #define NODE_ALIVE(p) ((p)->alive) /* simple enuf */
  9. #define AREA_LABELED(p) ((p)->alive && (p)->att)
  10. #define LINE_LABELED(p) (LINE_ALIVE (p) && (p)->att)
  11. #define AREA_ALIVE(p) ((p)->alive)
  12. #define ISLE_ALIVE(p) ((p)->alive)
  13. #define ATT_ALIVE(p) ((p)->type<16) /* see LINE_ALIVE */
  14. #define LESSER(x,y) ((x) < (y) ? (x) : (y))
  15. #define GREATER(x,y) ((x) > (y) ? (x) : (y))