summaryrefslogtreecommitdiff
path: root/apps/gui/wps_parser.c (follow)
Commit message (Collapse)AuthorAge
* Make the '%mh' wps tag (to indicate keylock status) available on the Archos ↵Marianne Arnold2007-06-25
| | | | | | targets as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13716 a1c6a512-1295-4272-9138-f99709370657
* Make RTC tags display hyphens instead of nothing on non-rtc targets. This ↵Brandon Low2007-06-16
| | | | | | makes WPSs that use RTC tags look decent again with the new separated RTC tag style git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13639 a1c6a512-1295-4272-9138-f99709370657
* Add some more explicit defines for my previous commit.Nicolas Pennequin2007-06-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13561 a1c6a512-1295-4272-9138-f99709370657
* Make the bitmap loading code handle the progressbar and backdrop bitmaps in ↵Nicolas Pennequin2007-06-05
| | | | | | a slightly more generic way. This hopefully simplifies the code a bit and should make adding special bitmaps less painful. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13560 a1c6a512-1295-4272-9138-f99709370657
* Commit my patch from FS#7179 - a standalone command-line checkwps tool. To ↵Dave Chapman2007-05-29
| | | | | | build, just type "make checkwps" in tools and run it with "checkwps wpsname.wps". git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13517 a1c6a512-1295-4272-9138-f99709370657
* Oops, next file info should be dynamic.Nicolas Pennequin2007-05-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13456 a1c6a512-1295-4272-9138-f99709370657
* Add %fk and %Fk WPS tags : (next) file audio frequency in KHz (rewrite of ↵Nicolas Pennequin2007-05-21
| | | | | | FS#6393 to adapt it to the tokenizer). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13455 a1c6a512-1295-4272-9138-f99709370657
* Trim a bunch of long lines and fix an infinite loop and buffer overrun in ↵Nicolas Pennequin2007-05-02
| | | | | | the impossible case that a WPS line ends with a litteral string but without a newline char (wps_parser.c:774). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13306 a1c6a512-1295-4272-9138-f99709370657
* Add a check for unclosed conditionals at the end of the WPS parsing in case ↵Nicolas Pennequin2007-05-02
| | | | | | we didn't reach the end of the file. Also a few minor other changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13303 a1c6a512-1295-4272-9138-f99709370657
* FS #7093 by Dave Hooper: prevent crash when loading too many/long static ↵Peter D'Hoye2007-05-01
| | | | | | strings in the wps git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13302 a1c6a512-1295-4272-9138-f99709370657
* Better handling of strings in the WPS parser by detecting duplicates to ↵Nicolas Pennequin2007-04-30
| | | | | | avoid having two copies of the same string in the string buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13295 a1c6a512-1295-4272-9138-f99709370657
* Change some ifdefs for the recent backdrop changes (fixes the yellow builds) ↵Nicolas Pennequin2007-04-25
| | | | | | and move the backdrop files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13265 a1c6a512-1295-4272-9138-f99709370657
* Add backdrop support for LCD remotes with depth > 1-bit. Only WPS backdrops, ↵Nicolas Pennequin2007-04-25
| | | | | | but the groundwork is laid for main backdrops too (all that's really needed are menus to set/clear them). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13263 a1c6a512-1295-4272-9138-f99709370657
* Make bitmaps use the right format in a RWPS and prevent a backdrop tag in a ↵Nicolas Pennequin2007-04-25
| | | | | | RWPS from clearing the main display's backdrop. This also allows future backdrop support for LCD remotes by making the parsing code aware of whether the display for a WPS is a remote or not. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13261 a1c6a512-1295-4272-9138-f99709370657
* Add a new commandline switch to the simulator: "--debugwps". It enables ↵Nicolas Pennequin2007-04-24
| | | | | | printing of advanced (and very verbose) WPS debugging information. Also make the debugging code a bit cleaner. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13257 a1c6a512-1295-4272-9138-f99709370657
* WPS Parser: On parse failure, print a (hopefully) useful error message with ↵Nicolas Pennequin2007-04-24
| | | | | | | | | line number (sim only). Also the debug code is still disabled but now in a nicer way. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13251 a1c6a512-1295-4272-9138-f99709370657
* More strict WPS parsing and displaying code. If there are errors, WPS ↵Nicolas Pennequin2007-04-21
| | | | | | loading will fail and the default WPS will be displayed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13236 a1c6a512-1295-4272-9138-f99709370657
* General housekeeping: Make plugin buffer functions take size_t * instead of ↵Michael Sevakis2007-04-21
| | | | | | int * to match the parameter type of the buffer functions called in the core. Get rid of unsafe int * <==> size_t * casting. Use ssize_t where int was used and size_t where unsigned int was used in the buffer calls to not alter signedness in the plugins. No API version change since it should only be an issue for 64-bit sim builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13233 a1c6a512-1295-4272-9138-f99709370657
* Added autoscore tag (%ra) to wps.Miika Pekkarinen2007-04-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13169 a1c6a512-1295-4272-9138-f99709370657
* Reverted FS#6949 as we have a strict policy against anonymous contributions.Miika Pekkarinen2007-04-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13168 a1c6a512-1295-4272-9138-f99709370657
* FS#6949 - WPS tag for database autoscore. Author wanted to remain anonymous.Miika Pekkarinen2007-04-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13164 a1c6a512-1295-4272-9138-f99709370657
* * Make the WPS parser close open conditionals on new sublines and comments ↵Nicolas Pennequin2007-04-15
| | | | | | | | | | | as well as new lines. * Make the displaying code check for invalid conditional constructs in order to avoid some rare cases of infinite looping. * Make the WPS parser check that it doesn't read more strings than it can. * Increase the string buffer size (from 512 to 1024, to accomodate the TextBox WPS which uses a lot of unicode characters). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13162 a1c6a512-1295-4272-9138-f99709370657
* Better error checking for the image display tag (%xdn). Should prevent ↵Nicolas Pennequin2007-04-14
| | | | | | problems with the former crossfeed tag (%xd) when used in a conditional construct. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13158 a1c6a512-1295-4272-9138-f99709370657
* FS#7020. Make the behaviour of '#' more consistent. It now requires escaping ↵Nicolas Pennequin2007-04-13
| | | | | | by a '%' to be displayed. If it is not escaped, the following text will be interpreted as a comment (including the newline character). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13140 a1c6a512-1295-4272-9138-f99709370657
* * Add the crossfade (%xf) WPS tagNicolas Pennequin2007-04-12
| | | | | | | * Avoid eating the whole line when unsuccessfully parsing a %x or %xl tag. This will prevent unknown tags starting with %x from making the line disappear. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13127 a1c6a512-1295-4272-9138-f99709370657
* RTC tags for the WPS: Accept FS#6998 and FS#7001 by Alexander Levin with ↵Nicolas Pennequin2007-04-10
| | | | | | | | | | changes by me. CUSTOM WPS FILES NEED TO BE UPDATED ! The RTC tags are now atomic, i.e. instead of using one tag with the format (e.g. %cd m yc), we use several separate tags, one for each value (e.g. %cd %cm %cy). Also, %cP produces an uppercase AM/PM indicator and %cp a lowercase one, which is the opposite from what they did before. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13093 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#7000 by Dave Hooper: Fix scrolling line behaviour for dynamic tags ↵Nicolas Pennequin2007-04-09
| | | | | | (e.g. when a line with info about the next track didn't scroll) and fix some incorrect refreshing flags. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13081 a1c6a512-1295-4272-9138-f99709370657
* Skip leading UTF8 BOM if present. Fixes the first line of the WPS not being ↵Nicolas Pennequin2007-04-08
| | | | | | understood as a comment when it is one. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13074 a1c6a512-1295-4272-9138-f99709370657
* Oops, this shouldn't have been removed (fix red).Nicolas Pennequin2007-04-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13066 a1c6a512-1295-4272-9138-f99709370657
* FS#6991. Patch by Alexander Levin, modified by me:Nicolas Pennequin2007-04-08
| | | | | | | | * Reorganisation of the WPS data structure with line and subline structs. This allows us to use sublines more sparingly, so it should save some memory. Also it removes the need for the "End Of Line" token. Overall, the data structure and the code are simplified and gain in clarity. * Some code improvements and added comments. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13065 a1c6a512-1295-4272-9138-f99709370657
* This time I hope I got it right! Basically, remove what the previous commit ↵Nicolas Pennequin2007-04-06
| | | | | | about subline timeouts added and make the values be computed by a special function at display time. This should bring complete compatibility with the previous code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13047 a1c6a512-1295-4272-9138-f99709370657
* Better handling of subline timeout values : All values are set to the ↵Nicolas Pennequin2007-04-06
| | | | | | | | | | default before another value is found by the parser. No more resetting to the default value at displaying time (this caused problems especially noticeable on the DancePuffDuo WPS). Changing the values with conditionals is still possible but only strictly positive tiemout values are accepted now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13045 a1c6a512-1295-4272-9138-f99709370657
* * Fix the bug where subline separators were read as part of a string.Nicolas Pennequin2007-04-05
| | | | | | | * Some cosmetic code changes, no other functional change (add a comment and rename some variables). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13034 a1c6a512-1295-4272-9138-f99709370657
* Rearrange struct wps_tag to avoid padding. Hopefully save some bytes.Dan Everton2007-04-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13033 a1c6a512-1295-4272-9138-f99709370657
* Allow subline timeout values to be changed dynamically in the WPS (e.g. by ↵Nicolas Pennequin2007-04-05
| | | | | | using conditionals). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13026 a1c6a512-1295-4272-9138-f99709370657
* * Make some private variables 'static'.Nicolas Pennequin2007-04-04
| | | | | | | * Fix the pitch tag and allow it to be used on all targets except the Archos Player. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13020 a1c6a512-1295-4272-9138-f99709370657
* Introducing the WPS tokenizer !Nicolas Pennequin2007-04-04
When a WPS file is loaded, it is parsed to an array of tokens, which allows more efficient displaying. More info on the tracker entry : FS #6862. The parsing code is completely independant and is all in wps_parser.c. The displaying part stays in gwps-common.c. Debugging code is provided (with the right ifdefs) and is disabled by default. Overall, the code should be easier to read and maintain. Adding new WPS tags is made quite trivial. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13019 a1c6a512-1295-4272-9138-f99709370657