🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #39661

Re: I/O redirection to the printer

#39661
From: roland
Date: Tue, 19 Dec 1989 09:45
26 lines
1296 bytes
Hallo Thomas,

UI0T@DKAUNI2.BITNET ("Thomas Koenig") writes:

>I am having a strange problem with I/O redirection.  To redirect
>standard output to the printer, I wrote the following test program:

I think You just re-discovered one of the older bugs of TOS.
I have hit upon this problem when trying to redirect the messages
from Turbo-C ( commandline version ) to a file. For the compiler TCC
this worked fine, however, the linker put out only NULs. ( Substituting
ALN as linker solved this problem. )

A little disassembling showed that the linker used Cconout() for
basic output, whereas TCC relied on Fwrite( 1, ... ).

>    Fclose (1);
>    Fforce (1, printhandle);
>    printf("Hello, world!\n");
>/*    Cconws("Hello, world!\n");    */

So try:
     Fwrite( 1, "Hello world!\n", 13 ) ; /* modulo correct ordering */

( This should work, and I suppose that the printf() is based on 
  F
Technical Details
Message-ID: <1174@pcsbst.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!unido!ztivax!tumuc!guug!pcsbst!cochise!roland
References: <"89-12-15-19:19:25.76*UI0T"@DKAUNI2.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!unido!ztivax!tumuc!guug!pcsbst!cochise!roland
From: roland@cochise
Newsgroups: comp.sys.atari.st
Subject: Re: I/O redirection to the printer
Message-ID: <1174@pcsbst.UUCP>
Date: 19 Dec 89 09:45:06 GMT
References: <"89-12-15-19:19:25.76*UI0T"@DKAUNI2.BITNET>
Sender: uusr@pcsbst.UUCP
Lines: 25