Добавление функции: просто сделай (нету ошибки)
This commit is contained in:
parent
af01e28798
commit
e9311324f0
@ -83,11 +83,15 @@ void getOut() {
|
||||
int main(int argc, char **argv) {
|
||||
bool isCommand = false; // Flag for detect command section
|
||||
bool forceOut = false;
|
||||
bool justTry = false; // No out if error, just try
|
||||
for(int i = 1; i < argc; i++) {
|
||||
if (isCommand == false) {
|
||||
if (strcmp(argv[i], "%o") == 0) {
|
||||
isCommand = true;
|
||||
forceOut = true;
|
||||
} else if (strcmp(argv[i], "%t") == 0) {
|
||||
isCommand = true;
|
||||
justTry = true;
|
||||
} else if (strcmp(argv[i], "%%") == 0) {
|
||||
isCommand = true;
|
||||
} else {
|
||||
@ -110,11 +114,15 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
} else {
|
||||
kill_thread(thread_handle);
|
||||
if (justTry) {
|
||||
printf("\r[%s🗸%s] %s\n", CL_GREEN, CL_NORMAL, comment);
|
||||
} else {
|
||||
printf("\r[%s𐄂%s] %s\n", CL_RED, CL_NORMAL, comment);
|
||||
// Get out of failed command
|
||||
getOut();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user