Re: [cc65] A bug?

From: <silverdr1inet.com.pl>
Date: 2008-07-23 01:32:48
On 2008-07-22, at 11:21, Ullrich von Bassewitz wrote:

>> \n works fine. It is \r that doesn't (at least on the C64 platform).
>> OK - we discussed this in this very thread some time ago - the  
>> comment
>> was that it doesn't necessarily _have to_. Still - it really wouldn't
>> hurt if it did. Quite the opposite IMHO.
>
> Again: printf calls fprintf (a FILE I/O function), which in turn  
> calls write
> (a low level FILE I/O function), which uses the the FILE I/O  
> function supplied
> by the kernal (BSOUT). You can even use some BASIC commands to  
> redirect printf
> output to a file or a printer. Special handling for \r would mess up  
> handling
> of file data in other places, ...

Like when the data goes to a different (than screen) output device...

> so I see no way to do it. And also no reason

Well, I see the reason: source-level compatibility for the code  
written for other platforms, but I see also your point here.  
Introducing special checking for what device the output goes to, plus  
injecting the extra system calls in place of simple IO stream output  
would rather not be a very elegant way :-(

> : If
> you need a special handling of \r vs. \n, you can always use conio.

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. I just wanted to compile it like on all the other  
platforms and see it behave the same. Anyway, now it seems to me that  
I understand why it doesn't behave the same here.

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 01:32:57 2008

This archive was generated by hypermail 2.1.8 : 2008-07-23 01:32:59 CEST