Jonathan Gordon
9e07ef2b0a
Use buflib for all skin engine allocations.
...
Massive thanks to Michael Chicoine and other testers for finding the early bugs.
This removes all skin memory limitations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
2011-11-15 14:11:08 +00:00
Nils Wallménius
e52600eb67
de-tabify
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30734 a1c6a512-1295-4272-9138-f99709370657
2011-10-08 13:54:55 +00:00
Jonathan Gordon
d7372533d0
Partial fix for FS#12289 - comment lines would waste lots of buffer space. Still not perfect but should get 90+% of comments completly ignored now.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30596 a1c6a512-1295-4272-9138-f99709370657
2011-09-25 07:43:36 +00:00
Andree Buschmann
f7c4594134
Fix further 'variable set but not used' warnings reported from GCC 4.6.0.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29809 a1c6a512-1295-4272-9138-f99709370657
2011-05-01 13:48:28 +00:00
Bertrik Sikken
837b8ccce0
Remove duplicate #include in skin_parser.c
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29736 a1c6a512-1295-4272-9138-f99709370657
2011-04-17 06:58:28 +00:00
Jonathan Gordon
78a11cf648
Fix FS#11829 - %?xx<....> Crashes on targets where the %xx feature tag isnt avilable. rather hacky fix though better than crashing.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28890 a1c6a512-1295-4272-9138-f99709370657
2010-12-24 07:58:26 +00:00
Thomas Martitz
d98f2929e9
Fix unchecked result skin_parse_tag() exposed by r28480.
...
It caused the parser to not see that skin parsing failed and to enter an infinite loop.
And as a result it continued to endlessly malloc(). In normal build the skin buffer size limit made it end.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28497 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 18:46:21 +00:00
Bertrik Sikken
fffbdcc996
Correct spelling of 'seperate' in the skin parsing code - FS#11724 by Alexander Levin
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28485 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 09:51:19 +00:00
Jonathan Gordon
f6cf295dd3
Fix a bug introduced with r28370 (feature check tag improvements) where %Rp<foo> would fail to parse if the target had recording. Also enable debugging in the checkwps build line
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28473 a1c6a512-1295-4272-9138-f99709370657
2010-11-03 11:08:55 +00:00
Jonathan Gordon
943de3ce49
skin_parser: Change the way hardware conditionals are done (i.e %?cc)
...
They now only parse the correct branch (so only the true branch, or only the false branch). This shuold allow you to load different images/backdrops with the same id's depending on the targets hardware.
Add a new %Tp - "touchscreen present?" tag to check if the target has a touchscreen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28370 a1c6a512-1295-4272-9138-f99709370657
2010-10-28 11:00:36 +00:00
Jonathan Gordon
d402abe3f8
libskin_parser: fix a annoying bug where viewports required at least one line (even %Vi()). multiple %Vi lines direclty under eachother should now work
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28210 a1c6a512-1295-4272-9138-f99709370657
2010-10-05 13:02:34 +00:00
Jonathan Gordon
74ec011bb8
New skin tag: %if(<tag>, <operator>, <operand> [,option count]) which lets you do very simple logical comparissons on other tags.
...
<tag> is the tag to check against
<operator> is the comparisson to do, any one of... =, !=, >, >=, <, <= (when comparring against a string tag like %ia only = and != work, and it is done NOT case sensitive)
<operand> is either another tag, a number, or text.
[option count] is an optinal number to use for the few tags which scale to the amount of options when used as a conditional (i.e %?pv<a|b|c|d> would have 4 options)
example: %?if(%pv, >=, 0)<Warning.. volume clipping|coool...>
That says "If the value from %pv (volume) is greater than or equal to 0 then display the warning line, otherwise the cool line."
%?if(%ia, =, %Ia)<same artist> <= this artist and next artist are the same.
some tags might need a touch of tweaking to work better with this. experiment and have fun
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27846 a1c6a512-1295-4272-9138-f99709370657
2010-08-19 13:49:32 +00:00
Jonathan Gordon
863d239aa2
Change %xd to allow for a number to be used to specify the subimage. i.e %xd(Ac) can now we written as %xd(A, 3). subimage count start at 1 so a=1, b=2 etc.
...
Also adds the possibility to specify a set of params which a tag can have (i.e a tag or a integer)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27812 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 11:17:49 +00:00
Jonathan Gordon
145571d9b5
Add a T type to the tag table which allows parameters to be a single tag
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27716 a1c6a512-1295-4272-9138-f99709370657
2010-08-05 11:28:35 +00:00
Jonathan Gordon
1e0a01063d
make -vvv display the parse tree in checkwps. Fix a potential bug in the parser where recursive tags (the playlist viewier) would share params with its parant which meant bad things
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27677 a1c6a512-1295-4272-9138-f99709370657
2010-08-03 12:14:50 +00:00
Nils Wallménius
597ccddb39
skinparser lib: more const correctness
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27641 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 16:25:41 +00:00
Nils Wallménius
c2529c341d
skinparser lib: some const correctness and marking of local vars as 'static'
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27635 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 11:28:37 +00:00
Jonathan Gordon
2d31d77a8b
FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 12:37:48 +00:00
Robert Bieber
3c4fb8abe4
Theme Editor: Added column number to parser error messages
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27477 a1c6a512-1295-4272-9138-f99709370657
2010-07-18 00:59:02 +00:00
Robert Bieber
15488a00ea
Theme Editor: Committed FS#11477 to add a DECIMAL parameter type in the parser and adapt the Theme Editor to accomodate the change by Johnathan Gordon. Fixed bug in the parser caused by the patch (error was thrown on zero value) and adapted tag rendering for new format
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27426 a1c6a512-1295-4272-9138-f99709370657
2010-07-15 06:24:11 +00:00
Jonathan Gordon
dc34785b18
s/SUBLINES/LINE_ALTERNATOR/
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27271 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 02:04:14 +00:00
Robert Bieber
32ff4e93bd
Theme Editor: Implemented a flags column in the tag table, removed the \n flag at the end of the param list and replaced it with a NOBREAK flag to prevent the renderer from inserting a line break at the end of the line. Modified the theme editor's renderer to accomodate this flag
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27268 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 01:39:57 +00:00
Robert Bieber
00a3024924
Theme Editor: Fixed a warning in the parser due to a stray asterisk
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27239 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 08:43:01 +00:00
Robert Bieber
4429fb02b7
Theme Editor: Removed some old hash code that caused viewer not to update due to hash collisions. Made Vf and Vb tags attached to viewport definition eat newline at end of line'
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27238 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 08:05:03 +00:00
Robert Bieber
26a2f810f1
Theme Editor: Fixed line numbering bug in parser. Implemented playlist display in renderer: playlist will use info for next track for all tracks other than the current track
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27227 a1c6a512-1295-4272-9138-f99709370657
2010-07-01 21:49:55 +00:00
Jonathan Gordon
aa1a126772
minor tweak to r27210 to make it the same as the svn parser... eat everything up to and including the \n after these tags
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27211 a1c6a512-1295-4272-9138-f99709370657
2010-07-01 10:17:41 +00:00
Robert Bieber
7dfd0c0651
Theme Editor: Implemented JdGordon's tag newline-eating mechanism
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27210 a1c6a512-1295-4272-9138-f99709370657
2010-07-01 08:45:49 +00:00
Robert Bieber
09db2ae203
skin_parser: Fixed bug handling sublines with no content
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27060 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 18:51:44 +00:00
Jonathan Gordon
95b0cefad0
tiny clean up of memory allocation
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26887 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 13:54:09 +00:00
Jonathan Gordon
b2ea95e8d2
make the parser slightly more usable for rockbox, move the buffer allocation into the lib (maybe not the best spot?)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26880 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 07:56:51 +00:00
Jonathan Gordon
36b934d241
Move the skin parser to a seperate library
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26877 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 06:52:02 +00:00