From b9deaf6ec1ba587f2b81a63c75b696c6def33436 Mon Sep 17 00:00:00 2001 From: jvech Date: Wed, 24 Jul 2024 11:45:05 -0500 Subject: add: file_read() function implemented things implemented: - Automatic file format infering - json_read() small refactor done - error checking in csv_read() improved --- src/parse.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/parse.h') diff --git a/src/parse.h b/src/parse.h index 05cafa2..d5f99d0 100644 --- a/src/parse.h +++ b/src/parse.h @@ -9,21 +9,13 @@ typedef struct Array { size_t shape[2]; } Array; -void json_read( - FILE *fp, - Array *input, Array *out, - char *out_keys[], size_t out_keys_size, - char *in_keys[], size_t in_keys_size, - bool read_output - ); -void csv_read( - FILE *fp, +void file_read( + char *filepath, Array *input, Array *out, - char *in_cols[], size_t in_cols_size, - char *out_cols[], size_t out_cols_size, + char *in_keys[], size_t n_in_keys, + char *out_keys[], size_t n_out_keys, bool read_output, - bool has_header, - char separator + char *file_format ); #endif -- cgit v1.2.3-70-g09d2