| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
[ew: cleaned up the dirty union hack a bit]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
thread-safety work in preparation for rewrite to use pthreads
Expect no regressions against trunk (r7078), possibly minor
performance improvements in update (due to fewer heap
allocations), but increased stack usage.
Applied the following patches:
* maxpath_str for reentrancy (temporary fix, reverted)
* path: start working on thread-safe variants of these methods
* Re-entrancy work on path/character-set conversions
* directory.c: exploreDirectory() use reentrant functions here
* directory/update: more use of reentrant functions + cleanups
* string_toupper: a strdup-less version of strDupToUpper
* get_song_url: a static-variable-free version of getSongUrl()
* Use reentrant/thread-safe get_song_url everywhere
* replace rmp2amp with the reentrant version, rmp2amp_r
* Get rid of the non-reentrant/non-thread-safe rpp2app, too.
* buffer2array: assert strdup() returns a usable value in unit tests
* replace utf8ToFsCharset and fsCharsetToUtf8 with thread-safe variants
* fix storing playlists w/o absolute paths
* parent_path(), a reentrant version of parentPath()
* parentPath => parent_path for reentrancy and thread-safety
* allow "make test" to automatically run embedded unit tests
* remove convStrDup() and maxpath_str()
* use MPD_PATH_MAX everywhere instead of MAXPATHLEN
* path: get rid of appendSlash, pfx_path and just use pfx_dir
* get_song_url: fix the ability to play songs in the top-level music_directory
git-svn-id: https://svn.musicpd.org/mpd/trunk@7106 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6874 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
the force flag will issue FATAL() if an invalid value is
specified
git-svn-id: https://svn.musicpd.org/mpd/trunk@6857 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6622 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
call to FATAL().
git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
sounds much better for those who need it and don't want to use pulseaudio. Reviewed by shank/avuton.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5316 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
| |
Some compilers and linkers aren't smart enough to optimize this,
as global variables are implictly initialized to zero. As a
result, binaries are a bit smaller as more goes in the .bss and
less in the text section.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5254 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@5238 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
| |
MP3 playback, thus allowing songs that run longer than the Xing frame
claims (f.e., an MP3 created by catting two MP3s together) to continue
playing past the end.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5157 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4875 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Warren's fix in r4872 made phpMp work again, but also broke
the unit tests completely (they work in this version).
The version in 0.12.0 is far too buggy (it was from mpd-ke, what
do you expect?). This one passes all the unit tests that the
mpd-ke one passed, and should also work with phpMp when used
with PHP magic quotes.
This also means we can search on 100 (or more) tags at once, so
no more arbitrary limits other than system memory.
To run the unit tests, just do this:
gcc -o t -DUNIT_TEST=1 src/buffer2array.c && ./t && echo OK
git-svn-id: https://svn.musicpd.org/mpd/trunk@4874 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
config parameters that the new (yet to be committed) mpdconf.example will use.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4715 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
to names that look extremely std-lib-ish. also, don't use isspace, apparently it's local dependent and potentially consideres ' ' or '\t' not to be a space, or considers other characters to be a space.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4574 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4489 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4482 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
| |
This modifies the string in place, and does not allocate any memory from
the heap. This is considerably smaller than the function it replaces,
and will be instrumental in getting the commands/conf malloc reductions
done.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4481 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4477 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
mplayer, ported by syscrash, cleaned up by avuton, and further cleaned up by me (jat).
git-svn-id: https://svn.musicpd.org/mpd/trunk@4424 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4419 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4417 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
Indent the entire tree, hopefully we can keep
it indented.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are just warnings from sparse, but it makes the output
easier to read. I ran this through a quick perl script, but
of course verified the output by looking at the diff and making
sure the thing still compiles.
here's the quick perl script I wrote to generate this patch:
----------- 8< -----------
use Tie::File;
defined(my $pid = open my $fh, '-|') or die $!;
if (!$pid) {
open STDERR, '>&STDOUT' or die $!;
exec 'sparse', @ARGV or die $!;
}
my $na = 'warning: non-ANSI function declaration of function';
while (<$fh>) {
print STDERR $_;
if (/^(.+?\.[ch]):(\d+):(\d+): $na '(\w+)'/o) {
my ($f, $l, $pos, $func) = ($1, $2, $3, $4);
$l--;
tie my @x, 'Tie::File', $f or die "$!: $f";
print '-', $x[$l], "\n";
$x[$l] =~ s/\b($func\s*)\(\s*\)/$1(void)/;
print '+', $x[$l], "\n";
untie @x;
}
}
git-svn-id: https://svn.musicpd.org/mpd/trunk@4378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
it in the source
git-svn-id: https://svn.musicpd.org/mpd/trunk@4332 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
the GPL header where necessary
git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
if it wasn't it'd probably be better to add a argument to
getConfigParamValue()
git-svn-id: https://svn.musicpd.org/mpd/trunk@4313 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4282 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@4130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@3922 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@3920 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@3689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@3681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
we actually got a given field from the v1 and not the v2 tag
git-svn-id: https://svn.musicpd.org/mpd/trunk@3052 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
| |
*) we now require pid_file to specified in the config
*) new prefered method for killing mpd: mpd --kill
*) cleaned up some nastiness with decode_pid handling
git-svn-id: https://svn.musicpd.org/mpd/trunk@3042 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
also, should have better error reporting when failing to open playlist or
music directory's, or writing the db, etc
git-svn-id: https://svn.musicpd.org/mpd/trunk@3027 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@2603 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@2602 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@2589 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@2479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@2467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
like it like this?
git-svn-id: https://svn.musicpd.org/mpd/trunk@2465 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@2435 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|