Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/converters/iconv-extra/files/patch-ces__unicode-1-1-utf-7.c
16461 views
1
Index: ces/unicode-1-1-utf-7.c
2
===================================================================
3
RCS file: /home/bbcvs/iconv/ces/unicode-1-1-utf-7.c,v
4
retrieving revision 1.2
5
--- ces/unicode-1-1-utf-7.c.orig 2024-06-07 14:57:13 UTC
6
+++ ces/unicode-1-1-utf-7.c
7
@@ -33,7 +33,7 @@
8
#include <stdlib.h>
9
10
#define ICONV_INTERNAL
11
-#include <iconv.h>
12
+#include <biconv.h>
13
14
static inline int
15
lackofbytes(int bytes, size_t *bytesleft)
16
@@ -230,7 +230,7 @@ static ucs_t convert_to_ucs(struct iconv_ces *module,
17
if (*inbytesleft < 2)
18
return UCS_CHAR_NONE;
19
needbytes = 1;
20
- ch = char_type(*(++((unsigned char *)*inbuf)));
21
+ ch = char_type(*(++*inbuf));
22
(*inbytesleft) --;
23
case utf7_printable:
24
utf7_state[0] = 0;
25
@@ -246,7 +246,7 @@ static ucs_t convert_to_ucs(struct iconv_ces *module,
26
(*inbytesleft) += needbytes;
27
return UCS_CHAR_NONE;
28
}
29
- switch (char_type(*(++(unsigned char *)*inbuf))) {
30
+ switch (char_type(*(++*inbuf))) {
31
case utf7_shift_out:
32
(*inbuf) ++;
33
(*inbytesleft) -= 2;
34
@@ -264,7 +264,7 @@ static ucs_t convert_to_ucs(struct iconv_ces *module,
35
return UCS_CHAR_INVALID;
36
}
37
(*inbytesleft) --;
38
- return *((unsigned char *)*inbuf) ++;
39
+ return *(*inbuf)++;
40
#undef utf7_state
41
}
42
43
44