-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilestr.h
30 lines (24 loc) · 908 Bytes
/
filestr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef VSF_FILESTR_H
#define VSF_FILESTR_H
#pragma BOUNDS_CHECKED ON
/* Forward declares */
struct mystr;
/* str_fileread()
* PURPOSE
* Read the contents of a file into a string buffer, up to a size limit of
* "maxsize"
* PARAMETERS
* p_str - destination buffer object to contain the file
* p_filename - the filename to try and read into the buffer
* maxsize - the maximum amount of buffer we will fill. Larger files will
* be truncated.
* RETURNS
* An integer representing the success/failure of opening the file
* "p_filename". Zero indicates success. If successful, the file is read into
* the "p_str" string object. If not successful, "p_str" will point to an
* empty buffer.
*/
int str_fileread(_Ptr<struct mystr> p_str, _Nt_array_ptr<const char> p_filename,
unsigned int maxsize);
#pragma BOUNDS_CHECKED OFF
#endif /* VSF_FILESTR_H */