2 #include <grass/dbmi.h>
3 #include <grass/glocale.h>
21 sprintf(buf,
"%s", s);
23 if (*s ==
'.' || *s == 0) {
25 _(
"Illegal table map name <%s>. May not contain '.' or 'NULL'.\n"),
31 if (!((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z'))) {
33 _(
"Illegal table map name <%s>. Must start with a letter.\n"),
40 ((*s >=
'A' && *s <=
'Z') || (*s >=
'a' && *s <=
'z') ||
41 (*s >=
'0' && *s <=
'9') || *s ==
'_' || *s ==
'@')) {
43 _(
"Illegal table map name <%s>. Character <%c> not allowed.\n"),
int db_legal_tablename(const char *s)