#include "ace/Codeset_Registry.h"#include "ace/OS_Memory.h"#include "ace/OS_NS_string.h"
Go to the source code of this file.
Functions | |
| ACE_RCSID (ace, Codeset_Registry,"$Id: Codeset_Registry.cpp 76691 2007-01-29 19:50:57Z johnnyw $") 1 int ACE_Codeset_Registry | |
emulated codset regstry functions
Definition in file Codeset_Registry.cpp.
| ACE_RCSID | ( | ace | , | |
| Codeset_Registry | , | |||
| "$Id: Codeset_Registry.cpp 76691 2007-01-29 19:50:57Z johnnyw $" | ||||
| ) |
Definition at line 24 of file Codeset_Registry.cpp.
00026 : Codeset_Registry.cpp 76691 2007-01-29 19:50:57Z johnnyw $") 00027 00028 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00029 00030 int 00031 ACE_Codeset_Registry::locale_to_registry_i (const ACE_CString &locale, 00032 ACE_CDR::ULong &codeset_id, 00033 ACE_CDR::UShort *num_sets, 00034 ACE_CDR::UShort **char_sets) 00035 { 00036 registry_entry const *element = 0; 00037 for (size_t i = 0; element == 0 && i < num_registry_entries_; i++) 00038 if (ACE_OS::strcmp (registry_db_[i].loc_name_, locale.c_str ()) == 0) 00039 element = ®istry_db_[i]; 00040 if (element == 0) 00041 return 0; 00042 codeset_id = element->codeset_id_; 00043 if (num_sets != 0) 00044 *num_sets = element->num_sets_; 00045 if (char_sets != 0) 00046 { 00047 ACE_NEW_RETURN (*char_sets,ACE_CDR::UShort[element->num_sets_],0); 00048 ACE_OS::memcpy (*char_sets, element->char_sets_, 00049 element->num_sets_ * sizeof (ACE_CDR::UShort)); 00050 } 00051 return 1; 00052 }
1.6.1