summaryrefslogtreecommitdiff
path: root/csv.c
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2020-06-23 15:52:51 +0200
committerThomas Schmucker <ts@its1.de>2020-06-23 15:52:51 +0200
commit0572a236e0f6813722186506c71e32fbc756859c (patch)
tree888d5e8e42314f3e70bc084a0944a423fb9ffe05 /csv.c
parent8e747d67c7b53ba51da73ea172a5ea297edbfc52 (diff)
downloadlibcsv-0572a236e0f6813722186506c71e32fbc756859c.tar.gz
libcsv-0572a236e0f6813722186506c71e32fbc756859c.tar.bz2
libcsv-0572a236e0f6813722186506c71e32fbc756859c.zip
Erlaube Compile-Optionen für Feldtrenner und Feldbegrenzer
Diffstat (limited to 'csv.c')
-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,