Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
ISS #7
Browse files Browse the repository at this point in the history
x- Delete check system command function.
  • Loading branch information
ren-yc committed Apr 5, 2022
1 parent 80c5e24 commit b7c0e98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions WCH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ int main() {
WCH_trans();
} else if (op == "update") {
WCH_update();
} else if (op != "quit") {
WCH_printlog(WCH_LOG_MODE_RC, {"ask-if-system"});
WCH_unknown();
} else {
WCH_printlog(WCH_LOG_MODE_RC, {"unknown"});
WCH_unknown(op);
}
cout << endl;
}
Expand Down
9 changes: 2 additions & 7 deletions modules/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,8 @@ void WCH_trans() {
cmd_line = true;
}

void WCH_unknown() {
printf("Is it a system command? (Y/N): ");
char tmp;
cin >> tmp;
if (tmp == 'Y') {
system(op.c_str());
}
void WCH_unknown(string op) {
cout << op << ": Command not found." << endl;
}

void WCH_ow() {
Expand Down

0 comments on commit b7c0e98

Please sign in to comment.