35 char buff[2001],
buf1[2001];
40 G_debug(3,
"dig_read_frmt_ascii()");
46 if (!(ptr =
strchr(buff,
':'))) {
47 G_warning(
_(
"Vector format not recognized: %s"), buff);
52 if (len >=
sizeof(
buf1)) {
56 buf1[ptr - buff] =
'\0';
74 G_warning(
_(
"Vector format not recognized: %s"), buff);
85 G_warning(
_(
"Vector format '%s' not supported"), ptr);
93 if (!(ptr =
strchr(buff,
':'))) {
94 G_warning(
_(
"Format definition is not correct: %s"), buff);
99 if (len >=
sizeof(
buf1)) {
103 buf1[ptr - buff] =
'\0';
157 G_debug(3,
"dig_write_frmt_ascii()");
159 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 G_zero(void *, int)
Zero out a buffer, buf, of length i.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
int int G_strcasecmp(const char *, const char *)
String compare ignoring case (upper or lower)
char * G_chop(char *)
Chop leading and trailing white spaces.
char * G_store(const char *)
Copy string to allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
size_t G_strlcpy(char *, const char *, size_t)
Safe string copy function.
#define GV_FORMAT_POSTGIS
PostGIS format.
#define GV_FORMAT_OGR
OGR format.
#define GV_PG_FID_COLUMN
GRASS-PostGIS data provider - default fid column.
int dig_read_frmt_ascii(FILE *dascii, struct Format_info *finfo)
Read external vector format file.
int dig_write_frmt_ascii(FILE *dascii, struct Format_info *finfo, int format)
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.