files.h (377B)
1 /* See LICENSE file for copyright and license details. */ 2 3 #include <stdlib.h> 4 #include <stdio.h> 5 #include <string.h> 6 7 #define BUF_SIZE 2 * 1024 * 1024 8 9 /** 10 * Read line from file `input` and return it content 11 * without new line symbol. 12 */ 13 char* freadline(FILE *input); 14 15 /** 16 * Read all content of file `input` and return it. 17 */ 18 char* freadall(FILE* input, size_t* length);