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