summaryrefslogtreecommitdiff
path: root/src/basic/escape.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-27 14:25:47 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-27 14:25:47 +0100
commit770350f41ceadd17b3b982627ed67a74a87603f4 (patch)
treed49263489849e04c14c268dd56a04f1f9aeea235 /src/basic/escape.c
parentfdb4ee00f022863ceee923b196f9c6dd536db9e2 (diff)
parentc932fb71cc90461b88ecdffe47c071d001d78fb4 (diff)
Merge pull request #2451 from zonque/pr-2162-rebased
utf8.[ch] et al: use char32_t and char16_t instead of int, int32_t, i…
Diffstat (limited to 'src/basic/escape.c')
-rw-r--r--src/basic/escape.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/escape.c b/src/basic/escape.c
index 5661f36813..f276c36c56 100644
--- a/src/basic/escape.c
+++ b/src/basic/escape.c
@@ -119,7 +119,7 @@ char *cescape(const char *s) {
return cescape_length(s, strlen(s));
}
-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) {
int r = 1;
assert(p);
@@ -230,7 +230,7 @@ int cunescape_one(const char *p, size_t length, uint32_t *ret, bool *eight_bit)
int a[8];
unsigned i;
- uint32_t c;
+ char32_t c;
if (length != (size_t) -1 && length < 9)
return -EINVAL;
@@ -267,7 +267,7 @@ int cunescape_one(const char *p, size_t length, uint32_t *ret, bool *eight_bit)
case '7': {
/* octal encoding */
int a, b, c;
- uint32_t m;
+ char32_t m;
if (length != (size_t) -1 && length < 3)
return -EINVAL;
@@ -327,8 +327,8 @@ int cunescape_length_with_prefix(const char *s, size_t length, const char *prefi
for (f = s, t = r + pl; f < s + length; f++) {
size_t remaining;
- uint32_t u;
bool eight_bit = false;
+ char32_t u;
int k;
remaining = s + length - f;