Forgotten to add patch-files.

Submitted by:	Kuang-che Wu <kcwu@kcwu.homeip.net>
This commit is contained in:
Vanilla I. Shu 2003-12-13 20:59:11 +00:00
parent cd5ded6a17
commit 00c9059f38
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=95746
4 changed files with 64 additions and 20 deletions

View file

@ -1,20 +0,0 @@
--- src/fe-text/gui-entry.h.orig Mon Oct 20 03:10:02 2003
+++ src/fe-text/gui-entry.h Sun Dec 7 16:34:09 2003
@@ -28,14 +28,14 @@
void gui_entry_move(GUI_ENTRY_REC *entry, int xpos, int ypos, int width);
void gui_entry_set_active(GUI_ENTRY_REC *entry);
-void gui_entry_set_prompt(GUI_ENTRY_REC *entry, const char *str);
+void gui_entry_set_prompt(GUI_ENTRY_REC *entry, const unsigned char *str);
void gui_entry_set_hidden(GUI_ENTRY_REC *entry, int hidden);
void gui_entry_set_utf8(GUI_ENTRY_REC *entry, int utf8);
-void gui_entry_set_text(GUI_ENTRY_REC *entry, const char *str);
+void gui_entry_set_text(GUI_ENTRY_REC *entry, const unsigned char *str);
char *gui_entry_get_text(GUI_ENTRY_REC *entry);
-void gui_entry_insert_text(GUI_ENTRY_REC *entry, const char *str);
+void gui_entry_insert_text(GUI_ENTRY_REC *entry, const unsigned char *str);
void gui_entry_insert_char(GUI_ENTRY_REC *entry, unichar chr);
char *gui_entry_get_cutbuffer(GUI_ENTRY_REC *entry);

View file

@ -0,0 +1,11 @@
--- src/fe-text/gui-printtext.c.orig Mon Dec 30 00:10:02 2002
+++ src/fe-text/gui-printtext.c Sun Dec 14 01:54:28 2003
@@ -255,7 +255,7 @@
if (flags & GUI_PRINT_FLAG_CLRTOEOL)
term_clrtoeol(root_window);
term_addstr(root_window, str);
- next_xpos += strlen(str);
+ next_xpos += strlen(str); // FIXME utf8 or big5
return;
}

View file

@ -0,0 +1,35 @@
--- src/fe-text/term-terminfo.c.orig Mon Oct 20 03:10:02 2003
+++ src/fe-text/term-terminfo.c Sun Dec 14 01:54:28 2003
@@ -421,16 +421,21 @@
if (vcy == term_height-1 && vcx == term_width-1)
return; /* last char in screen */
- term_printed_text(1);
switch (term_type) {
case TERM_TYPE_UTF8:
+ term_printed_text(utf8_width(chr));
term_addch_utf8(window, chr);
break;
case TERM_TYPE_BIG5:
- putc((chr >> 8) & 0xff, window->term->out);
+ if(chr>0xff) {
+ term_printed_text(2);
+ putc((chr >> 8) & 0xff, window->term->out);
+ } else
+ term_printed_text(1);
putc((chr & 0xff), window->term->out);
break;
default:
+ term_printed_text(1);
putc(chr, window->term->out);
break;
}
@@ -443,7 +448,7 @@
if (term_detached) return;
if (vcmove) term_move_real();
- len = strlen(str);
+ len = strlen(str); // FIXME utf8 or big5
term_printed_text(len);
if (vcy != term_height || vcx != 0)

View file

@ -0,0 +1,18 @@
--- src/fe-text/textbuffer-view.c.orig Sun Oct 26 13:45:02 2003
+++ src/fe-text/textbuffer-view.c Sun Dec 14 01:54:28 2003
@@ -435,7 +435,14 @@
unichar chr = get_utf8_char(&end, 6);
char_width = utf8_width(chr);
} else {
- char_width = 1;
+ if(term_type==TERM_TYPE_BIG5) {
+ if(is_big5(end[0],end[1]))
+ char_width=2;
+ else
+ char_width=1;
+ } else
+ char_width = 1;
+ end+=char_width-1;
}
xpos += char_width;