#include #include #define EOL (-1) extern int getword(char *lbuf, char *buf, size_t size, int first(char c), int rest(char c)); /* reads the next `word' from the string lbuf and stores it as a null-terminated string in buf[0..size-1] and returns the length of the word (not counting the terminating null character). When getword reaches the end of the string lbuf without consuming a word, it returns EOL. If a word is longer than size-1 characters, the excess characters are ignored. first and rest identify the characters that comprise a word: A word is a contiguous sequence of characters that begins with a character for which first returns nonzero followed by zero or more character for which rest returns nonzero. It is a checked runtime error for lbuf, buf, first, or rest to be NULL or for size to be 0. */