|
Libparserutils
|
00001 /* 00002 * This file is part of LibParserUtils. 00003 * Licensed under the MIT License, 00004 * http://www.opensource.org/licenses/mit-license.php 00005 * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> 00006 */ 00007 00012 #ifndef parserutils_charset_utf16_h_ 00013 #define parserutils_charset_utf16_h_ 00014 00015 #ifdef __cplusplus 00016 extern "C" 00017 { 00018 #endif 00019 00020 #include <inttypes.h> 00021 00022 #include <parserutils/errors.h> 00023 00024 parserutils_error parserutils_charset_utf16_to_ucs4(const uint8_t *s, 00025 size_t len, uint32_t *ucs4, size_t *clen); 00026 parserutils_error parserutils_charset_utf16_from_ucs4(uint32_t ucs4, 00027 uint8_t *s, size_t *len); 00028 00029 parserutils_error parserutils_charset_utf16_length(const uint8_t *s, 00030 size_t max, size_t *len); 00031 parserutils_error parserutils_charset_utf16_char_byte_length(const uint8_t *s, 00032 size_t *len); 00033 00034 parserutils_error parserutils_charset_utf16_prev(const uint8_t *s, 00035 uint32_t off, uint32_t *prevoff); 00036 parserutils_error parserutils_charset_utf16_next(const uint8_t *s, 00037 uint32_t len, uint32_t off, uint32_t *nextoff); 00038 00039 parserutils_error parserutils_charset_utf16_next_paranoid(const uint8_t *s, 00040 uint32_t len, uint32_t off, uint32_t *nextoff); 00041 00042 #ifdef __cplusplus 00043 } 00044 #endif 00045 00046 #endif 00047
1.7.3