diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2003-12-13 20:59:11 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2003-12-13 20:59:11 +0000 |
commit | 00c9059f3889ea6b69926349a853c504d75bdea7 (patch) | |
tree | f1ff2b097a83a5463359154f9721da830a98f5ec /chinese/irssi | |
parent | cd5ded6a17d24a8f1c66eb3b5e61f43111c5a01d (diff) | |
download | ports-00c9059f3889ea6b69926349a853c504d75bdea7.tar.gz ports-00c9059f3889ea6b69926349a853c504d75bdea7.zip |
Notes
Diffstat (limited to 'chinese/irssi')
4 files changed, 64 insertions, 20 deletions
diff --git a/chinese/irssi/files/patch-src::fe-text::gui-entry.h b/chinese/irssi/files/patch-src::fe-text::gui-entry.h deleted file mode 100644 index 6bdd61b4737b..000000000000 --- a/chinese/irssi/files/patch-src::fe-text::gui-entry.h +++ /dev/null @@ -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); diff --git a/chinese/irssi/files/patch-src::fe-text::gui-printtext.c b/chinese/irssi/files/patch-src::fe-text::gui-printtext.c new file mode 100644 index 000000000000..7833a289a463 --- /dev/null +++ b/chinese/irssi/files/patch-src::fe-text::gui-printtext.c @@ -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; + } + diff --git a/chinese/irssi/files/patch-src::fe-text::term-terminfo.c b/chinese/irssi/files/patch-src::fe-text::term-terminfo.c new file mode 100644 index 000000000000..03780431111b --- /dev/null +++ b/chinese/irssi/files/patch-src::fe-text::term-terminfo.c @@ -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) diff --git a/chinese/irssi/files/patch-src::fe-text::textbuffer-view.c b/chinese/irssi/files/patch-src::fe-text::textbuffer-view.c new file mode 100644 index 000000000000..d3e02fc8c355 --- /dev/null +++ b/chinese/irssi/files/patch-src::fe-text::textbuffer-view.c @@ -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; |