예제 #1
0
파일: nimconf.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(void, Loadconfig_80004)(NimStringDesc* Project_80006) {
NimStringDesc* Conffile_80520;
NimStringDesc* Prefix_80521;
NIM_BOOL LOC10;
NIM_BOOL LOC15;
Conffile_80520 = 0;
Prefix_80521 = 0;
if (!((Libpath_46112) && (Libpath_46112)->Sup.len == 0)) goto LA2;
Prefix_80521 = Getprefixdir_46109();
if (!eqStrings(Prefix_80521, ((NimStringDesc*) &TMP195677))) goto LA5;
asgnRefNoCycle((void**) &Libpath_46112, copyString(((NimStringDesc*) &TMP195678)));
goto LA4;
LA5: ;
if (!eqStrings(Prefix_80521, ((NimStringDesc*) &TMP195679))) goto LA7;
asgnRefNoCycle((void**) &Libpath_46112, copyString(((NimStringDesc*) &TMP195680)));
goto LA4;
LA7: ;
asgnRefNoCycle((void**) &Libpath_46112, nosJoinPath(Prefix_80521, ((NimStringDesc*) &TMP195681)));
LA4: ;
LA2: ;
Loadspecialconfig_80007(((NimStringDesc*) &TMP195723));
LOC10 = !(((Gglobaloptions_46079 &(1<<((((NU8) 17))&31)))!=0));
if (!(LOC10)) goto LA11;
LOC10 = !(((Project_80006) && (Project_80006)->Sup.len == 0));
LA11: ;
if (!LOC10) goto LA12;
Conffile_80520 = nosChangeFileExt(Project_80006, ((NimStringDesc*) &TMP195724));
LOC15 = nosexistsFile(Conffile_80520);
if (!LOC15) goto LA16;
Readconfigfile_80434(Conffile_80520);
LA16: ;
LA12: ;
}
예제 #2
0
파일: options.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(NimStringDesc*, Rawfindfile_41270)(NimStringDesc* F_41272) {
    NimStringDesc* Result_41273;
    NIM_BOOL LOC2;
    TY38015* It_41274;
    NIM_BOOL LOC7;
    Result_41273 = 0;
    LOC2 = nosexistsFile(F_41272);
    if (!LOC2) goto LA3;
    Result_41273 = copyString(F_41272);
    goto LA1;
LA3:
    ;
    It_41274 = 0;
    It_41274 = ((TY38015*) (Searchpaths_41081.Head));
    while (1) {
        if (!!((It_41274 == NIM_NIL))) goto LA5;
        Result_41273 = nosJoinPath((*It_41274).Data, F_41272);
        LOC7 = nosexistsFile(Result_41273);
        if (!LOC7) goto LA8;
        goto BeforeRet;
LA8:
        ;
        It_41274 = ((TY38015*) ((*It_41274).Sup.Next));
    }
LA5:
    ;
    Result_41273 = copyString(((NimStringDesc*) &TMP41089));
LA1:
    ;
BeforeRet:
    ;
    return Result_41273;
}
예제 #3
0
파일: nimconf.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(NimStringDesc*, Getconfigpath_80495)(NimStringDesc* Filename_80497) {
NimStringDesc* Result_80498;
NimStringDesc* LOC1;
NIM_BOOL LOC3;
TY73026 LOC6;
NIM_BOOL LOC8;
NimStringDesc* LOC11;
Result_80498 = 0;
LOC1 = 0;
LOC1 = nosgetConfigDir();
Result_80498 = nosJoinPath(LOC1, Filename_80497);
LOC3 = nosexistsFile(Result_80498);
if (!!(LOC3)) goto LA4;
memset((void*)&LOC6, 0, sizeof(LOC6));
LOC6[0] = Getprefixdir_46109();
LOC6[1] = copyString(((NimStringDesc*) &TMP195721));
LOC6[2] = copyString(Filename_80497);
Result_80498 = nosJoinPathOpenArray(LOC6, 3);
LOC8 = nosexistsFile(Result_80498);
if (!!(LOC8)) goto LA9;
LOC11 = 0;
LOC11 = rawNewString(Filename_80497->Sup.len + 5);
appendString(LOC11, ((NimStringDesc*) &TMP195722));
appendString(LOC11, Filename_80497);
Result_80498 = LOC11;
LA9: ;
LA4: ;
return Result_80498;
}
예제 #4
0
파일: extccomp.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(void, Writemapping_71074)(TY52008* Gsymbolmapping_71076) {
TY52008* Code_71088;
TY52008* LOC4;
TY52008* LOC5;
TY52407 LOC6;
NimStringDesc* LOC7;
if (!!(((Gglobaloptions_46079 &(1<<((((NU8) 13))&31)))!=0))) goto LA2;
goto BeforeRet;
LA2: ;
Code_71088 = 0;
Code_71088 = Torope_52046(((NimStringDesc*) &TMP196808));
LOC4 = 0;
LOC4 = Genmappingfiles_71053(&Tocompile_70345);
App_52031(&Code_71088, LOC4);
LOC5 = 0;
LOC5 = Genmappingfiles_71053(&Externaltocompile_70346);
App_52031(&Code_71088, LOC5);
memset((void*)&LOC6, 0, sizeof(LOC6));
LOC6[0] = Gsymbolmapping_71076;
Appf_52071(&Code_71088, ((NimStringDesc*) &TMP196810), LOC6, 1);
LOC7 = 0;
LOC7 = nosJoinPath(Projectpath_46113, ((NimStringDesc*) &TMP196811));
Writerope_52055(Code_71088, LOC7);
BeforeRet: ;
}
예제 #5
0
파일: options.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(NimStringDesc*, Completegeneratedfilepath_41101)(NimStringDesc* F_41103, NIM_BOOL Createsubdir_41104) {
    NimStringDesc* Result_41248;
    TY33337 LOC1;
    NimStringDesc* Head_41249;
    NimStringDesc* Tail_41250;
    NimStringDesc* LOC5;
    NimStringDesc* LOC6;
    NimStringDesc* Subdir_41261;
    TY69026 LOC7;
    TSafePoint TMP191662;
    NimStringDesc* LOC11;
    Result_41248 = 0;
    memset((void*)&LOC1, 0, sizeof(LOC1));
    nosSplitPath(F_41103, &LOC1);
    Head_41249 = 0;
    Head_41249 = copyString(LOC1.Head);
    Tail_41250 = 0;
    Tail_41250 = copyString(LOC1.Tail);
    if (!(0 < Head_41249->Sup.len)) goto LA3;
    LOC5 = 0;
    LOC5 = rawNewString(Head_41249->Sup.len + 1);
    appendString(LOC5, Head_41249);
    appendChar(LOC5, 92);
    LOC6 = 0;
    LOC6 = Shortendir_41200(LOC5);
    Head_41249 = Removetrailingdirsep_41211(LOC6);
LA3:
    ;
    Subdir_41261 = 0;
    memset((void*)&LOC7, 0, sizeof(LOC7));
    LOC7[0] = copyString(Projectpath_41113);
    LOC7[1] = copyString(((NimStringDesc*) &TMP191651));
    LOC7[2] = copyString(Head_41249);
    Subdir_41261 = nosJoinPathOpenArray(LOC7, 3);
    if (!Createsubdir_41104) goto LA9;
    pushSafePoint(&TMP191662);
    TMP191662.status = setjmp(TMP191662.context);
    if (TMP191662.status == 0) {
        noscreateDir(Subdir_41261);
        popSafePoint();
    } else {
        popSafePoint();
        if (getCurrentException()->Sup.m_type == NTI422) {
            LOC11 = 0;
            LOC11 = rawNewString(Subdir_41261->Sup.len + 25);
            appendString(LOC11, ((NimStringDesc*) &TMP191663));
            appendString(LOC11, Subdir_41261);
            Writeln_41265(stdout, LOC11);
            exit(1);
            TMP191662.status = 0;
            popCurrentException();
        }
    }
    if (TMP191662.status != 0) reraiseException();
LA9:
    ;
    Result_41248 = nosJoinPath(Subdir_41261, Tail_41250);
    return Result_41248;
}
예제 #6
0
N_NIMCALL(NimStringDesc*, completegeneratedfilepath_114490)(NimStringDesc* f, NIM_BOOL createsubdir) {
	NimStringDesc* result;
	TY87905 LOC1;
	NimStringDesc* head;
	NimStringDesc* tail;
	NimStringDesc* subdir;
	nimfr("completeGeneratedFilePath", "options.nim")
	result = 0;
	nimln(246, "options.nim");
	nimln(246, "options.nim");
	memset((void*)&LOC1, 0, sizeof(LOC1));
	nosSplitPath(f, &LOC1);	head = copyString(LOC1.Field0);
	tail = copyString(LOC1.Field1);
	nimln(248, "options.nim");
	subdir = getgeneratedpath_114417();
	nimln(249, "options.nim");
	{
		TSafePoint TMP347;
		if (!createsubdir) goto LA4;
		nimln(250, "options.nim");
		pushSafePoint(&TMP347);
		TMP347.status = setjmp(TMP347.context);
		if (TMP347.status == 0) {
			nimln(251, "options.nim");
			noscreateDir(subdir);			popSafePoint();
		}		else {
			popSafePoint();
			setFrame((TFrame*)&F);
			if (isObj(getCurrentException()->Sup.m_type, (&NTI1035))) {
				TY114525 LOC9;
				NimStringDesc* LOC10;
				TMP347.status = 0;
				nimln(253, "options.nim");
				memset((void*)LOC9, 0, sizeof(LOC9));
				nimln(253, "options.nim");
				nimln(253, "options.nim");
				LOC10 = 0;
				LOC10 = rawNewString(subdir->Sup.len + 25);
appendString(LOC10, ((NimStringDesc*) &TMP350));
appendString(LOC10, subdir);
				LOC9[0] = LOC10;
				writeln_114502(stdout, LOC9, 1);				nimln(254, "options.nim");
				exit(1);				popCurrentException();
			}		}		if (TMP347.status != 0) reraiseException();
	}	LA4: ;
	nimln(255, "options.nim");
	result = nosJoinPath(subdir, tail);
	popFrame();
	return result;
}
예제 #7
0
파일: main.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(void, Compileproject_191405)(NimStringDesc* Filename_191407) {
NimStringDesc* LOC1;
NimStringDesc* LOC2;
TY55548* LOC3;
NimStringDesc* LOC4;
TY55548* LOC5;
LOC1 = 0;
LOC1 = nosaddFileExt(((NimStringDesc*) &TMP196861), ((NimStringDesc*) &TMP195865));
LOC2 = 0;
LOC2 = nosJoinPath(Libpath_46112, LOC1);
LOC3 = 0;
LOC3 = Compilemodule_191320(LOC2, NIM_FALSE, NIM_TRUE);
LOC4 = 0;
LOC4 = nosaddFileExt(Filename_191407, ((NimStringDesc*) &TMP195865));
LOC5 = 0;
LOC5 = Compilemodule_191320(LOC4, NIM_TRUE, NIM_FALSE);
}
예제 #8
0
N_NIMCALL(NimStringDesc*, rawfindfile_114550)(NimStringDesc* f) {
	NimStringDesc* result;
	NimStringDesc* it_114554;
	tstrentry109016* it_114558;
	nimfr("rawFindFile", "options.nim")
	result = 0;
	it_114554 = 0;
	nimln(259, "options.nim");
	if (searchpaths_114113.Head) chckObj((*searchpaths_114113.Head).Sup.m_type, (&NTI109016));
	it_114558 = ((tstrentry109016*) (searchpaths_114113.Head));
	nimln(260, "options.nim");
	while (1) {
		nimln(698, "system.nim");
		nimln(698, "system.nim");
		if (!!((it_114558 == NIM_NIL))) goto LA1;
		nimln(261, "options.nim");
		it_114554 = (*it_114558).Data;
		nimln(266, "options.nim");
		result = nosJoinPath(it_114554, f);
		nimln(267, "options.nim");
		{
			NIM_BOOL LOC4;
			nimln(267, "options.nim");
			LOC4 = 0;
			LOC4 = nosexistsFile(result);
			if (!LOC4) goto LA5;
			nimln(268, "options.nim");
			nimln(268, "options.nim");
			result = canonicalizepath_114316(result);
			goto BeforeRet;
		}		LA5: ;
		nimln(262, "options.nim");
		if ((*it_114558).Sup.Next) chckObj((*(*it_114558).Sup.Next).Sup.m_type, (&NTI109016));
		it_114558 = ((tstrentry109016*) ((*it_114558).Sup.Next));
	} LA1: ;
	nimln(269, "options.nim");
	result = copyString(((NimStringDesc*) &TMP313));
	BeforeRet: ;	popFrame();
	return result;
}
예제 #9
0
N_NIMCALL(NimStringDesc*, rawfindfile2_114562)(NimStringDesc* f) {
	NimStringDesc* result;
	tstrentry109016* it;
	nimfr("rawFindFile2", "options.nim")
	result = 0;
	nimln(272, "options.nim");
	if (lazypaths_114114.Head) chckObj((*lazypaths_114114.Head).Sup.m_type, (&NTI109016));
	it = ((tstrentry109016*) (lazypaths_114114.Head));
	nimln(273, "options.nim");
	while (1) {
		nimln(698, "system.nim");
		nimln(698, "system.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(274, "options.nim");
		result = nosJoinPath((*it).Data, f);
		nimln(275, "options.nim");
		{
			NIM_BOOL LOC4;
			nimln(275, "options.nim");
			LOC4 = 0;
			LOC4 = nosexistsFile(result);
			if (!LOC4) goto LA5;
			nimln(276, "options.nim");
			bringtofront_109699(&lazypaths_114114, &it->Sup);			nimln(277, "options.nim");
			nimln(277, "options.nim");
			result = canonicalizepath_114316(result);
			goto BeforeRet;
		}		LA5: ;
		nimln(278, "options.nim");
		if ((*it).Sup.Next) chckObj((*(*it).Sup.Next).Sup.m_type, (&NTI109016));
		it = ((tstrentry109016*) ((*it).Sup.Next));
	} LA1: ;
	nimln(279, "options.nim");
	result = copyString(((NimStringDesc*) &TMP313));
	BeforeRet: ;	popFrame();
	return result;
}
예제 #10
0
파일: main.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(void, Commandinteractive_191616)(void) {
TY105006 LOC1;
TY105006 LOC2;
TY105006 LOC3;
TY105006 LOC4;
NimStringDesc* LOC5;
NimStringDesc* LOC6;
TY55548* LOC7;
TY55548* M_191630;
TY75204* LOC8;
Gerrormax_47568 = IL64(9223372036854775807);
Gglobaloptions_46079 |=(1<<((NI32)(((NU8) 8))%(sizeof(NI32)*8)));
Settarget_51582(((NU8) 21), ((NU8) 13));
Initdefines_64049();
LOC1 = Verbosepass_186033();
Registerpass_105028(&LOC1);
LOC2 = Sempass_126001();
Registerpass_105028(&LOC2);
LOC3 = Transfpass_188005();
Registerpass_105028(&LOC3);
LOC4 = Evalpass_115046();
Registerpass_105028(&LOC4);
LOC5 = 0;
LOC5 = nosaddFileExt(((NimStringDesc*) &TMP196861), ((NimStringDesc*) &TMP195865));
LOC6 = 0;
LOC6 = nosJoinPath(Libpath_46112, LOC5);
LOC7 = 0;
LOC7 = Compilemodule_191320(LOC6, NIM_FALSE, NIM_TRUE);
M_191630 = 0;
M_191630 = Newmodule_191287(((NimStringDesc*) &TMP197500));
(*M_191630).Sup.Id = Getid_55694();
(*M_191630).Flags |=(1<<((NI32)(((NU8) 15))%(sizeof(NI32)*8)));
LOC8 = 0;
LOC8 = Llstreamopenstdin_75230();
Processmodule_105035(M_191630, ((NimStringDesc*) &TMP197500), LOC8, NIM_NIL);
}
예제 #11
0
파일: extccomp.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(NimStringDesc*, Getcompilecfilecmd_70612)(NimStringDesc* Cfilename_70614, NIM_BOOL Isexternal_70615) {
NimStringDesc* Result_70616;
NimStringDesc* Cfile_70617;
NimStringDesc* Objfile_70618;
NimStringDesc* Options_70619;
NimStringDesc* Includecmd_70620;
NimStringDesc* Compilepattern_70621;
NimStringDesc* Key_70622;
NimStringDesc* Trunk_70623;
NimStringDesc* Exe_70624;
NU8 C_70625;
TY38661 LOC1;
NimStringDesc* LOC5;
NIM_BOOL LOC7;
NimStringDesc* LOC10;
NimStringDesc* LOC11;
NimStringDesc* LOC15;
NIM_BOOL LOC17;
NimStringDesc* LOC20;
NimStringDesc* LOC21;
NimStringDesc* LOC24;
NIM_BOOL LOC26;
NimStringDesc* LOC29;
NimStringDesc* LOC30;
NimStringDesc* LOC31;
NIM_BOOL LOC33;
NimStringDesc* LOC36;
NimStringDesc* LOC37;
NIM_BOOL LOC39;
NIM_BOOL LOC46;
NimStringDesc* LOC50;
NimStringDesc* LOC54;
NIM_BOOL LOC59;
NimStringDesc* LOC63;
NimStringDesc* LOC64;
TY70726 LOC65;
NimStringDesc* LOC66;
TY70726 LOC67;
NimStringDesc* LOC68;
Result_70616 = 0;
Cfile_70617 = 0;
Objfile_70618 = 0;
Options_70619 = 0;
Includecmd_70620 = 0;
Compilepattern_70621 = 0;
Key_70622 = 0;
Trunk_70623 = 0;
Exe_70624 = 0;
C_70625 = 0;
C_70625 = Ccompiler_70340;
Options_70619 = copyString(Compileoptions_70348);
memset((void*)&LOC1, 0, sizeof(LOC1));
nossplitFile(Cfilename_70614, &LOC1);
Trunk_70623 = copyString(LOC1.Name);
if (!((Gglobaloptions_46079 &(1<<((((NU8) 9))&31)))!=0)) goto LA3;
LOC5 = 0;
LOC5 = rawNewString(Trunk_70623->Sup.len + 6);
appendString(LOC5, Trunk_70623);
appendString(LOC5, ((NimStringDesc*) &TMP196784));
Key_70622 = LOC5;
LOC7 = Existsconfigvar_46132(Key_70622);
if (!LOC7) goto LA8;
LOC10 = 0;
LOC10 = Getconfigvar_46135(Key_70622);
Addopt_70443(&Options_70619, LOC10);
goto LA6;
LA8: ;
LOC11 = 0;
LOC11 = Getdebug_70601(C_70625);
Addopt_70443(&Options_70619, LOC11);
LA6: ;
LA3: ;
if (!((Goptions_46077 &(1<<((((NU8) 13))&31)))!=0)) goto LA13;
LOC15 = 0;
LOC15 = rawNewString(Trunk_70623->Sup.len + 6);
appendString(LOC15, Trunk_70623);
appendString(LOC15, ((NimStringDesc*) &TMP196786));
Key_70622 = LOC15;
LOC17 = Existsconfigvar_46132(Key_70622);
if (!LOC17) goto LA18;
LOC20 = 0;
LOC20 = Getconfigvar_46135(Key_70622);
Addopt_70443(&Options_70619, LOC20);
goto LA16;
LA18: ;
LOC21 = 0;
LOC21 = Getoptspeed_70597(C_70625);
Addopt_70443(&Options_70619, LOC21);
LA16: ;
goto LA12;
LA13: ;
if (!((Goptions_46077 &(1<<((((NU8) 14))&31)))!=0)) goto LA22;
LOC24 = 0;
LOC24 = rawNewString(Trunk_70623->Sup.len + 5);
appendString(LOC24, Trunk_70623);
appendString(LOC24, ((NimStringDesc*) &TMP196788));
Key_70622 = LOC24;
LOC26 = Existsconfigvar_46132(Key_70622);
if (!LOC26) goto LA27;
LOC29 = 0;
LOC29 = Getconfigvar_46135(Key_70622);
Addopt_70443(&Options_70619, LOC29);
goto LA25;
LA27: ;
LOC30 = 0;
LOC30 = Getoptsize_70605(C_70625);
Addopt_70443(&Options_70619, LOC30);
LA25: ;
goto LA12;
LA22: ;
LA12: ;
LOC31 = 0;
LOC31 = rawNewString(Trunk_70623->Sup.len + 7);
appendString(LOC31, Trunk_70623);
appendString(LOC31, ((NimStringDesc*) &TMP196790));
Key_70622 = LOC31;
LOC33 = Existsconfigvar_46132(Key_70622);
if (!LOC33) goto LA34;
LOC36 = 0;
LOC36 = Getconfigvar_46135(Key_70622);
Addopt_70443(&Options_70619, LOC36);
LA34: ;
Exe_70624 = copyString(Cc_70041[(C_70625)-1].Compilerexe);
LOC37 = 0;
LOC37 = rawNewString(Cc_70041[(C_70625)-1].Name->Sup.len + 4);
appendString(LOC37, Cc_70041[(C_70625)-1].Name);
appendString(LOC37, ((NimStringDesc*) &TMP196791));
Key_70622 = LOC37;
LOC39 = Existsconfigvar_46132(Key_70622);
if (!LOC39) goto LA40;
Exe_70624 = Getconfigvar_46135(Key_70622);
LA40: ;
if (!(Targetos_51570 == ((NU8) 2))) goto LA43;
Exe_70624 = nosaddFileExt(Exe_70624, ((NimStringDesc*) &TMP196792));
LA43: ;
LOC46 = ((Gglobaloptions_46079 &(1<<((((NU8) 10))&31)))!=0);
if (!(LOC46)) goto LA47;
LOC46 = ((Os_51053[(Targetos_51570)-1].Props &(1<<((((NU8) 0))&7)))!=0);
LA47: ;
if (!LOC46) goto LA48;
LOC50 = 0;
LOC50 = rawNewString(Cc_70041[(C_70625)-1].Pic->Sup.len + 1);
appendChar(LOC50, 32);
appendString(LOC50, Cc_70041[(C_70625)-1].Pic);
Options_70619 = resizeString(Options_70619, LOC50->Sup.len + 0);
appendString(Options_70619, LOC50);
LA48: ;
if (!(Targetos_51570 == Hostos_51571)) goto LA52;
Includecmd_70620 = copyString(Cc_70041[(C_70625)-1].Includecmd);
LOC54 = 0;
LOC54 = Quoteifcontainswhite_26268(Libpath_46112);
Includecmd_70620 = resizeString(Includecmd_70620, LOC54->Sup.len + 0);
appendString(Includecmd_70620, LOC54);
Compilepattern_70621 = nosJoinPath(Ccompilerpath_70349, Exe_70624);
goto LA51;
LA52: ;
Includecmd_70620 = copyString(((NimStringDesc*) &TMP70271));
Compilepattern_70621 = copyString(Cc_70041[(C_70625)-1].Compilerexe);
LA51: ;
if (!(Targetos_51570 == Hostos_51571)) goto LA56;
Cfile_70617 = copyString(Cfilename_70614);
goto LA55;
LA56: ;
Cfile_70617 = nosextractFilename(Cfilename_70614);
LA55: ;
LOC59 = !(Isexternal_70615);
if (LOC59) goto LA60;
LOC59 = !((Targetos_51570 == Hostos_51571));
LA60: ;
if (!LOC59) goto LA61;
Objfile_70618 = Toobjfile_70512(Cfile_70617);
goto LA58;
LA61: ;
LOC63 = 0;
LOC63 = Toobjfile_70512(Cfile_70617);
Objfile_70618 = Completecfilepath_70507(LOC63, NIM_TRUE);
LA58: ;
LOC64 = 0;
LOC64 = nosaddFileExt(Cfile_70617, Cext_70342);
Cfile_70617 = Quoteifcontainswhite_26268(LOC64);
Objfile_70618 = Quoteifcontainswhite_26268(Objfile_70618);
memset((void*)&LOC65, 0, sizeof(LOC65));
LOC65[0] = copyString(((NimStringDesc*) &TMP196793));
LOC65[1] = copyString(Cfile_70617);
LOC65[2] = copyString(((NimStringDesc*) &TMP196794));
LOC65[3] = copyString(Objfile_70618);
LOC65[4] = copyString(((NimStringDesc*) &TMP196795));
LOC65[5] = copyString(Options_70619);
LOC65[6] = copyString(((NimStringDesc*) &TMP196796));
LOC65[7] = copyString(Includecmd_70620);
LOC65[8] = copyString(((NimStringDesc*) &TMP196797));
LOC65[9] = Getprefixdir_46109();
LOC65[10] = copyString(((NimStringDesc*) &TMP196798));
LOC65[11] = copyString(Libpath_46112);
LOC66 = 0;
LOC66 = nsuFormatOpenArray(Compilepattern_70621, LOC65, 12);
Result_70616 = Quoteifcontainswhite_26268(LOC66);
Result_70616 = addChar(Result_70616, 32);
memset((void*)&LOC67, 0, sizeof(LOC67));
LOC67[0] = copyString(((NimStringDesc*) &TMP196793));
LOC67[1] = copyString(Cfile_70617);
LOC67[2] = copyString(((NimStringDesc*) &TMP196794));
LOC67[3] = copyString(Objfile_70618);
LOC67[4] = copyString(((NimStringDesc*) &TMP196795));
LOC67[5] = copyString(Options_70619);
LOC67[6] = copyString(((NimStringDesc*) &TMP196796));
LOC67[7] = copyString(Includecmd_70620);
LOC67[8] = copyString(((NimStringDesc*) &TMP196797));
LOC68 = 0;
LOC68 = Getprefixdir_46109();
LOC67[9] = Quoteifcontainswhite_26268(LOC68);
LOC67[10] = copyString(((NimStringDesc*) &TMP196798));
LOC67[11] = Quoteifcontainswhite_26268(Libpath_46112);
nsuAddf(&Result_70616, Cc_70041[(C_70625)-1].Compiletmpl, LOC67, 12);
return Result_70616;
}
예제 #12
0
파일: extccomp.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(void, Callccompiler_70806)(NimStringDesc* Projectfile_70808) {
NimStringDesc* Linkcmd_70809;
NimStringDesc* Buildgui_70810;
NimStringDesc* Builddll_70811;
NU8 C_70833;
TY52008* Script_70834;
TY39221* Cmds_70851;
NI Res_70869;
NI I_70895;
NI HEX3Atmp_71050;
NI Res_71052;
NI LOC14;
NIM_BOOL LOC15;
TY46331 LOC22;
NimStringDesc* Linkerexe_70936;
NimStringDesc* LOC26;
NimStringDesc* LOC36;
NimStringDesc* Exefile_70970;
TY47805 LOC43;
TY38661 LOC44;
NimStringDesc* LOC45;
TY38661 LOC46;
TY38661 LOC50;
TY43015* It_70995;
NimStringDesc* Objfiles_70996;
NimStringDesc* LOC55;
NimStringDesc* LOC56;
NimStringDesc* LOC57;
NimStringDesc* LOC58;
TY71019 LOC59;
NimStringDesc* LOC60;
TY71019 LOC61;
NimStringDesc* LOC62;
Linkcmd_70809 = 0;
Buildgui_70810 = 0;
Builddll_70811 = 0;
if (!((Gglobaloptions_46079 & 4160) == 64)) goto LA2;
goto BeforeRet;
LA2: ;
Filecounter_70611 = 0;
C_70833 = 0;
C_70833 = Ccompiler_70340;
Script_70834 = 0;
Script_70834 = NIM_NIL;
Cmds_70851 = 0;
Cmds_70851 = (TY39221*) newSeq(NTI39221, 0);
Compilecfile_70733(&Tocompile_70345, &Script_70834, &Cmds_70851, NIM_FALSE);
Compilecfile_70733(&Externaltocompile_70346, &Script_70834, &Cmds_70851, NIM_TRUE);
if (!!(((Gglobaloptions_46079 &(1<<((((NU8) 6))&31)))!=0))) goto LA5;
if (!(Gnumberofprocessors_46086 == 0)) goto LA8;
Gnumberofprocessors_46086 = nospcountProcessors();
LA8: ;
Res_70869 = 0;
Res_70869 = 0;
if (!(Gnumberofprocessors_46086 <= 1)) goto LA11;
I_70895 = 0;
HEX3Atmp_71050 = 0;
HEX3Atmp_71050 = (Cmds_70851->Sup.len-1);
Res_71052 = 0;
Res_71052 = 0;
while (1) {
if (!(Res_71052 <= HEX3Atmp_71050)) goto LA13;
I_70895 = Res_71052;
LOC14 = nospexecCmd(Cmds_70851->data[I_70895]);
Res_70869 = ((LOC14 >= Res_70869) ? LOC14 : Res_70869);
Res_71052 += 1;
} LA13: ;
goto LA10;
LA11: ;
LOC15 = ((Gglobaloptions_46079 &(1<<((((NU8) 5))&31)))!=0);
if (LOC15) goto LA16;
LOC15 = (0 < Gverbosity_46085);
LA16: ;
if (!LOC15) goto LA17;
Res_70869 = nospexecProcesses(Cmds_70851->data, Cmds_70851->Sup.len, 11, Gnumberofprocessors_46086);
goto LA10;
LA17: ;
Res_70869 = nospexecProcesses(Cmds_70851->data, Cmds_70851->Sup.len, 10, Gnumberofprocessors_46086);
LA10: ;
if (!!((Res_70869 == 0))) goto LA20;
memset((void*)&LOC22, 0, sizeof(LOC22));
Rawmessage_47971(((NU8) 62), LOC22, 0);
LA20: ;
LA5: ;
if (!!(((Gglobaloptions_46079 &(1<<((((NU8) 7))&31)))!=0))) goto LA24;
Linkerexe_70936 = 0;
LOC26 = 0;
LOC26 = rawNewString(Cc_70041[(C_70833)-1].Name->Sup.len + 10);
appendString(LOC26, Cc_70041[(C_70833)-1].Name);
appendString(LOC26, ((NimStringDesc*) &TMP196872));
Linkerexe_70936 = Getconfigvar_46135(LOC26);
if (!(Linkerexe_70936->Sup.len == 0)) goto LA28;
Linkerexe_70936 = copyString(Cc_70041[(C_70833)-1].Linkerexe);
LA28: ;
if (!(Targetos_51570 == ((NU8) 2))) goto LA31;
Linkerexe_70936 = nosaddFileExt(Linkerexe_70936, ((NimStringDesc*) &TMP196792));
LA31: ;
if (!!((Hostos_51571 == Targetos_51570))) goto LA34;
Linkcmd_70809 = Quoteifcontainswhite_26268(Linkerexe_70936);
goto LA33;
LA34: ;
LOC36 = 0;
LOC36 = nosJoinPath(Ccompilerpath_70349, Linkerexe_70936);
Linkcmd_70809 = Quoteifcontainswhite_26268(LOC36);
LA33: ;
if (!((Gglobaloptions_46079 &(1<<((((NU8) 11))&31)))!=0)) goto LA38;
Buildgui_70810 = copyString(Cc_70041[(C_70833)-1].Buildgui);
goto LA37;
LA38: ;
Buildgui_70810 = copyString(((NimStringDesc*) &TMP70271));
LA37: ;
Exefile_70970 = 0;
if (!((Gglobaloptions_46079 &(1<<((((NU8) 10))&31)))!=0)) goto LA41;
memset((void*)&LOC43, 0, sizeof(LOC43));
memset((void*)&LOC44, 0, sizeof(LOC44));
nossplitFile(Projectfile_70808, &LOC44);
LOC43[0] = copyString(LOC44.Name);
Exefile_70970 = nsuFormatOpenArray(Os_51053[(Targetos_51570)-1].Dllfrmt, LOC43, 1);
Builddll_70811 = copyString(Cc_70041[(C_70833)-1].Builddll);
goto LA40;
LA41: ;
LOC45 = 0;
memset((void*)&LOC46, 0, sizeof(LOC46));
nossplitFile(Projectfile_70808, &LOC46);
LOC45 = rawNewString(LOC46.Name->Sup.len + Os_51053[(Targetos_51570)-1].Exeext->Sup.len + 0);
appendString(LOC45, LOC46.Name);
appendString(LOC45, Os_51053[(Targetos_51570)-1].Exeext);
Exefile_70970 = LOC45;
Builddll_70811 = copyString(((NimStringDesc*) &TMP70271));
LA40: ;
if (!(Targetos_51570 == Hostos_51571)) goto LA48;
memset((void*)&LOC50, 0, sizeof(LOC50));
nossplitFile(Projectfile_70808, &LOC50);
Exefile_70970 = nosJoinPath(LOC50.Dir, Exefile_70970);
LA48: ;
Exefile_70970 = Quoteifcontainswhite_26268(Exefile_70970);
It_70995 = 0;
It_70995 = ((TY43015*) (Tolink_70344.Head));
Objfiles_70996 = 0;
Objfiles_70996 = copyString(((NimStringDesc*) &TMP70271));
while (1) {
if (!!((It_70995 == NIM_NIL))) goto LA51;
Objfiles_70996 = addChar(Objfiles_70996, 32);
if (!(Targetos_51570 == Hostos_51571)) goto LA53;
LOC55 = 0;
LOC55 = nosaddFileExt((*It_70995).Data, Cc_70041[(Ccompiler_70340)-1].Objext);
LOC56 = 0;
LOC56 = Quoteifcontainswhite_26268(LOC55);
Objfiles_70996 = resizeString(Objfiles_70996, LOC56->Sup.len + 0);
appendString(Objfiles_70996, LOC56);
goto LA52;
LA53: ;
LOC57 = 0;
LOC57 = nosaddFileExt((*It_70995).Data, Cc_70041[(Ccompiler_70340)-1].Objext);
LOC58 = 0;
LOC58 = Quoteifcontainswhite_26268(LOC57);
Objfiles_70996 = resizeString(Objfiles_70996, LOC58->Sup.len + 0);
appendString(Objfiles_70996, LOC58);
LA52: ;
It_70995 = ((TY43015*) ((*It_70995).Sup.Next));
} LA51: ;
memset((void*)&LOC59, 0, sizeof(LOC59));
LOC59[0] = copyString(((NimStringDesc*) &TMP196873));
LOC59[1] = copyString(Builddll_70811);
LOC59[2] = copyString(((NimStringDesc*) &TMP196874));
LOC59[3] = copyString(Buildgui_70810);
LOC59[4] = copyString(((NimStringDesc*) &TMP196795));
LOC59[5] = copyString(Linkoptions_70347);
LOC59[6] = copyString(((NimStringDesc*) &TMP196875));
LOC59[7] = copyString(Objfiles_70996);
LOC59[8] = copyString(((NimStringDesc*) &TMP196876));
LOC59[9] = copyString(Exefile_70970);
LOC59[10] = copyString(((NimStringDesc*) &TMP196797));
LOC59[11] = Getprefixdir_46109();
LOC59[12] = copyString(((NimStringDesc*) &TMP196798));
LOC59[13] = copyString(Libpath_46112);
LOC60 = 0;
LOC60 = nsuFormatOpenArray(Linkcmd_70809, LOC59, 14);
Linkcmd_70809 = Quoteifcontainswhite_26268(LOC60);
Linkcmd_70809 = addChar(Linkcmd_70809, 32);
memset((void*)&LOC61, 0, sizeof(LOC61));
LOC61[0] = copyString(((NimStringDesc*) &TMP196873));
LOC61[1] = copyString(Builddll_70811);
LOC61[2] = copyString(((NimStringDesc*) &TMP196874));
LOC61[3] = copyString(Buildgui_70810);
LOC61[4] = copyString(((NimStringDesc*) &TMP196795));
LOC61[5] = copyString(Linkoptions_70347);
LOC61[6] = copyString(((NimStringDesc*) &TMP196875));
LOC61[7] = copyString(Objfiles_70996);
LOC61[8] = copyString(((NimStringDesc*) &TMP196876));
LOC61[9] = copyString(Exefile_70970);
LOC61[10] = copyString(((NimStringDesc*) &TMP196797));
LOC62 = 0;
LOC62 = Getprefixdir_46109();
LOC61[11] = Quoteifcontainswhite_26268(LOC62);
LOC61[12] = copyString(((NimStringDesc*) &TMP196798));
LOC61[13] = Quoteifcontainswhite_26268(Libpath_46112);
nsuAddf(&Linkcmd_70809, Cc_70041[(C_70833)-1].Linktmpl, LOC61, 14);
if (!!(((Gglobaloptions_46079 &(1<<((((NU8) 6))&31)))!=0))) goto LA64;
Execexternalprogram_70570(Linkcmd_70809);
LA64: ;
goto LA23;
LA24: ;
Linkcmd_70809 = copyString(((NimStringDesc*) &TMP70271));
LA23: ;
if (!((Gglobaloptions_46079 &(1<<((((NU8) 12))&31)))!=0)) goto LA67;
App_52036(&Script_70834, Linkcmd_70809);
App_52036(&Script_70834, Tnl_51581);
Generatescript_70590(Projectfile_70808, Script_70834);
LA67: ;
BeforeRet: ;
}