CHAR *m2m_fs_gets(CHAR *buf, INT32 length, M2M_T_FS_HANDLE filehandle)
Description: the function reads a character string from an already opened file. It reads starting from the character pointed by the current file data pointer plus 1 until finds a new line (\r\n) or the EOF (-1), as long as the length value is not exceeded.
Parameters:
buf:
pointer to the allocated buffer that will be filled with the characters read
from the file
length:
number of characters to be read from the file. The number must be less than the
file
size
filehandle: file handle
Return
value:
on
success: buf points to the allocated buffer
on
failure: NULL
Output
data:
on
success: the allocated buffer filled with the characters string read
from the file. The
string is a zero-terminated string.