aboutsummaryrefslogtreecommitdiffstats
path: root/src/tree.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-01-26fix -Waggregate-returnMax Kellermann1-2/+2
Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7145 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-4/+1
This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26Replace strdup and {c,re,m}alloc with x* variants to check for OOM errorsEric Wong1-2/+3
I'm checking for zero-size allocations and assert()-ing them, so we can more easily get backtraces and debug problems, but we'll also allow -DNDEBUG people to live on the edge if they wish. We do not rely on errno when checking for OOM errors because some implementations of malloc do not set it, and malloc is commonly overridden by userspace wrappers. I've spent some time looking through the source and didn't find any obvious places where we would explicitly allocate 0 bytes, so we shouldn't trip any of those assertions. We also avoid allocating zero bytes because C libraries don't handle this consistently (some return NULL, some not); and it's dangerous either way. git-svn-id: https://svn.musicpd.org/mpd/trunk@4690 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20Fix warnings for -Wmissing-prototypesAvuton Olrich1-2/+1
Add -Wmissing-prototypes if compiling with gcc Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-09we have the parentPos, so use it when incrementing the tree iterator.Warren Dukes1-14/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@4604 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-07sparse / gcc-2.95 / -pedantic fixesEric Wong1-28/+34
Not everybody has access to the latest and greatest compilers. git-svn-id: https://svn.musicpd.org/mpd/trunk@4595 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-06merge changes from mpd-tree:Warren Dukes1-0/+712
-use tree for tagTracker -eliminate the master process git-svn-id: https://svn.musicpd.org/mpd/trunk@4571 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-03remove tree.[ch] from trunk, it will be added back once the mpd-tree branch isWarren Dukes1-673/+0
merged back into trunk git-svn-id: https://svn.musicpd.org/mpd/trunk@4535 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-02tree optimization: reduce the number of compares required for insertion and ↵Warren Dukes1-101/+103
deletion by storing the position in the parent node of each child git-svn-id: https://svn.musicpd.org/mpd/trunk@4532 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01fix a bug when deleting node and CHILDREN_PER_NODE is evenWarren Dukes1-3/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@4508 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01fix a bug when deleting songs and CHILDREN_PER_NODE > 3Warren Dukes1-8/+6
git-svn-id: https://svn.musicpd.org/mpd/trunk@4507 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01a couple of small cleanupsWarren Dukes1-51/+40
git-svn-id: https://svn.musicpd.org/mpd/trunk@4506 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01deletion of tree nodes now works.Warren Dukes1-5/+13
next is to clean up the code and make obvious optimizations git-svn-id: https://svn.musicpd.org/mpd/trunk@4502 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-31some tree bugfixesWarren Dukes1-37/+78
git-svn-id: https://svn.musicpd.org/mpd/trunk@4498 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-31tree updates:Warren Dukes1-6/+228
*) add copyright notice *) implemented node deletion, but not yet tested git-svn-id: https://svn.musicpd.org/mpd/trunk@4496 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30tree updates:Warren Dukes1-50/+203
*) when CHILDREN_PER_NODE is large, use binary search *) add a iterator implementation *) some code cleanup git-svn-id: https://svn.musicpd.org/mpd/trunk@4492 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30beginnings of a B-tree, currently insertion has been implemented and testWarren Dukes1-0/+260
git-svn-id: https://svn.musicpd.org/mpd/trunk@4487 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-15[CLEANUP] Cleanup whitespace->tabsAvuton Olrich1-70/+0
Remove dead code Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4345 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-0/+18
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-02-24begin tree implementationWarren Dukes1-0/+52
git-svn-id: https://svn.musicpd.org/mpd/trunk@2984 09075e82-0dd4-0310-85a5-a0d7c8717e4f