diff options
Diffstat (limited to 'input.h')
-rw-r--r-- | input.h | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -1,7 +1,22 @@ -size_t count_lines(FILE* file); +#ifndef DEF_INPUTH +#define DEF_INPUTH -int read_lines_as_int(FILE* file, int* result, int resultSize); +struct input_int { + size_t line_count; + int* lines; +}; -int read_lines_as_string(FILE* file, char** result, int resultSize); +struct input_str { + size_t line_count; + char** lines; +}; -void free_strings(char** strings, size_t stringCount); +void input_int_read(struct input_int* result, char* filename); + +void input_str_read(struct input_str* result, char* filename); + +void input_int_free(struct input_int* input); + +void input_str_free(struct input_str* input); + +#endif |