コード例 #1
0
	bool skip()
	{
		pos++;
		if (pos >= buf.size())
		{
			if (ii >= NOF_TESTS)
			{
				pos = buf.size();
				return false;
			}
			else
			{
				buf.clear();
				unsigned int tt = character( ++ii, (unsigned int)CharSet::MaxChar);
				encoding.print( tt, buf);
				pos = 0;
			}
		}
		return true;
	}
コード例 #2
0
	inline void copychar( CharSet& output_, Buffer& buf_)
	{
		/// \remark a check if the character sets fulfill is_equal(..) (IsoLatin code page !)
		if (CharSet::is_equal( charset, output_))
		{
			// ... if the character sets are equal and of the same subclass (code pages)
			//	then we do not decode/encode the character but copy it directly to the output
			charset.fetchbytes( buf, state, input);
#ifdef __GNUC__
#if (__GNUC__ >= 5 && __GNUC_MINOR__ >= 0)
			for (unsigned int ii=0; ii<8 && ii<state; ++ii) buf_.push_back(buf[ii]);
#else
			for (unsigned int ii=0; ii<state; ++ii) buf_.push_back(buf[ii]);
#endif
#else
			for (unsigned int ii=0; ii<state; ++ii) buf_.push_back(buf[ii]);
#endif
		}
		else
		{
			output_.print( chr(), buf_);
		}
	}