[Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.56,1.57
Max Horn
fingolfin at users.sourceforge.net
Sat Sep 3 13:00:18 CEST 2005
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3861/sword1
Modified Files:
control.cpp
Log Message:
Avoid putting non-ASCII chars into source files
Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/control.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- control.cpp 25 Aug 2005 15:33:38 -0000 1.56
+++ control.cpp 3 Sep 2005 19:59:33 -0000 1.57
@@ -654,6 +654,12 @@
bool Control::keyAccepted(uint8 key) {
// this routine needs changes for Czech keys... No idea how to do that, though.
+ // FIXME: It is not a good idea to put non-ASCII chars into a C source file,
+ // since there is no way to specify which encoding you are using.
+ // It is better to encode them as hex/octal. Although in this particular
+ // case, it seems questionable to do this at all, since we currently
+ // do not at all specify which encoding keyboard events use, so this
+ // check here is probably not portable anyway...
static const char allowedSpecials[] = "éèáàúùäöüÄÖÜß,.:-()?! \"\'";
if (((key >= 'A') && (key <= 'Z')) ||
((key >= 'a') && (key <= 'z')) ||
More information about the Scummvm-git-logs
mailing list