diff options
author | Seiichirou Hiraoka <flathill@FreeBSD.org> | 1999-05-10 16:20:23 +0000 |
---|---|---|
committer | Seiichirou Hiraoka <flathill@FreeBSD.org> | 1999-05-10 16:20:23 +0000 |
commit | b1ee07820b5c6948406b513cba490dbe7a1d83e4 (patch) | |
tree | da9c08a0631bb48763e6f4144adedf8303832ebd /chinese | |
parent | a35dd2ed8b5fa66a1b06852f60640cb4d07c7f54 (diff) | |
download | ports-b1ee07820b5c6948406b513cba490dbe7a1d83e4.tar.gz ports-b1ee07820b5c6948406b513cba490dbe7a1d83e4.zip |
Update to 0.3.5
PR: ports/11625
Submitted by: davidyu@ken.csie.ntu.edu.tw
Notes
Notes:
svn path=/head/; revision=18752
Diffstat (limited to 'chinese')
-rw-r--r-- | chinese/aterm/Makefile | 20 | ||||
-rw-r--r-- | chinese/aterm/distinfo | 3 | ||||
-rw-r--r-- | chinese/aterm/files/cli_xcin.c | 146 | ||||
-rw-r--r-- | chinese/aterm/files/patch-aa | 169 | ||||
-rw-r--r-- | chinese/aterm/files/patch-ab | 55 | ||||
-rw-r--r-- | chinese/aterm/files/protocol.h | 13 | ||||
-rw-r--r-- | chinese/aterm/files/state.h | 23 |
7 files changed, 246 insertions, 183 deletions
diff --git a/chinese/aterm/Makefile b/chinese/aterm/Makefile index 23d0bbcd9f2b..c8fcc846fffc 100644 --- a/chinese/aterm/Makefile +++ b/chinese/aterm/Makefile @@ -1,13 +1,13 @@ # New ports collection makefile for: zh-aterm -# Version required: 0.3.4 +# Version required: 0.3.5 # Date created: 26 April 1999 # Whom: Chia-Hsing Yu <davidyu@ken.csie.ntu.edu.tw> # -# $Id: Makefile,v 1.1.1.1 1999/05/01 13:47:14 steve Exp $ +# $Id: Makefile,v 1.2 1999/05/07 05:05:31 foxfair Exp $ # -DISTNAME= aterm-0.3.4 -PKGNAME= zh-aterm-0.3.4 +DISTNAME= aterm-0.3.5 +PKGNAME= zh-aterm-0.3.5 CATEGORIES= chinese MASTER_SITES= http://members.xoom.com/sashav/aterm/ \ http://www.tigr.net/afterstep/as-apps/download/aterm/ \ @@ -15,12 +15,20 @@ MASTER_SITES= http://members.xoom.com/sashav/aterm/ \ MAINTAINER= davidyu@ken.csie.ntu.edu.tw -LIB_DEPENDS= Xpm.4:${PORTSDIR}/graphics/xpm +LIB_DEPENDS= Xpm.4:${PORTSDIR}/graphics/xpm \ + jpeg.9:${PORTSDIR}/graphics/jpeg \ + png.3:${PORTSDIR}/graphics/png USE_X_PREFIX= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-transparency --enable-background-image \ - --disable-delete-key --disable-backspace-key --enable-big5 + --disable-delete-key --disable-backspace-key \ + --enable-fading --enable-utmp --enable-wtmp --enable-big5 MAN1= aterm.1 +post-patch: + ${CP} ${FILESDIR}/cli_xcin.c ${WRKSRC}/src/ + ${CP} ${FILESDIR}/state.h ${WRKSRC}/src/ + ${CP} ${FILESDIR}/protocol.h ${WRKSRC}/src/ + .include <bsd.port.mk> diff --git a/chinese/aterm/distinfo b/chinese/aterm/distinfo index b4f218d00f93..758f3deee815 100644 --- a/chinese/aterm/distinfo +++ b/chinese/aterm/distinfo @@ -1,2 +1 @@ -MD5 (aterm-0.3.4.tar.gz) = 555ca711affe9e06010701230d5a6759 -MD5 (aterm-0.3.4.tar.gz) = a481a97822bcc1a1dfe04b8867b7653e +MD5 (aterm-0.3.5.tar.gz) = b4d67110343d2d56c3ea21c8b44aca4a diff --git a/chinese/aterm/files/cli_xcin.c b/chinese/aterm/files/cli_xcin.c new file mode 100644 index 000000000000..91c14d2fa3d6 --- /dev/null +++ b/chinese/aterm/files/cli_xcin.c @@ -0,0 +1,146 @@ +/* + Copyright (C) 1994,1995 Edward Der-Hua Liu, Hsin-Chu, Taiwan +*/ + +#include <stdio.h> +#include <stdarg.h> +#include <sys/types.h> +#include <X11/Xlib.h> +#include <X11/Xatom.h> +#include "state.h" +#include "protocol.h" + +/*static void p_err(char *fmt,...) +{ + va_list args; + + va_start(args, fmt); + fprintf(stderr,"%s:", "cli_xcin:"); + vfprintf(stderr, fmt, args); + va_end(args); + fprintf(stderr,"\n"); + exit(-1); +} +*/ + + +static Atom xcin_atom=0; +static Window xcin_win=None; +static InmdState inmdstate; +#define ENDIAN_TEST() (*(int *)"\x11\x22\x33\x44"==0x11223344) +char my_endian; + +static int connect_xcin(Display *display) +{ +/*Window twin;*/ +xcin_atom=XInternAtom(display, XCIN_ATOM,False); +my_endian=ENDIAN_TEST(); /* if == 11223344, it is big-endian */ + +xcin_win=XGetSelectionOwner(display,xcin_atom); +return xcin_win; +} + +void send_FocusIn(Display *display, Window window) +{ + XClientMessageEvent event; + /*XEvent erreve;*/ + char *tmp=event.data.b; + + if (connect_xcin(display)==None) return; +/* Ensure xcin exists, or the process will be hanged */ + event.type=ClientMessage; + event.window=window; + event.message_type=xcin_atom; + event.format=8; + + tmp[0]=tmp[1]=tmp[2]=0xff; + tmp[3]=CLI_FOCUS_IN; + memcpy(&tmp[4],&inmdstate, sizeof(inmdstate)); + XSendEvent(display, xcin_win, False, 0, (XEvent *)&event); +} + +void send_FocusOut(Display *display, Window window) +{ + XClientMessageEvent event; +/* XEvent erreve; */ + char *tmp=event.data.b; + + if (connect_xcin(display)==None) return; +/* Ensure xcin exists, or the process will be hanged */ + event.type=ClientMessage; + event.window=window; + event.message_type=xcin_atom; + event.format=8; + + tmp[0]=tmp[1]=tmp[2]=0xff; + tmp[3]=CLI_FOCUS_OUT; + memcpy(&tmp[4],&inmdstate, sizeof(inmdstate)); + XSendEvent(display, xcin_win, False, 0, (XEvent *)&event); +} + +static void big_little(char *i) +{ +char t; +t=*i; *i=*(i+3); *(i+3)=t; +t=*(i+1); *(i+1)=*(i+2); *(i+2)=t; +} +static int read_keys(Display *display, char *buf) +{ + Atom actual_type; + int actual_format/*,i*/; + u_long nitems,bytes_after; + char *ttt, *cp; + XCIN_RES res; + int ofs; + + cp=(char *)&res; + ofs=0; + do { + if (XGetWindowProperty(display,xcin_win,xcin_atom, + ofs/4,(sizeof(XCIN_RES)+3)/4, + True, AnyPropertyType, &actual_type,&actual_format, + &nitems,&bytes_after,(unsigned char **)&ttt) != Success) + puts("err property"); + memcpy((char *)(&res)+(ofs & ~0x3), ttt, nitems); + XFree(ttt); + ofs=(ofs & ~0x3) + nitems; + } while ((!nitems && !ofs) || bytes_after>0); + if (my_endian) { + big_little((char *)&res.len); + big_little((char *)&res.status); + } + memcpy(buf,res.tkey, res.len); + inmdstate=res.inmdstate; + buf[res.len]=0; + + return res.status; +} + +#include <X11/Xutil.h> + +static XComposeStatus compose_status = {NULL, 0}; + +int send_key(Display *display, Window win, XKeyEvent *eve, char *buf) +{ +XClientMessageEvent event; +/*XEvent erreve;*/ +char *tmp=event.data.b; +u_char tttt[8]; +/*KeySym keysym;*/ +int count; + +if (xcin_win==None && connect_xcin(display)==None) + return K_REJECT; +if ((xcin_win=XGetSelectionOwner(display,xcin_atom))==None) + return K_REJECT; + +event.type=ClientMessage; +event.window=win; +event.message_type=xcin_atom; +event.format=32; +count = XLookupString (eve, tttt, sizeof(tmp), (KeySym *)tmp, &compose_status); +memcpy(&tmp[4],&eve->state,4); +XSendEvent(display, xcin_win, False, 0, (XEvent *)&event); +XSync(display,False); +return (read_keys(display, buf)); +} diff --git a/chinese/aterm/files/patch-aa b/chinese/aterm/files/patch-aa index 7d5f7b76c9cf..f1d01287b7f7 100644 --- a/chinese/aterm/files/patch-aa +++ b/chinese/aterm/files/patch-aa @@ -1,149 +1,20 @@ ---- src/cli_xcin.c.orig Mon Apr 26 01:49:02 1999 -+++ src/cli_xcin.c Mon Apr 26 01:49:02 1999 -@@ -0,0 +1,146 @@ -+/* -+ Copyright (C) 1994,1995 Edward Der-Hua Liu, Hsin-Chu, Taiwan -+*/ -+ -+#include <stdio.h> -+#include <stdarg.h> -+#include <sys/types.h> -+#include <X11/Xlib.h> -+#include <X11/Xatom.h> -+#include "state.h" -+#include "protocol.h" -+ -+/*static void p_err(char *fmt,...) -+{ -+ va_list args; -+ -+ va_start(args, fmt); -+ fprintf(stderr,"%s:", "cli_xcin:"); -+ vfprintf(stderr, fmt, args); -+ va_end(args); -+ fprintf(stderr,"\n"); -+ exit(-1); -+} -+*/ -+ -+ -+static Atom xcin_atom=0; -+static Window xcin_win=None; -+static InmdState inmdstate; -+#define ENDIAN_TEST() (*(int *)"\x11\x22\x33\x44"==0x11223344) -+char my_endian; -+ -+static int connect_xcin(Display *display) -+{ -+/*Window twin;*/ -+xcin_atom=XInternAtom(display, XCIN_ATOM,False); -+my_endian=ENDIAN_TEST(); /* if == 11223344, it is big-endian */ -+ -+xcin_win=XGetSelectionOwner(display,xcin_atom); -+return xcin_win; -+} -+ -+void send_FocusIn(Display *display, Window window) -+{ -+ XClientMessageEvent event; -+ /*XEvent erreve;*/ -+ char *tmp=event.data.b; -+ -+ if (connect_xcin(display)==None) return; -+/* Ensure xcin exists, or the process will be hanged */ -+ event.type=ClientMessage; -+ event.window=window; -+ event.message_type=xcin_atom; -+ event.format=8; -+ -+ tmp[0]=tmp[1]=tmp[2]=0xff; -+ tmp[3]=CLI_FOCUS_IN; -+ memcpy(&tmp[4],&inmdstate, sizeof(inmdstate)); -+ XSendEvent(display, xcin_win, False, 0, (XEvent *)&event); -+} -+ -+void send_FocusOut(Display *display, Window window) -+{ -+ XClientMessageEvent event; -+/* XEvent erreve; */ -+ char *tmp=event.data.b; -+ -+ if (connect_xcin(display)==None) return; -+/* Ensure xcin exists, or the process will be hanged */ -+ event.type=ClientMessage; -+ event.window=window; -+ event.message_type=xcin_atom; -+ event.format=8; -+ -+ tmp[0]=tmp[1]=tmp[2]=0xff; -+ tmp[3]=CLI_FOCUS_OUT; -+ memcpy(&tmp[4],&inmdstate, sizeof(inmdstate)); -+ XSendEvent(display, xcin_win, False, 0, (XEvent *)&event); -+} -+ -+static void big_little(char *i) -+{ -+char t; -+t=*i; *i=*(i+3); *(i+3)=t; -+t=*(i+1); *(i+1)=*(i+2); *(i+2)=t; -+} -+static int read_keys(Display *display, char *buf) -+{ -+ Atom actual_type; -+ int actual_format/*,i*/; -+ u_long nitems,bytes_after; -+ char *ttt, *cp; -+ XCIN_RES res; -+ int ofs; -+ -+ cp=(char *)&res; -+ ofs=0; -+ do { -+ if (XGetWindowProperty(display,xcin_win,xcin_atom, -+ ofs/4,(sizeof(XCIN_RES)+3)/4, -+ True, AnyPropertyType, &actual_type,&actual_format, -+ &nitems,&bytes_after,(unsigned char **)&ttt) != Success) -+ puts("err property"); -+ memcpy((char *)(&res)+(ofs & ~0x3), ttt, nitems); -+ XFree(ttt); -+ ofs=(ofs & ~0x3) + nitems; -+ } while ((!nitems && !ofs) || bytes_after>0); -+ if (my_endian) { -+ big_little((char *)&res.len); -+ big_little((char *)&res.status); -+ } -+ memcpy(buf,res.tkey, res.len); -+ inmdstate=res.inmdstate; -+ buf[res.len]=0; -+ -+ return res.status; -+} -+ -+#include <X11/Xutil.h> -+ -+static XComposeStatus compose_status = {NULL, 0}; -+ -+int send_key(Display *display, Window win, XKeyEvent *eve, char *buf) -+{ -+XClientMessageEvent event; -+/*XEvent erreve;*/ -+char *tmp=event.data.b; -+u_char tttt[8]; -+/*KeySym keysym;*/ -+int count; -+ -+if (xcin_win==None && connect_xcin(display)==None) -+ return K_REJECT; -+if ((xcin_win=XGetSelectionOwner(display,xcin_atom))==None) -+ return K_REJECT; -+ -+event.type=ClientMessage; -+event.window=win; -+event.message_type=xcin_atom; -+event.format=32; -+count = XLookupString (eve, tttt, sizeof(tmp), (KeySym *)tmp, &compose_status); -+memcpy(&tmp[4],&eve->state,4); -+XSendEvent(display, xcin_win, False, 0, (XEvent *)&event); -+XSync(display,False); -+return (read_keys(display, buf)); -+} +--- src/Makefile.in.orig Mon May 10 13:05:37 1999 ++++ src/Makefile.in Mon May 10 13:06:19 1999 +@@ -19,13 +19,14 @@ + + SRCS = command.c graphics.c grkelot.c main.c menubar.c misc.c \ + netdisp.c rmemset.c screen.c @SBARFILE@.c utmp.c xdefaults.c \ +- pixmap.c ximage_utils.c ++ pixmap.c ximage_utils.c cli_xcin.c + + OBJS = command.o graphics.o grkelot.o main.o menubar.o misc.o \ + netdisp.o rmemset.o screen.o @SBARFILE@.o utmp.o xdefaults.o \ +- pixmap.o ximage_utils.o ++ pixmap.o ximage_utils.o cli_xcin.o + +-HDRS = feature.h protos.h grkelot.h rxvt.h rxvtgrx.h screen.h version.h ++HDRS = feature.h protos.h grkelot.h rxvt.h rxvtgrx.h screen.h version.h \ ++ state.h protocol.h + + PROS = command.pro graphics.pro grkelot.pro main.pro menubar.pro misc.pro \ + netdisp.pro rmemset.pro screen.pro @SBARFILE@.pro utmp.pro xdefaults.pro \ diff --git a/chinese/aterm/files/patch-ab b/chinese/aterm/files/patch-ab index 8fdc683b33db..f7dd7009ecb1 100644 --- a/chinese/aterm/files/patch-ab +++ b/chinese/aterm/files/patch-ab @@ -1,26 +1,29 @@ ---- src/state.h.orig Mon Apr 26 01:49:05 1999 -+++ src/state.h Mon Apr 26 01:49:05 1999 -@@ -0,0 +1,23 @@ -+/* -+ Copyright (C) 1994 Edward Der-Hua Liu, Hsin-Chu, Taiwan -+*/ -+ -+typedef struct { -+ char kb_state; -+ char _CurInMethod; -+} InmdState; -+ -+#define EngChiMask (1) -+#define HalfFullMask (2) -+ -+typedef struct { -+ int len; -+ int status; -+ InmdState inmdstate; -+ char tkey[512]; -+} XCIN_RES; -+ -+#define EngChi ((inmdstate.kb_state & EngChiMask) ? 1:0) -+#define HalfFull ((inmdstate.kb_state & HalfFullMask) ? 1:0) -+#define CurInMethod (inmdstate._CurInMethod) -+/* extern InmdState inmdstate; */ +--- src/command.c.orig Mon May 10 13:06:58 1999 ++++ src/command.c Mon May 10 13:09:27 1999 +@@ -2069,11 +2069,17 @@ + static int bypass_keystate = 0; + int reportmode; + static int csrO = 0; /* Hops - csr offset in thumb/slider */ ++ int k_status; ++ char kbuf[256]; + + /* to give proper Scroll behaviour */ + switch (ev->type) { + case KeyPress: +- lookup_key(ev); ++ k_status = send_key(Xdisplay, TermWin.parent, &ev->xkey, kbuf); ++ if(!k_status) ++ lookup_key(ev); ++ else if(kbuf[0]) ++ tt_write(kbuf, strlen(kbuf)); + break; + + case ClientMessage: +@@ -2138,6 +2144,7 @@ + + case FocusIn: + if (!TermWin.focus) { ++ send_FocusIn(Xdisplay, TermWin.parent); + TermWin.focus = 1; + #ifdef OFF_FOCUS_FADING + if( rs_fade != NULL ) diff --git a/chinese/aterm/files/protocol.h b/chinese/aterm/files/protocol.h new file mode 100644 index 000000000000..bc19abfb5d12 --- /dev/null +++ b/chinese/aterm/files/protocol.h @@ -0,0 +1,13 @@ +/* + Copyright (C) 1994 Edward Der-Hua Liu, Hsin-Chu, Taiwan +*/ + +#define K_REJECT (0) +#define K_ACCEPT (1) + +#define CLI_FOCUS_IN (1) +#define CLI_FOCUS_OUT (3) + +#define LOAD_KEYWORD (2) + +#define XCIN_ATOM "XCIN_A" diff --git a/chinese/aterm/files/state.h b/chinese/aterm/files/state.h new file mode 100644 index 000000000000..e663df9fb986 --- /dev/null +++ b/chinese/aterm/files/state.h @@ -0,0 +1,23 @@ +/* + Copyright (C) 1994 Edward Der-Hua Liu, Hsin-Chu, Taiwan +*/ + +typedef struct { + char kb_state; + char _CurInMethod; +} InmdState; + +#define EngChiMask (1) +#define HalfFullMask (2) + +typedef struct { + int len; + int status; + InmdState inmdstate; + char tkey[512]; +} XCIN_RES; + +#define EngChi ((inmdstate.kb_state & EngChiMask) ? 1:0) +#define HalfFull ((inmdstate.kb_state & HalfFullMask) ? 1:0) +#define CurInMethod (inmdstate._CurInMethod) +/* extern InmdState inmdstate; */ |