deregister to fix llvm 13 build and fix a warning/ansi while here
cc -DCHINDICT=\"/usr/local/share/chinese/gb/TONEPY.tit\" -O2 -pipe -c c2t.c
c2t.c:21:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main(argc, argv)
^
c2t.c:99:3: error: address of register variable requested
hz[2] = '\0';
^~
c2t.c:107:7: error: address of register variable requested
hz[0] = (char)eka;
^~
c2t.c:108:7: error: address of register variable requested
hz[1] = (char)toka;
^~
c2t.c:113:8: error: address of register variable requested
if (hz[0] != (*pipo)[i] || hz[1] != (*pipo)[i+1]) continue;
^~
c2t.c:113:31: error: address of register variable requested
if (hz[0] != (*pipo)[i] || hz[1] != (*pipo)[i+1]) continue;
^~
c2t.c:133:36: error: address of register variable requested
fprintf(miss_chars, "%c", hz[0]);
^~
c2t.c:134:30: error: address of register variable requested
fprintf(miss_chars, "%c ", hz[1]);
^~
c2t.c:143:17: error: address of register variable requested
printf("%c", hz[0]);
^~
c2t.c:144:18: error: address of register variable requested
printf("%c ", hz[1]);
^~
Index: patches/patch-02
===================================================================
RCS file: /cvs/ports/chinese/c2t/patches/patch-02,v
retrieving revision 1.2
diff -u -p -r1.2 patch-02
--- patches/patch-02 3 Mar 1998 05:12:49 -0000 1.2
+++ patches/patch-02 28 Oct 2021 03:52:49 -0000
@@ -1,22 +1,33 @@
---- c2t.c.orig Tue Feb 23 22:29:23 1993
-+++ c2t.c Mon Mar 2 21:12:22 1998
-@@ -22,10 +22,14 @@
- int argc;
- char **argv;
+Index: c2t.c
+--- c2t.c.orig
++++ c2t.c
+@@ -18,15 +18,18 @@
+
+ #define MEMAREA 4096 /* max number of lines in DICT file, wc -l DICT */
+
+-main(argc, argv)
+-int argc;
+-char **argv;
++int
++main(int argc, char **argv)
{
+#ifndef CHINDICT
char *DICT="/home/ftp/software/unix/X-Window/cxterm-dictionary/TONEPY.tit";
+- register int eka=0, toka=0, i=0;
+- register char hz[4], **pipo=0;
+- register char **taulu=0, rivi[82];
+- register int rpit=0, tila=0, rraja=0, mulpin=0;
+#else
+ char *DICT=CHINDICT;
+
No comments:
Post a Comment