aboutsummaryrefslogtreecommitdiff
path: root/make-arrays-from-input.h.pl
diff options
context:
space:
mode:
Diffstat (limited to 'make-arrays-from-input.h.pl')
-rwxr-xr-xmake-arrays-from-input.h.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/make-arrays-from-input.h.pl b/make-arrays-from-input.h.pl
index 4030b01..0ebb7ea 100755
--- a/make-arrays-from-input.h.pl
+++ b/make-arrays-from-input.h.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
use Switch;
@@ -162,8 +162,15 @@ print(ARRAYS "#include \"hid.h\"\n\n");
print(HEADER "\#ifndef _INPUT_ARRAYS_H\n");
print(HEADER "\#define _INPUT_ARRAYS_H\n\n\n");
+# strip the ev_ from the type names
+for ($i=0; $i <= $#EV; ++$i) {
+ $_ = $EV[$i];
+ s/ev_//;
+ $EVtemp[$i] = $_;
+}
+
# generate a C array for each array and stick them all in the same file
-printArray("ev",@EV);
+printArray("ev",@EVtemp);
printArray("ev_syn",@SYN);
printArray("ev_key",@KEY);
printArray("ev_rel",@REL);