~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/raster3d/null.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <stdlib.h>
 
3
#include <sys/types.h>
 
4
#include <unistd.h>
 
5
 
 
6
#include <grass/raster.h>
 
7
 
 
8
#include "raster3d_intern.h"
 
9
 
 
10
/*---------------------------------------------------------------------------*/
 
11
 
 
12
int Rast3d_is_null_value_num(const void *n, int type)
 
13
{
 
14
    if (type == FCELL_TYPE)
 
15
        return Rast_is_f_null_value(n);
 
16
    else
 
17
        return Rast_is_d_null_value(n);
 
18
}
 
19
 
 
20
/*---------------------------------------------------------------------------*/
 
21
 
 
22
 
 
23
/*!
 
24
 * \brief 
 
25
 *
 
26
 * Fills the vector pointed to by <em>c</em> with <em>nofElts</em> NULL-values
 
27
 * of <em>type</em>.
 
28
 *
 
29
 *  \param c
 
30
 *  \param nofElts
 
31
 *  \param type
 
32
 *  \return void
 
33
 */
 
34
 
 
35
void Rast3d_set_null_value(void *c, int nofElts, int type)
 
36
{
 
37
    if (type == FCELL_TYPE) {
 
38
        Rast_set_f_null_value((float *)c, nofElts);
 
39
        return;
 
40
    }
 
41
 
 
42
    Rast_set_d_null_value((double *)c, nofElts);
 
43
}