GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
do_rename.c File Reference

Manage Library - Rename elements. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/vector.h>
#include <grass/raster3d.h>
#include <grass/glocale.h>
#include "manage_local_proto.h"
Include dependency graph for do_rename.c:

Go to the source code of this file.

Functions

int M_do_rename (int n, const char *old, const char *new)
 Rename element. More...
 

Detailed Description

Manage Library - Rename elements.

(C) 2001-2011 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Original author CERL

Definition in file do_rename.c.

Function Documentation

◆ M_do_rename()

int M_do_rename ( int  n,
const char *  old,
const char *  new 
)

Rename element.

Parameters
nelement id
oldsource name
newdestination name
Returns
0 on success
1 on error

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().