2 ############################################################################
4 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 # Copyright (C) 2009 by Maurus Cuelenaere
13 # All files in this archive are subject to the GNU General Public License.
14 # See the file COPYING in the source tree root for full license agreement.
16 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 # KIND, either express or implied.
19 ############################################################################
21 $svnrev = '$Revision$';
34 static struct button buttons[] = {
38 while(my $line = <STDIN
>)
41 if($line =~ /^#define (BUTTON_[^\s]+) (.+)$/)
43 printf "{\"%s\", %s},\n", $1, $2;
48 {"BUTTON_REL", BUTTON_REL},
49 {"BUTTON_REPEAT", BUTTON_REPEAT},
50 {"BUTTON_TOUCHSCREEN", BUTTON_TOUCHSCREEN},
56 printf("-- Don't change this file!\\n");
57 printf("-- It is automatically generated of button.h \%s\\n", "$svnrev");
58 printf("rb.buttons = {\\n");
59 for(i=0; i<sizeof(buttons)/sizeof(struct button); i++)
60 printf("\\t\%s = \%ld,\\n", buttons[i].name, buttons[i].value);