diff options
| author | 2024-05-21 14:12:15 +0200 | |
|---|---|---|
| committer | 2024-05-21 14:12:15 +0200 | |
| commit | 4777fc86cb962917a8f34afb3bfa40f26290815d (patch) | |
| tree | 268c078531a018f07c1b6d029f14f87134805f7b /xs_unicode.h | |
| parent | Version 2.53 RELEASED. (diff) | |
| download | penes-snac2-4777fc86cb962917a8f34afb3bfa40f26290815d.tar.gz penes-snac2-4777fc86cb962917a8f34afb3bfa40f26290815d.tar.xz penes-snac2-4777fc86cb962917a8f34afb3bfa40f26290815d.zip | |
Added const everywhere.
Diffstat (limited to 'xs_unicode.h')
| -rw-r--r-- | xs_unicode.h | 6 |
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 | ||
| 69 | unsigned int xs_utf8_dec(char **str) | 69 | unsigned 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; |