iconveh.h   iconveh.h 
skipping to change at line 28 skipping to change at line 28
#ifndef _ICONVEH_H #ifndef _ICONVEH_H
#define _ICONVEH_H #define _ICONVEH_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Handling of unconvertible characters. */ /* Handling of unconvertible characters. */
enum iconv_ilseq_handler enum iconv_ilseq_handler
{ {
iconveh_error, /* return and set errno = EILSEQ */ iconveh_error, /* return and set errno = EILSEQ */
iconveh_question_mark, /* use one '?' per unconvertible character * iconveh_question_mark, /* use one '?' per unconvertible character
/ */
iconveh_escape_sequence /* use escape sequence \uxxxx or \Uxxxxxxxx iconveh_escape_sequence /* use escape sequence \uxxxx or \Uxxxxxxxx
*/ */
}; };
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _ICONVEH_H */ #endif /* _ICONVEH_H */
 End of changes. 1 change blocks. 
5 lines changed or deleted 5 lines changed or added


 unicase.h   unicase.h 
skipping to change at line 94 skipping to change at line 94
it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly
allocated string is returned. In both cases, *lengthp is set to the allocated string is returned. In both cases, *lengthp is set to the
length (number of units) of the returned string. In case of error, length (number of units) of the returned string. In case of error,
NULL is returned and errno is set. */ NULL is returned and errno is set. */
/* Return the uppercase mapping of a string. /* Return the uppercase mapping of a string.
The nf argument identifies the normalization form to apply after the The nf argument identifies the normalization form to apply after the
case-mapping. It can also be NULL, for no normalization. */ case-mapping. It can also be NULL, for no normalization. */
extern uint8_t * extern uint8_t *
u8_toupper (const uint8_t *s, size_t n, const char *iso639_language, u8_toupper (const uint8_t *s, size_t n, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_toupper (const uint16_t *s, size_t n, const char *iso639_languag e, u16_toupper (const uint16_t *s, size_t n, const char *iso639_languag e,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_toupper (const uint32_t *s, size_t n, const char *iso639_languag e, u32_toupper (const uint32_t *s, size_t n, const char *iso639_languag e,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Return the lowercase mapping of a string. /* Return the lowercase mapping of a string.
The nf argument identifies the normalization form to apply after the The nf argument identifies the normalization form to apply after the
case-mapping. It can also be NULL, for no normalization. */ case-mapping. It can also be NULL, for no normalization. */
extern uint8_t * extern uint8_t *
u8_tolower (const uint8_t *s, size_t n, const char *iso639_language, u8_tolower (const uint8_t *s, size_t n, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_tolower (const uint16_t *s, size_t n, const char *iso639_languag e, u16_tolower (const uint16_t *s, size_t n, const char *iso639_languag e,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_tolower (const uint32_t *s, size_t n, const char *iso639_languag e, u32_tolower (const uint32_t *s, size_t n, const char *iso639_languag e,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Return the titlecase mapping of a string. /* Return the titlecase mapping of a string.
The nf argument identifies the normalization form to apply after the The nf argument identifies the normalization form to apply after the
case-mapping. It can also be NULL, for no normalization. */ case-mapping. It can also be NULL, for no normalization. */
extern uint8_t * extern uint8_t *
u8_totitle (const uint8_t *s, size_t n, const char *iso639_language, u8_totitle (const uint8_t *s, size_t n, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_totitle (const uint16_t *s, size_t n, const char *iso639_languag e, u16_totitle (const uint16_t *s, size_t n, const char *iso639_languag e,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_totitle (const uint32_t *s, size_t n, const char *iso639_languag e, u32_totitle (const uint32_t *s, size_t n, const char *iso639_languag e,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* The case-mapping context given by a prefix string. */ /* The case-mapping context given by a prefix string. */
typedef struct casing_prefix_context typedef struct casing_prefix_context
{ {
/* These fields are private, undocumented. */ /* These fields are private, undocumented. */
uint32_t last_char_except_ignorable; uint32_t last_char_except_ignorable;
uint32_t last_char_normal_or_above; uint32_t last_char_normal_or_above;
} }
casing_prefix_context_t; casing_prefix_context_t;
/* The case-mapping context of the empty prefix string. */ /* The case-mapping context of the empty prefix string. */
extern LIBUNISTRING_DLL_VARIABLE const casing_prefix_context_t unicase_empt y_prefix_context; extern LIBUNISTRING_DLL_VARIABLE const casing_prefix_context_t unicase_empt y_prefix_context;
/* Return the case-mapping context of a given prefix string. */ /* Return the case-mapping context of a given prefix string. */
extern casing_prefix_context_t extern casing_prefix_context_t
u8_casing_prefix_context (const uint8_t *s, size_t n); u8_casing_prefix_context (const uint8_t *s, size_t n);
extern casing_prefix_context_t extern casing_prefix_context_t
u16_casing_prefix_context (const uint16_t *s, size_t n); u16_casing_prefix_context (const uint16_t *s, size_t n);
extern casing_prefix_context_t extern casing_prefix_context_t
u32_casing_prefix_context (const uint32_t *s, size_t n); u32_casing_prefix_context (const uint32_t *s, size_t n);
/* Return the case-mapping context of the prefix concat(A, S), given the /* Return the case-mapping context of the prefix concat(A, S), given the
case-mapping context of the prefix A. */ case-mapping context of the prefix A. */
extern casing_prefix_context_t extern casing_prefix_context_t
u8_casing_prefixes_context (const uint8_t *s, size_t n, u8_casing_prefixes_context (const uint8_t *s, size_t n,
casing_prefix_context_t a_context); casing_prefix_context_t a_context);
extern casing_prefix_context_t extern casing_prefix_context_t
u16_casing_prefixes_context (const uint16_t *s, size_t n, u16_casing_prefixes_context (const uint16_t *s, size_t n,
casing_prefix_context_t a_context); casing_prefix_context_t a_context);
extern casing_prefix_context_t extern casing_prefix_context_t
u32_casing_prefixes_context (const uint32_t *s, size_t n, u32_casing_prefixes_context (const uint32_t *s, size_t n,
casing_prefix_context_t a_context); casing_prefix_context_t a_context);
/* The case-mapping context given by a suffix string. */ /* The case-mapping context given by a suffix string. */
typedef struct casing_suffix_context typedef struct casing_suffix_context
{ {
/* These fields are private, undocumented. */ /* These fields are private, undocumented. */
uint32_t first_char_except_ignorable; uint32_t first_char_except_ignorable;
uint32_t bits; uint32_t bits;
} }
casing_suffix_context_t; casing_suffix_context_t;
/* The case-mapping context of the empty suffix string. */ /* The case-mapping context of the empty suffix string. */
extern LIBUNISTRING_DLL_VARIABLE const casing_suffix_context_t unicase_empt y_suffix_context; extern LIBUNISTRING_DLL_VARIABLE const casing_suffix_context_t unicase_empt y_suffix_context;
/* Return the case-mapping context of a given suffix string. */ /* Return the case-mapping context of a given suffix string. */
extern casing_suffix_context_t extern casing_suffix_context_t
u8_casing_suffix_context (const uint8_t *s, size_t n); u8_casing_suffix_context (const uint8_t *s, size_t n);
extern casing_suffix_context_t extern casing_suffix_context_t
u16_casing_suffix_context (const uint16_t *s, size_t n); u16_casing_suffix_context (const uint16_t *s, size_t n);
extern casing_suffix_context_t extern casing_suffix_context_t
u32_casing_suffix_context (const uint32_t *s, size_t n); u32_casing_suffix_context (const uint32_t *s, size_t n);
/* Return the case-mapping context of the suffix concat(S, A), given the /* Return the case-mapping context of the suffix concat(S, A), given the
case-mapping context of the suffix A. */ case-mapping context of the suffix A. */
extern casing_suffix_context_t extern casing_suffix_context_t
u8_casing_suffixes_context (const uint8_t *s, size_t n, u8_casing_suffixes_context (const uint8_t *s, size_t n,
casing_suffix_context_t a_context); casing_suffix_context_t a_context);
extern casing_suffix_context_t extern casing_suffix_context_t
u16_casing_suffixes_context (const uint16_t *s, size_t n, u16_casing_suffixes_context (const uint16_t *s, size_t n,
casing_suffix_context_t a_context); casing_suffix_context_t a_context);
extern casing_suffix_context_t extern casing_suffix_context_t
u32_casing_suffixes_context (const uint32_t *s, size_t n, u32_casing_suffixes_context (const uint32_t *s, size_t n,
casing_suffix_context_t a_context); casing_suffix_context_t a_context);
/* Return the uppercase mapping of a string that is surrounded by a prefix /* Return the uppercase mapping of a string that is surrounded by a prefix
and a suffix. */ and a suffix. */
extern uint8_t * extern uint8_t *
u8_ct_toupper (const uint8_t *s, size_t n, u8_ct_toupper (const uint8_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_ct_toupper (const uint16_t *s, size_t n, u16_ct_toupper (const uint16_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_ct_toupper (const uint32_t *s, size_t n, u32_ct_toupper (const uint32_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Return the lowercase mapping of a string that is surrounded by a prefix /* Return the lowercase mapping of a string that is surrounded by a prefix
and a suffix. */ and a suffix. */
extern uint8_t * extern uint8_t *
u8_ct_tolower (const uint8_t *s, size_t n, u8_ct_tolower (const uint8_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_ct_tolower (const uint16_t *s, size_t n, u16_ct_tolower (const uint16_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_ct_tolower (const uint32_t *s, size_t n, u32_ct_tolower (const uint32_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Return the titlecase mapping of a string that is surrounded by a prefix /* Return the titlecase mapping of a string that is surrounded by a prefix
and a suffix. */ and a suffix. */
extern uint8_t * extern uint8_t *
u8_ct_totitle (const uint8_t *s, size_t n, u8_ct_totitle (const uint8_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_ct_totitle (const uint16_t *s, size_t n, u16_ct_totitle (const uint16_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_ct_totitle (const uint32_t *s, size_t n, u32_ct_totitle (const uint32_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Return the case folded string. /* Return the case folded string.
Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equiva lent Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equiva lent
to comparing S1 and S2 with uN_casecmp(). to comparing S1 and S2 with uN_casecmp().
The nf argument identifies the normalization form to apply after the The nf argument identifies the normalization form to apply after the
case-mapping. It can also be NULL, for no normalization. */ case-mapping. It can also be NULL, for no normalization. */
extern uint8_t * extern uint8_t *
u8_casefold (const uint8_t *s, size_t n, const char *iso639_language , u8_casefold (const uint8_t *s, size_t n, const char *iso639_language ,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_casefold (const uint16_t *s, size_t n, const char *iso639_langua ge, u16_casefold (const uint16_t *s, size_t n, const char *iso639_langua ge,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_casefold (const uint32_t *s, size_t n, const char *iso639_langua ge, u32_casefold (const uint32_t *s, size_t n, const char *iso639_langua ge,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Likewise, for a string that is surrounded by a prefix and a suffix. */ /* Likewise, for a string that is surrounded by a prefix and a suffix. */
extern uint8_t * extern uint8_t *
u8_ct_casefold (const uint8_t *s, size_t n, u8_ct_casefold (const uint8_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_ct_casefold (const uint16_t *s, size_t n, u16_ct_casefold (const uint16_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_ct_casefold (const uint32_t *s, size_t n, u32_ct_casefold (const uint32_t *s, size_t n,
casing_prefix_context_t prefix_context, casing_prefix_context_t prefix_context,
casing_suffix_context_t suffix_context, casing_suffix_context_t suffix_context,
const char *iso639_language, const char *iso639_language,
uninorm_t nf, uninorm_t nf,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Compare S1 and S2, ignoring differences in case and normalization. /* Compare S1 and S2, ignoring differences in case and normalization.
The nf argument identifies the normalization form to apply after the The nf argument identifies the normalization form to apply after the
case-mapping. It can also be NULL, for no normalization. case-mapping. It can also be NULL, for no normalization.
If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and
return 0. Upon failure, return -1 with errno set. */ return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_casecmp (const uint8_t *s1, size_t n1, u8_casecmp (const uint8_t *s1, size_t n1,
const uint8_t *s2, size_t n2, const uint8_t *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp); const char *iso639_language, uninorm_t nf, int *resultp)
;
extern int extern int
u16_casecmp (const uint16_t *s1, size_t n1, u16_casecmp (const uint16_t *s1, size_t n1,
const uint16_t *s2, size_t n2, const uint16_t *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp) const char *iso639_language, uninorm_t nf, int *resultp
; );
extern int extern int
u32_casecmp (const uint32_t *s1, size_t n1, u32_casecmp (const uint32_t *s1, size_t n1,
const uint32_t *s2, size_t n2, const uint32_t *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp) const char *iso639_language, uninorm_t nf, int *resultp
; );
extern int extern int
ulc_casecmp (const char *s1, size_t n1, ulc_casecmp (const char *s1, size_t n1,
const char *s2, size_t n2, const char *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp) const char *iso639_language, uninorm_t nf, int *resultp
; );
/* Convert the string S of length N to a NUL-terminated byte sequence, in s uch /* Convert the string S of length N to a NUL-terminated byte sequence, in s uch
a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnul ib a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnul ib
function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll (). function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll ().
NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalizatio n. */ NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalizatio n. */
extern char * extern char *
u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language , u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language ,
uninorm_t nf, char *resultbuf, size_t *lengthp); uninorm_t nf, char *resultbuf, size_t *lengthp);
extern char * extern char *
u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_langua ge, u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_langua ge,
uninorm_t nf, char *resultbuf, size_t *lengthp); uninorm_t nf, char *resultbuf, size_t *lengthp);
extern char * extern char *
u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_langua ge, u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_langua ge,
uninorm_t nf, char *resultbuf, size_t *lengthp); uninorm_t nf, char *resultbuf, size_t *lengthp);
extern char * extern char *
ulc_casexfrm (const char *s, size_t n, const char *iso639_language, ulc_casexfrm (const char *s, size_t n, const char *iso639_language,
uninorm_t nf, char *resultbuf, size_t *lengthp); uninorm_t nf, char *resultbuf, size_t *lengthp);
/* Compare S1 and S2, ignoring differences in case and normalization, using the /* Compare S1 and S2, ignoring differences in case and normalization, using the
collation rules of the current locale. collation rules of the current locale.
The nf argument identifies the normalization form to apply after the The nf argument identifies the normalization form to apply after the
case-mapping. It must be either UNINORM_NFC or UNINORM_NFKC. It can al so case-mapping. It must be either UNINORM_NFC or UNINORM_NFKC. It can al so
be NULL, for no normalization. be NULL, for no normalization.
If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and
return 0. Upon failure, return -1 with errno set. */ return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_casecoll (const uint8_t *s1, size_t n1, u8_casecoll (const uint8_t *s1, size_t n1,
const uint8_t *s2, size_t n2, const uint8_t *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp) const char *iso639_language, uninorm_t nf, int *resultp
; );
extern int extern int
u16_casecoll (const uint16_t *s1, size_t n1, u16_casecoll (const uint16_t *s1, size_t n1,
const uint16_t *s2, size_t n2, const uint16_t *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp const char *iso639_language, uninorm_t nf, int *result
); p);
extern int extern int
u32_casecoll (const uint32_t *s1, size_t n1, u32_casecoll (const uint32_t *s1, size_t n1,
const uint32_t *s2, size_t n2, const uint32_t *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp const char *iso639_language, uninorm_t nf, int *result
); p);
extern int extern int
ulc_casecoll (const char *s1, size_t n1, ulc_casecoll (const char *s1, size_t n1,
const char *s2, size_t n2, const char *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp const char *iso639_language, uninorm_t nf, int *result
); p);
/* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to f alse /* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to f alse
otherwise, and return 0. Upon failure, return -1 with errno set. */ otherwise, and return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_is_uppercase (const uint8_t *s, size_t n, u8_is_uppercase (const uint8_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u16_is_uppercase (const uint16_t *s, size_t n, u16_is_uppercase (const uint16_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u32_is_uppercase (const uint32_t *s, size_t n, u32_is_uppercase (const uint32_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
/* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to f alse /* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to f alse
otherwise, and return 0. Upon failure, return -1 with errno set. */ otherwise, and return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_is_lowercase (const uint8_t *s, size_t n, u8_is_lowercase (const uint8_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u16_is_lowercase (const uint16_t *s, size_t n, u16_is_lowercase (const uint16_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u32_is_lowercase (const uint32_t *s, size_t n, u32_is_lowercase (const uint32_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
/* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to f alse /* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to f alse
otherwise, and return 0. Upon failure, return -1 with errno set. */ otherwise, and return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_is_titlecase (const uint8_t *s, size_t n, u8_is_titlecase (const uint8_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u16_is_titlecase (const uint16_t *s, size_t n, u16_is_titlecase (const uint16_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u32_is_titlecase (const uint32_t *s, size_t n, u32_is_titlecase (const uint32_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
/* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or t o /* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or t o
false otherwise, and return 0. Upon failure, return -1 with errno set. */ false otherwise, and return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_is_casefolded (const uint8_t *s, size_t n, u8_is_casefolded (const uint8_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u16_is_casefolded (const uint16_t *s, size_t n, u16_is_casefolded (const uint16_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u32_is_casefolded (const uint32_t *s, size_t n, u32_is_casefolded (const uint32_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
/* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) t o /* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) t o
either upper case or lower case or title case is not a no-op. either upper case or lower case or title case is not a no-op.
Set *RESULTP to false if NFD(S) maps to itself under the upper case mapp ing, Set *RESULTP to false if NFD(S) maps to itself under the upper case mapp ing,
under the lower case mapping, and under the title case mapping; in other under the lower case mapping, and under the title case mapping; in other
words, when NFD(S) consists entirely of caseless characters. words, when NFD(S) consists entirely of caseless characters.
Upon failure, return -1 with errno set. */ Upon failure, return -1 with errno set. */
extern int extern int
u8_is_cased (const uint8_t *s, size_t n, u8_is_cased (const uint8_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u16_is_cased (const uint16_t *s, size_t n, u16_is_cased (const uint16_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
extern int extern int
u32_is_cased (const uint32_t *s, size_t n, u32_is_cased (const uint32_t *s, size_t n,
const char *iso639_language, const char *iso639_language,
bool *resultp); bool *resultp);
/* ======================================================================== = */ /* ======================================================================== = */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _UNICASE_H */ #endif /* _UNICASE_H */
 End of changes. 59 change blocks. 
159 lines changed or deleted 160 lines changed or added


 uniconv.h   uniconv.h 
skipping to change at line 56 skipping to change at line 56
or *RESULTBUF can be NULL. or *RESULTBUF can be NULL.
May erase the contents of the memory at RESULTBUF. May erase the contents of the memory at RESULTBUF.
If successful: The resulting Unicode string (non-NULL) is returned and i ts If successful: The resulting Unicode string (non-NULL) is returned and i ts
length stored in *LENGTHP. The resulting string is RESULTBUF if no dyna mic length stored in *LENGTHP. The resulting string is RESULTBUF if no dyna mic
memory allocation was necessary, or a freshly allocated memory block memory allocation was necessary, or a freshly allocated memory block
otherwise. otherwise.
In case of error: NULL is returned and errno is set. Particular errno In case of error: NULL is returned and errno is set. Particular errno
values: EINVAL, EILSEQ, ENOMEM. */ values: EINVAL, EILSEQ, ENOMEM. */
extern uint8_t * extern uint8_t *
u8_conv_from_encoding (const char *fromcode, u8_conv_from_encoding (const char *fromcode,
enum iconv_ilseq_handler handler, enum iconv_ilseq_handler handler,
const char *src, size_t srclen, const char *src, size_t srclen,
size_t *offsets, size_t *offsets,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_conv_from_encoding (const char *fromcode, u16_conv_from_encoding (const char *fromcode,
enum iconv_ilseq_handler handler, enum iconv_ilseq_handler handler,
const char *src, size_t srclen, const char *src, size_t srclen,
size_t *offsets, size_t *offsets,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_conv_from_encoding (const char *fromcode, u32_conv_from_encoding (const char *fromcode,
enum iconv_ilseq_handler handler, enum iconv_ilseq_handler handler,
const char *src, size_t srclen, const char *src, size_t srclen,
size_t *offsets, size_t *offsets,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Converts an entire Unicode string, possibly including NUL units, from a /* Converts an entire Unicode string, possibly including NUL units, from a
Unicode encoding to a given encoding. Unicode encoding to a given encoding.
Converts a memory region to encoding TOCODE. TOCODE is as for Converts a memory region to encoding TOCODE. TOCODE is as for
iconv_open(3). iconv_open(3).
The input is in the memory region between SRC (inclusive) and SRC + SRCL EN The input is in the memory region between SRC (inclusive) and SRC + SRCL EN
(exclusive). (exclusive).
If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this
array is filled with offsets into the result, i.e. the character startin g array is filled with offsets into the result, i.e. the character startin g
at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i] ], at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i] ],
skipping to change at line 93 skipping to change at line 93
RESULTBUF and *LENGTHP should initially be a scratch buffer and its size , RESULTBUF and *LENGTHP should initially be a scratch buffer and its size ,
or RESULTBUF can be NULL. or RESULTBUF can be NULL.
May erase the contents of the memory at RESULTBUF. May erase the contents of the memory at RESULTBUF.
If successful: The resulting string (non-NULL) is returned and its lengt h If successful: The resulting string (non-NULL) is returned and its lengt h
stored in *LENGTHP. The resulting string is RESULTBUF if no dynamic mem ory stored in *LENGTHP. The resulting string is RESULTBUF if no dynamic mem ory
allocation was necessary, or a freshly allocated memory block otherwise. allocation was necessary, or a freshly allocated memory block otherwise.
In case of error: NULL is returned and errno is set. Particular errno In case of error: NULL is returned and errno is set. Particular errno
values: EINVAL, EILSEQ, ENOMEM. */ values: EINVAL, EILSEQ, ENOMEM. */
extern char * extern char *
u8_conv_to_encoding (const char *tocode, u8_conv_to_encoding (const char *tocode,
enum iconv_ilseq_handler handler, enum iconv_ilseq_handler handler,
const uint8_t *src, size_t srclen, const uint8_t *src, size_t srclen,
size_t *offsets, size_t *offsets,
char *resultbuf, size_t *lengthp); char *resultbuf, size_t *lengthp);
extern char * extern char *
u16_conv_to_encoding (const char *tocode, u16_conv_to_encoding (const char *tocode,
enum iconv_ilseq_handler handler, enum iconv_ilseq_handler handler,
const uint16_t *src, size_t srclen, const uint16_t *src, size_t srclen,
size_t *offsets, size_t *offsets,
char *resultbuf, size_t *lengthp); char *resultbuf, size_t *lengthp);
extern char * extern char *
u32_conv_to_encoding (const char *tocode, u32_conv_to_encoding (const char *tocode,
enum iconv_ilseq_handler handler, enum iconv_ilseq_handler handler,
const uint32_t *src, size_t srclen, const uint32_t *src, size_t srclen,
size_t *offsets, size_t *offsets,
char *resultbuf, size_t *lengthp); char *resultbuf, size_t *lengthp);
/* Converts a NUL terminated string from a given encoding. /* Converts a NUL terminated string from a given encoding.
The result is malloc allocated, or NULL (with errno set) in case of erro r. The result is malloc allocated, or NULL (with errno set) in case of erro r.
Particular errno values: EILSEQ, ENOMEM. */ Particular errno values: EILSEQ, ENOMEM. */
extern uint8_t * extern uint8_t *
u8_strconv_from_encoding (const char *string, u8_strconv_from_encoding (const char *string,
const char *fromcode, const char *fromcode,
enum iconv_ilseq_handler handler); enum iconv_ilseq_handler handler);
extern uint16_t * extern uint16_t *
u16_strconv_from_encoding (const char *string, u16_strconv_from_encoding (const char *string,
const char *fromcode, const char *fromcode,
enum iconv_ilseq_handler handler); enum iconv_ilseq_handler handler);
extern uint32_t * extern uint32_t *
u32_strconv_from_encoding (const char *string, u32_strconv_from_encoding (const char *string,
const char *fromcode, const char *fromcode,
enum iconv_ilseq_handler handler); enum iconv_ilseq_handler handler);
/* Converts a NUL terminated string to a given encoding. /* Converts a NUL terminated string to a given encoding.
The result is malloc allocated, or NULL (with errno set) in case of erro r. The result is malloc allocated, or NULL (with errno set) in case of erro r.
Particular errno values: EILSEQ, ENOMEM. */ Particular errno values: EILSEQ, ENOMEM. */
extern char * extern char *
u8_strconv_to_encoding (const uint8_t *string, u8_strconv_to_encoding (const uint8_t *string,
const char *tocode, const char *tocode,
enum iconv_ilseq_handler handler); enum iconv_ilseq_handler handler);
extern char * extern char *
u16_strconv_to_encoding (const uint16_t *string, u16_strconv_to_encoding (const uint16_t *string,
const char *tocode, const char *tocode,
enum iconv_ilseq_handler handler); enum iconv_ilseq_handler handler);
extern char * extern char *
u32_strconv_to_encoding (const uint32_t *string, u32_strconv_to_encoding (const uint32_t *string,
const char *tocode, const char *tocode,
enum iconv_ilseq_handler handler); enum iconv_ilseq_handler handler);
/* Converts a NUL terminated string from the locale encoding. /* Converts a NUL terminated string from the locale encoding.
The result is malloc allocated, or NULL (with errno set) in case of erro r. The result is malloc allocated, or NULL (with errno set) in case of erro r.
Particular errno values: ENOMEM. */ Particular errno values: ENOMEM. */
extern uint8_t * extern uint8_t *
u8_strconv_from_locale (const char *string); u8_strconv_from_locale (const char *string);
extern uint16_t * extern uint16_t *
u16_strconv_from_locale (const char *string); u16_strconv_from_locale (const char *string);
extern uint32_t * extern uint32_t *
u32_strconv_from_locale (const char *string); u32_strconv_from_locale (const char *string);
 End of changes. 12 change blocks. 
36 lines changed or deleted 36 lines changed or added


 unictype.h   unictype.h 
skipping to change at line 189 skipping to change at line 189
#define UC_CONTROL UC_CATEGORY_Cc #define UC_CONTROL UC_CATEGORY_Cc
#define UC_FORMAT UC_CATEGORY_Cf #define UC_FORMAT UC_CATEGORY_Cf
#define UC_SURROGATE UC_CATEGORY_Cs /* all of them are inva lid characters */ #define UC_SURROGATE UC_CATEGORY_Cs /* all of them are inva lid characters */
#define UC_PRIVATE_USE UC_CATEGORY_Co #define UC_PRIVATE_USE UC_CATEGORY_Co
#define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are inv alid characters */ #define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are inv alid characters */
/* Return the union of two general categories. /* Return the union of two general categories.
This corresponds to the unions of the two sets of characters. */ This corresponds to the unions of the two sets of characters. */
extern uc_general_category_t extern uc_general_category_t
uc_general_category_or (uc_general_category_t category1, uc_general_category_or (uc_general_category_t category1,
uc_general_category_t category2); uc_general_category_t category2);
/* Return the intersection of two general categories as bit masks. /* Return the intersection of two general categories as bit masks.
This *does*not* correspond to the intersection of the two sets of This *does*not* correspond to the intersection of the two sets of
characters. */ characters. */
extern uc_general_category_t extern uc_general_category_t
uc_general_category_and (uc_general_category_t category1, uc_general_category_and (uc_general_category_t category1,
uc_general_category_t category2); uc_general_category_t category2);
/* Return the intersection of a general category with the complement of a /* Return the intersection of a general category with the complement of a
second general category, as bit masks. second general category, as bit masks.
This *does*not* correspond to the intersection with complement, when This *does*not* correspond to the intersection with complement, when
viewing the categories as sets of characters. */ viewing the categories as sets of characters. */
extern uc_general_category_t extern uc_general_category_t
uc_general_category_and_not (uc_general_category_t category1, uc_general_category_and_not (uc_general_category_t category1,
uc_general_category_t category2); uc_general_category_t category2);
/* Return the name of a general category. */ /* Return the name of a general category. */
extern const char * extern const char *
uc_general_category_name (uc_general_category_t category); uc_general_category_name (uc_general_category_t category);
/* Return the general category given by name, e.g. "Lu". */ /* Return the general category given by name, e.g. "Lu". */
extern uc_general_category_t extern uc_general_category_t
uc_general_category_byname (const char *category_name); uc_general_category_byname (const char *category_name);
/* Return the general category of a Unicode character. */ /* Return the general category of a Unicode character. */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 unilbrk.h   unilbrk.h 
skipping to change at line 58 skipping to change at line 58
p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character. p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character.
p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between
s[i-1] and s[i]. s[i-1] and s[i].
p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be
inserted between s[i-1] and s[i]. But beware of language depende nt inserted between s[i-1] and s[i]. But beware of language depende nt
hyphenation rules. hyphenation rules.
p[i] = UC_BREAK_PROHIBITED means that s[i-1] and s[i] must not be separa ted. p[i] = UC_BREAK_PROHIBITED means that s[i-1] and s[i] must not be separa ted.
*/ */
extern void extern void
u8_possible_linebreaks (const uint8_t *s, size_t n, u8_possible_linebreaks (const uint8_t *s, size_t n,
const char *encoding, char *p); const char *encoding, char *p);
extern void extern void
u16_possible_linebreaks (const uint16_t *s, size_t n, u16_possible_linebreaks (const uint16_t *s, size_t n,
const char *encoding, char *p); const char *encoding, char *p);
extern void extern void
u32_possible_linebreaks (const uint32_t *s, size_t n, u32_possible_linebreaks (const uint32_t *s, size_t n,
const char *encoding, char *p); const char *encoding, char *p);
extern void extern void
ulc_possible_linebreaks (const char *s, size_t n, ulc_possible_linebreaks (const char *s, size_t n,
const char *encoding, char *p); const char *encoding, char *p);
/* Choose the best line breaks, assuming the uc_width function. /* Choose the best line breaks, assuming the uc_width function.
The string is s[0..n-1]. The maximum number of columns per line is give n The string is s[0..n-1]. The maximum number of columns per line is give n
as WIDTH. The starting column of the string is given as START_COLUMN. as WIDTH. The starting column of the string is given as START_COLUMN.
If the algorithm shall keep room after the last piece, they can be given If the algorithm shall keep room after the last piece, they can be given
as AT_END_COLUMNS. as AT_END_COLUMNS.
o is an optional override; if o[i] != UC_BREAK_UNDEFINED, o[i] takes o is an optional override; if o[i] != UC_BREAK_UNDEFINED, o[i] takes
precedence over p[i] as returned by the *_possible_linebreaks function. precedence over p[i] as returned by the *_possible_linebreaks function.
The given ENCODING is used for disambiguating widths in uc_width. The given ENCODING is used for disambiguating widths in uc_width.
Return the column after the end of the string, and store the result at Return the column after the end of the string, and store the result at
p[0..n-1]. p[0..n-1].
*/ */
extern int extern int
u8_width_linebreaks (const uint8_t *s, size_t n, int width, u8_width_linebreaks (const uint8_t *s, size_t n, int width,
int start_column, int at_end_columns, int start_column, int at_end_columns,
const char *o, const char *encoding, const char *o, const char *encoding,
char *p); char *p);
extern int extern int
u16_width_linebreaks (const uint16_t *s, size_t n, int width, u16_width_linebreaks (const uint16_t *s, size_t n, int width,
int start_column, int at_end_columns, int start_column, int at_end_columns,
const char *o, const char *encoding, const char *o, const char *encoding,
char *p); char *p);
extern int extern int
u32_width_linebreaks (const uint32_t *s, size_t n, int width, u32_width_linebreaks (const uint32_t *s, size_t n, int width,
int start_column, int at_end_columns, int start_column, int at_end_columns,
const char *o, const char *encoding, const char *o, const char *encoding,
char *p); char *p);
extern int extern int
ulc_width_linebreaks (const char *s, size_t n, int width, ulc_width_linebreaks (const char *s, size_t n, int width,
int start_column, int at_end_columns, int start_column, int at_end_columns,
const char *o, const char *encoding, const char *o, const char *encoding,
char *p); char *p);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _UNILBRK_H */ #endif /* _UNILBRK_H */
 End of changes. 8 change blocks. 
16 lines changed or deleted 16 lines changed or added


 uninorm.h   uninorm.h 
skipping to change at line 140 skipping to change at line 140
#define uninorm_is_composing(nf) \ #define uninorm_is_composing(nf) \
((* (const unsigned int *) (nf) >> 1) & 1) ((* (const unsigned int *) (nf) >> 1) & 1)
/* Return the decomposing variant of a normalization form. /* Return the decomposing variant of a normalization form.
This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */ This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */
extern uninorm_t uninorm_decomposing_form (uninorm_t nf); extern uninorm_t uninorm_decomposing_form (uninorm_t nf);
/* Return the specified normalization form of a string. */ /* Return the specified normalization form of a string. */
extern uint8_t * extern uint8_t *
u8_normalize (uninorm_t nf, const uint8_t *s, size_t n, u8_normalize (uninorm_t nf, const uint8_t *s, size_t n,
uint8_t *resultbuf, size_t *lengthp); uint8_t *resultbuf, size_t *lengthp);
extern uint16_t * extern uint16_t *
u16_normalize (uninorm_t nf, const uint16_t *s, size_t n, u16_normalize (uninorm_t nf, const uint16_t *s, size_t n,
uint16_t *resultbuf, size_t *lengthp); uint16_t *resultbuf, size_t *lengthp);
extern uint32_t * extern uint32_t *
u32_normalize (uninorm_t nf, const uint32_t *s, size_t n, u32_normalize (uninorm_t nf, const uint32_t *s, size_t n,
uint32_t *resultbuf, size_t *lengthp); uint32_t *resultbuf, size_t *lengthp);
/* Compare S1 and S2, ignoring differences in normalization. /* Compare S1 and S2, ignoring differences in normalization.
NF must be either UNINORM_NFD or UNINORM_NFKD. NF must be either UNINORM_NFD or UNINORM_NFKD.
If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and
return 0. Upon failure, return -1 with errno set. */ return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2,
uninorm_t nf, int *resultp); uninorm_t nf, int *resultp);
extern int extern int
u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size _t n2, u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size _t n2,
uninorm_t nf, int *resultp); uninorm_t nf, int *resultp);
extern int extern int
u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size _t n2, u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size _t n2,
uninorm_t nf, int *resultp); uninorm_t nf, int *resultp);
/* Converts the string S of length N to a NUL-terminated byte sequence, in such /* Converts the string S of length N to a NUL-terminated byte sequence, in such
a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2( ) is a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2( ) is
equivalent to comparing S1 and S2 with uN_normcoll(). equivalent to comparing S1 and S2 with uN_normcoll().
NF must be either UNINORM_NFC or UNINORM_NFKC. */ NF must be either UNINORM_NFC or UNINORM_NFKC. */
extern char * extern char *
u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf, u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf,
char *resultbuf, size_t *lengthp); char *resultbuf, size_t *lengthp);
extern char * extern char *
u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf, u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf,
char *resultbuf, size_t *lengthp); char *resultbuf, size_t *lengthp);
extern char * extern char *
u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf, u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf,
char *resultbuf, size_t *lengthp); char *resultbuf, size_t *lengthp);
/* Compare S1 and S2, ignoring differences in normalization, using the /* Compare S1 and S2, ignoring differences in normalization, using the
collation rules of the current locale. collation rules of the current locale.
NF must be either UNINORM_NFC or UNINORM_NFKC. NF must be either UNINORM_NFC or UNINORM_NFKC.
If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2 , and
return 0. Upon failure, return -1 with errno set. */ return 0. Upon failure, return -1 with errno set. */
extern int extern int
u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2,
uninorm_t nf, int *resultp); uninorm_t nf, int *resultp);
extern int extern int
u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, siz e_t n2, u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, siz e_t n2,
uninorm_t nf, int *resultp); uninorm_t nf, int *resultp);
extern int extern int
u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, siz e_t n2, u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, siz e_t n2,
uninorm_t nf, int *resultp); uninorm_t nf, int *resultp);
/* Normalization of a stream of Unicode characters. /* Normalization of a stream of Unicode characters.
A "stream of Unicode characters" is essentially a function that accepts an A "stream of Unicode characters" is essentially a function that accepts an
ucs4_t argument repeatedly, optionally combined with a function that ucs4_t argument repeatedly, optionally combined with a function that
"flushes" the stream. */ "flushes" the stream. */
/* Data type of a stream of Unicode characters that normalizes its input /* Data type of a stream of Unicode characters that normalizes its input
according to a given normalization form and passes the normalized charac ter according to a given normalization form and passes the normalized charac ter
sequence to the encapsulated stream of Unicode characters. */ sequence to the encapsulated stream of Unicode characters. */
struct uninorm_filter; struct uninorm_filter;
/* Create and return a normalization filter for Unicode characters. /* Create and return a normalization filter for Unicode characters.
The pair (stream_func, stream_data) is the encapsulated stream. The pair (stream_func, stream_data) is the encapsulated stream.
stream_func (stream_data, uc) receives the Unicode character uc stream_func (stream_data, uc) receives the Unicode character uc
and returns 0 if successful, or -1 with errno set upon failure. and returns 0 if successful, or -1 with errno set upon failure.
Return the new filter, or NULL with errno set upon failure. */ Return the new filter, or NULL with errno set upon failure. */
extern struct uninorm_filter * extern struct uninorm_filter *
uninorm_filter_create (uninorm_t nf, uninorm_filter_create (uninorm_t nf,
int (*stream_func) (void *stream_data, ucs4_t int (*stream_func) (void *stream_data, ucs4_t
uc), uc),
void *stream_data); void *stream_data);
/* Stuff a Unicode character into a normalizing filter. /* Stuff a Unicode character into a normalizing filter.
Return 0 if successful, or -1 with errno set upon failure. */ Return 0 if successful, or -1 with errno set upon failure. */
extern int extern int
uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc); uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc);
/* Bring data buffered in the filter to its destination, the encapsulated /* Bring data buffered in the filter to its destination, the encapsulated
stream. stream.
Return 0 if successful, or -1 with errno set upon failure. Return 0 if successful, or -1 with errno set upon failure.
Note! If after calling this function, additional characters are written Note! If after calling this function, additional characters are written
 End of changes. 13 change blocks. 
15 lines changed or deleted 15 lines changed or added


 unistdio.h   unistdio.h 
skipping to change at line 65 skipping to change at line 65
resultbuf is not NULL and the result fits into *lengthp units, it is put resultbuf is not NULL and the result fits into *lengthp units, it is put
in resultbuf, and resultbuf is returned. Otherwise, a freshly allocated in resultbuf, and resultbuf is returned. Otherwise, a freshly allocated
string is returned. In both cases, *lengthp is set to the length (numbe r string is returned. In both cases, *lengthp is set to the length (numbe r
of units) of the returned string. In case of error, NULL is returned an d of units) of the returned string. In case of error, NULL is returned an d
errno is set. errno is set.
*/ */
/* ASCII format string, result in locale dependent encoded 'char *'. */ /* ASCII format string, result in locale dependent encoded 'char *'. */
extern int extern int
ulc_sprintf (char *buf, ulc_sprintf (char *buf,
const char *format, ...); const char *format, ...);
extern int extern int
ulc_snprintf (char *buf, size_t size, ulc_snprintf (char *buf, size_t size,
const char *format, ...); const char *format, ...);
extern int extern int
ulc_asprintf (char **resultp, ulc_asprintf (char **resultp,
const char *format, ...); const char *format, ...);
extern char * extern char *
ulc_asnprintf (char *resultbuf, size_t *lengthp, ulc_asnprintf (char *resultbuf, size_t *lengthp,
const char *format, ...); const char *format, ...);
extern int extern int
ulc_vsprintf (char *buf, ulc_vsprintf (char *buf,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
ulc_vsnprintf (char *buf, size_t size, ulc_vsnprintf (char *buf, size_t size,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
ulc_vasprintf (char **resultp, ulc_vasprintf (char **resultp,
const char *format, va_list ap); const char *format, va_list ap);
extern char * extern char *
ulc_vasnprintf (char *resultbuf, size_t *lengthp, ulc_vasnprintf (char *resultbuf, size_t *lengthp,
const char *format, va_list ap); const char *format, va_list ap);
/* ASCII format string, result in UTF-8 format. */ /* ASCII format string, result in UTF-8 format. */
extern int extern int
u8_sprintf (uint8_t *buf, u8_sprintf (uint8_t *buf,
const char *format, ...); const char *format, ...);
extern int extern int
u8_snprintf (uint8_t *buf, size_t size, u8_snprintf (uint8_t *buf, size_t size,
const char *format, ...); const char *format, ...);
extern int extern int
u8_asprintf (uint8_t **resultp, u8_asprintf (uint8_t **resultp,
const char *format, ...); const char *format, ...);
extern uint8_t * extern uint8_t *
u8_asnprintf (uint8_t *resultbuf, size_t *lengthp, u8_asnprintf (uint8_t *resultbuf, size_t *lengthp,
const char *format, ...); const char *format, ...);
extern int extern int
u8_vsprintf (uint8_t *buf, u8_vsprintf (uint8_t *buf,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
u8_vsnprintf (uint8_t *buf, size_t size, u8_vsnprintf (uint8_t *buf, size_t size,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
u8_vasprintf (uint8_t **resultp, u8_vasprintf (uint8_t **resultp,
const char *format, va_list ap); const char *format, va_list ap);
extern uint8_t * extern uint8_t *
u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp, u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp,
const char *format, va_list ap); const char *format, va_list ap);
/* UTF-8 format string, result in UTF-8 format. */ /* UTF-8 format string, result in UTF-8 format. */
extern int extern int
u8_u8_sprintf (uint8_t *buf, u8_u8_sprintf (uint8_t *buf,
const uint8_t *format, ...); const uint8_t *format, ...);
extern int extern int
u8_u8_snprintf (uint8_t *buf, size_t size, u8_u8_snprintf (uint8_t *buf, size_t size,
const uint8_t *format, ...); const uint8_t *format, ...);
extern int extern int
u8_u8_asprintf (uint8_t **resultp, u8_u8_asprintf (uint8_t **resultp,
const uint8_t *format, ...); const uint8_t *format, ...);
extern uint8_t * extern uint8_t *
u8_u8_asnprintf (uint8_t *resultbuf, size_t *lengthp, u8_u8_asnprintf (uint8_t *resultbuf, size_t *lengthp,
const uint8_t *format, ...); const uint8_t *format, ...);
extern int extern int
u8_u8_vsprintf (uint8_t *buf, u8_u8_vsprintf (uint8_t *buf,
const uint8_t *format, va_list ap); const uint8_t *format, va_list ap);
extern int extern int
u8_u8_vsnprintf (uint8_t *buf, size_t size, u8_u8_vsnprintf (uint8_t *buf, size_t size,
const uint8_t *format, va_list ap); const uint8_t *format, va_list ap);
extern int extern int
u8_u8_vasprintf (uint8_t **resultp, u8_u8_vasprintf (uint8_t **resultp,
const uint8_t *format, va_list ap); const uint8_t *format, va_list ap);
extern uint8_t * extern uint8_t *
u8_u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp, u8_u8_vasnprintf (uint8_t *resultbuf, size_t *lengthp,
const uint8_t *format, va_list ap); const uint8_t *format, va_list ap);
/* ASCII format string, result in UTF-16 format. */ /* ASCII format string, result in UTF-16 format. */
extern int extern int
u16_sprintf (uint16_t *buf, u16_sprintf (uint16_t *buf,
const char *format, ...); const char *format, ...);
extern int extern int
u16_snprintf (uint16_t *buf, size_t size, u16_snprintf (uint16_t *buf, size_t size,
const char *format, ...); const char *format, ...);
extern int extern int
u16_asprintf (uint16_t **resultp, u16_asprintf (uint16_t **resultp,
const char *format, ...); const char *format, ...);
extern uint16_t * extern uint16_t *
u16_asnprintf (uint16_t *resultbuf, size_t *lengthp, u16_asnprintf (uint16_t *resultbuf, size_t *lengthp,
const char *format, ...); const char *format, ...);
extern int extern int
u16_vsprintf (uint16_t *buf, u16_vsprintf (uint16_t *buf,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
u16_vsnprintf (uint16_t *buf, size_t size, u16_vsnprintf (uint16_t *buf, size_t size,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
u16_vasprintf (uint16_t **resultp, u16_vasprintf (uint16_t **resultp,
const char *format, va_list ap); const char *format, va_list ap);
extern uint16_t * extern uint16_t *
u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp, u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp,
const char *format, va_list ap); const char *format, va_list ap);
/* UTF-16 format string, result in UTF-16 format. */ /* UTF-16 format string, result in UTF-16 format. */
extern int extern int
u16_u16_sprintf (uint16_t *buf, u16_u16_sprintf (uint16_t *buf,
const uint16_t *format, ...); const uint16_t *format, ...);
extern int extern int
u16_u16_snprintf (uint16_t *buf, size_t size, u16_u16_snprintf (uint16_t *buf, size_t size,
const uint16_t *format, ...); const uint16_t *format, ...);
extern int extern int
u16_u16_asprintf (uint16_t **resultp, u16_u16_asprintf (uint16_t **resultp,
const uint16_t *format, ...); const uint16_t *format, ...);
extern uint16_t * extern uint16_t *
u16_u16_asnprintf (uint16_t *resultbuf, size_t *lengthp, u16_u16_asnprintf (uint16_t *resultbuf, size_t *lengthp,
const uint16_t *format, ...); const uint16_t *format, ...);
extern int extern int
u16_u16_vsprintf (uint16_t *buf, u16_u16_vsprintf (uint16_t *buf,
const uint16_t *format, va_list ap); const uint16_t *format, va_list ap);
extern int extern int
u16_u16_vsnprintf (uint16_t *buf, size_t size, u16_u16_vsnprintf (uint16_t *buf, size_t size,
const uint16_t *format, va_list ap); const uint16_t *format, va_list ap);
extern int extern int
u16_u16_vasprintf (uint16_t **resultp, u16_u16_vasprintf (uint16_t **resultp,
const uint16_t *format, va_list ap); const uint16_t *format, va_list ap);
extern uint16_t * extern uint16_t *
u16_u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp, u16_u16_vasnprintf (uint16_t *resultbuf, size_t *lengthp,
const uint16_t *format, va_list ap); const uint16_t *format, va_list ap);
/* ASCII format string, result in UTF-32 format. */ /* ASCII format string, result in UTF-32 format. */
extern int extern int
u32_sprintf (uint32_t *buf, u32_sprintf (uint32_t *buf,
const char *format, ...); const char *format, ...);
extern int extern int
u32_snprintf (uint32_t *buf, size_t size, u32_snprintf (uint32_t *buf, size_t size,
const char *format, ...); const char *format, ...);
extern int extern int
u32_asprintf (uint32_t **resultp, u32_asprintf (uint32_t **resultp,
const char *format, ...); const char *format, ...);
extern uint32_t * extern uint32_t *
u32_asnprintf (uint32_t *resultbuf, size_t *lengthp, u32_asnprintf (uint32_t *resultbuf, size_t *lengthp,
const char *format, ...); const char *format, ...);
extern int extern int
u32_vsprintf (uint32_t *buf, u32_vsprintf (uint32_t *buf,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
u32_vsnprintf (uint32_t *buf, size_t size, u32_vsnprintf (uint32_t *buf, size_t size,
const char *format, va_list ap); const char *format, va_list ap);
extern int extern int
u32_vasprintf (uint32_t **resultp, u32_vasprintf (uint32_t **resultp,
const char *format, va_list ap); const char *format, va_list ap);
extern uint32_t * extern uint32_t *
u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp, u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp,
const char *format, va_list ap); const char *format, va_list ap);
/* UTF-32 format string, result in UTF-32 format. */ /* UTF-32 format string, result in UTF-32 format. */
extern int extern int
u32_u32_sprintf (uint32_t *buf, u32_u32_sprintf (uint32_t *buf,
const uint32_t *format, ...); const uint32_t *format, ...);
extern int extern int
u32_u32_snprintf (uint32_t *buf, size_t size, u32_u32_snprintf (uint32_t *buf, size_t size,
const uint32_t *format, ...); const uint32_t *format, ...);
extern int extern int
u32_u32_asprintf (uint32_t **resultp, u32_u32_asprintf (uint32_t **resultp,
const uint32_t *format, ...); const uint32_t *format, ...);
extern uint32_t * extern uint32_t *
u32_u32_asnprintf (uint32_t *resultbuf, size_t *lengthp, u32_u32_asnprintf (uint32_t *resultbuf, size_t *lengthp,
const uint32_t *format, ...); const uint32_t *format, ...);
extern int extern int
u32_u32_vsprintf (uint32_t *buf, u32_u32_vsprintf (uint32_t *buf,
const uint32_t *format, va_list ap); const uint32_t *format, va_list ap);
extern int extern int
u32_u32_vsnprintf (uint32_t *buf, size_t size, u32_u32_vsnprintf (uint32_t *buf, size_t size,
const uint32_t *format, va_list ap); const uint32_t *format, va_list ap);
extern int extern int
u32_u32_vasprintf (uint32_t **resultp, u32_u32_vasprintf (uint32_t **resultp,
const uint32_t *format, va_list ap); const uint32_t *format, va_list ap);
extern uint32_t * extern uint32_t *
u32_u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp, u32_u32_vasnprintf (uint32_t *resultbuf, size_t *lengthp,
const uint32_t *format, va_list ap); const uint32_t *format, va_list ap);
/* ASCII format string, output to FILE in locale dependent encoding. */ /* ASCII format string, output to FILE in locale dependent encoding. */
extern int extern int
ulc_fprintf (FILE *stream, ulc_fprintf (FILE *stream,
const char *format, ...); const char *format, ...);
extern int extern int
ulc_vfprintf (FILE *stream, ulc_vfprintf (FILE *stream,
const char *format, va_list ap); const char *format, va_list ap);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _UNISTDIO_H */ #endif /* _UNISTDIO_H */
 End of changes. 58 change blocks. 
58 lines changed or deleted 58 lines changed or added


 unistr.h   unistr.h 
skipping to change at line 22 skipping to change at line 22
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. * / along with this program. If not, see <http://www.gnu.org/licenses/>. * /
#ifndef _UNISTR_H #ifndef _UNISTR_H
#define _UNISTR_H #define _UNISTR_H
#include "unitypes.h" #include "unitypes.h"
/* Get common macros for C. */
#include <unistring/cdefs.h>
/* Get inline if available. */ /* Get inline if available. */
#include <unistring/inline.h> #include <unistring/inline.h>
/* Get bool. */ /* Get bool. */
#include <unistring/stdbool.h> #include <unistring/stdbool.h>
/* Get size_t. */ /* Get size_t. */
#include <stddef.h> #include <stddef.h>
#ifdef __cplusplus #ifdef __cplusplus
skipping to change at line 84 skipping to change at line 87
/* Check whether an UCS-4 string is well-formed. /* Check whether an UCS-4 string is well-formed.
Return NULL if valid, or a pointer to the first invalid unit otherwise. */ Return NULL if valid, or a pointer to the first invalid unit otherwise. */
extern const uint32_t * extern const uint32_t *
u32_check (const uint32_t *s, size_t n); u32_check (const uint32_t *s, size_t n);
/* Elementary string conversions. */ /* Elementary string conversions. */
/* Convert an UTF-8 string to an UTF-16 string. */ /* Convert an UTF-8 string to an UTF-16 string. */
extern uint16_t * extern uint16_t *
u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf, u8_to_u16 (const uint8_t *s, size_t n, uint16_t *resultbuf,
size_t *lengthp); size_t *lengthp);
/* Convert an UTF-8 string to an UCS-4 string. */ /* Convert an UTF-8 string to an UCS-4 string. */
extern uint32_t * extern uint32_t *
u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf, u8_to_u32 (const uint8_t *s, size_t n, uint32_t *resultbuf,
size_t *lengthp); size_t *lengthp);
/* Convert an UTF-16 string to an UTF-8 string. */ /* Convert an UTF-16 string to an UTF-8 string. */
extern uint8_t * extern uint8_t *
u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf, u16_to_u8 (const uint16_t *s, size_t n, uint8_t *resultbuf,
size_t *lengthp); size_t *lengthp);
/* Convert an UTF-16 string to an UCS-4 string. */ /* Convert an UTF-16 string to an UCS-4 string. */
extern uint32_t * extern uint32_t *
u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf, u16_to_u32 (const uint16_t *s, size_t n, uint32_t *resultbuf,
size_t *lengthp); size_t *lengthp);
/* Convert an UCS-4 string to an UTF-8 string. */ /* Convert an UCS-4 string to an UTF-8 string. */
extern uint8_t * extern uint8_t *
u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf, u32_to_u8 (const uint32_t *s, size_t n, uint8_t *resultbuf,
size_t *lengthp); size_t *lengthp);
/* Convert an UCS-4 string to an UTF-16 string. */ /* Convert an UCS-4 string to an UTF-16 string. */
extern uint16_t * extern uint16_t *
u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf, u32_to_u16 (const uint32_t *s, size_t n, uint16_t *resultbuf,
size_t *lengthp); size_t *lengthp);
/* Elementary string functions. */ /* Elementary string functions. */
/* Return the length (number of units) of the first character in S, which i s /* Return the length (number of units) of the first character in S, which i s
no longer than N. Return 0 if it is the NUL character. Return -1 upon no longer than N. Return 0 if it is the NUL character. Return -1 upon
failure. */ failure. */
/* Similar to mblen(), except that s must not be NULL. */ /* Similar to mblen(), except that s must not be NULL. */
extern int extern int
u8_mblen (const uint8_t *s, size_t n); u8_mblen (const uint8_t *s, size_t n);
extern int extern int
skipping to change at line 185 skipping to change at line 188
} }
# endif # endif
#endif #endif
#if 1 #if 1
# if !UNISTRING_HAVE_INLINE # if !UNISTRING_HAVE_INLINE
extern int extern int
u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n); u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
# else # else
static inline int static inline int
u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMET u32_mbtouc_unsafe (ucs4_t *puc,
ER_) const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
{ {
uint32_t c = *s; uint32_t c = *s;
# if CONFIG_UNICODE_SAFETY # if CONFIG_UNICODE_SAFETY
if (c < 0xd800 || (c >= 0xe000 && c < 0x110000)) if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
# endif # endif
*puc = c; *puc = c;
# if CONFIG_UNICODE_SAFETY # if CONFIG_UNICODE_SAFETY
else else
/* invalid multibyte character */ /* invalid multibyte character */
skipping to change at line 255 skipping to change at line 259
} }
# endif # endif
#endif #endif
#if 1 #if 1
# if !UNISTRING_HAVE_INLINE # if !UNISTRING_HAVE_INLINE
extern int extern int
u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
# else # else
static inline int static inline int
u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMETER_) u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
{ {
uint32_t c = *s; uint32_t c = *s;
if (c < 0xd800 || (c >= 0xe000 && c < 0x110000)) if (c < 0xd800 || (c >= 0xe000 && c < 0x110000))
*puc = c; *puc = c;
else else
/* invalid multibyte character */ /* invalid multibyte character */
*puc = 0xfffd; *puc = 0xfffd;
return 1; return 1;
} }
skipping to change at line 353 skipping to change at line 357
# if !UNISTRING_HAVE_INLINE # if !UNISTRING_HAVE_INLINE
extern int extern int
u32_uctomb (uint32_t *s, ucs4_t uc, int n); u32_uctomb (uint32_t *s, ucs4_t uc, int n);
# else # else
static inline int static inline int
u32_uctomb (uint32_t *s, ucs4_t uc, int n) u32_uctomb (uint32_t *s, ucs4_t uc, int n)
{ {
if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000)) if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000))
{ {
if (n > 0) if (n > 0)
{ {
*s = uc; *s = uc;
return 1; return 1;
} }
else else
return -2; return -2;
} }
else else
return -1; return -1;
} }
# endif # endif
#endif #endif
/* Copy N units from SRC to DEST. */ /* Copy N units from SRC to DEST. */
/* Similar to memcpy(). */ /* Similar to memcpy(). */
extern uint8_t * extern uint8_t *
 End of changes. 11 change blocks. 
14 lines changed or deleted 17 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/