kterm 4.1.1 patch 1

Mark Leisher mleisher at nmsu.edu
Mon Nov 26 14:07:53 AEST 1990


Here is a shar file containing a patchlevel.h file, to track the bugs
easier, and a fix for invalid characters when using Big5 mode with a
GuoBiao font.  Thanks to John Melby of Fujitsu for pointing out the
Big5/GuoBiao problem.

Submitted-by: mleisher at nmsu.edu
Archive-name: kterm-4.1.1/patch01

---- Cut Here and feed the following to sh ----
#!/bin/sh
# This is kterm-4.1.1/patch, a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 11/26/1990 02:22 UTC by mleisher at nmsu.edu
# Source directory /tmp_mnt/home/nikita1/X11R4/contrib/clients/kterm-4.1.1-patches
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   4093 -rw-rw-r-- kterm-4.1.1.patch1
#     21 -rw-rw-r-- patchlevel.h
#
# ============= kterm-4.1.1.patch1 ==============
if test -f 'kterm-4.1.1.patch1' -a X"$1" != X"-c"; then
	echo 'x - skipping kterm-4.1.1.patch1 (File already exists)'
else
echo 'x - extracting kterm-4.1.1.patch1 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'kterm-4.1.1.patch1' &&
*** charproc.c.ORIG	Sun Nov 25 19:14:29 1990
--- charproc.c	Sun Nov 25 19:07:04 1990
***************
*** 882,888 ****
X                  while (top > 0) {
X                      /* first byte */
X                      c = *cp++;
!                     if (c < min || max1 < c) {
X                          cp--;
X                          break;
X                      }
--- 882,894 ----
X                  while (top > 0) {
X                      /* first byte */
X                      c = *cp++;
! 
!                     /*
!                      * Handle BIG5 special case by allowing out of range
!                      * first bytes through so it gets converted to box
!                      * char in converter() stage
!                      */
!                     if (c < min || max1 < c && !(term->flags & BIG5_HANZI)) {
X                          cp--;
X                          break;
X                      }
***************
*** 960,966 ****
X  	register Char HI, LO;
X  	register Char *cp = bptr;
X  	register Char *dcp = dotextbuf;
!         register unsigned char c1, c2, oc1, oc2;
X  
X  #  define SGB1(c) ((0x81 <= c && c <= 0xAF))
X  #  define SGB2(c) (0x40 <= c && c <= 0xFC && c != 0x7F)
--- 966,972 ----
X  	register Char HI, LO;
X  	register Char *cp = bptr;
X  	register Char *dcp = dotextbuf;
!         unsigned char c1, c2, oc1, oc2;
X  
X  #  define SGB1(c) ((0x81 <= c && c <= 0xAF))
X  #  define SGB2(c) (0x40 <= c && c <= 0xFC && c != 0x7F)
*** hutil.c.ORIG	Sun Nov 25 18:19:54 1990
--- hutil.c	Sun Nov 25 18:24:32 1990
***************
*** 284,293 ****
--- 284,297 ----
X        case GBtoBIG:
X          if (inGBrange(codeS)) 
X            codeT = GtoB[codeS - GBstart];
+         else
+           codeT = BIGbox;
X          break;
X        case BIGtoGB:
X          if (inBIGrange(codeS))
X            codeT = BtoG[codeS - BIGstart];
+         else
+           codeT = GBbox;
X          break;
X        case GBtoSGB:
X          if (inGBrange(codeS)) {
***************
*** 302,314 ****
X          }
X          break;
X        case BIGtoSGB:
!         if (inBIGrange(codeS)) {
!             codeT = BtoG[codeS - BIGstart];
!             c1 = HB(codeT);
!             c2 = LB(codeT);
!             gb2sgb(c1, c2, &ch1, &ch2);
!             codeT = DB(ch1, ch2);
!         }
X          break;
X        case SGBtoBIG:
X          if (inSGBrange(codeS)) {
--- 306,319 ----
X          }
X          break;
X        case BIGtoSGB:
!         if (inBIGrange(codeS))
!           codeT = BtoG[codeS - BIGstart];
!         else
!           codeT = GBbox;
!         c1 = HB(codeT);
!         c2 = LB(codeT);
!         gb2sgb(c1, c2, &ch1, &ch2);
!         codeT = DB(ch1, ch2);
X          break;
X        case SGBtoBIG:
X          if (inSGBrange(codeS)) {
***************
*** 316,325 ****
X              ch1 |= 0x80;
X              ch2 |= 0x80;
X              codeS = DB(ch1, ch2);
!             codeT = codeS;
!             if (inGBrange(codeS)) 
!               codeT = GtoB[codeS - GBstart];
!         }
X          break;
X      }
X  
--- 321,333 ----
X              ch1 |= 0x80;
X              ch2 |= 0x80;
X              codeS = DB(ch1, ch2);
!         } else
!           codeS = BIGbox;
!         codeT = codeS;
!         if (inGBrange(codeS)) 
!           codeT = GtoB[codeS - GBstart];
!         else
!           codeT = BIGbox;
X          break;
X      }
X  
*** main.c.ORIG	Sun Nov 25 19:11:49 1990
--- main.c	Sun Nov 25 19:13:56 1990
***************
*** 54,59 ****
--- 54,60 ----
X  #include <X11/cursorfont.h>
X  #include <pwd.h>
X  #include <ctype.h>
+ #include "patchlevel.h"
X  
X  #ifdef att
X  #define USE_USG_PTYS
***************
*** 639,645 ****
X  #ifdef KTERM
X  static void Version ()
X  {
!     fprintf (stderr, "kterm: version %s\n", KTERM_VERSION);
X      fprintf (stderr, "       with");
X  #ifdef KTERM_KANJI
X      fprintf (stderr, " [KTERM_KANJI]");
--- 640,647 ----
X  #ifdef KTERM
X  static void Version ()
X  {
!     fprintf (stderr, "kterm: version %s (patch level %d)\n", KTERM_VERSION,
!              patchlevel);
X      fprintf (stderr, "       with");
X  #ifdef KTERM_KANJI
X      fprintf (stderr, " [KTERM_KANJI]");
SHAR_EOF
chmod 0664 kterm-4.1.1.patch1 ||
echo 'restore of kterm-4.1.1.patch1 failed'
Wc_c="`wc -c < 'kterm-4.1.1.patch1'`"
test 4093 -eq "$Wc_c" ||
	echo 'kterm-4.1.1.patch1: original size 4093, current size' "$Wc_c"
fi
# ============= patchlevel.h ==============
if test -f 'patchlevel.h' -a X"$1" != X"-c"; then
	echo 'x - skipping patchlevel.h (File already exists)'
else
echo 'x - extracting patchlevel.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' &&
#define patchlevel 1
SHAR_EOF
chmod 0664 patchlevel.h ||
echo 'restore of patchlevel.h failed'
Wc_c="`wc -c < 'patchlevel.h'`"
test 21 -eq "$Wc_c" ||
	echo 'patchlevel.h: original size 21, current size' "$Wc_c"
fi
exit 0



More information about the Comp.sources.bugs mailing list