diff options
author | Shawn Landden <shawn@churchofgit.com> | 2015-12-13 14:26:43 -0800 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2016-01-27 14:10:02 +0100 |
commit | c932fb71cc90461b88ecdffe47c071d001d78fb4 (patch) | |
tree | 7cf4835039617e8840434e28dec2ea0fb37b71ca /src/basic/escape.h | |
parent | 9766c16bd08bd6714064ee950798a6db0874b048 (diff) |
utf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, int16_t
rework C11 utf8.[ch] to use char32_t instead of uint32_t when referring
to unicode chars, to make things more expressive.
[
@zonque:
* rebased to current master
* use AC_CHECK_DECLS to detect availibility of char{16,32}_t
* make utf8_encoded_to_unichar() return int
]
Diffstat (limited to 'src/basic/escape.h')
-rw-r--r-- | src/basic/escape.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/escape.h b/src/basic/escape.h index d943aa71f5..ac8f5f3910 100644 --- a/src/basic/escape.h +++ b/src/basic/escape.h @@ -25,8 +25,10 @@ #include <stddef.h> #include <stdint.h> #include <sys/types.h> +#include <uchar.h> #include "string-util.h" +#include "missing.h" /* What characters are special in the shell? */ /* must be escaped outside and inside double-quotes */ @@ -45,7 +47,7 @@ size_t cescape_char(char c, char *buf); int cunescape(const char *s, UnescapeFlags flags, char **ret); int cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret); int cunescape_length_with_prefix(const char *s, size_t length, const char *prefix, UnescapeFlags flags, char **ret); -int cunescape_one(const char *p, size_t length, uint32_t *ret, bool *eight_bit); +int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit); char *xescape(const char *s, const char *bad); |