1#ifndef VSF_FILESTR_H 2#define VSF_FILESTR_H 3 4/* Forward declares */ 5struct mystr; 6 7/* str_fileread() 8 * PURPOSE 9 * Read the contents of a file into a string buffer, up to a size limit of 10 * "maxsize" 11 * PARAMETERS 12 * p_str - destination buffer object to contain the file 13 * p_filename - the filename to try and read into the buffer 14 * maxsize - the maximum amount of buffer we will fill. Larger files will 15 * be truncated. 16 * RETURNS 17 * An integer representing the success/failure of opening the file 18 * "p_filename". Zero indicates success. If successful, the file is read into 19 * the "p_str" string object. If not successful, "p_str" will point to an 20 * empty buffer. 21 */ 22int str_fileread(struct mystr* p_str, const char* p_filename, 23 unsigned int maxsize); 24 25#endif /* VSF_FILESTR_H */ 26 27