From 582674e662d1f8757350c51486a5e0a837195e15 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Tue, 2 Sep 2014 13:18:04 +0200 Subject: ffffix --- src/utf8.h | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 src/utf8.h (limited to 'src/utf8.h') diff --git a/src/utf8.h b/src/utf8.h deleted file mode 100644 index fe59a90..0000000 --- a/src/utf8.h +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include "bstrlib.h" - -extern unsigned char * from_utf8(unsigned char * s, unsigned int *n); -extern int to_utf8(unsigned int c, bstring dest); -extern bstring case_fold(bstring source); -- cgit v1.2.3 From a5cf11dac52606141dd246f88d8c59688462e395 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sat, 6 Sep 2014 20:48:54 +0200 Subject: Entity declarations --- src/utf8.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/utf8.h (limited to 'src/utf8.h') diff --git a/src/utf8.h b/src/utf8.h new file mode 100644 index 0000000..1e4e556 --- /dev/null +++ b/src/utf8.h @@ -0,0 +1,12 @@ +#ifndef _H_STMD_UTF8_ +#define _H_STMD_UTF8_ + +#include "buffer.h" + +void utf8proc_case_fold(strbuf *dest, const unsigned char *str, int len); +void utf8proc_encode_char(int32_t uc, strbuf *buf); +ssize_t utf8proc_iterate(const uint8_t *str, ssize_t str_len, int32_t *dst); +ssize_t utf8proc_charlen(const uint8_t *str, ssize_t str_len); +void utf8proc_detab(strbuf *dest, const unsigned char *line, size_t size); + +#endif -- cgit v1.2.3 From 94a79a605f3e76a43f1f87a5044f6761b99e5ca5 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 10 Sep 2014 18:33:27 +0200 Subject: Cleanup reference implementation --- src/utf8.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/utf8.h') diff --git a/src/utf8.h b/src/utf8.h index 1e4e556..9506b75 100644 --- a/src/utf8.h +++ b/src/utf8.h @@ -1,12 +1,13 @@ #ifndef _H_STMD_UTF8_ #define _H_STMD_UTF8_ +#include #include "buffer.h" -void utf8proc_case_fold(strbuf *dest, const unsigned char *str, int len); +void utf8proc_case_fold(strbuf *dest, const uint8_t *str, int len); void utf8proc_encode_char(int32_t uc, strbuf *buf); ssize_t utf8proc_iterate(const uint8_t *str, ssize_t str_len, int32_t *dst); ssize_t utf8proc_charlen(const uint8_t *str, ssize_t str_len); -void utf8proc_detab(strbuf *dest, const unsigned char *line, size_t size); +void utf8proc_detab(strbuf *dest, const uint8_t *line, size_t size); #endif -- cgit v1.2.3 From c47e3a34adac00a262f72c6d17a1c87deefa33c4 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 10 Sep 2014 19:39:03 +0200 Subject: Fix infinite loop when case folding invalid UTF8 chars --- src/utf8.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utf8.h') diff --git a/src/utf8.h b/src/utf8.h index 9506b75..c971250 100644 --- a/src/utf8.h +++ b/src/utf8.h @@ -6,8 +6,8 @@ void utf8proc_case_fold(strbuf *dest, const uint8_t *str, int len); void utf8proc_encode_char(int32_t uc, strbuf *buf); -ssize_t utf8proc_iterate(const uint8_t *str, ssize_t str_len, int32_t *dst); -ssize_t utf8proc_charlen(const uint8_t *str, ssize_t str_len); +int utf8proc_iterate(const uint8_t *str, int str_len, int32_t *dst); +int utf8proc_charlen(const uint8_t *str, int str_len); void utf8proc_detab(strbuf *dest, const uint8_t *line, size_t size); #endif -- cgit v1.2.3