www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/14/13:09:09

Date: Wed, 14 Nov 2001 20:04:34 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <2950-Wed14Nov2001200434+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <3bf243ef.sandmann@clio.rice.edu>
Subject: Re: Problems with sgtty.h, ioctl.h and termios.h
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1011114133052 DOT 2827E-100000 AT is> <3bf243ef DOT sandmann AT clio DOT rice DOT edu>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 14 Nov 2001 10:14:07
> > 
> > Then modify the sources to use TTY instead of "/dev/tty0".
> 
> I'm not sure what the program is trying to do, but I doubt if this is
> correct.  /dev/tty0 will usually be a serial line on a Unixy system -
> where a terminal, modem or some peripheral is located.  /dev/tty will
> be the current login console (keyboard/monitor - may be a window under
> a desktop, etc).  I am guessing this code needs to talk to "COM1" on
> the PC - in which case there's a whole bunch of coding needed to make
> this work.

That's what I asked in the beginning of this thread: what device were
the relevant handles connected to.  The OP said they are connected to
the terminal.  If that's not so, I agree that the program won't work
(and I actually said that back then ;-).

However, note that the fragment from the code posted here in the
beginning of the thread:

        if(ioctl(f3,TIOCEXCL)==0 &&
           ioctl(f4,TIOCEXCL)==0){
            lkterm.sg_ispeed    = bdrate;
            lkterm.sg_ospeed    = bdrate;
            lkterm.sg_erase     = ERASECH;
            lkterm.sg_kill      = KILLCH;
            lkterm.sg_flags     = FLAG;
            if(ioctl(f3,TIOCSETP,&lkterm)!=0 ||
               ioctl(f4,TIOCSETP,&lkterm)!=0){

does suggest that it's not a com port, but an input device such as a
terminal (otherwise, why set ERASECH and KILLCH?).

- Raw text -


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