characters in a tag could cause the parser fail to import a track
statistics correctly. Now line feeds are escaped properly and carriage
returns ignored on import.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30021 a1c6a512-1295-4272-9138-f99709370657
memory. One of these headers (current_tcmh) was not loaded in when
tagcache state was initialized from a hibernated state file (flashed
H1xx targets). That caused internal serial number to start always from
zero, rendering "recently played tracks" query not working as expected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30016 a1c6a512-1295-4272-9138-f99709370657
* There's no need to reset the buffer argument to
check_against_clauses to 0 when it's not needed. We can always
initialize str = buf and only change it on a RAM search hit.
* Do not memset buffer to 0 -- it's sufficient to make sure the
retrieved tag string is zero-terminated.
* Factor out a call to check_virtual_tags from two branches of an if
statement.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29981 a1c6a512-1295-4272-9138-f99709370657
used for nonnumeric tags as well.
Optimization for the nonnumeric case: Only numerics are ever updated,
so there's no need to scan the command queue for updates to nonnumeric
tags.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29979 a1c6a512-1295-4272-9138-f99709370657
all three of album, artist, and title tags to match for resurrection
to take place.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29858 a1c6a512-1295-4272-9138-f99709370657
Logical-AND ("&") always takes precedence over logical-OR.
(Parentheses are not supported.)
Fight binsize increase by storing some common expressions in local
variables. This avoids repeated reevaluations involving memory
accesses.
check_clauses: Fail clause (return false) in case of errors (tag too
long, DB entry deleted).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29851 a1c6a512-1295-4272-9138-f99709370657
Correct an omission that happened when the DB schema was changed last
time. Add a comment to enum tag_type to prevent this from happening
in the future.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29435 a1c6a512-1295-4272-9138-f99709370657
At least on android it blindly writes to the end of the buffer passed to it assuming it's sufficiently. It wasn't in our case, resulting in a buffer overflow (and breakage).
This should fix strange problems relating to database initialization on application targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29147 a1c6a512-1295-4272-9138-f99709370657
Fix for FS#11856: In tagtree_buffer_event, do not wait for database to
come online as that may never happen. Rather, wait until it either
has come online or has decided that this will never happen. Added a
new function to tagcache.c to export this information.
Flyspray: FS#11865
Author: Michael Hohmuth
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29081 a1c6a512-1295-4272-9138-f99709370657
First, it add the ability to tagcache to walk through multiple search roots.
Second, it adds symlinks targets to the search roots if they're are not inside any of the current search roots, otherwise the symlink is ignored (unless it's a file).
The default search root is still /, so no search root will be actually added.
But the tagcache now isn't trapped by recursive symlinks anymore and successfully builds, and it's prepared for a future music directory setting.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28884 a1c6a512-1295-4272-9138-f99709370657
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants.
Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know).
For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one,
the values can be retrieved via the new dir_get_info().
Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox).
This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local.
On the DAPs it's a no-op, returing /.rockbox directly.
Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
boot-up. Should fix "Recently added" entries remaining empty when
dircache is not used nor database is loaded to ram. Also, don't load
load hibernated statefile on H1xx targets when database loading to ram has
been disabled explicitly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27484 a1c6a512-1295-4272-9138-f99709370657
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.
Should be no functional change to targets or the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
Fixing it because correcting the event api prototypes causes many warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657