GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 }
void G3d_setNullValue(void *c, int nofElts, int type)
Fills the vector pointed to by c with nofElts NULL-values of type.
Definition: g3dnull.c:32
void G_set_d_null_value(DCELL *dcellVals, int numVals)
Definition: null_val.c:176
int G3d_isNullValueNum(const void *n, int type)
Definition: g3dnull.c:9
int G_is_d_null_value(const DCELL *dcellVal)
Returns 1 if dcell is NULL, 0 otherwise. This will test if the value dcell is a NaN. Same test as in G_is_f_null_value().
Definition: null_val.c:306
int G_is_f_null_value(const FCELL *fcellVal)
Returns 1 if fcell is NULL, 0 otherwise. This will test if the value fcell is a NaN. It isn&#39;t good enough to test for a particular NaN bit pattern since the machine code may change this bit pattern to a different NaN. The test will be.
Definition: null_val.c:281
void G_set_f_null_value(FCELL *fcellVals, int numVals)
Definition: null_val.c:158
int n
Definition: dataquad.c:291