Exemplo n.º 1
0
N_NIMCALL(void, llstreamwrite_179258)(tllstream179204* s, NimStringDesc* data) {
	nimfr("llStreamWrite", "llstream.nim")
	nimln(169, "llstream.nim");
	switch ((*s).Kind) {
	case ((NU8) 0):
	case ((NU8) 3):
	{
	}
	break;
	case ((NU8) 1):
	{
		nimln(173, "llstream.nim");
		(*s).S = resizeString((*s).S, data->Sup.len + 0);
appendString((*s).S, data);
		nimln(174, "llstream.nim");
		nimln(174, "llstream.nim");
		(*s).Wr = addInt((*s).Wr, data->Sup.len);
	}
	break;
	case ((NU8) 2):
	{
		nimln(176, "llstream.nim");
		write_10663((*s).F, data);
	}
	break;
	}
	popFrame();
}
Exemplo n.º 2
0
N_NIMCALL(NIM_BOOL, readlinefromstdin_179396)(NimStringDesc* prompt, NimStringDesc** line) {
	NIM_BOOL result;
	nimfr("readLineFromStdin", "llstream.nim")
	result = 0;
	nimln(83, "llstream.nim");
	write_10663(stdout, prompt);
	nimln(84, "llstream.nim");
	result = readline_10687(stdin, line);
	popFrame();
	return result;
}
Exemplo n.º 3
0
N_NIMCALL(void, writerope_148993)(FILE* f, trope148007* c) {
	tropeseq148009* stack;
	TY148497 LOC1;
	nimfr("writeRope", "ropes.nim")
	nimln(220, "ropes.nim");
	nimln(220, "ropes.nim");
	stack = (tropeseq148009*) newSeq((&NTI148009), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = c;
	asgnRefNoCycle((void**) &stack->data[0], LOC1[0]);
	nimln(221, "ropes.nim");
	while (1) {
		trope148007* it;
		nimln(221, "ropes.nim");
		nimln(221, "ropes.nim");
		if (!(0 < stack->Sup.len)) goto LA2;
		nimln(222, "ropes.nim");
		it = pop_148515(&stack);
		nimln(223, "ropes.nim");
		while (1) {
			nimln(223, "ropes.nim");
			if (!((*it).Data == NIM_NIL)) goto LA3;
			nimln(224, "ropes.nim");
			stack = (tropeseq148009*) incrSeq(&(stack)->Sup, sizeof(trope148007*));
			asgnRefNoCycle((void**) &stack->data[stack->Sup.len-1], (*it).Right);
			nimln(225, "ropes.nim");
			it = (*it).Left;
			nimln(226, "ropes.nim");
			{
				nimln(226, "ropes.nim");
				nimln(226, "ropes.nim");
				nimln(226, "ropes.nim");
				if (!!(!((it == NIM_NIL)))) goto LA6;
				nimln(226, "ropes.nim");
				failedassertimpl_80421(((NimStringDesc*) &TMP556));
			}
			LA6: ;
		} LA3: ;
		nimln(227, "ropes.nim");
		{
			nimln(227, "ropes.nim");
			nimln(227, "ropes.nim");
			nimln(227, "ropes.nim");
			if (!!(!(((*it).Data == NIM_NIL)))) goto LA10;
			nimln(227, "ropes.nim");
			failedassertimpl_80421(((NimStringDesc*) &TMP552));
		}
		LA10: ;
		nimln(228, "ropes.nim");
		write_10663(f, (*it).Data);
	} LA2: ;
	popFrame();
}
Exemplo n.º 4
0
static N_INLINE(void, writeln_139205)(FILE* f_139209, NimStringDesc** x_139213, NI x_139213Len0) {
	NimStringDesc* i_139226;
	NI i_139232;
	nimfr("writeln", "sysio.nim")
	i_139226 = 0;
	nimln(1531, "system.nim");
	i_139232 = 0;
	nimln(1532, "system.nim");
	while (1) {
		nimln(1532, "system.nim");
		nimln(1532, "system.nim");
		if (!(i_139232 < x_139213Len0)) goto LA1;
		nimln(1533, "system.nim");
		i_139226 = x_139213[i_139232];
		nimln(171, "sysio.nim");
		write_10663(f_139209, i_139226);
		nimln(1534, "system.nim");
		i_139232 += 1;
	} LA1: ;
	nimln(172, "sysio.nim");
	write_10663(f_139209, ((NimStringDesc*) &TMP1972));
	popFrame();
}