Date: Thu, 11 Jul 2002 21:06:52 -0400 From: Sergey Babkin <babkin@bellatlantic.net> To: bruno schwander <bruno@tinkerbox.org> Cc: Cyrille Lefevre <cyrille.lefevre@laposte.net>, hackers@FreeBSD.ORG Subject: Re: termios guru ? Message-ID: <3D2E2BAC.7FDB87BB@bellatlantic.net> References: <Pine.BSF.4.21.0207111505070.7694-100000@duron.bschwand.net>
next in thread | previous in thread | raw e-mail | index | archive | help
bruno schwander wrote:
>
> thanks, I see the idea but cfmakeraw has some other effects... newlines
> output by the program are not translated, etc.
To get rid of the raw output effects, remove the line
t->c_oflag &= ~OPOST;
>
> My main program now is the VMIN/VTIME stuff. The way irit tries to use is,
> is basically to be able to do async stdin reading, but this does not
> work. Whenever I try those settings, no input is ever read by the
> program. It fgetc() constantly returns -1.
>
> Any idea why ?
>
> bruno
>
> On Thu, 11 Jul 2002, Cyrille Lefevre wrote:
>
> > On Wed, Jul 10, 2002 at 09:13:18PM -0700, bruno schwander wrote:
> > > I making a port (not much really) of Irit
> > > (http://www.cs.technion.ac.il/~irit/) a modelling environment.
> > >
> > > I am having some problems with terminal handling, so all termios guru out
> > > there, please help ! :-)
> > >
> > > At stratup, irit does the following
> > >
> > > Termio.c_cc[VEOF] = 0; /* MIN = 0, no minimal length to wait for. */
> > > Termio.c_cc[VEOL] = 1; /* TIME - 1 tenth of a second as time o
> > >
> > > which seems wrong, I think it should be
> > >
> > > Termio.c_cc[VMIN] = 0; /* MIN = 0, no minimal length to wait for. */
> > > Termio.c_cc[VTIME] = 1; /* TIME - 1 tenth of a second as time o
> >
> > VMIN == VEOF and VTIME == VEOL.
On SysV but not guaranteed to be so on every system. In fact, if we
look in the FreeBSD /usr/include/sys/termios.h we can see:
#define VEOF 0 /* ICANON */
#define VEOL 1 /* ICANON */
#define VMIN 16 /* !ICANON */
#define VTIME 17 /* !ICANON */
No wonder that it does not work.
-SB
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D2E2BAC.7FDB87BB>
