Example #1
0
void FAMGWrite(ostrstream &OutputString)
{
#ifdef UG_DRAW
	ostrstream ostr(testf,FAMG_IOBUFFFER_LEN);
	
	assert(OutputString.pcount()<FAMG_IOBUFFFER_LEN);
	ostr << OutputString.rdbuf() << '\0';
	UserWrite( ostr.str() );
#else	
	#ifdef ModelP
		cout << me << ": ";
	#endif
	cout << OutputString.rdbuf() << flush;
#endif
}
void
War2Wiz::SendMessage
	(
	const JIndex	playerIndex,
	const JIndex	id,
	ostrstream&		data
	)
{
	data << ends;
	SendMessage(playerIndex, id, data.str());
	JUnfreeze(data);
}
			{
			if (value & 0x01)
				{
				toValue.PrependCharacter('1');
				}
			else
				{
				toValue.PrependCharacter('0');
				}
			value = value >> 1;
			}
			while (value != 0);
		}
	else
		{
		ostrstream s;
		s << setbase(toBase) << value << ends;
		toValue = s.str();
		JUnfreeze(s);
		}

	if (toBase == 16)
		{
		toValue.ToUpper();
		toValue.Prepend("0x");
		}

	itsToValue->SetText(toValue);
	itsToValue->SelectAll();
}