Initial maemo platform support
[maemo-rb.git] / utils / rockbox_api / generate.php
blob29dd69588af17f0730ffa21068136f04b2cd79f7
1 #!/usr/bin/php
2 <?
3 require_once("functions.php");
5 echo '# Auto generated documentation by Rockbox plugin API generator v2'."\n";
6 echo '# Made by Maurus Cuelenaere'."\n";
7 echo <<<MOO
8 # __________ __ ___.
9 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
10 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
11 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
12 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
13 # \/ \/ \/ \/ \/
14 # \$Id$
16 # Generated from $svn\x61pps/plugin.h
18 # Format:
19 # \\group memory and strings
20 # \\conditions defined(HAVE_BACKLIGHT)
21 # \\param fmt
22 # \\return
23 # \\description
24 # \\see func1 func2 [S[apps/plugin.c]]
26 # Markup:
27 # [W[wiki url]]
28 # [S[svn url]]
29 # [F[function]]
30 # [[url]]
31 # %BR%
32 # =code=
34 MOO;
36 foreach(get_newest() as $line)
38 echo "\n".clean_func($line["func"])."\n";
40 if(strlen($line["group"]) > 0)
41 echo " \\group ".$line["group"]."\n";
43 if(strlen($line["cond"]) > 2)
44 echo " \\conditions "._simplify($line["cond"])."\n";
46 foreach(get_args($line["func"]) as $param)
48 if(strlen($param) > 0 && $param != "...")
50 $param = split_var($param);
51 $param = $param[1];
52 echo " \\param $param\n";
56 if(get_return($line["func"]) !== false)
57 echo " \\return\n";
59 echo " \\description\n";
62 echo "\n# END\n";