mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Some missing from merge.
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
ec939a5bce
commit
f4be15a7af
1895 changed files with 160408 additions and 53601 deletions
|
|
@ -3,9 +3,12 @@
|
|||
/**
|
||||
* @file Codeset_IBM1047.cpp
|
||||
*
|
||||
* $Id: Codeset_IBM1047.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
*
|
||||
* Defines the arrays required to convert between ISO8859 (aka
|
||||
* Latin/1) and IBM1047 (aka EBCDIC).
|
||||
*
|
||||
*
|
||||
* @author Jim Rogers (jrogers@viasoft.com)
|
||||
*/
|
||||
//=============================================================================
|
||||
|
|
@ -119,42 +122,6 @@ ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in,
|
|||
return 0;
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in,
|
||||
std::string & x)
|
||||
{
|
||||
#if defined (ACE_HAS_CPP11)
|
||||
ACE_CDR::ULong len;
|
||||
|
||||
in.read_ulong (len);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
x.resize (len);
|
||||
}
|
||||
catch (const std::bad_alloc&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->read_char_array (in, &x[0], len))
|
||||
{
|
||||
x.resize (len-1); // drop terminating '\0' read from stream
|
||||
return true;
|
||||
}
|
||||
|
||||
delete [] x;
|
||||
}
|
||||
|
||||
x.clear ();
|
||||
return false;
|
||||
#else
|
||||
return this->ACE_Char_Codeset_Translator::read_string (in, x);
|
||||
#endif
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_IBM1047_ISO8859::read_char_array (ACE_InputCDR& in,
|
||||
ACE_CDR::Char* x,
|
||||
|
|
@ -272,42 +239,6 @@ ACE_ISO8859_IBM1047::read_string (ACE_InputCDR &in,
|
|||
return 0;
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_ISO8859_IBM1047::read_string (ACE_InputCDR& in,
|
||||
std::string & x)
|
||||
{
|
||||
#if defined (ACE_HAS_CPP11)
|
||||
ACE_CDR::ULong len;
|
||||
|
||||
in.read_ulong (len);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
x.resize (len);
|
||||
}
|
||||
catch (const std::bad_alloc&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->read_char_array (in, &x[0], len))
|
||||
{
|
||||
x.resize (len-1); // drop terminating '\0' read from stream
|
||||
return true;
|
||||
}
|
||||
|
||||
delete [] x;
|
||||
}
|
||||
|
||||
x.clear ();
|
||||
return false;
|
||||
#else
|
||||
return this->ACE_Char_Codeset_Translator::read_string (in, x);
|
||||
#endif
|
||||
}
|
||||
|
||||
ACE_CDR::Boolean
|
||||
ACE_ISO8859_IBM1047::read_char_array (ACE_InputCDR &in,
|
||||
ACE_CDR::Char *x,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue