/* Generated by Nim Compiler v1.2.6 */ /* (c) 2020 Andreas Rumpf */ /* The generated code is subject to the original license. */ /* Compiled for: Linux, amd64, gcc */ /* Command for C compiler: gcc -c -w -pthread -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace/install/usr/include -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/src -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/inc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/tools -DBR_USE_UNIX_TIME=1 -DBR_USE_URANDOM=1 -DBR_LE_UNALIGNED=1 -DBR_64=1 -DBR_amd64=1 -DBR_INT128=1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/certs -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1/src -DHAVE_CONFIG_H -DHAVE_BUILTIN_EXPECT -march=native -g3 -Og -O3 -fno-strict-aliasing -fno-ident -I/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib -I/home/runner/work/nim-waku/nim-waku/waku/v1/node -o nimcache/release/quicksim/stdlib_terminal.nim.c.o nimcache/release/quicksim/stdlib_terminal.nim.c */ #define NIM_INTBITS 64 #include "nimbase.h" #include #undef LANGUAGE_C #undef MIPSEB #undef MIPSEL #undef PPC #undef R3000 #undef R4000 #undef i386 #undef linux #undef mips #undef near #undef far #undef powerpc #undef unix #define nimfr_(x, y) #define nimln_(x, y) typedef struct tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og; typedef struct TNimType TNimType; typedef struct TNimNode TNimNode; typedef struct NimStringDesc NimStringDesc; typedef struct TGenericSeq TGenericSeq; struct tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og {NIM_BOOL trueColorIsSupported; NIM_BOOL trueColorIsEnabled; NIM_BOOL fgSetColor; }; typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A; typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ; typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op); typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p); struct TNimType {NI size; tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind; tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags; TNimType* base; TNimNode* node; void* finalizer; tyProc__ojoeKfW4VYIm36I9cpDTQIg marker; tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy; NCSTRING name; TNimType* nextType; NI instances; NI sizes; }; typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ; struct TNimNode {tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind; NI offset; TNimType* typ; NCSTRING name; NI len; TNimNode** sons; }; typedef N_NIMCALL_PTR(void, tyProc__T4eqaYlFJYZUv9aG9b1TV0bQ) (void); struct TGenericSeq {NI len; NI reserved; }; struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE]; }; typedef NU8 tyEnum_ForegroundColor__ez9ah4IgQc0AbdW68acioDg; static N_NIMCALL(void, Marker_tyRef__flNJLrANZti6Wiy5LTlGGA)(void* p, NI op); N_LIB_PRIVATE N_NIMCALL(void, nimGCvisit)(void* d, NI op); static N_NIMCALL(void, TM__CN3raB9atujkEiPpxYAdlgQ_3)(void); N_LIB_PRIVATE N_NIMCALL(void, nimRegisterThreadLocalMarker)(tyProc__T4eqaYlFJYZUv9aG9b1TV0bQ markerProc); N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void); N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, ansiStyleCode__9cVIfUEE6Zf6B3dSUGw8cLQ)(NI style); N_NIMCALL(NimStringDesc*, rawNewString)(NI cap); N_LIB_PRIVATE N_NIMCALL(void, formatValue__3zjq9csYPBcIN7AqvyU5ZLA)(NimStringDesc** result, NimStringDesc* value, NimStringDesc* specifier); N_LIB_PRIVATE N_NIMCALL(void, formatValue__ACNJL1q6Oxfvi53i9bkeK6Q)(NimStringDesc** result, NI value, NimStringDesc* specifier); static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src); static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size); static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size); N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen); N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src); N_LIB_PRIVATE TNimType NTI__EcU8GhMNGo9bGDXbfqZ82og_; extern TNimType NTI__VaVACK0bpYmqIQ0mKcHfQQ_; N_LIB_PRIVATE TNimType NTI__flNJLrANZti6Wiy5LTlGGA_; STRING_LITERAL(TM__CN3raB9atujkEiPpxYAdlgQ_5, "\033[", 2); STRING_LITERAL(TM__CN3raB9atujkEiPpxYAdlgQ_6, "m", 1); N_LIB_PRIVATE NIM_THREADVAR tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og* gTerm__wkpx9csKte2r1l45yvskIcA; extern TNimType* nimTypeRoot; N_LIB_PRIVATE NIM_THREADVAR NI gFG__g7w4T3anr20OMlWloNx2tQ; N_LIB_PRIVATE NIM_THREADVAR NI gBG__dgmeknpHWrtwqMJGQAp9atA; static N_NIMCALL(void, Marker_tyRef__flNJLrANZti6Wiy5LTlGGA)(void* p, NI op) { tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og* a; a = (tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og*)p; } static N_NIMCALL(void, TM__CN3raB9atujkEiPpxYAdlgQ_3)(void) { nimGCvisit((void*)gTerm__wkpx9csKte2r1l45yvskIcA, 0);} #line 11 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) { void* T1_; #line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" #line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim" T1_ = (void*)0; T1_ = memcpy(dest, source, ((size_t) (size)));} #line 2112 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim" static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) { #line 2113 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim" #line 2113 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim" nimCopyMem(dest, source, size); } #line 217 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) { #line 218 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" { #line 218 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" #line 218 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" if (!!((src == NIM_NIL))) goto LA3_; #line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" #line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" #line 219 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1))))); #line 220 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/sysstr.nim" (*dest).Sup.len += (*src).Sup.len; } LA3_: ; } #line 491 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, ansiStyleCode__9cVIfUEE6Zf6B3dSUGw8cLQ)(NI style) { NimStringDesc* result; NimStringDesc* fmtRes; result = (NimStringDesc*)0; #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" #line 533 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/strformat.nim" #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" fmtRes = rawNewString(((NI) 41)); #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" formatValue__3zjq9csYPBcIN7AqvyU5ZLA((&fmtRes), ((NimStringDesc*) &TM__CN3raB9atujkEiPpxYAdlgQ_5), ((NimStringDesc*) NIM_NIL)); #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" formatValue__ACNJL1q6Oxfvi53i9bkeK6Q((&fmtRes), style, ((NimStringDesc*) NIM_NIL)); #line 492 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" fmtRes = resizeString(fmtRes, 1);appendString(fmtRes, ((NimStringDesc*) &TM__CN3raB9atujkEiPpxYAdlgQ_6)); result = copyString(fmtRes); return result;} #line 619 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, ansiForegroundColorCode__aiWNvQSWqGNTUqhMXNZzrQ)(tyEnum_ForegroundColor__ez9ah4IgQc0AbdW68acioDg fg, NIM_BOOL bright) { NimStringDesc* result; NI style;{ result = (NimStringDesc*)0; #line 620 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" #line 620 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" style = fg; #line 621 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" { NI TM__CN3raB9atujkEiPpxYAdlgQ_4; if (!bright) goto LA3_; #line 621 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" if (nimAddInt(style, ((NI) 60), &TM__CN3raB9atujkEiPpxYAdlgQ_4)) { raiseOverflow(); }; style = (NI)(TM__CN3raB9atujkEiPpxYAdlgQ_4); } LA3_: ; #line 622 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" #line 622 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" #line 622 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/pure/terminal.nim" result = ansiStyleCode__9cVIfUEE6Zf6B3dSUGw8cLQ(style); goto BeforeRet_; }BeforeRet_: ; return result;} N_LIB_PRIVATE N_NIMCALL(void, stdlib_terminalInit000)(void) { #line 999999 "generated_not_to_break_here" { nimRegisterThreadLocalMarker(TM__CN3raB9atujkEiPpxYAdlgQ_3);} } N_LIB_PRIVATE N_NIMCALL(void, stdlib_terminalDatInit000)(void) { #line 999999 "generated_not_to_break_here" static TNimNode* TM__CN3raB9atujkEiPpxYAdlgQ_2_3[3]; static TNimNode TM__CN3raB9atujkEiPpxYAdlgQ_0[4];NTI__EcU8GhMNGo9bGDXbfqZ82og_.size = sizeof(tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og); NTI__EcU8GhMNGo9bGDXbfqZ82og_.kind = 18; NTI__EcU8GhMNGo9bGDXbfqZ82og_.base = 0; NTI__EcU8GhMNGo9bGDXbfqZ82og_.flags = 3; NTI__EcU8GhMNGo9bGDXbfqZ82og_.name = "PTerminal:ObjectType"; NTI__EcU8GhMNGo9bGDXbfqZ82og_.nextType = nimTypeRoot; nimTypeRoot=&NTI__EcU8GhMNGo9bGDXbfqZ82og_; TM__CN3raB9atujkEiPpxYAdlgQ_2_3[0] = &TM__CN3raB9atujkEiPpxYAdlgQ_0[1]; TM__CN3raB9atujkEiPpxYAdlgQ_0[1].kind = 1; TM__CN3raB9atujkEiPpxYAdlgQ_0[1].offset = offsetof(tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og, trueColorIsSupported); TM__CN3raB9atujkEiPpxYAdlgQ_0[1].typ = (&NTI__VaVACK0bpYmqIQ0mKcHfQQ_); TM__CN3raB9atujkEiPpxYAdlgQ_0[1].name = "trueColorIsSupported"; TM__CN3raB9atujkEiPpxYAdlgQ_2_3[1] = &TM__CN3raB9atujkEiPpxYAdlgQ_0[2]; TM__CN3raB9atujkEiPpxYAdlgQ_0[2].kind = 1; TM__CN3raB9atujkEiPpxYAdlgQ_0[2].offset = offsetof(tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og, trueColorIsEnabled); TM__CN3raB9atujkEiPpxYAdlgQ_0[2].typ = (&NTI__VaVACK0bpYmqIQ0mKcHfQQ_); TM__CN3raB9atujkEiPpxYAdlgQ_0[2].name = "trueColorIsEnabled"; TM__CN3raB9atujkEiPpxYAdlgQ_2_3[2] = &TM__CN3raB9atujkEiPpxYAdlgQ_0[3]; TM__CN3raB9atujkEiPpxYAdlgQ_0[3].kind = 1; TM__CN3raB9atujkEiPpxYAdlgQ_0[3].offset = offsetof(tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og, fgSetColor); TM__CN3raB9atujkEiPpxYAdlgQ_0[3].typ = (&NTI__VaVACK0bpYmqIQ0mKcHfQQ_); TM__CN3raB9atujkEiPpxYAdlgQ_0[3].name = "fgSetColor"; TM__CN3raB9atujkEiPpxYAdlgQ_0[0].len = 3; TM__CN3raB9atujkEiPpxYAdlgQ_0[0].kind = 2; TM__CN3raB9atujkEiPpxYAdlgQ_0[0].sons = &TM__CN3raB9atujkEiPpxYAdlgQ_2_3[0]; NTI__EcU8GhMNGo9bGDXbfqZ82og_.node = &TM__CN3raB9atujkEiPpxYAdlgQ_0[0]; NTI__flNJLrANZti6Wiy5LTlGGA_.size = sizeof(tyObject_PTerminalcolonObjectType___EcU8GhMNGo9bGDXbfqZ82og*); NTI__flNJLrANZti6Wiy5LTlGGA_.kind = 22; NTI__flNJLrANZti6Wiy5LTlGGA_.base = (&NTI__EcU8GhMNGo9bGDXbfqZ82og_); NTI__flNJLrANZti6Wiy5LTlGGA_.flags = 2; NTI__flNJLrANZti6Wiy5LTlGGA_.name = "PTerminal"; NTI__flNJLrANZti6Wiy5LTlGGA_.nextType = nimTypeRoot; nimTypeRoot=&NTI__flNJLrANZti6Wiy5LTlGGA_; NTI__flNJLrANZti6Wiy5LTlGGA_.marker = Marker_tyRef__flNJLrANZti6Wiy5LTlGGA; }