Article View: comp.sys.atari.st
Article #25952I/O redirection and Cconout() problems
From: jtr485
Date: Mon, 16 Mar 1987 21:07
Date: Mon, 16 Mar 1987 21:07
27 lines
1815 bytes
1815 bytes
I have been working with some code to redirect I/O using the GEMDOS Fdup(STDOUT) and Fforce(STDOUT,fd) routines. However, If I redirect to a disk file then Cconout(c) calls give me 2 bombs (nee mushrooms, i.e. BUS ERROR). Everything works fine with code which uses Cconws(s) calls. The files are created and they always contain at least one character (garbage). In some cases a lot of Cconout() calls can take place before the bus error and there is one garbage character per Cconout() call. My speculation would be that somewhere there is a reference to a not properly defined buffer being made. I have some code generated with a lattice compiler using printf() calls. If I redirect output and then run this program it has the same behavior. I assume this means the lattice i/o routines are using Cconout(). That means it won't be sufficient, in my analysis, to just not use Cconout(). I need a run time solution. I can visualize a little trap routine intercepting all gemdos calls and mapping Cconout() calls to Cconws() calls with a local 2 byte buffer. Is there a better solution? Is this a problem people know about? Is it a problem with my ROMs only? I haven't tried this code with Tos in ram. I will do so now that I have thought of it. --j.a.tainter
Technical Details
Message-ID:
<89@umich.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!styx!ames!ptsfa!well!msudoc!umich!jtr485Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!styx!ames!ptsfa!well!msudoc!umich!jtr485 From: jtr485@umich.UUCP Newsgroups: comp.sys.atari.st Subject: I/O redirection and Cconout() problems Message-ID: <89@umich.UUCP> Date: Mon, 16-Mar-87 16:07:03 EST Article-I.D.: umich.89 Posted: Mon Mar 16 16:07:03 1987 Date-Received: Mon, 30-Mar-87 03:13:14 EST Organization: EECS, University of Michigan Lines: 27 Keywords: Cconout Fforce Fdup