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

This commit is contained in:
justuser-31 2025-04-22 10:25:56 +03:00
parent e8ee7ce384
commit a8e7a29ac8
4 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,12 @@
git submodule init
git submodule update
musl-gcc rtracker.c -o rtracker
# Check what compiler we have
if type "musl-gcc" > /dev/null 2>&1; then
CC="musl-gcc"
else
echo "[WARN]: using gcc instead of musl-gcc (recommended)"
CC="gcc"
fi
$CC rtracker.c -o rtracker

@ -1 +1 @@
Subproject commit 3a07a9b5ed183ef35312c07c435981b528e75ac8
Subproject commit 6bbd07c028563ca580831b88423acff20a9efa47

BIN
rtracker

Binary file not shown.

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;