diff options
Diffstat (limited to 'src/sys/encoding.h')
| -rw-r--r-- | src/sys/encoding.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/sys/encoding.h b/src/sys/encoding.h new file mode 100644 index 0000000..386d319 --- /dev/null +++ b/src/sys/encoding.h @@ -0,0 +1,24 @@ +#ifndef TINY_CONVMEM_SYS_ENCODING_H +#define TINY_CONVMEM_SYS_ENCODING_H + +#include <stddef.h> +#include <stdint.h> + +typedef enum tiny_encoding_status +{ + TINY_ENCODING_OK = 0, + TINY_ENCODING_INVALID, + TINY_ENCODING_NO_MEMORY, + TINY_ENCODING_OVERFLOW +} tiny_encoding_status_t; + +tiny_encoding_status_t tiny_utf8_to_utf16(const char *input, + size_t input_length, + uint16_t **output, + size_t *output_length); +tiny_encoding_status_t tiny_utf16_to_utf8(const uint16_t *input, + size_t input_length, + char **output, + size_t *output_length); + +#endif |
