summaryrefslogtreecommitdiffstats
path: root/chinese/aterm
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1999-05-01 13:47:15 +0000
committersteve <steve@FreeBSD.org>1999-05-01 13:47:15 +0000
commitab11bba2381286e3e58732b4eb309ecbc96e8c7d (patch)
tree81ff9d4401eeea8f94bc3adb13e22db78a275492 /chinese/aterm
parentbf66188ea8cc884c43be69a337f79f2327741831 (diff)
downloadFreeBSD-ports-ab11bba2381286e3e58732b4eb309ecbc96e8c7d.zip
FreeBSD-ports-ab11bba2381286e3e58732b4eb309ecbc96e8c7d.tar.gz
Import of Chinese version of aterm 0.3.4.
Submitted by: David Yu <davidyu@ken.csie.ntu.edu.tw> Requested by: foxfair
Diffstat (limited to 'chinese/aterm')
-rw-r--r--chinese/aterm/Makefile25
-rw-r--r--chinese/aterm/distinfo1
-rw-r--r--chinese/aterm/files/patch-aa149
-rw-r--r--chinese/aterm/files/patch-ab26
-rw-r--r--chinese/aterm/pkg-comment1
-rw-r--r--chinese/aterm/pkg-descr12
-rw-r--r--chinese/aterm/pkg-plist1
7 files changed, 215 insertions, 0 deletions
diff --git a/chinese/aterm/Makefile b/chinese/aterm/Makefile
new file mode 100644
index 0000000..1cb7003
--- /dev/null
+++ b/chinese/aterm/Makefile
@@ -0,0 +1,25 @@
+# New ports collection makefile for: zh-aterm
+# Version required: 0.3.4
+# Date created: 26 April 1999
+# Whom: Chia-Hsing Yu <davidyu@ken.csie.ntu.edu.tw>
+#
+# $Id$
+#
+
+DISTNAME= aterm-0.3.4
+PKGNAME= zh-aterm-0.3.4
+CATEGORIES= chinese
+MASTER_SITES= http://members.xoom.com/sashav/aterm/ \
+ http://www.tigr.net/afterstep/as-apps/download/aterm/
+
+MAINTAINER= davidyu@ken.csie.ntu.edu.tw
+
+LIB_DEPENDS= Xpm.4:${PORTSDIR}/graphics/xpm
+
+USE_X_PREFIX= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --enable-transparency --enable-background-image \
+ --disable-delete-key --disable-backspace-key --enable-big5
+MAN1= aterm.1
+
+.include <bsd.port.mk>
diff --git a/chinese/aterm/distinfo b/chinese/aterm/distinfo
new file mode 100644
index 0000000..23bd4e8
--- /dev/null
+++ b/chinese/aterm/distinfo
@@ -0,0 +1 @@
+MD5 (aterm-0.3.4.tar.gz) = 555ca711affe9e06010701230d5a6759
diff --git a/chinese/aterm/files/patch-aa b/chinese/aterm/files/patch-aa
new file mode 100644
index 0000000..7d5f7b7
--- /dev/null
+++ b/chinese/aterm/files/patch-aa
@@ -0,0 +1,149 @@
+--- 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));
++}
diff --git a/chinese/aterm/files/patch-ab b/chinese/aterm/files/patch-ab
new file mode 100644
index 0000000..8fdc683
--- /dev/null
+++ b/chinese/aterm/files/patch-ab
@@ -0,0 +1,26 @@
+--- 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; */
diff --git a/chinese/aterm/pkg-comment b/chinese/aterm/pkg-comment
new file mode 100644
index 0000000..5e9d30d
--- /dev/null
+++ b/chinese/aterm/pkg-comment
@@ -0,0 +1 @@
+A color vt102 terminal emulator with transparency support.
diff --git a/chinese/aterm/pkg-descr b/chinese/aterm/pkg-descr
new file mode 100644
index 0000000..c49a590
--- /dev/null
+++ b/chinese/aterm/pkg-descr
@@ -0,0 +1,12 @@
+aterm is a color vt102 terminal emulator, based on rxvt 2.4.8 with
+additions for fast transparency.
+
+It was created with AfterStep users in mind, but is not tied to any
+libraries, and can be used anywhere.
+
+- Jim <jim@phrantic.phear.net>
+
+
+This port supports XCIN.
+
+- David Yu <davidyu@ken.csie.ntu.edu.tw>
diff --git a/chinese/aterm/pkg-plist b/chinese/aterm/pkg-plist
new file mode 100644
index 0000000..6a4f142
--- /dev/null
+++ b/chinese/aterm/pkg-plist
@@ -0,0 +1 @@
+bin/aterm
OpenPOWER on IntegriCloud