Ejemplo n.º 1
0
N_LIB_PRIVATE N_NIMCALL(void, processCmdLine_tw2pZl8Nisz38VPmsT5WZA)(tyEnum_TCmdLinePass_IiBn9cB6WYIMDHOT44O82wA pass, NimStringDesc* cmd) {
	tyObject_OptParser_fe5bDDfRbVwQIuUOouExnA p;
	NI argsCount;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI_fe5bDDfRbVwQIuUOouExnA_);
	initOptParser_xt25Cv9cQqaNt3Mscl7nHFA(cmd, (&p));
	argsCount = ((NI) 0);
	{
		while (1) {
			nponext((&p));
			switch (p.kind) {
			case ((tyEnum_CmdLineKind_XkdXq9atxjiuhkFFh0XYrSA) 0):
			{
				goto LA1;
			}
			break;
			case ((tyEnum_CmdLineKind_XkdXq9atxjiuhkFFh0XYrSA) 2):
			case ((tyEnum_CmdLineKind_XkdXq9atxjiuhkFFh0XYrSA) 3):
			{
				{
					if (!eqStrings(p.key, ((NimStringDesc*) &TM_AxyNANBXigTKyIcRAbufXw_5))) goto LA7_;
					p.key = copyString(((NimStringDesc*) &TM_AxyNANBXigTKyIcRAbufXw_6));
					{
						NIM_BOOL T11_;
						T11_ = (NIM_BOOL)0;
						T11_ = processArgument_lWiIBVoVYe1MHypeoTZrBw(pass, (&p), (&argsCount));
						if (!T11_) goto LA12_;
						goto LA1;
					}
					LA12_: ;
				}
				goto LA5_;
				LA7_: ;
				{
					processSwitch_TdGOW9ciAVvdBm6nv23Sz9aA(pass, (&p));
				}
				LA5_: ;
			}
			break;
			case ((tyEnum_CmdLineKind_XkdXq9atxjiuhkFFh0XYrSA) 1):
			{
				{
					NIM_BOOL T18_;
					T18_ = (NIM_BOOL)0;
					T18_ = processArgument_lWiIBVoVYe1MHypeoTZrBw(pass, (&p), (&argsCount));
					if (!T18_) goto LA19_;
					goto LA1;
				}
				LA19_: ;
			}
			break;
			}
		}
	} LA1: ;
	{
		if (!(pass == ((tyEnum_TCmdLinePass_IiBn9cB6WYIMDHOT44O82wA) 1))) goto LA23_;
		{
			NIM_BOOL T27_;
			NIM_BOOL T28_;
			NimStringDesc* T31_;
			tyArray_8ZvwQIddfpj2THRVPsFzIQ T34_;
			T27_ = (NIM_BOOL)0;
			T28_ = (NIM_BOOL)0;
			T28_ = !(((gGlobalOptions_j042VVDC9cT5ENYoXnmhhVg &(1U<<((NU)(((tyEnum_TGlobalOption_RAfAEZqjnKMDumgyKKc1qw) 12))&31U)))!=0));
			if (!(T28_)) goto LA29_;
			T28_ = !(((arguments_J4sVmqKDJ3MkfxziRX9cODA) && (arguments_J4sVmqKDJ3MkfxziRX9cODA)->Sup.len == 0));
			LA29_: ;
			T27_ = T28_;
			if (!(T27_)) goto LA30_;
			T31_ = (NimStringDesc*)0;
			T31_ = nsuNormalize(command_zo83h8QWwtDIGDuqkGhjqg);
			T27_ = !(eqStrings(T31_, ((NimStringDesc*) &TM_AxyNANBXigTKyIcRAbufXw_7)));
			LA30_: ;
			if (!T27_) goto LA32_;
			memset((void*)T34_, 0, sizeof(T34_));
			rawMessage_wSQLHRsYvHJ4DSWgdFrFaA(((tyEnum_TMsgKind_IGAWgv9aR2KqPKJfPZPEWaw) 60), T34_, 0);
		}
		LA32_: ;
	}
	LA23_: ;
}
Ejemplo n.º 2
0
N_NIMCALL(void, processcmdline_521209)(NU8 pass, NimStringDesc* cmd) {
	Optparser174011 p;
	NI argscount;
	nimfr("processCmdLine", "service.nim")
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI174011);
	nimln(30, "service.nim");
	chckNil((void*)(&p));
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI174011);
	initoptparser_174030(cmd, (&p));
	nimln(31, "service.nim");
	argscount = ((NI) 0);
	{
		nimln(32, "service.nim");
		while (1) {
			nimln(33, "service.nim");
			nponext((&p));
			nimln(34, "service.nim");
			switch (p.kind) {
			case ((NU8) 0):
			{
				nimln(35, "service.nim");
				goto LA1;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			{
				nimln(37, "service.nim");
				{
					if (!eqStrings(p.key, ((NimStringDesc*) &TMP10633))) goto LA7;
					nimln(38, "service.nim");
					p.key = copyString(((NimStringDesc*) &TMP10634));
					nimln(39, "service.nim");
					{
						NIM_BOOL LOC11;
						LOC11 = 0;
						LOC11 = processargument_176738(pass, (&p), (&argscount));
						if (!LOC11) goto LA12;
						goto LA1;
					}
					LA12: ;
				}
				goto LA5;
				LA7: ;
				{
					nimln(41, "service.nim");
					processswitch_176725(pass, (&p));
				}
				LA5: ;
			}
			break;
			case ((NU8) 1):
			{
				nimln(43, "service.nim");
				{
					NIM_BOOL LOC18;
					LOC18 = 0;
					LOC18 = processargument_176738(pass, (&p), (&argscount));
					if (!LOC18) goto LA19;
					goto LA1;
				}
				LA19: ;
			}
			break;
			}
		}
	} LA1: ;
	nimln(44, "service.nim");
	{
		if (!(pass == ((NU8) 1))) goto LA23;
		nimln(45, "service.nim");
		{
			NIM_BOOL LOC27;
			NIM_BOOL LOC28;
			NimStringDesc* LOC31;
			TY143651 LOC34;
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = !(((gglobaloptions_153128 &(1<<((((NU8) 13))&31)))!=0));
			if (!(LOC28)) goto LA29;
			LOC28 = !(((arguments_176721) && (arguments_176721)->Sup.len == 0));
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA30;
			LOC31 = 0;
			LOC31 = nsuNormalize(command_153239);
			LOC27 = !(eqStrings(LOC31, ((NimStringDesc*) &TMP10635)));
			LA30: ;
			if (!LOC27) goto LA32;
			nimln(46, "service.nim");
			memset((void*)LOC34, 0, sizeof(LOC34));
			rawmessage_163888(((NU16) 57), LOC34, 0);
		}
		LA32: ;
	}
	LA23: ;
	popFrame();
}
Ejemplo n.º 3
0
N_NIMCALL(void, processcmdline_531203)(NU8 pass, NimStringDesc* cmd) {
	Optparser200205 p;
	NI argscount;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI200205);
	chckNil((void*)(&p));
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI200205);
	initoptparser_200325(cmd, (&p));
	argscount = ((NI) 0);
	{
		while (1) {
			nponext((&p));
			switch (p.kind) {
			case ((NU8) 0):
			{
				goto LA1;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			{
				{
					if (!eqStrings(p.key, ((NimStringDesc*) &TMP1671))) goto LA7;
					p.key = copyString(((NimStringDesc*) &TMP1672));
					{
						NIM_BOOL LOC11;
						LOC11 = 0;
						LOC11 = processargument_202707(pass, (&p), (&argscount));
						if (!LOC11) goto LA12;
						goto LA1;
					}
					LA12: ;
				}
				goto LA5;
				LA7: ;
				{
					processswitch_202700(pass, (&p));
				}
				LA5: ;
			}
			break;
			case ((NU8) 1):
			{
				{
					NIM_BOOL LOC18;
					LOC18 = 0;
					LOC18 = processargument_202707(pass, (&p), (&argscount));
					if (!LOC18) goto LA19;
					goto LA1;
				}
				LA19: ;
			}
			break;
			}
		}
	} LA1: ;
	{
		if (!(pass == ((NU8) 1))) goto LA23;
		{
			NIM_BOOL LOC27;
			NIM_BOOL LOC28;
			NimStringDesc* LOC31;
			TY239694 LOC34;
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = !(((gglobaloptions_161121 &(1U<<((NU)(((NU8) 13))&31U)))!=0));
			if (!(LOC28)) goto LA29;
			LOC28 = !(((arguments_202699) && (arguments_202699)->Sup.len == 0));
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA30;
			LOC31 = 0;
			LOC31 = nsuNormalize(command_161205);
			LOC27 = !(eqStrings(LOC31, ((NimStringDesc*) &TMP2027)));
			LA30: ;
			if (!LOC27) goto LA32;
			memset((void*)LOC34, 0, sizeof(LOC34));
			rawmessage_185645(((NU16) 59), LOC34, 0);
		}
		LA32: ;
	}
	LA23: ;
}
Ejemplo n.º 4
0
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: ;
}
Ejemplo n.º 5
0
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();
}
Ejemplo n.º 6
0
N_NIMCALL(void, processcmdline_593203_3526807654)(Tcmdlinepass281008 pass0, NimStringDesc* cmd0) {
	Optparser279405 p0;
	NI argscount0;
	memset((void*)(&p0), 0, sizeof(p0));
	p0.Sup.m_type = (&NTI279405);
	chckNil((void*)(&p0));
	memset((void*)(&p0), 0, sizeof(p0));
	p0.Sup.m_type = (&NTI279405);
	initoptparser_279527_4065315820(cmd0, (&p0));
	argscount0 = ((NI) 0);
	{
		while (1) {
			nponext((&p0));
			switch (p0.kind) {
			case ((Cmdlinekind279403) 0):
			{
				goto LA1;
			}
			break;
			case ((Cmdlinekind279403) 2):
			case ((Cmdlinekind279403) 3):
			{
				{
					if (!eqStrings(p0.key, ((NimStringDesc*) &T3526807654_5))) goto LA7;
					p0.key = copyString(((NimStringDesc*) &T3526807654_6));
					{
						NIM_BOOL LOC11;
						LOC11 = (NIM_BOOL)0;
						LOC11 = processargument_282819_2004575671(pass0, (&p0), (&argscount0));
						if (!LOC11) goto LA12;
						goto LA1;
					}
					LA12: ;
				}
				goto LA5;
				LA7: ;
				{
					processswitch_282812_2004575671(pass0, (&p0));
				}
				LA5: ;
			}
			break;
			case ((Cmdlinekind279403) 1):
			{
				{
					NIM_BOOL LOC18;
					LOC18 = (NIM_BOOL)0;
					LOC18 = processargument_282819_2004575671(pass0, (&p0), (&argscount0));
					if (!LOC18) goto LA19;
					goto LA1;
				}
				LA19: ;
			}
			break;
			}
		}
	} LA1: ;
	{
		if (!(pass0 == ((Tcmdlinepass281008) 1))) goto LA23;
		{
			NIM_BOOL LOC27;
			NIM_BOOL LOC28;
			NimStringDesc* LOC31;
			TY318494 LOC34;
			LOC27 = (NIM_BOOL)0;
			LOC28 = (NIM_BOOL)0;
			LOC28 = !(((gglobaloptions_170130_2607990831 &((NU64)1<<((NU)(((Tglobaloption170013) 13))&63U)))!=0));
			if (!(LOC28)) goto LA29;
			LOC28 = !(((arguments_282811_2004575671) && (arguments_282811_2004575671)->Sup.len == 0));
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA30;
			LOC31 = (NimStringDesc*)0;
			LOC31 = nsuNormalize(command_170215_2607990831);
			LOC27 = !(eqStrings(LOC31, ((NimStringDesc*) &T3526807654_7)));
			LA30: ;
			if (!LOC27) goto LA32;
			memset((void*)LOC34, 0, sizeof(LOC34));
			rawmessage_194645_155036129(((Tmsgkind192002) 59), LOC34, 0);
		}
		LA32: ;
	}
	LA23: ;
}
Ejemplo n.º 7
0
N_NIMCALL(void, processcmdline_521209)(NU8 pass, NimStringDesc* cmd) {
	Optparser174011 p;
	NI argscount;
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI174011);
	chckNil((void*)(&p));
	memset((void*)(&p), 0, sizeof(p));
	p.Sup.m_type = (&NTI174011);
	initoptparser_174030(cmd, (&p));
	argscount = ((NI) 0);
	{
		while (1) {
			nponext((&p));
			switch (p.kind) {
			case ((NU8) 0):
			{
				goto LA1;
			}
			break;
			case ((NU8) 2):
			case ((NU8) 3):
			{
				{
					if (!eqStrings(p.key, ((NimStringDesc*) &TMP1541))) goto LA7;
					p.key = copyString(((NimStringDesc*) &TMP1542));
					{
						NIM_BOOL LOC11;
						LOC11 = 0;
						LOC11 = processargument_176740(pass, (&p), (&argscount));
						if (!LOC11) goto LA12;
						goto LA1;
					}
					LA12: ;
				}
				goto LA5;
				LA7: ;
				{
					processswitch_176727(pass, (&p));
				}
				LA5: ;
			}
			break;
			case ((NU8) 1):
			{
				{
					NIM_BOOL LOC18;
					LOC18 = 0;
					LOC18 = processargument_176740(pass, (&p), (&argscount));
					if (!LOC18) goto LA19;
					goto LA1;
				}
				LA19: ;
			}
			break;
			}
		}
	} LA1: ;
	{
		if (!(pass == ((NU8) 1))) goto LA23;
		{
			NIM_BOOL LOC27;
			NIM_BOOL LOC28;
			NimStringDesc* LOC31;
			TY218714 LOC34;
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = !(((gglobaloptions_153128 &(1<<((((NU8) 13))&31)))!=0));
			if (!(LOC28)) goto LA29;
			LOC28 = !(((arguments_176723) && (arguments_176723)->Sup.len == 0));
			LA29: ;
			LOC27 = LOC28;
			if (!(LOC27)) goto LA30;
			LOC31 = 0;
			LOC31 = nsuNormalize(command_153239);
			LOC27 = !(eqStrings(LOC31, ((NimStringDesc*) &TMP1869)));
			LA30: ;
			if (!LOC27) goto LA32;
			memset((void*)LOC34, 0, sizeof(LOC34));
			rawmessage_163898(((NU16) 57), LOC34, 0);
		}
		LA32: ;
	}
	LA23: ;
}