37 static const char *keywords[] = {
"and",
"or",
"not",
NULL};
41 sprintf(buf,
"%s", s);
43 if (*s ==
'.' || *s == 0) {
45 _(
"Illegal vector map name <%s>. May not contain '.' or 'NULL'."),
51 if (!((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z'))) {
52 G_warning(
_(
"Illegal vector map name <%s>. Must start with a letter."),
58 if (!((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z') ||
59 (*s >=
'0' && *s <=
'9') || *s ==
'_')) {
61 _(
"Illegal vector map name <%s>. Character '%c' not allowed."),
66 for (i = 0; keywords[i]; i++)
68 G_warning(
_(
"Illegal vector map name <%s>. SQL keyword cannot be "
69 "used as vector map name."),
105 "current mapset (%s)"),
109 G_warning(
_(
"Output vector map name <%s> is not in the current "
123 G_fatal_error(
_(
"Output vector map name <%s> is not SQL compliant"),
127 G_warning(
_(
"Output vector map name <%s> is not SQL compliant"),
137 if (strcasecmp(ims,
"ogr") != 0)
145 if (mapset ==
NULL) {
150 G_warning(
_(
"Vector map <%s> not found"), input);
158 if (strcmp(mapset,
G_mapset()) == 0) {
163 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,...)