19 #include <grass/gis.h>
20 #include <grass/glocale.h>
38 if (*s ==
'.' || *s == 0) {
39 fprintf(stderr, _(
"Illegal filename. Cannot be '.' or 'NULL'\n"));
44 if (*s ==
'/' || *s ==
'"' || *s ==
'\'' || *s <=
' ' ||
45 *s ==
'@' || *s ==
',' || *s ==
'=' || *s ==
'*' || *s > 0176) {
47 _(
"Illegal filename. Character <%c> not allowed.\n"), *s);
76 if (error == GR_FATAL_EXIT) {
77 G_fatal_error(_(
"Output raster map name <%s> is not valid map name"),
80 else if (error == GR_FATAL_PRINT) {
81 G_warning(_(
"Output raster map name <%s> is not valid map name"),
93 if (error == GR_FATAL_EXIT) {
96 else if (error == GR_FATAL_PRINT) {
97 G_warning(_(
"Raster map <%s> not found"), input);
105 if (strcmp(mapset,
G_mapset()) == 0) {
106 char nm[1000], ms[1000];
116 if (strcmp(in, output) == 0) {
117 if (error == GR_FATAL_EXIT) {
121 else if (error == GR_FATAL_PRINT) {
122 G_warning(_(
"Output raster map <%s> is used as input"),
char * G_mapset(void)
current mapset name
char * G_find_cell2(const char *name, const char *mapset)
find a raster map (look but don't touch)
int G_check_input_output_name(const char *input, const char *output, int error)
Check input and output file names.
G_warning("category support for [%s] in mapset [%s] %s", name, mapset, type)
int G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
int G_legal_filename(const char *s)
Check for legal database file name.
void output(const char *fmt,...)
int G__name_is_fully_qualified(const char *fullname, char *name, char *mapset)
Check if map name is fully qualified (map @ mapset)