Исправление utf8-багов, сборка через gcc/musl-gcc

This commit is contained in:
2026-06-11 13:18:07 +03:00
parent f80ee739a4
commit 12ded71115
4 changed files with 18 additions and 6 deletions
+7 -4
View File
@@ -5,7 +5,7 @@
#include <stdarg.h>
#include "c_cross_pack/libs/threads.h"
//#include "c_cross_pack/libs/time.h" already included
#include "c_cross_pack/libs/time.h" //already included
#define CL_RED "\033[1;31m"
#define CL_YELLOW "\033[1;33m"
@@ -15,6 +15,9 @@
char comment[1000] = "";
char command[10000] = "";
char tick[3] = "";
char cross[3] = "";
#define OUT_LEN 1000 // 1000 items with 100 symbol len
int out_len = OUT_LEN;
// Output of command execution
@@ -112,16 +115,16 @@ int main(int argc, char **argv) {
start_thread(&thread_handle, loadAnim);
if (runCommand(command)) {
kill_thread(thread_handle);
printf("\r[%s🗸%s] %s\n", CL_GREEN, CL_NORMAL, comment);
printf("\r[%s%s%s] %s\n", CL_GREEN, tick, CL_NORMAL, comment);
if (forceOut == true) {
getOut();
}
} else {
kill_thread(thread_handle);
if (justTry) {
printf("\r[%s🗸%s] %s\n", CL_GREEN, CL_NORMAL, comment);
printf("\r[%s%s%s] %s\n", CL_GREEN, tick, CL_NORMAL, comment);
} else {
printf("\r[%s𐄂%s] %s\n", CL_RED, CL_NORMAL, comment);
printf("\r[%s%s%s] %s\n", CL_RED, cross, CL_NORMAL, comment);
// Get out of failed command
getOut();
return 1;