N_NIMCALL(void, Processcmdline_195204)(NU8 Pass_195206, NimStringDesc** Command_195208, NimStringDesc** Filename_195209) { TY193404 P_195210; NI Bracketle_195212; NimStringDesc* Key_195215; NimStringDesc* Val_195216; NimStringDesc* LOC5; NimStringDesc* LOC6; NIM_BOOL LOC16; TY46331 LOC20; memset((void*)&P_195210, 0, sizeof(P_195210)); Initoptparser_193415(((NimStringDesc*) &TMP195203), &P_195210); P_195210.Sup.m_type = NTI193404; while (1) { nponext(&P_195210); switch (P_195210.Kind) { case ((NU8) 0): goto LA1; break; case ((NU8) 2): case ((NU8) 3): Bracketle_195212 = 0; Bracketle_195212 = nsuFindChar(P_195210.Key, 91, 0); if (!(0 <= Bracketle_195212)) goto LA3; Key_195215 = 0; Key_195215 = copyStrLast(P_195210.Key, 0, (NI32)(Bracketle_195212 - 1)); Val_195216 = 0; LOC5 = 0; LOC6 = 0; LOC6 = copyStr(P_195210.Key, (NI32)(Bracketle_195212 + 1)); LOC5 = rawNewString(LOC6->Sup.len + P_195210.Val->Sup.len + 1); appendString(LOC5, LOC6); appendChar(LOC5, 58); appendString(LOC5, P_195210.Val); Val_195216 = LOC5; Processswitch_73012(Key_195215, Val_195216, Pass_195206, Cmdlineinfo_195202); goto LA2; LA3: ; Processswitch_73012(P_195210.Key, P_195210.Val, Pass_195206, Cmdlineinfo_195202); LA2: ; break; case ((NU8) 1): if (!(((*Command_195208)) && ((*Command_195208))->Sup.len == 0)) goto LA8; unsureAsgnRef((void**) &(*Command_195208), copyString(P_195210.Key)); goto LA7; LA8: ; if (!(((*Filename_195209)) && ((*Filename_195209))->Sup.len == 0)) goto LA10; unsureAsgnRef((void**) &(*Filename_195209), nosUnixToNativePath(P_195210.Key)); goto LA1; goto LA7; LA10: ; LA7: ; break; } } LA1: ; if (!(Pass_195206 == ((NU8) 1))) goto LA13; asgnRefNoCycle((void**) &Arguments_195201, npocmdLineRest(&P_195210)); LOC16 = !(((Gglobaloptions_46079 &(1<<((((NU8) 14))&31)))!=0)); if (!(LOC16)) goto LA17; LOC16 = !(((Arguments_195201) && (Arguments_195201)->Sup.len == 0)); LA17: ; if (!LOC16) goto LA18; memset((void*)&LOC20, 0, sizeof(LOC20)); Rawmessage_47971(((NU8) 54), LOC20, 0); LA18: ; LA13: ; }
N_NIMCALL(void, processcmdline_525207)(NU8 pass, NimStringDesc* cmd) { toptparser523807 p; NI argscount; nimfr("processCmdLine", "service.nim") nimln(33, "service.nim"); chckNil((void*)&p); memset((void*)&p, 0, sizeof(p)); p.Sup.m_type = (&NTI523807); initoptparser_523819(cmd, &p); nimln(34, "service.nim"); argscount = 0; nimln(35, "service.nim"); while (1) { nimln(36, "service.nim"); nponext(&p); nimln(37, "service.nim"); switch (p.Kind) { case ((NU8) 0): { nimln(38, "service.nim"); goto LA1; } break; case ((NU8) 2): case ((NU8) 3): { NI bracketle; nimln(42, "service.nim"); bracketle = nsuFindChar(p.Key, 91, 0); nimln(43, "service.nim"); { NimStringDesc* key; NI TMP7644; NimStringDesc* val; NimStringDesc* LOC8; NI TMP7645; NimStringDesc* LOC9; nimln(43, "service.nim"); if (!(0 <= bracketle)) goto LA6; nimln(44, "service.nim"); nimln(44, "service.nim"); nimln(44, "service.nim"); TMP7644 = subInt(bracketle, 1); key = copyStrLast(p.Key, 0, (NI32)(TMP7644)); nimln(45, "service.nim"); nimln(45, "service.nim"); LOC8 = 0; nimln(45, "service.nim"); nimln(45, "service.nim"); TMP7645 = addInt(bracketle, 1); LOC9 = 0; LOC9 = copyStr(p.Key, (NI32)(TMP7645)); LOC8 = rawNewString(LOC9->Sup.len + p.Val->Sup.len + 1); appendString(LOC8, LOC9); appendChar(LOC8, 58); appendString(LOC8, p.Val); val = LOC8; nimln(46, "service.nim"); processswitch_173016(key, val, pass, gcmdlineinfo_164104); } goto LA4; LA6: ; { nimln(48, "service.nim"); processswitch_173016(p.Key, p.Val, pass, gcmdlineinfo_164104); } LA4: ; } break; case ((NU8) 1): { nimln(50, "service.nim"); { NimStringDesc* LOC16; nimln(50, "service.nim"); if (!(argscount == 0)) goto LA14; nimln(51, "service.nim"); LOC16 = 0; LOC16 = command_137212; command_137212 = copyStringRC1(p.Key); if (LOC16) nimGCunrefNoCycle(LOC16); } goto LA12; LA14: ; { nimln(53, "service.nim"); { NimStringDesc* LOC22; nimln(53, "service.nim"); if (!(pass == ((NU8) 0))) goto LA20; nimln(53, "service.nim"); commandargs_137234 = (TY10665*) incrSeq(&(commandargs_137234)->Sup, sizeof(NimStringDesc*)); LOC22 = 0; LOC22 = commandargs_137234->data[commandargs_137234->Sup.len-1]; commandargs_137234->data[commandargs_137234->Sup.len-1] = copyStringRC1(p.Key); if (LOC22) nimGCunrefNoCycle(LOC22); } LA20: ; nimln(54, "service.nim"); { nimln(54, "service.nim"); if (!(argscount == 1)) goto LA25; nimln(56, "service.nim"); asgnRefNoCycle((void**) &gprojectname_137206, nosunixToNativePath(p.Key, ((NimStringDesc*) &TMP7639))); nimln(57, "service.nim"); asgnRefNoCycle((void**) &arguments_525205, npocmdLineRest(&p)); nimln(58, "service.nim"); goto LA1; } LA25: ; } LA12: ; nimln(59, "service.nim"); argscount = addInt(argscount, 1); } break; } } LA1: ; nimln(61, "service.nim"); { nimln(61, "service.nim"); if (!(pass == ((NU8) 1))) goto LA29; nimln(62, "service.nim"); { NIM_BOOL LOC33; TY127462 LOC37; nimln(62, "service.nim"); LOC33 = 0; nimln(62, "service.nim"); nimln(62, "service.nim"); LOC33 = !(((gglobaloptions_137111 &(1<<((((NU8) 13))&31)))!=0)); if (!(LOC33)) goto LA34; nimln(62, "service.nim"); nimln(62, "service.nim"); LOC33 = !(((arguments_525205) && (arguments_525205)->Sup.len == 0)); LA34: ; if (!LOC33) goto LA35; nimln(63, "service.nim"); memset((void*)LOC37, 0, sizeof(LOC37)); rawmessage_165292(((NU16) 57), LOC37, 0); } LA35: ; } LA29: ; popFrame(); }