zh-c2t: remove 'register' keywords, avoid "error: address of register variable
requested" with clang 13. no change to program output when feeding it a test file.
This commit is contained in:
parent
5d8b1bc79e
commit
c60d5c9a6f
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.31 2019/07/12 20:43:46 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.32 2021/11/28 13:43:25 sthen Exp $
|
||||
|
||||
COMMENT= translate GB/Big5 encoding to tone pinyin
|
||||
|
||||
DISTNAME= zh-c2t-1.0
|
||||
REVISION= 2
|
||||
REVISION= 3
|
||||
CATEGORIES= chinese
|
||||
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
@ -1,30 +1,34 @@
|
||||
$OpenBSD: patch-c2t_c,v 1.1 2021/11/28 13:38:21 sthen Exp $
|
||||
$OpenBSD: patch-c2t_c,v 1.2 2021/11/28 13:43:25 sthen Exp $
|
||||
|
||||
Index: c2t.c
|
||||
--- c2t.c.orig
|
||||
+++ c2t.c
|
||||
@@ -22,10 +22,14 @@ main(argc, argv)
|
||||
@@ -22,11 +22,15 @@ main(argc, argv)
|
||||
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;
|
||||
+#endif
|
||||
register int eka=0, toka=0, i=0;
|
||||
register char hz[4], **pipo=0;
|
||||
- register char **taulu=0, rivi[82];
|
||||
+ int eka=0, toka=0, i=0;
|
||||
+ char hz[4], **pipo=0;
|
||||
+ char **taulu=0, rivi[82];
|
||||
register int rpit=0, tila=0, rraja=0, mulpin=0;
|
||||
+ int rpit=0, tila=0, rraja=0, mulpin=0;
|
||||
int monitila=0;
|
||||
FILE *piffi=0;
|
||||
FILE *miss_chars=0;
|
||||
@@ -57,12 +61,12 @@ char **argv;
|
||||
i =0;
|
||||
} /*if argc > 1 */
|
||||
if ((piffi = fopen (DICT, "r")) == 0) {
|
||||
- printf (stderr, "Error: unable to open pinyin dictionnary %s\n",
|
||||
+ fprintf (stderr, "Error: unable to open pinyin dictionnary %s\n",
|
||||
+ fprintf (stderr, "Error: unable to open pinyin dictionary %s\n",
|
||||
DICT);
|
||||
exit (-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user