浏览代码

Avoid isascii() & toascii() on Teensy 3.x too

main
PaulStoffregen 4 年前
父节点
当前提交
914219ed98
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      teensy3/WCharacter.h

+ 2
- 2
teensy3/WCharacter.h 查看文件

// that fits into the ASCII character set. // that fits into the ASCII character set.
inline boolean isAscii(int c) inline boolean isAscii(int c)
{ {
return ( isascii (c) == 0 ? false : true);
return ((c & ~0x7F) != 0 ? false : true);
} }




// ASCII character set, by clearing the high-order bits. // ASCII character set, by clearing the high-order bits.
inline int toAscii(int c) inline int toAscii(int c)
{ {
return toascii (c);
return (c & 0x7F);
} }





正在加载...
取消
保存