The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
/*
    This file was generated by the command

       cfunctions unicode.c unicode-character-class.c

    at 18:01:10 on Thursday 11 August 2016, local time.
*/
#ifndef CFH_UNICODE_H
#define CFH_UNICODE_H

/* From 'unicode.c': */

#line 6 "unicode.c"
#define UTF8_MAX_LENGTH 4
#define UNICODE_BAD_INPUT -1
#define UNICODE_SURROGATE_PAIR -2
#define UNICODE_NOT_SURROGATE_PAIR -3
#define UNICODE_BAD_UTF8 -4
#define UNICODE_EMPTY_INPUT -5
#define UNICODE_OK 0

#line 24 "unicode.c"
int utf8_to_ucs2 (const unsigned char * input , const unsigned char ** end_ptr );

#line 70 "unicode.c"
int ucs2_to_utf8 (int ucs2 , unsigned char * utf8 );

#line 108 "unicode.c"
int surrogate_to_utf8 (int hi , int lo , unsigned char * utf8 );

#line 129 "unicode.c"
int unicode_to_surrogates (unsigned unicode , unsigned * hi_ptr , unsigned * lo_ptr );

#line 149 "unicode.c"
int unicode_chars_to_bytes (const unsigned char * utf8 , int n_chars );

#line 166 "unicode.c"
int unicode_count_chars (const unsigned char * utf8 );

#line 189 "unicode.c"
#define VALID_UTF8 1
#define INVALID_UTF8 0

#line 251 "unicode.c"
int valid_utf8 (const unsigned char * input , int input_length );

#line 389 "unicode.c"

#ifdef TEST
void print_bytes (const unsigned char * bytes );

#line 411 "unicode.c"
void test_ucs2_to_utf8 (const unsigned char * input , int * count );

#endif /* def TEST */

#endif /* CFH_UNICODE_H */