1. 02 Aug, 2012 1 commit
  2. 09 Sep, 2011 2 commits
  3. 29 Jan, 2011 1 commit
  4. 23 Dec, 2010 1 commit
  5. 01 Jan, 2010 1 commit
  6. 08 Nov, 2009 1 commit
  7. 06 Nov, 2009 1 commit
  8. 13 Mar, 2009 1 commit
    • Avuton Olrich's avatar
      all: Update copyright header. · 0aee49bd
      Avuton Olrich authored
      This updates the copyright header to all be the same, which is
      pretty much an update of where to mail request for a copy of the GPL
      and the years of the MPD project. This also puts all committers under
      'The Music Player Project' umbrella. These entries should go
      individually in the AUTHORS file, for consistancy.
      0aee49bd
  9. 19 Feb, 2009 1 commit
    • Max Kellermann's avatar
      utils: use g_usleep() instead of my_usleep() · e7131b5d
      Max Kellermann authored
      Now that I've found this nice function in the GLib docs, we can
      finally remove our custom sleep function.  Still all those callers of
      g_usleep() have to be migrated one day to use events, instead of
      regular polling.
      e7131b5d
  10. 03 Jan, 2009 3 commits
  11. 30 Dec, 2008 1 commit
  12. 28 Dec, 2008 2 commits
  13. 09 Dec, 2008 1 commit
  14. 02 Dec, 2008 1 commit
  15. 22 Nov, 2008 1 commit
    • Laszlo Ashin's avatar
      utils: introduce assert_static() · 457a6f4b
      Laszlo Ashin authored
      assert_static() will help us to find false asserts in compile time. Of
      course it only works in case of expressions which can be evaluated
      compile time. It cannot be used in global scope.
      457a6f4b
  16. 01 Nov, 2008 1 commit
  17. 31 Oct, 2008 1 commit
    • Max Kellermann's avatar
      added prefix to header macros · ea515494
      Max Kellermann authored
      "LOG_H" is a macro which is also used by ffmpeg/log.h.  This is
      ffmpeg's fault, because short macros should be reserved for
      applications, but since it's always a good idea to choose prefixed
      macro names, even for applications, we are going to do that in MPD.
      ea515494
  18. 29 Oct, 2008 1 commit
  19. 28 Oct, 2008 1 commit
  20. 15 Oct, 2008 1 commit
  21. 08 Oct, 2008 1 commit
  22. 23 Sep, 2008 1 commit
    • Eric Wong's avatar
      Add prefixcmp() (stol^H^H^H^Hborrowed from git) · f5df13f8
      Eric Wong authored
      This allows us to avoid the nasty repetition in strncmp(foo,
      bar, strlen(foo)).  We'll miss out on the compiler optimizing
      strlen() into sizeof() - 1 for string literals for this; but we
      don't use this it for performance-critical functions anyways...
      f5df13f8
  23. 29 Aug, 2008 1 commit
    • Max Kellermann's avatar
      added xfree() which takes a const pointer · f42de62a
      Max Kellermann authored
      Unfortunately, the C standard postulates that the argument to free()
      must be non-const.  This does not makes sense, and virtually prevents
      every pointer which must be freed at some time to be non-const.  Use
      the deconst hack (sorry for that) to allow us to free constant
      pointers.
      f42de62a
  24. 30 Jun, 2008 2 commits
  25. 12 Apr, 2008 1 commit
    • Max Kellermann's avatar
      clean up CPP includes · c89b358c
      Max Kellermann authored
      Try to only include headers which are really needed.  We should
      particularly check all "headers including other headers".  The
      long-term goal is to have a manageable, small API for plugins
      (decoders, output) without so many mpd internals cluttering the
      namespace.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      c89b358c
  26. 26 Mar, 2008 1 commit
    • Eric Wong's avatar
      notify: cleanups · 232c9f6c
      Eric Wong authored
      * move set_nonblock{,ing}() into utils.c since we use it
      elsewhere, too
      * add proper error checking to set_nonblocking()
      * use os_compat.h instead of individually #includ-ing system headers
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7217 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      232c9f6c
  27. 03 Jan, 2008 1 commit
    • Eric Wong's avatar
      Cleanup #includes of standard system headers and put them in one place · cb8f1af3
      Eric Wong authored
      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
      cb8f1af3
  28. 28 Dec, 2007 1 commit
    • Eric Wong's avatar
      Merge branches/ew r7104 · b79f6b88
      Eric Wong authored
      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
      b79f6b88
  29. 13 Jun, 2007 1 commit
  30. 05 Apr, 2007 1 commit
  31. 26 Aug, 2006 1 commit
    • Eric Wong's avatar
      Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors · 90847fc8
      Eric Wong authored
      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
      90847fc8
  32. 22 Aug, 2006 1 commit
  33. 20 Aug, 2006 1 commit
  34. 30 Jul, 2006 2 commits
    • Eric Wong's avatar
      Standardize state_file handling routines. · 12aec573
      Eric Wong authored
      This way it's easier to manage and extend.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@4494 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      12aec573
    • Eric Wong's avatar
      interface/connection malloc reductions from mpd-ke · 4cf5d04c
      Eric Wong authored
      This patch massively reduces the amount of heap allocations at
      the interface/command layer.  Most commands with minimal output
      should not allocate memory from the heap at all.  Things like
      repeatedly polling status, currentsong, and volume changes
      should be faster as a result, and more importantly, not a source
      of memory fragmentation.
      
      These changes should be safe in that there's no way for a
      remote-client to corrupt memory or otherwise do bad stuff to
      MPD, but an extra set of eyes to review would be good.  Of
      course there's never any warranty :)
      
      No longer do we use FILE * structures in the interface, which means
      we don't have to allocate any new memory for most connections.
      
      Now, before you go on about losing the buffering that FILE *
      +implies+, remember that myfprintf() never took advantage of
      any of the stdio buffering features.
      
      To reduce the diff and make bugs easier to spot in the diff,
      I've kept myfprintf in places where we write to files (and not
      network interfaces).  Expect myfprintf to go away entirely soon
      (we'll use fprintf for writing regular files).
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@4483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      4cf5d04c