Re: [cc65] wrong colors in conio

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-12-11 00:24:46


Hi!

On Tue, Dec 10, 2002 at 05:37:17PM +0100, Christian Groessler wrote:
> Ok, but then ..
[...]
> ... I suggest to completely remove textcolor() from the Atari
> port. Since return0 will also behave differently as expected and if
> the function isn't there it will give an immediate hint to the
> programmer.

Aliasing the function with return0 will not behave differently as expected
because the only thing that conio guarantees is that

        unsigned char oldcolor = textcolor (newcolor);
        textcolor (oldcolor);

will revert to the original color - and this is true for return0 (I admit that
return1 would be a more logical choice, but it has the same effect).

Not defining textcolor at all will give more problems, because user code needs
additional #ifdefs to cope with the situation. As I see it, a textcolor
function that does not do anything is the most portable solution. In fact,
this is how other monochrome systems work: All PETs and the complete CBM-II
series have a textcolor function that is aliases to return1.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-12-11 00:24:57 CET