0 if successful, line contains the string.
1 if the end of file is reached, line contains the string.
-1 if an error occurs, line contains a description of the error.