www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/10/14/05:15:11

Date: Sun, 14 Oct 2001 11:12:53 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Andrew Cottrell <acottrel AT ihug DOT com DOT au>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Info Issue with CVS LIBC
In-Reply-To: <002301c15474$c9bcd5e0$0a02a8c0@acceleron>
Message-ID: <Pine.SUN.3.91.1011014110052.15625F-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 14 Oct 2001, Andrew Cottrell wrote:

> > I'd begin by finding out whether the termios init function gets
> > called, and why.  The special termios hook should only be installed if
> > the program calls some termios function.  IIRC, Info doesn't.
> 
> The plot thickens and I am a stuck at to what to do next. This is what I
> did:
> 1) I traced the problem to the src/libc/dos/io/_read.c file to the read()
> function printing the characters.

Sorry, you lost me here.  Did you mean read() function or _read() 
function?  The former is not defined on _read.c.

> 2) Copied _read.c into the "texinfo4.0\info" directory and renamed it to
> read.c
> 3) Changed the read() function to ac_read() in both read.c and session.c
> 4) Modified the makefile to include read.c when creating ginfo.exe
> 
> If I run ginfo.exe after doing the stuff above it works. If I change the
> ac_read() in session.c back to read() the ginfo.exe starts to print the
> "^[[?" info.

It sounds like you effectively renamed _read() into read(), in which case 
you are looking at a different program.

Here's some background which might get you off the ground.  The DJGPP 
port of Info uses an FSEXT hook to read the keyboard without losing the 
signal support.  The keys are read via a BIOS function, and buffering is 
emulated; see pcterm.c, near its end.

Since Info uses an FSEXT, termios should not hook the stdin handle, or 
else these two will conflict.  Thus, question number one I would suggest 
to answer is: how come termios hooks handle 0?  It wasn't with libc.a 
from djdev203, IIRC.

One possibility is the new TIOCGWINSZ support introduced in CVS.  The 
function terminal_get_screen_size, defined on terminal.c, calls ioctl to 
get the screen size if TIOCGWINSZ is defined.  Perhaps that call causes 
termios to kick in?  Or maybe these are the calls to tgetstr in 
terminal.c?  Or maybe some other change in termios causes it to hook 
handle zero?

This is IMHO the crucial detail: to understand why does termios emulation 
hook handle zero.  All the rest should only be considered after we know 
the answer, because it could be that the old ways of handling input in 
Info are incompatible with the new termios, and some major rewrite is in 
order.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019