Advertisement
robinwatts

Untitled

Nov 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. if (map_type == 0) {
  2. #ifdef USE_MAP_TYPE_IN_SPECIFICATION
  3. printable = (chr >= ' ') && (chr <= '\177');
  4. #else
  5. /* Treat it as map type 1 */
  6. chr &= 0x7f;
  7. printable = (chr >= ' '); /* 0-31 and 128-159 are not printable */
  8. #endif
  9. }
  10. else if (map_type == 1) {
  11. chr &= 0x7f;
  12. printable = (chr >= ' '); /* 0-31 and 128-159 are not printable */
  13. } else if (map_type >= 2) {
  14. /* 2 is correct but will force all types above 2 here */
  15. if ((chr == 0) || (chr == '\033') ||
  16. ((chr >= '\007') && (chr <= '\017')))
  17. printable = false;
  18. else
  19. printable = true;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement