summaryrefslogtreecommitdiff
path: root/xs_unicode.h
diff options
context:
space:
mode:
authorGravatar default2024-05-21 14:12:15 +0200
committerGravatar default2024-05-21 14:12:15 +0200
commit4777fc86cb962917a8f34afb3bfa40f26290815d (patch)
tree268c078531a018f07c1b6d029f14f87134805f7b /xs_unicode.h
parentVersion 2.53 RELEASED. (diff)
downloadsnac2-4777fc86cb962917a8f34afb3bfa40f26290815d.tar.gz
snac2-4777fc86cb962917a8f34afb3bfa40f26290815d.tar.xz
snac2-4777fc86cb962917a8f34afb3bfa40f26290815d.zip
Added const everywhere.
Diffstat (limited to 'xs_unicode.h')
-rw-r--r--xs_unicode.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/xs_unicode.h b/xs_unicode.h
index 6654da4..1799d89 100644
--- a/xs_unicode.h
+++ b/xs_unicode.h
@@ -6,7 +6,7 @@
6 6
7 int _xs_utf8_enc(char buf[4], unsigned int cpoint); 7 int _xs_utf8_enc(char buf[4], unsigned int cpoint);
8 int xs_is_utf8_cont_byte(char c); 8 int xs_is_utf8_cont_byte(char c);
9 unsigned int xs_utf8_dec(char **str); 9 unsigned int xs_utf8_dec(const char **str);
10 int xs_unicode_width(unsigned int cpoint); 10 int xs_unicode_width(unsigned int cpoint);
11 int xs_is_surrogate(unsigned int cpoint); 11 int xs_is_surrogate(unsigned int cpoint);
12 unsigned int xs_surrogate_dec(unsigned int p1, unsigned int p2); 12 unsigned int xs_surrogate_dec(unsigned int p1, unsigned int p2);
@@ -66,10 +66,10 @@ int xs_is_utf8_cont_byte(char c)
66} 66}
67 67
68 68
69unsigned int xs_utf8_dec(char **str) 69unsigned int xs_utf8_dec(const char **str)
70/* decodes an utf-8 char inside str and updates the pointer */ 70/* decodes an utf-8 char inside str and updates the pointer */
71{ 71{
72 char *p = *str; 72 const char *p = *str;
73 unsigned int cpoint = 0; 73 unsigned int cpoint = 0;
74 unsigned char c = *p++; 74 unsigned char c = *p++;
75 int cb = 0; 75 int cb = 0;