Esempio n. 1
0
N_NIMCALL(void, llstreamwrite_179696)(Tllstream179204* s, NIM_CHAR data) {
	NIM_CHAR c;
	c = 0;
	switch ((*s).kind) {
	case ((NU8) 0):
	case ((NU8) 3):
	{
	}
	break;
	case ((NU8) 1):
	{
		(*s).s = addChar((*s).s, data);
		(*s).wr += ((NI) 1);
	}
	break;
	case ((NU8) 2):
	{
		NI LOC4;
		c = data;
		LOC4 = 0;
		LOC4 = writebuffer_13537((*s).f, ((void*) ((&c))), ((NI) 1));
	}
	break;
	}
}
Esempio n. 2
0
N_NIMCALL(void, llstreamwrite_177696)(Tllstream177204* s, NIM_CHAR data) {
	NIM_CHAR c;
	nimfr("llStreamWrite", "llstream.nim")
	c = 0;
	nimln(172, "llstream.nim");
	switch ((*s).kind) {
	case ((NU8) 0):
	case ((NU8) 3):
	{
	}
	break;
	case ((NU8) 1):
	{
		NI TMP2112;
		nimln(176, "llstream.nim");
		(*s).s = addChar((*s).s, data);
		nimln(177, "llstream.nim");
		TMP2112 = addInt((*s).wr, ((NI) 1));
		(*s).wr = (NI)(TMP2112);
	}
	break;
	case ((NU8) 2):
	{
		NI LOC4;
		nimln(179, "llstream.nim");
		c = data;
		nimln(180, "llstream.nim");
		LOC4 = 0;
		LOC4 = writebuffer_13537((*s).f, ((void*) ((&c))), ((NI) 1));
	}
	break;
	}
	popFrame();
}
Esempio n. 3
0
N_NIMCALL(void, fswritedata_137751)(Streamobj137027* s, void* buffer, NI buflen) {
	{
		NI LOC3;
		Ioerror3431* LOC6;
		LOC3 = 0;
		LOC3 = writebuffer_13537((*((Filestreamobj137692*) (s))).f, buffer, ((NI) (buflen)));
		if (!!((LOC3 == buflen))) goto LA4;
		LOC6 = 0;
		LOC6 = neweio_137005(((NimStringDesc*) &TMP2685));
		raiseException((Exception*)LOC6, "IOError");
	}
	LA4: ;
}
Esempio n. 4
0
N_NIMCALL(void, llstreamwrite_177718)(Tllstream177204* s, void* buf, NI buflen) {
	nimfr("llStreamWrite", "llstream.nim")
	nimln(183, "llstream.nim");
	switch ((*s).kind) {
	case ((NU8) 0):
	case ((NU8) 3):
	{
	}
	break;
	case ((NU8) 1):
	{
		nimln(187, "llstream.nim");
		{
			NI TMP2113;
			NI TMP2114;
			NI TMP2115;
			if (!(((NI) 0) < buflen)) goto LA5;
			nimln(188, "llstream.nim");
			TMP2113 = addInt(((*s).s ? (*s).s->Sup.len : 0), buflen);
			(*s).s = setLengthStr((*s).s, ((NI)chckRange((NI)(TMP2113), ((NI) 0), ((NI) 2147483647))));
			nimln(189, "llstream.nim");
			TMP2114 = addInt(((NI) 0), (*s).wr);
			if ((NU)((NI)(TMP2114)) > (NU)((*s).s->Sup.len)) raiseIndexError();
			memcpy(((void*) ((&(*s).s->data[(NI)(TMP2114)]))), buf, ((NI)chckRange(buflen, ((NI) 0), ((NI) 2147483647))));
			nimln(190, "llstream.nim");
			TMP2115 = addInt((*s).wr, buflen);
			(*s).wr = (NI)(TMP2115);
		}
		LA5: ;
	}
	break;
	case ((NU8) 2):
	{
		NI LOC8;
		nimln(192, "llstream.nim");
		LOC8 = 0;
		LOC8 = writebuffer_13537((*s).f, buf, ((NI)chckRange(buflen, ((NI) 0), ((NI) 2147483647))));
	}
	break;
	}
	popFrame();
}