aboutsummaryrefslogtreecommitdiff
path: root/chinese/bitchx
diff options
context:
space:
mode:
authorClive Lin <clive@FreeBSD.org>2001-01-08 18:27:17 +0000
committerClive Lin <clive@FreeBSD.org>2001-01-08 18:27:17 +0000
commit2be565a241c6287efa436b85d89233a4d82d3cbc (patch)
treecaa9a32956e0d44daab6f2696c09429ca4165e8a /chinese/bitchx
parent86d168e54a0a42c524f33449b84e52c65b33d618 (diff)
downloadports-2be565a241c6287efa436b85d89233a4d82d3cbc.tar.gz
ports-2be565a241c6287efa436b85d89233a4d82d3cbc.zip
Notes
Diffstat (limited to 'chinese/bitchx')
-rw-r--r--chinese/bitchx/Makefile22
-rw-r--r--chinese/bitchx/files/patch-include::config.h42
-rw-r--r--chinese/bitchx/files/patch-source::input.c118
-rw-r--r--chinese/bitchx/files/patch-source::screen.c33
-rw-r--r--chinese/bitchx/pkg-comment1
5 files changed, 216 insertions, 0 deletions
diff --git a/chinese/bitchx/Makefile b/chinese/bitchx/Makefile
new file mode 100644
index 000000000000..4dfc159d8828
--- /dev/null
+++ b/chinese/bitchx/Makefile
@@ -0,0 +1,22 @@
+# New ports collection makefile for: BitchX
+# Date created: Mon Jan 8 2001
+# Whom: clive
+#
+# $FreeBSD$
+#
+
+MASTERDIR= ${.CURDIR}/../../irc/bitchx
+EXTRA_PATCHES= ${.CURDIR}/files/patch-source::input.c \
+ ${.CURDIR}/files/patch-include::config.h \
+ ${.CURDIR}/files/patch-source::screen.c
+
+WITH_LATIN= yes
+
+.include "${MASTERDIR}/Makefile"
+
+PORTNAME= BitchX
+PKGNAMEPREFIX:= ${PKGNAMEPREFIX}tw-
+CATEGORIES= chinese irc
+
+MAINTAINER= clive@FreeBSD.org
+
diff --git a/chinese/bitchx/files/patch-include::config.h b/chinese/bitchx/files/patch-include::config.h
new file mode 100644
index 000000000000..ed1dbe3364f2
--- /dev/null
+++ b/chinese/bitchx/files/patch-include::config.h
@@ -0,0 +1,42 @@
+--- include/config.h.orig Tue Jan 9 01:51:42 2001
++++ include/config.h Tue Jan 9 02:03:44 2001
+@@ -52,7 +52,7 @@
+ * have a continuation char.
+ */
+ #define DEFAULT_SERVER "[ODNet] "\
+- "irc.bitchx.com "\
++ "irc.taiwan.com "\
+ "[efnet] "\
+ "irc.total.net "\
+ "ircd.c-com.net "\
+@@ -479,7 +479,7 @@
+
+ #define DEFAULT_HTTP_GRAB OFF
+ #define DEFAULT_HELP_WINDOW OFF
+-#define DEFAULT_NICK_COMPLETION ON
++#define DEFAULT_NICK_COMPLETION OFF
+ #define DEFAULT_NICK_COMPLETION_LEN 2
+ #define DEFAULT_NICK_COMPLETION_TYPE 0 /* 0 1 2 */
+ #define DEFAULT_NOTIFY ON
+@@ -514,9 +514,9 @@
+ #define DEFAULT_AINV 0
+ #define DEFAULT_ANNOY_KICK OFF
+ #define DEFAULT_AOP_VAR OFF
+-#define DEFAULT_AUTO_AWAY ON
+-#define DEFAULT_KICK_OPS ON
+-#define DEFAULT_AUTO_REJOIN ON
++#define DEFAULT_AUTO_AWAY OFF
++#define DEFAULT_KICK_OPS OFF
++#define DEFAULT_AUTO_REJOIN OFF
+ #define DEFAULT_DEOPFLOOD ON
+ #if defined(__EMXPM__) || defined(WIN32)
+ #define DEFAULT_CODEPAGE 437
+@@ -757,7 +757,7 @@
+ #endif
+
+ #undef PARANOID /* #define this if your paranoid about dcc hijacking */
+-#undef WANT_CHAN_NICK_SERV /* do we want to include some chan/nick/oper server commands */
++#define WANT_CHAN_NICK_SERV /* do we want to include some chan/nick/oper server commands */
+
+ /* new epic stuff */
+ #define OLD_STATUS_S_EXPANDO_BEHAVIOR
diff --git a/chinese/bitchx/files/patch-source::input.c b/chinese/bitchx/files/patch-source::input.c
new file mode 100644
index 000000000000..473a1572e1a8
--- /dev/null
+++ b/chinese/bitchx/files/patch-source::input.c
@@ -0,0 +1,118 @@
+--- source/input.c~ Mon Jan 8 15:06:30 2001
++++ source/input.c Mon Jan 8 01:09:28 2001
+@@ -89,6 +89,7 @@
+ #define MIN_CHAR INPUT_BUFFER[MIN_POS]
+ #define PREV_CHAR INPUT_BUFFER[THIS_POS-1]
+ #define NEXT_CHAR INPUT_BUFFER[THIS_POS+1]
++#define NTH_CHAR(offset) INPUT_BUFFER[THIS_POS+(offset)]
+ #define ADD_TO_INPUT(x) strmcat(INPUT_BUFFER, (x), INPUT_BUFFER_SIZE);
+ #define INPUT_ONSCREEN current_screen->input_visible
+ #define INPUT_VISIBLE INPUT_BUFFER[INPUT_ONSCREEN]
+@@ -473,6 +474,13 @@
+ {
+ if (THIS_CHAR)
+ {
++#ifdef WANT_BIG5
++ if (NEXT_CHAR && is_big5(THIS_CHAR,NEXT_CHAR) )
++ {
++ THIS_POS++;
++ term_cursor_right();
++ }
++#endif /* WANT_BIG5 */
+ THIS_POS++;
+ term_cursor_right();
+ }
+@@ -483,6 +491,13 @@
+ {
+ THIS_POS--;
+ term_cursor_left();
++#ifdef WANT_BIG5
++ if (is_big5(PREV_CHAR,THIS_CHAR))
++ {
++ THIS_POS--;
++ term_cursor_left();
++ }
++#endif /* WANT_BIG5 */
+ }
+ }
+ update_input(NO_UPDATE);
+@@ -577,15 +592,33 @@
+ BUILT_IN_KEYBINDING(input_delete_character)
+ {
+ int pos;
++#ifdef WANT_BIG5
++ int count=1 ;
++ int big5_delete=0 ;
++#endif
+ cursor_to_input();
+ in_completion = STATE_NORMAL;
+ if (!THIS_CHAR)
+ return;
++#ifdef WANT_BIG5
++ if ((THIS_CHAR && NEXT_CHAR) && is_big5(THIS_CHAR, NEXT_CHAR))
++ {
++ ov_strcpy(&THIS_CHAR, &NTH_CHAR(2));
++ big5_delete=1 ;
++ }
++ else
++ ov_strcpy(&THIS_CHAR, &NEXT_CHAR);
++#else
+ ov_strcpy(&THIS_CHAR, &NEXT_CHAR);
++#endif /* WANT_BIG5 */
+ if (!(termfeatures & TERM_CAN_DELETE))
+ update_input(UPDATE_FROM_CURSOR);
+ else
+ {
++#ifdef WANT_BIG5
++ if (big5_delete) count = 2 ;
++ while ( count -- > 0) {
++#endif
+ term_delete(1);
+ pos = INPUT_ONSCREEN + last_input_screen->co - 1;
+ if (pos < strlen(INPUT_BUFFER))
+@@ -594,6 +627,9 @@
+ term_putchar(INPUT_BUFFER[pos]);
+ term_move_cursor(INPUT_CURSOR, INPUT_LINE);
+ }
++#ifdef WANT_BIG5
++ } /* while -- > 0 */
++#endif /* WANT_BIG5 */
+ update_input(NO_UPDATE);
+ }
+ }
+@@ -607,6 +643,14 @@
+ char *ptr = NULL;
+ int pos;
+
++#ifdef WANT_BIG5
++ int count=1 ;
++#endif
++#ifdef WANT_BIG5
++ if ( *(&PREV_CHAR-sizeof(char)) && (is_big5(*(&PREV_CHAR-sizeof(char)),PREV_CHAR)))
++ count=2 ;
++ while (count-->0) {
++#endif
+ ptr = LOCAL_COPY(&THIS_CHAR);
+ strcpy(&(PREV_CHAR), ptr);
+ THIS_POS--;
+@@ -643,6 +687,9 @@
+ update_input(UPDATE_FROM_CURSOR);
+ #endif
+ }
++#ifdef WANT_BIG5
++ } /* while (count-- > 0)*/
++#endif
+ }
+ if (THIS_POS == MIN_POS)
+ HOLDLAST = NULL;
+@@ -681,6 +728,10 @@
+ {
+ cursor_to_input();
+ THIS_POS = strlen(INPUT_BUFFER);
++#ifdef WANT_BIG5
++ if (is_big5(PREV_CHAR,THIS_CHAR))
++ THIS_POS-- ;
++#endif
+ update_input(UPDATE_JUST_CURSOR);
+ }
+
diff --git a/chinese/bitchx/files/patch-source::screen.c b/chinese/bitchx/files/patch-source::screen.c
new file mode 100644
index 000000000000..8b650b55c9f8
--- /dev/null
+++ b/chinese/bitchx/files/patch-source::screen.c
@@ -0,0 +1,33 @@
+--- source/screen.c~ Mon Jan 8 15:06:18 2001
++++ source/screen.c Mon Jan 8 15:05:53 2001
+@@ -548,6 +548,15 @@
+
+ default:
+ {
++#ifdef WANT_BIG5
++ if (is_big5((char)*ptr,(char)*(ptr+1)))
++ {
++ buffer[pos++] = *ptr++;
++ col++ ;
++ if ( col + 2 >= max_cols )
++ word_break = pos-1 ;
++ }
++#endif
+ if (*ptr == ' ' || strchr(words, *ptr))
+ {
+ if (indent == 0)
+@@ -586,7 +595,14 @@
+ if (!word_break || (flags & PREPARE_NOWRAP))
+ word_break = max_cols /*pos - 1*/;
+ else if (col > max_cols)
++#ifdef WANT_BIG5
++ if (is_big5((char)buffer[pos-2], (char)buffer[pos-1]))
++ word_break = pos -2 ;
++ else
++ word_break = pos -1 ;
++#else
+ word_break = pos - 1;
++#endif
+
+ /*
+ * XXXX Massive hackwork here.
diff --git a/chinese/bitchx/pkg-comment b/chinese/bitchx/pkg-comment
new file mode 100644
index 000000000000..4573b77476c6
--- /dev/null
+++ b/chinese/bitchx/pkg-comment
@@ -0,0 +1 @@
+A zh-tw cursor movement friendly, wrapping clean BitchX