GRASS GIS 7 Programmer's Manual
7.8.4(2020)-exported
|
Go to the documentation of this file.
17 #include <grass/gis.h>
18 #include <grass/vector.h>
19 #include <grass/raster3d.h>
20 #include <grass/glocale.h>
22 #include "manage_local_proto.h"
43 list[n].maindesc, old,
new);
54 G_warning(_(
"Vector map <%s> not found"), old);
57 ret = Vect_rename(old,
new);
62 G_warning(_(
"Unable to rename vector map <%s> to <%s>"),
71 G_warning(_(
"Raster map <%s> not found"), old);
76 G_warning(_(
"3D raster map <%s> not found"), old);
79 for (i = 0; i <
list[n].nelem; i++) {
99 sprintf(colr2,
"colr2/%s",
G_mapset());
101 switch (
G_rename(colr2, old,
new)) {
103 G_warning(_(
"Unable to rename %s"), colr2);
119 G_warning(_(
"<%s> nothing renamed"), old);
int G_strcasecmp(const char *x, const char *y)
String compare ignoring case (upper or lower)
void G_verbose_message(const char *msg,...)
Print a message to stderr but only if module is in verbose mode.
const char * G_mapset(void)
Get current mapset name.
int G_rename(const char *element, const char *oldname, const char *newname)
Rename a database file.
const char * G_find_raster2(const char *name, const char *mapset)
Find a raster map (look but don't touch)
const char * G_find_vector2(const char *name, const char *mapset)
Find a vector map (look but don't touch)
void G_message(const char *msg,...)
Print a message to stderr.
int M__hold_signals(int hold)
Hold signals.
int G_remove(const char *element, const char *name)
Remove a database file.
const char * G_find_raster3d(const char *name, const char *mapset)
Search for a 3D raster map in current search path or in a specified mapset.
int M__get_description_len(int n)
Get max length of element's description.
void G_warning(const char *msg,...)
Print a warning message to stderr.
int M_do_rename(int n, const char *old, const char *new)
Rename element.