1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

Fix build on 10.x and later.

This commit is contained in:
Hiroki Sato 2014-05-25 03:10:37 +00:00
parent 6ca0f39d9f
commit 2b99d16641
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355105
10 changed files with 267 additions and 29 deletions

View File

@ -12,7 +12,6 @@ DISTNAME= jvim2.0r+${PORTNAME}${PORTVERSION}
MAINTAINER= hrs@FreeBSD.org
COMMENT= A library for Japanese Input Methods
USE_GCC= any
WRKSRC= ${WRKDIR}/${PORTNAME}
ALL_TARGET=
CFLAGS+= -I${WRKSRC}
@ -27,18 +26,15 @@ CANNA_WNN7_DESC= Build Canna+Wnn7-backend library
FREEWNN_DESC= Build FreeWnn-backend library
WNN6_DESC= Build Wnn6-backend library
WNN7_DESC= Build Wnn7-backend library
CANNA_LIB_DEPENDS= libcanna.so:${PORTSDIR}/japanese/canna-lib
CANNA_FREEWNN_BUILD_DEPENDS= ${FREEWNN_BUILD_DEPENDS}
CANNA_WNN6_BUILD_DEPENDS= ${WNN6_BUILD_DEPENDS}
CANNA_WNN7_BUILD_DEPENDS= ${WNN7_BUILD_DEPENDS}
RK_DIR.CANNA_WNN6= ${RKDIR.WNN6}
RK_DIR.CANNA_WNN7= ${RKDIR.WNN7}
FREEWNN_BUILD_DEPENDS= ${LOCALBASE}/lib/libjd.a:${PORTSDIR}/japanese/FreeWnn-lib
WNN6_BUILD_DEPENDS= ${FREEWNN_BUILD_DEPENDS}
RK_DIR.WNN6= ${LOCALBASE}/lib/wnn/ja_JP/rk.wnn6
WNN7_BUILD_DEPENDS= ${FREEWNN_BUILD_DEPENDS}
RK_DIR.WNN7= ${LOCALBASE}/lib/wnn/ja_JP/rk.wnn7

View File

@ -1,6 +1,22 @@
--- conf.c.~1~ Thu Jun 23 11:42:33 1994
+++ conf.c Mon Sep 14 15:48:41 1998
@@ -220,7 +220,8 @@
--- conf.c.orig 1994-06-23 11:42:33.000000000 +0900
+++ conf.c 2014-05-25 11:51:12.000000000 +0900
@@ -119,6 +119,7 @@
}
return name;
}
+void
switch_rkserv(){
char help[128];
char *romkan;
@@ -137,6 +138,7 @@
Onew_putmsg_retain(1,"%s %s",Onew_RK_smode(),help);
}
}
+void
switch_kkserv(){
char mode[64],help[128],*kanakan;
@@ -220,7 +222,8 @@
#define IR(func) (romkan_select() ? func : 0)
#define ONEWromkan_ready(rkpath) IR((*RP->rk_ready)(rkpath))
#define ONEWromkan_modesw(mode) IR((*RP->rk_modesw)(mode))

View File

@ -0,0 +1,21 @@
--- dialogue/keisen.c.orig 2014-05-25 11:41:08.000000000 +0900
+++ dialogue/keisen.c 2014-05-25 11:45:53.000000000 +0900
@@ -6,7 +6,7 @@
int KEISEN_TOGGLE_A = Cntl('N');
int KEISEN_TOGGLE_B = Cntl('B');
-static
+static int
keisen_toggle(type)
int type;
{
@@ -39,7 +39,8 @@
}
return 0;
}
-keisen_init(){
+void
+keisen_init(void){
ONEW_KEISEN_ON = getenv("ONEW_KEISENMODE");
if( ONEW_KEISEN_ON == 0 )
return;

View File

@ -0,0 +1,133 @@
--- dialogue/onewdic.c.orig 2014-05-25 11:35:24.000000000 +0900
+++ dialogue/onewdic.c 2014-05-25 11:39:56.000000000 +0900
@@ -18,6 +18,8 @@
History:
940127 created
///////////////////////////////////////////////////////////////////////*/
+#include <stdlib.h>
+#include <string.h>
#include "onew.h"
int ONEW_MAXWORDS = 32;
@@ -32,6 +34,7 @@
char *strpbrk();
+int
Onew_addword(dic,word)
char *dic;
char *word;
@@ -40,14 +43,14 @@
int len;
if( ONEW_MAXWORDS <= 0 )
- return;
+ return 0;
if( *word == 0 )
- return;
+ return 0;
- if( np = strpbrk(word,"\n\r") ){
+ if((np = strpbrk(word,"\n\r")) != NULL){
if( np == word )
- return;
+ return 0;
len = np - word;
}else len = strlen(word);
@@ -97,13 +100,13 @@
return wp;
}
/* this function does not perform proper sorting X-< */
-static word_sort(nth,inc)
+static int word_sort(nth,inc)
{ Word *dwp,*pwp,*twp;
Word **dwpp,**pwpp;
int nnth;
if( (dwp = nth_wp(nth,&dwpp)) == 0 )
- return;
+ return 0;
dwp->w_freq += inc;
pwpp = &word_list;
@@ -116,7 +119,7 @@
nnth++;
}
if( pwp == 0 || pwp == dwp )
- return;
+ return 0;
twp = *pwpp;
*pwpp = dwp;
@@ -143,14 +146,15 @@
return str;
}else return 0;
}
-static word_label(label,from,to,max)
+static void word_label(label,from,to,max)
char *label;
{
sprintf(label,"[%d/%d]",to-1,max);
}
-static word_error(){
+static void word_error(){
}
+void
Onew_getword(key)
char *key;
{ int n;
@@ -178,11 +182,11 @@
}
-static
+static int
ONEWkanakan_ready(){
return 1;
}
-static
+static void
ONEWkanakan_freqsave()
{
}
@@ -192,29 +196,31 @@
{
strncpy(kouho,nth_str(i),size);
}
-static
+static void
ONEWkanakan()
{
}
-static
+static void
ONEWbunsetu_next()
{
}
-static
+static void
ONEWbunsetu_expand()
{
}
-static
+static void
ONEWbunsetu_shrink()
{
}
-static
+static void
ONEWjisyo_touroku()
{
}
-static
+static void
ONEWjisyo_hinshi()
{
}
+#if 0
RegisterKanakan(ONEW_OnewKanakan);
+#endif

View File

@ -0,0 +1,27 @@
--- engine/Canna.c.orig 1995-06-29 01:13:26.000000000 +0900
+++ engine/Canna.c 2014-05-25 12:05:08.000000000 +0900
@@ -33,6 +33,7 @@
static int ready;
static int CID;
static int nbunsetsu;
+static void disp_kanji_buf(int);
int ONEW_CannarcDone;
static ONEWkanakan_ready()
@@ -102,7 +103,6 @@
int comch;
int rcode;
char yomibuf[1024];
- static disp_kanji_buf();
Onew_setupYomistr(startch,yomi,yomibuf);
yomi = yomibuf;
@@ -182,7 +182,7 @@
{
}
-static disp_kanji_buf(so)
+static void disp_kanji_buf(so)
{ char kanji[1024];
char left[1024],cur[1024],right[1024];
int curbi,bi;

View File

@ -0,0 +1,11 @@
--- onew.c.orig 2014-05-25 11:54:18.000000000 +0900
+++ onew.c 2014-05-25 11:54:37.000000000 +0900
@@ -492,7 +492,7 @@
fflush(stdout);
}
static int prev_modef;
-ONEW_DISP_ROMKANMODE(cmode,chelp,modef)
+void ONEW_DISP_ROMKANMODE(cmode,chelp,modef)
char *cmode,*chelp;
{
if( modef == prev_modef )

View File

@ -1,5 +1,5 @@
--- onew.h.orig 1994-06-24 10:27:13.000000000 +0900
+++ onew.h 2013-11-03 22:44:02.000000000 +0900
+++ onew.h 2014-05-25 11:45:20.000000000 +0900
@@ -21,7 +21,7 @@
#define LINESIZE 1024
@ -9,7 +9,7 @@
typedef char Mssgbuff[LINESIZE];
typedef char Pathname[LINESIZE];
@@ -272,3 +272,23 @@
@@ -272,3 +272,29 @@
#define JVIM_RARROW 0xffffff83
#define JVIM_HENKAN 0xffffff9f
@ -33,3 +33,9 @@
+int ONEW_getch0(int);
+
+int oeiJisyoTouroku(int, char *, char *, char *);
+
+int in_kana_mode(void);
+int Onew_RK_imode(void);
+int Onew_RK_imode_set(int);
+int Onew_defineKanamode(int, int, IFUNC);
+

View File

@ -0,0 +1,11 @@
--- onewclient.c.orig 2014-05-25 11:46:28.000000000 +0900
+++ onewclient.c 2014-05-25 11:47:06.000000000 +0900
@@ -43,7 +43,7 @@
Onew_message(form,a,b,c,d,e,f,g);
}
-static open_onew(){
+static void open_onew(void){
register int pid;
char *command;

View File

@ -1,23 +1,5 @@
--- engine.orig/Canna.c 1995-06-28 11:13:26.000000000 -0500
+++ engine/Canna.c 2007-11-12 21:30:29.000000000 -0500
@@ -33,6 +33,7 @@
static int ready;
static int CID;
static int nbunsetsu;
+static disp_kanji_buf();
int ONEW_CannarcDone;
static ONEWkanakan_ready()
@@ -102,7 +103,6 @@
int comch;
int rcode;
char yomibuf[1024];
- static disp_kanji_buf();
Onew_setupYomistr(startch,yomi,yomibuf);
yomi = yomibuf;
--- onewlib.c.orig 1995-07-02 02:55:41.000000000 -0500
+++ onewlib.c 2007-11-12 21:28:01.000000000 -0500
--- onewlib.c.orig 1995-07-02 16:55:41.000000000 +0900
+++ onewlib.c 2014-05-25 11:55:49.000000000 +0900
@@ -50,6 +50,11 @@
int ONEW_I_SYNC_CHAR = 0xFF;
int ONEW_KK_OPDICT = 'x';

View File

@ -0,0 +1,35 @@
--- onewmisc.c.orig 1994-02-25 16:57:18.000000000 +0900
+++ onewmisc.c 2014-05-25 11:49:34.000000000 +0900
@@ -99,6 +99,7 @@
message = func;
}
+#if 0
static FILE *LOG;
Onew_dbglog(fmt,a,b,c,d,e,f,g)
char *fmt;
@@ -116,7 +117,7 @@
fprintf(LOG,fmt,a,b,c,d,e,f,g);
fflush(LOG);
}
-
+#endif
Onew_non_ascii(str)
char *str;
@@ -147,6 +148,7 @@
}
return 0;
}
+void
strQenq(Q,c)
Uchar *Q,c;
{ int len;
@@ -157,6 +159,7 @@
Q[len] = c;
Q[len+1] = 0;
}
+void
strQins(Q,c)
Uchar *Q,c;
{ Linebuff buff;