Make to compile.

Short description of files and operations

- playlist.db:
  db4 file with filename as keys and votes as values.
  both in C-string notation including trailing 0.
  Reread automatically if mtime changes.
  files from thing are randomly selected depending on their vote count.
  Rewritten when votes are recalculated
- adddirtoplaylist:
  To add directories to the playlist file, you can use this miniscript
- recently_played:
  generated list of last files played. one pathname per line
  rewritten at every new song, most recently first.
- static_list:
  Contains pathnames of files to be played in this fixed order.
  The first line is read in and removed at every time a new song is due.
  As long as this file is non-empty, the playlist is not consulted
- rtpjukeboxplayer.pid:
  contains the pid of the current player process.
- vote.php
  a simple voting page in php
- vote.cgi
  a cgi in C for voting. Basically the same functionality as
  vote.php. Needs libcgi (libcgi.sf.net) to compile.

The idea goes as follows:
You can have your jukebox in fixed order with the static_list file. When
this is empty, the playlist is used. The playlist is weighted on the votes. The
votes are decreased by a fixed percentage every period (half-life period
style; default 10% per day, roughly 6.5 days half-life time)

The vote.php is is minimalistic webinterface for users. Note that is
needs write permissions to all those files.

Hints: Files where the beginning changes (static_list, recently_played)
are written to a temporary file and then rename(2)'d to the original
filename. Some files need to exist, even if just empty. Chokes on certain characters in filenames (Positively tested: all quotes and apostrophes)
