From 63f11aaec8d21844a07fd27003a992c102a3a297 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Fri, 27 Dec 2024 20:05:06 -0800 Subject: make directory structure for client --- src/tsv.c | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/tsv.c (limited to 'src/tsv.c') diff --git a/src/tsv.c b/src/tsv.c deleted file mode 100644 index 9b1c2be..0000000 --- a/src/tsv.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include - -#include -#include -#include - -tsv_t *init_tsv(char *source) { - tsv_t *tsv = safe_calloc(1, sizeof(tsv_t *)); - tsv->source = source; - tsv->i = 0; - tsv->c = tsv->source[tsv->i]; - return tsv; -} - -void tsv_move(tsv_t *tsv) { - if (tsv->c != '\0') { - tsv->i++; - tsv->c = tsv->source[tsv->i]; - } -} - -string_t *tsv_next(tsv_t *tsv) { - string_t *s = init_string(NULL); - bool escape = false; - while (tsv->c != '\t' && !escape) { - if (tsv->c == '\0') break; - string_push(s, tsv->c); - tsv_move(tsv); - } - return s; -} -- cgit