File: function.c

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (39 lines) | stat: -rw-r--r-- 1,337 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h>
#include <string.h>

#include <grass/glocale.h>

#include "expression.h"
#include "func_proto.h"

func_desc local_func_descs[] = {{"col", c_int0, f_col},
                                {"row", c_int0, f_row},
                                {"depth", c_int0, f_depth},
                                {"ncols", c_int0, f_ncols},
                                {"nrows", c_int0, f_nrows},
                                {"ndepths", c_int0, f_ndepths},

                                {"x", c_double0, f_x},
                                {"y", c_double0, f_y},
                                {"z", c_double0, f_z},

                                {"ewres", c_double0, f_ewres},
                                {"nsres", c_double0, f_nsres},
                                {"tbres", c_double0, f_tbres},

                                {"area", c_double0, f_area},

                                {NULL, NULL, NULL}};

void print_function_names(void)
{
    int i;

    fprintf(stderr, _("Known functions:"));
    for (i = 0; calc_func_descs[i].name; i++)
        fprintf(stderr, "%c%-10s", i % 7 ? ' ' : '\n', calc_func_descs[i].name);
    for (i = 0; local_func_descs[i].name; i++)
        fprintf(stderr, "%c%-10s", i % 7 ? ' ' : '\n',
                local_func_descs[i].name);
    fprintf(stderr, "\n");
}