aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/agi.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2012-02-21 11:33:32 -0800
committerWillem Jan Palenstijn2012-02-21 11:33:32 -0800
commit9ffe3e11d905b5af194dd3265e2fe11545bf5020 (patch)
treef9fb97d7eb2368d0123aa3bd9d91c560cded3315 /engines/agi/agi.cpp
parent80b34398174973b6d70673fce94a8a1f670c3f4d (diff)
parent02ebd552141173775b9462f4414083d3b8d49a80 (diff)
downloadscummvm-rg350-9ffe3e11d905b5af194dd3265e2fe11545bf5020.tar.gz
scummvm-rg350-9ffe3e11d905b5af194dd3265e2fe11545bf5020.tar.bz2
scummvm-rg350-9ffe3e11d905b5af194dd3265e2fe11545bf5020.zip
Merge pull request #182 from fingolfin/forbid-ctype
ALL: Avoid using is* macros from ctype.h
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r--engines/agi/agi.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 4ed606c3ba..e9c9645768 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -250,19 +250,7 @@ void AgiEngine::processEvents() {
// Not a special key, so get the ASCII code for it
key = event.kbd.ascii;
- // Function isalpha is defined in <ctype.h> so the following applies to it:
- //
- // The C Programming Language Standard states:
- // The header <ctype.h> declares several functions useful for classifying
- // and mapping characters. In all cases the argument is an int, the value
- // of which shall be representable as an unsigned char or shall equal the
- // value of the macro EOF. If the argument has any other value, the
- // behavior is undefined.
- //
- // For a concrete example (e.g. in Microsoft Visual Studio 2003):
- // When used with a debug CRT library, isalpha will display a CRT assert
- // if passed a parameter that isn't EOF or in the range of 0 through 0xFF.
- if (key >= 0 && key <= 0xFF && isalpha(key)) {
+ if (Common::isAlpha(key)) {
// Key is A-Z.
// Map Ctrl-A to 1, Ctrl-B to 2, etc.
if (event.kbd.flags & Common::KBD_CTRL) {