🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: net.micro.atari
2 messages
2 total messages Started by pwp Wed, 12 Feb 1986 18:34
Question about C for the ST
#2473
Author: pwp
Date: Wed, 12 Feb 1986 18:34
15 lines
1285 bytes
Does anyone know how to redirect standard output to the printer in
the Digital Research C compiler? The manual included with the ST developer
kit suggests that directing output to /dev/lp or to LST should work,
but in each case these produce a file of the same name.

Does anyone know how to redirect standard output to the printer from
within a C program?

The getchar routine (also gets) do not respond to the RETURN key, they just
wait for you to type another key (They treat CONTROL-RETURN as a return).
Does anyone know of a clean fix for this problem? At present I am using
Cconin and anding the result with 0X7F, but it takes a good bit of
reprogramming to get the effect of gets including the correct action on
CONTROL-h, etc.
Re: Question about C for the ST
#2552
Author: ericr
Date: Thu, 20 Feb 1986 15:29
19 lines
1159 bytes
To redirect to the printer:

	batch c prog >PRN:

		     ^
		     Note that there is no space.


The stdio routine gets(and therefore scanf) requires a CTL-J to terminate
the line.  This is an acknowledged bug and is supposed to be fixed in the
next software release.  You can use the BDOS read string command to come
close to a gets.  The documentation is in error in that the returned 
string is NOT null terminated.  If you are interested, I can send you
a short routine which emulates gets quite effectively.

Eric Ross
ihnp4!hpfcla!hpvcla!ericr
Vancouver, WA.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads