fh.h (451B)
1 /* 'fh.h' is here to provide useful functions to mess about with files. 2 */ 3 4 #ifndef FH_H 5 #define FH_H 6 7 #include <stdio.h> 8 #include <stdlib.h> 9 10 #include "helper.h" 11 12 typedef unsigned char byte_t; 13 14 /* Reads n bytes, n passed as @param long, returns array of byte_t 15 */ 16 byte_t* read_bytes(FILE*, long); 17 18 /* Reads a byte, returns byte_t 19 */ 20 byte_t read_byte(FILE*); 21 22 /* Determines filesize, returns size as long 23 */ 24 long read_size(FILE*); 25 26 #endif // FH_H