A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1#!/usr/bin/env perl
2############################################################################
3# __________ __ ___.
4# Open \______ \ ____ ____ | | _\_ |__ _______ ___
5# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8# \/ \/ \/ \/ \/
9# $Id$
10#
11# Copyright (C) 2009 by Maurus Cuelenaere
12#
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.
15#
16# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17# KIND, either express or implied.
18#
19############################################################################
20
21$i = 0;
22$j = 0;
23while(my $line = <STDIN>)
24{
25 chomp($line);
26 if($line =~ /^\s*(ACTION_[^\s]+)(\s*=.*)?,\s*$/)
27 {
28 $actions[$i] = sprintf("\t%s = %d,\n", $1, $i);
29 $i++;
30 }
31 elsif($line =~ /^\s*(PLA_[^\s]+)(\s*=.*)?,\s*$/)
32 {
33 # PLA_* begins at LAST_ACTION_PLACEHOLDER+1, thus i+1
34 $actions[$i] = sprintf("\t%s = %d,\n", $1, $i+1);
35 $i++;
36 }
37 elsif($line =~ /^\s*(CONTEXT_[^\s]+)(\s*=.*)?,\s*$/)
38 {
39 $contexts[$j] = sprintf("\t%s = %d,\n", $1, $j);
40 $j++;
41 }
42}
43
44print "-- Don't change this file!\n";
45printf "-- It is automatically generated of action.h %s\n", '$Revision$';
46
47print "rb.actions = {\n";
48foreach $action(@actions)
49{
50 print $action;
51}
52print "}\n";
53
54print "rb.contexts = {\n";
55foreach $context(@contexts)
56{
57 print $context;
58}
59print "}\n";