Esempio n. 1
0
string EncodeLong( const CAtomLong &x )
{
	char pBuf[128];

	memset( pBuf, 0, sizeof( char ) * 128 );

#if defined( WIN32 )
	sprintf( pBuf, "%I64d", x.getValue( ) );
#elif defined( FreeBSD )
	sprintf( pBuf, "%qd", x.getValue( ) );
#else
	sprintf( pBuf, "%lld", x.getValue( ) );
#endif

	string strDest;

	strDest += "i";
	strDest += pBuf;
	strDest += "e";

	return strDest;
}
Esempio n. 2
0
string EncodeLong( const CAtomLong &x )
{
	char pBuf[128];

	memset( pBuf, 0, sizeof( pBuf ) / sizeof( char ) );

#if defined( WIN32 )
	snprintf( pBuf, sizeof( pBuf ) / sizeof( char ), "%I64d", x.getValue( ) );
#elif defined( __FREEBSD__ ) || defined( __OPENBSD__ ) || defined( __NETBSD__ )
	snprintf( pBuf, sizeof( pBuf ) / sizeof( char ), "%qd", x.getValue( ) );
#else
	snprintf( pBuf, sizeof( pBuf ) / sizeof( char ), "%lld", x.getValue( ) );
#endif

	string strDest;

	strDest += "i";
	strDest += pBuf;
	strDest += "e";

	return strDest;
}
Esempio n. 3
0
CAtomLong :: CAtomLong( const CAtomLong &c )
{
	// copy constructor

	setValue( c.getValue( ) );
}