• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setLengthStr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setLengthStr函数的典型用法代码示例。如果您正苦于以下问题:C++ setLengthStr函数的具体用法?C++ setLengthStr怎么用?C++ setLengthStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setLengthStr函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: N_NIMCALL

N_NIMCALL(void, parseauthority_201072)(NimStringDesc* authority, Uri201012* result) {
	NI i;
	NIM_BOOL inport;
	i = ((NI) 0);
	inport = NIM_FALSE;
	{
		while (1) {
			switch (((NU8)(authority->data[i]))) {
			case 64:
			{
				NimStringDesc* LOC4;
				NimStringDesc* LOC5;
				LOC4 = 0;
				LOC4 = (*result).password;
				unsureAsgnRef((void**) (&(*result).password), (*result).port);
				unsureAsgnRef((void**) (&(*result).port), LOC4);
				(*result).port = setLengthStr((*result).port, ((NI) 0));
				LOC5 = 0;
				LOC5 = (*result).username;
				unsureAsgnRef((void**) (&(*result).username), (*result).hostname);
				unsureAsgnRef((void**) (&(*result).hostname), LOC5);
				(*result).hostname = setLengthStr((*result).hostname, ((NI) 0));
				inport = NIM_FALSE;
			}
			break;
			case 58:
			{
				inport = NIM_TRUE;
			}
			break;
			case 0:
			{
				goto LA1;
			}
			break;
			default:
			{
				{
					if (!inport) goto LA11;
					(*result).port = addChar((*result).port, authority->data[i]);
				}
				goto LA9;
				LA11: ;
				{
					(*result).hostname = addChar((*result).hostname, authority->data[i]);
				}
				LA9: ;
			}
			break;
			}
			i += ((NI) 1);
		}
	} LA1: ;
}
开发者ID:JJjie,项目名称:RuCTF-2015,代码行数:54,代码来源:stdlib_uri.c


示例2: N_NIMCALL

N_NIMCALL(void, nponext)(TY189404* P_189783) {
NI I_189784;
I_189784 = 0;
I_189784 = (*P_189783).Pos;
while (1) {
if (!(((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(9)) || ((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(32)))) goto LA1;
I_189784 += 1;
} LA1: ;
(*P_189783).Pos = I_189784;
(*P_189783).Key = setLengthStr((*P_189783).Key, 0);
(*P_189783).Val = setLengthStr((*P_189783).Val, 0);
if (!(*P_189783).Inshortstate) goto LA3;
Handleshortoption_189688(P_189783);
goto BeforeRet;
LA3: ;
switch (((NU8)((*P_189783).Cmd->data[I_189784]))) {
case 0:
(*P_189783).Kind = ((NU8) 0);
break;
case 45:
I_189784 += 1;
if (!((NU8)((*P_189783).Cmd->data[I_189784]) == (NU8)(45))) goto LA6;
(*P_189783).Kind = ((NU8) 2);
I_189784 += 1;
I_189784 = Parseword_189604((*P_189783).Cmd, I_189784, &(*P_189783).Key, TMP191639);
while (1) {
if (!(((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(9)) || ((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(32)))) goto LA8;
I_189784 += 1;
} LA8: ;
if (!(((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(58)) || ((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(61)))) goto LA10;
I_189784 += 1;
while (1) {
if (!(((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(9)) || ((NU8)((*P_189783).Cmd->data[I_189784])) == ((NU8)(32)))) goto LA12;
I_189784 += 1;
} LA12: ;
(*P_189783).Pos = Parseword_189604((*P_189783).Cmd, I_189784, &(*P_189783).Val, TMP191638);
goto LA9;
LA10: ;
(*P_189783).Pos = I_189784;
LA9: ;
goto LA5;
LA6: ;
(*P_189783).Pos = I_189784;
Handleshortoption_189688(P_189783);
LA5: ;
break;
default:
(*P_189783).Kind = ((NU8) 1);
(*P_189783).Pos = Parseword_189604((*P_189783).Cmd, I_189784, &(*P_189783).Key, TMP191638);
break;
}
BeforeRet: ;
}
开发者ID:ddlsmurf,项目名称:Nimrod,代码行数:53,代码来源:parseopt.c


示例3: N_NIMCALL

N_NIMCALL(NimStringDesc*, readoutput_379009)(Processobj142402* p) {
	NimStringDesc* result;
	Streamobj137027* output;
	NI LOC5;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2885));
	output = nospoutputStream(p);
	{
		while (1) {
			NIM_BOOL LOC3;
			NimStringDesc* LOC4;
			LOC3 = 0;
			LOC3 = atend_137111(output);
			if (!!(LOC3)) goto LA2;
			LOC4 = 0;
			LOC4 = readline_137531(output);
			result = resizeString(result, LOC4->Sup.len + 0);
appendString(result, LOC4);
			result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP2897));
		} LA2: ;
	}
	result = setLengthStr(result, ((NI) ((NI)((result ? result->Sup.len : 0) - ((NI) 1)))));
	LOC5 = 0;
	LOC5 = nospwaitForExit(p, ((NI) -1));
	return result;
}
开发者ID:jlp765,项目名称:csources,代码行数:27,代码来源:compiler_vmdeps.c


示例4: N_NIMCALL

N_NIMCALL(NimStringDesc*, nosgetCurrentDir)(void) {
	NimStringDesc* result;
	result = 0;
	result = mnewString(((NI) 512));
	{
		NCSTRING LOC3;
		NI LOC6;
		LOC3 = 0;
		LOC3 = getcwd(result->data, ((NI) 512));
		if (!!((LOC3 == NIM_NIL))) goto LA4;
		LOC6 = 0;
		LOC6 = strlen(result->data);
		result = setLengthStr(result, ((NI) (LOC6)));
	}
	goto LA1;
	LA4: ;
	{
		NI32 LOC8;
		LOC8 = 0;
		LOC8 = oslasterror_115833();
		raiseoserror_115809(LOC8);
	}
	LA1: ;
	return result;
}
开发者ID:apense,项目名称:csources,代码行数:25,代码来源:stdlib_os.c


示例5: N_NIMCALL

N_NIMCALL(void, sswritedata_126099)(tstream125629* s_126101, void* buffer, NI buflen) {
	tstringstream126030* s;
	nimfr("ssWriteData", "streams.nim")
	nimln(222, "streams.nim");
	if (s_126101) chckObj((*s_126101).Sup.m_type, (&NTI126030));
	s = ((tstringstream126030*) (s_126101));
	nimln(223, "streams.nim");
	{
		NI TMP324;
		nimln(223, "streams.nim");
		if (!(0 < buflen)) goto LA3;
		nimln(224, "streams.nim");
		nimln(224, "streams.nim");
		nimln(224, "streams.nim");
		TMP324 = addInt((*s).Data->Sup.len, buflen);
		(*s).Data = setLengthStr((*s).Data, (NI32)(TMP324));
		nimln(225, "streams.nim");
		if ((NU)((*s).Pos) > (NU)((*s).Data->Sup.len)) raiseIndexError();
		memcpy(((void*) (&(*s).Data->data[(*s).Pos])), buffer, buflen);
		nimln(226, "streams.nim");
		(*s).Pos = addInt((*s).Pos, buflen);
	}
	LA3: ;
	popFrame();
}
开发者ID:rbehrends,项目名称:csources,代码行数:25,代码来源:stdlib_streams.c


示例6: N_NIMCALL

N_NIMCALL(NIM_BOOL, readline_142973)(tstream142629* s, NimStringDesc** line) {
	NIM_BOOL result;
	nimfr("readLine", "streams.nim")
	result = 0;
	nimln(167, "streams.nim");
	(*line) = setLengthStr((*line), 0);
	nimln(168, "streams.nim");
	while (1) {
		NIM_CHAR c;
		nimln(169, "streams.nim");
		c = readchar_142808(s);
		nimln(170, "streams.nim");
		{
			nimln(170, "streams.nim");
			if (!((NU8)(c) == (NU8)(13))) goto LA4;
			nimln(171, "streams.nim");
			c = readchar_142808(s);
			nimln(172, "streams.nim");
			goto LA1;
		}		goto LA2;
		LA4: ;
		{
			nimln(173, "streams.nim");
			if (!((NU8)(c) == (NU8)(10))) goto LA7;
			nimln(173, "streams.nim");
			goto LA1;
		}		goto LA2;
		LA7: ;
		{
			nimln(174, "streams.nim");
			if (!((NU8)(c) == (NU8)(0))) goto LA10;
			nimln(175, "streams.nim");
			{
				nimln(706, "system.nim");
				nimln(175, "streams.nim");
				if (!(0 < (*line)->Sup.len)) goto LA14;
				nimln(175, "streams.nim");
				goto LA1;
			}			goto LA12;
			LA14: ;
			{
				nimln(176, "streams.nim");
				nimln(176, "streams.nim");
				result = NIM_FALSE;
				goto BeforeRet;
			}			LA12: ;
		}		goto LA2;
		LA10: ;
		LA2: ;
		nimln(177, "streams.nim");
		(*line) = addChar((*line), c);
	} LA1: ;
	nimln(178, "streams.nim");
	result = NIM_TRUE;
	BeforeRet: ;	popFrame();
	return result;
}
开发者ID:reactormonk,项目名称:csources,代码行数:57,代码来源:pure_streams.c


示例7: N_NIMCALL

N_NIMCALL(NimStringDesc*, readall_157920_1780494535)(Streamobj157818* s0) {
	NimStringDesc* result0;
	NI r0;
	result0 = (NimStringDesc*)0;
	result0 = mnewString(((NI) 1000));
	r0 = ((NI) 0);
	{
		while (1) {
			NI readbytes0;
			readbytes0 = readdata_157914_1780494535(s0, ((void*) ((&result0->data[r0]))), ((NI) 1000));
			{
				if (!(readbytes0 < ((NI) 1000))) goto LA5;
				result0 = setLengthStr(result0, ((NI) ((NI)(r0 + readbytes0))));
				goto LA1;
			}
			LA5: ;
			r0 += ((NI) 1000);
			result0 = setLengthStr(result0, ((NI) ((NI)(r0 + ((NI) 1000)))));
		}
	} LA1: ;
	return result0;
}
开发者ID:FedericoCeratto,项目名称:debian-nim,代码行数:22,代码来源:stdlib_streams.c


示例8: N_NIMCALL

N_NIMCALL(TY47008*, Makellvmstring_155013)(NimStringDesc* S_155015) {
TY47008* Result_155206;
NimStringDesc* Res_155208;
NI I_155219;
NI HEX3Atmp_155229;
NI Res_155231;
TY47008* LOC5;
NimStringDesc* LOC6;
TY47008* LOC7;
Result_155206 = 0;
Res_155208 = 0;
Result_155206 = NIM_NIL;
Res_155208 = copyString(((NimStringDesc*) &TMP192302));
I_155219 = 0;
HEX3Atmp_155229 = 0;
HEX3Atmp_155229 = (NI64)((NI64)(S_155015->Sup.len + 0) - 1);
Res_155231 = 0;
Res_155231 = 0;
while (1) {
if (!(Res_155231 <= HEX3Atmp_155229)) goto LA1;
I_155219 = Res_155231;
if (!((NI64)((NI64)((NI64)(I_155219 - 0) + 1) % 64) == 0)) goto LA3;
LOC5 = 0;
LOC5 = Torope_47046(Res_155208);
App_47031(&Result_155206, LOC5);
Res_155208 = setLengthStr(Res_155208, 0);
LA3: ;
switch (((NU8)(S_155015->data[I_155219]))) {
case 0 ... 31:
case 128 ... 255:
case 34:
case 92:
Res_155208 = addChar(Res_155208, 92);
LOC6 = 0;
LOC6 = nsuToHex(((NI64) (((NU8)(S_155015->data[I_155219])))), 2);
Res_155208 = resizeString(Res_155208, LOC6->Sup.len + 0);
appendString(Res_155208, LOC6);
break;
default:
Res_155208 = addChar(Res_155208, S_155015->data[I_155219]);
break;
}
Res_155231 += 1;
} LA1: ;
Res_155208 = resizeString(Res_155208, 4);
appendString(Res_155208, ((NimStringDesc*) &TMP192303));
LOC7 = 0;
LOC7 = Torope_47046(Res_155208);
App_47031(&Result_155206, LOC7);
return Result_155206;
}
开发者ID:ddlsmurf,项目名称:Nimrod,代码行数:51,代码来源:ccgutils.c


示例9: N_NIMCALL

N_NIMCALL(void, sswritedata_137639)(Streamobj137027* s_137641, void* buffer, NI buflen) {
	Stringstreamobj137554* s;
{	s = ((Stringstreamobj137554*) (s_137641));
	{
		if (!(buflen <= ((NI) 0))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(((*s).data ? (*s).data->Sup.len : 0) < (NI)((*s).pos + buflen))) goto LA7;
		(*s).data = setLengthStr((*s).data, ((NI) ((NI)((*s).pos + buflen))));
	}
	LA7: ;
	memcpy(((void*) ((&(*s).data->data[(*s).pos]))), buffer, ((NI) (buflen)));
	(*s).pos += buflen;
	}BeforeRet: ;
}
开发者ID:jlp765,项目名称:csources,代码行数:17,代码来源:stdlib_streams.c


示例10: N_NIMCALL

N_NIMCALL(void, llstreamwrite_179268)(tllstream179204* s, void* buf, NI buflen) {
	nimfr("llStreamWrite", "llstream.nim")
	nimln(195, "llstream.nim");
	switch ((*s).Kind) {
	case ((NU8) 0):
	case ((NU8) 3):
	{
	}
	break;
	case ((NU8) 1):
	{
		nimln(199, "llstream.nim");
		{
			NI TMP1641;
			NI TMP1642;
			nimln(199, "llstream.nim");
			if (!(0 < buflen)) goto LA5;
			nimln(200, "llstream.nim");
			nimln(200, "llstream.nim");
			nimln(200, "llstream.nim");
			TMP1641 = addInt((*s).S->Sup.len, buflen);
			(*s).S = setLengthStr((*s).S, (NI64)(TMP1641));
			nimln(201, "llstream.nim");
			nimln(201, "llstream.nim");
			TMP1642 = addInt(0, (*s).Wr);
			if ((NU)((NI64)(TMP1642)) > (NU)((*s).S->Sup.len)) raiseIndexError();
			memcpy(((void*) (&(*s).S->data[(NI64)(TMP1642)])), buf, buflen);
			nimln(202, "llstream.nim");
			(*s).Wr = addInt((*s).Wr, buflen);
		}
		LA5: ;
	}
	break;
	case ((NU8) 2):
	{
		NI LOC8;
		nimln(204, "llstream.nim");
		nimln(204, "llstream.nim");
		LOC8 = 0;
		LOC8 = writebuffer_11046((*s).F, buf, buflen);
	}
	break;
	}
	popFrame();
}
开发者ID:rbehrends,项目名称:csources,代码行数:45,代码来源:llstream.c


示例11: N_NIMCALL

N_NIMCALL(NimStringDesc*, HEX24_172856)(Ropeobj172006* r) {
	NimStringDesc* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = len_172025(r);
	result = mnewString(((NI) (LOC1)));
	result = setLengthStr(result, ((NI) 0));
	{
		NimStringDesc* s_172860;
		s_172860 = 0;
		{
			TY184350* stack_172865;
			TY172507 LOC7;
			if (!!((r == NIM_NIL))) goto LA5;
			stack_172865 = (TY184350*) newSeq((&NTI184350), 1);
			memset((void*)LOC7, 0, sizeof(LOC7));
			LOC7[0] = r;
			asgnRefNoCycle((void**) (&stack_172865->data[0]), LOC7[0]);
			{
				while (1) {
					Ropeobj172006* it_172867;
					if (!(((NI) 0) < (stack_172865 ? stack_172865->Sup.len : 0))) goto LA9;
					it_172867 = pop_172530((&stack_172865));
					{
						while (1) {
							if (!(*it_172867).data == 0) goto LA11;
							stack_172865 = (TY184350*) incrSeqV2(&(stack_172865)->Sup, sizeof(Ropeobj172006*));
							asgnRefNoCycle((void**) (&stack_172865->data[stack_172865->Sup.len]), (*it_172867).right);
							++stack_172865->Sup.len;
							it_172867 = (*it_172867).left;
						} LA11: ;
					}
					s_172860 = (*it_172867).data;
					result = resizeString(result, s_172860->Sup.len + 0);
appendString(result, s_172860);
				} LA9: ;
			}
		}
		LA5: ;
	}
	return result;
}
开发者ID:StetHD,项目名称:csources,代码行数:43,代码来源:compiler_ropes.c


示例12: N_NIMCALL

N_NIMCALL(NimStringDesc*, HEX24_162131)(Ropeobj161009* r) {
	NimStringDesc* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = len_161034(r);
	result = mnewString(((NI) (LOC1)));
	result = setLengthStr(result, ((NI) 0));
	{
		NimStringDesc* s_162135;
		s_162135 = 0;
		{
			TY163351* stack_162140;
			TY161585 LOC7;
			if (!!((r == NIM_NIL))) goto LA5;
			stack_162140 = (TY163351*) newSeq((&NTI163351), 1);
			memset((void*)LOC7, 0, sizeof(LOC7));
			LOC7[0] = r;
			asgnRefNoCycle((void**) (&stack_162140->data[0]), LOC7[0]);
			{
				while (1) {
					Ropeobj161009* it_162142;
					if (!(((NI) 0) < (stack_162140 ? stack_162140->Sup.len : 0))) goto LA9;
					it_162142 = pop_161597((&stack_162140));
					{
						while (1) {
							if (!(*it_162142).data == 0) goto LA11;
							stack_162140 = (TY163351*) incrSeq(&(stack_162140)->Sup, sizeof(Ropeobj161009*));
							asgnRefNoCycle((void**) (&stack_162140->data[stack_162140->Sup.len-1]), (*it_162142).right);
							it_162142 = (*it_162142).left;
						} LA11: ;
					}
					s_162135 = (*it_162142).data;
					result = resizeString(result, s_162135->Sup.len + 0);
appendString(result, s_162135);
				} LA9: ;
			}
		}
		LA5: ;
	}
	return result;
}
开发者ID:jlp765,项目名称:csources,代码行数:42,代码来源:compiler_ropes.c


示例13: N_NIMCALL

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();
}
开发者ID:undecided,项目名称:csources,代码行数:42,代码来源:compiler_llstream.c


示例14: N_NIMCALL

N_NIMCALL(void, nponext)(toptparser416607* p) {
	NI i;
	nimfr("next", "parseopt.nim")
	nimln(94, "parseopt.nim");
	i = (*p).Pos;
	nimln(95, "parseopt.nim");
	while (1) {
		nimln(730, "system.nim");
		if ((NU)(i) > (NU)((*p).Cmd->Sup.len)) raiseIndexError();
		if (!(((NU8)((*p).Cmd->data[i])) == ((NU8)(9)) || ((NU8)((*p).Cmd->data[i])) == ((NU8)(32)))) goto LA1;
		nimln(95, "parseopt.nim");
		i = addInt(i, 1);
	} LA1: ;
	nimln(96, "parseopt.nim");
	(*p).Pos = i;
	nimln(97, "parseopt.nim");
	(*p).Key = setLengthStr((*p).Key, 0);
	nimln(98, "parseopt.nim");
	(*p).Val = setLengthStr((*p).Val, 0);
	nimln(99, "parseopt.nim");
	{
		if (!(*p).Inshortstate) goto LA4;
		nimln(100, "parseopt.nim");
		handleshortoption_416876(p);		nimln(101, "parseopt.nim");
		goto BeforeRet;
	}	LA4: ;
	nimln(102, "parseopt.nim");
	if ((NU)(i) > (NU)((*p).Cmd->Sup.len)) raiseIndexError();
	switch (((NU8)((*p).Cmd->data[i]))) {
	case 0:
	{
		nimln(104, "parseopt.nim");
		(*p).Kind = ((NU8) 0);
	}	break;
	case 45:
	{
		nimln(106, "parseopt.nim");
		i = addInt(i, 1);
		nimln(107, "parseopt.nim");
		{
			nimln(107, "parseopt.nim");
			if ((NU)(i) > (NU)((*p).Cmd->Sup.len)) raiseIndexError();
			if (!((NU8)((*p).Cmd->data[i]) == (NU8)(45))) goto LA10;
			nimln(108, "parseopt.nim");
			(*p).Kind = ((NU8) 2);
			nimln(109, "parseopt.nim");
			i = addInt(i, 1);
			nimln(110, "parseopt.nim");
			i = parseword_416802((*p).Cmd, i, &(*p).Key, TMP7030);
			nimln(111, "parseopt.nim");
			while (1) {
				nimln(730, "system.nim");
				if ((NU)(i) > (NU)((*p).Cmd->Sup.len)) raiseIndexError();
				if (!(((NU8)((*p).Cmd->data[i])) == ((NU8)(9)) || ((NU8)((*p).Cmd->data[i])) == ((NU8)(32)))) goto LA12;
				nimln(111, "parseopt.nim");
				i = addInt(i, 1);
			} LA12: ;
			nimln(112, "parseopt.nim");
			{
				nimln(730, "system.nim");
				if ((NU)(i) > (NU)((*p).Cmd->Sup.len)) raiseIndexError();
				if (!(((NU8)((*p).Cmd->data[i])) == ((NU8)(58)) || ((NU8)((*p).Cmd->data[i])) == ((NU8)(61)))) goto LA15;
				nimln(113, "parseopt.nim");
				i = addInt(i, 1);
				nimln(114, "parseopt.nim");
				while (1) {
					nimln(730, "system.nim");
					if ((NU)(i) > (NU)((*p).Cmd->Sup.len)) raiseIndexError();
					if (!(((NU8)((*p).Cmd->data[i])) == ((NU8)(9)) || ((NU8)((*p).Cmd->data[i])) == ((NU8)(32)))) goto LA17;
					nimln(114, "parseopt.nim");
					i = addInt(i, 1);
				} LA17: ;
				nimln(115, "parseopt.nim");
				(*p).Pos = parseword_416802((*p).Cmd, i, &(*p).Val, TMP7029);
			}			goto LA13;
			LA15: ;
			{
				nimln(117, "parseopt.nim");
				(*p).Pos = i;
			}			LA13: ;
		}		goto LA8;
		LA10: ;
		{
			nimln(119, "parseopt.nim");
			(*p).Pos = i;
			nimln(120, "parseopt.nim");
			handleshortoption_416876(p);		}		LA8: ;
	}	break;
	default:
	{
		nimln(122, "parseopt.nim");
		(*p).Kind = ((NU8) 1);
		nimln(123, "parseopt.nim");
		(*p).Pos = parseword_416802((*p).Cmd, i, &(*p).Key, TMP7029);
	}	break;
	}
	BeforeRet: ;	popFrame();
}
开发者ID:rbehrends,项目名称:csources,代码行数:98,代码来源:pure_parseopt.c


示例15: N_NIMCALL

N_NIMCALL(NimStringDesc*, llstreamreadall_162254)(tllstream162204* s) {
	NimStringDesc* result;
	NI bytes;
	NI i;
	nimfr("LLStreamReadAll", "llstream.nim")
	result = 0;
	bytes = 0;
	i = 0;
	nimln(210, "llstream.nim");
	switch ((*s).Kind) {
	case ((NU8) 0):
	case ((NU8) 3):
	{
		nimln(212, "llstream.nim");
		result = copyString(((NimStringDesc*) &TMP1602));
	}	break;
	case ((NU8) 1):
	{
		nimln(214, "llstream.nim");
		{
			nimln(214, "llstream.nim");
			if (!((*s).Rd == 0)) goto LA5;
			nimln(214, "llstream.nim");
			result = copyString((*s).S);
		}		goto LA3;
		LA5: ;
		{
			nimln(215, "llstream.nim");
			nimln(215, "llstream.nim");
			result = copyStr((*s).S, (*s).Rd);
		}		LA3: ;
		nimln(216, "llstream.nim");
		nimln(216, "llstream.nim");
		(*s).Rd = (*s).S->Sup.len;
	}	break;
	case ((NU8) 2):
	{
		nimln(218, "llstream.nim");
		nimln(218, "llstream.nim");
		result = mnewString(2048);
		nimln(219, "llstream.nim");
		if ((NU)(0) > (NU)(result->Sup.len)) raiseIndexError();
		bytes = readbuffer_9514((*s).F, ((void*) (&result->data[0])), 2048);
		nimln(220, "llstream.nim");
		i = bytes;
		nimln(221, "llstream.nim");
		while (1) {
			NI TMP1616;
			NI TMP1617;
			nimln(221, "llstream.nim");
			if (!(bytes == 2048)) goto LA9;
			nimln(222, "llstream.nim");
			nimln(222, "llstream.nim");
			TMP1616 = addInt(i, 2048);
			result = setLengthStr(result, (NI32)(TMP1616));
			nimln(223, "llstream.nim");
			nimln(223, "llstream.nim");
			TMP1617 = addInt(i, 0);
			if ((NU)((NI32)(TMP1617)) > (NU)(result->Sup.len)) raiseIndexError();
			bytes = readbuffer_9514((*s).F, ((void*) (&result->data[(NI32)(TMP1617)])), 2048);
			nimln(224, "llstream.nim");
			i = addInt(i, bytes);
		} LA9: ;
		nimln(225, "llstream.nim");
		result = setLengthStr(result, i);
	}	break;
	}
	popFrame();
	return result;
}N_NOINLINE(void, compilerllstreamInit)(void) {
开发者ID:Varriount,项目名称:csources,代码行数:70,代码来源:compiler_llstream.c


示例16: N_NIMCALL

N_NIMCALL(NIM_BOOL, llstreamreadline_284550_597494479)(Tllstream284204* s0, NimStringDesc** line0) {
	NIM_BOOL result0;
	result0 = (NIM_BOOL)0;
	(*line0) = setLengthStr((*line0), ((NI) 0));
	switch ((*s0).kind) {
	case ((Tllstreamkind284202) 0):
	{
		result0 = NIM_TRUE;
	}
	break;
	case ((Tllstreamkind284202) 1):
	{
		NIM_BOOL LOC12;
		{
			while (1) {
				if (!((*s0).rd < ((*s0).s ? (*s0).s->Sup.len : 0))) goto LA4;
				switch (((NU8)((*s0).s->data[(*s0).rd]))) {
				case 13:
				{
					(*s0).rd += ((NI) 1);
					{
						if (!((NU8)((*s0).s->data[(*s0).rd]) == (NU8)(10))) goto LA8;
						(*s0).rd += ((NI) 1);
					}
					LA8: ;
					goto LA3;
				}
				break;
				case 10:
				{
					(*s0).rd += ((NI) 1);
					goto LA3;
				}
				break;
				default:
				{
					(*line0) = addChar((*line0), (*s0).s->data[(*s0).rd]);
					(*s0).rd += ((NI) 1);
				}
				break;
				}
			} LA4: ;
		} LA3: ;
		LOC12 = (NIM_BOOL)0;
		LOC12 = (((NI) 0) < ((*line0) ? (*line0)->Sup.len : 0));
		if (LOC12) goto LA13;
		LOC12 = ((*s0).rd < ((*s0).s ? (*s0).s->Sup.len : 0));
		LA13: ;
		result0 = LOC12;
	}
	break;
	case ((Tllstreamkind284202) 2):
	{
		result0 = readline_14915_1689653243((*s0).f, line0);
	}
	break;
	case ((Tllstreamkind284202) 3):
	{
		result0 = readline_14915_1689653243(stdin, line0);
	}
	break;
	}
	return result0;
}
开发者ID:FedericoCeratto,项目名称:debian-nim,代码行数:64,代码来源:compiler_llstream.c


示例17: N_NIMCALL

N_NIMCALL(void, rawgettok_156048)(tcfgparser156014* c, ttoken156012* tok) {
	(*tok).Kind = ((NU8) 0);
	(*tok).Literal = setLengthStr((*tok).Literal, 0);
	skip_156628(c);
	switch (((NU8)((*c).Sup.Buf[(*c).Sup.Bufpos]))) {
	case 61:
	{
		(*tok).Kind = ((NU8) 3);
		(*c).Sup.Bufpos += 1;
		unsureAsgnRef((void**) &(*tok).Literal, copyString(((NimStringDesc*) &TMP126)));
	}
	break;
	case 45:
	{
		(*c).Sup.Bufpos += 1;
		{
			if (!((NU8)((*c).Sup.Buf[(*c).Sup.Bufpos]) == (NU8)(45))) goto LA5;
			(*c).Sup.Bufpos += 1;
		}
		LA5: ;
		(*tok).Kind = ((NU8) 7);
		unsureAsgnRef((void**) &(*tok).Literal, copyString(((NimStringDesc*) &TMP127)));
	}
	break;
	case 58:
	{
		(*tok).Kind = ((NU8) 4);
		(*c).Sup.Bufpos += 1;
		unsureAsgnRef((void**) &(*tok).Literal, copyString(((NimStringDesc*) &TMP128)));
	}
	break;
	case 114:
	case 82:
	{
		{
			if (!((NU8)((*c).Sup.Buf[(NI64)((*c).Sup.Bufpos + 1)]) == (NU8)(34))) goto LA11;
			(*c).Sup.Bufpos += 1;
			getstring_156478(c, tok, NIM_TRUE);
		}
		goto LA9;
		LA11: ;
		{
			getsymbol_156582(c, tok);
		}
		LA9: ;
	}
	break;
	case 91:
	{
		(*tok).Kind = ((NU8) 5);
		(*c).Sup.Bufpos += 1;
		unsureAsgnRef((void**) &(*tok).Literal, copyString(((NimStringDesc*) &TMP130)));
	}
	break;
	case 93:
	{
		(*tok).Kind = ((NU8) 6);
		(*c).Sup.Bufpos += 1;
		unsureAsgnRef((void**) &(*tok).Literal, copyString(((NimStringDesc*) &TMP130)));
	}
	break;
	case 34:
	{
		getstring_156478(c, tok, NIM_FALSE);
	}
	break;
	case 0:
	{
		(*tok).Kind = ((NU8) 1);
		unsureAsgnRef((void**) &(*tok).Literal, copyString(((NimStringDesc*) &TMP131)));
	}
	break;
	default:
	{
		getsymbol_156582(c, tok);
	}
	break;
	}
}
开发者ID:Araq,项目名称:quicklook-rest-with-nim,代码行数:79,代码来源:parsecfg.c


示例18: N_NIMCALL

N_NIMCALL(trope144007*, makellvmstring_464684)(NimStringDesc* s) {
    trope144007* result;
    NimStringDesc* res;
    NI i_464702;
    NI HEX3Atmp_464714;
    NI TMP6200;
    NI res_464716;
    trope144007* LOC10;
    nimfr("makeLLVMString", "ccgutils.nim")
    result = 0;
    nimln(166, "ccgutils.nim");
    result = NIM_NIL;
    nimln(167, "ccgutils.nim");
    res = copyString(((NimStringDesc*) &TMP6199));
    i_464702 = 0;
    HEX3Atmp_464714 = 0;
    nimln(168, "ccgutils.nim");
    nimln(168, "ccgutils.nim");
    nimln(168, "ccgutils.nim");
    TMP6200 = subInt(s->Sup.len, 1);
    HEX3Atmp_464714 = (NI64)(TMP6200);
    nimln(1450, "system.nim");
    res_464716 = 0;
    nimln(1451, "system.nim");
    while (1) {
        nimln(1451, "system.nim");
        if (!(res_464716 <= HEX3Atmp_464714)) goto LA1;
        nimln(1450, "system.nim");
        i_464702 = res_464716;
        nimln(169, "ccgutils.nim");
        {
            NI TMP6201;
            NI TMP6202;
            trope144007* LOC6;
            nimln(169, "ccgutils.nim");
            nimln(169, "ccgutils.nim");
            nimln(169, "ccgutils.nim");
            TMP6201 = addInt(i_464702, 1);
            TMP6202 = modInt((NI64)(TMP6201), 64);
            if (!(((NI) ((NI64)(TMP6202))) == 0)) goto LA4;
            nimln(170, "ccgutils.nim");
            nimln(170, "ccgutils.nim");
            LOC6 = 0;
            LOC6 = torope_144058(res);
            app_144040(&result, LOC6);
            nimln(171, "ccgutils.nim");
            res = setLengthStr(res, 0);
        }
LA4:
        ;
        nimln(172, "ccgutils.nim");
        if ((NU)(i_464702) > (NU)(s->Sup.len)) raiseIndexError();
        switch (((NU8)(s->data[i_464702]))) {
        case 0 ... 31:
        case 128 ... 255:
        case 34:
        case 92:
        {
            NimStringDesc* LOC8;
            nimln(174, "ccgutils.nim");
            res = addChar(res, 92);
            nimln(175, "ccgutils.nim");
            nimln(175, "ccgutils.nim");
            nimln(175, "ccgutils.nim");
            if ((NU)(i_464702) > (NU)(s->Sup.len)) raiseIndexError();
            LOC8 = 0;
            LOC8 = nsuToHex(((NI64) (((NU8)(s->data[i_464702])))), 2);
            res = resizeString(res, LOC8->Sup.len + 0);
            appendString(res, LOC8);
        }
        break;
        default:
        {
            nimln(176, "ccgutils.nim");
            if ((NU)(i_464702) > (NU)(s->Sup.len)) raiseIndexError();
            res = addChar(res, s->data[i_464702]);
        }
        break;
        }
        nimln(1453, "system.nim");
        res_464716 = addInt(res_464716, 1);
    }
LA1:
    ;
    nimln(177, "ccgutils.nim");
    res = resizeString(res, 4);
    appendString(res, ((NimStringDesc*) &TMP6203));
    nimln(178, "ccgutils.nim");
    nimln(178, "ccgutils.nim");
    LOC10 = 0;
    LOC10 = torope_144058(res);
    app_144040(&result, LOC10);
    popFrame();
    return result;
}
开发者ID:reactormonk,项目名称:csources,代码行数:95,代码来源:ccgutils.c



注:本文中的setLengthStr函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setLevel函数代码示例发布时间:2022-05-30
下一篇:
C++ setLeft函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap