(
Char
CONsole
Read
String)
VOID Cconrs( str )
char *str;
Opcode
10 (0x0A)
Availability
Parameters
str should be a character pointer large enough to hold the inputted string. On function entry, str[0] should be equal to the maximum number of characters to read.
Binding
pea str
move.w #$0A,-(sp)
trap #1
addq.l #6,sp
Return Value
On return, the string buffer passed as a parameter will be filled in with the inputted characters.
str[1] will contain the actual number of characters in the buffer.
(char *) &str[2] is the pointer to the start of the actual string in memory.
Cconrs() will not terminate unless
Control-C is pressed, the buffer is full or either
Return or
Control-J is pressed.
Caveats
GEMDOS versions below 0.15 echoes the input to the console even if output has been redirected elsewhere.
Comments
When the input stream is redirected,
Cconrs() returns
0 in
str[1] when the end-of-file marker is reached.
See Also