14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#define CASE_MISSING_IS_KEEP(nr) \
case nr: \
if OF_UNLIKELY ((c & 0xFF) < page##nr##Start) { \
output[i] = (unsigned char)c; \
continue; \
} \
\
idx = (c & 0xFF) - page##nr##Start; \
\
if (idx >= sizeof(page##nr)) { \
output[i] = (unsigned char)c; \
continue; \
} \
\
if (page##nr[idx] == 0x00) { \
if (lossy) { \
output[i] = '?'; \
continue; \
} else \
return false; \
} \
\
|
|
|
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#define CASE_MISSING_IS_KEEP(nr) \
case 0x##nr: \
if OF_UNLIKELY ((c & 0xFF) < page##nr##Start) { \
output[i] = (unsigned char)c; \
continue; \
} \
\
idx = (c & 0xFF) - page##nr##Start; \
\
if (idx >= sizeof(page##nr)) { \
output[i] = (unsigned char)c; \
continue; \
} \
\
if (page##nr[idx] == 0) { \
if (lossy) { \
output[i] = '?'; \
continue; \
} else \
return false; \
} \
\
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
continue; \
} else \
return false; \
} \
\
idx = (c & 0xFF) - page##nr##Start; \
\
if (idx >= sizeof(page##nr) || page##nr[idx] == 0) { \
if (lossy) { \
output[i] = '?'; \
continue; \
} else \
return false; \
} \
\
output[i] = page##nr[idx]; \
break;
|
|
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
continue; \
} else \
return false; \
} \
\
idx = (c & 0xFF) - page##nr##Start; \
\
if (idx >= sizeof(page##nr) || page##nr[idx] == 0) { \
if (lossy) { \
output[i] = '?'; \
continue; \
} else \
return false; \
} \
\
output[i] = page##nr[idx]; \
break;
|