Исправление utf8-багов, сборка через gcc/musl-gcc
This commit is contained in:
parent
e8ee7ce384
commit
a8e7a29ac8
11
build.sh
11
build.sh
@ -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
|
11
rtracker.c
11
rtracker.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user