revision 917:2146dd5529fd
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 917:2146dd5529fd |
parent | 916:6fbba9e71516 |
child | 918:7ab30c886553 |
author | nkeynes |
date | Fri Nov 07 07:53:31 2008 +0000 (15 years ago) |
Fix "0" being confused with "not defined"
1.1 --- a/src/drivers/genkeymap.pl Fri Nov 07 07:39:52 2008 +00001.2 +++ b/src/drivers/genkeymap.pl Fri Nov 07 07:53:31 2008 +00001.3 @@ -27,7 +27,7 @@1.4 print "const gchar *${name}_keysyms_by_keycode[128] = { ";1.5 for( $i=0; $i < 128; $i++ ) {1.6 if( $i != 0 ) { print ", "; }1.7 - if( $hash{$i} ) {1.8 + if( defined($hash{$i}) ) {1.9 print "\"$hash{$i}\"";1.10 } else {1.11 print "NULL";1.12 @@ -38,7 +38,7 @@1.13 print "const uint16_t ${name}_keycode_to_dckeysym[128] = { ";1.14 for( $i=0; $i<128; $i++ ) {1.15 if( $i != 0 ) { print ", "; }1.16 - if( $hash{$i} && $dcsyms{$hash{$i}} ) {1.17 + if( defined($hash{$i}) && $dcsyms{$hash{$i}} ) {1.18 print $dcsyms{$hash{$i}};1.19 } else {1.20 print "DCKB_NONE";
.