Differences From Artifact [8b3b315d4d]:
- File
src/encodings/common.h
— part of check-in
[405d11522e]
at
2017-02-12 23:56:13
on branch trunk
— encodings: Make the page tables unsigned char[]
This also removes page.*Size, as the macros can just use sizeof() on the
arrays. (user: js, size: 1686) [annotate] [blame] [check-ins using]
To Artifact [321ef98b23]:
- File src/encodings/common.h — part of check-in [31c0f5b89e] at 2017-10-22 14:09:23 on branch 0.90 — Make Apple GCC with -Wshadow happy (user: js, size: 1671) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
17 18 19 20 21 22 23 |
#define CASE_MISSING_IS_KEEP(nr) \
case nr: \
if OF_UNLIKELY ((c & 0xFF) < page##nr##Start) { \
output[i] = (unsigned char)c; \
continue; \
} \
\
| | | | | | | | | 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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
#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; \
} \
\
output[i] = page##nr[idx]; \
break;
#define CASE_MISSING_IS_ERROR(nr) \
case 0x##nr: \
if OF_UNLIKELY ((c & 0xFF) < page##nr##Start) { \
if (lossy) { \
output[i] = '?'; \
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;
|