diff options
| author | nasr <nsrddyn@gmail.com> | 2026-03-08 21:01:43 +0000 |
|---|---|---|
| committer | nasr <nsrddyn@gmail.com> | 2026-03-08 21:01:43 +0000 |
| commit | 71ced998122c357bc62e54d9bb4e124c88acf94b (patch) | |
| tree | 746fca3d71a8640478ad6b6f4429a19f4dfbbda8 /source/storage/csv_reader.h | |
| parent | f8f24f8c67fe903e267ab29bb2fbb9d334a722de (diff) | |
refactor(main): worked on string handling in C and other stuff
Diffstat (limited to 'source/storage/csv_reader.h')
| -rw-r--r-- | source/storage/csv_reader.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/source/storage/csv_reader.h b/source/storage/csv_reader.h deleted file mode 100644 index 36e07a4..0000000 --- a/source/storage/csv_reader.h +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | #ifndef CSV_READER_H | ||
| 2 | #define CSV_READER_H | ||
| 3 | |||
| 4 | typedef struct csv_row csv_row; | ||
| 5 | struct csv_row | ||
| 6 | { | ||
| 7 | // array of size col_count, points into mmap buffer | ||
| 8 | string8 *fields; | ||
| 9 | i32 count; | ||
| 10 | }; | ||
| 11 | |||
| 12 | typedef struct csv_table csv_table; | ||
| 13 | struct csv_table | ||
| 14 | { | ||
| 15 | // first row, col names | ||
| 16 | // all data rows | ||
| 17 | string8 *headers; | ||
| 18 | csv_row *rows; | ||
| 19 | i32 col_count; | ||
| 20 | i32 row_count; | ||
| 21 | }; | ||
| 22 | |||
| 23 | read_only global_variable | ||
| 24 | csv_row nil_csv_row = | ||
| 25 | { | ||
| 26 | .fields = &nil_string, | ||
| 27 | .count = 0, | ||
| 28 | }; | ||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | read_only global_variable | ||
| 33 | csv_table nil_csv_table = | ||
| 34 | { | ||
| 35 | .headers = &nil_string, | ||
| 36 | .rows = &nil_csv_row, | ||
| 37 | .col_count = 0, | ||
| 38 | .row_count = 0, | ||
| 39 | }; | ||
| 40 | |||
| 41 | |||
| 42 | |||
| 43 | #endif /* CSV_READER_H */ | ||
