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