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) |