-keybuf should translate characters case
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
The -keybuf option should translate the character case, but leave control
characters untouched.
Now UPPER and lower case get swapped, as the arguments are copied verbatim,
except for backslash escaped hexadecimal numbers (whose notation is a bit
unusual for being "\nn" similar to Cs octal character notation, where one would
expect "\xnn"), e.g:
>>> x64 -keybuf "lO\":*\",8\0d" -8 some.d64
Lo":*",8
?syntax error.
I tried calling charset_p_topetcii in kbd_buf_parse_string, which translates
case of the character nicely, but charset_p_topetcii translates controls chars
too, which is not desirable, e.g: carriage return gets translated to linefeed.
It is translating from a Unix ASCII string to a Commodore PetSCII string; so, use the Unix newline character instead of the Commodore newline character.
proper conversion and escaping changed to c-style in r27923, please test :)
these should both work now:
x64 -keybuf "lO\":*\",8\x0d"
x64 -keybuf "lO\":*\",8\n"