Example #1
0
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;
}
Example #2
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;
}
Example #3
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;
}
Example #4
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;
}