rendered paste body#include <stdio.h>#include <ctype.h>#include <string.h>#include "wordTable.h"#define TRUE 1#define FALSE 0#define MAX_WORD_LENGTH 100char wordBuffer[MAX_WORD_LENGTH];char* readWord(FILE* fp, int retainCase){ char c = 0; char *ptr = wordBuffer; while ((c = fgetc(fp))!= EOF){ if( isalpha(c) || c == '_' ){ if (!retainCase){ c = tolower(c); } *ptr++ = c; } else { if (ptr > wordBuffer){ break; } } } if (ptr == wordBuffer){ return NULL; } *ptr = \0; return wordBuffer;}int main(int argc, char *argv[]){ int retainCase = FALSE; char *output=NULL; if (argc > 2){ fprintf(stderr, "Usage: %s [-c]\n", argv[0]); return EXIT_FAILURE; } if (argc == 2){ if ( argv[1] == "-c"){ retainCase = TRUE; } else{ fprintf(stderr, "Unknown argument '%s'\n", argv[1]); return EXIT_FAILURE; } } while ((output=readWord(stdin, retainCase)) != NULL){ addWord(output); } printWords(); return EXIT_SUCCESS;}