*Backed out changeset 3be01fb200a5
--HG-- branch : trunk
This commit is contained in:
@@ -10,17 +10,23 @@
|
||||
* @author Phil Mesnier <[email protected]>
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
#include "ace/Codeset_Registry.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
#include "ace/OS_NS_string.h"
|
||||
|
||||
// $Id: Codeset_Registry.cpp 80826 2008-03-04 14:51:23Z wotte $
|
||||
|
||||
#if !defined (__ACE_INLINE__)
|
||||
#include "ace/Codeset_Registry.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
ACE_RCSID (ace,
|
||||
Codeset_Registry,
|
||||
"$Id: Codeset_Registry.cpp 80826 2008-03-04 14:51:23Z wotte $")
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
int
|
||||
ACE_Codeset_Registry::locale_to_registry_i (const ACE_CString &locale,
|
||||
ACE_CDR::ULong &codeset_id,
|
||||
@@ -44,6 +50,7 @@ ACE_Codeset_Registry::locale_to_registry_i (const ACE_CString &locale,
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
ACE_Codeset_Registry::registry_to_locale_i (ACE_CDR::ULong codeset_id,
|
||||
ACE_CString &locale,
|
||||
@@ -67,6 +74,7 @@ ACE_Codeset_Registry::registry_to_locale_i (ACE_CDR::ULong codeset_id,
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
ACE_Codeset_Registry::is_compatible_i (ACE_CDR::ULong codeset_id,
|
||||
ACE_CDR::ULong other)
|
||||
@@ -80,14 +88,17 @@ ACE_Codeset_Registry::is_compatible_i (ACE_CDR::ULong codeset_id,
|
||||
if (other == registry_db_[i].codeset_id_)
|
||||
rhs = ®istry_db_[i];
|
||||
}
|
||||
|
||||
if (lhs == 0 || rhs == 0)
|
||||
return 0;
|
||||
|
||||
for (ACE_CDR::UShort l = 0; l < lhs->num_sets_; l++)
|
||||
for (ACE_CDR::UShort r = 0; r < rhs->num_sets_; r++)
|
||||
if (rhs->char_sets_[r] == lhs->char_sets_[l])
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ACE_CDR::Short
|
||||
ACE_Codeset_Registry::get_max_bytes_i (ACE_CDR::ULong codeset_id)
|
||||
{
|
||||
@@ -96,5 +107,6 @@ ACE_Codeset_Registry::get_max_bytes_i (ACE_CDR::ULong codeset_id)
|
||||
return registry_db_[i].max_bytes_;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user