Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!STONY-BROOK.SCRC.SYMBOLICS.COM!jrd From: jrd@STONY-BROOK.SCRC.SYMBOLICS.COM (John R. Dunning) Newsgroups: comp.sys.atari.st Subject: IO questions Message-ID: <19880314183759.3.JRD@GRACKLE.SCRC.Symbolics.COM> Date: 14 Mar 88 18:37:00 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 25 I'm looking for hints on the 'right' way to do character output to the screen. (the real goal is to figure out what stuff wants to go in my C library). I've tried Bconout and Cconout, but both have their problems. Cconout observes Xon/Xoff, but is confused by things that redirect file handle 1 (0?, 2?), such as Gulam. Bconout takes a dev, thus avoiding the redirected handle problem, but doesn't observe Xon/Xoff, or control-C. Neither of those behaviours is acceptable. I've also considered doing Fwrite's, scanning the buffer for newlines on TTY devices, but that seems like a fairly excessive amount of work; there ought to be an easier way. I guess it's also possible to build my own Xon/Xoff handler, but, again, it seems like there ought to be an easier way. Anybody got any hints on how this is done elsewhere? On a related topic, what's a good way to discover whether a handle is actually connected to a disk file, as opposed to the screen? The MUN stuff does Fdatime at the handle, checking for error status as an indication that you've got a terminal device as opposed to a file device. That sort of works, but it's unbelievably slow, and has the extra disadvantage that the error return is really the result of an address fault internal to the OS. That works ok as long as you don't have a debugger loaded, but if you do, you bomb into the debugger in high memory with an illegal address trap. I can think of things I'd rather do... Thanks in advance for any info.