From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA17917; Thu, 21 Aug 2003 18:42:13 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA11655 for ; Thu, 21 Aug 2003 18:42:12 +0200 (MET DST) Received: from ep09.kernel.pl (ep09.kernel.pl [212.87.11.162]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h7LGgAT17855 for ; Thu, 21 Aug 2003 18:42:11 +0200 (MET DST) Received: (qmail 20435 invoked by uid 566); 21 Aug 2003 16:42:05 -0000 Date: Thu, 21 Aug 2003 18:40:24 +0200 From: Michal Moskal To: caml-list@inria.fr Subject: Re: [Caml-list] unbuffered input Message-ID: <20030821164024.GA18540@roke.freak> Mail-Followup-To: caml-list@inria.fr References: <20030821161157.GH18587@alan-schm1p> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030821161157.GH18587@alan-schm1p> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 0400,:01 char:01 char:01 buffering:01 tcsetattr:01 michal:01 moskal:01 malekith:01 libc:01 kernel:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Aug 21, 2003 at 12:11:57PM -0400, Alan Schmitt wrote: > Hi, > > I've been looking at this for about one hour, and I seem to get stuck: > how can I do unbuffered input in caml ? I want a program to block until > a char is entered. I tried input_char and Unix.read (without > and with Unix.select), to no avail. I do not know if it is caml, the > libc, or the terminal that is buffering. Probably terminal. Under unix it's line-buffered by default. > Any hint on how to do this ? Unix.read + Unix.select + Unix.tcsetattr. -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners