#include #include #define NUM_WORDS 70 static char word_list[NUM_WORDS][20]={ "already","cottage","peasant","There's","Trogdor", "little","you're","You're", "about","can't","don't","there","There", "baby","dead","from","have","here","into","it's","It's","just","like","says","some","that","That","this","with","your", "all","and","are","but","for","get","got","him","his","not","now","old","one","out","see","the","The","was","you","You", "an","at","be","do","go","he","He","in","is","it","It","my","no","No","of","on","or","so","to","up", }; static char replacement_list[NUM_WORDS][32]={ "DIALOG_ALREADY", "DIALOG_COTTAGE", "DIALOG_PEASANT", "DIALOG_CAPITAL_THERES", "DIALOG_CAPITAL_TROGDOR", "DIALOG_LITTLE", "DIALOG_YOURE", "DIALOG_CAPITAL_YOURE", "DIALOG_ABOUT", "DIALOG_CANT", "DIALOG_DONT", "DIALOG_THERE", "DIALOG_CAPITAL_THERE", "DIALOG_BABY", "DIALOG_DEAD", "DIALOG_FROM", "DIALOG_HAVE", "DIALOG_HERE", "DIALOG_INTO", "DIALOG_ITS", "DIALOG_CAPITAL_ITS", "DIALOG_JUST", "DIALOG_LIKE", "DIALOG_SAYS", "DIALOG_SOME", "DIALOG_THAT", "DIALOG_CAPITAL_THAT", "DIALOG_THIS", "DIALOG_WITH", "DIALOG_YOUR", "DIALOG_ALL", "DIALOG_AND", "DIALOG_ARE", "DIALOG_BUT", "DIALOG_FOR", "DIALOG_GET", "DIALOG_GOT", "DIALOG_HIM", "DIALOG_HIS", "DIALOG_NOT", "DIALOG_NOW", "DIALOG_OLD", "DIALOG_ONE", "DIALOG_OUT", "DIALOG_SEE", "DIALOG_THE", "DIALOG_CAPITAL_THE", "DIALOG_WAS", "DIALOG_YOU", "DIALOG_CAPITAL_YOU", "DIALOG_AN", "DIALOG_AT", "DIALOG_BE", "DIALOG_DO", "DIALOG_GO", "DIALOG_HE", "DIALOG_CAPITAL_HE", "DIALOG_IN", "DIALOG_IS", "DIALOG_IT", "DIALOG_CAPITAL_IT", "DIALOG_MY", "DIALOG_NO", "DIALOG_CAPITAL_NO", "DIALOG_OF", "DIALOG_ON", "DIALOG_OR", "DIALOG_SO", "DIALOG_TO", "DIALOG_UP", }; static int char_count=0,orig_count=0; void parse_line(char *string) { int len; int i,j; int in_string=0; int in_quote=0; int dotfound=0,bfound=0,yfound=0,tfound=0,efound=0; len=strlen(string); for(i=0;i