#include <stdio.h>

/* fgetword: get a single word from file called dataloc.
   Maximum word length n */
int fgetword(                /* Number of characters in word */
	     FILE *datafile, /* Pointer to open file holding word */
	     int n,          /* Maximum word length permitted. */
			     /* Returns first n characters if */
			     /* word is longer than n. */
	     char word[]     /* Returns actual word from datafile */
	     );

/* fgetword returns 0 when EOF is reached, and otherwise one more 
   than the length of the word read (1 more is for the \verb!\0! which 
   fgetword places at the end of each word returned in word[]). */

/* Example: from file containing ``\verb$  hello \n\tworld ! $'', 
   iterative use of fgetword would return:
   \begin{enumerate}
   \item 6
   \item 6
   \item 2
   \item 0
   \end{enumerate}
*/
