diff options
author | jvech <jmvalenciae@unal.edu.co> | 2024-07-24 11:45:05 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2024-07-24 11:45:05 -0500 |
commit | b9deaf6ec1ba587f2b81a63c75b696c6def33436 (patch) | |
tree | 9ca7352b2e006f9c5e75d104a91f2070db8acff9 /src/parse.h | |
parent | e83529ae7533c15c2a604fe6075a34d124d4316e (diff) |
add: file_read() function implemented
things implemented:
- Automatic file format infering
- json_read() small refactor done
- error checking in csv_read() improved
Diffstat (limited to 'src/parse.h')
-rw-r--r-- | src/parse.h | 18 |
1 files changed, 5 insertions, 13 deletions
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 |