Ejemplo n.º 1
0
N_NIMCALL(NimStringDesc*, rawfindfile2_154308)(NimStringDesc* f) {
	NimStringDesc* result;
	Tstrentry129024* it;
{	result = 0;
	it = ((Tstrentry129024*) (lazypaths_153133.head));
	{
		while (1) {
			if (!!((it == NIM_NIL))) goto LA2;
			result = nosjoinPath((*it).data, f);
			{
				NIM_BOOL LOC5;
				Tlistentry129022* LOC8;
				LOC5 = 0;
				LOC5 = nosexistsFile(result);
				if (!LOC5) goto LA6;
				LOC8 = 0;
				LOC8 = &it->Sup;
				bringtofront_129705((&lazypaths_153133), LOC8);
				result = canonicalizepath_153380(result);
				goto BeforeRet;
			}
			LA6: ;
			it = ((Tstrentry129024*) ((*it).Sup.next));
		} LA2: ;
	}
	result = copyString(((NimStringDesc*) &TMP39));
	}BeforeRet: ;
	return result;
}
Ejemplo n.º 2
0
N_NIMCALL(NimStringDesc*, rawfindfile_154282)(NimStringDesc* f) {
	NimStringDesc* result;
{	result = 0;
	{
		NimStringDesc* it_154286;
		Tstrentry129024* it_154292;
		it_154286 = 0;
		it_154292 = ((Tstrentry129024*) (searchpaths_153132.head));
		{
			while (1) {
				if (!!((it_154292 == NIM_NIL))) goto LA3;
				it_154286 = (*it_154292).data;
				result = nosjoinPath(it_154286, f);
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = nosexistsFile(result);
					if (!LOC6) goto LA7;
					result = canonicalizepath_153380(result);
					goto BeforeRet;
				}
				LA7: ;
				it_154292 = ((Tstrentry129024*) ((*it_154292).Sup.next));
			} LA3: ;
		}
	}
	result = copyString(((NimStringDesc*) &TMP39));
	}BeforeRet: ;
	return result;
}
Ejemplo n.º 3
0
N_NIMCALL(NimStringDesc*, slash__lXoMhn1ZYc9cAJa9bfA61msg)(NimStringDesc* head, NimStringDesc* tail) {
	NimStringDesc* result;
{	result = (NimStringDesc*)0;
	result = nosjoinPath(head, tail);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
Ejemplo n.º 4
0
N_NIMCALL(NimStringDesc*, HEX2F_118292)(NimStringDesc* head, NimStringDesc* tail) {
	NimStringDesc* result;
{	result = 0;
	result = nosjoinPath(head, tail);
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}
Ejemplo n.º 5
0
N_NIMCALL(NimStringDesc*, completegeneratedfilepath_137001)(NimStringDesc* f, NIM_BOOL createsubdir) {
	NimStringDesc* result;
	TY94105 LOC1;
	NimStringDesc* head;
	NimStringDesc* tail;
	NimStringDesc* subdir;
	nimfr("completeGeneratedFilePath", "options.nim")
	result = 0;
	nimln(290, "options.nim");
	nimln(290, "options.nim");
	memset((void*)&LOC1, 0, sizeof(LOC1));
	nossplitPath(f, &LOC1);
	head = copyString(LOC1.Field0);
	tail = copyString(LOC1.Field1);
	nimln(292, "options.nim");
	subdir = getgeneratedpath_136417();
	nimln(293, "options.nim");
	{
		TSafePoint TMP429;
		if (!createsubdir) goto LA4;
		nimln(294, "options.nim");
		pushSafePoint(&TMP429);
		TMP429.status = setjmp(TMP429.context);
		if (TMP429.status == 0) {
			nimln(295, "options.nim");
			noscreateDir(subdir);
			popSafePoint();
		}
		else {
			popSafePoint();
			setFrame((TFrame*)&F);
			if (isObj(getCurrentException()->Sup.m_type, (&NTI2435))) {
				TY128024 LOC9;
				NimStringDesc* LOC10;
				TMP429.status = 0;
				nimln(299, "options.nim");
				memset((void*)LOC9, 0, sizeof(LOC9));
				nimln(299, "options.nim");
				nimln(299, "options.nim");
				LOC10 = 0;
				LOC10 = rawNewString(subdir->Sup.len + 25);
appendString(LOC10, ((NimStringDesc*) &TMP432));
appendString(LOC10, subdir);
				LOC9[0] = LOC10;
				writeln_137205(stdout, LOC9, 1);
				nimln(300, "options.nim");
				exit(1);
				popCurrentException();
			}
		}
		if (TMP429.status != 0) reraiseException();
	}
	LA4: ;
	nimln(301, "options.nim");
	result = nosjoinPath(subdir, tail);
	popFrame();
	return result;
}
Ejemplo n.º 6
0
N_NIMCALL(NimStringDesc*, getuserconfigpath_185580)(NimStringDesc* filename) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = nosgetConfigDir();
	result = nosjoinPath(LOC1, filename);
	return result;
}
Ejemplo n.º 7
0
N_NIMCALL(NimStringDesc*, getuserconfigpath_291427_930198375)(NimStringDesc* filename0) {
	NimStringDesc* result0;
	NimStringDesc* LOC1;
	result0 = (NimStringDesc*)0;
	LOC1 = (NimStringDesc*)0;
	LOC1 = nosgetConfigDir();
	result0 = nosjoinPath(LOC1, filename0);
	return result0;
}
Ejemplo n.º 8
0
N_NIMCALL(NimStringDesc*, getuserconfigpath_186582)(NimStringDesc* filename) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	nimfr("getUserConfigPath", "nimconf.nim")
	result = 0;
	nimln(217, "nimconf.nim");
	LOC1 = 0;
	LOC1 = nosgetConfigDir();
	result = nosjoinPath(LOC1, filename);
	popFrame();
	return result;
}
Ejemplo n.º 9
0
N_NIMCALL(NimStringDesc*, completegeneratedfilepath_154001)(NimStringDesc* f, NIM_BOOL createsubdir) {
	NimStringDesc* result;
	Keyvaluepair133008 LOC1;
	NimStringDesc* head;
	NimStringDesc* tail;
	NimStringDesc* subdir;
	result = 0;
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	nossplitPath(f, (&LOC1));
	head = 0;
	head = copyString(LOC1.Field0);
	tail = 0;
	tail = copyString(LOC1.Field1);
	subdir = getgeneratedpath_153428();
	{
		TSafePoint TMP1436;
		if (!createsubdir) goto LA4;
		pushSafePoint(&TMP1436);
		TMP1436.status = _setjmp(TMP1436.context);
		if (TMP1436.status == 0) {
			noscreateDir(subdir);
			popSafePoint();
		}
		else {
			popSafePoint();
			if (isObj(getCurrentException()->Sup.m_type, (&NTI3433))) {
				TY163580 LOC9;
				NimStringDesc* LOC10;
				TMP1436.status = 0;
				memset((void*)LOC9, 0, sizeof(LOC9));
				LOC10 = 0;
				LOC10 = rawNewString(subdir->Sup.len + 25);
appendString(LOC10, ((NimStringDesc*) &TMP1438));
appendString(LOC10, subdir);
				LOC9[0] = LOC10;
				writeln_154205(stdout, LOC9, 1);
				exit(((NI) 1));
				popCurrentException();
			}
		}
		if (TMP1436.status != 0) reraiseException();
	}
	LA4: ;
	result = nosjoinPath(subdir, tail);
	return result;
}
Ejemplo n.º 10
0
N_NIMCALL(NimStringDesc*, rawfindfile_137266)(NimStringDesc* f) {
	NimStringDesc* result;
	NimStringDesc* it_137270;
	tstrentry117019* it_137274;
	nimfr("rawFindFile", "options.nim")
	result = 0;
	it_137270 = 0;
	nimln(305, "options.nim");
	if (searchpaths_136115.Head) chckObj((*searchpaths_136115.Head).Sup.m_type, (&NTI117019));
	it_137274 = ((tstrentry117019*) (searchpaths_136115.Head));
	nimln(306, "options.nim");
	while (1) {
		nimln(306, "options.nim");
		nimln(306, "options.nim");
		if (!!((it_137274 == NIM_NIL))) goto LA1;
		nimln(307, "options.nim");
		it_137270 = (*it_137274).Data;
		nimln(312, "options.nim");
		result = nosjoinPath(it_137270, f);
		nimln(313, "options.nim");
		{
			NIM_BOOL LOC4;
			nimln(313, "options.nim");
			LOC4 = 0;
			LOC4 = nosexistsFile(result);
			if (!LOC4) goto LA5;
			nimln(314, "options.nim");
			nimln(314, "options.nim");
			result = canonicalizepath_136335(result);
			goto BeforeRet;
		}
		LA5: ;
		nimln(308, "options.nim");
		if ((*it_137274).Sup.Next) chckObj((*(*it_137274).Sup.Next).Sup.m_type, (&NTI117019));
		it_137274 = ((tstrentry117019*) ((*it_137274).Sup.Next));
	} LA1: ;
	nimln(315, "options.nim");
	result = copyString(((NimStringDesc*) &TMP404));
	BeforeRet: ;
	popFrame();
	return result;
}
Ejemplo n.º 11
0
N_NIMCALL(NimStringDesc*, rawfindfile2_137278)(NimStringDesc* f) {
	NimStringDesc* result;
	tstrentry117019* it;
	nimfr("rawFindFile2", "options.nim")
	result = 0;
	nimln(318, "options.nim");
	if (lazypaths_136116.Head) chckObj((*lazypaths_136116.Head).Sup.m_type, (&NTI117019));
	it = ((tstrentry117019*) (lazypaths_136116.Head));
	nimln(319, "options.nim");
	while (1) {
		nimln(319, "options.nim");
		nimln(319, "options.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(320, "options.nim");
		result = nosjoinPath((*it).Data, f);
		nimln(321, "options.nim");
		{
			NIM_BOOL LOC4;
			nimln(321, "options.nim");
			LOC4 = 0;
			LOC4 = nosexistsFile(result);
			if (!LOC4) goto LA5;
			nimln(322, "options.nim");
			bringtofront_117758(&lazypaths_136116, &it->Sup);
			nimln(323, "options.nim");
			nimln(323, "options.nim");
			result = canonicalizepath_136335(result);
			goto BeforeRet;
		}
		LA5: ;
		nimln(324, "options.nim");
		if ((*it).Sup.Next) chckObj((*(*it).Sup.Next).Sup.m_type, (&NTI117019));
		it = ((tstrentry117019*) ((*it).Sup.Next));
	} LA1: ;
	nimln(325, "options.nim");
	result = copyString(((NimStringDesc*) &TMP404));
	BeforeRet: ;
	popFrame();
	return result;
}
Ejemplo n.º 12
0
N_NIMCALL(NimStringDesc*, nosjoinPathOpenArray)(NimStringDesc** parts, NI partsLen_0) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	result = copyString(parts[((NI) 0)]);
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (partsLen_0-1);
		res = ((NI) 1);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				result = nosjoinPath(result, parts[i]);
				res += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
Ejemplo n.º 13
0
N_NIMCALL(NimStringDesc*, nosjoinPathOpenArray)(NimStringDesc** parts, NI partsLen0) {
	NimStringDesc* result;
	result = 0;
	result = copyString(parts[((NI) 0)]);
	{
		NI i_118266;
		NI HEX3Atmp_118270;
		NI res_118273;
		i_118266 = 0;
		HEX3Atmp_118270 = 0;
		HEX3Atmp_118270 = (partsLen0-1);
		res_118273 = ((NI) 1);
		{
			while (1) {
				if (!(res_118273 <= HEX3Atmp_118270)) goto LA3;
				i_118266 = res_118273;
				result = nosjoinPath(result, parts[i_118266]);
				res_118273 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}
Ejemplo n.º 14
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: ;
}
Ejemplo n.º 15
0
N_NIMCALL(NimStringDesc*, getapplheuristic_125404)(void) {
	NimStringDesc* result;
{	result = 0;
	result = paramstr_124809(((NI) 0));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (((NI) 0) < (result ? result->Sup.len : 0));
		if (!(LOC3)) goto LA4;
		LOC3 = !(((NU8)(result->data[((NI) 0)]) == (NU8)(47)));
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NimStringDesc* p_125602;
			NimStringDesc* HEX3Atmp_125609;
			NI last_125614;
			p_125602 = 0;
			HEX3Atmp_125609 = 0;
			HEX3Atmp_125609 = getenv_121644(((NimStringDesc*) &TMP1147));
			last_125614 = ((NI) 0);
			{
				while (1) {
					NI first_125616;
					if (!(last_125614 < (HEX3Atmp_125609 ? HEX3Atmp_125609->Sup.len : 0))) goto LA9;
					{
						while (1) {
							if (!(((NU8)(HEX3Atmp_125609->data[last_125614])) == ((NU8)(58)))) goto LA11;
							last_125614 += ((NI) 1);
						} LA11: ;
					}
					first_125616 = last_125614;
					{
						while (1) {
							NIM_BOOL LOC14;
							LOC14 = 0;
							LOC14 = (last_125614 < (HEX3Atmp_125609 ? HEX3Atmp_125609->Sup.len : 0));
							if (!(LOC14)) goto LA15;
							LOC14 = !((((NU8)(HEX3Atmp_125609->data[last_125614])) == ((NU8)(58))));
							LA15: ;
							if (!LOC14) goto LA13;
							last_125614 += ((NI) 1);
						} LA13: ;
					}
					{
						NimStringDesc* x;
						if (!(first_125616 <= (NI)(last_125614 - ((NI) 1)))) goto LA18;
						p_125602 = copyStrLast(HEX3Atmp_125609, first_125616, (NI)(last_125614 - ((NI) 1)));
						x = nosjoinPath(p_125602, result);
						{
							NIM_BOOL LOC22;
							LOC22 = 0;
							LOC22 = nosexistsFile(x);
							if (!LOC22) goto LA23;
							result = copyString(x);
							goto BeforeRet;
						}
						LA23: ;
					}
					LA18: ;
				} LA9: ;
			}
		}
	}
	LA5: ;
	}BeforeRet: ;
	return result;
}
Ejemplo n.º 16
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();
}
Ejemplo n.º 17
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();
}