aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2020-06-23 15:42:27 +0200
committerThomas Schmucker <ts@its1.de>2020-06-23 15:42:27 +0200
commitf4f58194b9648c5910ce1c71fe2bd5ec1861e7be (patch)
treef320e0da66b33b82ab27da7525432579a6b7180d
parent4bf39b20162e7d12a53a1de607a6f83b159928f5 (diff)
downloadlibcsv-f4f58194b9648c5910ce1c71fe2bd5ec1861e7be.tar.gz
libcsv-f4f58194b9648c5910ce1c71fe2bd5ec1861e7be.tar.bz2
libcsv-f4f58194b9648c5910ce1c71fe2bd5ec1861e7be.zip
keine neuen (pseudo) Schlüsselwörter einführen...
-rw-r--r--csv.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/csv.c b/csv.c
index 736c76d..d82f531 100644
--- a/csv.c
+++ b/csv.c
@@ -4,7 +4,6 @@
4#include <string.h> 4#include <string.h>
5#include "csv.h" 5#include "csv.h"
6 6
7#define INLINE static inline
8 7
9/* === CSV-MEMORY Interface === */ 8/* === CSV-MEMORY Interface === */
10 9
@@ -46,7 +45,7 @@ const csv_options_t csv_default_options = {
46 45
47/* === CSV-ERROR Interface === */ 46/* === CSV-ERROR Interface === */
48 47
49INLINE void 48static void
50csv_fatal_error(csv_err_t csv_err, const csv_options_t * const csv_options) 49csv_fatal_error(csv_err_t csv_err, const csv_options_t * const csv_options)
51{ 50{
52 if ( csv_options->cb_error != NULL ) { 51 if ( csv_options->cb_error != NULL ) {
@@ -59,7 +58,7 @@ csv_fatal_error(csv_err_t csv_err, const csv_options_t * const csv_options)
59 58
60/* === CSV-STRING Interface === */ 59/* === CSV-STRING Interface === */
61 60
62INLINE void 61static void
63csv_string_init(csv_string_t *csv_string) 62csv_string_init(csv_string_t *csv_string)
64{ 63{
65 assert(csv_string != NULL); 64 assert(csv_string != NULL);
@@ -69,7 +68,7 @@ csv_string_init(csv_string_t *csv_string)
69 csv_string->pos = 0; 68 csv_string->pos = 0;
70} 69}
71 70
72INLINE void 71static void
73csv_string_reset(csv_string_t *csv_string) 72csv_string_reset(csv_string_t *csv_string)
74{ 73{
75 assert(csv_string != NULL); 74 assert(csv_string != NULL);
@@ -77,7 +76,7 @@ csv_string_reset(csv_string_t *csv_string)
77 csv_string->pos = 0; 76 csv_string->pos = 0;
78} 77}
79 78
80INLINE int 79static int
81csv_string_empty(csv_string_t *csv_string) 80csv_string_empty(csv_string_t *csv_string)
82{ 81{
83 assert(csv_string != NULL); 82 assert(csv_string != NULL);
@@ -85,7 +84,7 @@ csv_string_empty(csv_string_t *csv_string)
85 return ( csv_string->pos == 0 ) ? 1 : 0; 84 return ( csv_string->pos == 0 ) ? 1 : 0;
86} 85}
87 86
88INLINE void 87static void
89csv_string_append(csv_string_t *csv_string, char ch, const csv_options_t * const csv_options) 88csv_string_append(csv_string_t *csv_string, char ch, const csv_options_t * const csv_options)
90{ 89{
91 assert(csv_string != NULL); 90 assert(csv_string != NULL);
@@ -117,7 +116,7 @@ csv_string_append(csv_string_t *csv_string, char ch, const csv_options_t * const
117 csv_string->str[csv_string->pos++] = ch; /* append char */ 116 csv_string->str[csv_string->pos++] = ch; /* append char */
118} 117}
119 118
120INLINE void 119static void
121csv_string_free(csv_string_t *csv_string, const csv_options_t * const csv_options) 120csv_string_free(csv_string_t *csv_string, const csv_options_t * const csv_options)
122{ 121{
123 assert(csv_string != NULL); 122 assert(csv_string != NULL);
@@ -131,7 +130,7 @@ csv_string_free(csv_string_t *csv_string, const csv_options_t * const csv_option
131 130
132/* === CSV-FIELD Interface === */ 131/* === CSV-FIELD Interface === */
133 132
134INLINE void 133static void
135csv_field_init(csv_field_t *csv_field) 134csv_field_init(csv_field_t *csv_field)
136{ 135{
137 assert(csv_field != NULL); 136 assert(csv_field != NULL);
@@ -141,7 +140,7 @@ csv_field_init(csv_field_t *csv_field)
141 csv_field->pos = 0; 140 csv_field->pos = 0;
142} 141}
143 142
144INLINE void 143static void
145csv_field_reset(csv_field_t *csv_field) 144csv_field_reset(csv_field_t *csv_field)
146{ 145{
147 assert(csv_field != NULL); 146 assert(csv_field != NULL);
@@ -149,7 +148,7 @@ csv_field_reset(csv_field_t *csv_field)
149 csv_field->pos = 0; 148 csv_field->pos = 0;
150} 149}
151 150
152INLINE void 151static void
153csv_field_append(csv_field_t *csv_field, int idx, const csv_options_t * const csv_options) 152csv_field_append(csv_field_t *csv_field, int idx, const csv_options_t * const csv_options)
154{ 153{
155 assert(csv_field != NULL); 154 assert(csv_field != NULL);
@@ -181,7 +180,7 @@ csv_field_append(csv_field_t *csv_field, int idx, const csv_options_t * const cs
181 csv_field->fields[csv_field->pos++] = idx; /* append idx */ 180 csv_field->fields[csv_field->pos++] = idx; /* append idx */
182} 181}
183 182
184INLINE void 183static void
185csv_field_free(csv_field_t *csv_field, const csv_options_t * const csv_options) 184csv_field_free(csv_field_t *csv_field, const csv_options_t * const csv_options)
186{ 185{
187 assert(csv_field != NULL); 186 assert(csv_field != NULL);