#142 -keybuf should translate characters case

general
closed-fixed
nobody
None
User Interface
2014-02-01
2013-03-15
Moiree
No

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.

Discussion

  • Greg King

    Greg King - 2013-03-16

    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.

     
  • gpz

    gpz - 2014-02-01

    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"

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks