From:	CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  4-DEC-1988 01:42
To:	MRGATE::"ARISIA::EVERHART"
Subj:	VAXCIO bugs and stuff.


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Wed, 30 NOV 88 07:02:39 PDT
Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Wed, 30 Nov 88 06:41:49 PST
Received: by ucbvax.Berkeley.EDU (5.59/1.31)
	id AA09158; Wed, 30 Nov 88 02:31:29 PST
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 29 Nov 88 17:39:59 GMT
From: tektronix!gvgpsa!gvgpvd!tony@ucbvax.Berkeley.EDU  (Tony Ivanov)
Organization: Grass Valley Group, Inc., Grass Valley, CA
Subject: VAXCIO bugs and stuff.
Message-Id: <913@gvgpvd.GVG.TEK.COM>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

Two more bugs in VAXCIO; one minor...one major.  I can't believe these
slipped through after two years of use :-(.

To summarize (for new subscribers), VAXCIO is a package that provides
a unix-like TERMINAL interface for VMS.  It implements system V termio
and ioctl functions for TERMINAL control only.  It includes the unix-
familiar "cbreak", "raw", "nonl", "echo", etc.

The changes are expressed in VMS diff format as follows:
 ************
 <new lines>
 ******
 <old lines>
 ************


First bug is in GET.C (this is the major bug).  This bug will cause a
stack dump if not fixed and you perform a "gets" or "fgets" on a terminal
that is currently under VAXCIO control.
************
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]GET.C;47
   64 > 		{	ptr = &str[bytes_read-1];
   65   			if (*ptr == '\n')
******
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]GET.C;46
   64 > 		{	ptr = str[bytes_read-1];
   65   			if (*ptr == '\n')
************
************
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]GET.C;47
  162 > 		{	ptr = &str[bytes_read];
  163   			if (*(ptr-1) == '\n')
******
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]GET.C;46
  162 > 		{	ptr = str[bytes_read];
  163   			if (*(ptr-1) == '\n')
************


Second bug is in IOCTL.C (this is the minor bug).  This bug will cause
the terminal characteristic "TAB" to be set incorrectly based on the
XTAB (or TAB3) termio characteristic.  The only place I discovered this
was while running UROGUE on VMS since curses has a knowledge of whether
to use tabs or spaces.
************
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]IOCTL.C;81
  393 > 	termio_SETBITS (c_oflag, TAB3);
  394   	if (BTEST (term_char2, TT2$M_PASTHRU))	termio_RESETBITS (c_oflag, OPOST);
  395   	if (!BTEST (term_char, TT$M_LOWER))	termio_SETBITS (c_oflag, OLCUC);
  396 > 	if (BTEST (term_char, TT$M_MECHTAB))	termio_RESETBITS (c_oflag, TAB3);
  397   
******
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]IOCTL.C;77
  393 > 	termio_RESETBITS (c_oflag, TAB3);
  394   	if (BTEST (term_char2, TT2$M_PASTHRU))	termio_RESETBITS (c_oflag, OPOST);
  395   	if (!BTEST (term_char, TT$M_LOWER))	termio_SETBITS (c_oflag, OLCUC);
  396 > 	if (BTEST (term_char, TT$M_MECHTAB))	termio_SETBITS (c_oflag, TAB3);
  397   
************
************
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]IOCTL.C;81
  460 > 	if (termio_BTEST (c_oflag, TAB3) == BTEST (term_char, TT$M_MECHTAB))
  461   		{ TOGGLEBITS (term_char, TT$M_MECHTAB);  changes = TRUE; }
******
File CC1:[TONY.PROJECTS.GERBER.IO_SUPPORT.GVG$VAXCIO]IOCTL.C;77
  460 > 	if (termio_BTEST (c_oflag, TAB3) != BTEST (term_char, TT$M_MECHTAB))
  461   		{ TOGGLEBITS (term_char, TT$M_MECHTAB);  changes = TRUE; }
************
-- 
/* My opinions...             *  Tony Ivanov   MS-4B       *  ...ucbvax!   */
/* shared by my company?!...  *  Grass Valley Group, Inc.  *  tektronix!   */
/* you've got to be kidding!  *  P.O. Box 1114             *  gvgpsa!      */
/* "tony@gvgpvd.GVG.TEK.COM"  *  Grass Valley, CA  95945   *  gvgpvd!tony  */

