GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
g3dnull.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/types.h>
4 #include <unistd.h>
5 #include "G3d_intern.h"
6 
7 /*---------------------------------------------------------------------------*/
8 
9 int G3d_isNullValueNum(const void *n, int type)
10 {
11  if (type == FCELL_TYPE)
12  return G_is_f_null_value(n);
13  else
14  return G_is_d_null_value(n);
15 }
16 
17 /*---------------------------------------------------------------------------*/
18 
19 
32 void G3d_setNullValue(void *c, int nofElts, int type)
33 {
34  if (type == FCELL_TYPE) {
35  G_set_f_null_value((float *)c, nofElts);
36  return;
37  }
38 
39  G_set_d_null_value((double *)c, nofElts);
40 }