From owner-freebsd-ports Mon Aug 18 07:10:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id HAA23781 for ports-outgoing; Mon, 18 Aug 1997 07:10:04 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id HAA23775; Mon, 18 Aug 1997 07:10:01 -0700 (PDT) Resent-Date: Mon, 18 Aug 1997 07:10:01 -0700 (PDT) Resent-Message-Id: <199708181410.HAA23775@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-ports Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, vanilla@MinJe.com.TW Received: from MinJe.com.TW (qmailr@ns.MinJe.com.TW [210.66.86.1]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id GAA23178 for ; Mon, 18 Aug 1997 06:57:57 -0700 (PDT) Received: (qmail 1666 invoked by uid 900); 18 Aug 1997 13:52:48 -0000 Message-Id: <19970818135248.1665.qmail@MinJe.com.TW> Date: 18 Aug 1997 13:52:48 -0000 From: vanilla@MinJe.com.TW Reply-To: vanilla@MinJe.com.TW To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/4330: new port for crxvt Sender: owner-freebsd-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4330 >Category: ports >Synopsis: new ports for rxvt with big5 support >Confidential: yes >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Aug 18 07:10:00 PDT 1997 >Last-Modified: >Originator: Vanill I. Shu >Organization: Cray running FreeBSD >Release: FreeBSD 3.0-CURRENT i386 >Environment: >Description: This is rxvt with big5 patch thanks frankch@waru.life.nthu.edu.tw for his patch How-To-Repeat: >How-To-Repeat: >Fix: diff -bcrNp crxvt.orig/Makefile crxvt/Makefile *** crxvt.orig/Makefile Thu Jan 1 08:00:00 1970 --- crxvt/Makefile Mon Aug 18 21:46:15 1997 *************** *** 0 **** --- 1,23 ---- + # New ports collection Makefile for: rxvt + # Version required: 2.20 + # Date created: 15 Aug 1997 + # Whom: Vanilla I. Shu + # + # $Id$ + # + + DISTNAME= rxvt-2.20 + PKGNAME= cn-rxvt-2.20 + CATEGORIES= chinese x11 + MASTER_SITES= ${MASTER_SITE_SUNSITE} \ + ftp://ftp.nuclecu.unam.mx/linux/local/rxvt/ \ + ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin.X11/ + MASTER_SITE_SUBDIR= utils/file/managers/mc/rxvt + + MAINTAINER= vanilla@MinJe.com.TW + + USE_X11= yes + GNU_CONFIGURE= yes + MAN1= crxvt.1 + + .include diff -bcrNp crxvt.orig/files/md5 crxvt/files/md5 *** crxvt.orig/files/md5 Thu Jan 1 08:00:00 1970 --- crxvt/files/md5 Fri Mar 7 20:30:03 1997 *************** *** 0 **** --- 1 ---- + MD5 (rxvt-2.20.tar.gz) = 860432f0d146d0cdf4630967f6c94ae3 diff -bcrNp crxvt.orig/patches/patch-aa crxvt/patches/patch-aa *** crxvt.orig/patches/patch-aa Thu Jan 1 08:00:00 1970 --- crxvt/patches/patch-aa Fri Mar 7 20:30:09 1997 *************** *** 0 **** --- 1,11 ---- + --- Makefile.in.orig Fri Sep 27 10:48:20 1996 + +++ Makefile.in Mon Feb 24 01:09:28 1997 + @@ -7,7 +7,7 @@ + first_rule: all + dummy: + + -subdirs = src doc rclock src/graphics + +subdirs = src doc #rclock src/graphics + + DIST_ETC = etc/XTerm.ad etc/color etc/termcap etc/terminfo etc/xmkdir + diff -bcrNp crxvt.orig/patches/patch-ab crxvt/patches/patch-ab *** crxvt.orig/patches/patch-ab Thu Jan 1 08:00:00 1970 --- crxvt/patches/patch-ab Fri Apr 25 19:10:52 1997 *************** *** 0 **** --- 1,19 ---- + --- ./src/utmp.c.org Thu Jan 23 10:46:02 1997 + +++ ./src/utmp.c Thu Apr 24 15:20:49 1997 + @@ -80,6 +80,8 @@ + #include + #include + + +#include + + + #ifdef HAVE_UTMPX_H + # include + # define USE_SYSV_UTMP + @@ -90,7 +92,6 @@ + # endif + #endif + + -#include + #include + + #ifdef TIME_WITH_SYS_TIME diff -bcrNp crxvt.orig/patches/patch-ac crxvt/patches/patch-ac *** crxvt.orig/patches/patch-ac Thu Jan 1 08:00:00 1970 --- crxvt/patches/patch-ac Fri Aug 15 18:04:23 1997 *************** *** 0 **** --- 1,909 ---- + *** src/cli_xcin.c.orig Fri Aug 15 17:35:07 1997 + --- src/cli_xcin.c Fri Aug 15 17:35:07 1997 + *************** + *** 0 **** + --- 1,145 ---- + + /* + + Copyright (C) 1994,1995 Edward Der-Hua Liu, Hsin-Chu, Taiwan + + */ + + + + #include + + #include + + #include + + #include + + #include + + #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 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 + + + + 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/defaults.h.orig Fri Aug 15 17:51:10 1997 + --- src/defaults.h Fri Aug 15 17:54:10 1997 + *************** + *** 37,47 **** + --- 37,61 ---- + # define FONT3 "12x24" + # define FONT4 "13x26" + #else /* KANJI */ + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + # define CFONT0 "taipei16" + + # define CFONT1 "taipei16" + + # define CFONT2 "taipeik20" + + # define CFONT3 "taipeik20" + + # define CFONT4 "taipeik24" + + /* sizes matched to big5 fonts */ + + # define FONT0 "8x16" + + # define FONT1 "8x16" + + # define FONT2 "10x20" + + # define FONT3 "10x20" + + # define FONT4 "12x24" + + #else /* BIG5 */ + # define FONT0 "7x14" + # define FONT1 "6x10" + # define FONT2 "6x13" + # define FONT3 "8x13" + # define FONT4 "9x15" + + #endif /* BIG5 */ + #endif /* KANJI */ + + /* the logical position of font0 in the list */ + *** src/main.c.orig Fri Jan 24 02:46:02 1997 + --- src/main.c Fri Aug 15 17:35:07 1997 + *************** const char * rs_font [NFONTS]; + *** 68,73 **** + --- 68,76 ---- + #ifdef KANJI + const char * rs_kfont [NFONTS]; + #endif + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + const char * rs_cfont [NFONTS]; + + #endif + + #ifdef PRINTPIPE + const char * rs_print_pipe = NULL; + *************** static const char * def_kfontName [] = { + *** 128,133 **** + --- 131,142 ---- + KFONT0, KFONT1, KFONT2, KFONT3, KFONT4 + }; + #endif /* KANJI */ + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + /* Big5 font names, roman fonts sized to match */ + + static const char * def_cfontName [] = { + + CFONT0, CFONT1, CFONT2, CFONT3, CFONT4 + + }; + + #endif /* BIG5 */ + static const char * def_fontName [] = { + FONT0, FONT1, FONT2, FONT3, FONT4 + }; + *************** change_font (int init, const char * font + *** 1474,1479 **** + --- 1483,1508 ---- + TermWin.kanji = xfont; + #endif /* KANJI */ + + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + if (TermWin.big5) + + XFreeFont (Xdisplay, TermWin.big5); + + + + /* load font or substitute */ + + xfont = XLoadQueryFont (Xdisplay, rs_cfont [idx]); + + if (!xfont) + + { + + print_error (msg, rs_cfont [idx]); + + rs_cfont [idx] = "taipei16"; + + xfont = XLoadQueryFont (Xdisplay, rs_cfont [idx]); + + if (!xfont) + + { + + print_error (msg, rs_cfont [idx]); + + goto Abort; + + } + + } + + TermWin.big5 = xfont; + + #endif /* BIG5 */ + + + /* alter existing GC */ + if (!init) + { + *************** main (int argc, char * argv []) + *** 1606,1611 **** + --- 1635,1643 ---- + if (!rs_font [i]) rs_font [i] = def_fontName [i]; + #ifdef KANJI + if (!rs_kfont [i]) rs_kfont [i] = def_kfontName [i]; + + #endif + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + if (!rs_cfont [i]) rs_cfont [i] = def_cfontName [i]; + #endif + } + + *** src/main.h.orig Fri Jan 24 02:46:02 1997 + --- src/main.h Fri Aug 15 17:35:07 1997 + *************** typedef struct { + *** 68,73 **** + --- 68,76 ---- + #ifdef KANJI + XFontStruct * kanji; /* Kanji font structure */ + #endif + + #ifdef BIG5 /* added by frankch */ + + XFontStruct * big5; /* Big5 font structure */ + + #endif + #ifdef XPM_BACKGROUND + Pixmap pixmap; + # ifdef XPM_BUFFERING + *************** extern const char * rs_name; /* client i + *** 150,157 **** + #define restoreFG 39 /* restore default fg color */ + #define restoreBG 49 /* restore default bg color */ + + ! #define fgColor 0 + ! #define bgColor 1 + /* 0-7: black, red, green, yellow, blue, magenta, cyan, white */ + #define minColor 2 + #define maxColor (minColor+7) + --- 153,160 ---- + #define restoreFG 39 /* restore default fg color */ + #define restoreBG 49 /* restore default bg color */ + + ! #define fgColor 1 + ! #define bgColor 0 + /* 0-7: black, red, green, yellow, blue, magenta, cyan, white */ + #define minColor 2 + #define maxColor (minColor+7) + *************** extern Pixel PixColors [NRS_COLORS + NSH + *** 202,207 **** + --- 205,213 ---- + extern const char * rs_font [NFONTS]; + #ifdef KANJI + extern const char * rs_kfont [NFONTS]; + + #endif + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + extern const char * rs_cfont [NFONTS]; + #endif + #ifndef NO_BOLDFONT + extern const char * rs_boldFont; + *** src/protocol.h.orig Fri Aug 15 17:35:07 1997 + --- src/protocol.h Fri Aug 15 17:35:07 1997 + *************** + *** 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" + *** src/screen.c.orig Fri Jan 24 02:46:02 1997 + --- src/screen.c Fri Aug 15 17:35:07 1997 + *************** static text_t * linebuf = NULL; + *** 169,174 **** + --- 169,177 ---- + #ifdef KANJI + static short multiByte = 0; + #endif + + #ifdef BIG5 + + static short multiByte = 0; + + #endif + + /* Data for save-screen */ + static struct { + *************** scr_add_lines (const unsigned char * str + *** 813,818 **** + --- 816,824 ---- + #ifdef KANJI + enum {SBYTE, WBYTE1, WBYTE2} chstat = SBYTE; + #endif + + #ifdef BIG5 + + enum {SBYTE, WBYTE1, WBYTE2} chstat = SBYTE; + + #endif + + TermWin.view_start = 0; + + *************** scr_add_lines (const unsigned char * str + *** 851,856 **** + --- 857,865 ---- + #ifdef KANJI + switch (chstat) + #endif + + #ifdef BIG5 + + switch (chstat) + + #endif + { + #ifdef KANJI + case WBYTE1: break; /* never happens? */ + *************** scr_add_lines (const unsigned char * str + *** 869,874 **** + --- 878,900 ---- + } + else + #endif /* KANJI */ + + #ifdef BIG5 /* need more modifications to get things right */ + + case WBYTE1: break; /* never happens? */ + + + + case WBYTE2: + + rstyle |= RS_big5Mask; + + chstat = SBYTE; + + break; + + + + case SBYTE: + + if (multiByte || (str [i] & 0x80)) + + { /* BIG5 second byte range 40-7e, a1-fe */ + + rstyle &= ~RS_big5Mask; + + rstyle |= RS_big5_1; + + chstat = WBYTE2; + + } + + else + + #endif /* BIG5 */ /* not yet done */ + switch (str [i]) { + case 127: continue; break; + case '\t': scr_tab (1); continue; break; + *************** scr_add_lines (const unsigned char * str + *** 895,900 **** + --- 921,929 ---- + #ifdef KANJI + rstyle &= ~(RS_kanjiMask); + #endif + + #ifdef BIG5 + + rstyle &= ~(RS_big5Mask); + + #endif + break; + } + } + *************** selection_make (Time tm) + *** 1655,1660 **** + --- 1684,1693 ---- + if ((screen.rend [roffset+c1] & RS_kanjiMask) == RS_kanjiMask) c1--; + if ((screen.rend [roffset+c2] & RS_kanjiMask) == RS_kanji1) c2++; + #endif /* KANJI */ + + #ifdef BIG5 + + if ((screen.rend [roffset+c1] & RS_big5Mask) == RS_big5Mask) c1--; + + if ((screen.rend [roffset+c2] & RS_big5Mask) == RS_big5_1) c2++; + + #endif /* BIG5 */ + for (c = c1; c <= c2; c++) + *str++ = screen.text [roffset + c]; + + *************** selection_setclr (int set, int startr, i + *** 1875,1880 **** + --- 1908,1917 ---- + if ((screen.rend [roffset+c1] & RS_kanjiMask) == RS_kanjiMask) c1--; + if ((screen.rend [roffset+c2] & RS_kanjiMask) == RS_kanji1) c2++; + #endif /* KANJI */ + + #ifdef BIG5 + + if ((screen.rend [roffset+c1] & RS_big5Mask) == RS_big5Mask) c1--; + + if ((screen.rend [roffset+c2] & RS_big5Mask) == RS_big5_1) c2++; + + #endif /* BIG5 */ + for (/*nil*/; c1 <= c2; c1++) + { + if (set) + *************** scr_charset_set (int set, unsigned int c + *** 2204,2209 **** + --- 2241,2250 ---- + multiByte = (set < 0); + set = abs (set); + #endif + + #ifdef BIG5 + + multiByte = (set < 0); + + set = abs (set); + + #endif + charsets [set] = (unsigned char) ch; + set_font_style (); + } + *************** scr_refresh (int type) + *** 2282,2287 **** + --- 2323,2331 ---- + #ifdef KANJI + static int wbyte = 0; + #endif + + #ifdef BIG5 + + static int wbyte = 0; + + #endif + + if (type == NO_REFRESH) /* Window not visible, don't update */ + return; + *************** scr_refresh (int type) + *** 2311,2316 **** + --- 2355,2364 ---- + if ((screen.rend [xcursor] & RS_kanjiMask) == RS_kanji1) + screen.rend [xcursor+1] |= RS_Cursor; + #endif + + #ifdef BIG5 + + if ((screen.rend [xcursor] & RS_big5Mask) == RS_big5_1) + + screen.rend [xcursor+1] |= RS_Cursor; + + #endif + } + } + last_xcursor += screen.col; + *************** scr_refresh (int type) + *** 2429,2434 **** + --- 2477,2483 ---- + int ypixel = TermWin.font->ascent + Row2Pixel (r); + + #ifndef KANJI + + #ifndef BIG5 + /* fast way to avoid the next loop (most of the time) ? */ + if (!memcmp (&drawn_text [doffset], + &screen.text [roffset], + *************** scr_refresh (int type) + *** 2437,2443 **** + &screen.rend [roffset], + (TermWin.ncol) * sizeof(rend_t))) + continue; + ! #endif + + for (c = 0; c < TermWin.ncol; c++) + { + --- 2486,2493 ---- + &screen.rend [roffset], + (TermWin.ncol) * sizeof(rend_t))) + continue; + ! #endif /* BIG5 */ + ! #endif /* KANJI */ + + for (c = 0; c < TermWin.ncol; c++) + { + *************** scr_refresh (int type) + *** 2451,2456 **** + --- 2501,2510 ---- + || (((screen.rend [x] & RS_kanjiMask) == RS_kanji1) && + (drawn_text [x1+1] != screen.text [x+1])) + #endif /* KANJI */ + + #ifdef BIG5 + + || (((screen.rend [x] & RS_big5Mask) == RS_big5_1) && + + (drawn_text [x1+1] != screen.text [x+1])) + + #endif /* BIG5 */ + ) + { + int fore, back, rend; + *************** scr_refresh (int type) + *** 2471,2483 **** + --- 2525,2545 ---- + ((rend & ~RS_kanji0) == + (screen.rend [x] & ~RS_kanji0)) && + #else /* KANJI */ + + #ifdef BIG5 + + ((rend & ~RS_big5_0) == + + (screen.rend [x] & ~RS_big5_0)) && + + #else /* BIG5 */ + (rend == screen.rend [x]) && + + #endif /* BIG5 */ + #endif /* KANJI */ + (drawn_text [doffset+c] != screen.text [x] || + drawn_rend [doffset+c] != screen.rend [x] || + #ifdef KANJI + (x > 0 && (screen.rend [x-1] & ~RS_kanji1)) || + #endif /* KANJI */ + + #ifdef BIG5 + + (x > 0 && (screen.rend [x-1] & ~RS_big5_1)) || + + #endif /* BIG5 */ + (c+1 < TermWin.ncol && + drawn_text [doffset+c+1] != screen.text [x+1]))); + count++, x++, c++) + *************** scr_refresh (int type) + *** 2509,2514 **** + --- 2571,2598 ---- + } + } + #endif /* KANJI */ + + #ifdef BIG5 + + /* ensure the correct font is used */ + + if (rend & RS_big5_1) + + { + + if (!wbyte) + + { + + wbyte = 1; + + XSetFont (Xdisplay, TermWin.gc, TermWin.big5->fid); + + } + + /* if (linebuf [0] & 0x80) + + big5_decode (linebuf, count); */ + + /* this needs more treak, not yet done */ + + } + + else + + { + + if (wbyte) + + { + + wbyte = 0; + + XSetFont (Xdisplay, TermWin.gc, TermWin.font->fid); + + } + + } + + #endif /* BIG5 */ + + fore = GET_FGCOLOR (rend); + back = GET_BGCOLOR (rend); + *************** strFunc (Xdisplay, drawBuffer, TermWin.g + *** 2662,2674 **** + /*----------------------------------------------------------------------*/ + + # ifdef KANJI + if (wbyte) + { + count /= 2; + # ifdef XPM_BACKGROUND + if (back == bgColor) + { + - drawStringPrep (); + drawString (XDrawString16); + } + else + --- 2746,2760 ---- + /*----------------------------------------------------------------------*/ + + # ifdef KANJI + + # ifdef XPM_BACKGROUND /* modify this to avoid messy */ + + drawStringPrep (); /* KANJI display */ + + # endif /* XPM_BACKGROUND */ + if (wbyte) + { + count /= 2; + # ifdef XPM_BACKGROUND + if (back == bgColor) + { + drawString (XDrawString16); + } + else + *************** strFunc (Xdisplay, drawBuffer, TermWin.g + *** 2685,2690 **** + --- 2771,2802 ---- + } + else + #endif /* KANJI */ + + # ifdef BIG5 + + # ifdef XPM_BACKGROUND + + drawStringPrep (); + + # endif /* XPM_BACKGROUND */ + + if (wbyte) + + { + + count /= 2; + + # ifdef XPM_BACKGROUND + + if (back == bgColor) + + { + + drawString (XDrawString16); + + } + + else + + # endif /* XPM_BACKGROUND */ + + drawString (XDrawImageString16); + + #ifndef NO_BOLDOVERSTRIKE + + if (MonoBold (rend)) + + { + + xpixel++; + + drawString (XDrawString16); + + xpixel--; + + } + + #endif /* NO_BOLDOVERSTRIKE */ + + } + + else + + #endif /* BIG5 */ + + #ifndef NO_BOLDFONT + if (MonoBold (rend) && TermWin.boldFont != NULL) + *************** strFunc (Xdisplay, drawBuffer, TermWin.g + *** 2774,2779 **** + --- 2886,2894 ---- + #ifdef KANJI + screen.rend [xcursor+1] &= ~(RS_Cursor); + #endif /* KANJI */ + + #ifdef BIG5 + + screen.rend [xcursor+1] &= ~(RS_Cursor); + + #endif /* BIG5 */ + } + + #ifdef XPM_BUFFERING + *** src/screen.h.orig Fri Jan 24 02:46:02 1997 + --- src/screen.h Fri Aug 15 17:35:07 1997 + *************** + *** 58,63 **** + --- 58,68 ---- + # define RS_kanji1 0x80000000u /* kanji 1st byte */ + # define RS_kanjiMask (RS_kanji0|RS_kanji1) /* kanji 2nd byte */ + #endif + + #ifdef BIG5 + + # define RS_big5_0 0x40000000u /* only big5 */ + + # define RS_big5_1 0x80000000u /* big5 1st byte */ + + # define RS_big5Mask (RS_big5_0|RS_big5_1) /* big5 2nd byte */ + + #endif + + #define RS_fgMask 0x00001F00u /* 32 colors */ + #define RS_Bold 0x00008000u /* bold */ + *** src/state.h.orig Fri Aug 15 17:35:08 1997 + --- src/state.h Fri Aug 15 17:35:08 1997 + *************** + *** 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/xdefaults.c.orig Fri Jan 24 02:46:02 1997 + --- src/xdefaults.c Fri Aug 15 17:35:08 1997 + *************** static const struct { + *** 194,199 **** + --- 194,213 ---- + "kanji_encoding", + "km", "mode", "kanji encoding; mode = eucj | sjis" ), + #endif /* KANJI */ + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + STRG( + + rs_cfont [0], + + "cfont", + + "fc", "fontname", "chinese font" ), + + + + /* fonts: command-line option = resource name */ + + RSTRG( rs_cfont [1], "cfont1", "fontname" ), + + RSTRG( rs_cfont [2], "cfont2", "fontname" ), + + RSTRG( rs_cfont [3], "cfont3", "fontname" ), + + RSTRG( rs_cfont [4], "cfont4", "fontname" ), + + + + /* no need for various encoding support (at the moment) */ + + #endif /* BIG5 */ + #ifdef GREEK_SUPPORT + STRG( + rs_greek_keyboard, + *** src/command.c.orig Fri Aug 15 17:55:55 1997 + --- src/command.c Fri Aug 15 18:03:19 1997 + *************** get_pty (void) + *** 527,533 **** + ttydev = tty_name; + + # define PTYCHAR1 "pqrstuvwxyz" + ! # define PTYCHAR2 "0123456789abcdef" + for (c1 = PTYCHAR1; *c1; c1++) + { + ptydev [len-2] = ttydev [len-2] = *c1; + --- 527,533 ---- + ttydev = tty_name; + + # define PTYCHAR1 "pqrstuvwxyz" + ! # define PTYCHAR2 "0123456789abcdefghijklmnopqrstuv" + for (c1 = PTYCHAR1; *c1; c1++) + { + ptydev [len-2] = ttydev [len-2] = *c1; + *************** init_xlocale (void) + *** 1178,1183 **** + --- 1178,1186 ---- + #ifdef KANJI + setlocale (LC_CTYPE, ""); + #endif + + #ifdef BIG5 + + setlocale (LC_CTYPE, ""); + + #endif + + if (rs_inputMethod == NULL + #ifndef KANJI + *************** lookup_key (XEvent * ev) + *** 1337,1342 **** + --- 1340,1349 ---- + static unsigned char kbuf [KBUFSZ]; + int ctrl, meta, shft, len; + KeySym keysym; + + #ifdef XCIN + + char chstr[256]; + + int result; + + #endif /* XCIN */ + + /* + * use Num_Lock to toggle Keypad on/off. If Num_Lock is off, allow an + *************** sprintf (kbuf,"\033[%02d~", (int)((n) + + *** 1697,1703 **** + --- 1704,1724 ---- + 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 */ + } + /*}}}*/ + + *************** process_x_event (XEvent * ev) + *** 1918,1923 **** + --- 1939,1947 ---- + if (Input_Context != NULL) XSetICFocus (Input_Context); + #endif + } + + #ifdef XCIN + + send_FocusIn(Xdisplay, TermWin.parent); + + #endif + break; + + case FocusOut: + *************** process_x_event (XEvent * ev) + *** 1928,1933 **** + --- 1952,1960 ---- + if (Input_Context != NULL) XUnsetICFocus (Input_Context); + #endif + } + + #ifdef XCIN + + send_FocusOut(Xdisplay, TermWin.parent); + + #endif + break; + + case ConfigureNotify: + *** src/feature.h.orig Fri Jan 24 02:46:02 1997 + --- src/feature.h Fri Aug 15 17:41:32 1997 + *************** + *** 136,143 **** + * default rendition rather than the current rendition + * NB: this make break some applications and should used with caution + *----------------------------------------------------------------------*/ + ! #define XPM_BACKGROUND + ! #define XPM_SCALING + #define PATH_ENV "RXVTPATH" + /* #define XPM_BUFFERING */ + /* #define NO_CURSORCOLOR */ + --- 136,143 ---- + * default rendition rather than the current rendition + * NB: this make break some applications and should used with caution + *----------------------------------------------------------------------*/ + ! /* #define XPM_BACKGROUND */ + ! /* #define XPM_SCALING */ + #define PATH_ENV "RXVTPATH" + /* #define XPM_BUFFERING */ + /* #define NO_CURSORCOLOR */ + *************** + *** 272,279 **** + * for XTERM_SCROLLBAR it is *always* 14. + *----------------------------------------------------------------------*/ + /* #define XTERM_SCROLLBAR */ + ! #define SCROLLBAR_RIGHT + /* #define SB_WIDTH 10 */ + /*}}}*/ + + /*{{{ menuBar: */ + --- 272,280 ---- + * for XTERM_SCROLLBAR it is *always* 14. + *----------------------------------------------------------------------*/ + /* #define XTERM_SCROLLBAR */ + ! /* #define SCROLLBAR_RIGHT */ + /* #define SB_WIDTH 10 */ + + #define SB_WIDTH 8 + /*}}}*/ + + /*{{{ menuBar: */ + *************** + *** 304,313 **** + --- 305,319 ---- + * #define KANJI + * to compile with Kanji support + * after compilation, rename executable as `kxvt' + + * + + * #define BIG5 + + * to compile with Big5 support + + * after compilation, rename executable as `crxvt' + *----------------------------------------------------------------------*/ + /* #define META8_OPTION */ + /* #define GREEK_SUPPORT */ + /* #define KANJI */ + + #define BIG5 + /*}}}*/ + + /*{{{ misc: */ + *************** + *** 367,380 **** + * for BSD-type systems, to define where the tty table is located + * if it isn't /etc/ttytab + *----------------------------------------------------------------------*/ + ! /* #define UTMP_SUPPORT */ + #ifdef UTMP_SUPPORT + # ifndef UTMP_FILENAME + /* # define UTMP_FILENAME "/var/adm/utmp" */ + /* # define UTMP_FILENAME "/var/adm/utmp" */ + # endif + # ifndef TTYTAB_FILENAME + ! /* # define TTYTAB_FILENAME "/etc/ttys" */ + # endif + #endif + /*}}}*/ + --- 373,387 ---- + * for BSD-type systems, to define where the tty table is located + * if it isn't /etc/ttytab + *----------------------------------------------------------------------*/ + ! #define UTMP_SUPPORT + #ifdef UTMP_SUPPORT + # ifndef UTMP_FILENAME + /* # define UTMP_FILENAME "/var/adm/utmp" */ + /* # define UTMP_FILENAME "/var/adm/utmp" */ + + #define UTMP_FILENAME "/var/run/utmp" + # endif + # ifndef TTYTAB_FILENAME + ! # define TTYTAB_FILENAME "/etc/ttys" + # endif + #endif + /*}}}*/ + *************** + *** 383,388 **** + --- 390,402 ---- + /*----------------------------------------------------------------------* + * end of user configuration section + *----------------------------------------------------------------------*/ + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + # undef GREEK_SUPPORT + + # undef XTERM_FONT_CHANGE + + # undef KANJI /* remove Kanji support */ + + # define XCIN /* so we could input Chinese with xcin */ + + #endif /* if both BIG5 and KANJI are on, BIG5 is the default */ + + + #ifdef KANJI + # undef GREEK_SUPPORT /* Kanji/Greek together is too weird */ + # undef XTERM_FONT_CHANGE /* can't ensure font sizes will match */ + *************** + *** 420,426 **** + --- 434,444 ---- + #ifdef KANJI + # define TERMENV "kterm" + #else + + #ifdef BIG5 /* added by frankch for BIG5 support */ + + # define TERMENV "xterm" /* no need to set a new term */ + + #else /* BIG5 */ + # define TERMENV "xterm" + + #endif /* BIG5 */ + #endif + + #ifdef NO_MOUSE_REPORT diff -bcrNp crxvt.orig/patches/patch-ad crxvt/patches/patch-ad *** crxvt.orig/patches/patch-ad Thu Jan 1 08:00:00 1970 --- crxvt/patches/patch-ad Fri Aug 15 18:28:19 1997 *************** *** 0 **** --- 1,51 ---- + *** doc/Makefile.in.orig Fri Jan 24 02:46:03 1997 + --- doc/Makefile.in Fri Aug 15 18:27:45 1997 + *************** LSM: LSM.in + *** 26,32 **** + + tags allbin: + + ! alldoc: rxvt.1 LSM + + clean: + $(RMF) LSM rxvt.1 *~ + --- 26,32 ---- + + tags allbin: + + ! alldoc: rxvt.1 # LSM + + clean: + $(RMF) LSM rxvt.1 *~ + *************** distclean: + *** 38,44 **** + (cd $(srcdir); $(RMF) Makefile) + + install: alldoc + ! $(INSTALL_DATA) rxvt.1 $(DESTDIR)$(mandir)/$(manprefix)rxvt.$(manext) + + uninstall: + -cd $(mandir); $(RMF) $(manprefix)rxvt.$(manext) + --- 38,44 ---- + (cd $(srcdir); $(RMF) Makefile) + + install: alldoc + ! $(INSTALL_DATA) rxvt.1 $(DESTDIR)$(mandir)/$(manprefix)crxvt.$(manext) + + uninstall: + -cd $(mandir); $(RMF) $(manprefix)rxvt.$(manext) + *** doc/rxvt.1.in.orig Fri Aug 15 18:23:45 1997 + --- doc/rxvt.1.in Fri Aug 15 18:25:11 1997 + *************** Main bold text font; resource + *** 126,131 **** + --- 126,135 ---- + Main Kanji font; resource + .BR kfont . + .TP + + .BI \-fc " fontname" + + Main BIG5 font; resource + + .BR cfont . + + .TP + .BI \-km " mode" + Kanji encoding mode; + .BR eucj : diff -bcrNp crxvt.orig/patches/patch-ae crxvt/patches/patch-ae *** crxvt.orig/patches/patch-ae Thu Jan 1 08:00:00 1970 --- crxvt/patches/patch-ae Fri Aug 15 19:54:19 1997 *************** *** 0 **** --- 1,115 ---- + *** src/Makefile.in.orig Fri Jan 24 02:46:02 1997 + --- src/Makefile.in Fri Aug 15 19:53:40 1997 + *************** first_rule: all + *** 7,19 **** + dummy: + + SRCS = command.c debug.c graphics.c grkelot.c main.c menubar.c misc.c\ + ! netdisp.c screen.c scrollbar.c utmp.c xdefaults.c + + OBJS = command.o debug.o graphics.o grkelot.o main.o menubar.o misc.o\ + ! netdisp.o screen.o scrollbar.o utmp.o xdefaults.o + + HDRS = command.h debug.h defaults.h feature.h graphics.h grkelot.h\ + ! main.h menubar.h misc.h rxvtgrx.h screen.h scrollbar.h xdefaults.h + + # + # Distribution variables + --- 7,20 ---- + dummy: + + SRCS = command.c debug.c graphics.c grkelot.c main.c menubar.c misc.c\ + ! netdisp.c screen.c scrollbar.c utmp.c xdefaults.c cli_xcin.c + + OBJS = command.o debug.o graphics.o grkelot.o main.o menubar.o misc.o\ + ! netdisp.o screen.o scrollbar.o utmp.o xdefaults.o cli_xcin.o + + HDRS = command.h debug.h defaults.h feature.h graphics.h grkelot.h\ + ! main.h menubar.h misc.h rxvtgrx.h screen.h scrollbar.h xdefaults.h \ + ! state.h protocol.h + + # + # Distribution variables + *************** DIST = $(HDRS) $(SRCS) Makefile.in gcc-W + *** 25,33 **** + .c.o: + $(CC) -c $(CPPFLAGS) $(XINC) -I$(basedir) $(CFLAGS) $< + #------------------------------------------------------------------------- + ! all: rxvt + + ! rxvt: VERSION.h $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(XLIB) + + VERSION.h: + --- 26,34 ---- + .c.o: + $(CC) -c $(CPPFLAGS) $(XINC) -I$(basedir) $(CFLAGS) $< + #------------------------------------------------------------------------- + ! all: crxvt + + ! crxvt: VERSION.h $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(XLIB) + + VERSION.h: + *************** VERSION.h: + *** 36,61 **** + tags: $(SRCS) + ctags $(SRCS) + + ! allbin: rxvt + + alldoc: + + clean: + ! $(RMF) rxvt core a.out *.o *.bak *~ + + realclean: clean + $(RMF) VERSION.h tags + + distclean: + ! (cd $(srcdir); $(RMF) rxvt *~ *.o core a.out) + if test $(srcdir) = .; then $(MAKE) realclean; fi + (cd $(srcdir); $(RMF) Makefile) + + install: allbin alldoc + ! $(INSTALL_PROGRAM) rxvt $(DESTDIR)$(bindir)/$(binprefix)rxvt + + uninstall: + ! (cd $(bindir); $(RMF) $(binprefix)rxvt) + + distdirs: + mkdir $(basedir)/../$(VERNAME)/$(thisdir) + --- 37,62 ---- + tags: $(SRCS) + ctags $(SRCS) + + ! allbin: crxvt + + alldoc: + + clean: + ! $(RMF) crxvt core a.out *.o *.bak *~ + + realclean: clean + $(RMF) VERSION.h tags + + distclean: + ! (cd $(srcdir); $(RMF) crxvt *~ *.o core a.out) + if test $(srcdir) = .; then $(MAKE) realclean; fi + (cd $(srcdir); $(RMF) Makefile) + + install: allbin alldoc + ! install -c -o root -g wheel -s -m 4755 crxvt $(DESTDIR)$(bindir)/$(binprefix)crxvt + + uninstall: + ! (cd $(bindir); $(RMF) $(binprefix)crxvt) + + distdirs: + mkdir $(basedir)/../$(VERNAME)/$(thisdir) + *************** scrollbar.o: scrollbar.c main.h VERSION. + *** 98,100 **** + --- 99,102 ---- + utmp.o: utmp.c ./../config.h feature.h + xdefaults.o: xdefaults.c main.h VERSION.h ./../config.h feature.h \ + misc.h debug.h defaults.h grkelot.h xdefaults.h + + cli_xcin.o: cli_xcin.c state.h protocol.h diff -bcrNp crxvt.orig/pkg/COMMENT crxvt/pkg/COMMENT *** crxvt.orig/pkg/COMMENT Thu Jan 1 08:00:00 1970 --- crxvt/pkg/COMMENT Fri Aug 15 18:30:41 1997 *************** *** 0 **** --- 1 ---- + crxvt - a low memory usage xterm replacement that supports color & chinese diff -bcrNp crxvt.orig/pkg/DESCR crxvt/pkg/DESCR *** crxvt.orig/pkg/DESCR Thu Jan 1 08:00:00 1970 --- crxvt/pkg/DESCR Fri Aug 15 18:33:52 1997 *************** *** 0 **** --- 1,11 ---- + Crxvt is an xterm replacement which uses a little less memory, and is + suitable for use on machines with small memories. Tek4010 support + is removed. + + Modifications were made by Rob Nation (nation@rocket.sanders.lockheed.com) + to make it a little more compact, and to add and remove certain features. + + BIG5 support patched by frankch + + - Vanilla + vanilla@MinJe.com.TW diff -bcrNp crxvt.orig/pkg/PLIST crxvt/pkg/PLIST *** crxvt.orig/pkg/PLIST Thu Jan 1 08:00:00 1970 --- crxvt/pkg/PLIST Fri Aug 15 18:29:08 1997 *************** *** 0 **** --- 1,2 ---- + bin/crxvt + man/man1/crxvt.1.gz >Audit-Trail: >Unformatted: