int buildin(char * s){ int rt = 0; //exit if(strcmp("exit",s) == 0){ rt = 1; exit(0); } //hisotry if(strcmp("history",s) == 0){ rt = 1; history(); } //exclamation if (*s == '!') { rt = 1; int id = 0; IDcounter--; if (IDcounter < 0) { IDcounter = 0; } if (*(s+1) == '\0') { id = IDcounter; char* redo = exclamation(id); buildin(redo); } else{ id = atoi(s+1); char* redo = exclamation(id); buildin(redo); } } return rt; }
int main() { exclamation(); return 0; }