17 lines
486 B
C
17 lines
486 B
C
/*We can use CPP tricks to avoid parsing the same header file more than once*/
|
|
#ifndef FILE2CHAR_H
|
|
#define FILE2CHAR_H
|
|
|
|
/*
|
|
* convert_file2char reads the file identified by 'path' into a character buffer
|
|
* pointed at by 'buf'.
|
|
* On success, 0 is returned.
|
|
* On failure, exit(EXIT_FAILURE) is returned.
|
|
*
|
|
* WARNING: convert_file2char malloc()s memory to '*buf' which must be freed by
|
|
* the caller.
|
|
*/
|
|
int convert_file2char(char const* path, char **buf);
|
|
|
|
#endif /* FILE2CHAR_H */
|