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