File xjdic-2.4-gcc15.patch of Package xjdic
Index: xjdic-2.4/exjdxgen.c
===================================================================
--- xjdic-2.4.orig/exjdxgen.c
+++ xjdic-2.4/exjdxgen.c
@@ -71,7 +71,7 @@ main(argc,argv)
int argc;
unsigned char **argv;
{
- FILE *fp,*fopen();
+ FILE *fp;
uint32_t schi,diclen,indlen;
int i,inwd,saving,nodread;
unsigned char c;
Index: xjdic-2.4/makekanjstroke.c
===================================================================
--- xjdic-2.4.orig/makekanjstroke.c
+++ xjdic-2.4/makekanjstroke.c
@@ -2,7 +2,7 @@
#include <string.h>
#include <stdlib.h>
-FILE *fi,*fo,*fopen();
+FILE *fi,*fo;
unsigned char instr[1000],*ptr;
int i;
Index: xjdic-2.4/xjdcomm.c
===================================================================
--- xjdic-2.4.orig/xjdcomm.c
+++ xjdic-2.4/xjdcomm.c
@@ -110,7 +110,7 @@ int xopen(char *file_name, int *xfilelen
*/
FILE *xfopen(char *file_name, char *file_mode, int *xfilelen)
{
- FILE *fx, *fopen();
+ FILE *fx;
extern char DicDir[];
char *fnbuff;
@@ -169,7 +169,7 @@ void xjdicrc()
int ft,fn;
extern int thisdic;
extern char DicDir[];
- FILE *fm,*fopen();
+ FILE *fm;
#ifdef XJDDIC
extern unsigned char Dnamet[10][100],XJDXnamet[10][100];
Index: xjdic-2.4/xjdfrontend.c
===================================================================
--- xjdic-2.4.orig/xjdfrontend.c
+++ xjdic-2.4/xjdfrontend.c
@@ -38,16 +38,12 @@ order to enable this, people should comp
#ifdef __STRICT_BSD__
#include <sgtty.h>
#else
-#ifdef __POSIX__
#include <sys/termios.h>
-#else
-#include <termio.h>
-#endif
#endif
#define WINSIZE_IOCTL_AVAILABLE
-
+#include <sys/ioctl.h>
static enum
{
@@ -58,7 +54,7 @@ IOCTL_RAW
#ifdef __STRICT_BSD__
static struct sgttyb orig,new;
#else
-static struct termio orig,new;
+static struct termios orig,new;
#endif
extern unsigned char CBname[100];
@@ -70,7 +66,7 @@ int thisdic = 0;
int gdicnos[10],gdicmax=0,GDmode=FALSE,gdiclen;
int GDALLmode=FALSE;
-FILE *fe, *fex, *fclip, *fopen();
+FILE *fe, *fex, *fclip;
#ifdef XJDCLSERV
extern int portno;
@@ -227,7 +223,7 @@ void KOutc(int c);
void KLookup();
int KFlush(unsigned char *msg);
int KEOS (unsigned char *msg);
-void NewWinSize();
+void NewWinSize(int);
int kcmp (unsigned char *t1, unsigned char *t2);
unsigned char *DicName(int dn);
/*====== end of prototypes==================================================*/
@@ -331,7 +327,7 @@ void GetWinSize()
}
#endif /* termcap */
}
-void NewWinSize()
+void NewWinSize(int size)
{
struct winsize window;
ioctl(0,TIOCGWINSZ,&window);
@@ -367,7 +363,7 @@ void DiaLoad()
{
int i,j,k,lno;
unsigned char *dptr;
- FILE *fk,*fopen();
+ FILE *fk;
fk = xfopen(DIAname,"r",&xfilelen);
lno=0;
@@ -402,7 +398,7 @@ void DiaLoad()
void KSLoad()
{
int i,j,k,lno;
- FILE *fk,*fopen();
+ FILE *fk;
fk = xfopen(KSname,"r",&xfilelen);
lno=0;
@@ -427,7 +423,7 @@ void KSLoad()
void RadLoad()
{
int i,j,k;
- FILE *fk,*fopen();
+ FILE *fk;
fk = xfopen(RKname,"r", &xfilelen);
k = xfilelen/2;
@@ -627,7 +623,7 @@ int kanaconv(int rpos, int rlen)
void LoadKana()
{
int i,ih,mode;
- FILE *fp,*fopen();
+ FILE *fp;
unsigned char LKin[80],*ptr;
for (i = 0; i < NRKANA*2; i++) strcpy(kanatab[i]," ");
@@ -1063,7 +1059,7 @@ void Verbinit()
{
unsigned char tempstr[512],*vptr;
int vmode,i;
- FILE *fi,*fopen();
+ FILE *fi;
for (i = 0;i< VMAX;i++)
{
@@ -1807,7 +1803,7 @@ void RadSet()
{
int i,errf;
unsigned char rstr[20];
- FILE *fpr, *fopen();
+ FILE *fpr;
fpr = xfopen(Rname,"r", &xfilelen);
i = 0;
@@ -1835,7 +1831,7 @@ void RadSet()
/*=====DispLic======display GPL ==============================*/
void DispLic()
{
- FILE *flic,*fopen();
+ FILE *flic;
flic = xfopen(GPL_File,"r", &xfilelen);
DRow = 1;
@@ -1859,7 +1855,7 @@ void DoRADICALS()
int errf,j;
unsigned char rstr[20];
- FILE *fpr, *fopen();
+ FILE *fpr;
fpr = xfopen(Rname,"r", &xfilelen);
printf("\n RADICAL DISPLAY \n");
@@ -2197,7 +2193,7 @@ void RadBuild()
/*=====RadDisp===Display Radical Data==============================*/
void RadDisp()
{
- FILE *fk,*fopen();
+ FILE *fk;
int j,k,l,n;
unsigned char *ptr;
Index: xjdic-2.4/xjdrad.c
===================================================================
--- xjdic-2.4.orig/xjdrad.c
+++ xjdic-2.4/xjdrad.c
@@ -67,7 +67,7 @@ int stringcomp(unsigned char *s1, unsign
void RadDisp()
{
int i,j,k,l,flen;
- FILE *fk,*fopen();
+ FILE *fk;
unsigned char *ptr;
fk = xfopen(RKname,"r",&flen);
@@ -104,7 +104,7 @@ void RadDisp()
*/
FILE *xfopen(char *file_name, char *file_mode, int *xfilelen)
{
- FILE *fx, *fopen();
+ FILE *fx;
char *fnbuff;
@@ -151,7 +151,7 @@ void xjdicrc()
{
unsigned char xjdicdir[128],rcstr[80],*rcwd;
int ft,fn;
- FILE *fm,*fopen();
+ FILE *fm;
xjdicdir[0] = '\0';
if (strlen(ENVname) > 2)
Index: xjdic-2.4/xjdservcomm.c
===================================================================
--- xjdic-2.4.orig/xjdservcomm.c
+++ xjdic-2.4/xjdservcomm.c
@@ -66,7 +66,7 @@ void getvbuff (int *offp, FILE *fp, int3
void SeekErr(int iores);
#ifdef MMAP
-FILE *fpd[10],*fpi[10],*fopen();
+FILE *fpd[10],*fpi[10];
int fdd[10],fdi[10];
#endif
@@ -85,7 +85,7 @@ int *doffp[10],*joffp[10];
int MAXDIC,MAXJDX; /* formerly defines, now set dynamically */
int MAXDICTAB,MAXJDXTAB;
int novbmax = NOVB,vbread = 0;
-FILE *fpd[10],*fpi[10],*fopen();
+FILE *fpd[10],*fpi[10];
/* int TRIGGER = FALSE;
int indordic;
@@ -237,7 +237,7 @@ void DicTest(int dn)
int diclenx;
extern int jiver;
- FILE *fpd,*fopen();
+ FILE *fpd;
dichits[dn] = 0;
dicmiss[dn] = 0;
@@ -267,7 +267,7 @@ void DicLoad(int dn)
/* struct stat *buf; no longer used here */
extern int jiver;
- FILE *fpd,*fopen();
+ FILE *fpd;
printf("Loading Dictionary: %d [%s]\n",dn,DicName(dn));
fpd = xfopen(Dnamet[dn],"rb", &xfilelen);
Index: xjdic-2.4/xjdxgen.c
===================================================================
--- xjdic-2.4.orig/xjdxgen.c
+++ xjdic-2.4/xjdxgen.c
@@ -82,7 +82,7 @@ int main(argc,argv)
int argc;
unsigned char **argv;
{
- FILE *fp,*fopen();
+ FILE *fp;
uint32_t possav,schi,diclen,indlen;
int i,inwd,cstrp,saving,isc,nodread;
int arg_c;
@@ -347,7 +347,7 @@ void xjdicrc()
{
unsigned char xjdicdir[128],rcstr[80],*rcwd;
int iex;
- FILE *fm,*fopen();
+ FILE *fm;
iex = 0;
xjdicdir[0] = '\0';