Convert '@' correctly from PETSCII to ASCII - by leaving it alone.
This commit is contained in:
parent
fc7b0d31bc
commit
3f142f0718
1 changed files with 12 additions and 10 deletions
|
@ -29,7 +29,7 @@
|
|||
*
|
||||
* This file is part of the Contiki desktop environment for the C64.
|
||||
*
|
||||
* $Id: petsciiconv.c,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
|
||||
* $Id: petsciiconv.c,v 1.2 2010/01/31 23:46:19 oliverschmidt Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -89,15 +89,17 @@ petsciiconv_toascii(char *buf, unsigned int len)
|
|||
c = 0x0d;
|
||||
} else if(c == 0x0d) {
|
||||
c = 0x0a;
|
||||
}
|
||||
switch (c & 0xe0) {
|
||||
case 0x40:
|
||||
case 0x60:
|
||||
c ^= 0x20;
|
||||
break;
|
||||
case 0xc0:
|
||||
c ^= 0x80;
|
||||
break;
|
||||
}
|
||||
if(c != 0x40) {
|
||||
switch (c & 0xe0) {
|
||||
case 0x40:
|
||||
case 0x60:
|
||||
c ^= 0x20;
|
||||
break;
|
||||
case 0xc0:
|
||||
c ^= 0x80;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*ptr = c & 0x7f;
|
||||
++ptr;
|
||||
|
|
Loading…
Reference in a new issue