diff options
author | Johannes Schickel | 2012-12-13 20:52:09 +0100 |
---|---|---|
committer | Johannes Schickel | 2012-12-13 21:08:47 +0100 |
commit | b0ba4b01a4fee3409768bdced4de6719b51297bc (patch) | |
tree | 6ad91afdcee1804f54f911b4abafbac4d51ad3b6 /engines | |
parent | 7319ccd84f6facbaa3875d1adc31f26cea94d223 (diff) | |
download | scummvm-rg350-b0ba4b01a4fee3409768bdced4de6719b51297bc.tar.gz scummvm-rg350-b0ba4b01a4fee3409768bdced4de6719b51297bc.tar.bz2 scummvm-rg350-b0ba4b01a4fee3409768bdced4de6719b51297bc.zip |
COMMON: Add wrapper for isprint.
This is done in the spirit of 658080deeda79d20ea40643569fbcb072573e7cf.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hugo/parser.cpp | 2 | ||||
-rw-r--r-- | engines/queen/journal.cpp | 2 | ||||
-rw-r--r-- | engines/touche/menu.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index 5fdb2026a7..2585c64fd8 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -235,7 +235,7 @@ void Parser::charHandler() { if (_cmdLineIndex >= kMaxLineSize) { //MessageBeep(MB_ICONASTERISK); warning("STUB: MessageBeep() - Command line too long"); - } else if (isprint(static_cast<unsigned char>(c))) { + } else if (Common::isPrint(c)) { _cmdLine[_cmdLineIndex++] = c; _cmdLine[_cmdLineIndex] = '\0'; } diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp index db06d540f5..474f72eca5 100644 --- a/engines/queen/journal.cpp +++ b/engines/queen/journal.cpp @@ -559,7 +559,7 @@ void Journal::updateTextField(uint16 ascii, int keycode) { } break; default: - if (isprint((char)ascii) && + if (Common::isPrint((char)ascii) && _textField.textCharsCount < (sizeof(_textField.text) - 1) && _vm->display()->textWidth(_textField.text) < _textField.w) { _textField.text[_textField.textCharsCount] = (char)ascii; diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp index c58e2f1a33..46429ebbc2 100644 --- a/engines/touche/menu.cpp +++ b/engines/touche/menu.cpp @@ -103,7 +103,7 @@ struct MenuData { void addCharToDescription(int slot, char chr) { char *description = saveLoadDescriptionsTable[slot]; int descriptionLen = strlen(description); - if (descriptionLen < 32 && isprint(static_cast<unsigned char>(chr))) { + if (descriptionLen < 32 && Common::isPrint(chr)) { description[descriptionLen] = chr; description[descriptionLen + 1] = 0; } |