Mail Archives: djgpp/2001/11/14/13:09:09
> 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 -