#ifndef IO_H_ #define IO_H_ #include #include #include #include #include #include "invertedIndex.h" // Returns a malloc'ed char* of the next word in the file. NULL otherwise. // Undefined behaviour if the word is greater than 100 chars. char *getNextWord(FILE *const fptr); // Returns true if a string in the second argument exists past the fptr in a // file. bool exists_after(FILE *const fptr, char *const string); // Outputs the contents of an inverted index to the file specified by fptr. void writeInvertedIndex(FILE *const fptr, struct InvertedIndexNode *node); #endif