#include #include #include "xiso.h" char *dirs[11]={"n", "ne", "e", "se", "s", "sw", "w", "nw", "q", "h","l"}; char parseResp(void) { char ms[81], *c, i; scanf("%s", &ms); c=strtok(ms, " "); for(i=0; i<11; i++) { if(mstreq(c, dirs[i])) { return i; } } printf("That is not a valid command.\n"); return '\0'; }