GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-77aab223bc
calc.h
Go to the documentation of this file.
1 #ifndef GRASS_CALC_H
2 #define GRASS_CALC_H
3 
4 #include <grass/gis.h>
5 #include <grass/raster.h>
6 
7 typedef int func_t(int argc, const int *argt, void **args);
8 typedef int args_t(int argc, int *argt);
9 
10 enum {
11  E_ARG_LO = 1,
12  E_ARG_HI = 2,
16  E_ARG_NUM = 6,
17  E_WTF = 99
18 };
19 
20 typedef struct func_desc {
21  const char *name;
25 
26 #define IS_NULL_C(x) (Rast_is_c_null_value((x)))
27 #define IS_NULL_F(x) (Rast_is_f_null_value((x)))
28 #define IS_NULL_D(x) (Rast_is_d_null_value((x)))
29 
30 #define SET_NULL_C(x) (Rast_set_c_null_value((x), 1))
31 #define SET_NULL_F(x) (Rast_set_f_null_value((x), 1))
32 #define SET_NULL_D(x) (Rast_set_d_null_value((x), 1))
33 
34 extern volatile int floating_point_exception;
35 extern volatile int floating_point_exception_occurred;
36 
37 extern int columns;
38 
39 extern func_desc calc_func_descs[];
40 
41 #include <grass/defs/calc.h>
42 
43 #endif
@ E_INV_TYPE
Definition: calc.h:15
@ E_RES_TYPE
Definition: calc.h:14
@ E_ARG_TYPE
Definition: calc.h:13
@ E_ARG_HI
Definition: calc.h:12
@ E_ARG_NUM
Definition: calc.h:16
@ E_WTF
Definition: calc.h:17
@ E_ARG_LO
Definition: calc.h:11
volatile int floating_point_exception
Definition: calc.c:8
int columns
Definition: calc.c:11
int args_t(int argc, int *argt)
Definition: calc.h:8
struct func_desc func_desc
int func_t(int argc, const int *argt, void **args)
Definition: calc.h:7
func_desc calc_func_descs[]
Definition: function.c:3
volatile int floating_point_exception_occurred
Definition: calc.c:9
Definition: calc.h:20
args_t * check_args
Definition: calc.h:22
func_t * func
Definition: calc.h:23
const char * name
Definition: calc.h:21