1. 30 Jul, 2006 3 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
      remove deprecated myfprintf wrapper · 381d7232
      Eric Wong authored
      This shaves another 5-6k because we've removed the paranoid
      fflush() calls after every fprintf.  Now we only fflush()
      when we need to
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@4493 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      381d7232
    • 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
  2. 26 Jul, 2006 1 commit
  3. 22 Jul, 2006 1 commit
  4. 20 Jul, 2006 1 commit
  5. 17 Jul, 2006 1 commit
    • Eric Wong's avatar
      sparse: ANSI-fy function declarations · a234780a
      Eric Wong authored
      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
      a234780a
  6. 16 Jul, 2006 2 commits
  7. 15 Jul, 2006 1 commit
  8. 14 Jul, 2006 1 commit
  9. 13 Jul, 2006 2 commits
  10. 20 May, 2006 1 commit
  11. 08 May, 2006 1 commit
  12. 05 Apr, 2006 1 commit
  13. 18 Mar, 2006 1 commit
    • Eric Wong's avatar
      rewrite statefile code for audio devices · a25acbc9
      Eric Wong authored
      In the words of the original author, it was 'crappy'.  I tend to
      agree :)
      
      The code has also been broken for at least the past few months,
      and nobody bothered fixing it
      
      The previous format it was overly complex: 5 lines to describe
      each device.  The new format is one-line per-device:
      
      audio_device_state:%d:%s
      
      %d - 0 for disabled, any integer for enabled
      %s - name of the device as specified in the config file,
      whitespace and all
      
      Incompatibilities:
      
      * Output names are now _required_ to be unique.
      
      This is required because the new format relies solely on the
      name of the audio device.
      
      Relying on the device IDs internal to MPD was a bad idea
      anyways since the user usually has none or very little idea
      how they're generated, and adding a new device or removing
      one from a config would throw things off completely.
      
      This is also just a Good Idea(TM) because it makes things
      less confusing to users when they see it in their clients.
      
      * Output states are not preserved from the previous format.
      
      Not a big deal, since the previous code was never officially
      released.  Also, it's been broken for months now, so I doubt
      anybody would notice :)
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@3928 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      a25acbc9
  14. 23 Aug, 2005 1 commit
  15. 11 Aug, 2005 1 commit
  16. 13 Mar, 2005 1 commit
  17. 12 Mar, 2005 1 commit
  18. 05 Mar, 2005 2 commits
  19. 15 Nov, 2004 1 commit
  20. 09 Nov, 2004 2 commits
  21. 02 Nov, 2004 5 commits
  22. 28 Oct, 2004 2 commits
  23. 26 Oct, 2004 1 commit
  24. 25 Oct, 2004 1 commit
  25. 23 Oct, 2004 1 commit
  26. 22 Oct, 2004 3 commits
  27. 20 Oct, 2004 1 commit