GRASS GIS 7 Programmer's Manual
7.0.2(2015)-r00000
Main Page
Related Pages
Data Structures
Files
File List
Globals
add_elem.c
Go to the documentation of this file.
1
14
#include <grass/gis.h>
15
16
#include "manage_local_proto.h"
17
24
void
M__add_element
(
const
char
*elem,
const
char
*desc)
25
{
26
int
n;
27
int
nelem;
28
29
if
(*desc == 0)
30
desc = elem;
31
32
n =
nlist
- 1;
33
nelem =
list
[n].nelem++;
34
list
[n].element = G_realloc(
list
[n].
element
, (nelem + 1) *
sizeof
(
const
char
*));
35
list
[n].element[nelem] =
G_store
(elem);
36
list
[n].desc = G_realloc(
list
[n].desc, (nelem + 1) *
sizeof
(
const
char
*));
37
list
[n].desc[nelem] =
G_store
(desc);
38
}
M__add_element
void M__add_element(const char *elem, const char *desc)
Add element to the list.
Definition:
add_elem.c:24
nlist
int nlist
Definition:
read_list.c:23
G_store
char * G_store(const char *s)
Copy string to allocated memory.
Definition:
strings.c:86
element
Definition:
lidar.h:89
list
struct list * list
Definition:
read_list.c:24
manage
add_elem.c
Generated on Thu Dec 3 2015 05:16:14 for GRASS GIS 7 Programmer's Manual by
1.8.9.1