2009-04-05 Bruno Haible <bruno@clisp.org>
+ * lib/unicase.h: Mention u*_cmp2.
+ * lib/unicase/u-casecmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
+ * lib/unicase/u8-casecmp.c: Use u8_cmp2 instead of u8_cmp.
+ * lib/unicase/ulc-casecmp.c: Likewise.
+ * lib/unicase/u16-casecmp.c: Use u16_cmp2 instead of u16_cmp.
+ * lib/unicase/u32-casecmp.c: Use u32_cmp2 instead of u32_cmp.
+ * modules/unicase/u8-casecmp (Depends-on): Add unistr/u8-cmp2, remove
+ unistr/u8-cmp.
+ * modules/unicase/ulc-casecmp (Depends-on): Likewise.
+ * modules/unicase/u16-casecmp (Depends-on): Add unistr/u16-cmp2, remove
+ unistr/u16-cmp.
+ * modules/unicase/u32-casecmp (Depends-on): Add unistr/u32-cmp2, remove
+ unistr/u32-cmp.
+
* lib/uninorm.h: Mention u*_cmp2.
* lib/uninorm/u-normcmp.h (FUNC): Invoke U_CMP2 instead of U_CMP.
* lib/uninorm/u8-normcmp.c: Use u8_cmp2 instead of u8_cmp.
const char *iso639_language, uninorm_t nf, int *resultp);
/* Converts the string S of length N to a string in locale encoding, in such a
- way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with memcmp2() is
+ way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with uN_cmp2() is
equivalent to comparing S1 and S2 with uN_casecoll().
NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization. */
extern char *
}
/* Compare the normalized strings. */
- cmp = U_CMP (norms1, norms2, MIN (norms1_length, norms2_length));
- if (cmp == 0)
- {
- if (norms1_length < norms2_length)
- cmp = -1;
- else if (norms1_length > norms2_length)
- cmp = 1;
- }
- else if (cmp > 0)
+ cmp = U_CMP2 (norms1, norms1_length, norms2, norms2_length);
+ if (cmp > 0)
cmp = 1;
else if (cmp < 0)
cmp = -1;
#define UNIT uint16_t
#define SRC_UNIT uint16_t
#define U_CASEFOLD u16_casefold
-#define U_CMP u16_cmp
+#define U_CMP2 u16_cmp2
#include "u-casecmp.h"
#define UNIT uint32_t
#define SRC_UNIT uint32_t
#define U_CASEFOLD u32_casefold
-#define U_CMP u32_cmp
+#define U_CMP2 u32_cmp2
#include "u-casecmp.h"
#define UNIT uint8_t
#define SRC_UNIT uint8_t
#define U_CASEFOLD u8_casefold
-#define U_CMP u8_cmp
+#define U_CMP2 u8_cmp2
#include "u-casecmp.h"
#define UNIT uint8_t
#define SRC_UNIT char
#define U_CASEFOLD ulc_u8_casefold
-#define U_CMP u8_cmp
+#define U_CMP2 u8_cmp2
#include "u-casecmp.h"
unicase/base
unicase/u16-casefold
uninorm/decomposing-form
-unistr/u16-cmp
+unistr/u16-cmp2
minmax
configure.ac:
unicase/base
unicase/u32-casefold
uninorm/decomposing-form
-unistr/u32-cmp
+unistr/u32-cmp2
minmax
configure.ac:
unicase/base
unicase/u8-casefold
uninorm/decomposing-form
-unistr/u8-cmp
+unistr/u8-cmp2
minmax
configure.ac:
unicase/u8-casefold
uninorm/decomposing-form
uniconv/u8-conv-from-enc
-unistr/u8-cmp
+unistr/u8-cmp2
localcharset
minmax