/*****************************************************************************

This is file fgetword.h.

*****************************************************************************/

#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 \0 which fgetword places at the end 
   of each word returned in word[]). */

/* Example: from file containing "  hello \n\tworld ! ", 
   itterative use of fgetword would return:
   1) 6
   2) 6
   3) 2
   4) 0
*/
