MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / csv_init

Function csv_init

libCacheSim/traceReader/generalReader/libcsv.c:107–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107int csv_init(struct csv_parser *p, unsigned char options) {
108 /* Initialize a csv_parser object returns 0 on success, -1 on error */
109 if (p == NULL) return -1;
110
111 p->entry_buf = NULL;
112 p->pstate = ROW_NOT_BEGUN;
113 p->quoted = 0;
114 p->spaces = 0;
115 p->entry_pos = 0;
116 p->entry_size = 0;
117 p->status = 0;
118 p->options = options;
119 p->quote_char = CSV_QUOTE;
120 p->delim_char = CSV_COMMA;
121 p->is_space = NULL;
122 p->is_term = NULL;
123 p->blk_size = MEM_BLK_SIZE;
124 p->malloc_func = NULL;
125 p->realloc_func = realloc;
126 p->free_func = free;
127
128 return 0;
129}
130
131void csv_free(struct csv_parser *p) {
132 /* Free the entry_buffer of csv_parser object */

Callers 2

csv_setup_readerFunction · 0.85
csv_reset_readerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected