N_NIMCALL(NimStringDesc*, shortendir_114403)(NimStringDesc* dir) { NimStringDesc* result; NimStringDesc* prefix; NimStringDesc* LOC1; NimStringDesc* LOC2; NimStringDesc* LOC8; nimfr("shortenDir", "options.nim") result = 0; nimln(196, "options.nim"); nimln(196, "options.nim"); LOC1 = 0; nimln(196, "options.nim"); LOC2 = 0; LOC2 = getprefixdir_114311(); LOC1 = rawNewString(LOC2->Sup.len + 1); appendString(LOC1, LOC2); appendChar(LOC1, 47); prefix = LOC1; nimln(197, "options.nim"); { NIM_BOOL LOC5; nimln(197, "options.nim"); LOC5 = 0; LOC5 = nsuStartsWith(dir, prefix); if (!LOC5) goto LA6; nimln(198, "options.nim"); nimln(198, "options.nim"); nimln(198, "options.nim"); nimln(198, "options.nim"); result = copyStr(dir, prefix->Sup.len); goto BeforeRet; } LA6: ; nimln(199, "options.nim"); nimln(199, "options.nim"); LOC8 = 0; LOC8 = rawNewString(gprojectpath_114198->Sup.len + 1); appendString(LOC8, gprojectpath_114198); appendChar(LOC8, 47); prefix = LOC8; nimln(200, "options.nim"); { NIM_BOOL LOC11; nimln(200, "options.nim"); LOC11 = 0; LOC11 = nsuStartsWith(dir, prefix); if (!LOC11) goto LA12; nimln(201, "options.nim"); nimln(201, "options.nim"); nimln(201, "options.nim"); nimln(201, "options.nim"); result = copyStr(dir, prefix->Sup.len); goto BeforeRet; } LA12: ; nimln(202, "options.nim"); result = copyString(dir); BeforeRet: ; popFrame(); return result; }
N_NIMCALL(NimStringDesc*, Shortendir_41200)(NimStringDesc* Dir_41202) { NimStringDesc* Result_41203; NimStringDesc* Prefix_41204; NimStringDesc* LOC1; NimStringDesc* LOC2; NIM_BOOL LOC4; NimStringDesc* LOC7; NimStringDesc* LOC8; NIM_BOOL LOC10; NimStringDesc* LOC13; NIM_BOOL LOC15; Result_41203 = 0; Prefix_41204 = 0; LOC1 = 0; LOC2 = 0; LOC2 = Getprefixdir_41109(); LOC1 = rawNewString(LOC2->Sup.len + 1); appendString(LOC1, LOC2); appendChar(LOC1, 92); Prefix_41204 = LOC1; LOC4 = nsuStartsWith(Dir_41202, Prefix_41204); if (!LOC4) goto LA5; Result_41203 = copyStr(Dir_41202, Prefix_41204->Sup.len); goto BeforeRet; LA5: ; LOC7 = 0; LOC8 = 0; LOC8 = nosgetCurrentDir(); LOC7 = rawNewString(LOC8->Sup.len + 1); appendString(LOC7, LOC8); appendChar(LOC7, 92); Prefix_41204 = LOC7; LOC10 = nsuStartsWith(Dir_41202, Prefix_41204); if (!LOC10) goto LA11; Result_41203 = copyStr(Dir_41202, Prefix_41204->Sup.len); goto BeforeRet; LA11: ; LOC13 = 0; LOC13 = rawNewString(Projectpath_41113->Sup.len + 1); appendString(LOC13, Projectpath_41113); appendChar(LOC13, 92); Prefix_41204 = LOC13; LOC15 = nsuStartsWith(Dir_41202, Prefix_41204); if (!LOC15) goto LA16; Result_41203 = copyStr(Dir_41202, Prefix_41204->Sup.len); goto BeforeRet; LA16: ; Result_41203 = copyString(Dir_41202); BeforeRet: ; return Result_41203; }
N_NIMCALL(NimStringDesc*, canondynlibname_154459)(NimStringDesc* s) { NimStringDesc* result; NI start; NI ende; result = 0; { NIM_BOOL LOC3; LOC3 = 0; LOC3 = nsuStartsWith(s, ((NimStringDesc*) &TMP1863)); if (!LOC3) goto LA4; start = ((NI) 3); } goto LA1; LA4: ; { start = ((NI) 0); } LA1: ; ende = nsuFindCharSet(s, TMP1864, ((NI) 0)); { if (!(((NI) 0) <= ende)) goto LA9; result = copyStrLast(s, start, (NI)(ende - ((NI) 1))); } goto LA7; LA9: ; { result = copyStr(s, start); } LA7: ; return result; }
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqtilde__5yoNqXoYehBJvvfaWrX6Rg)(NimStringDesc* s, NimStringDesc** a, NI aLen_0) { NIM_BOOL result; { result = (NIM_BOOL)0; { NimStringDesc* x; NI i; x = (NimStringDesc*)0; i = ((NI) 0); { while (1) { if (!(i < aLen_0)) goto LA3; x = a[i]; { NIM_BOOL T6_; T6_ = (NIM_BOOL)0; T6_ = nsuStartsWith(s, x); if (!T6_) goto LA7_; result = NIM_TRUE; goto BeforeRet_; } LA7_: ; i += ((NI) 1); } LA3: ; } } }BeforeRet_: ; return result; }
N_NIMCALL(tllstream173204*, filterstrip_216008)(tllstream173204* stdin_216010, NimStringDesc* filename, tnode185813* call) { tllstream173204* result; NimStringDesc* pattern; NIM_BOOL leading; NIM_BOOL trailing; NimStringDesc* line; nimfr("filterStrip", "filters.nim") result = 0; nimln(58, "filters.nim"); pattern = strarg_216021(call, ((NimStringDesc*) &TMP2658), 1, ((NimStringDesc*) &TMP2659)); nimln(59, "filters.nim"); leading = boolarg_216028(call, ((NimStringDesc*) &TMP2660), 2, NIM_TRUE); nimln(60, "filters.nim"); trailing = boolarg_216028(call, ((NimStringDesc*) &TMP2661), 3, NIM_TRUE); nimln(61, "filters.nim"); result = llstreamopen_173218(((NimStringDesc*) &TMP2659)); nimln(62, "filters.nim"); nimln(62, "filters.nim"); line = rawNewString(80); nimln(63, "filters.nim"); while (1) { NIM_BOOL LOC2; NimStringDesc* stripped; nimln(63, "filters.nim"); LOC2 = 0; LOC2 = llstreamreadline_173248(stdin_216010, &line); if (!LOC2) goto LA1; nimln(64, "filters.nim"); stripped = nsuStrip(line, leading, trailing); nimln(65, "filters.nim"); { NIM_BOOL LOC5; nimln(65, "filters.nim"); LOC5 = 0; nimln(65, "filters.nim"); nimln(65, "filters.nim"); LOC5 = (pattern->Sup.len == 0); if (LOC5) goto LA6; nimln(65, "filters.nim"); LOC5 = nsuStartsWith(stripped, pattern); LA6: ; if (!LOC5) goto LA7; nimln(66, "filters.nim"); llstreamwriteln_173274(result, stripped); } goto LA3; LA7: ; { nimln(68, "filters.nim"); llstreamwriteln_173274(result, line); } LA3: ; } LA1: ; nimln(69, "filters.nim"); llstreamclose_173238(stdin_216010); popFrame(); return result; }
N_NIMCALL(NimStringDesc*, shortendir_153407)(NimStringDesc* dir) { NimStringDesc* result; NimStringDesc* prefix; NimStringDesc* LOC1; NimStringDesc* LOC2; NimStringDesc* LOC8; { result = 0; LOC1 = 0; LOC2 = 0; LOC2 = getprefixdir_153371(); LOC1 = rawNewString(LOC2->Sup.len + 1); appendString(LOC1, LOC2); appendChar(LOC1, 47); prefix = LOC1; { NIM_BOOL LOC5; LOC5 = 0; LOC5 = nsuStartsWith(dir, prefix); if (!LOC5) goto LA6; result = copyStr(dir, (prefix ? prefix->Sup.len : 0)); goto BeforeRet; } LA6: ; LOC8 = 0; LOC8 = rawNewString(gprojectpath_153235->Sup.len + 1); appendString(LOC8, gprojectpath_153235); appendChar(LOC8, 47); prefix = LOC8; { NIM_BOOL LOC11; LOC11 = 0; LOC11 = nsuStartsWith(dir, prefix); if (!LOC11) goto LA12; result = copyStr(dir, (prefix ? prefix->Sup.len : 0)); goto BeforeRet; } LA12: ; result = copyString(dir); }BeforeRet: ; return result; }
N_NIMCALL(NimStringDesc*, canondynlibname_137360)(NimStringDesc* s) { NimStringDesc* result; NI start; NI ende; nimfr("canonDynlibName", "options.nim") result = 0; nimln(356, "options.nim"); nimln(356, "options.nim"); { NIM_BOOL LOC3; nimln(356, "options.nim"); LOC3 = 0; LOC3 = nsuStartsWith(s, ((NimStringDesc*) &TMP442)); if (!LOC3) goto LA4; start = 3; } goto LA1; LA4: ; { start = 0; } LA1: ; nimln(357, "options.nim"); ende = nsuFindCharSet(s, TMP443, 0); nimln(358, "options.nim"); { NI TMP444; nimln(358, "options.nim"); if (!(0 <= ende)) goto LA9; nimln(359, "options.nim"); nimln(359, "options.nim"); nimln(359, "options.nim"); TMP444 = subInt(ende, 1); result = copyStrLast(s, start, (NI32)(TMP444)); } goto LA7; LA9: ; { nimln(361, "options.nim"); nimln(361, "options.nim"); result = copyStr(s, start); } LA7: ; popFrame(); return result; }
N_NIMCALL(NimStringDesc*, canondynlibname_114635)(NimStringDesc* s) { NimStringDesc* result; NI start; NI ende; nimfr("canonDynlibName", "options.nim") result = 0; nimln(310, "options.nim"); nimln(310, "options.nim"); { NIM_BOOL LOC3; nimln(310, "options.nim"); LOC3 = 0; LOC3 = nsuStartsWith(s, ((NimStringDesc*) &TMP339)); if (!LOC3) goto LA4; start = 3; } goto LA1; LA4: ; { start = 0; } LA1: ; nimln(311, "options.nim"); ende = nsuFindCharSet(s, TMP361, 0); nimln(312, "options.nim"); { NI TMP362; nimln(702, "system.nim"); if (!(0 <= ende)) goto LA9; nimln(313, "options.nim"); nimln(313, "options.nim"); nimln(313, "options.nim"); TMP362 = subInt(ende, 1); result = copyStrLast(s, start, (NI32)(TMP362)); } goto LA7; LA9: ; { nimln(315, "options.nim"); nimln(315, "options.nim"); result = copyStr(s, start); } LA7: ; popFrame(); return result; }
N_NIMCALL(NI, findenvvar_121605)(NimStringDesc* key) { NI result; NimStringDesc* temp; NimStringDesc* LOC1; { result = 0; getenvvarsc_121202(); LOC1 = 0; LOC1 = rawNewString(key->Sup.len + 1); appendString(LOC1, key); appendChar(LOC1, 61); temp = LOC1; { NI i_121620; NI HEX3Atmp_121622; NI res_121625; i_121620 = 0; HEX3Atmp_121622 = 0; HEX3Atmp_121622 = (environment_121009 ? (environment_121009->Sup.len-1) : -1); res_121625 = ((NI) 0); { while (1) { if (!(res_121625 <= HEX3Atmp_121622)) goto LA4; i_121620 = res_121625; { NIM_BOOL LOC7; LOC7 = 0; LOC7 = nsuStartsWith(environment_121009->data[i_121620], temp); if (!LOC7) goto LA8; result = i_121620; goto BeforeRet; } LA8: ; res_121625 += ((NI) 1); } LA4: ; } } result = ((NI) -1); goto BeforeRet; }BeforeRet: ; return result; }
N_NIMCALL(Tllstream202204*, filterstrip_236006)(Tllstream202204* stdin_236008, NimStringDesc* filename, Tnode214790* call) { Tllstream202204* result; NimStringDesc* pattern; NIM_BOOL leading; NIM_BOOL trailing; NimStringDesc* line; result = 0; pattern = strarg_236017(call, ((NimStringDesc*) &TMP1543), ((NI) 1), ((NimStringDesc*) &TMP1544)); leading = boolarg_236023(call, ((NimStringDesc*) &TMP1547), ((NI) 2), NIM_TRUE); trailing = boolarg_236023(call, ((NimStringDesc*) &TMP1548), ((NI) 3), NIM_TRUE); result = llstreamopen_202217(((NimStringDesc*) &TMP1544)); line = rawNewString(((NI) 80)); { while (1) { NIM_BOOL LOC3; NimStringDesc* stripped; LOC3 = 0; LOC3 = llstreamreadline_202550(stdin_236008, (&line)); if (!LOC3) goto LA2; stripped = nsuStrip(line, leading, trailing, TMP1549); { NIM_BOOL LOC6; LOC6 = 0; LOC6 = ((pattern ? pattern->Sup.len : 0) == ((NI) 0)); if (LOC6) goto LA7; LOC6 = nsuStartsWith(stripped, pattern); LA7: ; if (!LOC6) goto LA8; llstreamwriteln_202608(result, stripped); } goto LA4; LA8: ; { llstreamwriteln_202608(result, line); } LA4: ; } LA2: ; } llstreamclose_202277(stdin_236008); return result; }
N_NIMCALL(Tllstream179204*, filterstrip_218012)(Tllstream179204* stdin_218014, NimStringDesc* filename, Tnode192813* call) { Tllstream179204* result; NimStringDesc* pattern; NIM_BOOL leading; NIM_BOOL trailing; NimStringDesc* line; result = 0; pattern = strarg_218029(call, ((NimStringDesc*) &TMP1430), ((NI) 1), ((NimStringDesc*) &TMP1431)); leading = boolarg_218038(call, ((NimStringDesc*) &TMP1434), ((NI) 2), NIM_TRUE); trailing = boolarg_218038(call, ((NimStringDesc*) &TMP1435), ((NI) 3), NIM_TRUE); result = llstreamopen_179220(((NimStringDesc*) &TMP1431)); line = rawNewString(((NI) 80)); { while (1) { NIM_BOOL LOC3; NimStringDesc* stripped; LOC3 = 0; LOC3 = llstreamreadline_179610(stdin_218014, (&line)); if (!LOC3) goto LA2; stripped = nsuStrip(line, leading, trailing); { NIM_BOOL LOC6; LOC6 = 0; LOC6 = ((pattern ? pattern->Sup.len : 0) == ((NI) 0)); if (LOC6) goto LA7; LOC6 = nsuStartsWith(stripped, pattern); LA7: ; if (!LOC6) goto LA8; llstreamwriteln_179686(result, stripped); } goto LA4; LA8: ; { llstreamwriteln_179686(result, line); } LA4: ; } LA2: ; } llstreamclose_179310(stdin_218014); return result; }
N_NIMCALL(Tllstream_IHsOGFu33dIY69a9bLlFHlHw*, filterstrip_8vZ6X8KZZNI4xsTx2A9bPBw)(Tllstream_IHsOGFu33dIY69a9bLlFHlHw* stdin_kOIrmbkfx9bA9aensSDHNIyg, NimStringDesc* filename0, Tnode_bROa11lyF5vxEN9aYNbHmhw* call0) { Tllstream_IHsOGFu33dIY69a9bLlFHlHw* result0; NimStringDesc* pattern0; NIM_BOOL leading0; NIM_BOOL trailing0; NimStringDesc* line0; result0 = (Tllstream_IHsOGFu33dIY69a9bLlFHlHw*)0; pattern0 = strarg_hrsET2VpzHuUBdZObITwmQ(call0, ((NimStringDesc*) &T_TpC7tIfhGAaosc7HIsUuXA_2), ((NI) 1), ((NimStringDesc*) &T_TpC7tIfhGAaosc7HIsUuXA_3)); leading0 = boolarg_J1A66BRI6GgqzqhU0EZntw(call0, ((NimStringDesc*) &T_TpC7tIfhGAaosc7HIsUuXA_6), ((NI) 2), NIM_TRUE); trailing0 = boolarg_J1A66BRI6GgqzqhU0EZntw(call0, ((NimStringDesc*) &T_TpC7tIfhGAaosc7HIsUuXA_7), ((NI) 3), NIM_TRUE); result0 = llstreamopen_HQSZA6kzdilYF0Pf022dhA(((NimStringDesc*) &T_TpC7tIfhGAaosc7HIsUuXA_3)); line0 = rawNewString(((NI) 80)); { while (1) { NIM_BOOL LOC3; NimStringDesc* stripped0; LOC3 = (NIM_BOOL)0; LOC3 = llstreamreadline_Qwm1ilRhcaI3znjOGn4xBg(stdin_kOIrmbkfx9bA9aensSDHNIyg, (&line0)); if (!LOC3) goto LA2; stripped0 = nsuStrip(line0, leading0, trailing0, T_TpC7tIfhGAaosc7HIsUuXA_8); { NIM_BOOL LOC6; LOC6 = (NIM_BOOL)0; LOC6 = ((pattern0 ? pattern0->Sup.len : 0) == ((NI) 0)); if (LOC6) goto LA7; LOC6 = nsuStartsWith(stripped0, pattern0); LA7: ; if (!LOC6) goto LA8; llstreamwriteln_p1fwzwO1YKdwAKg6V27RTw_2(result0, stripped0); } goto LA4; LA8: ; { llstreamwriteln_p1fwzwO1YKdwAKg6V27RTw_2(result0, line0); } LA4: ; } LA2: ; } llstreamclose_TQe1mwqs39ccgay5ywsr9azw(stdin_kOIrmbkfx9bA9aensSDHNIyg); return result0; }
N_NIMCALL(Tllstream280204*, filterstrip_313006_1413030668)(Tllstream280204* stdin_313008_1413030668, NimStringDesc* filename0, Tnode290802* call0) { Tllstream280204* result0; NimStringDesc* pattern0; NIM_BOOL leading0; NIM_BOOL trailing0; NimStringDesc* line0; result0 = (Tllstream280204*)0; pattern0 = strarg_313017_1413030668(call0, ((NimStringDesc*) &T1413030668_2), ((NI) 1), ((NimStringDesc*) &T1413030668_3)); leading0 = boolarg_313023_1413030668(call0, ((NimStringDesc*) &T1413030668_6), ((NI) 2), NIM_TRUE); trailing0 = boolarg_313023_1413030668(call0, ((NimStringDesc*) &T1413030668_7), ((NI) 3), NIM_TRUE); result0 = llstreamopen_280218_597494479(((NimStringDesc*) &T1413030668_3)); line0 = rawNewString(((NI) 80)); { while (1) { NIM_BOOL LOC3; NimStringDesc* stripped0; LOC3 = (NIM_BOOL)0; LOC3 = llstreamreadline_280550_597494479(stdin_313008_1413030668, (&line0)); if (!LOC3) goto LA2; stripped0 = nsuStrip(line0, leading0, trailing0, T1413030668_8); { NIM_BOOL LOC6; LOC6 = (NIM_BOOL)0; LOC6 = ((pattern0 ? pattern0->Sup.len : 0) == ((NI) 0)); if (LOC6) goto LA7; LOC6 = nsuStartsWith(stripped0, pattern0); LA7: ; if (!LOC6) goto LA8; llstreamwriteln_280608_597494479(result0, stripped0); } goto LA4; LA8: ; { llstreamwriteln_280608_597494479(result0, line0); } LA4: ; } LA2: ; } llstreamclose_280278_597494479(stdin_313008_1413030668); return result0; }
N_NIMCALL(TY71204*, Filterstrip_86009)(TY71204* Stdin_86011, NimStringDesc* Filename_86012, TY50526* Call_86013) { TY71204* Result_86358; NimStringDesc* Pattern_86359; NIM_BOOL Leading_86360; NIM_BOOL Trailing_86361; NIM_BOOL LOC2; NimStringDesc* Line_86362; NimStringDesc* Stripped_86363; NIM_BOOL LOC4; Result_86358 = 0; Pattern_86359 = 0; Pattern_86359 = Strarg_86020(Call_86013, ((NimStringDesc*) &TMP191856), 1, ((NimStringDesc*) &TMP191857)); Leading_86360 = 0; Leading_86360 = Boolarg_86026(Call_86013, ((NimStringDesc*) &TMP191860), 2, NIM_TRUE); Trailing_86361 = 0; Trailing_86361 = Boolarg_86026(Call_86013, ((NimStringDesc*) &TMP191861), 3, NIM_TRUE); Result_86358 = Llstreamopen_71217(((NimStringDesc*) &TMP191857)); while (1) { LOC2 = Llstreamatend_71263(Stdin_86011); if (!!(LOC2)) goto LA1; Line_86362 = 0; Line_86362 = Llstreamreadline_71240(Stdin_86011); Stripped_86363 = 0; Stripped_86363 = nsuStrip(Line_86362, Leading_86360, Trailing_86361); LOC4 = (Pattern_86359->Sup.len == 0); if (LOC4) goto LA5; LOC4 = nsuStartsWith(Stripped_86363, Pattern_86359); LA5: ; if (!LOC4) goto LA6; Llstreamwriteln_71259(Result_86358, Stripped_86363); goto LA3; LA6: ; Llstreamwriteln_71259(Result_86358, Line_86362); LA3: ; } LA1: ; Llstreamclose_71232(Stdin_86011); return Result_86358; }