19#include <grass/vector.h>
20#include <grass/raster3d.h>
21#include <grass/glocale.h>
23#include "manage_local_proto.h"
42 G_message(_(
"Rename %s <%s> to <%s>"),
list[n].maindesc, old,
new);
51 G_warning(_(
"Vector map <%s> not found"), old);
54 ret = Vect_rename(old,
new);
59 G_warning(_(
"Unable to rename vector map <%s> to <%s>"), old,
68 G_warning(_(
"Raster map <%s> not found"), old);
73 G_warning(_(
"3D raster map <%s> not found"), old);
76 for (i = 0; i <
list[n].nelem; i++) {
94 char colr2[6 + GMAPSET_MAX];
96 if (snprintf(colr2, 6 + GMAPSET_MAX,
"colr2/%s",
G_mapset()) >=
99 _(
"String for secondary color table has been truncated"));
101 switch (
G_rename(colr2, old,
new)) {
103 G_warning(_(
"Unable to rename %s"), colr2);
119 G_warning(_(
"<%s> nothing renamed"), old);
int M_do_rename(int n, const char *old, const char *new)
Rename element.
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.
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_verbose_message(const char *msg,...)
Print a message to stderr but only if module is in verbose mode.
void G_message(const char *msg,...)
Print a message to stderr.
void G_warning(const char *msg,...)
Print a warning message to stderr.
const char * G_mapset(void)
Get current mapset name.
int G_remove(const char *element, const char *name)
Remove a database file.
int G_rename(const char *element, const char *oldname, const char *newname)
Rename a database file.
int M__hold_signals(int hold)
Hold signals.
int G_strcasecmp(const char *x, const char *y)
String compare ignoring case (upper or lower)