Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/chinese/hc/files/patch-hclib.c
16461 views
1
--- hclib.c.orig 2011-09-05 14:36:04.000000000 +0800
2
+++ hclib.c 2011-09-05 14:38:30.000000000 +0800
3
@@ -155,7 +155,7 @@ static void add(a1, am, i, code)
4
else if (am[i]) /* already has multiple mappings */
5
{
6
/* Check multiple mapping list, if there, return. */
7
- while (x=am[i][n])
8
+ while ((x = am[i][n]))
9
{
10
if (x==code) return;
11
else n++;
12
@@ -191,17 +191,17 @@ static int do_line (lcnt, buffer)
13
14
if (!inGBrange(gb_code))
15
{
16
- fprintf(stderr, "Invalid GB code in line %d\n", lcnt);
17
+ fprintf(stderr, "Invalid GB code in line %ld\n", lcnt);
18
return(0);
19
}
20
- while (c1=buffer[i++])
21
+ while ((c1 = buffer[i++]))
22
{
23
c2 = buffer[i++];
24
if (!(c1&&c2)) break;
25
big_code = DB(c1,c2);
26
if (!inBIGrange(big_code))
27
{
28
- fprintf(stderr, "Invalid BIG5 code in line %d\n", lcnt);
29
+ fprintf(stderr, "Invalid BIG5 code in line %ld\n", lcnt);
30
return(0);
31
}
32
add(GtoB, mGtoB, gb_code - GBfirst, big_code);
33
@@ -261,7 +261,7 @@ static int cvrt(a1, am, i, result, n)
34
if (codeDes == 0) return(0);
35
result[0] = codeDes;
36
if (am[i])
37
- while (x = am[i][k])
38
+ while ((x = am[i][k]))
39
{
40
if (k>=n) break;
41
result[++k] = x;
42
43