update to 0.2.0
PR: ports/69909 Submitted by: statue <statue@netlab.cse.yzu.edu.tw>
This commit is contained in:
parent
b7c21e740d
commit
f7ce583389
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=115353
20 changed files with 48 additions and 388 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= gcin
|
||||
PORTVERSION= 0.1.9
|
||||
PORTVERSION= 0.2.0
|
||||
CATEGORIES= chinese
|
||||
MASTER_SITES= http://www.csie.nctu.edu.tw/~cp76/gcin/download/
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
MD5 (gcin-0.1.9.tar.bz2) = bd382f4d818061c7d2e20eff7fb43f73
|
||||
SIZE (gcin-0.1.9.tar.bz2) = 385011
|
||||
MD5 (gcin-0.2.0.tar.bz2) = 6593ae90113d24fc8ada886805685af9
|
||||
SIZE (gcin-0.2.0.tar.bz2) = 387628
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- IMdkit/lib/IMConn.c.orig Sun Jul 2 10:01:01 2000
|
||||
+++ IMdkit/lib/IMConn.c Sun Jul 25 19:45:46 2004
|
||||
@@ -30,7 +30,7 @@
|
||||
******************************************************************/
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include "IMdkit.h"
|
||||
#include <stdarg.h>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
--- IMdkit/Makefile.orig Sat Jul 24 19:18:15 2004
|
||||
+++ IMdkit/Makefile Sat Jul 24 19:18:30 2004
|
||||
@@ -2,15 +2,15 @@
|
||||
all: libXimd.a Xi18n_sample/sampleIM
|
||||
|
||||
libXimd.a:
|
||||
- make -C lib
|
||||
+ gmake -C lib
|
||||
|
||||
Xi18n_sample/sampleIM:
|
||||
- cd Xi18n_sample; make
|
||||
+ cd Xi18n_sample; gmake
|
||||
|
||||
clean:
|
||||
rm -f *.bak *~
|
||||
- make -C lib clean
|
||||
- make -C Xi18n_sample clean
|
||||
+ gmake -C lib clean
|
||||
+ gmake -C Xi18n_sample clean
|
||||
|
||||
install:
|
||||
@echo nothing to be installed.
|
|
@ -1,9 +0,0 @@
|
|||
--- IMdkit/lib/Makefile.orig Sun Aug 1 00:51:25 2004
|
||||
+++ IMdkit/lib/Makefile Sun Aug 1 00:51:29 2004
|
||||
@@ -1,6 +1,5 @@
|
||||
include ../../config.mak
|
||||
|
||||
-CC = gcc
|
||||
#CFLAGS = -c -O2 -fno-strength-reduce -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DUNIXCONN -DTCPCONN -DXIM_t -DTRANS_SERVER
|
||||
CFLAGS = -c $(OPTFLAGS) -fno-strength-reduce -DXIM_t -DTRANS_SERVER
|
||||
INC = -I../include -I/usr/X11R6/include
|
|
@ -1,88 +1,42 @@
|
|||
--- Makefile.orig Tue Jul 20 13:01:30 2004
|
||||
+++ Makefile Thu Jul 29 03:09:13 2004
|
||||
@@ -1,5 +1,3 @@
|
||||
-OPTFLAGS=-g
|
||||
-
|
||||
include config.mak
|
||||
|
||||
.SUFFIXES: .c .o .E
|
||||
@@ -7,9 +5,9 @@
|
||||
OBJS=gcin.o IC.o eve.o win0.o pho.o tsin.o win1.o util.o pho-util.o gcin-conf.o tsin-util.o \
|
||||
win-sym.o intcode.o pho-sym.o win-int.o win-pho.o gcin-settings.o
|
||||
OBJS_TSLEARN=tslearn.o util.o gcin-conf.o pho-util.o tsin-util.o gcin-send.o pho-sym.o
|
||||
-OBJS_phod2a=phod2a.o pho-util.o gcin-conf.o pho-sym.o
|
||||
-OBJS_tsa2d=tsa2d.o gcin-send.o util.o pho-sym.o gcin-conf.o
|
||||
-OBJS_phoa2d=phoa2d.o pho-sym.o gcin-send.o gcin-conf.o
|
||||
+OBJS_phod2a=phod2a.o pho-util.o pho-sym.o
|
||||
+OBJS_tsa2d=tsa2d.o util.o pho-sym.o
|
||||
+OBJS_phoa2d=phoa2d.o pho-sym.o
|
||||
OBJS_kbmcv=kbmcv.o pho-sym.o
|
||||
OBJS_tsd2a=tsd2a.o pho-sym.o
|
||||
OBJS_gcin_steup=gcin-setup.o gcin-conf.o util.o gcin-send.o gcin-settings.o
|
||||
@@ -26,7 +24,7 @@
|
||||
--- Makefile.orig Sun Aug 1 18:20:13 2004
|
||||
+++ Makefile Mon Aug 2 23:22:49 2004
|
||||
@@ -27,7 +27,7 @@
|
||||
PROGS_CV=kbmcv
|
||||
|
||||
all: $(PROGS) $(DATA) $(PROGS_CV) gcin.spec
|
||||
- make -C data
|
||||
+ gmake -C data
|
||||
+ ${MAKE} -C data
|
||||
|
||||
gcin: $(OBJS) $(IMdkitLIB)
|
||||
$(CC) -o $@ $(OBJS) $(IMdkitLIB) $(LDFLAGS)
|
||||
@@ -34,28 +32,28 @@
|
||||
ln -sf $@ $@.test
|
||||
|
||||
tslearn: $(OBJS_TSLEARN)
|
||||
- cc -o $@ $(OBJS_TSLEARN) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_TSLEARN) $(LDFLAGS)
|
||||
|
||||
gcin-setup: $(OBJS_gcin_steup)
|
||||
- cc -o $@ $(OBJS_gcin_steup) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_gcin_steup) $(LDFLAGS)
|
||||
|
||||
phoa2d: $(OBJS_phoa2d)
|
||||
- cc -o $@ $(OBJS_phoa2d) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_phoa2d)
|
||||
|
||||
phod2a: $(OBJS_phod2a)
|
||||
- cc -o $@ $(OBJS_phod2a) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_phod2a)
|
||||
|
||||
tsa2d: $(OBJS_tsa2d)
|
||||
- cc -o $@ $(OBJS_tsa2d) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_tsa2d)
|
||||
|
||||
tsd2a: $(OBJS_tsd2a)
|
||||
- cc -o $@ $(OBJS_tsd2a) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_tsd2a)
|
||||
|
||||
kbmcv: $(OBJS_kbmcv)
|
||||
@@ -56,7 +56,7 @@
|
||||
$(CC) -o $@ $(OBJS_kbmcv)
|
||||
|
||||
$(IMdkitLIB):
|
||||
- make -C IMdkit/lib
|
||||
+ gmake -C IMdkit/lib
|
||||
+ ${MAKE} -C IMdkit/lib
|
||||
|
||||
install:
|
||||
install -d $(GCIN_TABLE_DIR)
|
||||
@@ -67,8 +65,8 @@
|
||||
install -s $(PROGS) $(bindir)
|
||||
@@ -67,8 +67,8 @@
|
||||
install -d $(bindir)
|
||||
install -d $(libdir)/menu
|
||||
install -m 644 menu/* $(libdir)/menu
|
||||
- make -C data install
|
||||
- if [ $(prefix) = /usr/local ]; then \
|
||||
+ gmake -C data install
|
||||
+ ${MAKE} -C data install
|
||||
+ if [ $(prefix) != /usr/local ]; then \
|
||||
install -m 644 menu/* /usr/lib/menu; \
|
||||
which update-menus >& /dev/null && update-menus; \
|
||||
sh modify-XIM; \
|
||||
@@ -78,8 +76,8 @@
|
||||
install -m 644 menu/* $(libdir)/menu; \
|
||||
@@ -80,8 +80,8 @@
|
||||
install -s $(PROGS) $(bindir); \
|
||||
fi
|
||||
clean:
|
||||
- make -C IMdkit clean
|
||||
- make -C data clean
|
||||
+ gmake -C IMdkit clean
|
||||
+ gmake -C data clean
|
||||
+ ${MAKE} -C IMdkit clean
|
||||
+ ${MAKE} -C data clean
|
||||
rm -f *.o *~ *.E config.mak tags core.* $(PROGS) $(PROGS_CV) $(DATA) .depend gcin.spec menu/*~
|
||||
cd ..; tar cvfj gcin.tbz gcin
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
--- configure.orig Sat Jul 17 16:26:48 2004
|
||||
+++ configure Sun Jul 25 19:48:05 2004
|
||||
@@ -38,7 +38,7 @@
|
||||
GCIN_VERSION=`cat VERSION.gcin`
|
||||
sed -e "s/__gcin_version__/$GCIN_VERSION/" < gcin.spec.in > gcin.spec
|
||||
--- configure.orig Mon Aug 2 13:32:06 2004
|
||||
+++ configure Mon Aug 2 23:01:34 2004
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
-OPTFLAGS="-g"
|
||||
+OPTFLAGS=$CFLAGS
|
||||
if [ $prefix = /usr ]; then
|
||||
OPTFLAGS="-O"
|
||||
MAKE=make
|
||||
-which gmake >& /dev/null
|
||||
+which gmake > /dev/null
|
||||
if [ $? = 0 ]; then
|
||||
MAKE=gmake
|
||||
fi
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
--- pho-util.c.orig Thu Jul 29 03:08:38 2004
|
||||
+++ pho-util.c Thu Jul 29 03:11:44 2004
|
||||
@@ -2,34 +2,51 @@
|
||||
#include "pho.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
+#include <dirent.h>
|
||||
|
||||
-
|
||||
+char *fTableDir=GCIN_TABLE_DIR;
|
||||
char phofname[128]="";
|
||||
-extern char *TableDir;
|
||||
u_short idxnum_pho;
|
||||
PHO_IDX idx_pho[1403];
|
||||
int ch_pho_ofs;
|
||||
PHO_ITEM *ch_pho;
|
||||
int ch_phoN;
|
||||
|
||||
+void get_dir(char *tt)
|
||||
+{
|
||||
+ strcpy(tt,(char *)getenv("HOME"));
|
||||
+ strcat(tt,"/.gcin");
|
||||
+
|
||||
+ DIR *dir;
|
||||
+ if ((dir=opendir(tt))==NULL) {
|
||||
+ char vv[128];
|
||||
+
|
||||
+ mkdir(tt,0755);
|
||||
+ sprintf(vv,"cp %s/* %s", fTableDir, tt);
|
||||
+ system(vv);
|
||||
+ }
|
||||
+ else
|
||||
+ closedir(dir);
|
||||
+}
|
||||
+
|
||||
void pho_load()
|
||||
{
|
||||
#ifndef NO_PRIVATE_TSIN
|
||||
if (!phofname[0]) {
|
||||
char tt[128];
|
||||
|
||||
- get_gcin_dir(tt);
|
||||
+ get_dir(tt);
|
||||
strcat(tt,"/pho.tab");
|
||||
strcpy(phofname,tt);
|
||||
|
||||
char vv[128];
|
||||
if (access(phofname, W_OK) < 0){
|
||||
- sprintf(vv,"cp %s/pho.tab %s\n", TableDir, tt);
|
||||
+ sprintf(vv,"cp %s/pho.tab %s\n", fTableDir, tt);
|
||||
system(vv);
|
||||
}
|
||||
|
||||
#else
|
||||
- strcat(strcpy(phofname, TableDir), "pho.tab");
|
||||
+ strcat(strcpy(phofname, fTableDir), "pho.tab");
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- tsin-util.c.orig Sat Jul 24 19:34:37 2004
|
||||
+++ tsin-util.c Sat Jul 24 19:34:55 2004
|
||||
@@ -149,7 +149,7 @@
|
||||
for(;hashno<256;hashno++) hashidx[hashno]++;
|
||||
|
||||
if ((fw=fopen(tsidxfname,"w"))==NULL) {
|
||||
- error("%s create err", tsidxfname);
|
||||
+ p_err("%s create err", tsidxfname);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- tsin.c.orig Sat Jul 24 19:33:14 2004
|
||||
+++ tsin.c Sat Jul 24 19:34:11 2004
|
||||
@@ -722,7 +722,7 @@
|
||||
selidx[0]=tmp;
|
||||
|
||||
if ((fp=fopen(tsidxfname,"r+"))==NULL) {
|
||||
- error("%s modify err", tsidxfname);
|
||||
+ p_err("%s modify err", tsidxfname);
|
||||
return;
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= gcin
|
||||
PORTVERSION= 0.1.9
|
||||
PORTVERSION= 0.2.0
|
||||
CATEGORIES= chinese
|
||||
MASTER_SITES= http://www.csie.nctu.edu.tw/~cp76/gcin/download/
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
MD5 (gcin-0.1.9.tar.bz2) = bd382f4d818061c7d2e20eff7fb43f73
|
||||
SIZE (gcin-0.1.9.tar.bz2) = 385011
|
||||
MD5 (gcin-0.2.0.tar.bz2) = 6593ae90113d24fc8ada886805685af9
|
||||
SIZE (gcin-0.2.0.tar.bz2) = 387628
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- IMdkit/lib/IMConn.c.orig Sun Jul 2 10:01:01 2000
|
||||
+++ IMdkit/lib/IMConn.c Sun Jul 25 19:45:46 2004
|
||||
@@ -30,7 +30,7 @@
|
||||
******************************************************************/
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
-#include <malloc.h>
|
||||
+#include <stdlib.h>
|
||||
#include "IMdkit.h"
|
||||
#include <stdarg.h>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
--- IMdkit/Makefile.orig Sat Jul 24 19:18:15 2004
|
||||
+++ IMdkit/Makefile Sat Jul 24 19:18:30 2004
|
||||
@@ -2,15 +2,15 @@
|
||||
all: libXimd.a Xi18n_sample/sampleIM
|
||||
|
||||
libXimd.a:
|
||||
- make -C lib
|
||||
+ gmake -C lib
|
||||
|
||||
Xi18n_sample/sampleIM:
|
||||
- cd Xi18n_sample; make
|
||||
+ cd Xi18n_sample; gmake
|
||||
|
||||
clean:
|
||||
rm -f *.bak *~
|
||||
- make -C lib clean
|
||||
- make -C Xi18n_sample clean
|
||||
+ gmake -C lib clean
|
||||
+ gmake -C Xi18n_sample clean
|
||||
|
||||
install:
|
||||
@echo nothing to be installed.
|
|
@ -1,9 +0,0 @@
|
|||
--- IMdkit/lib/Makefile.orig Sun Aug 1 00:51:25 2004
|
||||
+++ IMdkit/lib/Makefile Sun Aug 1 00:51:29 2004
|
||||
@@ -1,6 +1,5 @@
|
||||
include ../../config.mak
|
||||
|
||||
-CC = gcc
|
||||
#CFLAGS = -c -O2 -fno-strength-reduce -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15 -DNARROWPROTO -DUNIXCONN -DTCPCONN -DXIM_t -DTRANS_SERVER
|
||||
CFLAGS = -c $(OPTFLAGS) -fno-strength-reduce -DXIM_t -DTRANS_SERVER
|
||||
INC = -I../include -I/usr/X11R6/include
|
|
@ -1,88 +1,42 @@
|
|||
--- Makefile.orig Tue Jul 20 13:01:30 2004
|
||||
+++ Makefile Thu Jul 29 03:09:13 2004
|
||||
@@ -1,5 +1,3 @@
|
||||
-OPTFLAGS=-g
|
||||
-
|
||||
include config.mak
|
||||
|
||||
.SUFFIXES: .c .o .E
|
||||
@@ -7,9 +5,9 @@
|
||||
OBJS=gcin.o IC.o eve.o win0.o pho.o tsin.o win1.o util.o pho-util.o gcin-conf.o tsin-util.o \
|
||||
win-sym.o intcode.o pho-sym.o win-int.o win-pho.o gcin-settings.o
|
||||
OBJS_TSLEARN=tslearn.o util.o gcin-conf.o pho-util.o tsin-util.o gcin-send.o pho-sym.o
|
||||
-OBJS_phod2a=phod2a.o pho-util.o gcin-conf.o pho-sym.o
|
||||
-OBJS_tsa2d=tsa2d.o gcin-send.o util.o pho-sym.o gcin-conf.o
|
||||
-OBJS_phoa2d=phoa2d.o pho-sym.o gcin-send.o gcin-conf.o
|
||||
+OBJS_phod2a=phod2a.o pho-util.o pho-sym.o
|
||||
+OBJS_tsa2d=tsa2d.o util.o pho-sym.o
|
||||
+OBJS_phoa2d=phoa2d.o pho-sym.o
|
||||
OBJS_kbmcv=kbmcv.o pho-sym.o
|
||||
OBJS_tsd2a=tsd2a.o pho-sym.o
|
||||
OBJS_gcin_steup=gcin-setup.o gcin-conf.o util.o gcin-send.o gcin-settings.o
|
||||
@@ -26,7 +24,7 @@
|
||||
--- Makefile.orig Sun Aug 1 18:20:13 2004
|
||||
+++ Makefile Mon Aug 2 23:22:49 2004
|
||||
@@ -27,7 +27,7 @@
|
||||
PROGS_CV=kbmcv
|
||||
|
||||
all: $(PROGS) $(DATA) $(PROGS_CV) gcin.spec
|
||||
- make -C data
|
||||
+ gmake -C data
|
||||
+ ${MAKE} -C data
|
||||
|
||||
gcin: $(OBJS) $(IMdkitLIB)
|
||||
$(CC) -o $@ $(OBJS) $(IMdkitLIB) $(LDFLAGS)
|
||||
@@ -34,28 +32,28 @@
|
||||
ln -sf $@ $@.test
|
||||
|
||||
tslearn: $(OBJS_TSLEARN)
|
||||
- cc -o $@ $(OBJS_TSLEARN) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_TSLEARN) $(LDFLAGS)
|
||||
|
||||
gcin-setup: $(OBJS_gcin_steup)
|
||||
- cc -o $@ $(OBJS_gcin_steup) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_gcin_steup) $(LDFLAGS)
|
||||
|
||||
phoa2d: $(OBJS_phoa2d)
|
||||
- cc -o $@ $(OBJS_phoa2d) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_phoa2d)
|
||||
|
||||
phod2a: $(OBJS_phod2a)
|
||||
- cc -o $@ $(OBJS_phod2a) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_phod2a)
|
||||
|
||||
tsa2d: $(OBJS_tsa2d)
|
||||
- cc -o $@ $(OBJS_tsa2d) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_tsa2d)
|
||||
|
||||
tsd2a: $(OBJS_tsd2a)
|
||||
- cc -o $@ $(OBJS_tsd2a) $(LDFLAGS)
|
||||
+ $(CC) -o $@ $(OBJS_tsd2a)
|
||||
|
||||
kbmcv: $(OBJS_kbmcv)
|
||||
@@ -56,7 +56,7 @@
|
||||
$(CC) -o $@ $(OBJS_kbmcv)
|
||||
|
||||
$(IMdkitLIB):
|
||||
- make -C IMdkit/lib
|
||||
+ gmake -C IMdkit/lib
|
||||
+ ${MAKE} -C IMdkit/lib
|
||||
|
||||
install:
|
||||
install -d $(GCIN_TABLE_DIR)
|
||||
@@ -67,8 +65,8 @@
|
||||
install -s $(PROGS) $(bindir)
|
||||
@@ -67,8 +67,8 @@
|
||||
install -d $(bindir)
|
||||
install -d $(libdir)/menu
|
||||
install -m 644 menu/* $(libdir)/menu
|
||||
- make -C data install
|
||||
- if [ $(prefix) = /usr/local ]; then \
|
||||
+ gmake -C data install
|
||||
+ ${MAKE} -C data install
|
||||
+ if [ $(prefix) != /usr/local ]; then \
|
||||
install -m 644 menu/* /usr/lib/menu; \
|
||||
which update-menus >& /dev/null && update-menus; \
|
||||
sh modify-XIM; \
|
||||
@@ -78,8 +76,8 @@
|
||||
install -m 644 menu/* $(libdir)/menu; \
|
||||
@@ -80,8 +80,8 @@
|
||||
install -s $(PROGS) $(bindir); \
|
||||
fi
|
||||
clean:
|
||||
- make -C IMdkit clean
|
||||
- make -C data clean
|
||||
+ gmake -C IMdkit clean
|
||||
+ gmake -C data clean
|
||||
+ ${MAKE} -C IMdkit clean
|
||||
+ ${MAKE} -C data clean
|
||||
rm -f *.o *~ *.E config.mak tags core.* $(PROGS) $(PROGS_CV) $(DATA) .depend gcin.spec menu/*~
|
||||
cd ..; tar cvfj gcin.tbz gcin
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
--- configure.orig Sat Jul 17 16:26:48 2004
|
||||
+++ configure Sun Jul 25 19:48:05 2004
|
||||
@@ -38,7 +38,7 @@
|
||||
GCIN_VERSION=`cat VERSION.gcin`
|
||||
sed -e "s/__gcin_version__/$GCIN_VERSION/" < gcin.spec.in > gcin.spec
|
||||
--- configure.orig Mon Aug 2 13:32:06 2004
|
||||
+++ configure Mon Aug 2 23:01:34 2004
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
-OPTFLAGS="-g"
|
||||
+OPTFLAGS=$CFLAGS
|
||||
if [ $prefix = /usr ]; then
|
||||
OPTFLAGS="-O"
|
||||
MAKE=make
|
||||
-which gmake >& /dev/null
|
||||
+which gmake > /dev/null
|
||||
if [ $? = 0 ]; then
|
||||
MAKE=gmake
|
||||
fi
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
--- pho-util.c.orig Thu Jul 29 03:08:38 2004
|
||||
+++ pho-util.c Thu Jul 29 03:11:44 2004
|
||||
@@ -2,34 +2,51 @@
|
||||
#include "pho.h"
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
+#include <dirent.h>
|
||||
|
||||
-
|
||||
+char *fTableDir=GCIN_TABLE_DIR;
|
||||
char phofname[128]="";
|
||||
-extern char *TableDir;
|
||||
u_short idxnum_pho;
|
||||
PHO_IDX idx_pho[1403];
|
||||
int ch_pho_ofs;
|
||||
PHO_ITEM *ch_pho;
|
||||
int ch_phoN;
|
||||
|
||||
+void get_dir(char *tt)
|
||||
+{
|
||||
+ strcpy(tt,(char *)getenv("HOME"));
|
||||
+ strcat(tt,"/.gcin");
|
||||
+
|
||||
+ DIR *dir;
|
||||
+ if ((dir=opendir(tt))==NULL) {
|
||||
+ char vv[128];
|
||||
+
|
||||
+ mkdir(tt,0755);
|
||||
+ sprintf(vv,"cp %s/* %s", fTableDir, tt);
|
||||
+ system(vv);
|
||||
+ }
|
||||
+ else
|
||||
+ closedir(dir);
|
||||
+}
|
||||
+
|
||||
void pho_load()
|
||||
{
|
||||
#ifndef NO_PRIVATE_TSIN
|
||||
if (!phofname[0]) {
|
||||
char tt[128];
|
||||
|
||||
- get_gcin_dir(tt);
|
||||
+ get_dir(tt);
|
||||
strcat(tt,"/pho.tab");
|
||||
strcpy(phofname,tt);
|
||||
|
||||
char vv[128];
|
||||
if (access(phofname, W_OK) < 0){
|
||||
- sprintf(vv,"cp %s/pho.tab %s\n", TableDir, tt);
|
||||
+ sprintf(vv,"cp %s/pho.tab %s\n", fTableDir, tt);
|
||||
system(vv);
|
||||
}
|
||||
|
||||
#else
|
||||
- strcat(strcpy(phofname, TableDir), "pho.tab");
|
||||
+ strcat(strcpy(phofname, fTableDir), "pho.tab");
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- tsin-util.c.orig Sat Jul 24 19:34:37 2004
|
||||
+++ tsin-util.c Sat Jul 24 19:34:55 2004
|
||||
@@ -149,7 +149,7 @@
|
||||
for(;hashno<256;hashno++) hashidx[hashno]++;
|
||||
|
||||
if ((fw=fopen(tsidxfname,"w"))==NULL) {
|
||||
- error("%s create err", tsidxfname);
|
||||
+ p_err("%s create err", tsidxfname);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- tsin.c.orig Sat Jul 24 19:33:14 2004
|
||||
+++ tsin.c Sat Jul 24 19:34:11 2004
|
||||
@@ -722,7 +722,7 @@
|
||||
selidx[0]=tmp;
|
||||
|
||||
if ((fp=fopen(tsidxfname,"r+"))==NULL) {
|
||||
- error("%s modify err", tsidxfname);
|
||||
+ p_err("%s modify err", tsidxfname);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in a new issue