GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
dig_macros.h
Go to the documentation of this file.
1/*!
2 \file include/grass/vect/dig_macros.h
3
4 \brief Macros for diglib (part of vector library
5 */
6
7/* ALIVE MACROS take a pointer of 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))