34 char buff[2001], buf1[2001];
38 G_debug(3,
"dig_read_frmt_ascii()");
41 if (
G_getl2(buff, 2000, dascii)) {
44 if (!(ptr = strchr(buff,
':'))) {
45 G_warning(
_(
"Vector format not recognized: %s"), buff);
50 buf1[ptr - buff] =
'\0';
70 G_warning(
_(
"Vector format not recognized: %s"), buff);
79 G_warning(
_(
"Vector format '%s' not supported"), ptr);
88 G_warning(
_(
"Vector format '%s' not supported"), ptr);
93 while (
G_getl2(buff, 2000, dascii)) {
96 if (!(ptr = strchr(buff,
':'))) {
97 G_warning(
_(
"Format definition is not correct: %s"), buff);
102 buf1[ptr - buff] =
'\0';
159 G_debug(3,
"dig_write_frmt_ascii()");
161 G_fatal_error(
"Format not supported by dig_write_frmt_ascii()");
int G_getl2(char *, int, FILE *)
Gets a line of text from a file of any pedigree.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
#define GV_PG_FID_COLUMN
GRASS-PostGIS data provider - default fid column.
#define GV_FORMAT_OGR
OGR format.
int dig_write_frmt_ascii(FILE *dascii, struct Format_info *finfo, int format)
int int G_strcasecmp(const char *, const char *)
String compare ignoring case (upper or lower)
#define GV_FORMAT_POSTGIS
PostGIS format.
char * G_chop(char *)
Chop leading and trailing white spaces.
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
void G_warning(const char *,...) __attribute__((format(printf
char * G_store(const char *)
Copy string to allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
int dig_read_frmt_ascii(FILE *dascii, struct Format_info *finfo)
Read external vector format file.