From owner-freebsd-hackers Thu Jul 11 18: 7: 3 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2A2237B410 for ; Thu, 11 Jul 2002 18:06:56 -0700 (PDT) Received: from out007.verizon.net (out007pub.verizon.net [206.46.170.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 153DF43E42 for ; Thu, 11 Jul 2002 18:06:56 -0700 (PDT) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net ([138.89.160.174]) by out007.verizon.net (InterMail vM.5.01.05.05 201-253-122-126-105-20020426) with ESMTP id <20020712010659.FVRV13116.out007.verizon.net@bellatlantic.net>; Thu, 11 Jul 2002 20:06:59 -0500 Message-ID: <3D2E2BAC.7FDB87BB@bellatlantic.net> Date: Thu, 11 Jul 2002 21:06:52 -0400 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-19990626-CURRENT i386) X-Accept-Language: en, ru MIME-Version: 1.0 To: bruno schwander Cc: Cyrille Lefevre , hackers@FreeBSD.ORG Subject: Re: termios guru ? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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