[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new modules unistr/u{8,16,32}-cmp2

From: Bruno Haible
Subject: new modules unistr/u{8,16,32}-cmp2
Date: Sun, 5 Apr 2009 13:04:04 +0200
User-agent: KMail/1.9.9

I'm adding new modules for comparison of Unicode strings, similar to memcmp2.

2009-04-05  Bruno Haible  <address@hidden>

        * 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
        * modules/unicase/ulc-casecmp (Depends-on): Likewise.
        * modules/unicase/u16-casecmp (Depends-on): Add unistr/u16-cmp2, remove
        * modules/unicase/u32-casecmp (Depends-on): Add unistr/u32-cmp2, remove

        * 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.
        * lib/uninorm/u16-normcmp.c: Use u16_cmp2 instead of u16_cmp.
        * lib/uninorm/u32-normcmp.c: Use u32_cmp2 instead of u32_cmp.
        * modules/uninorm/u8-normcmp (Depends-on): Add unistr/u8-cmp2, remove
        * modules/uninorm/u16-normcmp (Depends-on): Add unistr/u16-cmp2, remove
        * modules/uninorm/u32-normcmp (Depends-on): Add unistr/u32-cmp2, remove

        New module 'unistr/u32-cmp2'.
        * lib/unistr/u32-cmp2.c: New file.
        * modules/unistr/u32-cmp2: New file.

        New module 'unistr/u16-cmp2'.
        * lib/unistr/u16-cmp2.c: New file.
        * modules/unistr/u16-cmp2: New file.

        New module 'unistr/u8-cmp2'.
        * lib/unistr.h (u8_cmp2, u16_cmp2, u32_cmp2): New declarations.
        * lib/unistr/u8-cmp2.c: New file.
        * lib/unistr/u-cmp2.h: New file.
        * modules/unistr/u8-cmp2: New file.

--- lib/unistr.h.orig   2009-04-05 12:33:50.000000000 +0200
+++ lib/unistr.h        2009-04-05 12:22:17.000000000 +0200
@@ -402,6 +402,15 @@
 extern int
        u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n);
+/* Compare S1 and S2.  */
+/* Similar to memcmp2().  */
+extern int
+       u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2);
+extern int
+       u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2);
+extern int
+       u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2);
 /* Search the string at S for UC.  */
 /* Similar to memchr().  */
 extern uint8_t *

reply via email to

[Prev in Thread] Current Thread [Next in Thread]