12 #ifndef __ZEDA_CSV_H__ 13 #define __ZEDA_CSV_H__ 40 #define zCSVLineNum(csv) (csv)->nl 52 #define zCSVIsEOF(csv) feof( (csv)->fp ) 55 #define zCSVLineIsEmpty(csv) ( (csv)->buf[0] == '\0' ) char * zCSVGoToLine(zCSV *csv, int i)
go to a specified line in a CSV file.
long * pos
Definition: zeda_csv.h:34
int nl
Definition: zeda_csv.h:33
CSV manager class.
Definition: zeda_csv.h:31
#define __END_DECLS
Definition: zeda_defs.h:30
bool zCSVGetDoubleN(zCSV *csv, double val[], int n)
get multiple double-precision floating-point values from the current buffer of a CSV file...
#define BUFSIZ
default buffer size.
Definition: zeda_defs.h:56
char * zCSVGetLine(zCSV *csv)
get a line from the current stream of a CSV file.
bool zCSVGetDouble(zCSV *csv, double *val)
get a double-precision floating-point value from the current buffer of a CSV file.
int nf
Definition: zeda_csv.h:35
FILE * fp
Definition: zeda_csv.h:32
zCSV * zCSVOpen(zCSV *csv, char filename[])
open a CSV file.
bool zCSVGetIntN(zCSV *csv, int val[], int n)
get multiple integer values from the current buffer of a CSV file.
#define __BEGIN_DECLS
Definition: zeda_defs.h:26
char * zCSVSkipField(zCSV *csv)
skip a field from the current buffer of a CSV file.
void zCSVRewind(zCSV *csv)
rewind the stream of a CSV file.
void zCSVClose(zCSV *csv)
close a CSV file.
#define __EXPORT
Definition: zeda_compat.h:32
char * zCSVGetField(zCSV *csv, char *field, size_t size)
get a field from the current buffer of a CSV file.
bool zCSVGetInt(zCSV *csv, int *val)
get an integer value from the current buffer of a CSV file.