View | Details | Raw Unified | Return to bug 253515
Collapse All | Expand All

(-)b/sysutils/screen/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	screen
4
PORTNAME=	screen
5
PORTVERSION=	4.8.0
5
PORTVERSION=	4.8.0
6
PORTREVISION=	1
6
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
7
MASTER_SITES=	GNU \
8
MASTER_SITES=	GNU \
8
		ftp://ftp.gnu.org/gnu/screen/ \
9
		ftp://ftp.gnu.org/gnu/screen/ \
(-)b/sysutils/screen/files/patch-ansi.c (+24 lines)
Added Link Here
1
--- ansi.c.orig	2020-02-05 12:09:38.000000000 -0800
2
+++ ansi.c	2021-02-14 11:10:31.759160000 -0800
3
@@ -692,10 +692,6 @@
4
 		    }
5
 		  curr->w_rend.font = 0;
6
 		}
7
-#  ifdef DW_CHARS
8
-	      if (curr->w_encoding == UTF8 && utf8_isdouble(c))
9
-		curr->w_mbcs = 0xff;
10
-#  endif
11
 	      if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c))
12
 		{
13
 		  int ox, oy;
14
@@ -730,6 +726,10 @@
15
 		    }
16
 		  break;
17
 		}
18
+#  ifdef DW_CHARS
19
+	      if (curr->w_encoding == UTF8 && utf8_isdouble(c))
20
+		curr->w_mbcs = 0xff;
21
+#  endif
22
 	      font = curr->w_rend.font;
23
 # endif
24
 # ifdef DW_CHARS
(-)b/sysutils/screen/files/patch-encoding.c (+56 lines)
Added Link Here
1
--- encoding.c.orig	2020-02-05 12:09:38.000000000 -0800
2
+++ encoding.c	2021-02-14 11:15:26.074193000 -0800
3
@@ -43,7 +43,7 @@
4
 # ifdef UTF8
5
 static int   recode_char __P((int, int, int));
6
 static int   recode_char_to_encoding __P((int, int));
7
-static void  comb_tofront __P((int, int));
8
+static void  comb_tofront __P((int));
9
 #  ifdef DW_CHARS
10
 static int   recode_char_dw __P((int, int *, int, int));
11
 static int   recode_char_dw_to_encoding __P((int, int *, int));
12
@@ -1263,6 +1263,8 @@
13
     {0x30000, 0x3FFFD},
14
   };
15
 
16
+  if (c >- 0xdf00 && c <= 0xdfff)
17
+	return 1;	/* dw comining sequence */
18
   return ((bisearch(c, wide, sizeof(wide) / sizeof(struct interval) - 1)) ||
19
           (cjkwidth &&
20
            bisearch(c, ambiguous,
21
@@ -1330,11 +1332,12 @@
22
 }
23
 
24
 static void
25
-comb_tofront(root, i)
26
-int root, i;
27
+comb_tofront( i)
28
+int i;
29
 {
30
   for (;;)
31
     {
32
+      int root = i >= 0x700 ? 0x801 : 0x800;
33
       debug1("bring to front: %x\n", i);
34
       combchars[combchars[i]->prev]->next = combchars[i]->next;
35
       combchars[combchars[i]->next]->prev = combchars[i]->prev;
36
@@ -1396,9 +1399,9 @@
37
     {
38
       /* full, recycle old entry */
39
       if (c1 >= 0xd800 && c1 < 0xe000)
40
-        comb_tofront(root, c1 - 0xd800);
41
+        comb_tofront(c1 - 0xd800);
42
       i = combchars[root]->prev;
43
-      if (c1 == i + 0xd800)
44
+      if (i == 0x800 || i == 0x801 || c1 == i + 0xd800)
45
 	{
46
 	  /* completely full, can't recycle */
47
 	  debug("utf8_handle_comp: completely full!\n");
48
@@ -1422,7 +1425,7 @@
49
   mc->font  = (i >> 8) + 0xd8;
50
   mc->fontx = 0;
51
   debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800);
52
-  comb_tofront(root, i);
53
+  comb_tofront(i);
54
 }
55
 
56
 #else /* !UTF8 */

Return to bug 253515