[cc65] CBM gets() echoing

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-02-11 11:49:48
Hi,

I just wrote a program containing a sequence like this:

printf("Source:");
gets(source);
printf("Target:");
gets(target);
printf("Starting...\n");

Please note that the first two printf's don't contain a '\n'. In all
environments (cc65 and non-cc65) I tested the program the three printf
string appeared on three lines. This is because the chars entered are
echoed - incl. the Enter key being echoed as '\n'.

On the C64 however all three printf strings appear on the same line
because the Enter key seems to be echoed as ' '.

The obvious workaround is to have '\n's in the printf's and live with
the blank lines inserted in other environments. Nevertheless I'd like
to know if the "CBM maintainers" consider this behaviour as an issue
to be fixed. From looking at the source code I'd think this might
become difficult/ugly.

I haven't found any standards document describing the gets() echoing
at all. However the current status is suboptimal from the platform
independence perspective.

Best, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Feb 11 11:49:56 2010

This archive was generated by hypermail 2.1.8 : 2010-02-11 11:49:59 CET