ICU-720 expose a name comparison function for converter names

X-SVN-Rev: 2934
This commit is contained in:
Yves Arrouye 2000-11-17 06:07:31 +00:00
parent 39bfde178b
commit 4d4bedd303
3 changed files with 6 additions and 6 deletions

View File

@ -208,7 +208,7 @@ static int16_t getTagNumber(const char *tagname) {
* lexically follows name2.
*/
U_CAPI int U_EXPORT2
ucnv_aliasNameCmp(const char *name1, const char *name2) {
ucnv_compareNames(const char *name1, const char *name2) {
int rc;
unsigned char c1, c2;
@ -261,7 +261,7 @@ findAlias(const char *alias) {
start=0;
while(start<limit-1) {
i=(uint16_t)((start+limit)/2);
if(ucnv_aliasNameCmp(name, (const char *)aliasTable+p[i])<0) {
if(ucnv_compareNames(name, (const char *)aliasTable+p[i])<0) {
limit=i;
} else {
start=i;
@ -269,7 +269,7 @@ findAlias(const char *alias) {
}
/* did we really find it? */
if(ucnv_aliasNameCmp(name, (const char *)aliasTable+p[start])==0) {
if(ucnv_compareNames(name, (const char *)aliasTable+p[start])==0) {
limit=*(p-1); /* aliasCount */
p+=limit; /* advance to the second column of the alias table */
i=p[start]; /* converter index */

View File

@ -136,7 +136,7 @@ U_CDECL_END
* lexically follows name2.
*/
U_CAPI int U_EXPORT2
ucnv_aliasNameCmp(const char *name1, const char *name2);
ucnv_compareNames(const char *name1, const char *name2);
/**

View File

@ -26,7 +26,7 @@
#include <stdlib.h>
#include <ctype.h>
#include "unicode/utypes.h"
#include "unicode/ucnv.h" /* ucnv_aliasNameCmp() */
#include "unicode/ucnv.h" /* ucnv_compareNames() */
#include "cmemory.h"
#include "cstring.h"
#include "filestrm.h"
@ -488,7 +488,7 @@ allocString(StringBlock *block, uint32_t length) {
static int
compareAliases(const void *alias1, const void *alias2) {
return ucnv_aliasNameCmp(((Alias*)alias1)->alias, ((Alias*)alias2)->alias);
return ucnv_compareNames(((Alias*)alias1)->alias, ((Alias*)alias2)->alias);
}
/*