aboutsummaryrefslogtreecommitdiffstats
path: root/src/conf.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2006-08-28Rearrange mpd.conf.5 and conf.[ch] to use the more logical ordering of ↵J. Alexander Treuman1-23/+23
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
2006-08-26Replace strdup and {c,re,m}alloc with x* variants to check for OOM errorsEric Wong1-7/+7
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/+2
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-11Spelling & GrammarAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-06renamce cstrtok to buffer2array. please don't rename functions; especially ↵Warren Dukes1-2/+2
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
2006-07-30gcc signedness and sparse fixesEric Wong1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@4489 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30conf.c: bugfix: print out the number, not the addressEric Wong1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4482 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-29replace buffer2array() with cstrtok() from mpd-keEric Wong1-11/+6
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
2006-07-27conf.[ch] whitespace cleanupJ. Alexander Treuman1-39/+39
git-svn-id: https://svn.musicpd.org/mpd/trunk@4477 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-27Use AudioCompress for volume normalizationJ. Alexander Treuman1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@4474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-22Adding on the fly volume normalization support. Code originally from ↵J. Alexander Treuman1-0/+1
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
2006-07-21Make getBoolConfigParam and save_absolute_paths_in_playlist less stupidJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4419 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-21Add a getBoolConfigParam functionJ. Alexander Treuman1-0/+13
git-svn-id: https://svn.musicpd.org/mpd/trunk@4417 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich1-168/+195
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
2006-07-17sparse: ANSI-fy function declarationsEric Wong1-2/+2
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
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-14[CLEANUP] Remove function from header, staticAvuton Olrich1-1/+1
it in the source git-svn-id: https://svn.musicpd.org/mpd/trunk@4332 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Remove forceGetConfigParamValue, it's unused and evenAvuton Olrich1-11/+0
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
2006-06-21Add back the id3v1_encoding option. Now it really will convert id3v1 only.J. Alexander Treuman1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@4282 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-04-30Remove unused config valueQball Cow1-1/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@4130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-03-16conf.c: correctly parse "~username/file" in config filesEric Wong1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@3922 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-03-15conf.c: speling ficksesEric Wong1-3/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@3920 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-11-19remove C++ style commentsEric Wong1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@3689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-11-18DJWLindenaar's fix race condition and some memory leaks patchQball Cow1-0/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@3681 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-03-11removed the id3v1_encoding config option, there's no way to guarantee that ↵Warren Dukes1-1/+0
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
2005-03-09*) add support for pid filesWarren Dukes1-0/+1
*) 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
2005-03-06config file change! now 'port' is optional and 'db_file' is required!Warren Dukes1-2/+2
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
2004-11-11fix a few memory leaks in conf.cWarren Dukes1-2/+9
git-svn-id: https://svn.musicpd.org/mpd/trunk@2603 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-11ok, now song->url is only the filename, not the full path to the songWarren Dukes1-2/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@2602 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-10merge changes from metadata-rewrite branchWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@2589 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-02make http buffer and prebuffer size configurableWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@2479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-02a few extra strerror()'s sprinkled in the codeWarren Dukes1-1/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@2467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-02does this make you happy normalperson, is this the way you like it, do you ↵Warren Dukes1-4/+4
like it like this? git-svn-id: https://svn.musicpd.org/mpd/trunk@2465 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-31fix a config file errorWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@2435 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-28merge shank-rewrite-config changesWarren Dukes1-226/+340
git-svn-id: https://svn.musicpd.org/mpd/trunk@2375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-23configure shout encoding quality and audio formatWarren Dukes1-2/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@2307 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-05apply dottemag's id3v1 encodings patchWarren Dukes1-2/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@2163 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-09-02add configuration variables for shout stuffWarren Dukes1-2/+9
git-svn-id: https://svn.musicpd.org/mpd/trunk@2099 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-08-10for improperly config file lines, print the line numberWarren Dukes1-2/+6
also, in myFgets, chop off '\r' at the end of the line (thanx mr gates) git-svn-id: https://svn.musicpd.org/mpd/trunk@2000 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-17add replaygain preampWarren Dukes1-2/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@1873 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-15deal with user and ~ in config file more nicelyWarren Dukes1-5/+19
git-svn-id: https://svn.musicpd.org/mpd/trunk@1871 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-20add http proxy config options (no http proxy code yet)Warren Dukes1-3/+6
git-svn-id: https://svn.musicpd.org/mpd/trunk@1584 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-12update mpd manpage and sample config file with replaygain andWarren Dukes1-1/+1
audio_output_format options git-svn-id: https://svn.musicpd.org/mpd/trunk@1453 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05new command, plchanges, and also add Num: to songinfo of playlistinfoWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1339 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10stuff for configuring the audio output format (sampling rate, channels, bits)Warren Dukes1-2/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@967 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-07add replayGain stuff for flac from AliasMrJonesWarren Dukes1-2/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@943 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14add vim shiznit to end of all source filesWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-04make default max playlist length be 16384. bumped up from 4096Warren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@602 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-02use EXIT_SUCCESS and EXIT_FAILUREWarren Dukes1-7/+7
git-svn-id: https://svn.musicpd.org/mpd/trunk@591 09075e82-0dd4-0310-85a5-a0d7c8717e4f