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

(-)chinput3/Makefile (-4 lines)
Lines 30-39 Link Here
30
BROKEN=		Does not compile on !i386
30
BROKEN=		Does not compile on !i386
31
.endif
31
.endif
32
32
33
.if ${OSVERSION} >= 700042
34
BROKEN=		Does not compile with GCC 4.2
35
.endif
36
37
post-patch:
33
post-patch:
38
	@${REINPLACE_CMD} -e '/extern int ForwardEvent();/d' \
34
	@${REINPLACE_CMD} -e '/extern int ForwardEvent();/d' \
39
		${WRKSRC}/src/Chinput-*/src/*.c
35
		${WRKSRC}/src/Chinput-*/src/*.c
(-)chinput3/files/patch-cce-cin2tab.c (+11 lines)
Line 0 Link Here
1
--- src/unicon-im/ImmModules/cce/cin2tab.c.orig	2008-01-25 14:10:07.000000000 -0800
2
+++ src/unicon-im/ImmModules/cce/cin2tab.c	2008-01-25 14:32:40.000000000 -0800
3
@@ -162,7 +162,7 @@
4
 int i,k;
5
 char fname[64], fname_cin[64], fname_tab[64];
6
 char fname_phr[64],fname_lx[64];
7
-char tt[128];
8
+unsigned char tt[128];
9
 unsigned char *cmd, *arg;
10
 hz_input_table InpTable;
11
 int TotalKeyNum;
(-)chinput3/files/patch-cce-xl_hzinput (+22 lines)
Line 0 Link Here
1
--- src/unicon-im/ImmModules/cce/xl_hzinput.c.orig	2008-01-25 14:10:07.000000000 -0800
2
+++ src/unicon-im/ImmModules/cce/xl_hzinput.c	2008-01-25 15:49:32.000000000 -0800
3
@@ -124,7 +124,7 @@
4
 
5
 static void GetAssociatePhrases (HzInputTable_T *pClient, unsigned char *p)
6
 {
7
-    int index,len = strlen(p);
8
+    int index,len = strlen((const char*)p);
9
 
10
     if (pClient->InputCount <= pClient->InputMatch)  /* All Match */
11
     {
12
@@ -291,8 +291,8 @@
13
     {
14
          fseek( pClient->cur_table->AssocFile, index << 2, SEEK_SET );
15
          fread( &PhraseNo, sizeof(int), 1, pClient->cur_table->AssocFile );
16
-         LoadPhrase(pClient,  PhraseNo, str );
17
-         strcpy(pClient->seltab[pClient->CurSelNum],str+2);
18
+         LoadPhrase(pClient,  PhraseNo, (char*)str );
19
+         strcpy(pClient->seltab[pClient->CurSelNum],(char*)str+2);
20
          CurLen += strlen(pClient->seltab[pClient->CurSelNum++]);
21
          index++;
22
     }
(-)chinput3/files/patch-register (+11 lines)
Line 0 Link Here
1
--- src/Chinput-3.0.2/src/IMdkit/lib/i18nClbk.c.orig	2008-01-25 14:16:09.000000000 -0800
2
+++ src/Chinput-3.0.2/src/IMdkit/lib/i18nClbk.c	2008-01-25 14:13:15.000000000 -0800
3
@@ -129,7 +129,7 @@
4
     XIMPreeditDrawCallbackStruct *draw =
5
         (XIMPreeditDrawCallbackStruct *) &preedit_CB->todo.draw;
6
     CARD16 connect_id = call_data->any.connect_id;
7
-    register int feedback_count;
8
+    int feedback_count;
9
     register int i;
10
     BITMASK32 status = 0x0;
11
 
(-)chinput3/files/patch-server-TLS_AsciiConvertor (+11 lines)
Line 0 Link Here
1
--- src/unicon-im/server/TLS_AsciiConvertor.cpp.orig	2008-01-25 14:10:08.000000000 -0800
2
+++ src/unicon-im/server/TLS_AsciiConvertor.cpp	2008-01-25 15:46:52.000000000 -0800
3
@@ -202,7 +202,7 @@
4
 
5
 int IsSymbol (unsigned char key)
6
 {
7
-    char *szSymbol = ";:'\"<,>.?/[{]{";
8
+    const char *szSymbol = ";:'\"<,>.?/[{]{";
9
     int i, len = strlen (szSymbol);
10
     for (i = 0; i < len; i++)
11
        if (key == szSymbol[i])
(-)chinput3/files/patch-server-TLS_HzConvertTable (+13 lines)
Line 0 Link Here
1
--- src/unicon-im/server/TLS_HzConvertTable.h.orig	2008-01-25 14:10:08.000000000 -0800
2
+++ src/unicon-im/server/TLS_HzConvertTable.h	2008-01-25 15:23:12.000000000 -0800
3
@@ -19,8 +19,8 @@
4
 */
5
 
6
 typedef struct _GB2BIG5 {
7
-	char *gb;
8
-	char *big5;
9
+	const char *gb;
10
+	const char *big5;
11
 } GB2BIG5;
12
 
13
 #define TABLENUM sizeof(g2b)/sizeof(g2b[0])
(-)chinput3/files/patch-server-TLS_ImmOp (+11 lines)
Line 0 Link Here
1
--- src/unicon-im/server/TLS_ImmOp.cpp.orig	2008-01-25 14:10:08.000000000 -0800
2
+++ src/unicon-im/server/TLS_ImmOp.cpp	2008-01-25 14:20:30.000000000 -0800
3
@@ -23,7 +23,7 @@
4
  * Author: see CREDITS
5
  */
6
 
7
-#include <iostream.h>
8
+#include <iostream>
9
 #include <stdio.h>
10
 #include <string.h>
11
 #include <dlfcn.h>
(-)chinput3/files/patch-server-TLS_LibMain (+11 lines)
Line 0 Link Here
1
--- src/unicon-im/server/TLS_LibMain.cpp.orig	2008-01-25 14:10:08.000000000 -0800
2
+++ src/unicon-im/server/TLS_LibMain.cpp	2008-01-25 14:21:32.000000000 -0800
3
@@ -35,7 +35,7 @@
4
 #include <signal.h>
5
 #include <netdb.h>
6
 #include <unistd.h>
7
-#include <iostream.h>
8
+#include <iostream>
9
 //#include <pth.h>
10
 
11
 #include <TLS_MemFile.hpp>
(-)chinput3/files/patch-server-TLS_MemFile (+20 lines)
Line 0 Link Here
1
--- src/unicon-im/server/TLS_MemFile.cpp.orig	2008-01-25 14:10:08.000000000 -0800
2
+++ src/unicon-im/server/TLS_MemFile.cpp	2008-01-25 14:22:31.000000000 -0800
3
@@ -23,7 +23,7 @@
4
  * Author: see CREDITS
5
  */
6
 
7
-#include <iostream.h>
8
+#include <iostream>
9
 #include <assert.h>
10
 #include <stdio.h>
11
 #include <stdlib.h>
12
@@ -32,6 +32,8 @@
13
 
14
 #include <TLS_MemFile.hpp>
15
 
16
+using namespace std;
17
+
18
 TLS_CMemFile::TLS_CMemFile (unsigned long max0)
19
 {
20
     buf = (char *) malloc (max0);
(-)chinput3/files/patch-turbo-cin2tab (+73 lines)
Line 0 Link Here
1
--- src/unicon-im/ImmModules/turbo/cin2tab.c.orig	2008-01-25 14:10:08.000000000 -0800
2
+++ src/unicon-im/ImmModules/turbo/cin2tab.c	2008-01-25 14:37:33.000000000 -0800
3
@@ -29,6 +29,7 @@
4
 #include <sys/types.h>
5
 #include <string.h>
6
 #include <unistd.h>
7
+#include <ctype.h> // for tolower
8
 #include "xl_hzinput.h"
9
 #include "xl_sysphrase.h"
10
 #include "xl_phrase.h"
11
@@ -194,24 +195,24 @@
12
     /************** Now some basic information ************************/
13
     strcpy(InpTable.magic_number,MAGIC_NUMBER);
14
     cmd_arg(tt, &cmd, &arg);
15
-    if (strcmp(cmd,"%ename") || !(*arg) )
16
+    if (strcmp((const char*)cmd,"%ename") || !(*arg) )
17
         print_error("%d:  %%ename english_name  expected", lineno);
18
     arg[CIN_ENAME_LENGTH-1]=0;
19
     strcpy(InpTable.ename,arg);
20
 
21
     cmd_arg(tt, &cmd, &arg);
22
-    if (strcmp(cmd,"%prompt") || !(*arg) )
23
+    if (strcmp((const char*)cmd,"%prompt") || !(*arg) )
24
         print_error("%d:  %%prompt prompt_name  expected", lineno);
25
     arg [CIN_CNAME_LENGTH-1]=0;
26
     strcpy(InpTable.cname, arg);
27
 
28
     cmd_arg(tt,&cmd, &arg); 
29
-    if (strcmp(cmd,"%selkey") || !(*arg) )
30
+    if (strcmp((const char*)cmd,"%selkey") || !(*arg) )
31
         print_error("%d:  %%selkey select_key_list expected", lineno);
32
     strcpy(InpTable.selkey,arg);
33
 
34
     cmd_arg(tt,&cmd, &arg);
35
-    if (strcmp(cmd,"%last_full") || !(*arg)) 
36
+    if (strcmp((const char*)cmd,"%last_full") || !(*arg)) 
37
         InpTable.last_full = 1;
38
     else 
39
     {
40
@@ -222,21 +223,21 @@
41
         cmd_arg(tt, &cmd, &arg);
42
     }
43
 
44
-    if (strcmp(cmd,"%dupsel") || !(*arg) )
45
+    if (strcmp((const char*)cmd,"%dupsel") || !(*arg) )
46
         print_error("%d:  %%dupsel NO of dup sel keys  expected", lineno);
47
     InpTable.MaxDupSel=atoi(arg);
48
 
49
     /*************** now the keyname ****************************/
50
 
51
     cmd_arg(tt,&cmd, &arg);
52
-    if (strcmp(cmd,"%keyname") || strcmp(arg,"begin"))
53
+    if (strcmp((const char*)cmd,"%keyname") || strcmp((const char*)arg,"begin"))
54
         print_error("%d:  %%keyname begin   expected", lineno);
55
 
56
     TotalKeyNum=0;
57
     while(1) 
58
     {
59
         cmd_arg(tt,&cmd, &arg);
60
-        if (!strcmp(cmd,"%keyname")) break;
61
+        if (!strcmp((const char*)cmd,"%keyname")) break;
62
         k = tolower(cmd[0]);  /* k = char */
63
         if (InpTable.KeyMap[k]) 
64
             print_error("%d:  key %c is already used",lineno, k);
65
@@ -265,7 +266,7 @@
66
         cmd_arg(tt,&cmd,&arg);
67
         if (!cmd[0] || !arg[0]) 
68
             break;
69
-        len = strlen(cmd);
70
+        len = strlen((const char*)cmd);
71
         if (len > InpTable.MaxPress) 
72
             InpTable.MaxPress=len;
73
         if (len > 10)

Return to bug 119989