亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tinystr.cpp

?? sigmadesign smp8623 gui source code ,bingo
?? CPP
字號:
/*www.sourceforge.net/projects/tinyxmlOriginal file by Yves Berquin.This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.2. Altered source versions must be plainly marked as such, andmust not be misrepresented as being the original software.3. This notice may not be removed or altered from any source distribution.*//**  @file   tinystr.cpp    @modified by Raul Chirinos  @date   2004-08-26    Changes:    - Replaced string.h routines for their RMF equivalents  - Replaced character buffer allocations with RMMalloc  - Replaced ctype.h routines with macro equivalents not to use locale    since this support is removed from ucLinux  - Introduced use of a fixed string buffer. If string to allocate fits    in the fixed buffer this buffer will be used and no allocation will be made.    This was done because releasing the large amount of strings causes a long delay    in ucLinux.*/#include "tinyxml.h"#ifndef TIXML_USE_STL#include <stdlib.h>#include <string.h>//#include <ctype.h>#include "tinystr.h"//#define RMALLOC_DEBUG#ifdef RMALLOC_DEBUGstatic RMuint32 g_bAllocated = 0;static RMuint32 g_nAllocated = 0;static RMuint16 g_maxsize = 0;static RMuint32 g_fixed = 0;#endif// TiXmlString constructor, based on a C stringTiXmlString::TiXmlString (const char* instring){	unsigned newlen;	allocated = 0;	cstring = NULL;	current_length = 0;	fixed = 0;	buffer[0] = 0;	if (!instring)		return;		newlen = strlen (instring) + 1;	//newstring = new char [newlen];	[RC changed]	if(newlen < TINY_FIXED_BUFFER){#ifdef RMALLOC_DEBUG//		printf("less than buffer %ld\n", ++g_fixed);#endif		memcpy (buffer, instring, newlen);		fixed = newlen;		current_length = newlen - 1;		return;	}		// proceed to allocate	char * newstring;	newstring = (RMascii*)MALLOC(newlen);//////////////////////////////////////////////////////#ifdef RMALLOC_DEBUG	g_bAllocated += newlen;	RMbool changed = FALSE;	if(newlen > g_maxsize){		g_maxsize = newlen;		changed = TRUE;	}    	++g_nAllocated;	if(changed)		printf("1....count %ld max %d\n", g_nAllocated, g_maxsize);#endif//////////////////////////////////////////////////////	memcpy (newstring, instring, newlen);	// strcpy (newstring, instring);	allocated = newlen;	cstring = newstring;	current_length = newlen - 1;}// TiXmlString copy constructorTiXmlString::TiXmlString (const TiXmlString& copy){	unsigned newlen;	// Prevent copy to self!	if ( &copy == this )		return;	allocated = 0;	cstring = NULL;	current_length = 0;	fixed = 0;	buffer[0] = 0;	if (copy.allocated){		char * newstring;		newlen = copy.length () + 1;		newstring = (RMascii*)MALLOC(newlen);//new char [newlen];/////////////////////////////////////////////////#ifdef RMALLOC_DEBUG		g_bAllocated += newlen;		RMbool changed = FALSE;		if(newlen > g_maxsize){			g_maxsize = newlen;			changed = TRUE;		}		++g_nAllocated;		if(changed)			printf("2.....count %ld max %d\n", g_nAllocated, g_maxsize);#endif/////////////////////////////////////////////////		// strcpy (newstring, copy . cstring);		memcpy (newstring, copy.cstring, newlen);		allocated = newlen;		cstring = newstring;		current_length = newlen - 1;		return;	}	else if(copy.fixed){		memcpy (buffer, copy.buffer, newlen);		fixed = newlen;		current_length = newlen - 1;	}	}// TiXmlString = operator. Safe when assign own contentvoid TiXmlString ::operator = (const char * content){	unsigned newlen;	if (! content || content == ""){		empty_it ();		return;	}			newlen = strlen (content) + 1;	if(newlen < TINY_FIXED_BUFFER){#ifdef RMALLOC_DEBUG//		printf("less than buffer %ld\n", ++g_fixed);#endif		empty_it();		memcpy (buffer, content, newlen);		fixed = newlen;		current_length = newlen -1;		return;	}		// proceed to allocate	char * newstring;	newstring = (RMascii*)MALLOC(newlen);//new char [newlen];	/////////////////////////////////////////////////#ifdef RMALLOC_DEBUG	g_bAllocated += newlen;	RMbool changed = FALSE;	if(newlen > g_maxsize){		g_maxsize = newlen;		changed = TRUE;	}	++g_nAllocated;	if(changed)		printf("3.....count %ld max %d\n", g_nAllocated, g_maxsize);#endif////////////////////////////////////////////////	// strcpy (newstring, content);	memcpy (newstring, content, newlen);	empty_it ();	allocated = newlen;	cstring = newstring;	current_length = newlen - 1;}// = operator. Safe when assign own contentvoid TiXmlString ::operator = (const TiXmlString & copy){	unsigned newlen;	if (! copy.length ()){		empty_it ();		return;	}	newlen = copy.length () + 1;	if(newlen < TINY_FIXED_BUFFER){#ifdef RMALLOC_DEBUG//		printf("less than buffer %ld\n", ++g_fixed);#endif		empty_it();		memcpy (buffer, copy.c_str(), newlen);		fixed = newlen;		current_length = newlen - 1;		return;	}		// proceed to allocate	char * newstring;	newstring = (RMascii*)MALLOC(newlen);//new char [newlen];////////////////////////////////////////////////#ifdef RMALLOC_DEBUG	g_bAllocated += newlen;	RMbool changed = FALSE;	if(newlen > g_maxsize){		g_maxsize = newlen;		changed = TRUE;	}	++g_nAllocated;	if(changed)		printf("4......count %ld max %d\n", g_nAllocated, g_maxsize);#endif/////////////////////////////////////////////////	// strcpy (newstring, copy . c_str ());	memcpy (newstring, copy.c_str(), newlen);	empty_it();	allocated = newlen;	cstring = newstring;	current_length = newlen - 1;}// append a const char * to an existing TiXmlStringvoid TiXmlString::append( const char* str, int len ){	unsigned new_alloc, new_size, size_suffix;		// don't use strlen - it can overrun the len passed in!	const char* p = str;	size_suffix = 0;	while ( *p && size_suffix < (unsigned)len ){		++p;		++size_suffix;	}	if ( !size_suffix)        	return;	new_size = length () + size_suffix + 1;		// check if we can use the fixed buffer	if(new_size < TINY_FIXED_BUFFER && allocated == 0){#ifdef RMALLOC_DEBUG//		printf("less than buffer %ld\n", ++g_fixed);#endif		// compute new size		new_alloc = assign_new_size (new_size);				// set buffer		// append the suffix. It does exist, otherwize we wouldn't be expanding 		// strncat (new_string, str, len);		memcpy (buffer + length (), str, size_suffix);		// update member variables		fixed = new_size;		current_length = new_size - 1;		buffer[current_length] = 0;		return;	}			// proceed to allocate (if necessary)			// check if we need to expand	if (new_size > allocated){		// compute new size		new_alloc = assign_new_size (new_size);				char * new_string;				new_string = (RMascii*)MALLOC(new_alloc);//new char [new_alloc];		//////////////////////////////////////////////////#ifdef RMALLOC_DEBUG		g_bAllocated += new_alloc;		RMbool changed = FALSE;		if(new_alloc > g_maxsize){			g_maxsize = new_alloc;			changed = TRUE;		}		++g_nAllocated;		if(changed)			printf("5......count %ld max %d\n", g_nAllocated, g_maxsize);#endif/////////////////////////////////////////////////		new_string [0] = 0;		// copy the previous allocated buffer into this one		if (allocated && cstring)			// strcpy (new_string, cstring);			memcpy (new_string, cstring, length ());		else{			// see it we were using fixed buffer and switch			if(fixed > 0)				memcpy(new_string, buffer, length());					}				// append the suffix. It does exist, otherwize we wouldn't be expanding 		// strncat (new_string, str, len);		memcpy (new_string + length (), str, size_suffix);		// return previsously allocated buffer if any		if (allocated && cstring)			//delete [] cstring;			RFREE(cstring);		// update member variables		cstring = new_string;		allocated = new_alloc;		fixed = 0,		buffer[0] = 0;			}	else{	        // we know we can safely append the new string        	// strncat (cstring, str, len);	        memcpy (cstring + length (), str, size_suffix);	}		current_length = new_size - 1;	cstring [current_length] = 0;}// append a const char * to an existing TiXmlStringvoid TiXmlString::append( const char * suffix ){	char * new_string;	unsigned new_alloc, new_size;	new_size = length () + strlen (suffix) + 1;		// check if we can use the fixed buffer	if(new_size < TINY_FIXED_BUFFER && allocated == 0){#ifdef RMALLOC_DEBUG//		printf("less than buffer %ld\n", ++g_fixed);#endif	        // compute new size        	new_alloc = assign_new_size (new_size);		// append the suffix. It does exist, otherwize we wouldn't be expanding 		// strcat (new_string, suffix);		memcpy(buffer + length (), suffix, strlen (suffix) + 1);		// update member variables		fixed = new_size;		current_length = new_size - 1;		return;	}		// proceed to allocate (if necessary)	// check if we need to expand	if (new_size > allocated){	        // compute new size        	new_alloc = assign_new_size (new_size);	        // allocate new buffer        	new_string = (RMascii*)MALLOC(new_alloc);//new char [new_alloc];//////////////////////////////////////////////////#ifdef RMALLOC_DEBUG		g_bAllocated += new_alloc;		RMbool changed = FALSE;		if(new_alloc > g_maxsize){			g_maxsize = new_alloc;			changed = TRUE;		}		++g_nAllocated;		if(changed)			printf("6.......count %ld max %d\n", g_nAllocated, g_maxsize);#endif/////////////////////////////////////////////////        			new_string [0] = 0;		// copy the previous allocated buffer into this one		if (allocated && cstring)			memcpy (new_string, cstring, 1 + length ());		else{			// see it we were using fixed buffer and switch			if(fixed > 0)				memcpy(new_string, buffer, 1 + length());		}				// strcpy (new_string, cstring);		// append the suffix. It does exist, otherwise we wouldn't be expanding 		// strcat (new_string, suffix);		memcpy (new_string + length (), suffix, strlen (suffix) + 1);	        // return previsously allocated buffer if any        	if (allocated && cstring)			//delete [] cstring;			RFREE(cstring);		// update member variables		cstring = new_string;		allocated = new_alloc;		fixed = 0,		buffer[0] = 0;			}	else{		// we know we can safely append the new string		// strcat (cstring, suffix);		memcpy (cstring + length (), suffix, strlen (suffix) + 1);	}		current_length = new_size - 1;}// Check for TiXmlString equuivalence//bool TiXmlString::operator == (const TiXmlString & compare) const//{//    return (! strcmp (c_str (), compare . c_str ()));//}//unsigned TiXmlString::length () const//{//    if (allocated)//        // return strlen (cstring);//        return current_length;//    return 0;//}unsigned TiXmlString::find (char tofind, unsigned offset) const{	char * lookup;	if (offset >= length ())		return (unsigned) notfound;		if(allocated){		for (lookup = cstring + offset; * lookup; lookup++)			if (* lookup == tofind)				return lookup - cstring;	}	else{		for (lookup = (char*)buffer + offset; * lookup; lookup++)			if (* lookup == tofind)				return lookup - buffer;	}	return (unsigned) notfound;}bool TiXmlString::operator == (const TiXmlString & compare) const{	if ( allocated && compare.allocated )	{		assert( cstring );		assert( compare.cstring );		//return ( strcmp( cstring, compare.cstring ) == 0 );		return ( RMCompareAscii( cstring, compare.cstring ));	}	else if(fixed && compare.fixed){		//assert( buffer[0] );		//assert( compare.buffer[0] );		//return ( strcmp( cstring, compare.cstring ) == 0 );		return ( RMCompareAscii( buffer, compare.buffer ));	}	return false;}bool TiXmlString::operator < (const TiXmlString & compare) const{	if ( allocated && compare.allocated )	{		assert( cstring );		assert( compare.cstring );		return ( strcmp( cstring, compare.cstring ) > 0 ); 	}	else if ( fixed && compare.fixed )	{		//assert( buffer[0] );		//assert( compare.buffer[0] );		return ( strcmp( buffer, compare.buffer ) > 0 ); 	}	return false;}bool TiXmlString::operator > (const TiXmlString & compare) const{	if ( allocated && compare.allocated )	{		assert( cstring );		assert( compare.cstring );		return ( strcmp( cstring, compare.cstring ) < 0 ); 	}	else if ( fixed && compare.fixed )	{		assert( buffer[0] );		assert( compare.buffer[0] );		return ( strcmp( buffer, compare.buffer ) < 0 ); 	}	return false;}#endif	// TIXML_USE_STL

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产123区| 91极品视觉盛宴| 久久九九久精品国产免费直播| 老司机精品视频线观看86| 欧美电影免费观看高清完整版在线观看| 日韩专区在线视频| 欧美va天堂va视频va在线| 国产999精品久久久久久绿帽| 国产精品入口麻豆原神| 色婷婷综合久久久中文字幕| 石原莉奈在线亚洲二区| 久久久久久亚洲综合影院红桃| 福利一区福利二区| 亚洲精品免费视频| 欧美一级在线观看| 丰满少妇在线播放bd日韩电影| 亚洲综合丝袜美腿| 欧美电视剧在线观看完整版| 成人精品小蝌蚪| 亚洲国产色一区| 精品国产乱码久久| 色系网站成人免费| 国产一区三区三区| 一区二区三区精品久久久| 日韩欧美aaaaaa| eeuss鲁片一区二区三区在线观看| 亚洲综合一区二区精品导航| www激情久久| 欧美影院精品一区| 成人午夜精品在线| 天天综合日日夜夜精品| 欧美国产97人人爽人人喊| 欧美日韩中文字幕精品| 国产成人午夜99999| 亚洲成人免费看| 国产精品久久久久久久久免费丝袜| 51午夜精品国产| 99久久久精品| 国产精品影音先锋| 青青草91视频| 亚洲一区二区三区在线播放| 国产日韩欧美综合一区| 欧美丰满一区二区免费视频 | 中国色在线观看另类| 欧美性xxxxxx少妇| 99久久免费精品高清特色大片| 狠狠色狠狠色综合系列| 五月天欧美精品| 亚洲免费av高清| 中文字幕一区二区不卡| 精品免费日韩av| 日韩一级黄色片| 欧美三电影在线| 色综合久久久久综合| 国产麻豆精品一区二区| 久久超级碰视频| 日日骚欧美日韩| 亚洲成年人影院| 亚洲午夜一区二区| 亚洲欧洲日韩一区二区三区| 2021中文字幕一区亚洲| 91精品国产高清一区二区三区蜜臀| 一道本成人在线| 91性感美女视频| 色综合久久综合网欧美综合网| 粉嫩av一区二区三区粉嫩| 国产成人综合网站| 国产一区视频导航| 国产精品亚洲成人| 国内久久婷婷综合| 国内精品伊人久久久久av影院| 麻豆成人免费电影| 日产精品久久久久久久性色| 日韩精品一二区| 蜜臀av性久久久久蜜臀aⅴ流畅| 性做久久久久久免费观看欧美| 亚洲综合成人网| 亚洲午夜久久久久久久久电影院| 亚洲精品免费在线| 香蕉久久一区二区不卡无毒影院 | 成人av网站在线观看| 成人免费毛片嘿嘿连载视频| 岛国av在线一区| 99久久99精品久久久久久 | 国产乱码精品一品二品| 久久不见久久见免费视频7| 精品制服美女久久| 国产精品自在欧美一区| 成人黄色小视频在线观看| 国产91丝袜在线18| 色系网站成人免费| 91麻豆精品久久久久蜜臀| 欧美日韩高清一区| 久久日韩精品一区二区五区| 日本一区二区三区高清不卡| 亚洲欧美日韩国产手机在线 | 日韩精品在线看片z| 91精品婷婷国产综合久久性色 | 国产欧美一区在线| 亚洲欧洲成人av每日更新| 亚洲综合丝袜美腿| 久色婷婷小香蕉久久| 懂色av一区二区夜夜嗨| 91久久精品一区二区三| 日韩一区二区中文字幕| 国产精品丝袜一区| 亚洲国产毛片aaaaa无费看| 美女视频黄 久久| 成人午夜在线播放| 欧美日本在线播放| 国产精品人妖ts系列视频| 亚洲午夜在线视频| 国精品**一区二区三区在线蜜桃| 不卡一区二区三区四区| 91精品国产乱码| 亚洲日本乱码在线观看| 麻豆久久久久久久| 91免费国产视频网站| 日韩欧美中文字幕精品| 亚洲人成在线观看一区二区| 日韩电影免费一区| 91蜜桃视频在线| 精品国精品国产尤物美女| 亚洲免费毛片网站| 久久 天天综合| 欧美日韩国产一区二区三区地区| 2023国产一二三区日本精品2022| 亚洲视频在线一区观看| 国产真实精品久久二三区| 在线观看区一区二| 中文字幕欧美激情一区| 另类调教123区 | 777xxx欧美| 中文字幕一区三区| 黑人巨大精品欧美黑白配亚洲| 一区精品在线播放| 91丨九色丨黑人外教| 99re成人在线| 欧美一区二区三区在线电影| 亚洲人精品午夜| 午夜精品福利一区二区蜜股av| 国产不卡一区视频| 高清成人免费视频| 国产欧美日韩在线观看| 粗大黑人巨茎大战欧美成人| 国产精品免费aⅴ片在线观看| 成人美女视频在线观看| 亚洲欧洲av另类| 欧美日韩一级二级三级| 奇米在线7777在线精品| 精品99久久久久久| 成人性生交大片免费看中文 | av中文字幕一区| 亚洲丝袜自拍清纯另类| 欧美调教femdomvk| 婷婷国产在线综合| 欧美成人欧美edvon| 国产v综合v亚洲欧| 亚洲视频你懂的| 欧美午夜理伦三级在线观看| 日韩成人dvd| 久久久亚洲精品一区二区三区| aaa亚洲精品一二三区| 亚洲一区免费视频| 精品少妇一区二区三区视频免付费| 国产精品一品视频| 亚洲综合在线五月| 日韩欧美久久久| 成人av手机在线观看| 视频一区二区中文字幕| 国产欧美精品区一区二区三区| 91网站视频在线观看| 日韩和欧美一区二区三区| 精品国产亚洲在线| 91日韩精品一区| 久久99久久99| 亚洲精品高清在线| 日韩免费成人网| 91亚洲资源网| 精品综合免费视频观看| 一区二区三区四区中文字幕| 日韩一区二区在线播放| 91啪亚洲精品| 国产一区二区伦理片| 亚洲妇熟xx妇色黄| 国产日韩欧美一区二区三区乱码| 在线免费不卡视频| 国产激情偷乱视频一区二区三区| 亚洲成av人片| 亚洲欧洲国产日韩| 亚洲精品一区二区三区精华液| 91福利在线导航| 成人黄色电影在线| 精品亚洲成a人| 天天色综合天天| 亚洲欧美一区二区不卡| 久久久91精品国产一区二区精品| 欧美日本一区二区三区四区 | 91黄色免费观看| 国产黄色精品网站|