summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--csv.c2
-rw-r--r--csv.h16
2 files changed, 15 insertions, 3 deletions
diff --git a/csv.c b/csv.c
index a155cb4..020a221 100644
--- a/csv.c
+++ b/csv.c
@@ -465,7 +465,7 @@ csv_write_field(FILE *out, const char *field, const csv_options_t * const csv_op
465} 465}
466 466
467void 467void
468csv_write(FILE *out, int n, const char *fields[], const csv_options_t * csv_options) 468csv_write_ex(FILE *out, int n, const char *fields[], const csv_options_t * csv_options)
469{ 469{
470 assert(out != NULL); 470 assert(out != NULL);
471 assert(fields != NULL); 471 assert(fields != NULL);
diff --git a/csv.h b/csv.h
index 6542103..690df89 100644
--- a/csv.h
+++ b/csv.h
@@ -47,14 +47,26 @@ typedef struct {
47 csv_field_t csv_field; 47 csv_field_t csv_field;
48} csv_t; 48} csv_t;
49 49
50/* initialization */
50void csv_init(csv_t *csv); 51void csv_init(csv_t *csv);
51void csv_init_opt(csv_t *csv, const csv_options_t * const csv_options); 52void csv_init_opt(csv_t *csv, const csv_options_t * const csv_options);
53
54/* cleanup after error */
52void csv_cleanup(csv_t *csv); 55void csv_cleanup(csv_t *csv);
56
57/* read */
58int csv_read(csv_t *csv, FILE *in);
59
60/* field access */
53int csv_nfields(csv_t *csv); 61int csv_nfields(csv_t *csv);
54const char * csv_field(csv_t *csv, int idx); 62const char * csv_field(csv_t *csv, int idx);
55int csv_read(csv_t *csv, FILE *in); 63
64/* write */
65void csv_write(FILE *out, const csv_t * const csv);
66void csv_write_ex(FILE *out, int n, const char *fields[], const csv_options_t * const csv_options);
67
68/* error handling */
56const char * csv_err_str(csv_err_t csv_err); 69const char * csv_err_str(csv_err_t csv_err);
57void csv_write(FILE *out, int n, const char *fields[], const csv_options_t * const csv_options);
58 70
59#ifdef __cplusplus 71#ifdef __cplusplus
60} 72}