Beispiel #1
0
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;
}
Beispiel #2
0
N_NIMCALL(void, handlecmdline_529603)(void) {
	nimfr("handleCmdLine", "nimrod.nim")
	nimln(35, "nimrod.nim");
	{
		NI LOC3;
		nimln(35, "nimrod.nim");
		nimln(35, "nimrod.nim");
		LOC3 = 0;
		LOC3 = paramcount_114233();
		if (!(LOC3 == 0)) goto LA4;
		nimln(36, "nimrod.nim");
		writecommandlineusage_171002();
	}
	goto LA1;
	LA4: ;
	{
		nimln(39, "nimrod.nim");
		processcmdline_523207(((NU8) 0), ((NimStringDesc*) &TMP7787));
		nimln(40, "nimrod.nim");
		{
			TSafePoint TMP7788;
			TY108700 p;
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			nimln(40, "nimrod.nim");
			nimln(40, "nimrod.nim");
			if (!!(((gprojectname_135206) && (gprojectname_135206)->Sup.len == 0))) goto LA9;
			nimln(41, "nimrod.nim");
			pushSafePoint(&TMP7788);
			TMP7788.status = setjmp(TMP7788.context);
			if (TMP7788.status == 0) {
				nimln(42, "nimrod.nim");
				asgnRefNoCycle((void**) &gprojectfull_135208, canonicalizepath_135335(gprojectname_135206));
				popSafePoint();
			}
			else {
				popSafePoint();
				setFrame((TFrame*)&F);
				if (isObj(getCurrentException()->Sup.m_type, (&NTI2435))) {
					NimStringDesc* LOC14;
					TMP7788.status = 0;
					nimln(44, "nimrod.nim");
					LOC14 = 0;
					LOC14 = gprojectfull_135208; gprojectfull_135208 = copyStringRC1(gprojectname_135206);
					if (LOC14) nimGCunrefNoCycle(LOC14);
					popCurrentException();
				}
			}
			if (TMP7788.status != 0) reraiseException();
			nimln(45, "nimrod.nim");
			chckNil((void*)&p);
			memset((void*)&p, 0, sizeof(p));
			nossplitFile(gprojectfull_135208, &p);
			nimln(46, "nimrod.nim");
			LOC15 = 0;
			LOC15 = gprojectpath_135207; gprojectpath_135207 = copyStringRC1(p.Field0);
			if (LOC15) nimGCunrefNoCycle(LOC15);
			nimln(47, "nimrod.nim");
			LOC16 = 0;
			LOC16 = gprojectname_135206; gprojectname_135206 = copyStringRC1(p.Field1);
			if (LOC16) nimGCunrefNoCycle(LOC16);
		}
		goto LA7;
		LA9: ;
		{
			nimln(49, "nimrod.nim");
			asgnRefNoCycle((void**) &gprojectpath_135207, nosgetCurrentDir());
		}
		LA7: ;
		nimln(50, "nimrod.nim");
		loadconfigs_181607(((NimStringDesc*) &TMP7789));
		nimln(53, "nimrod.nim");
		initvars_167714();
		nimln(54, "nimrod.nim");
		processcmdline_523207(((NU8) 1), ((NimStringDesc*) &TMP7787));
		nimln(55, "nimrod.nim");
		maincommand_527011();
		nimln(56, "nimrod.nim");
		{
			NimStringDesc* LOC22;
			nimln(56, "nimrod.nim");
			if (!(2 <= gverbosity_135120)) goto LA20;
			nimln(56, "nimrod.nim");
			nimln(56, "nimrod.nim");
			LOC22 = 0;
			LOC22 = gcgetstatistics_6621();
			printf("%s\012", (LOC22)->data);
		}
		LA20: ;
		nimln(58, "nimrod.nim");
		{
			nimln(58, "nimrod.nim");
			if (!(gerrorcounter_162182 == 0)) goto LA25;
			nimln(62, "nimrod.nim");
			{
				nimln(62, "nimrod.nim");
				if (!((gglobaloptions_135111 &(1<<((((NU8) 13))&31)))!=0)) goto LA29;
				nimln(63, "nimrod.nim");
				{
					NimStringDesc* ex;
					NimStringDesc* LOC44;
					nimln(63, "nimrod.nim");
					if (!(gcmd_135113 == ((NU8) 4))) goto LA33;
					ex = 0;
					nimln(65, "nimrod.nim");
					{
						NimStringDesc* LOC39;
						nimln(65, "nimrod.nim");
						nimln(65, "nimrod.nim");
						if (!(0 < outfile_135117->Sup.len)) goto LA37;
						nimln(66, "nimrod.nim");
						nimln(66, "nimrod.nim");
						LOC39 = 0;
						LOC39 = prependcurdir_529401(outfile_135117);
						ex = nospquoteShell(LOC39);
					}
					goto LA35;
					LA37: ;
					{
						NimStringDesc* LOC41;
						NimStringDesc* LOC42;
						NimStringDesc* LOC43;
						nimln(68, "nimrod.nim");
						nimln(69, "nimrod.nim");
						nimln(69, "nimrod.nim");
						nimln(69, "nimrod.nim");
						LOC41 = 0;
						LOC41 = noschangeFileExt(gprojectfull_135208, ((NimStringDesc*) &TMP7790));
						LOC42 = 0;
						LOC42 = prependcurdir_529401(LOC41);
						LOC43 = 0;
						LOC43 = completecfilepath_167753(LOC42, NIM_TRUE);
						ex = nospquoteShell(LOC43);
					}
					LA35: ;
					nimln(70, "nimrod.nim");
					nimln(70, "nimrod.nim");
					LOC44 = 0;
					LOC44 = rawNewString(ex->Sup.len + arguments_523205->Sup.len + 6);
appendString(LOC44, ((NimStringDesc*) &TMP7791));
appendString(LOC44, ex);
appendChar(LOC44, 32);
appendString(LOC44, arguments_523205);
					execexternalprogram_167785(LOC44);
				}
				goto LA31;
				LA33: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC52;
					binpath = 0;
					nimln(73, "nimrod.nim");
					{
						nimln(73, "nimrod.nim");
						nimln(73, "nimrod.nim");
						if (!(0 < outfile_135117->Sup.len)) goto LA48;
						nimln(75, "nimrod.nim");
						binpath = prependcurdir_529401(outfile_135117);
					}
					goto LA46;
					LA48: ;
					{
						NimStringDesc* LOC51;
						nimln(78, "nimrod.nim");
						nimln(78, "nimrod.nim");
						LOC51 = 0;
						LOC51 = noschangeFileExt(gprojectfull_135208, ((NimStringDesc*) &TMP7787));
						binpath = prependcurdir_529401(LOC51);
					}
					LA46: ;
					nimln(79, "nimrod.nim");
					ex = nospquoteShell(binpath);
					nimln(80, "nimrod.nim");
					nimln(80, "nimrod.nim");
					LOC52 = 0;
					LOC52 = rawNewString(ex->Sup.len + arguments_523205->Sup.len + 1);
appendString(LOC52, ex);
appendChar(LOC52, 32);
appendString(LOC52, arguments_523205);
					execexternalprogram_167785(LOC52);
				}
				LA31: ;
			}
			LA29: ;
		}
		LA25: ;
	}
	LA1: ;
	popFrame();
}
Beispiel #3
0
N_NIMCALL(void, loadconfigs_185811)(NimStringDesc* cfg) {
	NimStringDesc* pd;
	{
		NimStringDesc* prefix;
		if (!((libpath_153233) && (libpath_153233)->Sup.len == 0)) goto LA3;
		prefix = getprefixdir_153371();
		{
			NimStringDesc* LOC9;
			if (!eqStrings(prefix, ((NimStringDesc*) &TMP1872))) goto LA7;
			LOC9 = 0;
			LOC9 = libpath_153233; libpath_153233 = copyStringRC1(((NimStringDesc*) &TMP1873));
			if (LOC9) nimGCunrefNoCycle(LOC9);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* LOC13;
			if (!eqStrings(prefix, ((NimStringDesc*) &TMP1874))) goto LA11;
			LOC13 = 0;
			LOC13 = libpath_153233; libpath_153233 = copyStringRC1(((NimStringDesc*) &TMP1875));
			if (LOC13) nimGCunrefNoCycle(LOC13);
		}
		goto LA5;
		LA11: ;
		{
			asgnRefNoCycle((void**) (&libpath_153233), nosjoinPath(prefix, ((NimStringDesc*) &TMP1876)));
		}
		LA5: ;
	}
	LA3: ;
	{
		NimStringDesc* LOC19;
		if (!!(((gglobaloptions_153128 &(1<<((((NU8) 16))&31)))!=0))) goto LA17;
		LOC19 = 0;
		LOC19 = getsystemconfigpath_185592(cfg);
		readconfigfile_185522(LOC19);
	}
	LA17: ;
	{
		NimStringDesc* LOC24;
		if (!!(((gglobaloptions_153128 &(1<<((((NU8) 18))&31)))!=0))) goto LA22;
		LOC24 = 0;
		LOC24 = getuserconfigpath_185580(cfg);
		readconfigfile_185522(LOC24);
	}
	LA22: ;
	{
		if (!(((NI) 0) < (gprojectpath_153235 ? gprojectpath_153235->Sup.len : 0))) goto LA27;
		pd = copyString(gprojectpath_153235);
	}
	goto LA25;
	LA27: ;
	{
		pd = nosgetCurrentDir();
	}
	LA25: ;
	{
		if (!!(((gglobaloptions_153128 &(1<<((((NU8) 19))&31)))!=0))) goto LA32;
		{
			NimStringDesc* dir_186034;
			dir_186034 = 0;
			{
				NimStringDesc* current_186051;
				if (!NIM_FALSE) goto LA37;
				current_186051 = copyString(pd);
				{
					NimStringDesc* LOC43;
					if (!NIM_FALSE) goto LA41;
					dir_186034 = pd;
					LOC43 = 0;
					LOC43 = HEX2F_118292(dir_186034, cfg);
					readconfigfile_185522(LOC43);
				}
				LA41: ;
				{
					while (1) {
						NimStringDesc* LOC51;
						{
							NIM_BOOL LOC48;
							LOC48 = 0;
							LOC48 = nosisRootDir(current_186051);
							if (!LOC48) goto LA49;
							goto LA44;
						}
						LA49: ;
						current_186051 = nosparentDir(current_186051);
						dir_186034 = current_186051;
						LOC51 = 0;
						LOC51 = HEX2F_118292(dir_186034, cfg);
						readconfigfile_185522(LOC51);
					}
				} LA44: ;
			}
			goto LA35;
			LA37: ;
			{
				{
					NI i_186053;
					NI HEX3Atmp_186055;
					NI res_186057;
					i_186053 = 0;
					HEX3Atmp_186055 = 0;
					HEX3Atmp_186055 = (NI)((pd ? pd->Sup.len : 0) - ((NI) 2));
					res_186057 = ((NI) 0);
					{
						while (1) {
							if (!(res_186057 <= HEX3Atmp_186055)) goto LA55;
							i_186053 = res_186057;
							{
								NIM_BOOL LOC58;
								NIM_BOOL LOC60;
								NimStringDesc* LOC64;
								LOC58 = 0;
								LOC58 = (((NU8)(pd->data[i_186053])) == ((NU8)(47)) || ((NU8)(pd->data[i_186053])) == ((NU8)(47)));
								if (!(LOC58)) goto LA59;
								LOC60 = 0;
								LOC60 = (i_186053 == ((NI) 0));
								if (LOC60) goto LA61;
								LOC60 = !((((NU8)(pd->data[(NI)(i_186053 - ((NI) 1))])) == ((NU8)(47)) || ((NU8)(pd->data[(NI)(i_186053 - ((NI) 1))])) == ((NU8)(47))));
								LA61: ;
								LOC58 = LOC60;
								LA59: ;
								if (!LOC58) goto LA62;
								dir_186034 = copyStrLast(pd, ((NI) 0), i_186053);
								LOC64 = 0;
								LOC64 = HEX2F_118292(dir_186034, cfg);
								readconfigfile_185522(LOC64);
							}
							LA62: ;
							res_186057 += ((NI) 1);
						} LA55: ;
					}
				}
				{
					NimStringDesc* LOC69;
					if (!NIM_FALSE) goto LA67;
					dir_186034 = pd;
					LOC69 = 0;
					LOC69 = HEX2F_118292(dir_186034, cfg);
					readconfigfile_185522(LOC69);
				}
				LA67: ;
			}
			LA35: ;
		}
	}
	LA32: ;
	{
		NimStringDesc* LOC74;
		if (!!(((gglobaloptions_153128 &(1<<((((NU8) 17))&31)))!=0))) goto LA72;
		LOC74 = 0;
		LOC74 = HEX2F_118292(pd, cfg);
		readconfigfile_185522(LOC74);
		{
			NimStringDesc* projectconfig;
			if (!!(((gprojectname_153234 ? gprojectname_153234->Sup.len : 0) == ((NI) 0)))) goto LA77;
			projectconfig = noschangeFileExt(gprojectfull_153236, ((NimStringDesc*) &TMP1896));
			{
				NIM_BOOL LOC81;
				LOC81 = 0;
				LOC81 = fileexists_117010(projectconfig);
				if (!!(LOC81)) goto LA82;
				projectconfig = noschangeFileExt(gprojectfull_153236, ((NimStringDesc*) &TMP1897));
			}
			LA82: ;
			{
				NIM_BOOL LOC86;
				LOC86 = 0;
				LOC86 = fileexists_117010(projectconfig);
				if (!!(LOC86)) goto LA87;
				projectconfig = noschangeFileExt(gprojectfull_153236, ((NimStringDesc*) &TMP1898));
				{
					NIM_BOOL LOC91;
					LOC91 = 0;
					LOC91 = fileexists_117010(projectconfig);
					if (!LOC91) goto LA92;
					rawmessage_163970(((NU16) 234), projectconfig);
				}
				LA92: ;
			}
			LA87: ;
			readconfigfile_185522(projectconfig);
		}
		LA77: ;
	}
	LA72: ;
}
Beispiel #4
0
N_NIMCALL(void, loadconfigs_210603)(NimStringDesc* cfg) {
	NimStringDesc* pd;
	setdefaultlibpath_160298();
	{
		NimStringDesc* LOC5;
		if (!!(((gglobaloptions_160121 &(1U<<((NU)(((NU8) 16))&31U)))!=0))) goto LA3;
		LOC5 = 0;
		LOC5 = getsystemconfigpath_210434(cfg);
		readconfigfile_210382(LOC5);
	}
	LA3: ;
	{
		NimStringDesc* LOC10;
		if (!!(((gglobaloptions_160121 &(1U<<((NU)(((NU8) 18))&31U)))!=0))) goto LA8;
		LOC10 = 0;
		LOC10 = getuserconfigpath_210428(cfg);
		readconfigfile_210382(LOC10);
	}
	LA8: ;
	{
		if (!(((NI) 0) < (gprojectpath_160200 ? gprojectpath_160200->Sup.len : 0))) goto LA13;
		pd = copyString(gprojectpath_160200);
	}
	goto LA11;
	LA13: ;
	{
		pd = nosgetCurrentDir();
	}
	LA11: ;
	{
		if (!!(((gglobaloptions_160121 &(1U<<((NU)(((NU8) 19))&31U)))!=0))) goto LA18;
		{
			NimStringDesc* dir_210637;
			dir_210637 = 0;
			{
				NimStringDesc* current_210654;
				if (!NIM_FALSE) goto LA23;
				current_210654 = copyString(pd);
				{
					NimStringDesc* LOC29;
					if (!NIM_FALSE) goto LA27;
					dir_210637 = pd;
					LOC29 = 0;
					LOC29 = HEX2F_118465(dir_210637, cfg);
					readconfigfile_210382(LOC29);
				}
				LA27: ;
				{
					while (1) {
						NimStringDesc* LOC37;
						{
							NIM_BOOL LOC34;
							LOC34 = 0;
							LOC34 = nosisRootDir(current_210654);
							if (!LOC34) goto LA35;
							goto LA30;
						}
						LA35: ;
						current_210654 = nosparentDir(current_210654);
						dir_210637 = current_210654;
						LOC37 = 0;
						LOC37 = HEX2F_118465(dir_210637, cfg);
						readconfigfile_210382(LOC37);
					}
				} LA30: ;
			}
			goto LA21;
			LA23: ;
			{
				{
					NI i_210656;
					NI HEX3Atmp_210658;
					NI res_210660;
					i_210656 = 0;
					HEX3Atmp_210658 = 0;
					HEX3Atmp_210658 = (NI)((pd ? pd->Sup.len : 0) - ((NI) 2));
					res_210660 = ((NI) 0);
					{
						while (1) {
							if (!(res_210660 <= HEX3Atmp_210658)) goto LA41;
							i_210656 = res_210660;
							{
								NIM_BOOL LOC44;
								NIM_BOOL LOC46;
								NimStringDesc* LOC50;
								LOC44 = 0;
								LOC44 = (((NU8)(pd->data[i_210656])) == ((NU8)(47)) || ((NU8)(pd->data[i_210656])) == ((NU8)(47)));
								if (!(LOC44)) goto LA45;
								LOC46 = 0;
								LOC46 = (i_210656 == ((NI) 0));
								if (LOC46) goto LA47;
								LOC46 = !((((NU8)(pd->data[(NI)(i_210656 - ((NI) 1))])) == ((NU8)(47)) || ((NU8)(pd->data[(NI)(i_210656 - ((NI) 1))])) == ((NU8)(47))));
								LA47: ;
								LOC44 = LOC46;
								LA45: ;
								if (!LOC44) goto LA48;
								dir_210637 = copyStrLast(pd, ((NI) 0), i_210656);
								LOC50 = 0;
								LOC50 = HEX2F_118465(dir_210637, cfg);
								readconfigfile_210382(LOC50);
							}
							LA48: ;
							res_210660 += ((NI) 1);
						} LA41: ;
					}
				}
				{
					NimStringDesc* LOC55;
					if (!NIM_FALSE) goto LA53;
					dir_210637 = pd;
					LOC55 = 0;
					LOC55 = HEX2F_118465(dir_210637, cfg);
					readconfigfile_210382(LOC55);
				}
				LA53: ;
			}
			LA21: ;
		}
	}
	LA18: ;
	{
		NimStringDesc* LOC60;
		if (!!(((gglobaloptions_160121 &(1U<<((NU)(((NU8) 17))&31U)))!=0))) goto LA58;
		LOC60 = 0;
		LOC60 = HEX2F_118465(pd, cfg);
		readconfigfile_210382(LOC60);
		{
			NimStringDesc* projectconfig;
			if (!!(((gprojectname_160199 ? gprojectname_160199->Sup.len : 0) == ((NI) 0)))) goto LA63;
			projectconfig = noschangeFileExt(gprojectfull_160201, ((NimStringDesc*) &TMP2054));
			{
				NIM_BOOL LOC67;
				LOC67 = 0;
				LOC67 = fileexists_121804(projectconfig);
				if (!!(LOC67)) goto LA68;
				projectconfig = noschangeFileExt(gprojectfull_160201, ((NimStringDesc*) &TMP2055));
			}
			LA68: ;
			{
				NIM_BOOL LOC72;
				LOC72 = 0;
				LOC72 = fileexists_121804(projectconfig);
				if (!!(LOC72)) goto LA73;
				projectconfig = noschangeFileExt(gprojectfull_160201, ((NimStringDesc*) &TMP2056));
				{
					NIM_BOOL LOC77;
					LOC77 = 0;
					LOC77 = fileexists_121804(projectconfig);
					if (!LOC77) goto LA78;
					rawmessage_185612(((NU16) 241), projectconfig);
				}
				LA78: ;
			}
			LA73: ;
			readconfigfile_210382(projectconfig);
		}
		LA63: ;
	}
	LA58: ;
}
Beispiel #5
0
N_NIMCALL(void, handlecmdline_535601)(void) {
{	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = paramcount_131626();
		if (!(LOC3 == ((NI) 0))) goto LA4;
		writecommandlineusage_199005();
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* scriptfile;
		processcmdline_529203(((NU8) 0), ((NimStringDesc*) &TMP2024));
		{
			NimStringDesc* LOC11;
			NimStringDesc* LOC12;
			if (!eqStrings(gprojectname_159199, ((NimStringDesc*) &TMP2025))) goto LA9;
			LOC11 = 0;
			LOC11 = gprojectname_159199; gprojectname_159199 = copyStringRC1(((NimStringDesc*) &TMP2026));
			if (LOC11) nimGCunrefNoCycle(LOC11);
			LOC12 = 0;
			LOC12 = gprojectfull_159201; gprojectfull_159201 = copyStringRC1(((NimStringDesc*) &TMP2026));
			if (LOC12) nimGCunrefNoCycle(LOC12);
			asgnRefNoCycle((void**) (&gprojectpath_159200), nosgetCurrentDir());
			gprojectisstdin_159202 = NIM_TRUE;
		}
		goto LA7;
		LA9: ;
		{
			TSafePoint TMP2027;
			TY118906 p;
			NimStringDesc* LOC20;
			NimStringDesc* LOC21;
			if (!!(((gprojectname_159199) && (gprojectname_159199)->Sup.len == 0))) goto LA14;
			pushSafePoint(&TMP2027);
			TMP2027.status = _setjmp(TMP2027.context);
			if (TMP2027.status == 0) {
				asgnRefNoCycle((void**) (&gprojectfull_159201), canonicalizepath_159405(gprojectname_159199));
				popSafePoint();
			}
			else {
				popSafePoint();
				if (isObj(getCurrentException()->Sup.m_type, (&NTI3630))) {
					NimStringDesc* LOC19;
					TMP2027.status = 0;
					LOC19 = 0;
					LOC19 = gprojectfull_159201; gprojectfull_159201 = copyStringRC1(gprojectname_159199);
					if (LOC19) nimGCunrefNoCycle(LOC19);
					popCurrentException();
				}
			}
			if (TMP2027.status != 0) reraiseException();
			memset((void*)(&p), 0, sizeof(p));
			chckNil((void*)(&p));
			memset((void*)(&p), 0, sizeof(p));
			nossplitFile(gprojectfull_159201, (&p));
			LOC20 = 0;
			LOC20 = gprojectpath_159200; gprojectpath_159200 = copyStringRC1(p.Field0);
			if (LOC20) nimGCunrefNoCycle(LOC20);
			LOC21 = 0;
			LOC21 = gprojectname_159199; gprojectname_159199 = copyStringRC1(p.Field1);
			if (LOC21) nimGCunrefNoCycle(LOC21);
		}
		goto LA7;
		LA14: ;
		{
			asgnRefNoCycle((void**) (&gprojectpath_159200), nosgetCurrentDir());
		}
		LA7: ;
		loadconfigs_209603(((NimStringDesc*) &TMP2056));
		scriptfile = noschangeFileExt(gprojectfull_159201, ((NimStringDesc*) &TMP2057));
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = fileexists_122004(scriptfile);
			if (!LOC25) goto LA26;
			runnimscript_534203(scriptfile);
			{
				if (!eqStrings(scriptfile, gprojectfull_159201)) goto LA30;
				goto BeforeRet;
			}
			LA30: ;
		}
		goto LA23;
		LA26: ;
		{
			NimStringDesc* LOC33;
			NIM_BOOL LOC34;
			NimStringDesc* LOC37;
			LOC33 = 0;
			LOC33 = HEX2F_118665(gprojectpath_159200, ((NimStringDesc*) &TMP3718));
			LOC34 = 0;
			LOC34 = fileexists_122004(LOC33);
			if (!LOC34) goto LA35;
			LOC37 = 0;
			LOC37 = HEX2F_118665(gprojectpath_159200, ((NimStringDesc*) &TMP3718));
			runnimscript_534203(LOC37);
		}
		goto LA23;
		LA35: ;
		LA23: ;
		initvars_193834();
		processcmdline_529203(((NU8) 1), ((NimStringDesc*) &TMP2024));
		{
			if (!((command_159205) && (command_159205)->Sup.len == 0)) goto LA40;
			rawmessage_184612(((NU16) 184), command_159205);
		}
		LA40: ;
		maincommand_531610();
		{
			NIM_BOOL LOC44;
			NimStringDesc* LOC48;
			LOC44 = 0;
			LOC44 = ((goptions_159119 &(1U<<((NU)(((NU8) 12))&31U)))!=0);
			if (!(LOC44)) goto LA45;
			LOC44 = ((gnotes_182077 &((NU64)1<<((NU)((((NU16) 289)- 237))&63U)))!=0);
			LA45: ;
			if (!LOC44) goto LA46;
			LOC48 = 0;
			LOC48 = Gcgetstatistics_9821();
			printf("%s\012", LOC48? (LOC48)->data:"nil");
			fflush(stdout);
		}
		LA46: ;
		{
			if (!(gerrorcounter_182078 == ((NI) 0))) goto LA51;
			{
				if (!((gglobaloptions_159121 &(1U<<((NU)(((NU8) 13))&31U)))!=0)) goto LA55;
				{
					NimStringDesc* ex;
					NimStringDesc* LOC70;
					NimStringDesc* LOC71;
					if (!(gcmd_159123 == ((NU8) 4))) goto LA59;
					ex = 0;
					{
						NimStringDesc* LOC65;
						if (!(((NI) 0) < (outfile_159127 ? outfile_159127->Sup.len : 0))) goto LA63;
						LOC65 = 0;
						LOC65 = prependcurdir_535401(outfile_159127);
						ex = nospquoteShell(LOC65);
					}
					goto LA61;
					LA63: ;
					{
						NimStringDesc* LOC67;
						NimStringDesc* LOC68;
						NimStringDesc* LOC69;
						LOC67 = 0;
						LOC67 = noschangeFileExt(gprojectfull_159201, ((NimStringDesc*) &TMP5307));
						LOC68 = 0;
						LOC68 = prependcurdir_535401(LOC67);
						LOC69 = 0;
						LOC69 = completecfilepath_193854(LOC68, NIM_TRUE);
						ex = nospquoteShell(LOC69);
					}
					LA61: ;
					LOC70 = 0;
					LOC71 = 0;
					LOC71 = findnodejs_533003();
					LOC70 = rawNewString(LOC71->Sup.len + ex->Sup.len + arguments_200699->Sup.len + 2);
appendString(LOC70, LOC71);
appendString(LOC70, ((NimStringDesc*) &TMP5311));
appendString(LOC70, ex);
appendChar(LOC70, 32);
appendString(LOC70, arguments_200699);
					execexternalprogram_193881(LOC70, ((NU16) 284));
				}
				goto LA57;
				LA59: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC79;
					binpath = 0;
					{
						if (!(((NI) 0) < (outfile_159127 ? outfile_159127->Sup.len : 0))) goto LA75;
						binpath = prependcurdir_535401(outfile_159127);
					}
					goto LA73;
					LA75: ;
					{
						NimStringDesc* LOC78;
						LOC78 = 0;
						LOC78 = noschangeFileExt(gprojectfull_159201, ((NimStringDesc*) &TMP2024));
						binpath = prependcurdir_535401(LOC78);
					}
					LA73: ;
					ex = nospquoteShell(binpath);
					LOC79 = 0;
					LOC79 = rawNewString(ex->Sup.len + arguments_200699->Sup.len + 1);
appendString(LOC79, ex);
appendChar(LOC79, 32);
appendString(LOC79, arguments_200699);
					execexternalprogram_193881(LOC79, ((NU16) 284));
				}
				LA57: ;
			}
			LA55: ;
		}
		LA51: ;
	}
	LA1: ;
	}BeforeRet: ;
}
Beispiel #6
0
N_NIMCALL(void, loadconfigs_186809)(NimStringDesc* cfg) {
	NimStringDesc* pd;
	nimfr("loadConfigs", "nimconf.nim")
	nimln(230, "nimconf.nim");
	{
		NimStringDesc* prefix;
		if (!((libpath_154233) && (libpath_154233)->Sup.len == 0)) goto LA3;
		nimln(232, "nimconf.nim");
		prefix = getprefixdir_154365();
		nimln(234, "nimconf.nim");
		{
			NimStringDesc* LOC9;
			if (!eqStrings(prefix, ((NimStringDesc*) &TMP2504))) goto LA7;
			LOC9 = 0;
			LOC9 = libpath_154233; libpath_154233 = copyStringRC1(((NimStringDesc*) &TMP2505));
			if (LOC9) nimGCunrefNoCycle(LOC9);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* LOC13;
			nimln(235, "nimconf.nim");
			if (!eqStrings(prefix, ((NimStringDesc*) &TMP2506))) goto LA11;
			LOC13 = 0;
			LOC13 = libpath_154233; libpath_154233 = copyStringRC1(((NimStringDesc*) &TMP2507));
			if (LOC13) nimGCunrefNoCycle(LOC13);
		}
		goto LA5;
		LA11: ;
		{
			nimln(236, "nimconf.nim");
			asgnRefNoCycle((void**) (&libpath_154233), nosjoinPath(prefix, ((NimStringDesc*) &TMP2508)));
		}
		LA5: ;
	}
	LA3: ;
	nimln(239, "nimconf.nim");
	{
		NimStringDesc* LOC19;
		if (!!(((gglobaloptions_154128 &(1<<((((NU8) 16))&31)))!=0))) goto LA17;
		nimln(240, "nimconf.nim");
		LOC19 = 0;
		LOC19 = getsystemconfigpath_186594(cfg);
		readconfigfile_186520(LOC19);
	}
	LA17: ;
	nimln(242, "nimconf.nim");
	{
		NimStringDesc* LOC24;
		if (!!(((gglobaloptions_154128 &(1<<((((NU8) 18))&31)))!=0))) goto LA22;
		nimln(243, "nimconf.nim");
		LOC24 = 0;
		LOC24 = getuserconfigpath_186582(cfg);
		readconfigfile_186520(LOC24);
	}
	LA22: ;
	nimln(245, "nimconf.nim");
	{
		if (!(((NI) 0) < (gprojectpath_154235 ? gprojectpath_154235->Sup.len : 0))) goto LA27;
		pd = copyString(gprojectpath_154235);
	}
	goto LA25;
	LA27: ;
	{
		pd = nosgetCurrentDir();
	}
	LA25: ;
	nimln(246, "nimconf.nim");
	{
		if (!!(((gglobaloptions_154128 &(1<<((((NU8) 19))&31)))!=0))) goto LA32;
		{
			NimStringDesc* dir_187034;
			dir_187034 = 0;
			nimln(635, "os.nim");
			{
				NimStringDesc* current_187051;
				if (!NIM_FALSE) goto LA37;
				nimln(636, "os.nim");
				current_187051 = copyString(pd);
				nimln(637, "os.nim");
				{
					NimStringDesc* LOC43;
					if (!NIM_FALSE) goto LA41;
					nimln(247, "nimconf.nim");
					dir_187034 = pd;
					nimln(248, "nimconf.nim");
					LOC43 = 0;
					LOC43 = HEX2F_119292(dir_187034, cfg);
					readconfigfile_186520(LOC43);
				}
				LA41: ;
				{
					nimln(638, "os.nim");
					while (1) {
						NimStringDesc* LOC51;
						nimln(639, "os.nim");
						{
							NIM_BOOL LOC48;
							LOC48 = 0;
							LOC48 = nosisRootDir(current_187051);
							if (!LOC48) goto LA49;
							goto LA44;
						}
						LA49: ;
						nimln(640, "os.nim");
						current_187051 = nosparentDir(current_187051);
						nimln(636, "os.nim");
						dir_187034 = current_187051;
						nimln(248, "nimconf.nim");
						LOC51 = 0;
						LOC51 = HEX2F_119292(dir_187034, cfg);
						readconfigfile_186520(LOC51);
					}
				} LA44: ;
			}
			goto LA35;
			LA37: ;
			{
				{
					NI i_187053;
					NI HEX3Atmp_187055;
					NI TMP2509;
					NI res_187057;
					i_187053 = 0;
					HEX3Atmp_187055 = 0;
					nimln(643, "os.nim");
					TMP2509 = subInt((pd ? pd->Sup.len : 0), ((NI) 2));
					HEX3Atmp_187055 = (NI)(TMP2509);
					nimln(1598, "system.nim");
					res_187057 = ((NI) 0);
					{
						nimln(1599, "system.nim");
						while (1) {
							NI TMP2511;
							if (!(res_187057 <= HEX3Atmp_187055)) goto LA55;
							nimln(1600, "system.nim");
							i_187053 = res_187057;
							nimln(645, "os.nim");
							{
								NIM_BOOL LOC58;
								NIM_BOOL LOC60;
								NI TMP2510;
								NimStringDesc* LOC64;
								LOC58 = 0;
								if ((NU)(i_187053) > (NU)(pd->Sup.len)) raiseIndexError();
								LOC58 = (((NU8)(pd->data[i_187053])) == ((NU8)(47)) || ((NU8)(pd->data[i_187053])) == ((NU8)(47)));
								if (!(LOC58)) goto LA59;
								nimln(646, "os.nim");
								LOC60 = 0;
								LOC60 = (i_187053 == ((NI) 0));
								if (LOC60) goto LA61;
								TMP2510 = subInt(i_187053, ((NI) 1));
								if ((NU)((NI)(TMP2510)) > (NU)(pd->Sup.len)) raiseIndexError();
								LOC60 = !((((NU8)(pd->data[(NI)(TMP2510)])) == ((NU8)(47)) || ((NU8)(pd->data[(NI)(TMP2510)])) == ((NU8)(47))));
								LA61: ;
								LOC58 = LOC60;
								LA59: ;
								if (!LOC58) goto LA62;
								nimln(647, "os.nim");
								dir_187034 = copyStrLast(pd, ((NI) 0), i_187053);
								nimln(248, "nimconf.nim");
								LOC64 = 0;
								LOC64 = HEX2F_119292(dir_187034, cfg);
								readconfigfile_186520(LOC64);
							}
							LA62: ;
							nimln(1614, "system.nim");
							TMP2511 = addInt(res_187057, ((NI) 1));
							res_187057 = (NI)(TMP2511);
						} LA55: ;
					}
				}
				nimln(649, "os.nim");
				{
					NimStringDesc* LOC69;
					if (!NIM_FALSE) goto LA67;
					nimln(247, "nimconf.nim");
					dir_187034 = pd;
					nimln(248, "nimconf.nim");
					LOC69 = 0;
					LOC69 = HEX2F_119292(dir_187034, cfg);
					readconfigfile_186520(LOC69);
				}
				LA67: ;
			}
			LA35: ;
		}
	}
	LA32: ;
	nimln(250, "nimconf.nim");
	{
		NimStringDesc* LOC74;
		if (!!(((gglobaloptions_154128 &(1<<((((NU8) 17))&31)))!=0))) goto LA72;
		nimln(251, "nimconf.nim");
		LOC74 = 0;
		LOC74 = HEX2F_119292(pd, cfg);
		readconfigfile_186520(LOC74);
		nimln(253, "nimconf.nim");
		{
			NimStringDesc* projectconfig;
			if (!!(((gprojectname_154234 ? gprojectname_154234->Sup.len : 0) == ((NI) 0)))) goto LA77;
			nimln(255, "nimconf.nim");
			projectconfig = noschangeFileExt(gprojectfull_154236, ((NimStringDesc*) &TMP2512));
			nimln(256, "nimconf.nim");
			{
				NIM_BOOL LOC81;
				LOC81 = 0;
				LOC81 = fileexists_118010(projectconfig);
				if (!!(LOC81)) goto LA82;
				nimln(257, "nimconf.nim");
				projectconfig = noschangeFileExt(gprojectfull_154236, ((NimStringDesc*) &TMP2513));
			}
			LA82: ;
			nimln(258, "nimconf.nim");
			{
				NIM_BOOL LOC86;
				LOC86 = 0;
				LOC86 = fileexists_118010(projectconfig);
				if (!!(LOC86)) goto LA87;
				nimln(259, "nimconf.nim");
				projectconfig = noschangeFileExt(gprojectfull_154236, ((NimStringDesc*) &TMP2514));
				nimln(260, "nimconf.nim");
				{
					NIM_BOOL LOC91;
					LOC91 = 0;
					LOC91 = fileexists_118010(projectconfig);
					if (!LOC91) goto LA92;
					nimln(261, "nimconf.nim");
					rawmessage_164960(((NU16) 234), projectconfig);
				}
				LA92: ;
			}
			LA87: ;
			nimln(262, "nimconf.nim");
			readconfigfile_186520(projectconfig);
		}
		LA77: ;
	}
	LA72: ;
	popFrame();
}
Beispiel #7
0
N_NIMCALL(void, loadconfigs_182607)(NimStringDesc* cfg) {
	NimStringDesc* pd;
	nimfr("loadConfigs", "nimconf.nim")
	nimln(224, "nimconf.nim");
	{
		NimStringDesc* prefix;
		nimln(224, "nimconf.nim");
		if (!((libpath_136205) && (libpath_136205)->Sup.len == 0)) goto LA3;
		nimln(226, "nimconf.nim");
		prefix = getprefixdir_136330();
		nimln(227, "nimconf.nim");
		{
			NimStringDesc* LOC9;
			nimln(227, "nimconf.nim");
			if (!eqStrings(prefix, ((NimStringDesc*) &TMP1923))) goto LA7;
			nimln(227, "nimconf.nim");
			LOC9 = 0;
			LOC9 = libpath_136205; libpath_136205 = copyStringRC1(((NimStringDesc*) &TMP1924));
			if (LOC9) nimGCunrefNoCycle(LOC9);
		}
		goto LA5;
		LA7: ;
		{
			NimStringDesc* LOC13;
			nimln(228, "nimconf.nim");
			if (!eqStrings(prefix, ((NimStringDesc*) &TMP1925))) goto LA11;
			nimln(228, "nimconf.nim");
			LOC13 = 0;
			LOC13 = libpath_136205; libpath_136205 = copyStringRC1(((NimStringDesc*) &TMP1926));
			if (LOC13) nimGCunrefNoCycle(LOC13);
		}
		goto LA5;
		LA11: ;
		{
			nimln(229, "nimconf.nim");
			asgnRefNoCycle((void**) &libpath_136205, nosjoinPath(prefix, ((NimStringDesc*) &TMP1927)));
		}
		LA5: ;
	}
	LA3: ;
	nimln(231, "nimconf.nim");
	{
		NimStringDesc* LOC19;
		nimln(231, "nimconf.nim");
		nimln(231, "nimconf.nim");
		if (!!(((gglobaloptions_136111 &(1<<((((NU8) 16))&31)))!=0))) goto LA17;
		nimln(232, "nimconf.nim");
		nimln(232, "nimconf.nim");
		LOC19 = 0;
		LOC19 = getsystemconfigpath_182544(cfg);
		readconfigfile_182479(LOC19);
	}
	LA17: ;
	nimln(234, "nimconf.nim");
	{
		NimStringDesc* LOC24;
		nimln(234, "nimconf.nim");
		nimln(234, "nimconf.nim");
		if (!!(((gglobaloptions_136111 &(1<<((((NU8) 18))&31)))!=0))) goto LA22;
		nimln(235, "nimconf.nim");
		nimln(235, "nimconf.nim");
		LOC24 = 0;
		LOC24 = getuserconfigpath_182536(cfg);
		readconfigfile_182479(LOC24);
	}
	LA22: ;
	nimln(237, "nimconf.nim");
	nimln(237, "nimconf.nim");
	{
		nimln(237, "nimconf.nim");
		nimln(237, "nimconf.nim");
		if (!(0 < gprojectpath_136207->Sup.len)) goto LA27;
		pd = copyString(gprojectpath_136207);
	}
	goto LA25;
	LA27: ;
	{
		nimln(237, "nimconf.nim");
		pd = nosgetCurrentDir();
	}
	LA25: ;
	nimln(238, "nimconf.nim");
	{
		NimStringDesc* dir_182654;
		nimln(238, "nimconf.nim");
		nimln(238, "nimconf.nim");
		if (!!(((gglobaloptions_136111 &(1<<((((NU8) 19))&31)))!=0))) goto LA32;
		dir_182654 = 0;
		nimln(621, "os.nim");
		{
			NimStringDesc* current_182669;
			if (!NIM_FALSE) goto LA36;
			nimln(622, "os.nim");
			current_182669 = copyString(pd);
			nimln(623, "os.nim");
			{
				NimStringDesc* LOC42;
				if (!NIM_FALSE) goto LA40;
				nimln(239, "nimconf.nim");
				dir_182654 = pd;
				nimln(240, "nimconf.nim");
				nimln(240, "nimconf.nim");
				LOC42 = 0;
				LOC42 = HEX2F_109477(dir_182654, cfg);
				readconfigfile_182479(LOC42);
			}
			LA40: ;
			nimln(624, "os.nim");
			while (1) {
				NimStringDesc* LOC49;
				nimln(625, "os.nim");
				{
					NIM_BOOL LOC46;
					nimln(625, "os.nim");
					LOC46 = 0;
					LOC46 = nosisRootDir(current_182669);
					if (!LOC46) goto LA47;
					nimln(625, "os.nim");
					goto LA43;
				}
				LA47: ;
				nimln(626, "os.nim");
				current_182669 = nosparentDir(current_182669);
				nimln(622, "os.nim");
				dir_182654 = current_182669;
				nimln(240, "nimconf.nim");
				nimln(240, "nimconf.nim");
				LOC49 = 0;
				LOC49 = HEX2F_109477(dir_182654, cfg);
				readconfigfile_182479(LOC49);
			} LA43: ;
		}
		goto LA34;
		LA36: ;
		{
			NI i_182671;
			NI HEX3Atmp_182673;
			NI TMP1928;
			NI res_182675;
			i_182671 = 0;
			HEX3Atmp_182673 = 0;
			nimln(629, "os.nim");
			nimln(629, "os.nim");
			nimln(629, "os.nim");
			TMP1928 = subInt(pd->Sup.len, 2);
			HEX3Atmp_182673 = (NI32)(TMP1928);
			nimln(1450, "system.nim");
			res_182675 = 0;
			nimln(1451, "system.nim");
			while (1) {
				nimln(1451, "system.nim");
				if (!(res_182675 <= HEX3Atmp_182673)) goto LA51;
				nimln(1450, "system.nim");
				i_182671 = res_182675;
				nimln(631, "os.nim");
				{
					NIM_BOOL LOC54;
					NIM_BOOL LOC56;
					NI TMP1929;
					NimStringDesc* LOC60;
					nimln(631, "os.nim");
					LOC54 = 0;
					nimln(631, "os.nim");
					if ((NU)(i_182671) > (NU)(pd->Sup.len)) raiseIndexError();
					LOC54 = (((NU8)(pd->data[i_182671])) == ((NU8)(47)) || ((NU8)(pd->data[i_182671])) == ((NU8)(47)));
					if (!(LOC54)) goto LA55;
					nimln(632, "os.nim");
					LOC56 = 0;
					nimln(632, "os.nim");
					LOC56 = (i_182671 == 0);
					if (LOC56) goto LA57;
					nimln(632, "os.nim");
					nimln(632, "os.nim");
					nimln(632, "os.nim");
					TMP1929 = subInt(i_182671, 1);
					if ((NU)((NI32)(TMP1929)) > (NU)(pd->Sup.len)) raiseIndexError();
					LOC56 = !((((NU8)(pd->data[(NI32)(TMP1929)])) == ((NU8)(47)) || ((NU8)(pd->data[(NI32)(TMP1929)])) == ((NU8)(47))));
					LA57: ;
					LOC54 = LOC56;
					LA55: ;
					if (!LOC54) goto LA58;
					nimln(633, "os.nim");
					nimln(633, "os.nim");
					dir_182654 = copyStrLast(pd, 0, i_182671);
					nimln(240, "nimconf.nim");
					nimln(240, "nimconf.nim");
					LOC60 = 0;
					LOC60 = HEX2F_109477(dir_182654, cfg);
					readconfigfile_182479(LOC60);
				}
				LA58: ;
				nimln(1453, "system.nim");
				res_182675 = addInt(res_182675, 1);
			} LA51: ;
			nimln(635, "os.nim");
			{
				NimStringDesc* LOC65;
				if (!NIM_FALSE) goto LA63;
				nimln(239, "nimconf.nim");
				dir_182654 = pd;
				nimln(240, "nimconf.nim");
				nimln(240, "nimconf.nim");
				LOC65 = 0;
				LOC65 = HEX2F_109477(dir_182654, cfg);
				readconfigfile_182479(LOC65);
			}
			LA63: ;
		}
		LA34: ;
	}
	LA32: ;
	nimln(242, "nimconf.nim");
	{
		NimStringDesc* LOC70;
		nimln(242, "nimconf.nim");
		nimln(242, "nimconf.nim");
		if (!!(((gglobaloptions_136111 &(1<<((((NU8) 17))&31)))!=0))) goto LA68;
		nimln(243, "nimconf.nim");
		nimln(243, "nimconf.nim");
		LOC70 = 0;
		LOC70 = HEX2F_109477(pd, cfg);
		readconfigfile_182479(LOC70);
		nimln(245, "nimconf.nim");
		{
			NimStringDesc* LOC75;
			nimln(245, "nimconf.nim");
			nimln(245, "nimconf.nim");
			nimln(245, "nimconf.nim");
			if (!!((gprojectname_136206->Sup.len == 0))) goto LA73;
			nimln(247, "nimconf.nim");
			nimln(247, "nimconf.nim");
			LOC75 = 0;
			LOC75 = noschangeFileExt(gprojectfull_136208, ((NimStringDesc*) &TMP1930));
			readconfigfile_182479(LOC75);
		}
		LA73: ;
	}
	LA68: ;
	popFrame();
}
Beispiel #8
0
N_NIMCALL(void, handlecmdline_424603)(void) {
	nimfr("HandleCmdLine", "nimrod.nim")
	nimln(35, "nimrod.nim");
	{
		NI LOC3;
		nimln(35, "nimrod.nim");
		nimln(35, "nimrod.nim");
		LOC3 = 0;
		LOC3 = paramcount_107029();
		if (!(LOC3 == 0)) goto LA4;
		nimln(36, "nimrod.nim");
		writecommandlineusage_152002();	}	goto LA1;
	LA4: ;
	{
		nimln(39, "nimrod.nim");
		processcmdline_419207(((NU8) 0), ((NimStringDesc*) &TMP7233));		nimln(40, "nimrod.nim");
		{
			TSafePoint TMP7234;
			TY102259 p;
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			nimln(698, "system.nim");
			nimln(698, "system.nim");
			if (!!(((gprojectname_114197) && (gprojectname_114197)->Sup.len == 0))) goto LA9;
			nimln(41, "nimrod.nim");
			pushSafePoint(&TMP7234);
			TMP7234.status = setjmp(TMP7234.context);
			if (TMP7234.status == 0) {
				nimln(42, "nimrod.nim");
				asgnRefNoCycle((void**) &gprojectfull_114199, canonicalizepath_114316(gprojectname_114197));
				popSafePoint();
			}			else {
				popSafePoint();
				setFrame((TFrame*)&F);
				if (isObj(getCurrentException()->Sup.m_type, (&NTI1035))) {
					NimStringDesc* LOC14;
					TMP7234.status = 0;
					nimln(44, "nimrod.nim");
					LOC14 = 0;
					LOC14 = gprojectfull_114199; gprojectfull_114199 = copyStringRC1(gprojectname_114197);
					if (LOC14) nimGCunrefNoCycle(LOC14);
					popCurrentException();
				}			}			if (TMP7234.status != 0) reraiseException();
			nimln(45, "nimrod.nim");
			chckNil((void*)&p);
			memset((void*)&p, 0, sizeof(p));
			nossplitFile(gprojectfull_114199, &p);			nimln(46, "nimrod.nim");
			LOC15 = 0;
			LOC15 = gprojectpath_114198; gprojectpath_114198 = copyStringRC1(p.Field0);
			if (LOC15) nimGCunrefNoCycle(LOC15);
			nimln(47, "nimrod.nim");
			LOC16 = 0;
			LOC16 = gprojectname_114197; gprojectname_114197 = copyStringRC1(p.Field1);
			if (LOC16) nimGCunrefNoCycle(LOC16);
		}		goto LA7;
		LA9: ;
		{
			nimln(49, "nimrod.nim");
			asgnRefNoCycle((void**) &gprojectpath_114198, nosgetCurrentDir());
		}		LA7: ;
		nimln(50, "nimrod.nim");
		loadconfigs_168607(((NimStringDesc*) &TMP7235));		nimln(53, "nimrod.nim");
		initvars_148647();		nimln(54, "nimrod.nim");
		processcmdline_419207(((NU8) 1), ((NimStringDesc*) &TMP7233));		nimln(55, "nimrod.nim");
		maincommand_422811();		nimln(56, "nimrod.nim");
		{
			NimStringDesc* LOC22;
			nimln(702, "system.nim");
			if (!(2 <= gverbosity_114117)) goto LA20;
			nimln(56, "nimrod.nim");
			nimln(56, "nimrod.nim");
			LOC22 = 0;
			LOC22 = gcgetstatistics_6021();
			printf("%s\012", (LOC22)->data);
		}		LA20: ;
		nimln(58, "nimrod.nim");
		{
			nimln(58, "nimrod.nim");
			if (!(gerrorcounter_138074 == 0)) goto LA25;
			nimln(62, "nimrod.nim");
			{
				nimln(730, "system.nim");
				if (!((gglobaloptions_114109 &(1<<((((NU8) 13))&31)))!=0)) goto LA29;
				nimln(63, "nimrod.nim");
				{
					NimStringDesc* ex;
					NimStringDesc* LOC35;
					NimStringDesc* LOC36;
					NimStringDesc* LOC37;
					NimStringDesc* LOC38;
					nimln(63, "nimrod.nim");
					if (!(gcmd_114111 == ((NU8) 4))) goto LA33;
					nimln(64, "nimrod.nim");
					nimln(65, "nimrod.nim");
					nimln(65, "nimrod.nim");
					nimln(65, "nimrod.nim");
					LOC35 = 0;
					LOC35 = nosChangeFileExt(gprojectfull_114199, ((NimStringDesc*) &TMP7236));
					LOC36 = 0;
					LOC36 = prependcurdir_424401(LOC35);
					LOC37 = 0;
					LOC37 = completecfilepath_148681(LOC36, NIM_TRUE);
					ex = nospquoteShell(LOC37);
					nimln(66, "nimrod.nim");
					nimln(66, "nimrod.nim");
					LOC38 = 0;
					LOC38 = rawNewString(ex->Sup.len + arguments_419205->Sup.len + 6);
appendString(LOC38, ((NimStringDesc*) &TMP7237));
appendString(LOC38, ex);
appendChar(LOC38, 32);
appendString(LOC38, arguments_419205);
					execexternalprogram_148713(LOC38);				}				goto LA31;
				LA33: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC46;
					binpath = 0;
					nimln(69, "nimrod.nim");
					{
						nimln(706, "system.nim");
						nimln(69, "nimrod.nim");
						if (!(0 < outfile_114115->Sup.len)) goto LA42;
						nimln(71, "nimrod.nim");
						binpath = prependcurdir_424401(outfile_114115);
					}					goto LA40;
					LA42: ;
					{
						NimStringDesc* LOC45;
						nimln(74, "nimrod.nim");
						nimln(74, "nimrod.nim");
						LOC45 = 0;
						LOC45 = nosChangeFileExt(gprojectfull_114199, ((NimStringDesc*) &TMP7233));
						binpath = prependcurdir_424401(LOC45);
					}					LA40: ;
					nimln(75, "nimrod.nim");
					ex = nospquoteShell(binpath);
					nimln(76, "nimrod.nim");
					nimln(76, "nimrod.nim");
					LOC46 = 0;
					LOC46 = rawNewString(ex->Sup.len + arguments_419205->Sup.len + 1);
appendString(LOC46, ex);
appendChar(LOC46, 32);
appendString(LOC46, arguments_419205);
					execexternalprogram_148713(LOC46);				}				LA31: ;
			}			LA29: ;
		}		LA25: ;
	}	LA1: ;
	popFrame();
}
Beispiel #9
0
N_NIMCALL(void, handlecmdline_527607)(void) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = paramcount_124830();
		if (!(LOC3 == ((NI) 0))) goto LA4;
		writecommandlineusage_175020();
	}
	goto LA1;
	LA4: ;
	{
		processcmdline_521209(((NU8) 0), ((NimStringDesc*) &TMP1869));
		{
			TSafePoint TMP1870;
			TY118589 p;
			NimStringDesc* LOC15;
			NimStringDesc* LOC16;
			if (!!(((gprojectname_153234) && (gprojectname_153234)->Sup.len == 0))) goto LA9;
			pushSafePoint(&TMP1870);
			TMP1870.status = setjmp(TMP1870.context);
			if (TMP1870.status == 0) {
				asgnRefNoCycle((void**) (&gprojectfull_153236), canonicalizepath_153380(gprojectname_153234));
				popSafePoint();
			}
			else {
				popSafePoint();
				if (isObj(getCurrentException()->Sup.m_type, (&NTI3433))) {
					NimStringDesc* LOC14;
					TMP1870.status = 0;
					LOC14 = 0;
					LOC14 = gprojectfull_153236; gprojectfull_153236 = copyStringRC1(gprojectname_153234);
					if (LOC14) nimGCunrefNoCycle(LOC14);
					popCurrentException();
				}
			}
			if (TMP1870.status != 0) reraiseException();
			memset((void*)(&p), 0, sizeof(p));
			chckNil((void*)(&p));
			memset((void*)(&p), 0, sizeof(p));
			nossplitFile(gprojectfull_153236, (&p));
			LOC15 = 0;
			LOC15 = gprojectpath_153235; gprojectpath_153235 = copyStringRC1(p.Field0);
			if (LOC15) nimGCunrefNoCycle(LOC15);
			LOC16 = 0;
			LOC16 = gprojectname_153234; gprojectname_153234 = copyStringRC1(p.Field1);
			if (LOC16) nimGCunrefNoCycle(LOC16);
		}
		goto LA7;
		LA9: ;
		{
			asgnRefNoCycle((void**) (&gprojectpath_153235), nosgetCurrentDir());
		}
		LA7: ;
		loadconfigs_185811(((NimStringDesc*) &TMP1898));
		initvars_169876();
		processcmdline_521209(((NU8) 1), ((NimStringDesc*) &TMP1869));
		maincommand_524628();
		{
			NimStringDesc* LOC22;
			if (!(((NI) 2) <= gverbosity_153137)) goto LA20;
			LOC22 = 0;
			LOC22 = Gcgetstatistics_8821();
			printf("%s\012", LOC22? (LOC22)->data:"nil");
		}
		LA20: ;
		{
			if (!(gerrorcounter_163016 == ((NI) 0))) goto LA25;
			{
				if (!((gglobaloptions_153128 &(1<<((((NU8) 13))&31)))!=0)) goto LA29;
				{
					NimStringDesc* LOC35;
					if (!eqStrings(gprojectname_153234, ((NimStringDesc*) &TMP5024))) goto LA33;
					LOC35 = 0;
					LOC35 = gprojectfull_153236; gprojectfull_153236 = copyStringRC1(((NimStringDesc*) &TMP5025));
					if (LOC35) nimGCunrefNoCycle(LOC35);
				}
				LA33: ;
				{
					NimStringDesc* ex;
					NimStringDesc* LOC49;
					NimStringDesc* LOC50;
					if (!(gcmd_153130 == ((NU8) 4))) goto LA38;
					ex = 0;
					{
						NimStringDesc* LOC44;
						if (!(((NI) 0) < (outfile_153134 ? outfile_153134->Sup.len : 0))) goto LA42;
						LOC44 = 0;
						LOC44 = prependcurdir_527401(outfile_153134);
						ex = nospquoteShell(LOC44);
					}
					goto LA40;
					LA42: ;
					{
						NimStringDesc* LOC46;
						NimStringDesc* LOC47;
						NimStringDesc* LOC48;
						LOC46 = 0;
						LOC46 = noschangeFileExt(gprojectfull_153236, ((NimStringDesc*) &TMP5027));
						LOC47 = 0;
						LOC47 = prependcurdir_527401(LOC46);
						LOC48 = 0;
						LOC48 = completecfilepath_169912(LOC47, NIM_TRUE);
						ex = nospquoteShell(LOC48);
					}
					LA40: ;
					LOC49 = 0;
					LOC50 = 0;
					LOC50 = findnodejs_526009();
					LOC49 = rawNewString(LOC50->Sup.len + ex->Sup.len + arguments_176723->Sup.len + 2);
appendString(LOC49, LOC50);
appendString(LOC49, ((NimStringDesc*) &TMP5030));
appendString(LOC49, ex);
appendChar(LOC49, 32);
appendString(LOC49, arguments_176723);
					execexternalprogram_169985(LOC49, ((NimStringDesc*) &TMP1869));
				}
				goto LA36;
				LA38: ;
				{
					NimStringDesc* binpath;
					NimStringDesc* ex;
					NimStringDesc* LOC58;
					binpath = 0;
					{
						if (!(((NI) 0) < (outfile_153134 ? outfile_153134->Sup.len : 0))) goto LA54;
						binpath = prependcurdir_527401(outfile_153134);
					}
					goto LA52;
					LA54: ;
					{
						NimStringDesc* LOC57;
						LOC57 = 0;
						LOC57 = noschangeFileExt(gprojectfull_153236, ((NimStringDesc*) &TMP1869));
						binpath = prependcurdir_527401(LOC57);
					}
					LA52: ;
					ex = nospquoteShell(binpath);
					LOC58 = 0;
					LOC58 = rawNewString(ex->Sup.len + arguments_176723->Sup.len + 1);
appendString(LOC58, ex);
appendChar(LOC58, 32);
appendString(LOC58, arguments_176723);
					execexternalprogram_169985(LOC58, ((NimStringDesc*) &TMP1869));
				}
				LA36: ;
			}
			LA29: ;
		}
		LA25: ;
	}
	LA1: ;
}
N_NIMCALL(void, handlecmdline_598601_957294627)(void) {
{	{
		NI LOC3;
		LOC3 = (NI)0;
		LOC3 = paramcount_143026_2125978480();
		if (!(LOC3 == ((NI) 0))) goto LA4;
		writecommandlineusage_280005_2004575671();
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* scriptfile0;
		processcmdline_592203_3526807654(((Tcmdlinepass280008) 0), ((NimStringDesc*) &T957294627_2));
		{
			NimStringDesc* LOC11;
			NimStringDesc* LOC12;
			if (!eqStrings(gprojectname_169209_2607990831, ((NimStringDesc*) &T957294627_3))) goto LA9;
			LOC11 = (NimStringDesc*)0;
			LOC11 = gprojectname_169209_2607990831; gprojectname_169209_2607990831 = copyStringRC1(((NimStringDesc*) &T957294627_4));
			if (LOC11) nimGCunrefNoCycle(LOC11);
			LOC12 = (NimStringDesc*)0;
			LOC12 = gprojectfull_169211_2607990831; gprojectfull_169211_2607990831 = copyStringRC1(((NimStringDesc*) &T957294627_4));
			if (LOC12) nimGCunrefNoCycle(LOC12);
			asgnRefNoCycle((void**) (&gprojectpath_169210_2607990831), nosgetCurrentDir());
			gprojectisstdin_169212_2607990831 = NIM_TRUE;
		}
		goto LA7;
		LA9: ;
		{
			TSafePoint T957294627_5;
			TY128506 p0;
			NimStringDesc* LOC20;
			NimStringDesc* LOC21;
			if (!!(((gprojectname_169209_2607990831) && (gprojectname_169209_2607990831)->Sup.len == 0))) goto LA14;
			pushSafePoint(&T957294627_5);
			T957294627_5.status = _setjmp(T957294627_5.context);
			if (T957294627_5.status == 0) {
				asgnRefNoCycle((void**) (&gprojectfull_169211_2607990831), canonicalizepath_169405_2607990831(gprojectname_169209_2607990831));
				popSafePoint();
			}
			else {
				popSafePoint();
				if (isObj(getCurrentException()->Sup.m_type, (&NTI3630))) {
					NimStringDesc* LOC19;
					T957294627_5.status = 0;
					LOC19 = (NimStringDesc*)0;
					LOC19 = gprojectfull_169211_2607990831; gprojectfull_169211_2607990831 = copyStringRC1(gprojectname_169209_2607990831);
					if (LOC19) nimGCunrefNoCycle(LOC19);
					popCurrentException();
				}
			}
			if (T957294627_5.status != 0) reraiseException();
			memset((void*)(&p0), 0, sizeof(p0));
			chckNil((void*)(&p0));
			memset((void*)(&p0), 0, sizeof(p0));
			nossplitFile(gprojectfull_169211_2607990831, (&p0));
			LOC20 = (NimStringDesc*)0;
			LOC20 = gprojectpath_169210_2607990831; gprojectpath_169210_2607990831 = copyStringRC1(p0.Field0);
			if (LOC20) nimGCunrefNoCycle(LOC20);
			LOC21 = (NimStringDesc*)0;
			LOC21 = gprojectname_169209_2607990831; gprojectname_169209_2607990831 = copyStringRC1(p0.Field1);
			if (LOC21) nimGCunrefNoCycle(LOC21);
		}
		goto LA7;
		LA14: ;
		{
			asgnRefNoCycle((void**) (&gprojectpath_169210_2607990831), nosgetCurrentDir());
		}
		LA7: ;
		loadconfigs_290603_930198375(((NimStringDesc*) &T957294627_6));
		scriptfile0 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_7));
		{
			NIM_BOOL LOC25;
			LOC25 = (NIM_BOOL)0;
			LOC25 = fileexists_131604_2125978480(scriptfile0);
			if (!LOC25) goto LA26;
			runnimscript_597218_3062286716(scriptfile0, NIM_FALSE);
			{
				if (!eqStrings(scriptfile0, gprojectfull_169211_2607990831)) goto LA30;
				goto BeforeRet;
			}
			LA30: ;
		}
		goto LA23;
		LA26: ;
		{
			NimStringDesc* LOC33;
			NIM_BOOL LOC34;
			NimStringDesc* LOC37;
			LOC33 = (NimStringDesc*)0;
			LOC33 = HEX2F_128265_2125978480(gprojectpath_169210_2607990831, ((NimStringDesc*) &T957294627_8));
			LOC34 = (NIM_BOOL)0;
			LOC34 = fileexists_131604_2125978480(LOC33);
			if (!LOC34) goto LA35;
			LOC37 = (NimStringDesc*)0;
			LOC37 = HEX2F_128265_2125978480(gprojectpath_169210_2607990831, ((NimStringDesc*) &T957294627_8));
			runnimscript_597218_3062286716(LOC37, NIM_FALSE);
		}
		goto LA23;
		LA35: ;
		LA23: ;
		initvars_273834_2528170400();
		processcmdline_592203_3526807654(((Tcmdlinepass280008) 1), ((NimStringDesc*) &T957294627_2));
		{
			if (!((command_169215_2607990831) && (command_169215_2607990831)->Sup.len == 0)) goto LA40;
			rawmessage_194612_155036129(((Tmsgkind191002) 184), command_169215_2607990831);
		}
		LA40: ;
		maincommand_594610_6460232();
		{
			NIM_BOOL LOC44;
			NimStringDesc* LOC48;
			LOC44 = (NIM_BOOL)0;
			LOC44 = ((goptions_169128_2607990831 &(1U<<((NU)(((Toption169009) 12))&31U)))!=0);
			if (!(LOC44)) goto LA45;
			LOC44 = ((gnotes_192068_155036129 &((NU64)1<<((NU)((((Tmsgkind191002) 289)- 237))&63U)))!=0);
			LA45: ;
			if (!LOC44) goto LA46;
			LOC48 = (NimStringDesc*)0;
			LOC48 = Gcgetstatistics_10421_1689653243();
			printf("%s\012", LOC48? (LOC48)->data:"nil");
			fflush(stdout);
		}
		LA46: ;
		{
			if (!(gerrorcounter_192069_155036129 == ((NI) 0))) goto LA51;
			{
				if (!((gglobaloptions_169130_2607990831 &((NU64)1<<((NU)(((Tglobaloption169013) 13))&63U)))!=0)) goto LA55;
				{
					NimStringDesc* ex0;
					NimStringDesc* LOC70;
					NimStringDesc* LOC71;
					if (!(gcmd_169132_2607990831 == ((Tcommands169076) 4))) goto LA59;
					ex0 = (NimStringDesc*)0;
					{
						NimStringDesc* LOC65;
						if (!(((NI) 0) < (outfile_169136_2607990831 ? outfile_169136_2607990831->Sup.len : 0))) goto LA63;
						LOC65 = (NimStringDesc*)0;
						LOC65 = prependcurdir_598401_957294627(outfile_169136_2607990831);
						ex0 = nospquoteShell(LOC65);
					}
					goto LA61;
					LA63: ;
					{
						NimStringDesc* LOC67;
						NimStringDesc* LOC68;
						NimStringDesc* LOC69;
						LOC67 = (NimStringDesc*)0;
						LOC67 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_10));
						LOC68 = (NimStringDesc*)0;
						LOC68 = prependcurdir_598401_957294627(LOC67);
						LOC69 = (NimStringDesc*)0;
						LOC69 = completecfilepath_273854_2528170400(LOC68, NIM_TRUE);
						ex0 = nospquoteShell(LOC69);
					}
					LA61: ;
					LOC70 = (NimStringDesc*)0;
					LOC71 = (NimStringDesc*)0;
					LOC71 = findnodejs_596002_1446018522();
					LOC70 = rawNewString(LOC71->Sup.len + ex0->Sup.len + arguments_281811_2004575671->Sup.len + 2);
appendString(LOC70, LOC71);
appendString(LOC70, ((NimStringDesc*) &T957294627_11));
appendString(LOC70, ex0);
appendChar(LOC70, 32);
appendString(LOC70, arguments_281811_2004575671);
					execexternalprogram_273881_2528170400(LOC70, ((Tmsgkind191002) 284));
				}
				goto LA57;
				LA59: ;
				{
					NimStringDesc* ex0;
					NimStringDesc* LOC84;
					if (!(gcmd_169132_2607990831 == ((Tcommands169076) 5))) goto LA73;
					ex0 = (NimStringDesc*)0;
					{
						NimStringDesc* LOC79;
						if (!(((NI) 0) < (outfile_169136_2607990831 ? outfile_169136_2607990831->Sup.len : 0))) goto LA77;
						LOC79 = (NimStringDesc*)0;
						LOC79 = prependcurdir_598401_957294627(outfile_169136_2607990831);
						ex0 = nospquoteShell(LOC79);
					}
					goto LA75;
					LA77: ;
					{
						NimStringDesc* LOC81;
						NimStringDesc* LOC82;
						NimStringDesc* LOC83;
						LOC81 = (NimStringDesc*)0;
						LOC81 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_12));
						LOC82 = (NimStringDesc*)0;
						LOC82 = prependcurdir_598401_957294627(LOC81);
						LOC83 = (NimStringDesc*)0;
						LOC83 = completecfilepath_273854_2528170400(LOC82, NIM_TRUE);
						ex0 = nospquoteShell(LOC83);
					}
					LA75: ;
					LOC84 = (NimStringDesc*)0;
					LOC84 = rawNewString(ex0->Sup.len + arguments_281811_2004575671->Sup.len + 5);
appendString(LOC84, ((NimStringDesc*) &T957294627_13));
appendString(LOC84, ex0);
appendChar(LOC84, 32);
appendString(LOC84, arguments_281811_2004575671);
					execexternalprogram_273881_2528170400(LOC84, ((Tmsgkind191002) 284));
				}
				goto LA57;
				LA73: ;
				{
					NimStringDesc* binpath0;
					NimStringDesc* ex0;
					NimStringDesc* LOC92;
					binpath0 = (NimStringDesc*)0;
					{
						if (!(((NI) 0) < (outfile_169136_2607990831 ? outfile_169136_2607990831->Sup.len : 0))) goto LA88;
						binpath0 = prependcurdir_598401_957294627(outfile_169136_2607990831);
					}
					goto LA86;
					LA88: ;
					{
						NimStringDesc* LOC91;
						LOC91 = (NimStringDesc*)0;
						LOC91 = noschangeFileExt(gprojectfull_169211_2607990831, ((NimStringDesc*) &T957294627_2));
						binpath0 = prependcurdir_598401_957294627(LOC91);
					}
					LA86: ;
					ex0 = nospquoteShell(binpath0);
					LOC92 = (NimStringDesc*)0;
					LOC92 = rawNewString(ex0->Sup.len + arguments_281811_2004575671->Sup.len + 1);
appendString(LOC92, ex0);
appendChar(LOC92, 32);
appendString(LOC92, arguments_281811_2004575671);
					execexternalprogram_273881_2528170400(LOC92, ((Tmsgkind191002) 284));
				}
				LA57: ;
			}
			LA55: ;
		}
		LA51: ;
	}
	LA1: ;
	}BeforeRet: ;
}
N_NIMCALL(void, loadconfigs_291603_930198375)(NimStringDesc* cfg0) {
	NimStringDesc* pd0;
	setdefaultlibpath_170308_2607990831();
	{
		NimStringDesc* LOC5;
		if (!!(((gglobaloptions_170130_2607990831 &((NU64)1<<((NU)(((Tglobaloption170013) 16))&63U)))!=0))) goto LA3;
		LOC5 = (NimStringDesc*)0;
		LOC5 = getsystemconfigpath_291433_930198375(cfg0);
		readconfigfile_291381_930198375(LOC5);
	}
	LA3: ;
	{
		NimStringDesc* LOC10;
		if (!!(((gglobaloptions_170130_2607990831 &((NU64)1<<((NU)(((Tglobaloption170013) 18))&63U)))!=0))) goto LA8;
		LOC10 = (NimStringDesc*)0;
		LOC10 = getuserconfigpath_291427_930198375(cfg0);
		readconfigfile_291381_930198375(LOC10);
	}
	LA8: ;
	{
		if (!(((NI) 0) < (gprojectpath_170210_2607990831 ? gprojectpath_170210_2607990831->Sup.len : 0))) goto LA13;
		pd0 = copyString(gprojectpath_170210_2607990831);
	}
	goto LA11;
	LA13: ;
	{
		pd0 = nosgetCurrentDir();
	}
	LA11: ;
	{
		if (!!(((gglobaloptions_170130_2607990831 &((NU64)1<<((NU)(((Tglobaloption170013) 19))&63U)))!=0))) goto LA18;
		{
			NimStringDesc* dir_291637_930198375;
			dir_291637_930198375 = (NimStringDesc*)0;
			{
				NimStringDesc* current_291654_930198375;
				if (!NIM_FALSE) goto LA23;
				current_291654_930198375 = copyString(pd0);
				{
					NimStringDesc* LOC29;
					if (!NIM_FALSE) goto LA27;
					dir_291637_930198375 = pd0;
					LOC29 = (NimStringDesc*)0;
					LOC29 = HEX2F_128265_2125978480(dir_291637_930198375, cfg0);
					readconfigfile_291381_930198375(LOC29);
				}
				LA27: ;
				{
					while (1) {
						NimStringDesc* LOC37;
						{
							NIM_BOOL LOC34;
							LOC34 = (NIM_BOOL)0;
							LOC34 = nosisRootDir(current_291654_930198375);
							if (!LOC34) goto LA35;
							goto LA30;
						}
						LA35: ;
						current_291654_930198375 = nosparentDir(current_291654_930198375);
						dir_291637_930198375 = current_291654_930198375;
						LOC37 = (NimStringDesc*)0;
						LOC37 = HEX2F_128265_2125978480(dir_291637_930198375, cfg0);
						readconfigfile_291381_930198375(LOC37);
					}
				} LA30: ;
			}
			goto LA21;
			LA23: ;
			{
				{
					NI i_291656_930198375;
					NI HEX3Atmp_291658_930198375;
					NI res_291660_930198375;
					i_291656_930198375 = (NI)0;
					HEX3Atmp_291658_930198375 = (NI)0;
					HEX3Atmp_291658_930198375 = (NI)((pd0 ? pd0->Sup.len : 0) - ((NI) 2));
					res_291660_930198375 = ((NI) 0);
					{
						while (1) {
							if (!(res_291660_930198375 <= HEX3Atmp_291658_930198375)) goto LA41;
							i_291656_930198375 = res_291660_930198375;
							{
								NIM_BOOL LOC44;
								NIM_BOOL LOC46;
								NimStringDesc* LOC50;
								LOC44 = (NIM_BOOL)0;
								LOC44 = (((NU8)(pd0->data[i_291656_930198375])) == ((NU8)(47)) || ((NU8)(pd0->data[i_291656_930198375])) == ((NU8)(47)));
								if (!(LOC44)) goto LA45;
								LOC46 = (NIM_BOOL)0;
								LOC46 = (i_291656_930198375 == ((NI) 0));
								if (LOC46) goto LA47;
								LOC46 = !((((NU8)(pd0->data[(NI)(i_291656_930198375 - ((NI) 1))])) == ((NU8)(47)) || ((NU8)(pd0->data[(NI)(i_291656_930198375 - ((NI) 1))])) == ((NU8)(47))));
								LA47: ;
								LOC44 = LOC46;
								LA45: ;
								if (!LOC44) goto LA48;
								dir_291637_930198375 = copyStrLast(pd0, ((NI) 0), i_291656_930198375);
								LOC50 = (NimStringDesc*)0;
								LOC50 = HEX2F_128265_2125978480(dir_291637_930198375, cfg0);
								readconfigfile_291381_930198375(LOC50);
							}
							LA48: ;
							res_291660_930198375 += ((NI) 1);
						} LA41: ;
					}
				}
				{
					NimStringDesc* LOC55;
					if (!NIM_FALSE) goto LA53;
					dir_291637_930198375 = pd0;
					LOC55 = (NimStringDesc*)0;
					LOC55 = HEX2F_128265_2125978480(dir_291637_930198375, cfg0);
					readconfigfile_291381_930198375(LOC55);
				}
				LA53: ;
			}
			LA21: ;
		}
	}
	LA18: ;
	{
		NimStringDesc* LOC60;
		if (!!(((gglobaloptions_170130_2607990831 &((NU64)1<<((NU)(((Tglobaloption170013) 17))&63U)))!=0))) goto LA58;
		LOC60 = (NimStringDesc*)0;
		LOC60 = HEX2F_128265_2125978480(pd0, cfg0);
		readconfigfile_291381_930198375(LOC60);
		{
			NimStringDesc* projectconfig0;
			if (!!(((gprojectname_170209_2607990831 ? gprojectname_170209_2607990831->Sup.len : 0) == ((NI) 0)))) goto LA63;
			projectconfig0 = noschangeFileExt(gprojectfull_170211_2607990831, ((NimStringDesc*) &T930198375_21));
			{
				NIM_BOOL LOC67;
				LOC67 = (NIM_BOOL)0;
				LOC67 = fileexists_131604_2125978480(projectconfig0);
				if (!!(LOC67)) goto LA68;
				projectconfig0 = noschangeFileExt(gprojectfull_170211_2607990831, ((NimStringDesc*) &T930198375_22));
			}
			LA68: ;
			{
				NIM_BOOL LOC72;
				LOC72 = (NIM_BOOL)0;
				LOC72 = fileexists_131604_2125978480(projectconfig0);
				if (!!(LOC72)) goto LA73;
				projectconfig0 = noschangeFileExt(gprojectfull_170211_2607990831, ((NimStringDesc*) &T930198375_23));
				{
					NIM_BOOL LOC77;
					LOC77 = (NIM_BOOL)0;
					LOC77 = fileexists_131604_2125978480(projectconfig0);
					if (!LOC77) goto LA78;
					rawmessage_195612_155036129(((Tmsgkind192002) 241), projectconfig0);
				}
				LA78: ;
			}
			LA73: ;
			readconfigfile_291381_930198375(projectconfig0);
		}
		LA63: ;
	}
	LA58: ;
}