forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalc.h
45 lines (33 loc) · 947 Bytes
/
calc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef GRASS_CALC_H
#define GRASS_CALC_H
#include <grass/gis.h>
#include <grass/raster.h>
typedef int func_t(int argc, const int *argt, void **args);
typedef int args_t(int argc, int *argt);
enum {
E_ARG_LO = 1,
E_ARG_HI = 2,
E_ARG_TYPE = 3,
E_RES_TYPE = 4,
E_INV_TYPE = 5,
E_ARG_NUM = 6,
E_WTF = 99
};
typedef struct func_desc
{
const char *name;
args_t *check_args;
func_t *func;
} func_desc;
#define IS_NULL_C(x) (Rast_is_c_null_value((x)))
#define IS_NULL_F(x) (Rast_is_f_null_value((x)))
#define IS_NULL_D(x) (Rast_is_d_null_value((x)))
#define SET_NULL_C(x) (Rast_set_c_null_value((x),1))
#define SET_NULL_F(x) (Rast_set_f_null_value((x),1))
#define SET_NULL_D(x) (Rast_set_d_null_value((x),1))
extern volatile int floating_point_exception;
extern volatile int floating_point_exception_occurred;
extern int columns;
extern func_desc calc_func_descs[];
#include <grass/defs/calc.h>
#endif