예제 #1
0
파일: stdlib_os.c 프로젝트: apense/csources
N_NIMCALL(NimStringDesc*, getenv_121644)(NimStringDesc* key) {
	NimStringDesc* result;
	NI i;
{	result = 0;
	i = findenvvar_121605(key);
	{
		NI LOC5;
		if (!(((NI) 0) <= i)) goto LA3;
		LOC5 = 0;
		LOC5 = nsuFindChar(environment_121009->data[i], 61, ((NI) 0));
		result = copyStr(environment_121009->data[i], (NI)(LOC5 + ((NI) 1)));
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		NCSTRING env;
		env = getenv(key->data);
		{
			if (!(env == NIM_NIL)) goto LA9;
			result = copyString(((NimStringDesc*) &TMP136));
			goto BeforeRet;
		}
		LA9: ;
		result = cstrToNimstr(env);
	}
	LA1: ;
	}BeforeRet: ;
	return result;
}
예제 #2
0
파일: strutils.c 프로젝트: Kozzi11/Trash
N_NIMCALL(NIM_BOOL, contains_95245)(NimStringDesc* s, NIM_CHAR c) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = nsuFindChar(s, c, 0);
	result = (0 <= LOC1);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}
예제 #3
0
파일: nimrod.c 프로젝트: ddlsmurf/Nimrod
N_NIMCALL(void, Processcmdline_195204)(NU8 Pass_195206, NimStringDesc** Command_195208, NimStringDesc** Filename_195209) {
TY193404 P_195210;
NI Bracketle_195212;
NimStringDesc* Key_195215;
NimStringDesc* Val_195216;
NimStringDesc* LOC5;
NimStringDesc* LOC6;
NIM_BOOL LOC16;
TY46331 LOC20;
memset((void*)&P_195210, 0, sizeof(P_195210));
Initoptparser_193415(((NimStringDesc*) &TMP195203), &P_195210);
P_195210.Sup.m_type = NTI193404;
while (1) {
nponext(&P_195210);
switch (P_195210.Kind) {
case ((NU8) 0):
goto LA1;
break;
case ((NU8) 2):
case ((NU8) 3):
Bracketle_195212 = 0;
Bracketle_195212 = nsuFindChar(P_195210.Key, 91, 0);
if (!(0 <= Bracketle_195212)) goto LA3;
Key_195215 = 0;
Key_195215 = copyStrLast(P_195210.Key, 0, (NI32)(Bracketle_195212 - 1));
Val_195216 = 0;
LOC5 = 0;
LOC6 = 0;
LOC6 = copyStr(P_195210.Key, (NI32)(Bracketle_195212 + 1));
LOC5 = rawNewString(LOC6->Sup.len + P_195210.Val->Sup.len + 1);
appendString(LOC5, LOC6);
appendChar(LOC5, 58);
appendString(LOC5, P_195210.Val);
Val_195216 = LOC5;
Processswitch_73012(Key_195215, Val_195216, Pass_195206, Cmdlineinfo_195202);
goto LA2;
LA3: ;
Processswitch_73012(P_195210.Key, P_195210.Val, Pass_195206, Cmdlineinfo_195202);
LA2: ;
break;
case ((NU8) 1):
if (!(((*Command_195208)) && ((*Command_195208))->Sup.len == 0)) goto LA8;
unsureAsgnRef((void**) &(*Command_195208), copyString(P_195210.Key));
goto LA7;
LA8: ;
if (!(((*Filename_195209)) && ((*Filename_195209))->Sup.len == 0)) goto LA10;
unsureAsgnRef((void**) &(*Filename_195209), nosUnixToNativePath(P_195210.Key));
goto LA1;
goto LA7;
LA10: ;
LA7: ;
break;
}
} LA1: ;
if (!(Pass_195206 == ((NU8) 1))) goto LA13;
asgnRefNoCycle((void**) &Arguments_195201, npocmdLineRest(&P_195210));
LOC16 = !(((Gglobaloptions_46079 &(1<<((((NU8) 14))&31)))!=0));
if (!(LOC16)) goto LA17;
LOC16 = !(((Arguments_195201) && (Arguments_195201)->Sup.len == 0));
LA17: ;
if (!LOC16) goto LA18;
memset((void*)&LOC20, 0, sizeof(LOC20));
Rawmessage_47971(((NU8) 54), LOC20, 0);
LA18: ;
LA13: ;
}
예제 #4
0
N_NIMCALL(void, processcmdline_525207)(NU8 pass, NimStringDesc* cmd) {
	toptparser523807 p;
	NI argscount;
	nimfr("processCmdLine", "service.nim")
	nimln(33, "service.nim");
	chckNil((void*)&p);
	memset((void*)&p, 0, sizeof(p));
	p.Sup.m_type = (&NTI523807);
	initoptparser_523819(cmd, &p);
	nimln(34, "service.nim");
	argscount = 0;
	nimln(35, "service.nim");
	while (1) {
		nimln(36, "service.nim");
		nponext(&p);
		nimln(37, "service.nim");
		switch (p.Kind) {
		case ((NU8) 0):
		{
			nimln(38, "service.nim");
			goto LA1;
		}
		break;
		case ((NU8) 2):
		case ((NU8) 3):
		{
			NI bracketle;
			nimln(42, "service.nim");
			bracketle = nsuFindChar(p.Key, 91, 0);
			nimln(43, "service.nim");
			{
				NimStringDesc* key;
				NI TMP7644;
				NimStringDesc* val;
				NimStringDesc* LOC8;
				NI TMP7645;
				NimStringDesc* LOC9;
				nimln(43, "service.nim");
				if (!(0 <= bracketle)) goto LA6;
				nimln(44, "service.nim");
				nimln(44, "service.nim");
				nimln(44, "service.nim");
				TMP7644 = subInt(bracketle, 1);
				key = copyStrLast(p.Key, 0, (NI32)(TMP7644));
				nimln(45, "service.nim");
				nimln(45, "service.nim");
				LOC8 = 0;
				nimln(45, "service.nim");
				nimln(45, "service.nim");
				TMP7645 = addInt(bracketle, 1);
				LOC9 = 0;
				LOC9 = copyStr(p.Key, (NI32)(TMP7645));
				LOC8 = rawNewString(LOC9->Sup.len + p.Val->Sup.len + 1);
appendString(LOC8, LOC9);
appendChar(LOC8, 58);
appendString(LOC8, p.Val);
				val = LOC8;
				nimln(46, "service.nim");
				processswitch_173016(key, val, pass, gcmdlineinfo_164104);
			}
			goto LA4;
			LA6: ;
			{
				nimln(48, "service.nim");
				processswitch_173016(p.Key, p.Val, pass, gcmdlineinfo_164104);
			}
			LA4: ;
		}
		break;
		case ((NU8) 1):
		{
			nimln(50, "service.nim");
			{
				NimStringDesc* LOC16;
				nimln(50, "service.nim");
				if (!(argscount == 0)) goto LA14;
				nimln(51, "service.nim");
				LOC16 = 0;
				LOC16 = command_137212; command_137212 = copyStringRC1(p.Key);
				if (LOC16) nimGCunrefNoCycle(LOC16);
			}
			goto LA12;
			LA14: ;
			{
				nimln(53, "service.nim");
				{
					NimStringDesc* LOC22;
					nimln(53, "service.nim");
					if (!(pass == ((NU8) 0))) goto LA20;
					nimln(53, "service.nim");
					commandargs_137234 = (TY10665*) incrSeq(&(commandargs_137234)->Sup, sizeof(NimStringDesc*));
					LOC22 = 0;
					LOC22 = commandargs_137234->data[commandargs_137234->Sup.len-1]; commandargs_137234->data[commandargs_137234->Sup.len-1] = copyStringRC1(p.Key);
					if (LOC22) nimGCunrefNoCycle(LOC22);
				}
				LA20: ;
				nimln(54, "service.nim");
				{
					nimln(54, "service.nim");
					if (!(argscount == 1)) goto LA25;
					nimln(56, "service.nim");
					asgnRefNoCycle((void**) &gprojectname_137206, nosunixToNativePath(p.Key, ((NimStringDesc*) &TMP7639)));
					nimln(57, "service.nim");
					asgnRefNoCycle((void**) &arguments_525205, npocmdLineRest(&p));
					nimln(58, "service.nim");
					goto LA1;
				}
				LA25: ;
			}
			LA12: ;
			nimln(59, "service.nim");
			argscount = addInt(argscount, 1);
		}
		break;
		}
	} LA1: ;
	nimln(61, "service.nim");
	{
		nimln(61, "service.nim");
		if (!(pass == ((NU8) 1))) goto LA29;
		nimln(62, "service.nim");
		{
			NIM_BOOL LOC33;
			TY127462 LOC37;
			nimln(62, "service.nim");
			LOC33 = 0;
			nimln(62, "service.nim");
			nimln(62, "service.nim");
			LOC33 = !(((gglobaloptions_137111 &(1<<((((NU8) 13))&31)))!=0));
			if (!(LOC33)) goto LA34;
			nimln(62, "service.nim");
			nimln(62, "service.nim");
			LOC33 = !(((arguments_525205) && (arguments_525205)->Sup.len == 0));
			LA34: ;
			if (!LOC33) goto LA35;
			nimln(63, "service.nim");
			memset((void*)LOC37, 0, sizeof(LOC37));
			rawmessage_165292(((NU16) 57), LOC37, 0);
		}
		LA35: ;
	}
	LA29: ;
	popFrame();
}
예제 #5
0
N_NIMCALL(void, libcandidates_154409)(NimStringDesc* s, TY121008** dest) {
	NI le;
	NI ri;
	le = nsuFindChar(s, 40, ((NI) 0));
	ri = nsuFindChar(s, 41, ((NI) ((NI)(le + ((NI) 1)))));
	{
		NIM_BOOL LOC3;
		NimStringDesc* prefix;
		NimStringDesc* suffix;
		LOC3 = 0;
		LOC3 = (((NI) 0) <= le);
		if (!(LOC3)) goto LA4;
		LOC3 = (le < ri);
		LA4: ;
		if (!LOC3) goto LA5;
		prefix = copyStrLast(s, ((NI) 0), (NI)(le - ((NI) 1)));
		suffix = copyStr(s, (NI)(ri + ((NI) 1)));
		{
			NimStringDesc* middle_154419;
			NimStringDesc* HEX3Atmp_154431;
			NI last_154435;
			middle_154419 = 0;
			HEX3Atmp_154431 = 0;
			HEX3Atmp_154431 = copyStrLast(s, (NI)(le + ((NI) 1)), (NI)(ri - ((NI) 1)));
			last_154435 = ((NI) 0);
			{
				if (!(((NI) 0) < (HEX3Atmp_154431 ? HEX3Atmp_154431->Sup.len : 0))) goto LA10;
				{
					while (1) {
						NI first_154437;
						NimStringDesc* LOC18;
						if (!(last_154435 <= (HEX3Atmp_154431 ? HEX3Atmp_154431->Sup.len : 0))) goto LA13;
						first_154437 = last_154435;
						{
							while (1) {
								NIM_BOOL LOC16;
								LOC16 = 0;
								LOC16 = (last_154435 < (HEX3Atmp_154431 ? HEX3Atmp_154431->Sup.len : 0));
								if (!(LOC16)) goto LA17;
								LOC16 = !(((NU8)(HEX3Atmp_154431->data[last_154435]) == (NU8)(124)));
								LA17: ;
								if (!LOC16) goto LA15;
								last_154435 += ((NI) 1);
							} LA15: ;
						}
						middle_154419 = copyStrLast(HEX3Atmp_154431, first_154437, (NI)(last_154435 - ((NI) 1)));
						LOC18 = 0;
						LOC18 = rawNewString(prefix->Sup.len + middle_154419->Sup.len + suffix->Sup.len + 0);
appendString(LOC18, prefix);
appendString(LOC18, middle_154419);
appendString(LOC18, suffix);
						libcandidates_154409(LOC18, dest);
						last_154435 += ((NI) 1);
					} LA13: ;
				}
			}
			LA10: ;
		}
	}
	goto LA1;
	LA5: ;
	{
		NimStringDesc* LOC20;
		(*dest) = (TY121008*) incrSeq(&((*dest))->Sup, sizeof(NimStringDesc*));
		LOC20 = 0;
		LOC20 = (*dest)->data[(*dest)->Sup.len-1]; (*dest)->data[(*dest)->Sup.len-1] = copyStringRC1(s);
		if (LOC20) nimGCunrefNoCycle(LOC20);
	}
	LA1: ;
}
예제 #6
0
N_NIMCALL(void, libcandidates_137321)(NimStringDesc* s, TY10665** dest) {
	NI le;
	NI ri;
	NI TMP435;
	nimfr("libCandidates", "options.nim")
	nimln(345, "options.nim");
	le = nsuFindChar(s, 40, 0);
	nimln(346, "options.nim");
	nimln(346, "options.nim");
	TMP435 = addInt(le, 1);
	ri = nsuFindChar(s, 41, (NI32)(TMP435));
	nimln(347, "options.nim");
	{
		NIM_BOOL LOC3;
		NimStringDesc* prefix;
		NI TMP436;
		NimStringDesc* suffix;
		NI TMP437;
		NimStringDesc* middle_137332;
		NimStringDesc* HEX3Atmp_137351;
		NI TMP438;
		NI TMP439;
		NI last_137353;
		nimln(347, "options.nim");
		LOC3 = 0;
		nimln(347, "options.nim");
		LOC3 = (0 <= le);
		if (!(LOC3)) goto LA4;
		nimln(347, "options.nim");
		LOC3 = (le < ri);
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(348, "options.nim");
		nimln(348, "options.nim");
		nimln(348, "options.nim");
		TMP436 = subInt(le, 1);
		prefix = copyStrLast(s, 0, (NI32)(TMP436));
		nimln(349, "options.nim");
		nimln(349, "options.nim");
		nimln(349, "options.nim");
		TMP437 = addInt(ri, 1);
		suffix = copyStr(s, (NI32)(TMP437));
		middle_137332 = 0;
		HEX3Atmp_137351 = 0;
		nimln(350, "options.nim");
		nimln(350, "options.nim");
		nimln(350, "options.nim");
		TMP438 = addInt(le, 1);
		nimln(350, "options.nim");
		TMP439 = subInt(ri, 1);
		HEX3Atmp_137351 = copyStrLast(s, (NI32)(TMP438), (NI32)(TMP439));
		nimln(257, "strutils.nim");
		last_137353 = 0;
		nimln(258, "strutils.nim");
		{
			if (!NIM_FALSE) goto LA9;
			nimln(258, "strutils.nim");
			failedassertimpl_79821(((NimStringDesc*) &TMP440));
		}
		LA9: ;
		nimln(259, "strutils.nim");
		{
			nimln(259, "strutils.nim");
			nimln(259, "strutils.nim");
			if (!(0 < HEX3Atmp_137351->Sup.len)) goto LA13;
			nimln(261, "strutils.nim");
			while (1) {
				NI first_137355;
				NI TMP441;
				NimStringDesc* LOC19;
				nimln(261, "strutils.nim");
				nimln(261, "strutils.nim");
				if (!(last_137353 <= HEX3Atmp_137351->Sup.len)) goto LA15;
				nimln(262, "strutils.nim");
				first_137355 = last_137353;
				nimln(263, "strutils.nim");
				while (1) {
					NIM_BOOL LOC17;
					nimln(263, "strutils.nim");
					LOC17 = 0;
					nimln(263, "strutils.nim");
					nimln(263, "strutils.nim");
					LOC17 = (last_137353 < HEX3Atmp_137351->Sup.len);
					if (!(LOC17)) goto LA18;
					nimln(263, "strutils.nim");
					nimln(263, "strutils.nim");
					if ((NU)(last_137353) > (NU)(HEX3Atmp_137351->Sup.len)) raiseIndexError();
					LOC17 = !(((NU8)(HEX3Atmp_137351->data[last_137353]) == (NU8)(124)));
					LA18: ;
					if (!LOC17) goto LA16;
					nimln(263, "strutils.nim");
					last_137353 = addInt(last_137353, 1);
				} LA16: ;
				nimln(264, "strutils.nim");
				nimln(264, "strutils.nim");
				nimln(264, "strutils.nim");
				TMP441 = subInt(last_137353, 1);
				middle_137332 = copyStrLast(HEX3Atmp_137351, first_137355, (NI32)(TMP441));
				nimln(351, "options.nim");
				nimln(351, "options.nim");
				LOC19 = 0;
				LOC19 = rawNewString(prefix->Sup.len + middle_137332->Sup.len + suffix->Sup.len + 0);
appendString(LOC19, prefix);
appendString(LOC19, middle_137332);
appendString(LOC19, suffix);
				libcandidates_137321(LOC19, dest);
				nimln(265, "strutils.nim");
				last_137353 = addInt(last_137353, 1);
			} LA15: ;
		}
		LA13: ;
	}
	goto LA1;
	LA5: ;
	{
		NimStringDesc* LOC21;
		nimln(353, "options.nim");
		(*dest) = (TY10665*) incrSeq(&((*dest))->Sup, sizeof(NimStringDesc*));
		LOC21 = 0;
		LOC21 = (*dest)->data[(*dest)->Sup.len-1]; (*dest)->data[(*dest)->Sup.len-1] = copyStringRC1(s);
		if (LOC21) nimGCunrefNoCycle(LOC21);
	}
	LA1: ;
	popFrame();
}
예제 #7
0
N_NIMCALL(NCSTRING*, envtocstringarray_144854)(void) {
	NCSTRING* result;
	NI counter;
	void* LOC5;
	NI i;
	result = 0;
	counter = ((NI) 0);
	{
		NimStringDesc* key_144858;
		NimStringDesc* val_144859;
		key_144858 = 0;
		val_144859 = 0;
		getenvvarsc_122404();
		{
			NI i_144888;
			NI HEX3Atmp_144890;
			NI res_144892;
			i_144888 = 0;
			HEX3Atmp_144890 = 0;
			HEX3Atmp_144890 = (environment_122209 ? (environment_122209->Sup.len-1) : -1);
			res_144892 = ((NI) 0);
			{
				while (1) {
					NI p_144896;
					if (!(res_144892 <= HEX3Atmp_144890)) goto LA4;
					i_144888 = res_144892;
					p_144896 = nsuFindChar(environment_122209->data[i_144888], 61, ((NI) 0));
					key_144858 = copyStrLast(environment_122209->data[i_144888], ((NI) 0), (NI)(p_144896 - ((NI) 1)));
					val_144859 = copyStr(environment_122209->data[i_144888], (NI)(p_144896 + ((NI) 1)));
					counter += ((NI) 1);
					res_144892 += ((NI) 1);
				} LA4: ;
			}
		}
	}
	LOC5 = 0;
	LOC5 = alloc0_6017(((NI) ((NI)((NI)(counter + ((NI) 1)) * ((NI) 4)))));
	result = ((NCSTRING*) (LOC5));
	i = ((NI) 0);
	{
		NimStringDesc* key_144871;
		NimStringDesc* val_144872;
		key_144871 = 0;
		val_144872 = 0;
		getenvvarsc_122404();
		{
			NI i_144909;
			NI HEX3Atmp_144911;
			NI res_144913;
			i_144909 = 0;
			HEX3Atmp_144911 = 0;
			HEX3Atmp_144911 = (environment_122209 ? (environment_122209->Sup.len-1) : -1);
			res_144913 = ((NI) 0);
			{
				while (1) {
					NI p_144917;
					NimStringDesc* x;
					NimStringDesc* LOC10;
					void* LOC11;
					if (!(res_144913 <= HEX3Atmp_144911)) goto LA9;
					i_144909 = res_144913;
					p_144917 = nsuFindChar(environment_122209->data[i_144909], 61, ((NI) 0));
					key_144871 = copyStrLast(environment_122209->data[i_144909], ((NI) 0), (NI)(p_144917 - ((NI) 1)));
					val_144872 = copyStr(environment_122209->data[i_144909], (NI)(p_144917 + ((NI) 1)));
					LOC10 = 0;
					LOC10 = rawNewString(key_144871->Sup.len + val_144872->Sup.len + 1);
appendString(LOC10, key_144871);
appendString(LOC10, ((NimStringDesc*) &TMP2890));
appendString(LOC10, val_144872);
					x = LOC10;
					LOC11 = 0;
					LOC11 = alloc_6001(((NI) ((NI)((x ? x->Sup.len : 0) + ((NI) 1)))));
					result[(i)- 0] = ((NCSTRING) (LOC11));
					memcpy(((void*) (result[(i)- 0])), ((void*) ((&x->data[((NI) 0)]))), ((NI) ((NI)((x ? x->Sup.len : 0) + ((NI) 1)))));
					i += ((NI) 1);
					res_144913 += ((NI) 1);
				} LA9: ;
			}
		}
	}
	return result;
}
예제 #8
0
N_NIMCALL(void, libcandidates_114600)(NimStringDesc* s, TY9552** dest) {
	NI le;
	NI ri;
	NI TMP353;
	nimfr("libCandidates", "options.nim")
	nimln(299, "options.nim");
	le = nsuFindChar(s, 40, 0);
	nimln(300, "options.nim");
	nimln(300, "options.nim");
	TMP353 = addInt(le, 1);
	ri = nsuFindChar(s, 41, (NI32)(TMP353));
	nimln(301, "options.nim");
	{
		NIM_BOOL LOC3;
		NimStringDesc* prefix;
		NI TMP354;
		NimStringDesc* suffix;
		NI TMP355;
		NimStringDesc* middle_114611;
		NimStringDesc* HEX3Atmp_114626;
		NI TMP356;
		NI TMP357;
		NI last_114628;
		nimln(301, "options.nim");
		LOC3 = 0;
		nimln(702, "system.nim");
		LOC3 = (0 <= le);
		if (!(LOC3)) goto LA4;
		nimln(706, "system.nim");
		LOC3 = (le < ri);
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(302, "options.nim");
		nimln(302, "options.nim");
		nimln(302, "options.nim");
		TMP354 = subInt(le, 1);
		prefix = copyStrLast(s, 0, (NI32)(TMP354));
		nimln(303, "options.nim");
		nimln(303, "options.nim");
		nimln(303, "options.nim");
		TMP355 = addInt(ri, 1);
		suffix = copyStr(s, (NI32)(TMP355));
		middle_114611 = 0;
		HEX3Atmp_114626 = 0;
		nimln(304, "options.nim");
		nimln(304, "options.nim");
		nimln(304, "options.nim");
		TMP356 = addInt(le, 1);
		nimln(304, "options.nim");
		TMP357 = subInt(ri, 1);
		HEX3Atmp_114626 = copyStrLast(s, (NI32)(TMP356), (NI32)(TMP357));
		nimln(247, "strutils.nim");
		last_114628 = 0;
		nimln(248, "strutils.nim");
		{
			if (!NIM_FALSE) goto LA9;
			nimln(248, "strutils.nim");
			hiddenraiseassert_76017(((NimStringDesc*) &TMP358));		}		LA9: ;
		nimln(249, "strutils.nim");
		{
			nimln(706, "system.nim");
			nimln(249, "strutils.nim");
			if (!(0 < HEX3Atmp_114626->Sup.len)) goto LA13;
			nimln(251, "strutils.nim");
			while (1) {
				NI first_114630;
				NI TMP359;
				NimStringDesc* LOC19;
				nimln(251, "strutils.nim");
				nimln(251, "strutils.nim");
				if (!(last_114628 <= HEX3Atmp_114626->Sup.len)) goto LA15;
				nimln(252, "strutils.nim");
				first_114630 = last_114628;
				nimln(253, "strutils.nim");
				while (1) {
					NIM_BOOL LOC17;
					nimln(253, "strutils.nim");
					LOC17 = 0;
					nimln(253, "strutils.nim");
					nimln(253, "strutils.nim");
					LOC17 = (last_114628 < HEX3Atmp_114626->Sup.len);
					if (!(LOC17)) goto LA18;
					nimln(698, "system.nim");
					nimln(698, "system.nim");
					if ((NU)(last_114628) > (NU)(HEX3Atmp_114626->Sup.len)) raiseIndexError();
					LOC17 = !(((NU8)(HEX3Atmp_114626->data[last_114628]) == (NU8)(124)));
					LA18: ;
					if (!LOC17) goto LA16;
					nimln(253, "strutils.nim");
					last_114628 = addInt(last_114628, 1);
				} LA16: ;
				nimln(254, "strutils.nim");
				nimln(254, "strutils.nim");
				nimln(254, "strutils.nim");
				TMP359 = subInt(last_114628, 1);
				middle_114611 = copyStrLast(HEX3Atmp_114626, first_114630, (NI32)(TMP359));
				nimln(305, "options.nim");
				nimln(305, "options.nim");
				LOC19 = 0;
				LOC19 = rawNewString(prefix->Sup.len + middle_114611->Sup.len + suffix->Sup.len + 0);
appendString(LOC19, prefix);
appendString(LOC19, middle_114611);
appendString(LOC19, suffix);
				libcandidates_114600(LOC19, dest);				nimln(255, "strutils.nim");
				last_114628 = addInt(last_114628, 1);
			} LA15: ;
		}		LA13: ;
	}	goto LA1;
	LA5: ;
	{
		NimStringDesc* LOC21;
		nimln(307, "options.nim");
		(*dest) = (TY9552*) incrSeq(&((*dest))->Sup, sizeof(NimStringDesc*));
		LOC21 = 0;
		LOC21 = (*dest)->data[(*dest)->Sup.len-1]; (*dest)->data[(*dest)->Sup.len-1] = copyStringRC1(s);
		if (LOC21) nimGCunrefNoCycle(LOC21);
	}	LA1: ;
	popFrame();
}
예제 #9
0
N_LIB_PRIVATE N_NIMCALL(void, libCandidates_z61W6kN39aBKDgNtbcWn9cSg)(NimStringDesc* s, tySequence_sM4lkSb7zS6F7OVMvW9cffQ** dest) {
	NI le;
	NI ri;
	le = nsuFindChar(s, 40, ((NI) 0), ((NI) 0));
	ri = nsuFindChar(s, 41, ((NI) ((NI)(le + ((NI) 1)))), ((NI) 0));
	{
		NIM_BOOL T3_;
		NimStringDesc* prefix;
		NimStringDesc* suffix;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI) 0) <= le);
		if (!(T3_)) goto LA4_;
		T3_ = (le < ri);
		LA4_: ;
		if (!T3_) goto LA5_;
		prefix = substr_TWXUwbnq0SWWvDLfr8LXYw(s, ((NI) 0), (NI)(le - ((NI) 1)));
		suffix = substr_9bUFQ4OV1temcDF0GZp317g(s, (NI)(ri + ((NI) 1)));
		{
			NimStringDesc* middle;
			NimStringDesc* colontmp_;
			NI last;
			NI splits;
			middle = (NimStringDesc*)0;
			colontmp_ = (NimStringDesc*)0;
			colontmp_ = substr_TWXUwbnq0SWWvDLfr8LXYw(s, (NI)(le + ((NI) 1)), (NI)(ri - ((NI) 1)));
			last = ((NI) 0);
			splits = ((NI) -1);
			{
				while (1) {
					NI first;
					NimStringDesc* T18_;
					if (!(last <= (colontmp_ ? colontmp_->Sup.len : 0))) goto LA9;
					first = last;
					{
						while (1) {
							NIM_BOOL T12_;
							T12_ = (NIM_BOOL)0;
							T12_ = (last < (colontmp_ ? colontmp_->Sup.len : 0));
							if (!(T12_)) goto LA13_;
							T12_ = !(((NU8)(colontmp_->data[last]) == (NU8)(124)));
							LA13_: ;
							if (!T12_) goto LA11;
							last += ((NI) 1);
						} LA11: ;
					}
					{
						if (!(splits == ((NI) 0))) goto LA16_;
						last = (colontmp_ ? colontmp_->Sup.len : 0);
					}
					LA16_: ;
					middle = substr_TWXUwbnq0SWWvDLfr8LXYw(colontmp_, first, (NI)(last - ((NI) 1)));
					T18_ = (NimStringDesc*)0;
					T18_ = rawNewString((prefix ? prefix->Sup.len : 0) + (middle ? middle->Sup.len : 0) + (suffix ? suffix->Sup.len : 0) + 0);
appendString(T18_, prefix);
appendString(T18_, middle);
appendString(T18_, suffix);
					libCandidates_z61W6kN39aBKDgNtbcWn9cSg(T18_, dest);
					{
						if (!(splits == ((NI) 0))) goto LA21_;
						goto LA8;
					}
					LA21_: ;
					splits -= ((NI) 1);
					last += ((NI) 1);
				} LA9: ;
			} LA8: ;
		}
	}
	goto LA1_;
	LA5_: ;
	{
		NI T24_;
		NimStringDesc* T25_;
		unsureAsgnRef((void**) (&(*dest)), (tySequence_sM4lkSb7zS6F7OVMvW9cffQ*) incrSeqV3(&((*dest))->Sup, (&NTI_sM4lkSb7zS6F7OVMvW9cffQ_)));
		T24_ = (*dest)->Sup.len++;
		T25_ = (NimStringDesc*)0;
		T25_ = (*dest)->data[T24_]; (*dest)->data[T24_] = copyStringRC1(s);
		if (T25_) nimGCunrefNoCycle(T25_);
	}
	LA1_: ;
}