Re: [cc65] conio tabs

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-09-22 16:41:31
On Wed, Sep 22, 2004 at 01:24:49PM +0200, MagerValp wrote:
> G> not wanting to sound anal, but before something like this is
> G> considered, i *demand* scrolling :=P
>
> Heh. I guess I could add that to the cbm targets as well - I need to
> rewrite the C128's driver anyway. Is (zp),y the way to go, or is an
> unrolled $0400,x loop ok? It's about twice as fast on the c64, but
> twice as big.

Thanks for the offer! It raises a general question: What is supposed to be
covered by the conio API?

Currently, conio is a quite simple and small API. No scrolling and no
interpretation of control codes besides the most basic ones. The old Borland
conio API did a similar thing, and did *not* interpret tabs (you got a funny
character instead). If we add interpretation of tabs, wouldn't that require
that other control codes (like backspace) are also interpreted? And what about
printf() (which uses BSOUT): Wouldn't it be confusing to have cprintf
interpret tabs, but printf ignores them?

conio was designed as a direct screen manipulation library, not one for
formatted output. Placing output at a specific screen position is done by
using gotoxy. If one needs to calculate a new position based on the current
one, there's wherex and wherey. These were the ideas behind conio, and the
reason why I considered automatic scrolling other stuff not as a good idea.
This does not mean that scrolling or tab interpretation is bad per se, but it
does not fit into my idea about conio.

So the question is: Do we want to change the design criterias behind conio? Of
course it can be improved. I've already considered adding a cscroll() function
which allows scrolling - not automatically, but when requested by the
programmer. This seems to fit better into the current conio design. But adding
automatic scrolling and tab interpretation do change the idea behind conio,
and so before adding anthing like that, I would like to discuss if this is
really what we want.

Regards


        Uz

-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
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 Sep 22 16:41:35 2004

This archive was generated by hypermail 2.1.8 : 2004-09-22 16:41:44 CEST