Exemplo n.º 1
0
N_NIMCALL(Tnode192813*, parsefile_220041)(NI32 fileidx) {
	Tnode192813* result;
	Tparsers220035 p;
	FILE* f;
	NimStringDesc* filename;
	Tllstream179204* LOC6;
{	result = 0;
	memset((void*)(&p), 0, sizeof(p));
	objectInit((&p), (&NTI220035));
	f = 0;
	filename = tofullpathconsiderdirty_165407(fileidx);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = open_13203(&f, filename, ((NU8) 0), ((NI) -1));
		if (!!(LOC3)) goto LA4;
		rawmessage_165970(((NU16) 3), filename);
		goto BeforeRet;
	}
	LA4: ;
	LOC6 = 0;
	LOC6 = llstreamopen_179238(f);
	openparsers_220047((&p), fileidx, LOC6);
	result = parseall_220063((&p));
	closeparsers_220056((&p));
	}BeforeRet: ;
	return result;
}
Exemplo n.º 2
0
N_NIMCALL(NIM_BOOL, equalsfile_162916)(Ropeobj161009* r, NimStringDesc* filename) {
	NIM_BOOL result;
	FILE* f;
	result = 0;
	f = 0;
	result = open_13203(&f, filename, ((NU8) 0), ((NI) -1));
	{
		if (!result) goto LA3;
		result = equalsfile_162809(r, f);
		fclose(f);
	}
	LA3: ;
	return result;
}
Exemplo n.º 3
0
N_NIMCALL(Filestreamobj137692*, newfilestream_137774)(NimStringDesc* filename, NU8 mode) {
	Filestreamobj137692* result;
	FILE* f;
	result = 0;
	f = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = open_13203(&f, filename, mode, ((NI) -1));
		if (!LOC3) goto LA4;
		result = newfilestream_137759(f);
	}
	LA4: ;
	return result;
}
Exemplo n.º 4
0
N_NIMCALL(Tllstream179204*, llstreamopen_179256)(NimStringDesc* filename, NU8 mode) {
	Tllstream179204* result;
	result = 0;
	result = (Tllstream179204*) newObj((&NTI179206), sizeof(Tllstream179204));
	(*result).Sup.m_type = (&NTI179204);
	(*result).kind = ((NU8) 2);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = open_13203(&(*result).f, filename, mode, ((NI) -1));
		if (!!(LOC3)) goto LA4;
		result = NIM_NIL;
	}
	LA4: ;
	return result;
}
Exemplo n.º 5
0
N_NIMCALL(Tllstream177204*, llstreamopen_177256)(NimStringDesc* filename, NU8 mode) {
	Tllstream177204* result;
	nimfr("llStreamOpen", "llstream.nim")
	result = 0;
	nimln(44, "llstream.nim");
	result = (Tllstream177204*) newObj((&NTI177206), sizeof(Tllstream177204));
	(*result).Sup.m_type = (&NTI177204);
	nimln(45, "llstream.nim");
	(*result).kind = ((NU8) 2);
	nimln(46, "llstream.nim");
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = open_13203(&(*result).f, filename, mode, ((NI) -1));
		if (!!(LOC3)) goto LA4;
		result = NIM_NIL;
	}
	LA4: ;
	popFrame();
	return result;
}
Exemplo n.º 6
0
N_NIMCALL(void, writerope_162105)(Ropeobj161009* head, NimStringDesc* filename, NIM_BOOL usewarning) {
	FILE* f;
	f = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = open_13203(&f, filename, ((NU8) 1), ((NI) -1));
		if (!LOC3) goto LA4;
		{
			if (!!((head == NIM_NIL))) goto LA8;
			writerope_162070(f, head);
		}
		LA8: ;
		fclose(f);
	}
	goto LA1;
	LA4: ;
	{
		errorhandler_161028.ClEnv? errorhandler_161028.ClPrc(((NU8) 0), filename, usewarning, errorhandler_161028.ClEnv):((TMP4318)(errorhandler_161028.ClPrc))(((NU8) 0), filename, usewarning);
	}
	LA1: ;
}
Exemplo n.º 7
0
N_NIMCALL(void, loadmaxids_191510)(NimStringDesc* project) {
	FILE* f;
	f = 0;
	{
		NimStringDesc* LOC3;
		NIM_BOOL LOC4;
		NimStringDesc* line;
		LOC3 = 0;
		LOC3 = togid_191462(project);
		LOC4 = 0;
		LOC4 = open_13203(&f, LOC3, ((NU8) 0), ((NI) -1));
		if (!LOC4) goto LA5;
		line = rawNewString(((NI) 20));
		{
			NIM_BOOL LOC9;
			NI frontendid;
			LOC9 = 0;
			LOC9 = readline_13481(f, (&line));
			if (!LOC9) goto LA10;
			frontendid = nsuParseInt(line);
			{
				NIM_BOOL LOC14;
				NI backendid;
				LOC14 = 0;
				LOC14 = readline_13481(f, (&line));
				if (!LOC14) goto LA15;
				backendid = nsuParseInt(line);
				gfrontendid_191012 = ((gfrontendid_191012 >= frontendid) ? gfrontendid_191012 : frontendid);
				gbackendid_191013 = ((gbackendid_191013 >= backendid) ? gbackendid_191013 : backendid);
			}
			LA15: ;
		}
		LA10: ;
		fclose(f);
	}
	LA5: ;
}