GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Go to the source code of this file.
Functions | |
void | M__add_element (const char *, const char *) |
Add element to the list. More... | |
int | M_do_copy (int, const char *, const char *, const char *) |
Copy element. More... | |
void | M_do_list (int, const char *) |
List elements. More... | |
int | M_do_remove (int, const char *) |
Remove elements from data base. More... | |
int | M_do_rename (int, const char *, const char *) |
Rename element. More... | |
int | M__empty (char *) |
Check if element is empty. More... | |
const char * | M_find (int, char *, const char *) |
Find element in data base. More... | |
int | M__get_description_len (int) |
Get max length of element's description. More... | |
int | M_get_element (const char *) |
Find element type by name. More... | |
const struct list * | M_get_list (int) |
Get list structure. More... | |
int | M_read_list (int, int *) |
Read list of elements. More... | |
struct Option * | M_define_option (int, const char *, int) |
Define option for parser. More... | |
const char * | M_get_options (int) |
Get list of element types separated by comma. More... | |
const char * | M_get_option_desc (int) |
Get list of element desc separated by comma. More... | |
void | M_show_elements (void) |
Print element name/desc to stdout. More... | |
int | M__hold_signals (int) |
Hold signals. More... | |
void M__add_element | ( | const char * | elem, |
const char * | desc | ||
) |
Add element to the list.
elem | element name |
desc | description of the element |
Definition at line 24 of file add_elem.c.
References list::desc, list::element, G_realloc, G_store(), list::nelem, and nlist.
int M__empty | ( | char * | elem | ) |
Check if element is empty.
elem | element name |
Definition at line 28 of file empty.c.
References G_file_name(), G_mapset(), GPATH_MAX, and NULL.
int M__get_description_len | ( | int | n | ) |
Get max length of element's description.
n | element id |
Definition at line 25 of file get_len.c.
References l, and list::nelem.
int M__hold_signals | ( | int | hold | ) |
Hold signals.
hold |
Definition at line 24 of file sighold.c.
Referenced by M_do_copy(), M_do_remove(), and M_do_rename().
struct Option* M_define_option | ( | int | n, |
const char * | desc, | ||
int | multiple | ||
) |
Define option for parser.
n | element id |
Definition at line 28 of file option.c.
References _, list::alias, Option::description, G_asprintf(), G_define_option(), Option::gisprompt, Option::guisection, Option::key, Option::key_desc, Option::multiple, nlist, NO, NULL, Option::required, Option::type, and TYPE_STRING.
int M_do_copy | ( | int | n, |
const char * | old, | ||
const char * | mapset, | ||
const char * | new | ||
) |
Copy element.
n | element id |
old | source name |
mapset | name of source mapset |
new | destination name |
Definition at line 35 of file do_copy.c.
References _, G_debug(), G_file_name(), G_fully_qualified_name(), G_make_mapset_object_group(), G_mapset(), G_message(), G_recursive_copy(), G_remove(), G_strcasecmp(), G_verbose_message(), G_warning(), GMAPSET_MAX, GPATH_MAX, M__hold_signals(), list::nelem, and Vect_copy().
void M_do_list | ( | int | n, |
const char * | mapset | ||
) |
List elements.
n | element index in the array (negative value for all elements) |
mapset | name of mapset ("" for search path) |
Definition at line 25 of file do_list.c.
References _, G_fatal_error(), G_list_element(), nlist, and NULL.
int M_do_remove | ( | int | n, |
const char * | old | ||
) |
Remove elements from data base.
n | element id |
old | name of element to be removed |
Definition at line 33 of file do_remove.c.
References _, G_fatal_error(), G_find_raster2(), G_find_raster3d(), G_find_vector2(), G_mapset(), G_message(), G_name_is_fully_qualified(), G_remove(), G_strcasecmp(), G_verbose_message(), G_warning(), GMAPSET_MAX, GNAME_MAX, M__hold_signals(), list::nelem, NULL, and Vect_delete().
int M_do_rename | ( | int | n, |
const char * | old, | ||
const char * | new | ||
) |
Rename element.
n | element id |
old | source name |
new | destination name |
Definition at line 35 of file do_rename.c.
References _, G_find_raster2(), G_find_raster3d(), G_find_vector2(), G_mapset(), G_message(), G_remove(), G_rename(), G_strcasecmp(), G_verbose_message(), G_warning(), GMAPSET_MAX, M__hold_signals(), list::nelem, NULL, and Vect_rename().
const char* M_find | ( | int | n, |
char * | name, | ||
const char * | mapsets | ||
) |
Find element in data base.
n | element id |
name | element name |
mapsets | name of mapsets |
Definition at line 29 of file manage/find.c.
References G_find_file2(), GNAME_MAX, name, and strcpy.
int M_get_element | ( | const char * | data_type | ) |
Find element type by name.
data_type | element type |
Definition at line 42 of file manage/list.c.
References list::alias, G_strcasecmp(), and nlist.
const struct list* M_get_list | ( | int | n | ) |
Get list structure.
n | element id |
Definition at line 26 of file manage/list.c.
const char* M_get_option_desc | ( | int | do_all | ) |
const char* M_get_options | ( | int | do_all | ) |
int M_read_list | ( | int | check_if_empty, |
int * | num | ||
) |
Read list of elements.
Format:
check_if_empty | TRUE for check if element is empty |
Definition at line 48 of file read_list.c.
References list::alias, list::desc, GPATH_MAX, and list::text.
void M_show_elements | ( | void | ) |