17#include <grass/glocale.h>
38 if (*s ==
'.' || *s == 0) {
40 _(
"Illegal filename <%s>. Cannot start with '.' or be 'NULL'."),
46 if (*s ==
'/' || *s ==
'"' || *s ==
'\'' || *s <=
' ' || *s ==
'@' ||
47 *s ==
',' || *s ==
'=' || *s ==
'*' || *s > 0176) {
48 G_warning(_(
"Illegal filename <%s>. Character <%c> not allowed.\n"),
78 if (error == G_FATAL_EXIT) {
80 _(
"Output raster map name <%s> is not valid map name"),
output);
82 else if (error == G_FATAL_PRINT) {
83 G_warning(_(
"Output raster map name <%s> is not valid map name"),
95 if (error == G_FATAL_EXIT) {
98 else if (error == G_FATAL_PRINT) {
99 G_warning(_(
"Raster map <%s> not found"), input);
107 if (strcmp(mapset,
G_mapset()) == 0) {
108 char nm[1000], ms[1000];
118 if (strcmp(in,
output) == 0) {
119 if (error == G_FATAL_EXIT) {
123 else if (error == G_FATAL_PRINT) {
const char * G_find_raster2(const char *name, const char *mapset)
Find a raster map (look but don't touch)
void G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
void G_warning(const char *msg,...)
Print a warning message to stderr.
int G_legal_filename(const char *s)
Check for legal database file name.
int G_check_input_output_name(const char *input, const char *output, int error)
Check input and output file names.
const char * G_mapset(void)
Get current mapset name.
int G_name_is_fully_qualified(const char *fullname, char *name, char *mapset)
Check if map name is fully qualified (map @ mapset)
void output(const char *fmt,...)