aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--csv.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/csv.c b/csv.c
index 818220c..19cca31 100644
--- a/csv.c
+++ b/csv.c
@@ -4,6 +4,13 @@
4#include <string.h> 4#include <string.h>
5#include "csv.h" 5#include "csv.h"
6 6
7#ifndef CSV_DEFAULT_DELIMITER
8#define CSV_DEFAULT_DELIMITER '"'
9#endif
10
11#ifndef CSV_DEFAULT_SEPARATOR
12#define CSV_DEFAULT_SEPARATOR ','
13#endif
7 14
8/* === CSV-MEMORY Interface === */ 15/* === CSV-MEMORY Interface === */
9 16
@@ -35,8 +42,8 @@ csv_mem_free(void *ptr, size_t sz, void *cb_arg)
35/* === CSV-OPTIONS Interface === */ 42/* === CSV-OPTIONS Interface === */
36 43
37const csv_options_t csv_default_options = { 44const csv_options_t csv_default_options = {
38 .field_delimiter = '"', 45 .field_delimiter = CSV_DEFAULT_DELIMITER,
39 .field_separator = ',', 46 .field_separator = CSV_DEFAULT_SEPARATOR,
40 .cb_error = NULL, 47 .cb_error = NULL,
41 .cb_allocate = csv_mem_allocate, 48 .cb_allocate = csv_mem_allocate,
42 .cb_reallocate = csv_mem_reallocate, 49 .cb_reallocate = csv_mem_reallocate,