36 static const char *keywords[] = {
"and",
"or",
"not",
NULL};
40 snprintf(buf,
sizeof(buf),
"%s", s);
42 if (*s ==
'.' || *s == 0) {
44 _(
"Illegal vector map name <%s>. May not contain '.' or 'NULL'."),
50 if (!((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z'))) {
51 G_warning(
_(
"Illegal vector map name <%s>. Must start with a letter."),
57 if (!((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z') ||
58 (*s >=
'0' && *s <=
'9') || *s ==
'_')) {
60 _(
"Illegal vector map name <%s>. Character '%c' not allowed."),
65 for (i = 0; keywords[i]; i++)
67 G_warning(
_(
"Illegal vector map name <%s>. SQL keyword cannot be "
68 "used as vector map name."),
103 "current mapset (%s)"),
107 G_warning(
_(
"Output vector map name <%s> is not in the current "
121 G_fatal_error(
_(
"Output vector map name <%s> is not SQL compliant"),
125 G_warning(
_(
"Output vector map name <%s> is not SQL compliant"),
143 if (mapset ==
NULL) {
148 G_warning(
_(
"Vector map <%s> not found"), input);
156 if (strcmp(mapset,
G_mapset()) == 0) {
161 if (strcmp(input,
output) == 0) {
int G_name_is_fully_qualified(const char *, char *, char *)
Check if map name is fully qualified (map @ mapset)
const char * G_find_vector2(const char *, const char *)
Find a vector map (look but don't touch)
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
const char * G_mapset(void)
Get current mapset name.
int int G_strcasecmp(const char *, const char *)
String compare ignoring case (upper or lower)
int Vect_check_input_output_name(const char *input, const char *output, int error)
Check for input and output vector map name.
int Vect_legal_filename(const char *s)
Check if output is legal vector name.
void output(const char *fmt,...)