1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00

[utf8] Fix compilation -Dutf-8=false

This commit is contained in:
Witold Filipczyk 2022-05-07 19:31:57 +02:00
parent a753253b10
commit b9188bf98c
2 changed files with 8 additions and 0 deletions

View File

@ -311,12 +311,16 @@ draw_blockquote_chars(struct part *part, int y, struct html_context *html_contex
schar->data = '>';
for (i = 1; i < par_elformat.blockquote_level; i++) {
copy_screen_chars(&POS(x, y), schar, 1);
#ifdef CONFIG_UTF8
if (part->char_width) part->char_width[x] = 1;
#endif
x++;
}
schar->data = ' ';
copy_screen_chars(&POS(x, y), schar, 1);
#ifdef CONFIG_UTF8
if (part->char_width) part->char_width[x] = 1;
#endif
}
void

View File

@ -983,7 +983,9 @@ copy_to_clipboard2(struct document_view *doc_view)
struct document *document = doc_view->document;
struct string data;
int starty, endy, startx, y, endx;
#ifdef CONFIG_UTF8
int utf8;
#endif
if (document->clipboard_status == CLIPBOARD_NONE) {
return FRAME_EVENT_OK;
@ -1009,7 +1011,9 @@ copy_to_clipboard2(struct document_view *doc_view)
startx = int_max(document->clipboard_box.x + document->clipboard_box.width, 0);
}
#ifdef CONFIG_UTF8
utf8 = document->options.utf8;
#endif
for (y = starty; y <= endy; y++) {
int ex = int_min(endx, document->data[y].length - 1);