summaryrefslogtreecommitdiff
path: root/xs_unicode.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-08-05 06:01:21 +0200
committerdefault <nobody@localhost>2024-08-05 06:01:21 +0200
commit972c3dc5d43a114ae59386d4edfdfb8ce0f3793e (patch)
tree2568b6190dc0ca34478ccabc1191e504d1e8cfcf /xs_unicode.h
parente9b108a6e0f09d74ee605f1a854ecbdc12a65c92 (diff)
Added support for listening on unix sockets.
Diffstat (limited to 'xs_unicode.h')
-rw-r--r--xs_unicode.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/xs_unicode.h b/xs_unicode.h
index 1799d89..2e9a754 100644
--- a/xs_unicode.h
+++ b/xs_unicode.h
@@ -4,7 +4,7 @@
#define _XS_UNICODE_H
- int _xs_utf8_enc(char buf[4], unsigned int cpoint);
+ int xs_utf8_enc(char buf[4], unsigned int cpoint);
int xs_is_utf8_cont_byte(char c);
unsigned int xs_utf8_dec(const char **str);
int xs_unicode_width(unsigned int cpoint);
@@ -22,7 +22,7 @@
int xs_unicode_is_alpha(unsigned int cpoint);
#ifdef _XS_H
- xs_str *xs_utf8_enc(xs_str *str, unsigned int cpoint);
+ xs_str *xs_utf8_cat(xs_str *str, unsigned int cpoint);
#endif
#ifdef XS_IMPLEMENTATION
@@ -31,7 +31,7 @@
#define xs_countof(a) (sizeof((a)) / sizeof((*a)))
#endif
-int _xs_utf8_enc(char buf[4], unsigned int cpoint)
+int xs_utf8_enc(char buf[4], unsigned int cpoint)
/* encodes an Unicode codepoint to utf-8 into buf and returns the size in bytes */
{
char *p = buf;
@@ -172,12 +172,12 @@ unsigned int xs_surrogate_enc(unsigned int cpoint)
#ifdef _XS_H
-xs_str *xs_utf8_enc(xs_str *str, unsigned int cpoint)
+xs_str *xs_utf8_cat(xs_str *str, unsigned int cpoint)
/* encodes an Unicode codepoint to utf-8 into str */
{
char tmp[4];
- int c = _xs_utf8_enc(tmp, cpoint);
+ int c = xs_utf8_enc(tmp, cpoint);
return xs_append_m(str, tmp, c);
}