[Coco] Climax C Compiler setup
Walter
zambotti at iinet.net.au
Sun Mar 24 02:00:45 EDT 2019
Bill G is correct. In OS/9 EOF is not a character.
C_prep uses I_readln to read a line of text terminated by an EOL upto a maximum buffer length.
If the buffer length is exceeded a text to long error is returned.
The code then checks to see if the last character on the line is a EOL '\r'. If it is not is then assumes the line is too long
and returns a line to long error manually.
This is a bad assumption. It should only assume this if the line read back has no EOL and equals the maximum buffer length.
After all most of the last lines in my source code is usually just "}" . Which is just one character and is way shorter than the max line length.
If it is shorter the max line length it should just append a null to the buffer and return.
I am looking at a fix now!
Walter
-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Bill Gunshannon
Sent: Saturday, 23 March 2019 7:04 PM
To: coco at maltedmedia.com
Subject: Re: [Coco] Climax C Compiler setup
On 3/22/19 11:28 PM, Stephen Fischer wrote:
> OS-9 does not heed EOF.
>
> That's a MSDOS \ Windows thing which bit me several times, it took some
> time to realize why documents were truncated when I first used MSDOS 3.3.
>
> End of Text (ETX) is $03, I do not see EOF in the ASCII charts found by
> Google.
>
EOF is not always a character. EOF is end of file and how it is
determined is system dependent. Even DOS/Windows is inconsistent
in this regard as it used both ^Z or an length mentry in the
directory to determine EOF. Characters like ETX were intended for
data transmission and communication device control. Some have
been used for other things, but don't expect that use to common.
EOL is done many ways.
bill
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list