GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
calc.c
Go to the documentation of this file.
1#include <unistd.h>
2#include <signal.h>
3
4#include <grass/calc.h>
5
6/****************************************************************************/
7
10
12
13/****************************************************************************/
14
15static void handle_fpe(int n UNUSED)
16{
19}
20
21void pre_exec(void)
22{
23#ifndef _WIN32
24#ifdef SIGFPE
25 struct sigaction act;
26
27 act.sa_handler = &handle_fpe;
28 act.sa_flags = 0;
29 sigemptyset(&act.sa_mask);
30
32#endif
33#endif
34
36}
37
38void post_exec(void)
39{
40#ifndef _WIN32
41#ifdef SIGFPE
42 struct sigaction act;
43
44 act.sa_handler = SIG_DFL;
45 act.sa_flags = 0;
46 sigemptyset(&act.sa_mask);
47
49#endif
50#endif
51}
52
53/****************************************************************************/
54
55void calc_init(int cols)
56{
57 columns = cols;
58}
59
60/****************************************************************************/
volatile int floating_point_exception
Definition calc.c:8
int columns
Definition calc.c:11
void pre_exec(void)
Definition calc.c:21
void post_exec(void)
Definition calc.c:38
void calc_init(int cols)
Definition calc.c:55
volatile int floating_point_exception_occurred
Definition calc.c:9
#define NULL
Definition ccmath.h:32
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
Definition gis.h:46