aboutsummaryrefslogtreecommitdiff
path: root/chinese/bitchx/files/patch-source__screen.c
blob: 8b650b55c9f8dc297a0b58167f43228ba33bbcda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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.