- the final '\0'. When EOF is reached (i.e. on the call
- after the last token is read), -1 is returned and tokenbuffer
- isn't modified.
-
- This function will work properly on lines containing NUL bytes
- and on files that aren't newline-terminated. */
-
-long
-readtoken (stream, delim, n_delim, tokenbuffer)
- FILE *stream;
- const char *delim;
- int n_delim;
- token_buffer *tokenbuffer;
+ the final '\0'. Upon EOF (i.e. on the call after the last
+ token is read) or error, return -1 without modifying tokenbuffer.
+ The EOF and error conditions may be distinguished in the caller
+ by testing ferror (STREAM).
+
+ This function works properly on lines containing NUL bytes
+ and on files do not end with a delimiter. */
+
+size_t
+readtoken (FILE *stream,
+ const char *delim,
+ size_t n_delim,
+ token_buffer *tokenbuffer)