GRASS GIS 7 Programmer's Manual
7.8.5(2020)-exported
|
Go to the documentation of this file.
18 #include <grass/gis.h>
19 #include <grass/glocale.h>
20 #include <grass/vector.h>
22 #include "manage_local_proto.h"
35 int M_do_copy(
int n,
const char *old,
const char *mapset,
const char *
new)
38 char path[GPATH_MAX], path2[GPATH_MAX];
43 G_message(_(
"Copy %s <%s> to current mapset as <%s>"),
48 ret = Vect_copy(old, mapset,
new);
50 G_warning(_(
"Unable to copy <%s> to current mapset as <%s>"),
56 for (i = 0; i <
list[n].nelem; i++) {
59 if (access(
path, 0) != 0) {
67 G_warning(_(
"Unable to copy <%s> to current mapset as <%s>"),
79 char colr2[GNAME_MAX];
81 sprintf(colr2,
"colr2/%s",
G_mapset());
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.
void G_message(const char *msg,...)
Print a message to stderr.
char * G_file_name(char *path, const char *element, const char *name, const char *mapset)
Builds full path names to GIS data files.
char * G_fully_qualified_name(const char *name, const char *mapset)
Get fully qualified element name.
int M_do_copy(int n, const char *old, const char *mapset, const char *new)
Copy element.
int M__hold_signals(int hold)
Hold signals.
int G_recursive_copy(const char *src, const char *dst)
Copy recursively source directory to destination directory.
int G_debug(int level, const char *msg,...)
Print debugging message.
int G_remove(const char *element, const char *name)
Remove a database file.
void G_warning(const char *msg,...)
Print a warning message to stderr.
int G_make_mapset_element(const char *p_element)
Create element in the current mapset.