Re: [cc65] A bug?

From: <silverdr1inet.com.pl>
Date: 2008-07-23 15:29:19
On 2008-07-23, at 12:11, Ullrich von Bassewitz wrote:

>> That's exactly the reason why I returned to this thread - I don't  
>> want
>> to rewrite the portable C code to use conio or make any other
>> workarounds.
>
> If you have source code that relies on special treatment of \r, it  
> is not
> portable.

Don't get me wrong but the code in question didn't require any kind  
of "special treatment" on any of the compilers/platforms I used in  
the past. And the plural here means several times more than two. As I  
wrote some time ago - it was the first time I encountered this kind  
of problem since shortly after the K&R publication. \r worked as  
expected even on non-unix-relative platforms like IBM C/2 compiler  
generating binaries to run under DOS (and the OS/2) . I take that the  
compiler there had to make "special treatment" for \n as two code  
sequence was needed there. Still I agree that it most probably didn't  
use any in-between system function calls to achieve the special  
results on screen or something like that.

Summing up - I got convinced that there is no fully elegant way to  
make it work on the platform(s) in question because the "console" on  
this(ese) platform(s) lack the required capability of reacting  
accordingly to a control sequence. Of course it would be possible  
make up for this deficiency on the lower level by checking whether  
the output goes to screen and doing the PLOT rather than CHROUT  
(BSOUT) call in such case but I agree that this would indeed be a  
"special treatment" and if C specs do not mandate this behaviour..

Regards,

P.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jul 23 15:29:33 2008

This archive was generated by hypermail 2.1.8 : 2008-07-23 15:29:34 CEST