Re: [cc65] scanf again

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-11-27 16:17:21
On Sat, Nov 27, 2004 at 04:01:11PM +0100, MagerValp wrote:
> UvB> Say, I have a file on the disk that has a name using these
> UvB> "second" character codes, how can I load it if the keyboard
> UvB> generates the "other" character codes?
>
> You can't, unless you use wildcards. A file named 0x41 0x61 0xc1 (aAA)
> can be loaded as a?A.

Looks like the upper case letters starting at 97 are really second choice.

> One possible solution would be input translation, if the file is
> opened with "r" and not "rb". That's not a good idea for many other
> reasons though...

There is currently no way to pass the 'b' or 't' flags from fopen to open.
And, since we need O_EXCL in addition to the currently implemented flags (as
Oliver and I found out in a recent discussion), adding another flag named
O_BINARY would break the "8 bit barrier".

So I will ...

  1. ... add correct flags for the second upper case character set in ctype.s
     Please note that the problems pointed out in my last mail do still exist,
     so while this may ease your life in some situations, your program will
     still break on certain types of input.

  2. ... add a comment to the cbm specific docs that says, the upper case
     range from $61 to $7a is unsupported.

Until someone comes up with a really great idea, this is probably the best I
can do.

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 Sat Nov 27 16:17:25 2004

This archive was generated by hypermail 2.1.8 : 2004-11-27 16:17:34 CET