Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 1999 13:02:42 GMT
From:      frankch@waru.life.nthu.edu.tw
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/10394: upgrade ports/chinese/rxvt
Message-ID:  <199903051302.NAA17689@sentinel.life.nthu.edu.tw>

next in thread | raw e-mail | index | archive | help

>Number:         10394
>Category:       ports
>Synopsis:       upgrade ports/chinese/rxvt
>Confidential:   yes
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar  4 21:10:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Frank CH Chan
>Release:        FreeBSD 3.1-STABLE i386
>Organization:
Department of Life Sciences, NTHU
>Environment:

	
	FreeBSD 3.1-STABLE ELF

>Description:

	
	The old distfile of rxvt is no longer available.
	I have upgrade the port to 2.6.PRE2 version. This version
	include a working xim patch, therefore I did not put
	my xcin support in, but in stead turn on the xim support
	in this release. Also, I remove the dependancy of xcin
	port and binary. If someone really want to input chinese
	chars in crxvt, they have to build a xim server themselves.

>How-To-Repeat:

	

>Fix:
	
	
	note, after apply this patch, patch-ac, patch-ad, patch-ae will
	become empty file. If you commit this PR, remember to remove these
	three files.

diff -ruN rxvt.org/Makefile rxvt/Makefile
--- rxvt.org/Makefile	Fri Mar  5 12:51:37 1999
+++ rxvt/Makefile	Fri Mar  5 12:51:23 1999
@@ -1,24 +1,22 @@
 # New ports collection Makefile for: rxvt
-# Version required:     2.4.11
+# Version required:     2.6.PRE2
 # Date created:         Nov 16 1997
 # Whom:                 frankch@waru.life.nthu.edu.tw
 #
 # $Id: Makefile,v 1.9 1999/01/17 07:34:26 vanilla Exp $
 #
 
-DISTNAME=	rxvt-2.4.11
-PKGNAME=	zh-rxvt-2.4.11
+DISTNAME=	rxvt-2.6.PRE2
+PKGNAME=	zh-rxvt-2.6.PRE2
 CATEGORIES=	chinese x11
 MASTER_SITES=	ftp://mason.primenet.com.au/pub/rxvt/ \
 		ftp://ftp.math.fu-berlin.de/pub/rxvt/
 
 MAINTAINER=	frankch@waru.life.nthu.edu.tw
 
-RUN_DEPENDS=	${X11BASE}/bin/xcin:${PORTSDIR}/chinese/xcin
-
 USE_X_PREFIX=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--enable-big5=yes --enable-xcin=yes
+CONFIGURE_ARGS=	--enable-big5=yes --enable-xim=yes
 MAN1=		crxvt.1
 
 .include <bsd.port.mk>
diff -ruN rxvt.org/files/md5 rxvt/files/md5
--- rxvt.org/files/md5	Fri Mar  5 12:51:37 1999
+++ rxvt/files/md5	Fri Mar  5 11:46:03 1999
@@ -1 +1 @@
-MD5 (rxvt-2.4.11.tar.gz) = 806d163e3113d22b31535785088f37c2
+MD5 (rxvt-2.6.PRE2.tar.gz) = 094caf133557b61b2204f78cf314c7e2
diff -ruN rxvt.org/patches/patch-aa rxvt/patches/patch-aa
--- rxvt.org/patches/patch-aa	Fri Mar  5 12:51:37 1999
+++ rxvt/patches/patch-aa	Fri Mar  5 11:57:08 1999
@@ -1,6 +1,6 @@
---- Makefile.in.orig	Wed Nov 18 15:21:15 1998
-+++ Makefile.in	Sun Jan 17 14:57:55 1999
-@@ -8,7 +8,7 @@
+--- Makefile.in.orig	Fri Mar  5 11:46:39 1999
++++ Makefile.in	Fri Mar  5 11:47:32 1999
+@@ -9,7 +9,7 @@
  first_rule: all
  dummy:
  
@@ -9,25 +9,23 @@
  
  DIST =	INSTALL README.configure configure Makefile Makefile.in
  
---- doc/Makefile.in.orig	Wed Nov 18 15:20:14 1998
-+++ doc/Makefile.in	Sun Jan 17 15:09:17 1999
-@@ -55,7 +55,7 @@
+--- doc/Makefile.in.orig	Fri Mar  5 11:47:46 1999
++++ doc/Makefile.in	Fri Mar  5 11:56:55 1999
+@@ -54,7 +54,7 @@
  
  tags allbin:
  
 -alldoc:	$(basedir)/$(VERNAME).lsm rxvt.1 rxvt.html rxvtRef.html rxvtRef.txt
 +alldoc:	
  
- $(basedir)/$(VERNAME).lsm: LSM.in $(srcdir)/../autoconf/Make.common.in $(srcdir)/../src/version.h
- 	$(SED) $(SEDREPLACE) < $(srcdir)/LSM.in > $@
-@@ -83,8 +83,8 @@
- 
+ yodl/versioninfo.yo: yodl/versioninfo.yo.in ../autoconf/Make.common.in
+ 	$(SED) $(SEDREPLACE) < $(srcdir)/yodl/versioninfo.yo.in > $@
+@@ -86,7 +86,7 @@
  distclean:
  
--install: rxvt.1
+ install: rxvt.1
 -	$(INSTALL_DATA) rxvt.1 $(DESTDIR)$(mandir)/$(manprefix)rxvt.$(manext)
-+install: 
-+	$(INSTALL_DATA) rxvt.1 $(DESTDIR)$(mandir)/$(manprefix)crxvt.$(manext)
++	$(INSTALL_DATA) rxvt.1 $(DESTDIR)$(mandir)/crxvt.$(manext)
  
  uninstall:
  	-cd $(mandir); $(RMF) $(manprefix)rxvt.$(manext)
diff -ruN rxvt.org/patches/patch-ab rxvt/patches/patch-ab
--- rxvt.org/patches/patch-ab	Fri Mar  5 12:51:37 1999
+++ rxvt/patches/patch-ab	Fri Mar  5 12:49:08 1999
@@ -1,69 +1,171 @@
---- configure.orig	Tue Dec  8 23:17:30 1998
-+++ configure	Tue Dec  8 23:18:24 1998
-@@ -32,6 +32,8 @@
- ac_help="$ac_help
-   --enable-big5           enable big5 support"
- ac_help="$ac_help
-+  --enable-xcin           enable Chinese input support"
-+ac_help="$ac_help
-   --enable-greek          enable greek keyboard support"
- ac_help="$ac_help
-   --enable-ttygid         enable tty setting to group \"tty\" - use only if
-@@ -722,6 +724,18 @@
-   if test x$enableval = xyes; then
-     cat >> confdefs.h <<\EOF
- #define ZH 1
-+EOF
-+
-+  fi
-+fi
-+
-+
-+# Check whether --enable-xcin or --disable-xcin was given.
-+if test "${enable_xcin+set}" = set; then
-+  enableval="$enable_xcin"
-+  if test x$enableval = xyes; then
-+    cat >> confdefs.h <<\EOF
-+#define XCIN 1
- EOF
- 
-   fi
---- autoconf/acconfig.h.orig	Tue Dec  8 21:26:28 1998
-+++ autoconf/acconfig.h	Tue Dec  8 21:27:20 1998
-@@ -34,6 +34,9 @@
- /* after compilation, rename executable as `crxvt' */
- #undef ZH
- 
-+/* Define if you want chinese input support */
-+#undef XCIN
-+
- /* Define if Xlocale support doesn't work */
- #undef NO_XLOCALE
- 
---- autoconf/config.h.in.orig	Tue Dec  8 21:27:34 1998
-+++ autoconf/config.h.in	Tue Dec  8 21:28:02 1998
-@@ -76,6 +76,9 @@
- /* after compilation, rename executable as `crxvt' */
- #undef ZH
- 
-+/* Define if you want chinese input support */
-+#undef XCIN
-+
- /* Define if Xlocale support doesn't work */
- #undef NO_XLOCALE
- 
---- autoconf/configure.in.orig	Tue Dec  8 21:28:18 1998
-+++ autoconf/configure.in	Tue Dec  8 21:29:12 1998
-@@ -82,6 +82,12 @@
-     AC_DEFINE(ZH)
-   fi])
- 
-+AC_ARG_ENABLE(xcin,
-+  [  --enable-xcin           enable Chinese input support],
-+  [if test x$enableval = xyes; then
-+    AC_DEFINE(XCIN)
-+  fi])
-+
- AC_ARG_ENABLE(greek,
-   [  --enable-greek          enable greek keyboard support],
-   [if test x$enableval = xyes; then
+--- src/main.c.orig	Fri Mar  5 12:26:41 1999
++++ src/main.c	Fri Mar  5 12:30:58 1999
+@@ -453,6 +453,16 @@
+ 			       GCForeground | GCBackground |
+ 			       GCFont | GCGraphicsExposures,
+ 			       &gcvalue);
++#ifdef FIX_ALIGNMENT
++	TermWin.ngc = TermWin.gc;
++#ifdef MULTICHAR_SET
++	gcvalue.font = TermWin.mfont->fid;
++	TermWin.mgc = XCreateGC(Xdisplay, TermWin.vt,
++			GCForeground | GCBackground |
++			GCFont | GCGraphicsExposures,
++			&gcvalue);
++#endif
++#endif
+     }
+ }
+ /* window resizing - assuming the parent window is the correct size */
+@@ -976,7 +986,11 @@
+ 
+ /* alter existing GC */
+     if (!init) {
++#ifdef FIX_ALIGNMENT
++	XSetFont(Xdisplay, TermWin.ngc, TermWin.font->fid);
++#else
+ 	XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
++#endif
+ 	menubar_expose();
+     }
+ /* set the sizes */
+--- src/rxvt.h.orig	Fri Mar  5 12:31:15 1999
++++ src/rxvt.h	Fri Mar  5 12:42:25 1999
+@@ -8,6 +8,8 @@
+ #include "../config.h"
+ #include "feature.h"
+ 
++#define FIX_ALIGNMENT
++
+ /*
+  *****************************************************************************
+  * SYSTEM HACKS
+@@ -170,11 +172,18 @@
+ 		    vt;		/* vt100 window                             */
+     GC              gc;		/* GC for drawing text                      */
+     XFontStruct    *font;	/* main font structure                      */
++#ifdef FIX_ALIGNMENT
++    GC              ngc;
++    int             vascent;
++#endif
+ #ifndef NO_BOLDFONT
+     XFontStruct    *boldFont;	/* bold font                                */
+ #endif
+ #ifdef MULTICHAR_SET
+     XFontStruct    *mfont;	/* Multichar font structure                 */
++#endif
++#ifdef FIX_ALIGNMENT
++    GC              mgc;
+ #endif
+     XFontSet       fontset;
+ #ifdef XPM_BACKGROUND
+--- src/screen.c.orig	Fri Mar  5 12:32:53 1999
++++ src/screen.c	Fri Mar  5 12:40:43 1999
+@@ -2134,7 +2134,12 @@
+  * always go back to the base font - it's much safer
+  */
+     wbyte = 0;
++#ifdef FIX_ALIGNMENT
++    TermWin.gc = TermWin.ngc;
++    TermWin.vascent = TermWin.font->ascent;
++#else
+     XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
++#endif
+     draw_string = XDrawString;
+     draw_image_string = XDrawImageString;
+     boldlast = 0;
+@@ -2318,7 +2323,11 @@
+ 
+ 	    len = 0;
+ 	    buffer[len++] = stp[col];
++#ifdef FIX_ALIGNMENT
++	    ypixel = TermWin.vascent + Row2Pixel(row);
++#else
+ 	    ypixel = TermWin.font->ascent + Row2Pixel(row);
++#endif
+ 	    xpixel = Col2Pixel(col);
+ 	    wlen = 1;
+ 
+@@ -2332,7 +2341,13 @@
+ 		    && ((srp[col + 1]) & RS_multiMask) == RS_multi2) {
+ 		    if (!wbyte) {
+ 			wbyte = 1;
++#ifdef FIX_ALIGNMENT
++			TermWin.gc = TermWin.mgc;
++			ypixel += TermWin.mfont->ascent - TermWin.vascent;
++			TermWin.vascent = TermWin.mfont->ascent;
++#else
+ 			XSetFont(Xdisplay, TermWin.gc, TermWin.mfont->fid);
++#endif
+ 			draw_string = XDrawString16;
+ 			draw_image_string = XDrawImageString16;
+ 		    }
+@@ -2370,7 +2385,13 @@
+ 		    }
+ 		    if (wbyte) {
+ 			wbyte = 0;
++#ifdef FIX_ALIGNMENT
++			TermWin.gc = TermWin.ngc;
++			ypixel += TermWin.font->ascent - TermWin.vascent;
++			TermWin.vascent = TermWin.font->ascent;
++#else
+ 			XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
++#endif
+ 			draw_string = XDrawString;
+ 			draw_image_string = XDrawImageString;
+ 		    }
+@@ -2466,7 +2487,11 @@
+ 		rend &= ~RS_Bold;	/* we've taken care of it */
+ 	    } else if (bfont) {
+ 		bfont = 0;
++#ifdef FIX_ALIGNMENT
++		XSetFont(Xdisplay, TermWin.ngc, TermWin.font->fid);
++#else
+ 		XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
++#endif
+ 	    }
+ #endif
+ /*
+@@ -2478,12 +2503,20 @@
+ 		    gcmask |= (GCForeground | GCBackground);
+ 		    XChangeGC(Xdisplay, TermWin.gc, gcmask, &gcvalue);
+ 		    XFillRectangle(Xdisplay, drawBuffer, TermWin.gc,
++#ifdef FIX_ALIGNMENT
++				   xpixel, ypixel - TermWin.vascent,
++#else
+ 				   xpixel, ypixel - TermWin.font->ascent,
++#endif
+ 				   Width2Pixel(1), Height2Pixel(1));
+ 		    SWAP_IT(gcvalue.foreground, gcvalue.background, ltmp);
+ 		    XChangeGC(Xdisplay, TermWin.gc, gcmask, &gcvalue);
+ 		} else
++#ifdef FIX_ALIGNMENT
++		    CLEAR_CHARS(xpixel, ypixel - TermWin.vascent, 1);
++#else
+ 		    CLEAR_CHARS(xpixel, ypixel - TermWin.font->ascent, 1);
++#endif
+ 		DRAW_STRING(draw_string, xpixel, ypixel, buffer, 1);
+ #ifndef NO_BOLDOVERSTRIKE
+ 		if (MONO_BOLD(rend))
+@@ -2498,7 +2531,11 @@
+ #endif
+ #ifdef XPM_BACKGROUND
+ 	    if (TermWin.pixmap != None && back == Color_bg) {
++#ifdef FIX_ALIGNMENT
++		CLEAR_CHARS(xpixel, ypixel - TermWin.vascent, len);
++#else
+ 		CLEAR_CHARS(xpixel, ypixel - TermWin.font->ascent, len);
++#endif
+ 		DRAW_STRING(draw_string, xpixel, ypixel, buffer, wlen);
+ 	    } else
+ #endif
+@@ -2612,6 +2649,9 @@
+     end_row = TermWin.saveLines - TermWin.view_start;
+     if (selection.op && current_screen == selection.screen) {
+ 	i = selection.beg.row + TermWin.saveLines;
++#ifdef FIX_ALIGNMENT
++	TermWin.gc = TermWin.ngc;
++#endif
+ 	row = selection.end.row + TermWin.saveLines;
+ 	if (i >= end_row)
+ 	    col = selection.beg.col;
diff -ruN rxvt.org/patches/patch-ac rxvt/patches/patch-ac
--- rxvt.org/patches/patch-ac	Fri Mar  5 12:51:37 1999
+++ rxvt/patches/patch-ac	Thu Jan  1 00:00:00 1970
@@ -1,15 +0,0 @@
---- src/feature.h.orig	Tue Dec  8 23:06:09 1998
-+++ src/feature.h	Tue Dec  8 23:07:16 1998
-@@ -349,9 +349,9 @@
- # ifdef ZH
- #  define NFONTS	5
- #  define FONT0_IDX	1
--#  define MFONT_LIST	"taipei16", "taipeik20", "taipeik24", "taipeik20", \
--			"taipei16"
--#  define NFONT_LIST	"8x16", "10x20", "12x24", "10x20", "8x16"
-+#  define MFONT_LIST	"kc15f", "kc15f", "kc24f", "kc24f", \
-+			"kc15f"
-+#  define NFONT_LIST	"8x16", "8x16", "12x24", "12x24", "8x16"
- # else				/* no Kanji or Big5 support */
- #  define NFONTS	5
- #  define FONT0_IDX	2
diff -ruN rxvt.org/patches/patch-ad rxvt/patches/patch-ad
--- rxvt.org/patches/patch-ad	Fri Mar  5 12:51:37 1999
+++ rxvt/patches/patch-ad	Thu Jan  1 00:00:00 1970
@@ -1,304 +0,0 @@
---- src/Makefile.in.orig	Tue Dec  8 21:19:37 1998
-+++ src/Makefile.in	Tue Dec  8 21:32:41 1998
-@@ -17,16 +17,16 @@
- first_rule: all
- dummy:
- 
--SRCS =	command.c graphics.c grkelot.c logging.c main.c menubar.c misc.c \
--	netdisp.c rmemset.c screen.c scrollbar.c xdefaults.c xpm.c
-+SRCS =	cli_xcin.c command.c graphics.c grkelot.c logging.c main.c menubar.c \
-+	misc.c netdisp.c rmemset.c screen.c scrollbar.c xdefaults.c xpm.c
- 
- HDRS =	command.h grkelot.h menubar.h protos.h rxvtgrx.h version.h \
- 	feature.h logging.h netdisp.h rxvt.h screen.h xpm.h
- 
- # it's ``be kind to gmake week''
- #OBJS =	$(SRCS:S,.c,.o,)
--OBJS =	command.o graphics.o grkelot.o logging.o main.o menubar.o misc.o \
--	netdisp.o rmemset.o screen.o scrollbar.o xdefaults.o xpm.o
-+OBJS =	cli_xcin.o command.o graphics.o grkelot.o logging.o main.o menubar.o \
-+	misc.o netdisp.o rmemset.o screen.o scrollbar.o xdefaults.o xpm.o
- 
- # it's ``be kind to gmake week''
- #EXTPROS = $(SRCS:S,.c,.extpro,)
-@@ -89,7 +89,7 @@
- 	(cd $(srcdir); $(RMF) Makefile)
- 
- install: allbin alldoc
--	$(INSTALL_PROGRAM) rxvt $(DESTDIR)$(bindir)/$(binprefix)rxvt
-+	$(INSTALL_PROGRAM) rxvt $(DESTDIR)$(bindir)/$(binprefix)crxvt
- 
- uninstall:
- 	(cd $(bindir); $(RMF) $(binprefix)rxvt)
---- src/cli_xcin.c.orig	Tue Dec  8 21:32:53 1998
-+++ src/cli_xcin.c	Tue Dec  8 21:17:35 1998
-@@ -0,0 +1,173 @@
-+/*
-+	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>
-+
-+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; */
-+
-+#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"
-+
-+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 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 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};
-+
-+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/command.c.orig	Tue Dec  8 21:39:34 1998
-+++ src/command.c	Tue Dec  8 23:05:48 1998
-@@ -291,7 +291,7 @@
-     ttydev = tty_name;
- 
- # define PTYCHAR1	"pqrstuvwxyz"
--# define PTYCHAR2	"0123456789abcdef"
-+# define PTYCHAR2	"0123456789abcdefghijklmnopqrstuv"
-     for (c1 = PTYCHAR1; *c1; c1++) {
- 	ptydev[len] = ttydev[len] = *c1;
- 	for (c2 = PTYCHAR2; *c2; c2++) {
-@@ -1081,6 +1081,10 @@
- #endif
-     int             ctrl, meta, shft, len;
-     KeySym          keysym;
-+#ifdef XCIN
-+    char chstr[256];
-+    int result;
-+#endif
-     static XComposeStatus compose = {NULL, 0};
-     static unsigned char kbuf[KBUFSZ];
- 
-@@ -1586,7 +1590,21 @@
- 	fprintf(stderr, "'\n");
-     }
- #endif				/* DEBUG_CMD */
-+#ifdef XCIN
-+    result = send_key(Xdisplay, TermWin.parent, ev, chstr);
-+    if (!result)
-+    {
-+        tt_write (kbuf, len);
-+    }
-+    else
-+    if (chstr[0])
-+    {
-+        tt_write (chstr, strlen(chstr));
-+    }
-+#else
-     tt_write(kbuf, len);
-+#endif /* XCIN */
-+
- }
- /*}}} */
- 
-@@ -1902,6 +1920,9 @@
- 	    if (Input_Context != NULL)
- 		XSetICFocus(Input_Context);
- #endif
-+#ifdef XCIN
-+            send_FocusIn(Xdisplay, TermWin.parent);
-+#endif
- 	}
- 	break;
- 
-@@ -1911,6 +1932,9 @@
- #ifndef NO_XLOCALE
- 	    if (Input_Context != NULL)
- 		XUnsetICFocus(Input_Context);
-+#endif
-+#ifdef XCIN
-+            send_FocusOut(Xdisplay, TermWin.parent);
- #endif
- 	}
- 	break;
---- src/rxvt.h.orig	Tue Dec  8 21:43:00 1998
-+++ src/rxvt.h	Tue Dec  8 21:51:05 1998
-@@ -237,11 +237,18 @@
- 
- /* sort out conflicts in feature.h */
- #ifdef KANJI
-+# undef XCIN			/* remove Chinese input support       */
- # undef ZH			/* remove Chinese big5 support        */
- # undef GREEK_SUPPORT		/* Kanji/Greek together is too weird  */
- # undef DEFINE_XTERM_COLOR	/* since kterm-color doesn't exist?   */
- #endif
- 
-+#ifdef XCIN
-+# ifndef ZH
-+#  define ZH
-+# endif
-+#endif
-+
- #ifdef ZH 
- # undef KANJI			/* can't put Chinese/Kanji together   */
- # undef GREEK_SUPPORT		
-@@ -253,8 +260,8 @@
- #endif
- 
- #define APL_CLASS	"XTerm"	/* class name */
--#define APL_SUBCLASS	"Rxvt"	/* also check resources under this name */
--#define APL_NAME	"rxvt"	/* normal name */
-+#define APL_SUBCLASS	"crxvt"	/* also check resources under this name */
-+#define APL_NAME	"crxvt"	/* normal name */
- 
- /* COLORTERM, TERM environment variables */
- #define COLORTERMENV	"rxvt"
diff -ruN rxvt.org/patches/patch-ae rxvt/patches/patch-ae
--- rxvt.org/patches/patch-ae	Fri Mar  5 12:51:37 1999
+++ rxvt/patches/patch-ae	Thu Jan  1 00:00:00 1970
@@ -1,162 +0,0 @@
---- src/main.c.orig	Wed Oct 14 19:26:23 1998
-+++ src/main.c	Wed Oct 14 19:57:13 1998
-@@ -497,6 +497,16 @@
- 			       GCForeground | GCBackground |
- 			       GCFont | GCGraphicsExposures,
- 			       &gcvalue);
-+#ifdef	FIX_ALIGNMENT
-+	TermWin.ngc = TermWin.gc;
-+#ifdef	MULTICHAR_SET
-+	gcvalue.font = TermWin.mfont->fid;
-+	TermWin.mgc = XCreateGC(Xdisplay, TermWin.vt,
-+			GCForeground | GCBackground |
-+			GCFont | GCGraphicsExposures,
-+			&gcvalue);
-+#endif
-+#endif
-     }
- }
- /*}}} */
-@@ -976,7 +986,11 @@
- 
- /* alter existing GC */
-     if (!init) {
-+#ifdef	FIX_ALIGNMENT
-+	XSetFont(Xdisplay, TermWin.ngc, TermWin.font->fid);
-+#else
- 	XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
-+#endif
- 	menubar_expose();
-     }
- /* set the sizes */
---- src/rxvt.h.orig	Wed Oct 14 19:35:44 1998
-+++ src/rxvt.h	Wed Oct 14 19:37:53 1998
-@@ -198,11 +198,18 @@
-     Window          parent, vt;	/* parent (main) and vt100 window           */
-     GC              gc;		/* GC for drawing text                      */
-     XFontStruct    *font;	/* main font structure                      */
-+#ifdef	FIX_ALIGNMENT
-+    GC              ngc;
-+    int             vascent;
-+#endif
- #ifndef NO_BOLDFONT
-     XFontStruct    *boldFont;	/* bold font                                */
- #endif
- #ifdef MULTICHAR_SET
-     XFontStruct    *mfont;	/* Multichar font structure                 */
-+#endif
-+#ifdef	FIX_ALIGNMENT
-+    GC              mgc;
- #endif
- #ifdef XPM_BACKGROUND
-     Pixmap          pixmap;
---- src/screen.c.orig	Wed Oct 14 19:37:57 1998
-+++ src/screen.c	Wed Oct 14 19:54:01 1998
-@@ -2046,7 +2046,12 @@
-  * always go back to the base font - it's much safer
-  */
-     wbyte = 0;
-+#ifdef	FIX_ALIGNMENT
-+    TermWin.gc = TermWin.ngc;
-+    TermWin.vascent = TermWin.font->ascent;
-+#else
-     XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
-+#endif
-     draw_string = XDrawString;
-     draw_image_string = XDrawImageString;
-     boldlast = 0;
-@@ -2224,7 +2229,11 @@
- 
- 	    len = 0;
- 	    buffer[len++] = stp[col];
-+#ifdef	FIX_ALIGNMENT
-+	    ypixel = TermWin.vascent + Row2Pixel(row);
-+#else
- 	    ypixel = TermWin.font->ascent + Row2Pixel(row);
-+#endif
- 	    xpixel = Col2Pixel(col);
- 	    wlen = 1;
- 
-@@ -2238,7 +2247,13 @@
- 		    && ((srp[col + 1]) & RS_multiMask) == RS_multi2) {
- 		    if (!wbyte) {
- 			wbyte = 1;
-+#ifdef	FIX_ALIGNMENT
-+			TermWin.gc = TermWin.mgc;
-+			ypixel += TermWin.mfont->ascent - TermWin.vascent;
-+			TermWin.vascent = TermWin.mfont->ascent;
-+#else
- 			XSetFont(Xdisplay, TermWin.gc, TermWin.mfont->fid);
-+#endif
- 			draw_string = XDrawString16;
- 			draw_image_string = XDrawImageString16;
- 		    }
-@@ -2276,7 +2291,13 @@
- 		    }
- 		    if (wbyte) {
- 			wbyte = 0;
-+#ifdef	FIX_ALIGNMENT
-+			TermWin.gc = TermWin.ngc;
-+			ypixel += TermWin.font->ascent - TermWin.vascent;
-+			TermWin.vascent = TermWin.font->ascent;
-+#else
- 			XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
-+#endif
- 			draw_string = XDrawString;
- 			draw_image_string = XDrawImageString;
- 		    }
-@@ -2364,7 +2385,11 @@
- 		rend &= ~RS_Bold;	/* we've taken care of it */
- 	    } else if (bfont) {
- 		bfont = 0;
-+#ifdef	FIX_ALIGNMENT
-+		XSetFont(Xdisplay, TermWin.ngc, TermWin.font->fid);
-+#else
- 		XSetFont(Xdisplay, TermWin.gc, TermWin.font->fid);
-+#endif
- 	    }
- #endif
- /*
-@@ -2376,12 +2401,20 @@
- 		    gcmask |= (GCForeground | GCBackground);
- 		    XChangeGC(Xdisplay, TermWin.gc, gcmask, &gcvalue);
- 		    XFillRectangle(Xdisplay, drawBuffer, TermWin.gc,
-+#ifdef	FIX_ALIGNMENT
-+				   xpixel, ypixel - TermWin.vascent,
-+#else
- 				   xpixel, ypixel - TermWin.font->ascent,
-+#endif
- 				   Width2Pixel(1), Height2Pixel(1));
- 		    SWAP_IT(gcvalue.foreground, gcvalue.background, ltmp);
- 		    XChangeGC(Xdisplay, TermWin.gc, gcmask, &gcvalue);
- 		} else
-+#ifdef	FIX_ALIGNMENT
-+		    CLEAR_CHARS(xpixel, ypixel - TermWin.vascent, 1);
-+#else
- 		    CLEAR_CHARS(xpixel, ypixel - TermWin.font->ascent, 1);
-+#endif
- 		DRAW_STRING(draw_string, xpixel, ypixel, buffer, 1);
- #ifndef NO_BOLDOVERSTRIKE
- 		if (MONO_BOLD(rend))
-@@ -2390,7 +2423,11 @@
- 	    } else
- #ifdef XPM_BACKGROUND
- 	    if (TermWin.pixmap != None && back == Color_bg) {
-+#ifdef	FIX_ALIGNMENT
-+		CLEAR_CHARS(xpixel, ypixel - TermWin.vascent, len);
-+#else
- 		CLEAR_CHARS(xpixel, ypixel - TermWin.font->ascent, len);
-+#endif
- 		DRAW_STRING(draw_string, xpixel, ypixel, buffer, wlen);
- 	    } else
- #endif
-@@ -2488,6 +2525,9 @@
-     end_row = TermWin.saveLines - TermWin.view_start;
-     if (selection.op && current_screen == selection.screen) {
- 	i = selection.beg.row + TermWin.saveLines;
-+#ifdef	FIX_ALIGNMENT
-+	TermWin.gc = TermWin.ngc;
-+#endif
- 	row = selection.end.row + TermWin.saveLines;
- 	if (i >= end_row)
- 	    col = selection.beg.col;

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903051302.NAA17689>