X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funigbrk.in.h;h=8335e5af7e9417e214940e460ac84426ca564008;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=6dda1ea115566e7fc93f5ef69dbaf80972a4fbb0;hpb=d599e5add275f75ed08e6527b8ee4d3f4f7c3aea;p=gnulib.git diff --git a/lib/unigbrk.in.h b/lib/unigbrk.in.h index 6dda1ea11..8335e5af7 100644 --- a/lib/unigbrk.in.h +++ b/lib/unigbrk.in.h @@ -1,5 +1,5 @@ /* Grapheme cluster breaks in Unicode strings. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. Written by Ben Pfaff , 2010. This program is free software: you can redistribute it and/or modify it @@ -56,13 +56,14 @@ enum /* Return the Grapheme_Cluster_Break property of a Unicode character. */ extern int - uc_graphemeclusterbreak_property (ucs4_t uc); + uc_graphemeclusterbreak_property (ucs4_t uc) + _UC_ATTRIBUTE_CONST; /* ========================================================================= */ /* Grapheme cluster breaks. */ -/* Returns true if there is an grapheme cluster boundary between Unicode code +/* Returns true if there is a grapheme cluster boundary between Unicode code points A and B. A "grapheme cluster" is an approximation to a user-perceived character, which sometimes corresponds to multiple code points. For example, an English letter followed by an acute accent can be @@ -76,25 +77,32 @@ extern int Use A == 0 or B == 0 to indicate start of text or end of text, respectively. */ extern bool - uc_is_grapheme_break (ucs4_t a, ucs4_t b); + uc_is_grapheme_break (ucs4_t a, ucs4_t b) + _UC_ATTRIBUTE_CONST; /* Returns the start of the next grapheme cluster following S, or NULL if the end of the string has been reached. */ extern const uint8_t * - u8_grapheme_next (const uint8_t *s, const uint8_t *end); + u8_grapheme_next (const uint8_t *s, const uint8_t *end) + _UC_ATTRIBUTE_PURE; extern const uint16_t * - u16_grapheme_next (const uint16_t *s, const uint16_t *end); + u16_grapheme_next (const uint16_t *s, const uint16_t *end) + _UC_ATTRIBUTE_PURE; extern const uint32_t * - u32_grapheme_next (const uint32_t *s, const uint32_t *end); + u32_grapheme_next (const uint32_t *s, const uint32_t *end) + _UC_ATTRIBUTE_PURE; /* Returns the start of the previous grapheme cluster before S, or NULL if the start of the string has been reached. */ extern const uint8_t * - u8_grapheme_prev (const uint8_t *s, const uint8_t *start); + u8_grapheme_prev (const uint8_t *s, const uint8_t *start) + _UC_ATTRIBUTE_PURE; extern const uint16_t * - u16_grapheme_prev (const uint16_t *s, const uint16_t *start); + u16_grapheme_prev (const uint16_t *s, const uint16_t *start) + _UC_ATTRIBUTE_PURE; extern const uint32_t * - u32_grapheme_prev (const uint32_t *s, const uint32_t *start); + u32_grapheme_prev (const uint32_t *s, const uint32_t *start) + _UC_ATTRIBUTE_PURE; /* Determine the grapheme cluster boundaries in S, and store the result at p[0..n-1]. p[i] = 1 means that a new grapheme cluster begins at s[i]. p[i]