Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!jethro!exodus!NMSU.Edu!mleisher From: mleisher@NMSU.Edu Newsgroups: comp.sources.x Subject: v12i092: kterm - kanji xterm, Part11/18 Message-ID: <13144@exodus.Eng.Sun.COM> Date: 11 May 91 00:51:04 GMT References: Sender: news@exodus.Eng.Sun.COM Lines: 1431 Approved: argv@sun.com Submitted-by: mleisher@NMSU.Edu Posting-number: Volume 12, Issue 92 Archive-name: kterm/part11 #!/bin/sh # this is kt412.11 (part 11 of kterm-4.1.2) # do not concatenate these parts, unpack them in order with /bin/sh # file kterm-4.1.2/g2b continued # if test ! -r _shar_seq_.tmp; then echo 'Please unpack part 1 first!' exit 1 fi (read Scheck if test "$Scheck" != 11; then echo Please unpack part "$Scheck" next! exit 1 else exit 0 fi ) < _shar_seq_.tmp || exit 1 if test ! -f _shar_wnt_.tmp; then echo 'x - still skipping kterm-4.1.2/g2b' else echo 'x - continuing file kterm-4.1.2/g2b' sed 's/^X//' << 'SHAR_EOF' >> 'kterm-4.1.2/g2b' && lI>a[<9=OXDu*a$GCVen#&acUq,s,>J@SagU+2qH)GqrGHBZ3:t9X47gc,,\_PJ3\GE)3\G!5oW:.* /]NVh[Y&D3]X'!8+ZX4'B>-qe8bbsL39=AWMC9FG2e#;3%e[i9&kH'',7g]Si2aK/@68qA&$FWX9Dn A9BXekK_7_@6OCUI6]^SZCdB#;6oeAQD8Z`CoPUft7SUsH(1X])Q9V8p$UWd(FgWnO94Wn")q$E1\: XX/5'e=KfB:n[7>V7'P=G\>miVlFkoLE2q0qD[NL][SNp_fCYtSWa;L:YK=FZ[7R;uYIhNeV>$t*]W2 CU<2?@kb."I^_6.ak=08sC`j0EeHa^Z)?bb6m?G#_7VXgWlUscop]r/F&Vr+K+^ZVt'XE:beV=CTaW ^-t!69%7c+@8%W71-4bZ=UVu[J$H%W+ruZ]<\QTY^*5=ZK&@4WNs-+$E\HT`kp*9iP!7;`MH/+qP*@VeN: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L;` FeSG_d::1`PhOum'so,TtC^4 xbtoa End N 16679 4127 E 21 S 29ce27 R 49ff31ab SHAR_EOF echo 'File kterm-4.1.2/g2b is complete' && chmod 0664 kterm-4.1.2/g2b || echo 'restore of kterm-4.1.2/g2b failed' Wc_c="`wc -c < 'kterm-4.1.2/g2b'`" test 21178 -eq "$Wc_c" || echo 'kterm-4.1.2/g2b: original size 21178, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= kterm-4.1.2/hgutil.c ============== if test -f 'kterm-4.1.2/hgutil.c' -a X"$1" != X"-c"; then echo 'x - skipping kterm-4.1.2/hgutil.c (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting kterm-4.1.2/hgutil.c (Text)' sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/hgutil.c' && /* X * $Header: /usr/local/src/X11/contrib/clients/kterm-4.1.2/RCS/hgutil.c,v 1.0 1991/01/30 00:20:28 mleisher Exp $ X */ X /* X * X * File: hgutil.c X * Description: Convert from N-byte code to KS code. X * Author: mleisher@nmsu.edu (Mark Leisher) X * Created: Mon Jan 28 13:18:21 1991 X * Modified: X * X */ X /* X * Copyright (C) 1990 Mark Leisher. X * X * Author: Mark Leisher (mleisher@nmsu.edu) X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 1, or (at your option) X * any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * A copy of the GNU General Public License can be obtained from this X * program's author (send electronic mail to mleisher@nmsu.edu) or from X * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA X * 02139, USA. X * X */ X #include #include "hgutil.h" X #define INITIAL 0 /* Initial(starting) state for N-byte parse. */ #define MIDDLE 1 /* Middle state for N-byte parse. */ #define FINAL 2 /* Final(ending) state for N-byte parse. */ X static int doing_ks = 1; /* Working on a KS string. */ X /* X * Hash table stuff. Make a table of 4000 slots for 2390 items. X */ X #define M 4000 X typedef struct { X unsigned char *key; X unsigned char *data; } hashnode; X static hashnode table[M]; X /* X * Use Horner's method for evaluating a polynomial at a point. X */ static int hash(key) unsigned char *key; { X int h; X X for (h = 0; *key != '\0'; key++) X h = (64*h + *key) % M; X X return(h); } X /* X * A second hash function for double hashing with linear probing. X * Uses the last 5 bits of the previously generated hash code. X */ static int hash2(h) int h; { X return(32 - (h % 32)); } X void hashinit() { X int i; X X for (i = 0; i < M; i++) X table[i].key = table[i].data = NULL; } X /* X * Insert with double hashing and linear probing. X */ static void hashinsert(key, data, keylength) unsigned char *key, *data; int keylength; { X int h = hash(key); X int nh = hash2(h); X X while(table[h].key != NULL && X strncmp((char *)table[h].key, (char *)key, keylength)) X h = (h + nh) % M; X table[h].key = key; X table[h].data = data; } X /* X * Search for key. X */ static unsigned char * hashlookup(key, keylength) unsigned char *key; int keylength; { X int h = hash(key); X int nh = hash2(h); X unsigned char *data = NULL; X X while(table[h].key != NULL && X strncmp((char *)table[h].key, (char *)key, keylength)) X h = (h + nh) % M; X data = table[h].data; X return(data); } X void load_hgconv_table(filename) char *filename; { X FILE *f; X unsigned char buf[5], *l, *k; X int c, i = 0, nsize = 0, kssize = 2; X X if (!(f = fopen(filename, "r"))) { X fprintf(stderr, "Problem with hgconv table file %s.\n", filename); X exit(-1); X } X X hashinit(); X while(!feof(f)) { X X if ((i >= 0 && i < 40) && nsize != 1) X nsize = 1; X else if ((i >= 40 && i < 389) && nsize != 2) X nsize = 2; X else if (i >= 389 && nsize != 3) X nsize = 3; X X if (fread(buf, 1, nsize+kssize, f) < (nsize+kssize)) { X fclose(f); X fprintf(stderr, "Problem reading table %s\n", filename); X exit(-1); X } X X l = (unsigned char *)malloc((nsize+1) * sizeof(unsigned char)); X k = (unsigned char *)malloc(3 * sizeof(unsigned char)); X l[nsize] = k[2] = '\0'; X strncpy(l, buf, nsize); X strncpy(k, (buf+nsize), 2); X X /* X * Insert by hashing on N-byte sequence. X */ X hashinsert(l, k, nsize); X X c = getc(f); X if (!feof(f) && c != EOL) X ungetc(c, f); X X i++; X } X fclose(f); } X static int vowelcombine(c1, c2) int c1, c2; { X switch(c1) { X case 'l': X switch(c2) { X case 'b': return('K'); break; X case 'c': return('H'); break; X case '|': return('L'); break; X } X break; X case 's': X switch(c2) { X case 'f': return('J'); break; X case 'g': return('N'); break; X case '|': return('B'); break; X } X break; X case 'z': X if (c2 == '|') return('M'); X break; X } X return(0); } X static int conscombine(c1, c2) int c1, c2; { X switch(c1) { X case 'A': X if (c2 == 'U') return('S'); break; X case 'D': X switch(c2) { X case 'X': return('J'); break; X case '^': return('H'); break; X } X break; X case 'I': X switch(c2) { X case 'A': return('G'); break; X case 'Q': return('M'); break; X case 'R': return('N'); break; X case 'U': return('A'); break; X case '\\': return('B'); break; X case ']': return('V'); break; X case '^': return('F'); break; X } X break; X case 'R': X if (c2 == 'U') return('C'); X break; X } X return(0); } X static int initcons(c) int c; { X switch(c) { X case 'A': return('r'); break; X case 'B': return('R'); break; X case 'D': return('s'); break; X case 'G': return('e'); break; X case 'H': return('E'); break; X case 'I': return('f'); break; X case 'Q': return('a'); break; X case 'R': return('q'); break; X case 'S': return('Q'); break; X case 'U': return('t'); break; X case 'V': return('T'); break; X case 'W': return('d'); break; X case 'X': return('w'); break; X case 'Y': return('W'); break; X case 'Z': return('c'); break; X case '[': return('z'); break; X case '\\': return('x'); break; X case ']': return('v'); break; X case '^': return('g'); break; X } X return(0); } X static int vowel(c) int c; { X switch (c) { X case 'b': return('k'); break; X case 'c': return('o'); break; X case 'd': return('i'); break; X case 'e': return('O'); break; X case 'f': return('j'); break; X case 'g': return('p'); break; X case 'j': return('u'); break; X case 'k': return('P'); break; X case 'l': return('h'); break; X case 'm': return('k'); break; X case 'n': return('o'); break; X case 'o': return('l'); break; X case 'r': return('y'); break; X case 's': return('n'); break; X case 't': return('j'); break; X case 'u': return('p'); break; X case 'v': return('l'); break; X case 'w': return('b'); break; X case 'z': return('m'); break; X case '{': return('M'); break; X case '|': return('l'); break; X } X return(0); } X static int finalcons(c) int c; { X switch(c) { X case 'A': return('r'); break; X case 'B': return('R'); break; X case 'C': return('S'); break; X case 'D': return('s'); break; X case 'E': return('J'); break; X case 'F': return('H'); break; X case 'G': return('e'); break; X case 'I': return('f'); break; X case 'J': return('G'); break; X case 'K': return('M'); break; X case 'L': return('N'); break; X case 'M': return('A'); break; X case 'N': return('B'); break; X case 'O': return('V'); break; X case 'P': return('F'); break; X case 'Q': return('a'); break; X case 'R': return('q'); break; X case 'S': return('t'); break; X case 'U': return('t'); break; X case 'V': return('T'); break; X case 'W': return('d'); break; X case 'X': return('w'); break; X case 'Z': return('c'); break; X case '[': return('z'); break; X case '\\': return('x'); break; X case ']': return('v'); break; X case '^': return('g'); break; X } X return(0); } X static int mapn2ks(c1, c2, c3, oc1, oc2) char c1, c2, c3; unsigned char *oc1, *oc2; { X unsigned char key[4]; X unsigned char *kscode; X int i = 0; X X if (!c1 && !c2 && !c3) { X *oc1 = *oc2 = '\0'; X return(0); X } X if (c1) key[i++] = c1; X if (c2) key[i++] = c2; X if (c3) key[i++] = c3; X X key[i] = '\0'; X /* X * Map unknown sequences to the space character because they probably X * don't have equivalents in the KSC5601 code set. X * The code position for a space in KS code is 0xa4a0. X */ X if (!(kscode = hashlookup(key, i))) { X *oc1 = 0xa4; X *oc2 = 0xa0; X } else { X *oc1 = kscode[0]; X *oc2 = kscode[1]; X } X X /* X * All N-byte sequences map to a two byte KS code. X */ X return(2); } X int hgconvert(nb, ks, nblength) char *nb; unsigned char **ks; int *nblength; { X register char c, res; X register char cho_sung = 0, jung_sung = 0, jong_sung = 0; X register char *ptr = nb; X register unsigned char *ptr1; X register int length = 0; X char state = INITIAL; X unsigned char c1, c2; X X c = *ptr++; X if (ks) X ptr1 = *ks; X while(c && c != CTL_O) { X switch(state) { X case INITIAL: X if ((cho_sung = initcons(c))) X state = MIDDLE; X else if ((jung_sung = vowel(c))) { X cho_sung = jong_sung = 0; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X } else if ((jong_sung = finalcons(c))) { X cho_sung = jung_sung = 0; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X } X break; X case MIDDLE: X if ((jung_sung = vowelcombine(c, *ptr))) { X state = FINAL; X ptr++; X } else if ((jung_sung = vowel(c))) X state = FINAL; X else if ((res = initcons(c))) { X jung_sung = jong_sung = 0; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X cho_sung = res; X } else if ((res = finalcons(c))) { X jung_sung = jong_sung = 0; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X cho_sung = 0; X jong_sung = res; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X jong_sung = 0; X state = INITIAL; X } X break; X case FINAL: X if ((res = initcons(c)) && vowel(*ptr)) { X jong_sung = 0; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X cho_sung = res; X state = MIDDLE; X } else if ((jong_sung = conscombine(c, *ptr)) && !vowel(ptr[1])) { X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X state = INITIAL; X cho_sung = jung_sung = jong_sung = 0; X } else if ((jong_sung = finalcons(c))) { X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X cho_sung = jung_sung = jong_sung = 0; X state = INITIAL; X } else if ((res = initcons(c))) { X jong_sung = 0; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X cho_sung = res; X state = MIDDLE; X } else if ((res = vowel(c))) { X jong_sung = 0; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X cho_sung = 0; X jung_sung = res; X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X } X jung_sung = 0; X state = INITIAL; X } X } X c = *ptr++; X } X length += mapn2ks(cho_sung, jung_sung, jong_sung, &c1, &c2); X if (ks && c1 && c2) { X *ptr1++ = c1; X *ptr1++ = c2; X *ptr1 = '\0'; X } X if (nblength) X *nblength = ptr - nb; X return(length); } SHAR_EOF chmod 0664 kterm-4.1.2/hgutil.c || echo 'restore of kterm-4.1.2/hgutil.c failed' Wc_c="`wc -c < 'kterm-4.1.2/hgutil.c'`" test 13217 -eq "$Wc_c" || echo 'kterm-4.1.2/hgutil.c: original size 13217, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= kterm-4.1.2/hgutil.h ============== if test -f 'kterm-4.1.2/hgutil.h' -a X"$1" != X"-c"; then echo 'x - skipping kterm-4.1.2/hgutil.h (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting kterm-4.1.2/hgutil.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/hgutil.h' && /* X * $Header: /usr/local/src/X11/contrib/clients/kterm-4.1.2/RCS/hgutil.h,v 1.0 1991/01/30 00:21:51 mleisher Exp $ X */ X /* X * X * File: hgutil.h X * Description: Convert from N-byte code to KS code. X * Author: mleisher@nmsu.edu (Mark Leisher) X * Created: Mon Jan 28 13:18:21 1991 X * Modified: X * X */ X #ifndef _hgutil_h #define _hgutil_h X #define CTL_N 0x0e /* N-byte string start indicator. */ #define CTL_O 0x0f /* N-byte string end indicator. */ #define EOL 0x0a /* Unix style ^J line feed. */ X /* X * The hgconvert function takes the original n-byte string and X * converts it to a KS code string. If a NULL is passed for ks, X * hgconvert will return the length of the KS code string. X * If a non-NULL pointer is passed for nblength, the length of the X * N-byte string is returned. X */ int hgconvert(); /* X char *nb; The N-byte string. X unsigned char **ks; RETURNED: The KS string. X int *nblength; RETURNED: The length of the N-byte string. */ X #endif /* _hgutil_h */ SHAR_EOF chmod 0664 kterm-4.1.2/hgutil.h || echo 'restore of kterm-4.1.2/hgutil.h failed' Wc_c="`wc -c < 'kterm-4.1.2/hgutil.h'`" test 1110 -eq "$Wc_c" || echo 'kterm-4.1.2/hgutil.h: original size 1110, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= kterm-4.1.2/hzutil.c ============== if test -f 'kterm-4.1.2/hzutil.c' -a X"$1" != X"-c"; then echo 'x - skipping kterm-4.1.2/hzutil.c (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting kterm-4.1.2/hzutil.c (Text)' sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/hzutil.c' && /* X * $Header: /usr/local/src/X11/contrib/clients/kterm-4.1.2/RCS/hzutil.c,v 1.2 1991/01/30 00:16:20 mleisher Exp $ X */ X /* X * FILE NAME: hzutil.c X * See MODIFICATIONS entry below. X * X * NAME: X * HC - Hanzi Converter Version 1.2u X * Copyright @ 1988,1989,1990 by Fung F. Lee & Ricky Yeung X * X * SYNOPSIS: X * HC -m mode [-tabs t1 t2 ...] X * mode: can be BIGtoGB or GBtoBIG X * ti: conversion table filenames X * X * DESCRIPTION: X * `HC' converts BIG-5 codes into GB codes (with high bit set), X * and vice versa. BIG-5 is a popular hanzi code used in Taiwan, X * whereas GB (GuoBiao) is Mainland China's national standard. X * GB code (with high bit set) is adopted widely in many systems, X * such as CCDOS and Macintosh Chinese Operating System 6.0.3. X * X * FILES: X * GB0toBIG, GB1toBIG, GB2toBIG, BIG0toGB, BIG1toGB, YiTiZi X * are HC mapping table files. They are either GB or BIG-5 files. X * The format is simple and allows easy modification with a Chinese X * editor. X * X * AUTHORS: X * Ricky Yeung (yeung@june.cs.washington.edu) X * Fung F. Lee (lee@milo.stanford.edu) X * X * ACKNOWLEDGEMENT: X * Thanks to Edmund Lai for providing most of the data in `GB2toBIG'. X * X * DISTRIBUTION: X * This program and the data files are NOT in public domain. X * The source file and the related table files as listed X * in FILES can be freely distributed for non-commercial purposes only. X * X * Contact the authors before making any modification to the software X * and/or the table files. X * X * This software is provided "as is" and the authors disclaim all X * warranties with regard to this software and the correctness of the X * mapping table files. X * X * MODIFICATIONS: X * Modified Tue Sep 11 23:20:21 MDT 1990 by Mark Leisher X * mleisher@nmsu.edu with permission from Ricky Yeung. X * Modified file for use with kterm 4.3.0. X * X * 1. Consolidated GB[012]toBIG files into 'g2b.table' and X * BIG[01]toGB into 'b2g.table'. X * 2. Changed file name to 'hzutil.c'. X * 3. Moved defines and table variables into 'hzutil.h'. X * 4. Removed unneeded functions, modified converter X * function, modified function return types. X * 5. Made most functions static to avoid conflict with X * outside functions. X * 6. Added SGB<->GB,BIG5 abilities to converter(). X */ X /* X Copyright (C) 1989 Fung F. Lee X X sgb2hz: convert a Macintosh/CCDOS SGB file into a HZ file. X hz2sgb: convert a HZ file into a Macintosh/CCDOS SGB file. X X This program is free for general distribution. X X This program runs on UNIX. You are welcome to port it to other operating X systems. X X MODIFICATIONS: X Modified Fri Nov 9 02:35:22 1990 by Mark Leisher X mleisher@nmsu.edu for use with kterm 4.3.0 X X 1. Extracted functions mac2gb and gb2mac from files sgb2hz.c X and hz2sgb.c. X 2. Modified mac2gb and gb2mac function names to X sgb2gb and gb2sbg respectively. X 3. Slightly modified functions. */ X #include #include #include "hzutil.h" X static char tables_initialized = 0; X static int SkipSpaces(fp) FILE *fp; { X int c; X X for(;;) X { X c=fgetc(fp); X if ((c&0x80) || !isspace(c)) break; X } X return (c); } X static void fatal(s) char *s; { X fprintf(stderr, "%s\n", s); X exit(1); } X static FILE * openfile(fn) char *fn; { X FILE *fp = fopen(fn, "r"); X X if (!fp) X fprintf(stderr, "Unable to open file: %s\n", fn); X return(fp); } X static unsigned short int makeYiTi(fp) FILE *fp; { X unsigned int code1, code2, value; X int c1, c2; X unsigned short int total=0; X X for (;;) X { X if ((c1=SkipSpaces(fp))==EOF) break; X c2 = fgetc(fp); X code1 = DB(c1, c2); X value = BtoG[code1 - BIGstart]; X for (;;) X { X if ((c1=SkipSpaces(fp))==EOF) break; X c2 = fgetc(fp); X code2 = DB(c1, c2); X BtoG[code2 - BIGstart] = value; X total++; X if ((c1=fgetc(fp))=='\n') X break; X ungetc(c1, fp); X } X } X return total; } X static void init_tables() { X int i; X X if (tables_initialized) return; X GtoB = (unsigned short int *) malloc(sizeof(short int) * GBsize); X BtoG = (unsigned short int *) malloc(sizeof(short int) * BIGsize); X X for (i=0; iBIG', '%BIG->GB', '%YITIZI' */ X if (buf[0] == '%') X { X switch(buf[1]) X { X case 'G': mode = GBtoBIG; break; X case 'B': mode = BIGtoGB; break; X case 'Y': mode = YITIZI; break; X default: fatal("unknown HCF format\n"); break; X } X } X X if (mode == YITIZI) { X total = makeYiTi(fp); X fclose(fp); X return total; X } X X for (;;) X { X if (fscanf(fp, "%x %x", &cfirst, &clast) != 2) X break; X for (codeS = cfirst; codeS <= clast; codeS++) X { X if ((c1=SkipSpaces(fp))==EOF) break; X c2 = fgetc(fp); X codeT = DB(c1, c2); X if (mode == GBtoBIG) X { X if (!inBIGrange(codeT)) X fatal("error: invalid code mapping table entry\n"); X if (codeT != BIGbox) X { X GtoB[codeS - GBstart] = codeT; X BtoG[codeT - BIGstart] = codeS; X total++; X } X } X else if (mode == BIGtoGB) X { X if (!inGBrange(codeT)) X fatal("error: invalid code mapping table entry\n"); X if (codeT != GBbox) X { X BtoG[codeS - BIGstart] = codeT; X GtoB[codeT - GBstart] = codeS; X total++; X } X } X } X } X fclose(fp); X return total; } X static void gb2sgb(hi, lo, hi1, lo1) unsigned char hi, lo, *hi1, *lo1; { X hi &= 0x7f; X lo &= 0x7f; X *hi1 = 0x81 + (hi - 0x21)/2; X if (hi%2 != 0) { X *lo1 = 0x40 + (lo - 0x21); X *lo1 += ((*lo1 >= 0x7f) ? 1 : 0); X } else X *lo1 = 0x9f + (lo - 0x21); } X static void sgb2gb(hi, lo, hi1, lo1) unsigned char hi, lo, *hi1, *lo1; { X if (lo >= 0x9f) { X *hi1 = 0x21 + (hi - 0x81) * 2 + 1; X *lo1 = 0x21 + (lo - 0x9f); X } else { X *hi1 = 0x21 + (hi - 0x81) * 2; X lo -= ((lo > 0x7f) ? 1 : 0); X *lo1 = 0x21 + (lo - 0x40); X } X *hi1 |= 0x80; X *lo1 |= 0x80; } X void hzconvert(mode, c1, c2, oc1, oc2) int mode; unsigned char c1, c2, *oc1, *oc2; { X unsigned short int codeS, codeT; X unsigned char ch1, ch2; X X codeS = DB(c1, c2); X codeT = codeS; X switch(mode) { X case GBtoBIG: X if (inGBrange(codeS)) X codeT = GtoB[codeS - GBstart]; X else X codeT = BIGbox; X break; X case BIGtoGB: X if (inBIGrange(codeS)) X codeT = BtoG[codeS - BIGstart]; X else X codeT = GBbox; X break; X case GBtoSGB: X if (inGBrange(codeS)) { X gb2sgb(c1, c2, &ch1, &ch2); X codeT = DB(ch1, ch2); X } X break; X case SGBtoGB: X if (inSGBrange(codeS)) { X sgb2gb(c1, c2, &ch1, &ch2); X codeT = DB(ch1, ch2); X } X break; X case BIGtoSGB: X if (inBIGrange(codeS)) X codeT = BtoG[codeS - BIGstart]; X else X codeT = GBbox; X c1 = HB(codeT); X c2 = LB(codeT); X gb2sgb(c1, c2, &ch1, &ch2); X codeT = DB(ch1, ch2); X break; X case SGBtoBIG: X if (inSGBrange(codeS)) { X sgb2gb(c1, c2, &ch1, &ch2); X ch1 |= 0x80; X ch2 |= 0x80; X codeS = DB(ch1, ch2); X } else X codeS = BIGbox; X codeT = codeS; X if (inGBrange(codeS)) X codeT = GtoB[codeS - GBstart]; X else X codeT = BIGbox; X break; X } X X *oc1 = HB(codeT); X *oc2 = LB(codeT); } SHAR_EOF chmod 0664 kterm-4.1.2/hzutil.c || echo 'restore of kterm-4.1.2/hzutil.c failed' Wc_c="`wc -c < 'kterm-4.1.2/hzutil.c'`" test 7921 -eq "$Wc_c" || echo 'kterm-4.1.2/hzutil.c: original size 7921, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= kterm-4.1.2/hzutil.h ============== if test -f 'kterm-4.1.2/hzutil.h' -a X"$1" != X"-c"; then echo 'x - skipping kterm-4.1.2/hzutil.h (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting kterm-4.1.2/hzutil.h (Text)' sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/hzutil.h' && /* X * $Header: /usr/local/src/X11/contrib/clients/kterm-4.1.2/RCS/hzutil.h,v 1.2 1991/01/30 00:15:29 mleisher Exp $ X */ X /* X * FILE NAME: hzutil.h X * See MODIFICATIONS entry below. X * X * NAME: X * HC - Hanzi Converter Version 1.2u X * Copyright @ 1988,1989,1990 by Fung F. Lee & Ricky Yeung X * X * SYNOPSIS: X * HC -m mode [-tabs t1 t2 ...] X * mode: can be BIGtoGB or GBtoBIG X * ti: conversion table filenames X * X * DESCRIPTION: X * `HC' converts BIG-5 codes into GB codes (with high bit set), X * and vice versa. BIG-5 is a popular hanzi code used in Taiwan, X * whereas GB (GuoBiao) is Mainland China's national standard. X * GB code (with high bit set) is adopted widely in many systems, X * such as CCDOS and Macintosh Chinese Operating System 6.0.3. X * X * FILES: X * GB0toBIG, GB1toBIG, GB2toBIG, BIG0toGB, BIG1toGB, YiTiZi X * are HC mapping table files. They are either GB or BIG-5 files. X * The format is simple and allows easy modification with a Chinese X * editor. X * X * AUTHORS: X * Ricky Yeung (yeung@june.cs.washington.edu) X * Fung F. Lee (lee@milo.stanford.edu) X * X * ACKNOWLEDGEMENT: X * Thanks to Edmund Lai for providing most of the data in `GB2toBIG'. X * X * DISTRIBUTION: X * This program and the data files are NOT in public domain. X * The source file and the related table files as listed X * in FILES can be freely distributed for non-commercial purposes only. X * X * Contact the authors before making any modification to the software X * and/or the table files. X * X * This software is provided "as is" and the authors disclaim all X * warranties with regard to this software and the correctness of the X * mapping table files. X * X * MODIFICATIONS: X * Modified Tue Sep 11 23:20:21 MDT 1990 by Mark Leisher X * mleisher@nmsu.edu with permission from Ricky Yeung. X * Modified file for use with kterm 4.1.0. X * X * 1. Consolidated GB[012]toBIG files into 'g2b.table' and X * BIG[01]toGB into 'b2g.table'. X * 2. Changed file name to 'hzutil.h'. X * 3. Moved defines and table variables into 'hzutil.h'. X * 4. Added converter function prototype. X * 5. Added load_hzconv_table initialization function prototype. X * 6. Added SGB<->GB, BIG conversion(see note in hzutil.c). X */ X #ifndef _hzutil_h #define _hzutil_h X #define GBtoBIG 1 #define BIGtoGB 2 #define GBtoSGB 3 #define SGBtoGB 4 #define BIGtoSGB 5 #define SGBtoBIG 6 #define YITIZI 7 X #define GBstart 0xA1A1 /* first address of GtoB table */ #define GBend 0xFEFE /* last address of GtoB table */ #define GBsize 0x5E5E /* size of GtoB table */ #define SGBstart 0x8140 /* first address of Shift-GuoBiao code */ #define SGBend 0xAFFC /* last address of Shift-GuoBiao code */ #define BIGstart 0xA140 /* first address of BtoG table */ #define BIGend 0xF9FE /* last address of BtoG table */ #define BIGsize 0x58BF /* size of BtoG table */ X #define GBbox 0xA1F5 /* GB code of blank box, default value of BtoG table */ #define BIGbox 0xA1BC /* BIG code of blank box,default value of GtoB table */ X #define HB(x) ((x>>8) & 0xFF) #define LB(x) (x & 0xFF) #define DB(hi,lo) ((((hi)&0xFF) << 8) | ((lo)&0xFF)) #define isFirstByte(c) ((c)>=0xA1) #define inGBrange(x) (((x)>=GBstart) && ((x)<=GBend)) #define inSGBrange(x) (((x)>=SGBstart) && ((x)<=SGBend)) #define inBIGrange(x) (((x)>=BIGstart) && ((x)<=BIGend)) X unsigned short int *BtoG, *GtoB; /* Hanzi code mapping tables */ X int load_hzconv_table(); /* char *tbl_name; */ X void hzconvert(); /* int mode, See above X unsigned char c1, input HB char X unsigned char c2, input LB char X unsigned char *oc1, output HB char X unsigned char *oc2 output LB char */ X #endif /* _hzutil_h */ SHAR_EOF chmod 0664 kterm-4.1.2/hzutil.h || echo 'restore of kterm-4.1.2/hzutil.h failed' Wc_c="`wc -c < 'kterm-4.1.2/hzutil.h'`" test 3632 -eq "$Wc_c" || echo 'kterm-4.1.2/hzutil.h: original size 3632, current size' "$Wc_c" rm -f _shar_wnt_.tmp fi # ============= kterm-4.1.2/input.c ============== if test -f 'kterm-4.1.2/input.c' -a X"$1" != X"-c"; then echo 'x - skipping kterm-4.1.2/input.c (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting kterm-4.1.2/input.c (Text)' sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/input.c' && /* X * $XConsortium: input.c,v 1.8 89/12/10 20:44:48 jim Exp $ X * $Header: /usr/src.yoshi/X/KTerm/4.1.0/RCS/input.c,v 1.1 90/06/27 09:39:05 kagotani Rel $ X */ X #ifndef lint static char *rcsid_input_c = "$XConsortium: input.c,v 1.8 89/12/10 20:44:48 jim Exp $"; #endif /* lint */ X #include X /* X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. X * X * All Rights Reserved X * X * Permission to use, copy, modify, and distribute this software and its X * documentation for any purpose and without fee is hereby granted, X * provided that the above copyright notice appear in all copies and that X * both that copyright notice and this permission notice appear in X * supporting documentation, and that the name of Digital Equipment X * Corporation not be used in advertising or publicity pertaining to X * distribution of the software without specific, written prior permission. X * X * X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS X * SOFTWARE. X */ X /* input.c */ X #ifndef lint static char rcs_id[] = "$XConsortium: input.c,v 1.8 89/12/10 20:44:48 jim Exp $"; #endif /* lint */ X #include #include #include #include #include #include #include "ptyx.h" X static XComposeStatus compose_status = {NULL, 0}; #ifdef ENBUG /* kagotani */ static char *kypd_num = " XXXXXXXX\tXXX\rXXXxxxxXXXXXXXXXXXXXXXXXXXXX*+,-.\\0123456789XXX="; #else static char *kypd_num = " XXXXXXXX\tXXX\rXXXxxxxXXXXXXXXXXXXXXXXXXXXX*+,-./0123456789XXX="; #endif static char *kypd_apl = " ABCDEFGHIJKLMNOPQRSTUVWXYZ??????abcdefghijklmnopqrstuvwxyzXXX"; static char *cur = "DACB"; X static int funcvalue(), sunfuncvalue(); extern Boolean sunFunctionKeys; X void AdjustAfterInput (screen) register TScreen *screen; { X if(screen->scrollkey && screen->topline != 0) X WindowScroll(screen, 0); X if(screen->marginbell) { X int col = screen->max_col - screen->nmarginbell; X if(screen->bellarmed >= 0) { X if(screen->bellarmed == screen->cur_row) { X if(screen->cur_col >= col) { X if(screen->cur_col == col) X Bell(); X screen->bellarmed = -1; X } X } else X screen->bellarmed = screen->cur_col < X col ? screen->cur_row : -1; X } else if(screen->cur_col < col) X screen->bellarmed = screen->cur_row; X } } X Input (keyboard, screen, event, eightbit) register TKeyboard *keyboard; register TScreen *screen; register XKeyPressedEvent *event; Bool eightbit; { X #define STRBUFSIZE 100 X X char strbuf[STRBUFSIZE]; X register char *string; X register int key = FALSE; X int pty = screen->respond; X int nbytes; X KeySym keysym; X ANSI reply; X #ifdef KTERM X extern XtermWidget term; X nbytes = XmuLookupKana ((XKeyEvent *)event, strbuf, STRBUFSIZE, X &keysym, &compose_status); # ifdef KTERM_KANJI SHAR_EOF true || echo 'restore of kterm-4.1.2/input.c failed' fi echo 'End of kterm-4.1.2 part 11' echo 'File kterm-4.1.2/input.c is continued in part 12' echo 12 > _shar_seq_.tmp exit 0 ----------------------------------------------------------------------------- mleisher@nmsu.edu "I laughed. Mark Leisher I cried. Computing Research Lab I fell down. New Mexico State University It changed my life." Las Cruces, NM - Rich [Cowboy Feng's Space Bar and Grille] -- Dan Heller O'Reilly && Associates Z-Code Software Comp-sources-x: Senior Writer President comp-sources.x@uunet.uu.net argv@ora.com argv@zipcode.com