GRASS GIS 7 Programmer's Manual
7.8.2(2019)-exported
|
Go to the documentation of this file.
15 #include <grass/gis.h>
16 #include <grass/glocale.h>
18 #include "manage_local_proto.h"
37 p->key =
list[n].alias;
38 p->type = TYPE_STRING;
42 p->key_desc =
"from,to";
44 p->multiple = multiple;
50 if (strcmp(p->key,
"raster") == 0 || strcmp(p->key,
"raster_3d") == 0)
51 p->guisection = _(
"Raster");
52 else if (strcmp(p->key,
"vector") == 0)
53 p->guisection = _(
"Vector");
54 else if (strcmp(p->key,
"region") == 0)
55 p->guisection = _(
"Region");
56 else if (strcmp(p->key,
"group") == 0)
57 p->guisection = _(
"Group");
76 for (len = 0, n = 0; n <
nlist; n++)
77 len += strlen(
list[n].alias) + 1;
82 for (n = 0; n <
nlist; n++) {
85 strcat(str,
list[n].alias);
88 strcpy(str,
list[n].alias);
110 const char *str_all =
"all;all types";
112 for (len = 0, n = 0; n <
nlist; n++) {
113 len += strlen(
list[n].alias) + 1;
114 len += strlen(
list[n].text) + 1;
117 len += strlen(str_all) + 1;
120 for (n = 0; n <
nlist; n++) {
123 strcat(str,
list[n].alias);
125 strcat(str,
list[n].text);
128 strcpy(str,
list[n].alias);
130 strcat(str,
list[n].text);
136 strcat(str, str_all);
struct Option * M_define_option(int n, const char *desc, int multiple)
Define option for parser.
int G_asprintf(char **out, const char *fmt,...)
const char * M_get_options(int do_all)
Get list of element types separated by comma.
struct Option * G_define_option(void)
Initializes an Option struct.
const char * M_get_option_desc(int do_all)
Get list of element desc separated by comma.