#include /* CharListTest.c */ #include #include #include "CharList.h" int main() { CharList list = NULL; char c; bool inserting = 1; while((c = getchar()) != EOF) { if ( c == '\n' ) continue; if ( c == '\t' ) {inserting = !inserting; continue; } if (inserting) { printf("Inserting ``%c''\n", c); fflush(stdout); insert(&list, c); } else { printf("Deleting ``%c''\n", c); fflush(stdout); delete(&list, c); } printf("Current list: ``"); printCharList(list); printf("''\n"); } return 0; }