home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
x
/
volume12
/
kterm
/
part12
< prev
next >
Wrap
Text File
|
1991-05-11
|
51KB
|
1,546 lines
Path: uunet!cs.utexas.edu!sun-barr!newstop!jethro!exodus!NMSU.Edu!mleisher
From: mleisher@NMSU.Edu
Newsgroups: comp.sources.x
Subject: v12i093: kterm - kanji xterm, Part12/18
Message-ID: <13145@exodus.Eng.Sun.COM>
Date: 11 May 91 00:51:10 GMT
References: <csx-12i082:kterm@uunet.UU.NET>
Sender: news@exodus.Eng.Sun.COM
Lines: 1534
Approved: argv@sun.com
Submitted-by: mleisher@NMSU.Edu
Posting-number: Volume 12, Issue 93
Archive-name: kterm/part12
#!/bin/sh
# this is kt412.12 (part 12 of kterm-4.1.2)
# do not concatenate these parts, unpack them in order with /bin/sh
# file kterm-4.1.2/input.c continued
#
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 12; 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/input.c'
else
echo 'x - continuing file kterm-4.1.2/input.c'
sed 's/^X//' << 'SHAR_EOF' >> 'kterm-4.1.2/input.c' &&
X if (term->flags & EUC_KANJI && keysym>>8 == 4 && keysym & 0x80) {
X strbuf[1] = strbuf[0];
X strbuf[0] = SS2;
X nbytes = 2;
X }
# endif /* KTERM_KANJI */
#else /* !KTERM */
X nbytes = XLookupString ((XKeyEvent *)event, strbuf, STRBUFSIZE,
X &keysym, &compose_status);
#endif /* !KTERM */
X
X string = &strbuf[0];
X reply.a_pintro = 0;
X reply.a_final = 0;
X reply.a_nparam = 0;
X reply.a_inters = 0;
X
X if (IsPFKey(keysym)) {
X reply.a_type = SS3;
X unparseseq(&reply, pty);
X unparseputc((char)(keysym-XK_KP_F1+'P'), pty);
X key = TRUE;
X } else if (IsKeypadKey(keysym)) {
X if (keyboard->flags & KYPD_APL) {
X reply.a_type = SS3;
X unparseseq(&reply, pty);
X unparseputc(kypd_apl[keysym-XK_KP_Space], pty);
X } else
X unparseputc(kypd_num[keysym-XK_KP_Space], pty);
X key = TRUE;
X } else if (IsCursorKey(keysym) &&
X keysym != XK_Prior && keysym != XK_Next) {
X if (keyboard->flags & CURSOR_APL) {
X reply.a_type = SS3;
X unparseseq(&reply, pty);
X unparseputc(cur[keysym-XK_Left], pty);
X } else {
X reply.a_type = CSI;
X reply.a_final = cur[keysym-XK_Left];
X unparseseq(&reply, pty);
X }
X key = TRUE;
X } else if (IsFunctionKey(keysym) || IsMiscFunctionKey(keysym) ||
X keysym == XK_Prior || keysym == XK_Next ||
X keysym == DXK_Remove) {
X reply.a_type = CSI;
X reply.a_nparam = 1;
X if (sunFunctionKeys) {
X reply.a_param[0] = sunfuncvalue (keysym);
X reply.a_final = 'z';
X } else {
X reply.a_param[0] = funcvalue (keysym);
X reply.a_final = '~';
X }
X if (reply.a_param[0] > 0)
X unparseseq(&reply, pty);
X key = TRUE;
X } else if (nbytes > 0) {
X if(screen->TekGIN) {
X TekEnqMouse(*string++);
X TekGINoff();
X nbytes--;
X }
X if ((nbytes == 1) && eightbit) {
X if (screen->eight_bits)
X *string |= 0x80; /* turn on eighth bit */
X else
X unparseputc (033, pty); /* escape */
X }
X while (nbytes-- > 0)
X unparseputc(*string++, pty);
X key = TRUE;
X }
X if(key && !screen->TekEmu)
X AdjustAfterInput(screen);
#ifdef ENABLE_PRINT
X if (keysym == XK_F2) TekPrint();
#endif
X return;
}
X
StringInput (screen, string)
register TScreen *screen;
register char *string;
{
X int pty = screen->respond;
X int nbytes;
X
X nbytes = strlen(string);
X if(nbytes && screen->TekGIN) {
X TekEnqMouse(*string++);
X TekGINoff();
X nbytes--;
X }
X while (nbytes-- > 0)
X unparseputc(*string++, pty);
X if(!screen->TekEmu)
X AdjustAfterInput(screen);
}
X
static int funcvalue (keycode)
X int keycode;
{
X switch (keycode) {
X case XK_F1: return(11);
X case XK_F2: return(12);
X case XK_F3: return(13);
X case XK_F4: return(14);
X case XK_F5: return(15);
X case XK_F6: return(17);
X case XK_F7: return(18);
X case XK_F8: return(19);
X case XK_F9: return(20);
X case XK_F10: return(21);
X case XK_F11: return(23);
X case XK_F12: return(24);
X case XK_F13: return(25);
X case XK_F14: return(26);
X case XK_F15: return(28);
X case XK_Help: return(28);
X case XK_F16: return(29);
X case XK_Menu: return(29);
X case XK_F17: return(31);
X case XK_F18: return(32);
X case XK_F19: return(33);
X case XK_F20: return(34);
X
X case XK_Find : return(1);
X case XK_Insert: return(2);
X case XK_Delete: return(3);
X case DXK_Remove: return(3);
X case XK_Select: return(4);
X case XK_Prior: return(5);
X case XK_Next: return(6);
X default: return(-1);
X }
}
X
X
static int sunfuncvalue (keycode)
X int keycode;
X {
X switch (keycode) {
X case XK_F1: return(224);
X case XK_F2: return(225);
X case XK_F3: return(226);
X case XK_F4: return(227);
X case XK_F5: return(228);
X case XK_F6: return(229);
X case XK_F7: return(230);
X case XK_F8: return(231);
X case XK_F9: return(232);
X case XK_F10: return(233);
X case XK_F11: return(192);
X case XK_F12: return(193);
X case XK_F13: return(194);
X case XK_F14: return(195);
X case XK_F15: return(196);
X case XK_Help: return(196);
X case XK_F16: return(197);
X case XK_Menu: return(197);
X case XK_F17: return(198);
X case XK_F18: return(199);
X case XK_F19: return(200);
X case XK_F20: return(201);
X
X case XK_R1: return(208);
X case XK_R2: return(209);
X case XK_R3: return(210);
X case XK_R4: return(211);
X case XK_R5: return(212);
X case XK_R6: return(213);
X case XK_R7: return(214);
X case XK_R8: return(215);
X case XK_R9: return(216);
X case XK_R10: return(217);
X case XK_R11: return(218);
X case XK_R12: return(219);
X case XK_R13: return(220);
X case XK_R14: return(221);
X case XK_R15: return(222);
X
X case XK_Find : return(1);
X case XK_Insert: return(2);
X case XK_Delete: return(3);
X case DXK_Remove: return(3);
X case XK_Select: return(4);
X case XK_Prior: return(5);
X case XK_Next: return(6);
X default: return(-1);
X }
}
X
SHAR_EOF
echo 'File kterm-4.1.2/input.c is complete' &&
chmod 0664 kterm-4.1.2/input.c ||
echo 'restore of kterm-4.1.2/input.c failed'
Wc_c="`wc -c < 'kterm-4.1.2/input.c'`"
test 7832 -eq "$Wc_c" ||
echo 'kterm-4.1.2/input.c: original size 7832, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= kterm-4.1.2/kconvert.c ==============
if test -f 'kterm-4.1.2/kconvert.c' -a X"$1" != X"-c"; then
echo 'x - skipping kterm-4.1.2/kconvert.c (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting kterm-4.1.2/kconvert.c (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/kconvert.c' &&
/*
X * $Kagotani: /usr/src.yoshi/X/KTerm/4.1.0/RCS/kconvert.c,v 1.1 90/06/27 09:39:06 kagotani Rel $
X *
X * $Header: /usr/local/src/X11/contrib/clients/kterm-4.1.2/RCS/kconvert.c,v 1.3 1991/01/16 07:07:31 mleisher Exp $
X */
X
/*
X * Modified for Hanzi support:
X * Mark Leisher mleisher@nmsu.edu Fri Nov 9 09:22:33 1990
X */
X
/*
X * Copyright (c) 1989 Software Research Associates, Inc.
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted, provided
X * that the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of Software Research Associates not be
X * used in advertising or publicity pertaining to distribution of the
X * software without specific, written prior permission. Software Research
X * Associates makes no representations about the suitability of this software
X * for any purpose. It is provided "as is" without express or implied
X * warranty.
X *
X * Author: Makoto Ishisone, Software Research Associates, Inc., Japan
X * ishisone@sra.co.jp
X */
X
#include <X11/Xos.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xmu/Xmu.h>
#include <stdio.h>
#include <setjmp.h>
#include <ctype.h>
#include <X11/Intrinsic.h>
#include "ptyx.h"
#include "data.h"
X
#ifdef KTERM_KCONV
X
#ifdef KTERM_HANZI
extern int convCStoGB();
extern int convCStoSGB();
extern int convCStoBIG5();
#endif /* KTERM_HANZI */
#ifdef KTERM_HANGUL
extern int convCStoKS();
#endif /* KTERM_HANGUL */
extern void _beginConversion();
extern int convCTtoCS();
extern int convCStoEUC();
extern int convCStoSJIS();
extern int convCStoJIS();
X
#ifdef KTERM_HANZI
static Atom chinese_conversion_atom; /* CHINESE_CONVERSION */
#endif /* KTERM_HANZI */
static Atom japanese_conversion_atom; /* JAPANESE_CONVERSION */
#ifdef KTERM_HANGUL
static Atom korean_conversion_atom; /* KOREAN_CONVERSION */
#endif /* KTERM_HANGUL */
static Atom compound_text_atom; /* COMPOUND_TEXT */
static int atominitialized;
X
/* ARGSUSED */
static void
inputString(w, selection, type, format, size, str, client_data)
Widget w;
Atom selection;
Atom type;
int format;
unsigned long size;
unsigned char *str;
caddr_t client_data;
{
X unsigned char lbuf[256 + 1];
X unsigned char *lstr, *p, *lp;
X int n;
X int (*convfunc)();
X int pty = ((XtermWidget)w)->screen.respond;
X
X if (str == NULL)
X return;
X
X if (type == compound_text_atom && format == 8) {
X Ichr cbuf[256 + 1];
X Ichr *cs;
X n = convCTtoCS(str, size, NULL);
X cs = (n > 256) ? (Ichr *)XtMalloc((n+1) * sizeof(Ichr))
X : cbuf;
X (void)convCTtoCS(str, size, cs);
X if (term->flags & EUC_KANJI)
X convfunc = convCStoEUC;
X else if (term->flags & SJIS_KANJI)
X convfunc = convCStoSJIS;
X else if (term->flags & JIS_KANJI)
X convfunc = convCStoJIS;
#ifdef KTERM_HANZI
X else if (term->flags & GUOBIAO_HANZI)
X convfunc = convCStoGB;
X else if (term->flags & SGB_HANZI)
X convfunc = convCStoSGB;
X else if (term->flags & BIG5_HANZI)
X convfunc = convCStoBIG5;
#endif /* KTERM_HANZI */
#ifdef KTERM_HANGUL
X else if (term->flags & KS_HANGUL)
X convfunc = convCStoKS;
#endif /* KTERM_HANGUL */
X else
X convfunc = convCStoJIS;
X
X n = (*convfunc)(cs, NULL);
X lstr = (n > 256) ? (unsigned char *)XtMalloc(n + 1) : lbuf;
X (void)(*convfunc)(cs, lstr);
X if (cs != cbuf) XtFree(cs);
X } else {
X /* ignore unknown type */
X XtFree(str);
X return;
X }
X
X /*
X * Hack: (since Compound Text can't send carriage return)
X * change each newline into carriage return.
X */
X for (p = lp = lstr; *p; p++) {
X if (*p != '\n' || *p != '\r')
X continue;
X *p = '\r';
X v_write(pty, lp, p - lp + 1);
X lp = p + 1;
X }
X if (lp != p)
X v_write(pty, lp, p - lp);
X
X XtFree(str);
X if (lstr != lbuf) XtFree(lstr);
}
X
/* ARGSUSED */
void
BeginConversion(w, event, params, nparams)
Widget w;
XXEvent *event;
String *params;
Cardinal *nparams;
{
X Atom catom;
X
X if (!atominitialized) {
#ifdef KTERM_HANZI
X chinese_conversion_atom =
X XInternAtom(XtDisplay(w), "CHINESE_CONVERSION", False);
#endif /* KTERM_HANZI */
X japanese_conversion_atom =
X XInternAtom(XtDisplay(w), "JAPANESE_CONVERSION", False);
#ifdef KTERM_HANGUL
X korean_conversion_atom =
X XInternAtom(XtDisplay(w), "KOREAN_CONVERSION", False);
#endif /* KTERM_HANGUL */
X compound_text_atom =
X XInternAtom(XtDisplay(w), "COMPOUND_TEXT", False);
X atominitialized = 1;
X }
X
X if (*nparams != 1) {
#ifdef KTERM_HANZI
X if (term->flags & (GUOBIAO_HANZI|SGB_HANZI|BIG5_HANZI))
X catom = chinese_conversion_atom;
X else
#endif /* KTERM_HANZI */
#ifdef KTERM_HANGUL
X if (term->flags & KS_HANGUL)
X catom = korean_conversion_atom;
X else
#endif /* KTERM_HANGUL */
X catom = japanese_conversion_atom;
X } else {
X XmuInternStrings(XtDisplay(w), params, 1, &catom);
X }
X
X _beginConversion(w, catom, compound_text_atom, inputString, NULL);
}
#endif /* KTERM_KCONV */
SHAR_EOF
chmod 0664 kterm-4.1.2/kconvert.c ||
echo 'restore of kterm-4.1.2/kconvert.c failed'
Wc_c="`wc -c < 'kterm-4.1.2/kconvert.c'`"
test 5187 -eq "$Wc_c" ||
echo 'kterm-4.1.2/kconvert.c: original size 5187, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= kterm-4.1.2/kterm.h ==============
if test -f 'kterm-4.1.2/kterm.h' -a X"$1" != X"-c"; then
echo 'x - skipping kterm-4.1.2/kterm.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting kterm-4.1.2/kterm.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/kterm.h' &&
/*
X * $Kagotani: /usr/src.yoshi/X/KTerm/4.1.0/RCS/kterm.h,v 1.1 90/06/27 09:39:07 kagotani Rel $
X *
X * $Header: /usr/local/src/X11/contrib/clients/kterm-4.1.2/RCS/kterm.h,v 1.4 1991/03/15 09:31:33 mleisher Exp $
X */
X
/*
X * Modified for Hanzi support:
X * Mark Leisher mleisher@nmsu.edu Fri Nov 9 09:22:33 1990
X */
X
/*
X * Copyright 1988, 1989 and 1990 XXI working group in Japan Unix Society(XXI).
X *
X * Permission to use, copy, modify, distribute, and sell this software
X * and its documentation for any purpose is hereby granted without fee,
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 XXI not be used in
X * advertising or publicity pertaining to distribution of the software
X * without specific, written prior permission. XXI makes no representations
X * about the suitability of this software for any purpose.
X * It is provided "as is" without express or implied warranty.
X *
X * XXI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
X * SHALL XXI. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
X * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
X * OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X * PERFORMANCE OF THIS SOFTWARE.
X *
X * Author:
X * Hiroto Kagotani
X * Dept. of Computer Science
X * Tokyo Institute of Technology
X * 2-12-2 Ookayama, Meguro-ku Tokyo 152 Japan
X *
X * kagotani@cs.titech.ac.jp
X *
X */
#ifndef _KTERM_H_
#define _KTERM_H_
X
#ifdef KTERM
# define KTERM_VERSION "4.1.2"
# define KTERM_KANJI /* deal with KANJI/HANZI/HANGUL sequence for the
X child process */
# define KTERM_KCONV /* talk with {ROMAJI,KANA}->KANJI converter
X talk with {PINYIN,5STROKE?}->HANZI converter
X talk with ROMAN->HANGUL converter */
#endif /* KTERM */
X
#if defined(KTERM_KCONV) && !defined(KTERM_KANJI)
# define KTERM_KANJI
#endif
#if defined(KTERM_KANJI) && !defined(KTERM)
# define KTERM
#endif
X
#if defined(KTERM) && defined(KTERM_KANJI)
X
#define KTERM_DEFAULT_LANG "japanese"
#define KTERM_DEFAULT_MODE "euc"
X
#define KTERM_HANZI /* GB 2312 Hanzi support */
#define KTERM_HANGUL /* KS C5601 Hangul support */
X
#endif
X
#define KTERM_CTEXT /* X11 Compound Text support */
X
/* gset field */
#define CS96 0x80
#define MBCS 0x40
#define MBC2 0x7f /* second byte of a mbcs character set */
#define GSET(c) ((c) - '0')
#define TESG(i) (((i) & ~(MBCS|CS96)) + '0')
/* code field */
#define NEEDMAP 0x80
typedef struct {
X unsigned char gset;
X unsigned char code;
} Ichr; /* char for interchanging */
X
#define GSET_GRAPH GSET('0')
#define GSET_UK GSET('A')
#define GSET_ASCII GSET('B')
#define GSET_JISROMAN GSET('J')
#define GSET_KANA GSET('I')
#define GSET_LATIN1R (CS96|GSET('A'))
#ifdef KTERM_CTEXT
#define GSET_LATIN2R (CS96|GSET('B'))
#define GSET_LATIN3R (CS96|GSET('C'))
#define GSET_LATIN4R (CS96|GSET('D'))
#define GSET_LATIN7R (CS96|GSET('F'))
#define GSET_LATIN6R (CS96|GSET('G'))
#define GSET_LATIN8R (CS96|GSET('H'))
#define GSET_LATIN5R (CS96|GSET('L'))
#define GSET_LATIN9R (CS96|GSET('M'))
#endif /* KTERM_CTEXT */
#define GSET_KANJI (MBCS|GSET('B'))
#define GSET_OLDKANJI (MBCS|GSET('@'))
#ifdef KTERM_HANZI
#define GSET_HANZI (MBCS|GSET('A'))
#endif /* KTERM_HANZI */
#ifdef KTERM_HANGUL
#define GSET_HANGUL (MBCS|GSET('C'))
#endif /* KTERM_HANGUL */
#endif /* !_KTERM_H_ */
SHAR_EOF
chmod 0664 kterm-4.1.2/kterm.h ||
echo 'restore of kterm-4.1.2/kterm.h failed'
Wc_c="`wc -c < 'kterm-4.1.2/kterm.h'`"
test 3627 -eq "$Wc_c" ||
echo 'kterm-4.1.2/kterm.h: original size 3627, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= kterm-4.1.2/kterm.jman ==============
if test -f 'kterm-4.1.2/kterm.jman' -a X"$1" != X"-c"; then
echo 'x - skipping kterm-4.1.2/kterm.jman (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting kterm-4.1.2/kterm.jman (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/kterm.jman' &&
.TH KTERM 1 "11 June 1989" "X Version 11"
.SH NAME
kterm \- X $B$N4A;zC<Kv%(%_%e%l!<%?(B
.SH SYNOPSIS
.B kterm
[-\fItoolkitoption\fP ...] [-option ...]
.SH DESCRIPTION
\fIkterm\fP $B$O(B X $B%&%#%s%I%&%7%9%F%`MQ$NF|K\8l!"Cf9q8l!"$^$?$O4Z9q8lC<Kv$N(B
X$B%(%_%e%l!<%?$G!"%&%#%s%I%&%7%9%F%`$rD>@\MxMQ$G$-$J$$%W%m%0%i%`$N$?$a$K!"(B
DEC VT102 $B$H(B Tektronix 4014 $B$K%3%s%Q%A%V%k$JC<Kv$NB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(B JISX0208 $B$N%U%)%s%H$r;XDj$7$^$9!#(B
X$B$3$N%U%)%s%H$N(B height $B$O(B ISO8859/1 $B$N$HF1$8$/!"(B
width $B$O(B ISO8859/1 $B$N(B width $B$NFsG\$G$J$1$l$P$J$j$^$;$s!#(B
X$B;XDj$5$l$F$$$J$$;~$O!"(B\fIfontlist\fP $B$NCf$+$iC5$7$^$9!#(B
.TP 8
.BI \-fhg " hangul-font"
X$B4Z9q8l$N%F%-%9%H$rI=<($9$k;~$KMQ$$$k!"(B
X$BDL>o$N(B KS C5601 $B$N%U%)%s%H$r;XDj$7$^$9!#(B
X$B$3$N%U%)%s%H$N(B height $B$O(B ISO8859/1 $B$N$HF1$8$/!"(B
width $B$O(B ISO8859/1 $B$N(B width $B$NFsG\$G$J$1$l$P$J$j$^$;$s!#(B
X$B;XDj$5$l$F$$$J$$;~$O!"(B\fIfontlist\fP $B$NCf$+$iC5$7$^$9!#(B
.TP 8
.BI \-fhz " hanzi-font"
X$BCf9q8l$N%F%-%9%H$rI=<($9$k;~$KMQ$$$k!"(B
X$BDL>o$N(B GB 2312 $B$+(B Big5 $B$N%U%)%s%H$r;XDj$7$^$9!#(B
X$B$3$N%U%)%s%H$N(B height $B$O(B ISO8859/1 $B$N$HF1$8$/!"(B
width $B$O(B ISO8859/1 $B$N(B width $B$NFsG\$G$J$1$l$P$J$j$^$;$s!#(B
X$B;XDj$5$l$F$$$J$$;~$O!"(B\fIfontlist\fP $B$NCf$+$iC5$7$^$9!#(B
.TP 8
.BI \-flb " bold-fontlist"
.BI \-fb " bold-font"
.BI \-frb " roman-kana-bold-font"
.BI \-fkb " kanji-bold-font"
.BI \-fhg " hangul-bold-font"
.BI \-fhz " hanzi-bold-font"
X$B%\!<%k%I%U%)%s%H$r;XDj$7$^$9!#(B
.TP 8
.BI \-lsp " dots"
X$B4A;z%U%)%s%H$O%5%$%:$,Bg$-$$$?$a!"$9$Y$F$N%f!<%6$,<+J,$NL\$K$d$5$7$$(B
X$B%U%)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O(B Big5 $B%3!<%I$G$"$k$H2>Dj$7$^$9!#(B
``shift-guobiao'' $B$N>l9g!"F~=PNO$O(B Shift-GuoBiao $B%3!<%I$G$"$k$H2>Dj$7$^$9!#(B
.TP 8
.BI \-hgm " hangul-mode"
pty $B$+$i$N=PNO$N%3!<%I$r;XDj$7$^$9!#(B
X$B%b!<%I$,(B ``ks-8bit'' $B$N>l9g!"F~=PNO$O(B KS C5601-1987 $B%3!<%I$G$"$k$H2>Dj$7$^$9!#(B
``n-byte'' $B$N>l9g!"F~=PNO$O(B N-byte $B=g=x$G$"$k$H2>Dj$7$^$9!#(B
.TP 8
.B \-sn
X$B%G%U%)%k%H$G$O!"%9%F!<%?%9%i%$%s$O(B($B%&%$%s%I%&$NB>$NItJ,$KBP$7$FAjBPE*$K(B)
X$BH?E>$7$^$9!#(B
X$B$3$N%*%W%7%g%s$O%9%F!<%?%9%i%$%s$rH?E>$7$J$/$7$^$9(B($B$7$+$7!"H"$G0O$^$l$^$9(B)$B!#(B
.TP 8
.B \-st
X$B%9%F!<%?%9%i%$%s$,%9%?!<%H;~$KI=<($5$l$k$h$&$K$7$^$9!#(B
.SH "X DEFAULTS"
X$B$3$N%W%m%0%i%`$O!"%3%"$K$"$k(B \fIxterm\fP $B$N$9$Y$F$N%j%=!<%9L>$H%/%i%9$HF1$8$/(B
X$B0J2<$N$b$N$b2r<a$7$^$9!#(B
.TP 8
.B "fontList (\fPclass\fB FontList)"
X$B%U%)%s%HL>$N%j%9%H$r;XDj$7$^$9!#(B
X$B%G%U%)%k%H$O(B ``-*-fixed-medium-r-normal--14-*'' $B$G$9!#(B
.TP 8
.B "boldFontList (\fPclass\fB FontList)"
X$B%\!<%k%I%U%)%s%HL>$N%j%9%H$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "font (\fPclass\fB Font)"
Latin-1 $B$N%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "boldFont (\fPclass\fB Font)"
Latin-1 $B$N%\!<%k%I%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "romanKanaFont (\fPclass\fB RomanKanaFont)"
JIS-Roman $B$HJR2>L>$N%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "romanKanaBoldFont (\fPclass\fB RomanKanaFont)"
JIS-Roman $B$HJR2>L>$N%\!<%k%I%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "kanjiFont (\fPclass\fB KanjiFont)"
X$BF|K\8l$N%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "hanziFont (\fPclass\fB HanziFont)"
X$BCf9q8l$N%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "hangulFont (\fPclass\fB HangulFont)"
X$B4Z9q8l$N%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "kanjiBoldFont (\fPclass\fB KanjiFont)"
.B "hanziBoldFont (\fPclass\fB HanziFont)"
.B "hangulBoldFont (\fPclass\fB HangulFont)"
X$B%\!<%k%I%U%)%s%HL>$r;XDj$7$^$9!#%G%U%)%k%H$G$O;XDj$7$^$;$s!#(B
.TP 8
.B "kanjiMode (\fPclass\fB KanjiMode)"
pty $B$N=PNO$N%3!<%I$r;XDj$7$^$9!#%G%U%)%k%H$O(B ``jis'' $B$G$9!#(B
.TP 8
.B "hangulMode (\fPclass\fB HangulMode)"
pty $B$N=PNO$N%3!<%I$r;XDj$7$^$9!#%G%U%)%k%H$O(B ``ks-8bit'' $B$G$9!#(B
.TP 8
.B "hangulNtoKSTable (\fPclass\fB HangulNtoKSTable)"
N-byte $B$+$i(B KS code $B$K$NJ8;z%^%C%T%s%0$r7hDj$9$k%F!<%V%k$N%Q%9L>$r;XDj$7$^$9!#(B
X$B%G%#%U%)%k%H$O!"%"%W%j%1!<%7%g%s%G%#%U%)%k%H%U%!%$%k$K;XDj$5$l$^$9!#(B
.TP 8
.B "hanziMode (\fPclass\fB HanziMode)"
pty $B$N=PNO$N%3!<%I$r;XDj$7$^$9!#%G%U%)%k%H$O(B ``guobiao'' $B$G$9!#(B
.TP 8
.B "hanziGbToBigTable (\fPclass\fB HanziGbToBigTable)"
GuoBiao $B$+$i(B Big5 $B$K$NJ8;z%^%C%T%s%0$r7hDj$9$k%F!<%V%k$N%Q%9L>$r;XDj$7$^$9!#(B
X$B%G%#%U%)%k%H$O!"%"%W%j%1!<%7%g%s%G%#%U%)%k%H%U%!%$%k$K;XDj$5$l$^$9!#(B
.TP 8
.B "hanziBigToGbTable (\fPclass\fB HanziBigToGbTable)"
Big5 $B$+$i(B GuoBiao $B$K$NJ8;z%^%C%T%s%0$r7hDj$9$k%F!<%V%k$N%Q%9L>$r;XDj$7$^$9!#(B
X$B%G%#%U%)%k%H$O!"%"%W%j%1!<%7%g%s%G%#%U%)%k%H%U%!%$%k$K;XDj$5$l$^$9!#(B
.TP 8
.B "language" (\fPclass\fB Language)"
X$BI=<($9$k%F%-%9%H$N(B``language''$B$r;XDj$9$k!#(B
``chinese''$B!"(B``japanese'' $B!"$*$h$S(B ``korean'' $B$OBEEv$G$9!#(B
X$B%G%#%U%)%k%H$O(B``japanese''$B$G$9!#(B
.TP 8
.B "color0 (\fPclass\fB Color0)"
ANSI $B$NH,?'$N(B 0 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``Black'' $B$G$9!#(B
.TP 8
.B "color1 (\fPclass\fB Color1)"
ANSI $B$NH,?'$N(B 1 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``Blue'' $B$G$9!#(B
.TP 8
.B "color2 (\fPclass\fB Color2)"
ANSI $B$NH,?'$N(B 2 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``Red'' $B$G$9!#(B
.TP 8
.B "color3 (\fPclass\fB Color3)"
ANSI $B$NH,?'$N(B 3 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``Magenta'' $B$G$9!#(B
.TP 8
.B "color4 (\fPclass\fB Color4)"
ANSI $B$NH,?'$N(B 4 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``Green'' $B$G$9!#(B
.TP 8
.B "color5 (\fPclass\fB Color5)"
ANSI $B$NH,?'$N(B 5 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``Cyan'' $B$G$9!#(B
.TP 8
.B "color6 (\fPclass\fB Color6)"
ANSI $B$NH,?'$N(B 6 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``Yellow'' $B$G$9!#(B
.TP 8
.B "color7 (\fPclass\fB Color7)"
ANSI $B$NH,?'$N(B 7 $BHV$r;XDj$9$k!#%G%#%U%)%k%H$G$O(B ``White'' $B$G$9!#(B
.TP 8
.B "lineSpace (\fPclass\fB LineSpace)"
X$B3F9T$N4V$KA^F~$9$k%9%Z!<%9NL$r;XDj$7$^$9!#%G%U%)%k%H$O(B ``0'' $B$G$9!#(B
.TP 8
.B "keepAlive (\fPclass\fB KeepAlive)"
\fIkterm\fP $B$,(B X $B%5!<%P$H$N%=%1%C%H@\B3$K(B
KEEPALIVE $B%*%W%7%g%s$rMQ$$$k$+$I$&$+;XDj$7$^$9!#(B
X$B%G%U%)%k%H$O(B ``false'' $B$G$9!#(B
.TP 8
.B "statusLine (\fPclass\fB StatusLine)"
X$B%9%F!<%?%9%i%$%s$r%9%?!<%H;~$KI=<($7$^$9!#%G%U%)%k%H$O(B ``false'' $B$G$9!#(B
.TP 8
.B "statusNormal (\fPclass\fB StatusNormal)"
X$B%9%F!<%?%9%i%$%s$,H?E>$7$J$$$3$H$r;XDj$7$^$9!#%G%U%)%k%H$O(B ``false'' $B$G$9!#(B
.SH EMULATIONS
VT102 $B$N%(%_%e%l!<%H$O$[$H$s$I40A4$G$9$,!"(B
X$BJ8;z$N%V%j%s%/B0@-$HJ8;z$N3HBg$O%5%]!<%H$7$F$$$^$;$s!#(B
.I kterm
X$B$,MQ$$$k(B
.IR termcap (5)
X$B$N%(%s%H%j$K$O(B
``kterm'', ``xterm'', ``vt102'', ``vt100'' $B$*$h$S(B ``ansi'' $B$,$"$j!"(B
.I kterm
X$B$O<+F0E*$K$3$N=g$G(B termcap $B%U%!%$%k$rC5$7!"(B
``TERM'' $B$H(B ``TERMCAP'' $B$N4D6-JQ?t$r%;%C%H$7$^$9!#(B
.SH "KANJI INPUT"
X$BF|K\8l$N4A;zJ8;zNs$O(B \fIkinput\fP $B%3%^%s%I(B($B$3$l$O4A;zJQ49%5!<%P$NLr3d$r$9$k(B)
X$B$rMQ$$$FF~NO$9$k$3$H$,$G$-$^$9!#(B
X$B%G%U%)%k%H$G$O!"(Bcontrol-Kanji $B%-!<$r2!$9$HJQ49$,;O$^$j$^$9!#(B
X$B$=$NA0$KJQ49%5!<%P$rAv$i$;$J$$$H!"(B
`Conversion Server not found' $B$H$$$&7Y9p%a%C%;!<%8$,8=$l$^$9!#(B
translation $B%F!<%V%k$rJQ99$9$k$3$H$G!"(B
X$B$3$NF0:n$r$9$k%-!<$r:F3dEv$9$k$3$H$,2DG=$G$9!#(B
X$B%G%U%)%k%H$NJQ493+;O$N3dEv$O<!$N$h$&$K$J$j$^$9!#(B
.nf
.sp
X Ctrl<Key>Kanji: begin-conversion(JAPANESE_CONVERSION)
.sp
.fi
X$BCf9q8l$NJQ49%5!<%P$,$"$l$P!"<!$N$h$&$K$J$j$^$9!#(B
.nf
.sp
X Ctrl<Key>Space: begin-conversion(CHINESE_CONVERSION)
.sp
.fi
X$B4Z9q8l$NJQ49%5!<%P$,$"$l$P!"<!$N$h$&$K$J$j$^$9!#(B
.nf
.sp
X Ctrl<Key>Space: begin-conversion(KOREAN_CONVERSION)
.sp
.fi
X$B$5$i$K>\$7$$>pJs(B($B%F%-%9%H$NF~NO(B/$BJQ49(B/$B=$@5$J$I(B)$B$O(B
X$BJQ49%5!<%P$N%I%-%e%a%s%H$r8+$F2<$5$$!#(B
.SH "SEE ALSO"
xterm(1), resize(1), X(1), kinput(1), pty(4), tty(4)
.br
.I ``Xterm Control Sequences''
.SH BUGS
\fIkterm\fP $B$O4A;zEy$NJ8;z$,(B ASCII $BJ8;z$NFsG\$NI}$r;}$C$F$$$k$b$N$H2>Dj$7$^$9!#(B
X$BITDjI}$N%U%)%s%H$O(B \fIxterm\fP $BF1MM07$&$3$H$,$G$-$^$;$s!#(B
.PP
X$BK\%P!<%8%g%s$G$O(B
JIS $B%b!<%I$G%Z!<%9%H$9$k;~(B ``ESC $ B'' $B$r4A;zJ8;z%;%C%H$N3dEv$KMQ$$$F!"(B
GuoBiao $B%b!<%I$G%Z!<%9%H$9$k;~(B ``ESC $ A'' $B$r4A;zJ8;z%;%C%H$N3dEv$KMQ$$$F!"(B
KS $B%b!<%I$G%Z!<%9%H$9$k;~(B ``ESC $ C'' $B$r4A;zJ8;z%;%C%H$N3dEv$KMQ$$$^$9!#(B
Compound Text $B=g=x(B ``ESC ( $ {A,B,C}'' $B$bG'$a$^$9!#(B
.sp
X$BK\%P!<%8%g%s$G$O(B selection $B$N%?%V$d2~9T$r29B8$7$^$9!#(B
X$B2~9T$O!"A*Br$5$l$?%F%-%9%H$N$7$+F~$j$^$;$s!#(B
Wrap $B$5$l$k9T$K$O2~9T$,F~$j$^$;$s!#(B
.sp
X$BK\%P!<%8%g%s$G$O!"%^%k%A%P%$%HJ8;z=89g$O$b$A$m$s(B Latin $BJ8;z=89g$b%5%]!<%H(B
X$B$7$^$9!#(B
.SH COPYRIGHT
Copyright 1988, 1989 and 1990, $BF|K\(B UNIX $B%f!<%62q(B XXI $B%o!<%-%s%0%0%k!<%W(B
.br
X$B8"Mx$H5v2D$NA4J8$O(B \fIX(1)\fP $B$r$4$i$s2<$5$$!#(B
.SH AUTHORS
X$B0J2<$r4^$`B?$/$N?M!9(B:
.sp
X$B:4Ln>!Li(B ($B3t<02q<REl<G(B),
X$BF~9>1QIW(B ($B%=%K!<3t<02q<R(B),
X$B2CF#O/(B ($B7DXf5A=NBg3X(B),
X$BM-:BF;=U(B ($B3t<02q<R(B SRA),
X$B@PA>:,?.(B ($B3t<02q<R(B SRA),
X$BdFC+M5?M(B ($BEl5~9)6HBg3X(B)
.sp
X$BCf9q8l$N%5%]!<%H$O(B 1990 $BG/$N(B 10-11$B7n!"4Z9q8l$N%5%]!<%H$O(B 1991 $BG/$N(B 1-3$B7n!"(B
Mark Leisher mleisher@nmsu.edu $B$,2C$($^$7$?!#(B
.sp
X$B%P%0%l%]!<%H$O(B kterm $B$N%P!<%8%g%s$r$=$($F!"F|K\8l$K4X$9$k%P%0$O(B
kagotani@cs.titech.ac.jp $B$^$G!"Cf9q8l!"$^$?$O4Z9q8l$K4X$9$k%P%0$O(B
mleisher@nmsu.edu $B$^$G$*Aw$j2<$5$$!#(B
SHAR_EOF
chmod 0664 kterm-4.1.2/kterm.jman ||
echo 'restore of kterm-4.1.2/kterm.jman failed'
Wc_c="`wc -c < 'kterm-4.1.2/kterm.jman'`"
test 13070 -eq "$Wc_c" ||
echo 'kterm-4.1.2/kterm.jman: original size 13070, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= kterm-4.1.2/kterm.man ==============
if test -f 'kterm-4.1.2/kterm.man' -a X"$1" != X"-c"; then
echo 'x - skipping kterm-4.1.2/kterm.man (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting kterm-4.1.2/kterm.man (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/kterm.man' &&
.TH KTERM 1 "4 May 1991" "X Version 11"
.SH NAME
kterm \- Kanji, Hangul, or Hanzi terminal emulator for X
.SH SYNOPSIS
.B kterm
[-\fItoolkitoption\fP ...] [-option ...]
.SH DESCRIPTION
The \fIkterm\fP program is a Kanji, Hangul, or Hanzi terminal emulator
for the X Window System. It provides DEC VT102 and Tektronix 4014
compatible terminals for programs that can't use the window system
directly. It comes from \fIxterm\fP in the core programs of the
distribution of the X Window System. The most of the functions are
the same as original \fIxterm\fP's, however, it has capabilities of
displaying Kanji, Hangul, or Hanzi strings and input of Kanji strings
with the \fIkinput\fP program if compiled with -DKTERM compile time
option. Currently there are no programs that allow input of Hangul or
Hanzi strings, but if a program is written, it should conform to the
specifications set out in the \fBX11 Input Conversion\fP protocol.
Also \fIkterm\fP supports handling of the status line if compiled with
-DSTATUSLINE option.
.PP
.SH OPTIONS
The \fIkterm\fP terminal emulator accepts all of the standard
\fIxterm\fP command line options along with the additional options
listed below (if the option begins with a
.RB ` + '
instead of a
.RB ` \- ',
the option is restored to its default value):
.TP 8
.BI \-version
Just displays the \fIkterm\fP version.
.TP 8
.BI \-fl " fontlist"
This option specifies fonts to be used. \fIfontlist\fP is a argument
expressed by XLFD compliant font name with arbitrary wild-card
characters. \fIkterm\fP uses three fonts whose names have
"-iso8859-1", "-jisx0201.1976-0" and "-jisx0208.1983-0" as their tail
if Kanji is being displayed, or two fonts whose names have
"-iso8859-1" and "-gb2312.1980-0" as their tail if Hanzi is being
displayed, or "-iso8859-1" and "-ksc5601.1987-0" if Hangul is being
displayed.
.TP 8
.BI \-fn " iso8859/1-font"
This option specifies a normal ISO8859/1 font to be used when
displaying Latin-1 (including ASCII) text. If it is not specified,
search \fIfontlist\fP for it.
.TP 8
.BI \-fr " roman-kana-font"
This option specifies a normal JIS X0201 font. This font is used as
JIS-Roman font if ``ESC ( J'' appears, and used as Kana font if ``ESC
( I'' appears in JIS Kanji mode, SS2 (0x8e) appears in EUC Kanji mode,
though Kana is not used so frequntly in normal Japanese text. This
font must have same height and width as the ISO8859/1 font. If it is
not specified, search \fIfontlist\fP for it.
.TP 8
.BI \-fk " kanji-font"
This option specifies a normal JIS X0208 font to be used when
displaying Kanji text. This font must have same height and twice
width as the ISO8859/1 font. If it is not specified, search
\fIfontlist\fP for it.
.TP 8
.BI \-fhg " hangul-font"
This option specifies a normal KS C5601 font to be used when
displaying Hangul text. This font must have same height and twice
width as the ISO8859/1 font. If it is not specified, search
\fIfontlist\fP for it.
.TP 8
.BI \-fhz " hanzi-font"
This option specifies a normal GB 2312 or Big5 font to be used when
displaying Hanzi text. This font must have same height and twice
width as the ISO8859/1 font. If it is not specified, search
\fIfontlist\fP for it.
.TP
.BI \-flb " bold-fontlist"
.TP
.BI \-fb " bold-font"
.TP
.BI \-frb " roman-kana-bold-font"
.TP
.BI \-fkb " kanji-bold-font"
.TP 8
.BI \-fhzb " hanzi-bold-font"
.TP 8
.BI \-fhgb " hangul-bold-font"
These options specify bold fonts.
.TP 8
.BI \-lsp " dots"
Because of large sizes of the Kanji fonts, every user may not be
allowed to have his own eye-friendly fonts. This option specifies how
much space to insert between every two lines.
.TP 8
.BI \-ka
This option indicates that \fIkterm\fP should connect to the X server
with KEEPALIVE socket option. It is usefull when the server is a X
terminal that is frequently powered off. This option is accepted only
if \fIkterm\fP has been compiled with -DKEEPALIVE compile option.
.TP 8
.BI \+ka
This option indicates that \fIkterm\fP should connect to the X server
without KEEPALIVE socket option.
.TP 8
.BI \-lang " language"
This option sets the language of the text being displayed.
.br
If language is ``chinese'', then the Hanzi fonts and encoding
functions are used for displaying text.
.br
If language is ``japanese'', then the Kanji fonts and encoding
functions are used for displaying text.
.br
If language is ``korean'', then the Hangul fonts and encoding
functions are used for displaying text.
.TP 8
.BI \-km " kanji-mode"
This option specifies the Kanji code from the pty output.
.br
If kanji-mode is ``euc'', then it assumes the input/output is coded by EUC.
.br
If kanji-mode is ``sjis'', then it assumes the input/output is coded by
Shift-JIS code (which is the same as MicroSoft Kanji code).
.br
If kanji-mode is ``jis'', then it assumes the input/output is coded by
JIS.
.TP 8
.BI \-hzm " hanzi-mode"
This option specifies the Hanzi code from the pty output.
.br
If hanzi-mode is ``guobiao'', then it assumes the input/output is
coded by GuoBiao.
.br
If hanzi-mode is ``big5'', then it assumes the input/output is coded by
Big5.
.br
If hanzi-mode is ``shift-guobiao'', then it assumes the input/output
is coded by Shift-GuoBiao.
.TP 8
.BI \-hgm " hangul-mode"
This option specifies the Hangul code from the pty output.
.br
If hangul-mode is ``ks-8bit'', then it assumes that input/output is
coded by two-byte KS C5601-1987 code.
.br
If hangul-mode is ``n-byte'', then it assumes that input/output is
coded by N-byte sequences.
.TP 8
.B \-sn
By default, the status line is in reverse-video (relative to the rest
of the window). This option causes the status line to be in normal
video (the status line is still enclosed in a box).
.TP 8
.B \-st
This option causes the status line to be displayed on startup.
.SH "X DEFAULTS"
The program understands all of the core \fIxterm\fP resource names and
classes as well as:
.TP 8
.B "fontList (\fPclass\fB FontList)"
Specifies the name of the fonts.
The default is ``-*-fixed-medium-r-normal--14-*''.
.TP 8
.B "boldFontList (\fPclass\fB FontList)"
Specifies the name of the bold fonts.
The default is not specified
.TP 8
.B "font (\fPclass\fB Font)"
Specifies the name of the Latin-1 font. The default is not specified.
.TP 8
.B "boldFont (\fPclass\fB Font)"
Specifies the name of the bold Latin-1 font. The default is not specified.
.TP 8
.B "romanKanaFont (\fPclass\fB RomanKanaFont)"
Specifies the name of the Roman-Kana font. The default is not specified.
.TP 8
.B "romanKanaBoldFont (\fPclass\fB RomanKanaFont)"
Specifies the name of the bold font. The default is not specified.
.TP 8
.B "kanjiFont (\fPclass\fB KanjiFont)"
Specifies the name of the Kanji font. The default is not specified.
.TP 8
.B "hanziFont (\fPclass\fB HanziFont)"
Specifies the name of the Hanzi font. The default is not specified.
.TP 8
.B "hangulFont (\fPclass\fB HangulFont)"
Specifies the name of the Hangul font. The default is not specified.
.TP 8
.B "kanjiBoldFont (\fPclass\fB KanjiFont)"
Specifies the name of the bold Kanji font. The default is not specified.
.TP 8
.B "hanziBoldFont (\fPclass\fB HanziFont)"
Specifies the name of the bold Hanzi font. The default is not specified.
.TP 8
.B "hangulBoldFont (\fPclass\fB HangulFont)"
Specifies the name of the bold Hangul font. The default is not specified.
.TP 8
.B "kanjiMode (\fPclass\fB KanjiMode)"
Specifies the Kanji code of pty output. The default is ``jis''.
.TP 8
.B "hangulMode (\fPclass\fB HangulMode)"
Specifies the Hangul code of pty output. The default is ``ks-8bit''.
.TP 8
.B "hangulNtoKSTable (\fPclass\fB HangulNtoKSTable)"
Specifies the full path name of the table describing the N-byte to
KS code mapping table. Default is set in the application defaults file.
.TP 8
.B "hanziMode (\fPclass\fB HanziMode)"
Specifies the Hanzi code of pty output. The default is ``guobiao''.
.TP 8
.B "hanziGbToBigTable (\fPclass\fB HanziGbToBigTable)"
Specifies the full path name of the table describing the GuoBiao to
Big5 character mapping. Default is set in the application defaults file.
.TP 8
.B "hanziBigToGbTable (\fPclass\fB HanziBigToGbTable)"
Specifies the full path name of the table describing the Big5 to
GuoBiao character mapping. Default is set in the application defaults file.
.TP 8
.B "language" (\fPclass\fB Language)"
Specifies which language the text to be displayed will be in.
The valid languages are ``chinese'', ``japanese'', and ``korean''.
The default is ``japanese''.
.TP 8
.B "color0 (\fPclass\fB Color0)"
Specifies color 0 of the 8 ANSI colors. The default is ``Black''.
.TP 8
.B "color1 (\fPclass\fB Color1)"
Specifies color 1 of the 8 ANSI colors. The default is ``Blue''.
.TP 8
.B "color2 (\fPclass\fB Color2)"
Specifies color 2 of the 8 ANSI colors. The default is ``Red''.
.TP 8
.B "color3 (\fPclass\fB Color3)"
Specifies color 3 of the 8 ANSI colors. The default is ``Magenta''.
.TP 8
.B "color4 (\fPclass\fB Color4)"
Specifies color 4 of the 8 ANSI colors. The default is ``Green''.
.TP 8
.B "color5 (\fPclass\fB Color5)"
Specifies color 5 of the 8 ANSI colors. The default is ``Cyan''.
.TP 8
.B "color0 (\fPclass\fB Color6)"
Specifies color 6 of the 8 ANSI colors. The default is ``Yellow''.
.TP 8
.B "color7 (\fPclass\fB Color7)"
Specifies color 7 of the 8 ANSI colors. The default is ``White''.
.TP 8
.B "lineSpace (\fPclass\fB LineSpace)"
Specifies the space to insert between every two lines.
The default is ``0''.
.TP 8
.B "keepAlive (\fPclass\fB KeepAlive)"
Specifies whether or not \fIkterm\fP should connection to the X server
with KEEPALIVE socket option. The default is ``false.''
.TP 8
.B "statusLine (\fPclass\fB StatusLine)"
Causes the status line to be displayed on startup. The default is ``false.''
.TP 8
.B "statusNormal (\fPclass\fB StatusNormal)"
Specifies whether or not the status line should be in normal video.
The default is ``false.''
.SH EMULATIONS
The VT102 emulation is fairly complete, but does not support the blinking
character attribute nor the double-wide and double-size character sets.
.IR Termcap (5)
entries that work with
.I kterm
include ``kterm'', ``xterm'', ``vt102'', ``vt100'' and ``ansi'', and
.I kterm
automatically searches the termcap file in this order for these
entries and then sets the ``TERM'' and the ``TERMCAP'' environment
variables.
.SH "KANJI INPUT"
Kanji strings can be input with \fIkinput\fP command, which acts as a
Kanji conversion server. By default, pressing control-Kanji key
starts Kanji conversion. You must run conversion server before this,
or you will see `Conversion Server not found' warning message. It is
possible to rebind other keys to this action by changing the
translation table.
The default binding to begin conversion is:
.nf
.sp
X Ctrl<Key>Kanji: begin-conversion(JAPANESE_CONVERSION)
.sp
.fi
If a program to do Chinese conversions is available, the binding to begin
conversion would be something like:
.nf
.sp
X Ctrl<Key>Space: begin-conversion(CHINESE_CONVERSION)
.sp
.fi
If a program to do Korean conversions is available, the binding to begin
conversion would be something like:
.nf
.sp
X Ctrl<Key>Space: begin-conversion(KOREAN_CONVERSION)
.sp
.fi
For further information (how to input/convert/correct text, etc.),
see the conversion server's document.
.SH "SEE ALSO"
xterm(1), resize(1), X(1), kinput(1), pty(4), tty(4)
.br
.I ``Xterm Control Sequences''
.SH BUGS
\fIKterm\fP assumes that the width of Kanji, Hanzi, and Hangul
characters are twice as large as that of ASCII characters. Of course
variable-width fonts are not handled by \fIkterm\fP.
.SH "COMPOUND TEXT AND OTHER ESCAPE SEQUENCES"
This version of
.I kterm
can recognize ``ESC $ B'' designating the Kanji character set in tty
output when JIS mode is selected, ``ESC $ A'' designating the Hanzi
character set in tty output when GuoBiao mode is selected, and ``ESC $
C'' designating the Hangul character set in tty output when KS mode is
selected. The Compound Text sequences of ``ESC ( $ {A,B,C}'' are also
reconized.
.SH "TAB AND NEWLINE PRESERVATION"
This version of kterm now preserves tabs and new lines in selections.
New lines will only be used in selections where they appear in the
original text. Lines that wrap at the edge of the kterm screen no
longer have new lines inserted where the line is broken.
.SH "MBCS WORD SELECTION"
This version of kterm supports simple word selection for multi-byte
character sets as well as Latin character sets.
.SH COPYRIGHT
Copyright 1988, 1989 and 1990, XXI working group in Japan Unix Society Japan.
.br
See \fIX(1)\fP for a full statement of rights and permissions.
.SH AUTHORS
Far too many people, including:
.sp
Katsuya Sano (Toshiba Corp.),
Michael Irie (Sony Corp.),
Akira Kato (Keio Univ.),
Michiharu Ariza (Software Research Associates, Inc.),
Makoto Ishisone (Software Research Associates, Inc.),
Hiroto Kagotani (Tokyo Inst. of Tech.)
.sp
Modified for Chinese support by Mark Leisher mleisher@nmsu.edu
October/November 1990 and Korean support January/March 1991.
.sp
Send Kanji usage bugs to kagotani@cs.titech.ac.jp with the kterm
version, please.
.sp
Send Hangul and Hanzi usage bugs to mleisher@nmsu.edu with the kterm
version, please.
SHAR_EOF
chmod 0664 kterm-4.1.2/kterm.man ||
echo 'restore of kterm-4.1.2/kterm.man failed'
Wc_c="`wc -c < 'kterm-4.1.2/kterm.man'`"
test 13156 -eq "$Wc_c" ||
echo 'kterm-4.1.2/kterm.man: original size 13156, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= kterm-4.1.2/main.c ==============
if test -f 'kterm-4.1.2/main.c' -a X"$1" != X"-c"; then
echo 'x - skipping kterm-4.1.2/main.c (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting kterm-4.1.2/main.c (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.2/main.c' &&
#ifndef lint
static char rcs_id[] = "$XConsortium: main.c,v 1.145 90/01/11 14:22:31 jim Exp $";
static char kterm_id[] = "$Kagotani: /usr/src.yoshi/X/KTerm/4.1.0/RCS/main.c,v 1.1 90/06/27 09:39:15 kagotani Rel $";
static char nmsu_crl_rcs_id[] =
X "$Header: /usr/local/src/X11/contrib/clients/kterm-4.1.2/RCS/main.c,v 1.6 1991/03/18 00:00:47 mleisher Exp $";
#endif /* lint */
X
/*
X * Modified for Hanzi support:
X * Mark Leisher mleisher@nmsu.edu Fri Nov 9 09:22:33 1990
X */
X
/*
X * W A R N I N G
X *
X * If you think you know what all of this code is doing, you are probably
X * very mistaken. There be serious and nasty dragons here.
X *
X * This client is *not* to be taken as an example of how to write X Toolkit
X * applications. It is in need of a substantial rewrite, ideally to create
X * a generic tty widget with several different parsing widgets so that you
X * can plug 'em together any way you want. Don't hold your breath, though....
X */
X
#include <X11/copyright.h>
X
/***********************************************************
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
X
X All Rights Reserved
X
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
X
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
X
******************************************************************/
X
X
/* main.c */
X
#include <X11/Xos.h>
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#include <pwd.h>
#include <ctype.h>
#include "patchlevel.h"
X
#ifdef att
#define USE_USG_PTYS
#endif
X
#ifndef att
#define USE_HANDSHAKE
#endif
X
#include <sys/ioctl.h>
X
#ifdef SYSV
#include <sys/termio.h>
#ifdef USE_USG_PTYS /* AT&T SYSV has no ptyio.h */
#include <sys/stream.h> /* get typedef used in ptem.h */
#include <sys/ptem.h> /* get struct winsize */
#include <sys/stropts.h> /* for I_PUSH */
#include <poll.h> /* for POLLIN */
#endif
#include <sys/stat.h>
#define USE_SYSV_TERMIO
#define USE_SYSV_SIGNALS
#define USE_SYSV_PGRP
#define USE_SYSV_ENVVARS /* COLUMNS/LINES vs. TERMCAP */
/*
X * now get system-specific includes
X */
#ifdef CRAY
#define HAS_UTMP_UT_HOST
#define HAS_BSD_GROUPS
#endif
#ifdef macII
#define HAS_UTMP_UT_HOST
#define HAS_BSD_GROUPS
#include <sys/ttychars.h>
#undef USE_SYSV_ENVVARS
#undef FIOCLEX
#undef FIONCLEX
#define setpgrp2 setpgrp
#include <sgtty.h>
#include <sys/resource.h>
#endif
#ifdef hpux
#define HAS_BSD_GROUPS
#include <sys/ptyio.h>
#endif
#endif /* SYSV */
X
#ifndef SYSV /* BSD systems */
#include <sgtty.h>
#include <sys/resource.h>
#define HAS_UTMP_UT_HOST
#define HAS_BSD_GROUPS
#endif /* !SYSV */
X
#include <stdio.h>
#include <errno.h>
#include <setjmp.h>
X
#ifdef hpux
#include <sys/utsname.h>
#endif /* hpux */
X
#ifdef apollo
#define ttyslot() 1
#endif /* apollo */
X
#include <utmp.h>
#ifdef LASTLOG
#include <lastlog.h>
#endif
#include <sys/param.h> /* for NOFILE */
X
#ifdef PUCC_PTYD
#include <local/openpty.h>
int Ptyfd;
#endif /* PUCC_PTYD */
X
#ifndef UTMP_FILENAME
#define UTMP_FILENAME "/etc/utmp"
#endif
#ifndef LASTLOG_FILENAME
#define LASTLOG_FILENAME "/usr/adm/lastlog" /* only on BSD systems */
#endif
#ifndef WTMP_FILENAME
#if defined(SYSV)
#define WTMP_FILENAME "/etc/wtmp"
#else
#define WTMP_FILENAME "/usr/adm/wtmp"
#endif
#endif
X
#include "ptyx.h"
#include "data.h"
#include "error.h"
#include "main.h"
#include "menu.h"
X
#ifdef KTERM_HANZI
#include "hzutil.h"
#endif /* KTERM_HANZI */
X
#ifdef KTERM_HANGUL
#include "hgutil.h"
#endif /* KTERM_HANGUL */
X
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#ifdef SIGTSTP
#include <sys/wait.h>
#ifdef hpux
#include <sys/bsdtty.h>
#endif
#endif
#ifdef KEEPALIVE
#include <sys/socket.h>
#endif /* KEEPALIVE */
X
#ifdef SIGNALRETURNSINT
#define SIGNAL_T int
#define SIGNAL_RETURN return 0
#else
#define SIGNAL_T void
#define SIGNAL_RETURN return
#endif
X
SIGNAL_T Exit();
extern char *malloc();
extern char *calloc();
extern char *realloc();
extern char *ttyname();
extern char *getenv();
extern char *strindex ();
extern void exit();
extern void sleep();
extern void bcopy();
extern long lseek();
extern void HandlePopupMenu();
X
int switchfb[] = {0, 2, 1, 3};
X
static SIGNAL_T reapchild ();
X
static Bool added_utmp_entry = False;
X
static char **command_to_exec;
X
#ifdef USE_SYSV_TERMIO
/* The following structures are initialized in main() in order
** to eliminate any assumptions about the internal order of their
** contents.
*/
static struct termio d_tio;
#ifdef TIOCSLTC
static struct ltchars d_ltc;
#endif /* TIOCSLTC */
#ifdef TIOCLSET
static unsigned int d_lmode;
#endif /* TIOCLSET */
#else /* not USE_SYSV_TERMIO */
static struct sgttyb d_sg = {
X 0, 0, 0177, CKILL, EVENP|ODDP|ECHO|XTABS|CRMOD
};
static struct tchars d_tc = {
X CINTR, CQUIT, CSTART,
X CSTOP, CEOF, CBRK,
};
static struct ltchars d_ltc = {
X CSUSP, CDSUSP, CRPRNT,
X CFLUSH, CWERASE, CLNEXT
};
static int d_disipline = NTTYDISC;
#if defined(KTERM) && defined(LPASS8)
static long int d_lmode = LCRTBS|LCRTERA|LCRTKIL|LCTLECH|LPASS8;
#else
static long int d_lmode = LCRTBS|LCRTERA|LCRTKIL|LCTLECH;
#endif
#endif /* USE_SYSV_TERMIO */
X
static int parse_tty_modes ();
/*
X * SYSV has the termio.c_cc[V] and ltchars; BSD has tchars and ltchars
X */
static int override_tty_modes = 0;
struct _xttymodes {
X char *name;
X int len;
X int set;
X char value;
} ttymodelist[] = {
{ "intr", 4, 0, '\0' }, /* tchars.t_intrc ; VINTR */
#define XTTYMODE_intr 0
{ "quit", 4, 0, '\0' }, /* tchars.t_quitc ; VQUIT */
#define XTTYMODE_quit 1
{ "erase", 5, 0, '\0' }, /* sgttyb.sg_erase ; VERASE */
#define XTTYMODE_erase 2
{ "kill", 4, 0, '\0' }, /* sgttyb.sg_kill ; VKILL */
#define XTTYMODE_kill 3
{ "eof", 3, 0, '\0' }, /* tchars.t_eofc ; VEOF */
#define XTTYMODE_eof 4
{ "eol", 3, 0, '\0' }, /* VEOL */
#define XTTYMODE_eol 5
{ "swtch", 5, 0, '\0' }, /* VSWTCH */
#define XTTYMODE_swtch 6
{ "start", 5, 0, '\0' }, /* tchars.t_startc */
SHAR_EOF
true || echo 'restore of kterm-4.1.2/main.c failed'
fi
echo 'End of kterm-4.1.2 part 12'
echo 'File kterm-4.1.2/main.c is continued in part 13'
echo 13 > _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