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

« back to all changes in this revision

Viewing changes to raster/r.mapcalc/expression.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:
43
43
    e->type = type;
44
44
    e->res_type = res_type;
45
45
    e->buf = NULL;
 
46
    e->worker = NULL;
46
47
    return e;
47
48
}
48
49
 
53
54
    expression *e = allocate(expr_type_function, CELL_TYPE);
54
55
    expression **args = G_malloc(2 * sizeof(expression *));
55
56
    int *argt = G_malloc(2 * sizeof(int));
56
 
    void **argv = G_malloc(2 * sizeof(void *));
57
57
 
58
58
    argt[0] = CELL_TYPE;
59
59
 
66
66
    e->data.func.argc = 1;
67
67
    e->data.func.args = args;
68
68
    e->data.func.argt = argt;
69
 
    e->data.func.argv = argv;
 
69
    e->data.func.argv = NULL;
70
70
    return e;
71
71
}
72
72
 
75
75
    expression *e = allocate(expr_type_function, FCELL_TYPE);
76
76
    expression **args = G_malloc(2 * sizeof(expression *));
77
77
    int *argt = G_malloc(2 * sizeof(int));
78
 
    void **argv = G_malloc(2 * sizeof(void *));
79
78
 
80
79
    argt[0] = FCELL_TYPE;
81
80
 
88
87
    e->data.func.argc = 1;
89
88
    e->data.func.args = args;
90
89
    e->data.func.argt = argt;
91
 
    e->data.func.argv = argv;
 
90
    e->data.func.argv = NULL;
92
91
    return e;
93
92
}
94
93
 
97
96
    expression *e = allocate(expr_type_function, DCELL_TYPE);
98
97
    expression **args = G_malloc(2 * sizeof(expression *));
99
98
    int *argt = G_malloc(2 * sizeof(int));
100
 
    void **argv = G_malloc(2 * sizeof(void *));
101
99
 
102
100
    argt[0] = DCELL_TYPE;
103
101
 
110
108
    e->data.func.argc = 1;
111
109
    e->data.func.args = args;
112
110
    e->data.func.argt = argt;
113
 
    e->data.func.argv = argv;
 
111
    e->data.func.argv = NULL;
114
112
    return e;
115
113
}
116
114
 
243
241
    int argc = list_length(arglist);
244
242
    expression **args = G_malloc((argc + 1) * sizeof(expression *));
245
243
    int *argt = G_malloc((argc + 1) * sizeof(int));
246
 
    void **argv = G_malloc((argc + 1) * sizeof(void *));
247
244
    expression *e;
248
245
    expr_list *l;
249
246
    int i;
296
293
    e->data.func.argc = argc;
297
294
    e->data.func.args = args;
298
295
    e->data.func.argt = argt;
299
 
    e->data.func.argv = argv;
 
296
    e->data.func.argv = NULL;
300
297
    return e;
301
298
}
302
299