1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Use unicode_val_T instead of uint16_t for unicode data + cell count fix.

This commit is contained in:
Pavol Babincak 2006-04-09 17:04:47 +02:00 committed by Pavol Babincak
parent c8a6a4c44d
commit 161ccf9eae
3 changed files with 6 additions and 5 deletions

View File

@ -303,7 +303,7 @@ render_dom_line(struct dom_renderer *renderer, struct screen_char *template,
charlen = utf8charlen(text);
data = utf_8_to_unicode(&text, end);
template->data = (uint16_t)data;
template->data = (unicode_val_T)data;
if (unicode_to_cell(data) == 2) {
copy_screen_chars(POS(renderer),

View File

@ -443,13 +443,14 @@ add_document_line(struct plain_renderer *renderer,
continue;
}
template->data = (uint16_t)data;
template->data = (unicode_val_T)data;
copy_screen_chars(pos++, template, 1);
if (unicode_to_cell(data) == 2) {
template->data = UCS_NO_CHAR;
copy_screen_chars(pos++,
template, 1);
template, 1);
cell++;
}
} else
#endif /* CONFIG_UTF_8 */

View File

@ -369,7 +369,7 @@ utf_8:
int x;
for (x = 0; x < document->data[y].length; x++) {
uint16_t data = pos->data;
unicode_val_T data = pos->data;
unsigned int frame = (pos->attr & SCREEN_ATTR_FRAME);
if (!isscreensafe(data)) {
@ -475,7 +475,7 @@ utf_8:
int x;
for (x = 0; x < document->data[y].length; x++) {
uint16_t c;
unicode_val_T c;
unsigned char attr = document->data[y].chars[x].attr;
c = document->data[y].chars[x].data;