Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

4
inputmethod/xcin/DESCR Normal file
View File

@@ -0,0 +1,4 @@
XCIN is an XIM (X Input Method) server which is widely used in Taiwan to
perform Chinese input under X Window system. It is originally developed
by Edward Der-Hua Liu (Oct. 1994) and many other programmers in early
days; while now it is supported by the XCIN Project.

83
inputmethod/xcin/Makefile Normal file
View File

@@ -0,0 +1,83 @@
# $NetBSD: Makefile,v 1.34 2013/05/31 12:41:10 wiz Exp $
DISTNAME= xcin-2.5.3.pre2
PKGNAME= xcin-2.5.3rc2
PKGREVISION= 13
CATEGORIES= chinese x11
MASTER_SITES= ftp://xcin.linux.org.tw/pub/xcin/xcin/devel/
MAINTAINER= rxg@NetBSD.org
HOMEPAGE= http://xcin.linux.org.tw/
COMMENT= Chinese XIM server
LICENSE= gnu-gpl-v2
MAKE_JOBS_SAFE= no
WRKSRC= ${WRKDIR}/xcin
USE_LIBTOOL= yes
USE_PKGLOCALEDIR= yes
USE_TOOLS+= msgfmt pax perl:run
USE_X11BASE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-db-lib=${BDBBASE}/lib
CONFIGURE_ARGS+= --with-db-inc=${BDBBASE}/include/${BDB_TYPE}
.include "../../mk/bsd.prefs.mk"
INSTALLATION_DIRS= share/doc/xcin
EGDIR= ${PREFIX}/share/examples/xcin
CONF_FILES= ${EGDIR}/xcinrc ${PKG_SYSCONFDIR}/xcinrc
PLIST_VARS+= big5hk gbk
.if ${OPSYS} == "NetBSD"
GB2312_ENC= euccn
.elif ${OPSYS} == "Linux"
GB2312_ENC= gb2312
PLIST.big5hk= yes
BIG5HK_ENC= big5hkscs
PLIST.gbk= yes
GBK_ENC= gbk
.elif ${OPSYS} == "HPUX"
GB2312_ENC= gb2312
PLIST.big5hk= yes
BIG5HK_ENC= hkbig5
.else
GB2312_ENC= euc
.endif
PLIST_SUBST+= GB2312_ENC=${GB2312_ENC}
.if defined(PLIST.big5hk) && ${PLIST.big5hk} == "yes"
PLIST_SUBST+= BIG5HK_ENC=${BIG5HK_ENC}
.endif
.if defined(PLIST.gbk) && ${PLIST.gbk} == "yes"
PLIST_SUBST+= GBK_ENC=${GBK_ENC}
.endif
post-extract:
${CP} ${FILESDIR}/xcinrc.DRAGONFLY ${WRKSRC}/etc
post-install:
cd ${WRKSRC}/doc && pax -rw \
-s ',^\./man$$,,' -s ',^\./man/.*,,' \
. ${DESTDIR}${PREFIX}/share/doc/xcin
INSTALL_MAKE_FLAGS+= program_prefix=${DESTDIR}
BUILDLINK_DEPMETHOD.libXt?= build
BDB_ACCEPTED= db2 db3 db4 db5
BUILDLINK_TRANSFORM+= l:db:${BDB_TYPE}
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../inputmethod/libchewing02/buildlink3.mk"
.include "../../inputmethod/libtabe/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../mk/bdb.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

71
inputmethod/xcin/PLIST Normal file
View File

@@ -0,0 +1,71 @@
@comment $NetBSD: PLIST,v 1.8 2012/01/07 12:58:45 obache Exp $
bin/cin2tab
bin/xcin
lib/libxcin.la
lib/xcin/bimsphone.la
lib/xcin/chewing.la
lib/xcin/gen_inp.la
lib/xcin/tab/big5/array30.tab
lib/xcin/tab/big5/bims_pinyin.tab
lib/xcin/tab/big5/cj.tab
lib/xcin/tab/big5/default.phr
lib/xcin/tab/big5/jyutping.tab
lib/xcin/tab/big5/jyutping0.tab
lib/xcin/tab/big5/phone.tab
lib/xcin/tab/big5/pinyin.tab
lib/xcin/tab/big5/pinyin0.tab
lib/xcin/tab/big5/simplex.tab
lib/xcin/tab/big5/sys.tab
lib/xcin/tab/big5/telecode.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/array30.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/bims_pinyin.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/cj.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/default.phr
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/jyutping.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/jyutping0.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/phone.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/pinyin.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/simplex.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/sys.tab
${PLIST.big5hk}lib/xcin/tab/${BIG5HK_ENC}/telecode.tab
lib/xcin/tab/${GB2312_ENC}/default.phr
lib/xcin/tab/${GB2312_ENC}/jtcj_gb.tab
lib/xcin/tab/${GB2312_ENC}/phonegb2.tab
lib/xcin/tab/${GB2312_ENC}/pinyin.tab
lib/xcin/tab/${GB2312_ENC}/shuangpin.tab
lib/xcin/tab/${GB2312_ENC}/sys.tab
lib/xcin/tab/${GB2312_ENC}/wubizixing.tab
${PLIST.gbk}lib/xcin/tab/${GBK_ENC}/default.phr
${PLIST.gbk}lib/xcin/tab/${GBK_ENC}/sys.tab
lib/xcin/zh_hex.la
man/man1/xcin.1
share/doc/xcin/Bugs
share/doc/xcin/COPYING
share/doc/xcin/CREDITS
share/doc/xcin/Changes
share/doc/xcin/Cin
share/doc/xcin/CopyRight
share/doc/xcin/En/README.En
share/doc/xcin/En/SETUP.En
share/doc/xcin/En/Usage.En
share/doc/xcin/En/UserGuide.En
share/doc/xcin/En/internal/module.En
share/doc/xcin/En/internal/structer.En
share/doc/xcin/FAQ
share/doc/xcin/README
share/doc/xcin/SETUP
share/doc/xcin/Todo
share/doc/xcin/Usage
share/doc/xcin/UserGuide
share/doc/xcin/history/Changes-19991011
share/doc/xcin/internal/IMdkit
share/doc/xcin/internal/gen_inp
share/doc/xcin/internal/gui_request
share/doc/xcin/internal/module
share/doc/xcin/internal/structer
share/doc/xcin/modules/bimsphone
share/doc/xcin/modules/gen_inp
share/doc/xcin/modules/im_comm
share/doc/xcin/modules/zh_hex
share/examples/xcin/xcinrc
share/locale/zh_TW/LC_MESSAGES/xcin.mo

18
inputmethod/xcin/distinfo Normal file
View File

@@ -0,0 +1,18 @@
$NetBSD: distinfo,v 1.8 2013/04/30 22:23:07 joerg Exp $
SHA1 (xcin-2.5.3.pre2.tar.gz) = 27e4c47e09c44e92e3a3afc9e08134e1485f6795
RMD160 (xcin-2.5.3.pre2.tar.gz) = f1fb83d1e21a0f5dbb80c5eafdaa6c7f313ea865
Size (xcin-2.5.3.pre2.tar.gz) = 1433915 bytes
SHA1 (patch-aa) = 9d0631ee59d376515cf260537f664dda9bd14a83
SHA1 (patch-ab) = cf899acb6f5502175c9cbfd45da119cd6f6ddb5a
SHA1 (patch-ac) = 63ad86449dd44ddf3db2ed661de2e290c894131f
SHA1 (patch-ad) = 6e59d32f5e3f8f06f8b4bcbb32e221678db74018
SHA1 (patch-ae) = 13985687af55de0a6727150d41d2d6333d103689
SHA1 (patch-af) = 23dde43647de72fb6492a51016379db88f37cdd2
SHA1 (patch-ag) = 009aff61710ad0da4492e366f35fa565b0abc32c
SHA1 (patch-ah) = 0bc13a5e03157cc788228162d7f212d5741c29bf
SHA1 (patch-ai) = 324cd99f69bd226846dc65f100c523c056fc13c6
SHA1 (patch-aj) = d7b9adac4d08fcee744f80aaece059bdd96ab23c
SHA1 (patch-src_include_xcintool.h) = 77a36ce6d4bd40433afad66813ab455e879997f3
SHA1 (patch-src_xcin__main.c) = d19a256c60c93da4c9162e5f6d0b3fdbb7922138
SHA1 (patch-src_xim.c) = 11bb79b228f9eda729f4f6a543efcdcf74538112

View File

@@ -0,0 +1,207 @@
;
; Xcin resource file for DragonFlyBSD system.
;
; By T.H.Hsieh.
;
; Directories.
;
(define XCIN_DEFAULT_DIR "%xcin_dir%")
(define XCIN_USER_DIR ".xcin")
;
; This defines GUI attribute.
;
(define INDEX_FONT "-sony-*-16-*-iso8859-1")
(define FG_COLOR "white")
(define BG_COLOR "blue")
(define M_FG_COLOR "yellow")
(define M_BG_COLOR "darkred")
(define ULINE_COLOR "cyan")
(define GRID_COLOR "white")
(define X_GEOMETRY "45x2+200-1")
(define START_MAINWIN2 "NO")
(define MAINWIN2_GEOMETRY "27x1+200-1")
(define XCIN_HIDE "NO")
(define XKILL_DISABLE "NO")
(define SINGLE_IM_CONTEXT "NO")
(define IM_FOCUS_ON "NO")
(define KEEP_POSITION_ON "NO")
(define DISABLE_WM_CTRL "NO")
(define DIFF_BEEP "YES")
(define KEYBOARD_TRANSLATE "NO")
;
; XIM Input Style Adjustments.
;
(define INPUT_STYLE '(Root OverTheSpot))
(define OVERSPOT_USE_USRCOLOR "YES")
(define OVERSPOT_USE_USRFONTSET "YES")
(define OVERSPOT_WINDOW_ONLY "NO")
(define LOCALE '(zh_TW.Big5 zh_CN.eucCN))
;
; Special Trigger Keys.
;
;(define FKEY_ZHEN "ctrl space")
;(define FKEY_2BSB "shift space")
;(define FKEY_CIRIM "ctrl shift")
;(define FKEY_CIRRIM "shift ctrl")
;(define FKEY_CHREP "ctrl alt r")
;(define FKEY_SIMD "ctrl alt i")
;(define FKEY_IMFOCUS "ctrl alt f")
;(define FKEY_IMN "ctrl alt")
;(define FKEY_QPHRASE "shift alt")
;
; IM module default resources.
;
(define gen_inp_default
'((AUTO_COMPOSE YES)
(AUTO_UPCHAR YES)
(AUTO_FULLUP NO)
(SPACE_AUTOUP NO)
(SELKEY_SHIFT NO)
(SPACE_IGNORE NO)
(SPACE_RESET YES)
(AUTO_RESET NO)
(WILD_ENABLE YES)
(SINMD_IN_LINE1 NO)
(END_KEY NO)
(QPHRASE_MODE 0) ; 1:shift, 2:ctrl, 4:alt, 8:fallback
(DISABLE_SEL_LIST "NONE")
(KEYSTROKE_REMAP "NONE")
(BEEP_WRONG YES)
(BEEP_DUPCHAR NO)
(TSI_FNAME "%tabe_data%tsi.db")
(HINT_SELECT NO)
(HINT_TSI NO)))
(define bimsphone_default
'((N_SELECTION_KEY 9)
(SELECTION_KEYS 0) ; 0: "1234567890", 1: "asdfgjkl;"
(PAGE_KEYS 5) ; 1:<> 2:,. 4:(Rt)(Lt)
(QPHRASE_MODE 1) ; 1:shift, 2:ctrl, 4:alt, 8:fallback
;
; This is only valid for "bimsphone*" IM name.
(AUTO_SELECTION YES)
(KEYMAP 0) ; 0:zozy, 1:et, 2:et26, 3:hsu
;
; This is only valid for "bimspinyin*" IM name.
(PINPHO_MAP "bims_pinyin")
;
; The following has effect only when AUTO_SELECTION is YES
(TSI_FNAME "%tabe_data%tsi.db")
(YIN_FNAME "%tabe_data%yin.db")
(SPACE_SELECTION NO)
(PHRASE_SELECTION YES)
(N_SELECTION_PHR 4)
;
; The following has effect only when AUTO_SELECTION is NO
(AUTO_UPCHAR YES)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; This is the global configuration of the zh_TW.Big5 locale
;
(define zh_TW.Big5
'((DEFAULT_IM "cj")
(DEFAULT_IM_MODULE "gen_inp")
(DEFAULT_IM_SINMD "DEFAULT")
(PHRASE "default.phr")
(CINPUT (cj simplex phone bimspinyin bimsphone jyutping
array30 jyutping0 chewing zh_hex))
(FONTSET "-sony-*-24-*-iso8859-1,-*-medium-r-*-24-*-big5-0")
(OVERSPOT_FONTSET "-sony-*-16-*-iso8859-1,-*-medium-r-*-16-*-big5-0")))
;
; Here are detailed configuration of each IM (for zh_TW.Big5 locale).
;
(define cj@big5
'((SETKEY 1)))
(define simplex@big5
'((SETKEY 2)))
(define phone@big5
'((SETKEY 3)
(END_KEY YES)
(BEEP_DUPCHAR YES)))
(define jyutping@big5
'((SETKEY 4)
(END_KEY YES)
(BEEP_DUPCHAR YES)))
(define bimsphone@big5
'((SETKEY 6)
(MODULE "bimsphone")))
(define bimspinyin@big5
'((SETKEY 7)
(MODULE "bimsphone")))
(define array30@big5
'((SETKEY 8)
(BEEP_DUPCHAR YES)
(DISABLE_SEL_LIST "w")
(KEYSTROKE_REMAP "t:0xaaba;T:0xaaba;")))
(define jyutping0@big5
'((SETKEY 9)
(BEEP_DUPCHAR YES)))
(define chewing@big5
'((SETKEY 10)
(MODULE "chewing")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; This is the global configuration of the zh_CN.eucCN locale
;
(define zh_CN.eucCN
'((DEFAULT_IM "pinyin")
(DEFAULT_IM_MODULE "gen_inp")
(DEFAULT_IM_SINMD "DEFAULT")
(PHRASE "default.phr")
(CINPUT (pinyin shuangpin jtcj_gb wubizixing phonegb2
zh_hex))
(FONTSET "-sony-*-24-*-iso8859-1,-*-medium-r-*-24-*-gb2312.1980-0")
(OVERSPOT_FONTSET "-sony-*-16-*-iso8859-1,-*-medium-r-*-16-*-gb2312.1980-0")))
;
; Here are detailed configuration of each IM (for zh_CN.eucCN locale).
;
(define pinyin@euccn
'((SETKEY 1)
(BEEP_DUPCHAR YES)))
(define shuangpin@euccn
'((SETKEY 2)
(BEEP_DUPCHAR YES)))
(define jtcj_gb@euccn
'((SETKEY 3)))
(define phonegb2@euccn
'((SETKEY 4)
(END_KEY YES)
(BEEP_DUPCHAR YES)))
(define wubizixing@euccn
'((SETKEY 5)))
;
; The zh_hex module (zh_hex input method) is a special IM, which can be
; used in many different encodings.
;
(define zh_hex
'((SETKEY 0)
(MODULE zh_hex)
(INP_CNAME_big5 "0xa4ba+0xbd58")
(INP_CNAME_euccn "0xc4da+0xc2eb")
(BEEP_WRONG YES)))

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-aa,v 1.3 2009/11/24 11:23:34 obache Exp $
--- etc/Makefile.in.orig 2001-11-28 22:39:03.000000000 +0800
+++ etc/Makefile.in
@@ -22,9 +22,8 @@ xcinrc:
.PHONY: install clean distclean subsys
install: all
- if [ ! -d "$(xcin_rcp)" ]; then $(INSTALL) -d $(xcin_rcp); fi
- if [ -f $(xcin_rcp)/xcinrc ]; then mv $(xcin_rcp)/xcinrc $(xcin_rcp)/xcinrc.old; fi
- $(INSTALL_DATA) xcinrc $(xcin_rcp)
+ if [ ! -d "$(program_prefix)$(prefix)/share/examples/xcin" ]; then $(INSTALL) -d $(program_prefix)$(prefix)/share/examples/xcin; fi
+ $(INSTALL_DATA) xcinrc $(program_prefix)$(prefix)/share/examples/xcin
clean:
rm -f xcinrc

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-ab,v 1.3 2006/04/28 18:12:29 joerg Exp $
--- cin/big5/Makefile.in.orig 2001-09-06 15:41:32.000000000 +0000
+++ cin/big5/Makefile.in
@@ -11,6 +11,9 @@ all: all-$(OS_TYPE)
all-LINUX:
( BIG5ENC=big5 BIG5HKENC=big5hkscs make -f Rules make-big5 make-big5hkscs )
+all-DRAGONFLY:
+ ( BIG5ENC=big5 make -f Rules make-big5 )
+
all-FREEBSD:
( BIG5ENC=big5 make -f Rules make-big5 )
@@ -32,6 +35,9 @@ install: all install-$(OS_TYPE)
install-LINUX:
( BIG5ENC=big5 BIG5HKENC=big5hkscs make -f Rules install_big5 install_big5hkscs )
+install-DRAGONFLY:
+ ( BIG5ENC=big5 make -f Rules install_big5 )
+
install-FREEBSD:
( BIG5ENC=big5 make -f Rules install_big5 )

View File

@@ -0,0 +1,44 @@
$NetBSD: patch-ac,v 1.4 2006/04/28 18:12:29 joerg Exp $
--- configure.orig 2001-11-27 14:21:17.000000000 +0000
+++ configure
@@ -5170,6 +5170,13 @@ EOF
EOF
;;
+ dragonfly*)
+ os_type=DRAGONFLY
+ cat >> confdefs.h <<\EOF
+#define DRAGONFLY 1
+EOF
+
+ ;;
hp*)
os_type=HPUX
cat >> confdefs.h <<\EOF
@@ -7666,7 +7673,7 @@ found=n
fi
done
- if test $found = n; then
+ if test $found = y; then
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
echo "configure:7672: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
@@ -8619,7 +8628,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
+s%@CFLAGS@%$CFLAGS $PTHREAD_CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
@@ -8751,6 +8760,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile:s
src/Cinput/zh_hex/Makefile \
src/Cinput/gen_inp/Makefile \
src/Cinput/bimsphone/Makefile \
+ src/Cinput/chewing/Makefile \
src/util/Makefile \
src/util/cin2tab/Makefile \
src/util/testprog/Makefile \

View File

@@ -0,0 +1,54 @@
$NetBSD: patch-ad,v 1.2 2006/01/28 03:03:11 rxg Exp $
--- etc/xcinrc.NETBSD.orig 2001-11-29 21:50:42.000000000 +0800
+++ etc/xcinrc.NETBSD
@@ -112,7 +112,7 @@
(DEFAULT_IM_SINMD "DEFAULT")
(PHRASE "default.phr")
(CINPUT (cj simplex phone bimspinyin bimsphone jyutping
- array30 jyutping0 zh_hex))
+ array30 jyutping0 chewing zh_hex))
(FONTSET "-sony-*-24-*-iso8859-1,-*-medium-r-*-24-*-big5-0")
(OVERSPOT_FONTSET "-sony-*-16-*-iso8859-1,-*-medium-r-*-16-*-big5-0")))
;
@@ -152,6 +152,10 @@
'((SETKEY 9)
(BEEP_DUPCHAR YES)))
+(define chewing@big5
+ '((SETKEY 10)
+ (MODULE "chewing")))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
@@ -163,7 +167,7 @@
(DEFAULT_IM_SINMD "DEFAULT")
(PHRASE "default.phr")
(CINPUT (pinyin shuangpin jtcj_gb wubizixing phonegb2
- array30 zh_hex))
+ zh_hex))
(FONTSET "-sony-*-24-*-iso8859-1,-*-medium-r-*-24-*-gb2312.1980-0")
(OVERSPOT_FONTSET "-sony-*-16-*-iso8859-1,-*-medium-r-*-16-*-gb2312.1980-0")))
;
@@ -180,7 +184,7 @@
(define jtcj_gb@euccn
'((SETKEY 3)))
-(define phonegb2@gb2312
+(define phonegb2@euccn
'((SETKEY 4)
(END_KEY YES)
(BEEP_DUPCHAR YES)))
@@ -188,11 +192,6 @@
(define wubizixing@euccn
'((SETKEY 5)))
-(define array30@gb2312
- '((SETKEY 8)
- (BEEP_DUPCHAR YES)
- (DISABLE_SEL_LIST "w")
- (KEYSTROKE_REMAP "t:0xb5c4;T:0xb5c4")))
;

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-ae,v 1.1 2006/01/28 03:03:11 rxg Exp $
--- src/Cinput/chewing/.depend.orig 2006-01-21 20:19:00.000000000 +0800
+++ src/Cinput/chewing/.depend
@@ -0,0 +1,9 @@
+#
+# PLEASE DON'T EDIT.
+#
+# This is automatically generated from "make depend".
+# You need GCC and perl to generate me.
+#
+
+xcin_chewing.lo: xcin_chewing.c ../../../config.h ../../../src/include/xcintool.h ../../../src/include/module.h
+ @$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(DEFS) $(INC) -c -o $@ xcin_chewing.c

View File

@@ -0,0 +1,36 @@
$NetBSD: patch-af,v 1.1 2006/01/28 03:03:11 rxg Exp $
--- src/Cinput/chewing/Makefile.in.orig 2006-01-21 20:23:07.000000000 +0800
+++ src/Cinput/chewing/Makefile.in
@@ -0,0 +1,31 @@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+include $(top_srcdir)/Rules
+
+INC = $(xcininc) $(intl_inc) $(x_includes) \
+ -I$(top_srcdir) \
+ -DCHEWING_DATA_DIR="\"$(LOCALBASE)/share/chewing\""
+LIB = $(xcinlib) -lchewing
+TARGET = chewing.la
+
+SRC = xcin_chewing.c
+OBJ = $(SRC:.c=.lo)
+
+.PHONY: depend clean distclean
+
+all: depend $(TARGET)
+
+$(TARGET): $(OBJ)
+ $(LIBTOOL) --mode=link $(CC) -module -avoid-version -o $(TARGET) \
+ $(OBJ) $(LIB) -rpath $(moddir)
+include .depend
+
+depend:
+ $(Dep_Rule) | $(PERL) $(makedep) $(rules) LC_Rule lo > .depend
+
+clean:
+ rm -f $(OBJ) *.o $(TARGET) core *.a
+distclean: clean
+ rm -rf Makefile .libs
+install: $(TARGET)
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) $(TARGET) $(xcin_modp)

View File

@@ -0,0 +1,520 @@
$NetBSD: patch-ag,v 1.2 2006/03/14 15:11:54 rxg Exp $
--- src/Cinput/chewing/xcin_chewing.c.orig 2006-03-13 22:26:59.000000000 +0800
+++ src/Cinput/chewing/xcin_chewing.c
@@ -0,0 +1,515 @@
+/*
+ * Bridge interface between libchewing and xcin
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <chewing/chewing.h>
+#include <string.h>
+
+#include <X11/Xlib.h>
+#include <X11/keysym.h>
+#include "xcintool.h"
+#include "module.h"
+
+#include <iconv.h>
+#include <langinfo.h>
+
+/* the following keystate masks are defined by xcin */
+#define CAPS_MASK (2)
+#define CTRL_MASK (4)
+
+#define XCIN_BYTE_NATIVE 2
+#define XCIN_BYTE_UTF8 3
+
+static int chewing_codeset;
+void preconvert(char *input, char *output, int n_char);
+wchar_t convert(wchar_t input);
+
+static char selKey_define[11] = "1234567890\0"; /* Default */
+static int bAddPhraseForward = 0;
+
+int MakeInpinfo(inpinfo_t *inpinfo, ChewingOutput *pgo);
+
+int CallSetConfig(inpinfo_t *inpinfo, ChewingData *pgdata)
+{
+ ConfigData config;
+ int i;
+
+ config.selectAreaLen = 40;
+ config.maxChiSymbolLen = 16;
+ config.bAddPhraseForward = bAddPhraseForward;
+
+ for (i = 0; i < 10;i++)
+ config.selKey[i] = selKey_define[i];
+
+ SetConfig(pgdata, &config);
+ return 0;
+}
+
+static int
+ChewingInit(void *conf, char *objname, xcin_rc_t *xc)
+{
+ char *cmd[2], kb_type_str[256], *cname;
+ ChewingConf *cf = (ChewingConf *)conf ;
+
+ char *prefix = CHEWING_DATA_DIR;
+
+ /*
+ * Because libchewing uses BIG-5 encoding for all its structure
+ * so we need to check if it is UTF-8 locale and do any conv
+ */
+ chewing_codeset = (! strcasecmp(xc->locale.encoding,"utf-8")) ?
+ XCIN_BYTE_UTF8 :
+ XCIN_BYTE_NATIVE;
+ cname = (char *) calloc(3, sizeof(char) * chewing_codeset);
+
+ cmd[0] = objname ;
+ cmd[1] = "KB_TYPE" ;
+ kb_type_str[0] = '\0';
+ get_resource(xc, cmd, kb_type_str, 200, 2);
+ cf->kb_type = KBStr2Num(kb_type_str);
+
+ /* Support selection key definitions */
+ cmd[1] = "SELECTION_KEYS_DEFINE";
+ if (get_resource(xc, cmd, kb_type_str, 256, 2)) {
+ if (strlen(kb_type_str) == 10) {
+ strcpy(selKey_define, kb_type_str);
+ selKey_define[11] = '\0';
+ }
+ }
+ cmd[1] = "ADD_PHRASE_FORWARD";
+ if (get_resource(xc, cmd, kb_type_str, 256, 2)) {
+ if (atoi(kb_type_str) == 1) {
+ bAddPhraseForward = 1;
+ }
+ }
+
+ preconvert("·s»Å­µ", cname, 6);
+ cf->inp_cname = strdup(cname);
+ cf->inp_ename = strdup("Chewing");
+
+ /* Initialize Chewing */
+ ReadTree(prefix);
+ InitChar(prefix);
+ InitDict(prefix);
+ ReadHash(prefix);
+
+ return True;
+}
+
+static int
+ChewingXimInit(void *conf, inpinfo_t *inpinfo)
+{
+ static char cchBuffer[MAX_PHONE_SEQ_LEN];
+ ChewingConf *cf = (ChewingConf *) conf;
+ int i;
+
+ inpinfo->iccf = (ChewingData *) calloc(1, sizeof(ChewingData));
+
+ InitChewing(inpinfo->iccf, cf);
+ CallSetConfig(inpinfo, (ChewingData *) inpinfo->iccf);
+
+ inpinfo->lcch = (wch_t *) calloc(MAX_PHONE_SEQ_LEN, sizeof(wch_t));
+ inpinfo->lcch_grouping = (ubyte_t *) calloc(MAX_PHONE_SEQ_LEN, sizeof(ubyte_t));
+ inpinfo->cch = cchBuffer;
+
+ inpinfo->inp_cname = cf->inp_cname;
+ inpinfo->inp_ename = cf->inp_ename;
+ inpinfo->area3_len = 2 * ZUIN_SIZE + 4;
+ inpinfo->guimode = GUIMOD_LISTCHAR | GUIMOD_SELKEYSPOT;
+ inpinfo->keystroke_len = 0;
+ inpinfo->s_keystroke = (wch_t *) calloc(3 + MAX_PHRASE_LEN, sizeof(wch_t));
+
+ inpinfo->mcch = (wch_t *) calloc(MAX_CHOICE_BUF, sizeof(wch_t));
+ inpinfo->mcch_grouping = (ubyte_t *) calloc( MAX_SELKEY, sizeof(ubyte_t));
+ inpinfo->n_mcch = 0;
+
+ inpinfo->n_lcch = 0;
+ inpinfo->edit_pos = 0;
+ inpinfo->cch_publish.wch = (wchar_t) 0;
+
+ // check_winsize(inpinfo, iccf);
+ // [yet] check winsize is under construction.
+
+ inpinfo->n_selkey = 10;
+ inpinfo->s_selkey = (wch_t *) calloc(MAX_SELKEY, sizeof(wch_t));
+
+ for (i = 0; i < 10; i++) {
+ inpinfo->s_selkey[i].wch = (wchar_t) 0;
+ inpinfo->s_selkey[i].s[0] = selKey_define[i];
+ }
+
+ return True;
+}
+
+void CommitString(inpinfo_t *inpinfo, ChewingOutput *pgo)
+{
+ int i ;
+ char *str;
+ char *output;
+ memset(inpinfo->cch, 0, sizeof(char)*MAX_PHONE_SEQ_LEN);
+ str = (char *) calloc(MAX_PHONE_SEQ_LEN,sizeof(char));
+ output = (char *) calloc(MAX_PHONE_SEQ_LEN / 2 * chewing_codeset, sizeof(char));
+ for (i = 0; i < pgo->nCommitStr; i++)
+ strcat(str, (const char *) pgo->commitStr[i].s);
+ preconvert(str, output, strlen(str));
+ strcat(inpinfo->cch, output);
+ free(str);
+ free(output);
+}
+
+static unsigned int
+ChewingXimEnd(void *conf, inpinfo_t *inpinfo)
+{
+ ChewingOutput gOut ;
+ int rtn ;
+
+ /* if preedit exists, commit the string */
+ OnKeyEnter(inpinfo->iccf, &gOut);
+
+ rtn = MakeInpinfo(inpinfo, &gOut);
+ free(inpinfo->iccf);
+ free(inpinfo->s_keystroke);
+ free(inpinfo->lcch);
+ free(inpinfo->mcch);
+ free(inpinfo->mcch_grouping);
+
+ inpinfo->iccf = NULL;
+ inpinfo->s_keystroke = NULL;
+ inpinfo->lcch = NULL;
+
+ return rtn ;
+}
+
+void ShowChoose(inpinfo_t *inpinfo, ChoiceInfo *pci, ChewingOutput *pgo)
+{
+ int i,no,k,len, kk;
+ char *output;
+
+ // for new xcin, there is no need to modify the lcch buffer
+ // instead, we put phrase to choose in mcch
+ no = pci->pageNo * pci->nChoicePerPage;
+ len = 0;
+
+ for (i = 0;i < pci->nChoicePerPage; no++,i++) {
+
+ // in the last page, no will exceed nTotalChoice
+ if( no >= pci->nTotalChoice )
+ break;
+ output = (char *) calloc(
+ strlen(pci->totalChoiceStr[no]) * chewing_codeset + 1,
+ sizeof(char));
+ preconvert(
+ pci->totalChoiceStr[no], output,
+ strlen(pci->totalChoiceStr[no]));
+ // for each char in the phrase, copy to mcch
+ for (k = 0, kk = 0; output[k] != '\0'; k += chewing_codeset, kk++) {
+ memcpy(inpinfo->mcch[len++].s, &(output[k]), chewing_codeset) ;
+ }
+ free(output);
+ // set grouping to the length of the phrase
+ inpinfo->mcch_grouping[i+1] = kk;
+ }
+ // i stores how many choices are available
+ inpinfo->mcch_grouping[0] = i;
+
+ // set pgstate according to pci->pageNo & pci->nPage
+ if( pci->nPage == 1) {
+ inpinfo->mcch_pgstate = MCCH_ONEPG;
+ }
+ else {
+ if( pci->pageNo == 0 )
+ inpinfo->mcch_pgstate = MCCH_BEGIN;
+ else if( pci->pageNo == pci->nPage - 1)
+ inpinfo->mcch_pgstate = MCCH_END;
+ else
+ inpinfo->mcch_pgstate = MCCH_MIDDLE;
+ }
+
+ inpinfo->n_mcch = len ;
+}
+
+void ShowText(inpinfo_t *inpinfo, ChewingOutput *pgo)
+{
+ int i;
+ memset(inpinfo->lcch, 0, sizeof(wch_t)*MAX_PHONE_SEQ_LEN) ;
+ for (i = 0; i < pgo->chiSymbolBufLen; i++)
+ pgo->chiSymbolBuf[i].wch = convert(pgo->chiSymbolBuf[i].wch);
+ memcpy(inpinfo->lcch, pgo->chiSymbolBuf, sizeof(wch_t) * pgo->chiSymbolBufLen) ;
+ inpinfo->n_lcch = pgo->chiSymbolBufLen ;
+}
+
+void ShowInterval(inpinfo_t *inpinfo, ChewingOutput *pgo)
+{
+ int i, k, begin, len, count, nGroup ;
+ int label[MAX_PHONE_SEQ_LEN] ;
+
+ if( pgo->chiSymbolBufLen == 0) {
+ inpinfo->lcch_grouping[0] = 0 ;
+ return ;
+ }
+
+ // set label
+ for(count=0; count<pgo->chiSymbolBufLen; count++)
+ label[count] = count ;
+
+ for(i=0; i<pgo->nDispInterval; i++) {
+ len = pgo->dispInterval[i].to - pgo->dispInterval[i].from ;
+
+ if( len > 1) {
+ for(k=pgo->dispInterval[i].from; k<pgo->dispInterval[i].to; k++)
+ label[k] = count ;
+ count++ ;
+ }
+ }
+
+ // begin to set lcch_grouping by the label
+ nGroup = 0 ;
+ begin = 0 ;
+ for(i=1; i<pgo->chiSymbolBufLen; i++) {
+ if( label[i] != label[begin] ) {
+ inpinfo->lcch_grouping[++nGroup] = ( i - begin ) ;
+ begin = i ;
+ }
+ }
+ inpinfo->lcch_grouping[++nGroup] = ( i - begin ) ;
+ inpinfo->lcch_grouping[0] = nGroup ;
+}
+
+void ShowStateAndZuin(inpinfo_t *inpinfo, ChewingOutput *pgo)
+{
+ int i, a , len = 0;
+ memset( inpinfo->s_keystroke, 0, sizeof(wch_t)*(3 + MAX_PHRASE_LEN)) ;
+ if(pgo->bShowMsg) {
+ for(i = 0; i < pgo->showMsgLen; i++)
+ pgo->showMsg[i].wch = convert(pgo->showMsg[i].wch);
+ memcpy( inpinfo->s_keystroke, pgo->showMsg, sizeof(wch_t)*pgo->showMsgLen) ;
+ inpinfo->keystroke_len = pgo->showMsgLen ;
+ }
+ else {
+ /* if(pgo->bChiSym)
+ strcpy( (char *)inpinfo->s_keystroke[0].s, "¤¤") ;
+ else
+ strcpy( (char *)inpinfo->s_keystroke[0].s, "­^") ;
+
+ inpinfo->s_keystroke[1].s[0] = ' ' ;
+ for(i=0,a=2; i<ZUIN_SIZE; i++) */
+ for(i=0,a=0; i<ZUIN_SIZE; i++)
+ if(pgo->zuinBuf[i].s[0] != '\0') {
+ inpinfo->s_keystroke[a++].wch = convert(
+ pgo->zuinBuf[i].wch) ;
+ ++ len;
+ }
+ inpinfo->keystroke_len = len;
+ }
+}
+
+void SetCursor(inpinfo_t *inpinfo, ChewingOutput *pgo)
+{
+ inpinfo->edit_pos = pgo->chiSymbolCursor;
+}
+
+int MakeInpinfo(inpinfo_t *inpinfo, ChewingOutput *pgo)
+{
+ int rtnValue = 0 ;
+
+ if(pgo->keystrokeRtn & KEYSTROKE_ABSORB)
+ rtnValue |= IMKEY_ABSORB;
+ if(pgo->keystrokeRtn & KEYSTROKE_IGNORE)
+ rtnValue |= IMKEY_IGNORE;
+ if(pgo->keystrokeRtn & KEYSTROKE_BELL)
+ rtnValue |= IMKEY_BELL;
+ if(pgo->keystrokeRtn & KEYSTROKE_COMMIT) {
+ rtnValue |= IMKEY_COMMIT;
+ CommitString(inpinfo, pgo);
+ }
+
+ if(pgo->pci->nPage != 0) { // in selection mode
+ ShowChoose(inpinfo,pgo->pci,pgo);
+ inpinfo->guimode &= ~GUIMOD_LISTCHAR;
+ }
+ else { // not in selection mode
+ ShowText(inpinfo, pgo);
+ ShowInterval(inpinfo, pgo);
+ inpinfo->guimode |= GUIMOD_LISTCHAR;
+ }
+ ShowStateAndZuin(inpinfo, pgo);
+ SetCursor(inpinfo, pgo);
+ return rtnValue;
+}
+
+static unsigned int
+ChewingKeystroke(void *conf, inpinfo_t *inpinfo, keyinfo_t *keyinfo)
+{
+ KeySym keysym = keyinfo->keysym;
+ ChewingOutput gOut ;
+ int rtn ;
+ static KeySym last_key = 0;
+
+ // set Chinese / English mode by keystate
+ if( keyinfo->keystate & CAPS_MASK ) { // uppercase
+ SetChiEngMode( inpinfo->iccf, SYMBOL_MODE);
+ }
+ else { // lower case
+ SetChiEngMode( inpinfo->iccf, CHINESE_MODE);
+ }
+
+
+ // check no ctrl key was pressed
+ if(keyinfo->keystate >= 0 && !(keyinfo->keystate & CTRL_MASK ) && !(keyinfo->keystate & ShiftMask) ) {
+ switch(keysym) {
+ case XK_Escape:
+ OnKeyEsc(inpinfo->iccf, &gOut) ;
+ inpinfo->n_mcch = 0;
+ break ;
+ case XK_Return:
+ OnKeyEnter(inpinfo->iccf, &gOut) ;
+ inpinfo->n_mcch = 0;
+ break ;
+ case XK_Delete:
+ OnKeyDel(inpinfo->iccf, &gOut) ;
+ break ;
+ case XK_BackSpace:
+ OnKeyBackspace(inpinfo->iccf, &gOut) ;
+ break ;
+ case XK_Up:
+ OnKeyUp(inpinfo->iccf, &gOut);
+ break ;
+ case XK_Down:
+ OnKeyDown(inpinfo->iccf, &gOut) ;
+ break ;
+ case XK_Left:
+ OnKeyLeft(inpinfo->iccf, &gOut) ;
+ break ;
+ case XK_Right:
+ OnKeyRight(inpinfo->iccf, &gOut) ;
+ break ;
+ case XK_Home:
+ OnKeyHome(inpinfo->iccf, &gOut);
+ break;
+ case XK_End:
+ OnKeyEnd(inpinfo->iccf, &gOut);
+ break;
+
+ case XK_Tab:
+ if (last_key == XK_Tab) // double click TAB
+ OnKeyDblTab(inpinfo->iccf, &gOut);
+ else
+ OnKeyTab(inpinfo->iccf, &gOut);
+ break;
+ case XK_Caps_Lock:
+ OnKeyCapslock(inpinfo->iccf, &gOut);
+ break;
+ case ' ': /* Space */
+ OnKeySpace(inpinfo->iccf, &gOut);
+ break;
+ default:
+ OnKeyDefault(inpinfo->iccf, keysym, &gOut);
+ inpinfo->n_mcch = 0;
+ break;
+ }
+ }
+ else if (keyinfo->keystate & ShiftMask) {
+ switch ( keysym ) {
+ case XK_Left:
+ OnKeyShiftLeft(inpinfo->iccf, &gOut) ;
+ break ;
+ case XK_Right:
+ OnKeyShiftRight(inpinfo->iccf, &gOut) ;
+ break;
+ default:
+ OnKeyDefault(inpinfo->iccf, keysym, &gOut);
+ inpinfo->n_mcch = 0;
+ }
+ }
+ else if (keyinfo->keystate & CTRL_MASK) { // Ctrl-key Mask
+ // We need to fill the 'gOut' variable for output.
+ if (keysym <= '9' && keysym >= '0')
+ OnKeyCtrlNum(inpinfo->iccf,keysym,&gOut);
+ else
+ OnKeyCtrlOption(inpinfo->iccf, keysym - 'a' + 1, &gOut);
+ }
+
+
+ last_key = keysym;
+ rtn = MakeInpinfo(inpinfo, &gOut);
+ return rtn ;
+}
+
+static int
+ChewingShowKeystroke(void *conf, simdinfo_t *simdinfo)
+{
+ simdinfo->s_keystroke = NULL;
+ return False;
+}
+
+/* UTF-8 support */
+void
+preconvert(char *input, char *output, int n_char)
+{
+ if (chewing_codeset == XCIN_BYTE_UTF8) {
+ const char *inptr = input;
+ size_t inbytesleft = n_char;
+ size_t outbytesleft = n_char / 2 * 3 + 1;
+
+ char *outptr = output;
+ iconv_t cd;
+
+ cd = iconv_open("UTF-8", "BIG-5");
+ iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft);
+
+ iconv_close(cd);
+ } else
+ strncpy(output, input, n_char);
+}
+
+wchar_t
+convert(wchar_t input)
+{
+ wch_t output;
+ wch_t temp;
+
+ temp.wch = input;
+ if (chewing_codeset == XCIN_BYTE_UTF8) {
+ const char *inptr = temp.s;
+ size_t inbytesleft = 2;
+ size_t outbytesleft = 3;
+ char *outptr = output.s;
+ iconv_t cd;
+ cd = iconv_open("UTF-8", "BIG-5");
+ iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft);
+ iconv_close(cd);
+ output.s[3] = '\0';
+ return output.wch;
+ }
+
+ return input;
+}
+
+static char zh_chewing_comments[] =
+ "Chewing : a smart phonetic input method module for XCIN.\n"
+ "By Lu-chuan Kung <lckung@iis.sinica.edu.tw>,\n"
+ "Kang-pen Chen <kpchen@iis.sinica.edu.tw>, and others.\n";
+
+static char *zh_chewing_valid_objname[] = { "chewing", NULL };
+
+module_t module_ptr = {
+ {
+ MTYPE_IM,
+ "zh_chewing", /* name */
+ MODULE_VERSION, /* version */
+ zh_chewing_comments
+ }, /* comments */
+ zh_chewing_valid_objname, /* valid_objname */
+ sizeof(ChewingConf), /* conf_size */
+ ChewingInit, /* init */
+ ChewingXimInit, /* xim_init */
+ ChewingXimEnd, /* xim_end */
+ ChewingKeystroke, /* keystroke */
+ ChewingShowKeystroke, /* show_keystroke */
+ NULL
+};
+

View File

@@ -0,0 +1,10 @@
$NetBSD: patch-ah,v 1.1 2006/01/28 03:03:11 rxg Exp $
--- src/Cinput/Makefile.in.orig 2006-01-21 20:37:01.000000000 +0800
+++ src/Cinput/Makefile.in
@@ -1,4 +1,4 @@
-SUBSYS = zh_hex gen_inp bimsphone
+SUBSYS = zh_hex gen_inp bimsphone chewing
OTHERS = im_comm
.PHONY: depend subdirs clean distclean install

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-ai,v 1.1 2006/04/28 18:12:29 joerg Exp $
--- cin/gb/Makefile.in.orig 2001-09-06 15:41:33.000000000 +0000
+++ cin/gb/Makefile.in
@@ -11,6 +11,9 @@ all: all-$(OS_TYPE)
all-LINUX:
( GB2312ENC=gb2312 GBKENC=gbk make -f Rules make-gb2312 make-gbk )
+all-DRAGONFLY:
+ ( GB2312ENC=euc make -f Rules make-gb2312 )
+
all-FREEBSD:
( GB2312ENC=euc make -f Rules make-gb2312 )
@@ -32,6 +35,9 @@ install: all install-$(OS_TYPE)
install-LINUX:
( GB2312ENC=gb2312 GBKENC=gbk make -f Rules install_gb2312 install_gbk )
+install-DRAGONFLY:
+ ( GB2312ENC=euc make -f Rules install_gb2312 )
+
install-FREEBSD:
( GB2312ENC=euc make -f Rules install_gb2312 )

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-aj,v 1.2 2013/04/30 22:23:07 joerg Exp $
for process jyutping.cin.
--- src/util/cin2tab/cin2tab.c.orig 2001-10-04 16:39:49.000000000 +0000
+++ src/util/cin2tab/cin2tab.c
@@ -74,12 +74,12 @@ static struct cin cinfunc[] = {
int
cmd_arg(char *cmd, int cmdlen, ...)
{
- char line[256], *s=line, *arg;
+ char line[512], *s=line, *arg;
int arglen, n_read=1;
va_list list;
va_start(list, cmdlen);
- if (! get_line(line, 256, cintab.fr, &(cintab.lineno), "#\n"))
+ if (! get_line(line, 512, cintab.fr, &(cintab.lineno), "#\n"))
return 0;
cmd[0] = '\0';
@@ -233,7 +233,7 @@ print_usage(void)
}
static void
-cin2tab_setlocale(locale_t *locale)
+cin2tab_setlocale(xcin_locale_t *locale)
{
char loc_return[128], enc_return[128];
int ret;

View File

@@ -0,0 +1,19 @@
$NetBSD: patch-src_include_xcintool.h,v 1.1 2013/04/30 22:23:07 joerg Exp $
--- src/include/xcintool.h.orig 2013-04-30 11:13:51.000000000 +0000
+++ src/include/xcintool.h
@@ -202,12 +202,12 @@ typedef struct {
char *lc_messages;
char *encoding;
int encid, locid;
-} locale_t;
+} xcin_locale_t;
typedef struct {
int argc; /* Command line arguement list */
char **argv;
- locale_t locale; /* Locale name. */
+ xcin_locale_t locale; /* Locale name. */
char *usrhome; /* User home directory. */
char *default_dir; /* Default module directory. */
char *user_dir; /* User data directory. */

View File

@@ -0,0 +1,31 @@
$NetBSD: patch-src_xcin__main.c,v 1.1 2013/04/30 22:23:07 joerg Exp $
--- src/xcin_main.c.orig 2013-04-30 11:14:44.000000000 +0000
+++ src/xcin_main.c
@@ -56,7 +56,7 @@ void xim_init(xccore_t *xccore);
static void
xcin_setlocale(void)
{
- locale_t *locale = &(xcin_core.xcin_rc.locale);
+ xcin_locale_t *locale = &(xcin_core.xcin_rc.locale);
char loc_return[128], enc_return[128];
set_perr("xcin");
@@ -324,7 +324,7 @@ read_core_config_locale(void)
char *cmd[2], value[256], *s, loc_buf[64], *loc_name=NULL;
char *fmt = N_("%s:\n\tlocale section \"%s\": %s: value not specified.\n");
xcin_rc_t *xrc = &(xcin_core.xcin_rc);
- locale_t *locale = &(xcin_core.xcin_rc.locale);
+ xcin_locale_t *locale = &(xcin_core.xcin_rc.locale);
/*
* Determine the true locale setting name.
*/
@@ -401,7 +401,7 @@ read_core_config_IM(void)
char *cmd[2], value[256], *s, *s1, objname[100], objenc[100];
char *fmt = N_("%s:\n\tIM section \"%s\": %s: value not specified.\n");
xcin_rc_t *xrc = &(xcin_core.xcin_rc);
- locale_t *locale = &(xcin_core.xcin_rc.locale);
+ xcin_locale_t *locale = &(xcin_core.xcin_rc.locale);
int setkey;
/*
* Go to each CINPUT sub-node and read important keywords.

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-src_xim.c,v 1.1 2013/04/30 22:23:07 joerg Exp $
--- src/xim.c.orig 2013-04-30 11:14:40.000000000 +0000
+++ src/xim.c
@@ -1029,7 +1029,7 @@ xim_init(xccore_t *core)
XIMTriggerKeys on_keys;
XIMEncodings encodings;
Window mainwin;
- locale_t *locale;
+ xcin_locale_t *locale;
int i;
transport_type = TRANSPORT_X;