36 static const char *keywords[] = {
"and",
"or",
"not",
NULL };
40 sprintf(buf,
"%s", s);
42 if (*s ==
'.' || *s == 0) {
43 G_warning(
_(
"Illegal vector map name <%s>. May not contain '.' or 'NULL'."),
49 if (!((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z'))) {
50 G_warning(
_(
"Illegal vector map name <%s>. Must start with a letter."),
56 if (!((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z') ||
57 (*s >=
'0' && *s <=
'9') || *s ==
'_')) {
58 G_warning(
_(
"Illegal vector map name <%s>. Character '%c' not allowed."),
63 for (i = 0; keywords[i]; i++)
65 G_warning(
_(
"Illegal vector map name <%s>. SQL keyword cannot be used as vector map name."),
100 G_fatal_error(
_(
"Output vector map name <%s> is not in the current mapset (%s)"),
104 G_warning(
_(
"Output vector map name <%s> is not in the current mapset (%s)"),
117 G_fatal_error(
_(
"Output vector map name <%s> is not SQL compliant"),
121 G_warning(
_(
"Output vector map name <%s> is not SQL compliant"),
131 if (strcasecmp(ims,
"ogr") != 0)
139 if (mapset ==
NULL) {
144 G_warning(
_(
"Vector map <%s> not found"), input);
152 if (strcmp(mapset,
G_mapset()) == 0) {
157 if (strcmp(input, output) == 0) {
163 G_warning(
_(
"Output vector map <%s> is used as input"),
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
const char * G_find_vector2(const char *, const char *)
Find a vector map (look but don't touch)
int int G_strcasecmp(const char *, const char *)
String compare ignoring case (upper or lower)
int Vect_legal_filename(const char *s)
Check if output is legal vector name.
void output(const char *fmt,...)
int Vect_check_input_output_name(const char *input, const char *output, int error)
Check for input and output vector map name.
const char * G_mapset(void)
Get current mapset name.
void G_warning(const char *,...) __attribute__((format(printf
int G_name_is_fully_qualified(const char *, char *, char *)
Check if map name is fully qualified (map @ mapset)