diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:34:46 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:34:46 +0000 |
commit | 2777a04ed2ba4fd36138b991d66a32a283361f7e (patch) | |
tree | b0c3730533c36ca41402b6d0c5b98413f0a57bee /include/parserutils/charset/utf16.h | |
download | libparserutils-2777a04ed2ba4fd36138b991d66a32a283361f7e.tar.gz libparserutils-2777a04ed2ba4fd36138b991d66a32a283361f7e.tar.bz2 |
Import parser construction utility library
svn path=/trunk/libparserutils/; revision=4111
Diffstat (limited to 'include/parserutils/charset/utf16.h')
-rw-r--r-- | include/parserutils/charset/utf16.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/parserutils/charset/utf16.h b/include/parserutils/charset/utf16.h new file mode 100644 index 0000000..6569d6e --- /dev/null +++ b/include/parserutils/charset/utf16.h @@ -0,0 +1,38 @@ +/* + * This file is part of LibParserUtils. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> + */ + +/** \file + * UTF-16 manipulation functions (interface). + */ + +#ifndef parserutils_charset_utf16_h_ +#define parserutils_charset_utf16_h_ + +#include <inttypes.h> + +#include <parserutils/errors.h> + +parserutils_error parserutils_charset_utf16_to_ucs4(const uint8_t *s, + size_t len, uint32_t *ucs4, size_t *clen); +parserutils_error parserutils_charset_utf16_from_ucs4(uint32_t ucs4, + uint8_t *s, size_t *len); + +parserutils_error parserutils_charset_utf16_length(const uint8_t *s, + size_t max, size_t *len); +parserutils_error parserutils_charset_utf16_char_byte_length(const uint8_t *s, + size_t *len); + +parserutils_error parserutils_charset_utf16_prev(const uint8_t *s, + uint32_t off, uint32_t *prevoff); +parserutils_error parserutils_charset_utf16_next(const uint8_t *s, + uint32_t len, uint32_t off, uint32_t *nextoff); + +parserutils_error parserutils_charset_utf16_next_paranoid(const uint8_t *s, + uint32_t len, uint32_t off, uint32_t *nextoff); + +#endif + |