chiark / gitweb /
Merge branch 'protogen'
authorRichard Kettlewell <rjk@terraraq.org.uk>
Sun, 7 Aug 2011 16:45:36 +0000 (17:45 +0100)
committerRichard Kettlewell <rjk@terraraq.org.uk>
Sun, 7 Aug 2011 16:45:36 +0000 (17:45 +0100)
40 files changed:
cgi/disorder-cgi.h
cgi/options.c
clients/disorder.c
clients/disorderfm.c
clients/resample.c
disobedience/misc.c
disobedience/playlists.c
disobedience/properties.c
disobedience/queue-generic.c
doc/disorder.cgi.8.in
doc/disorder_options.5.in
lib/configuration.h
lib/eventdist.c
lib/eventlog.c
lib/eventlog.h
lib/hash.c
lib/queue.c
lib/resample.c
lib/resample.h
lib/signame.c
lib/snprintf.c
lib/strptime.c
lib/strptime.h
lib/trackdb.c
lib/validity.h
plugins/tracklength-flac.c
plugins/tracklength.h
python/disorder.py.in
server/decode-flac.c
server/decode-ogg.c
server/decode-wav.c
server/disorderd.c
server/plugin.c
server/rescan.c
server/server.c
templates/Makefile.am
templates/about.tmpl
templates/macros.tmpl
templates/options
templates/options.columns [deleted file]

index 43ad24172d0dae7d08dff3caf53ad15da94a40a2..e9deab21c295b997d1f4e6d55a5eeb5d1f7cbc3c 100644 (file)
@@ -77,7 +77,6 @@ struct queue_entry *dcgi_findtrack(const char *id);
 void option_set(const char *name, const char *value);
 const char *option_label(const char *key);
 int option_label_exists(const char *key);
-char **option_columns(const char *name, int *ncolumns);
 
 #define DCGI_QUEUE 0x0001
 #define DCGI_PLAYING 0x0002
index fca5801caa3024d2acb99df61b095ade57afcaa7..521ce354016d1e3dbda11514caca6f5255802e9a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder.
- * Copyright (C) 2004-2008 Richard Kettlewell
+ * Copyright (C) 2004-2008, 2011 Richard Kettlewell
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 #include "disorder-cgi.h"
 
-struct column {
-  int ncolumns;
-  char **columns;
-};
-
+/** @brief State for parsing an options file */
 struct read_options_state {
+  /** @brief Filename */
   const char *name;
+
+  /** @brief Line number */
   int line;
 };
 
 static hash *labels;
-static hash *columns;
 
 static void option__readfile(const char *name);
 
@@ -49,21 +47,17 @@ static void option__include(int attribute((unused)) nvec,
   option__readfile(vec[0]);
 }
 
-static void option__columns(int nvec,
-                          char **vec) {
-  struct column c;
-
-  c.ncolumns = nvec - 1;
-  c.columns = &vec[1];
-  hash_add(columns, vec[0], &c, HASH_INSERT_OR_REPLACE);
-}
-
+/** @brief Definition of an option command */
 static struct option {
+  /** @brief Command name */
   const char *name;
-  int minargs, maxargs;
+  /** @brief Minimum number of arguments */
+  int minargs;
+  /** @brief Maximum number of arguments */
+  int maxargs;
+  /** @brief Command handler */
   void (*handler)(int nvec, char **vec);
 } options[] = {
-  { "columns", 1, INT_MAX, option__columns },
   { "include", 1, 1, option__include },
   { "label", 2, 2, option__label },
 };
@@ -118,7 +112,6 @@ static void option__init(void) {
   if(!have_read_options) {
     have_read_options = 1;
     labels = hash_new(sizeof (char *));
-    columns = hash_new(sizeof (struct column));
     option__readfile("options");
   }
 }
@@ -186,27 +179,6 @@ int option_label_exists(const char *key) {
   return !!hash_find(labels, key);
 }
 
-/** @brief Return a column list
- * @param name Context (playing/recent/etc)
- * @param ncolumns Where to store column count or NULL
- * @return Pointer to column list
- */
-char **option_columns(const char *name, int *ncolumns) {
-  struct column *c;
-
-  option__init();
-  c = hash_find(columns, name);
-  if(c) {
-    if(ncolumns)
-      *ncolumns = c->ncolumns;
-    return c->columns;
-  } else {
-    if(ncolumns)
-      *ncolumns = 0;
-    return 0;
-  }
-}
-
 /*
 Local Variables:
 c-basic-offset:2
index 5d47bb120174dbecfd9cb1e466f574587d14e0af..b401c62bbdb4204d054eedadf00b6b3592b2ba06 100644 (file)
@@ -505,9 +505,15 @@ static void cf_setup_guest(char **argv) {
     exit(EXIT_FAILURE);
 }
 
+/** @brief A scheduled event read from the server */
 struct scheduled_event {
+  /** @brief When event should occur */
   time_t when;
+
+  /** @brief Details of action */
   struct kvp *actiondata;
+
+  /** @brief Event ID */
   char *id;
 };
 
@@ -669,12 +675,28 @@ static void cf_playlist_set(char **argv) {
     exit(EXIT_FAILURE);
 }
 
-static const struct command {
+/** @brief Command-line client's definition of a command */
+static const struct client_command {
+  /** @brief Command name */
   const char *name;
-  int min, max;
+
+  /** @brief Minimum number of argument */
+  int min;
+
+  /** @brief Maximum number of argument */
+  int max;
+
+  /** @brief Pointer to function implementing command */
   void (*fn)(char **);
+
+  /** @brief Function to recognize a valid argument, or NULL */
   int (*isarg)(const char *);
-  const char *argstr, *desc;
+
+  /** @brief Summary of arguments */
+  const char *argstr;
+
+  /** @brief Description */
+  const char *desc;
 } commands[] = {
   { "adduser",        2, 3, cf_adduser, isarg_rights, "USERNAME PASSWORD [RIGHTS]",
                       "Create a new user" },
index ed31dd073025ebc66384be48f7f938b00331fd91..14092dad74b1c9aa90d0586a6f237145d4ddb0d1 100644 (file)
@@ -73,7 +73,7 @@ static const char *nativeencoding;
 /* Count of errors */
 static long errors;
 
-/* Included/excluded filename patterns */
+/** @brief Included/excluded filename pattern */
 static struct pattern {
   struct pattern *next;
   const char *pattern;
index bc41013b6fb343b55d7b0b759b475aab0271a661..6291c8336decc2798fd23e8b6a2b3c2cabcc28f7 100644 (file)
@@ -15,6 +15,9 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+/** @file clients/resample.c
+ * @brief Audio resampler
+ */
 #include "common.h"
 
 #include <unistd.h>
index a1fdf4d5f7b72d9ec2bdb96097d366f62503f788..38788241cd7e875552b679cc5baf3c3c64538900 100644 (file)
 #include "disobedience.h"
 #include "table.h"
 
+/** @brief Embedded image */
 struct image {
+  /** @brief Image name */
   const char *name;
+  /** @brief Image data in GDK pixbuf inline format */
   const guint8 *data;
 };
 
index 50e099ffa0f2375591b880925a16d8987c713dbb..c5273aebad253df8111828b446a0f47f8a33b316 100644 (file)
@@ -580,7 +580,7 @@ static const char *playlist_new_valid(void) {
 /** @brief Get entered new-playlist details
  * @param namep Where to store entered name (or NULL)
  * @param fullnamep Where to store computed full name (or NULL)
- * @param sharep Where to store 'shared' flag (or NULL)
+ * @param sharedp Where to store 'shared' flag (or NULL)
  * @param publicp Where to store 'public' flag (or NULL)
  * @param privatep Where to store 'private' flag (or NULL)
  */
@@ -664,7 +664,8 @@ static void playlist_picker_fill(const char attribute((unused)) *event,
 }
 
 /** @brief Update a section in the picker tree model
- * @param section Section name
+ * @param title Display name of section
+ * @param key Key to search for
  * @param start First entry in @ref playlists
  * @param end Past last entry in @ref playlists
  */
@@ -695,8 +696,7 @@ static void playlist_picker_update_section(const char *title, const char *key,
  * @param title Display name of section
  * @param key Key to search for
  * @param iter Iterator to point at key
- * @param create If TRUE, key will be created if it doesn't exist
- * @param compare Row comparison function
+ * @param create Whether to create the row
  * @return TRUE if key exists else FALSE
  *
  * If the @p key exists then @p iter will point to it and TRUE will be
index 92f2128bb86f0dd1ec1bd98ea49d0e92d1b43625..ded862b77940ebad610696b1d3da60fb56505bb7 100644 (file)
@@ -61,23 +61,26 @@ struct prefdata {
   GtkWidget *widget;
 };
 
-/* The type of a preference is the collection of callbacks needed to get,
- * display and set it */
+/** @brief Type of a track preference
+ *
+ * The type of a preference is the collection of callbacks needed to get,
+ * display and set it.
+ */
 struct preftype {
+  /** @brief Kick off the request to fetch the pref from the server. */
   void (*kickoff)(struct prefdata *f);
-  /* Kick off the request to fetch the pref from the server. */
 
+  /** @brief Called when the value comes back in; creates the widget. */
   void (*completed)(struct prefdata *f);
-  /* Called when the value comes back in; creates the widget. */
 
+  /** @brief Get the edited value from the widget. */
   const char *(*get_edited)(struct prefdata *f);
-  /* Get the edited value from the widget. */
 
   /** @brief Update the edited value */
   void (*set_edited)(struct prefdata *f, const char *value);
 
+  /** @brief Set the new value and (if necessary) arrange for our display to update. */
   void (*set)(struct prefdata *f, const char *value);
-  /* Set the new value and (if necessary) arrange for our display to update. */
 };
 
 /* A namepart pref */
@@ -107,7 +110,7 @@ static const struct preftype preftype_boolean = {
   set_boolean
 };
 
-/* @brief The known prefs for each track */
+/** @brief The known prefs for each track */
 static const struct pref {
   const char *label;                    /**< @brief user-level description */
   const char *part;                     /**< @brief protocol-level tag */
index 333187aad785e8a0e62bf6a5d9e58bdf6ace4e1f..2c0ac190e221978a02d826076de4fe9ebf6c9b09 100644 (file)
@@ -227,6 +227,10 @@ void ql_update_list_store(struct queuelike *ql) {
   }
 }
 
+/** @brief Old and new queue data
+ *
+ * Used when updating a @ref queuelike with new data from the server.
+ */
 struct newqueue_data {
   struct queue_entry *old, *new;
 };
@@ -636,7 +640,7 @@ static void ql_drag_data_get_collect(GtkTreeModel *model,
  * @param w Source widget (the tree view)
  * @param dc Drag context
  * @param data Where to put the answer
- * @param info_ Target @c info parameter
+ * @param info Target @c info parameter
  * @param time_ Time data requested (for some reason not a @c time_t)
  * @param user_data The queuelike
  *
index eecb87f48c3ae1cf034782a301f548a596c30c21..45ef8ab23e09c8157a96dd1a84f1ea1b1a22c259 100644 (file)
@@ -30,7 +30,7 @@ without.
 See \fBdisorder_actions\fR(5) for a description of what the CGI does.
 .PP
 See \fBdisorder_options\fR(5) for CGI-specific configuration and
-\dBdisorder_config\fR(5) for general configuration.
+\fBdisorder_config\fR(5) for general configuration.
 .PP
 See \fBdisorder_templates\fR(5) for the template language used.
 .SH "WHERE IS IT?"
index b8492b63bbe72e0789d0341c550c4be0f9c0a15f..242c0b080b3950aff5ec5a694ff3bf1ff3e86683 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" Copyright (C) 2008 Richard Kettlewell
+.\" Copyright (C) 2008, 2011 Richard Kettlewell
 .\"
 .\" This program is free software: you can redistribute it and/or modify
 .\" it under the terms of the GNU General Public License as published by
@@ -25,15 +25,6 @@ The general syntax is the same as the main configuration file (see
 .SH DIRECTIVES
 Valid directives are:
 .TP
-.B columns \fINAME\fR \fIHEADING\fR...
-Defines the columns used in \fB@playing@\fR and \fB@recent@\fB.
-\fINAME\fR must be either \fBplaying\fR, \fBrecent\fR or \fBsearch\fR.
-\fIHEADING\fR...  is a list of heading names.
-If a column is defined more than once then the last definitions is used.
-.IP
-The heading names \fBbutton\fR, \fBlength\fR, \fBwhen\fR and \fBwho\fR
-are built in.
-.TP
 .B include \fIPATH\fR
 Includes another file.
 If \fIPATH\fR starts with a \fB/\fR then it is taken as is, otherwise
@@ -54,7 +45,7 @@ Otherwise the whole name is used as the value.
 Labels are not individually documented here, see the shipped
 \fIoptions.labels\fR file instead.
 .SH "OPTION FILES"
-The shipped \fIoptions\fR file includes four standard options files.
+The shipped \fIoptions\fR file includes two standard options files.
 In order, they are:
 .TP
 .I options.labels
index 6e3a9a946b8a04a2024e589d3a0c98fda9bd9b71..63c82c8db368d2c8358b0a072aa59833e4df871d 100644 (file)
@@ -68,6 +68,7 @@ struct collectionlist {
   struct collection *s;
 };
 
+/** @brief A track name part */
 struct namepart {
   char *part;                          /* part */
   pcre *re;                            /* compiled regexp */
@@ -77,11 +78,13 @@ struct namepart {
   unsigned reflags;                    /* regexp flags */
 };
 
+/** @brief A list of track name parts */
 struct namepartlist {
   int n;
   struct namepart *s;
 };
 
+/** @brief A track name transform */
 struct transform {
   char *type;                          /* track or dir */
   char *context;                       /* sort or choose */
@@ -90,6 +93,7 @@ struct transform {
   unsigned flags;                      /* regexp flags */
 };
 
+/** @brief A list of track name transforms */
 struct transformlist {
   int n;
   struct transform *t;
index 37893b6ef1cc30fd5dfdf6d60441ea00002b5e0d..e0fb0fa9b4256aeb8d4aecf835b85395a73e9732 100644 (file)
 #include "eventdist.h"
 #include "hash.h"
 
+/** @brief Event data
+ *
+ * @c event_data structures form linked lists; one list per event and one node
+ * per handler.
+ */
 struct event_data {
+  /** @brief Next handler */
   struct event_data *next;
+
+  /** @brief Name of event */
   const char *event;
+
+  /** @brief Handler callback */
   event_handler *callback;
+
+  /** @brief Passed to @ref callback */
   void *callbackdata;
 };
 
index a56884b33d50b3874f3f537eca2b5daedbfb3b5a..9ca22926719870db7d7622fdc7c0de64a1914473 100644 (file)
@@ -28,6 +28,7 @@
 #include "eventlog.h"
 #include "split.h"
 
+/** @brief Linked list of event logs */
 static struct eventlog_output *outputs;
 
 void eventlog_add(struct eventlog_output *lo) {
@@ -44,6 +45,11 @@ void eventlog_remove(struct eventlog_output *lo) {
     *pp = lo->next;
 }
 
+/** @brief Write to the event log
+ * @param keyword Distinguishing keyword for event
+ * @param raw Unformatted data
+ * @param ap Extra data, terminated by (char *)0
+ */
 static void veventlog(const char *keyword, const char *raw, va_list ap) {
   struct eventlog_output *p, *pnext;
   struct dynstr d;
index 87eea513495368e51c3ee588b54477f00cf40923..e29fcfc7db300c13fb9d4c1c46f4a3c0b55dd1b9 100644 (file)
 #ifndef EVENTLOG_H
 #define EVENTLOG_H
 
-/* definition of an event log output.  The caller must allocate these
- * (since log.c isn't allowed to perform memory allocation). */
+/** @brief An output for the event log
+ *
+ * The caller must allocate these (since log.c isn't allowed to perform memory
+ * allocation).  They form a linked list, using eventlog_add() and
+ * eventlog_remove().
+ */
 struct eventlog_output {
+  /** @brief Next output */
   struct eventlog_output *next;
+
+  /** @brief Handler for this output */
   void (*fn)(const char *msg, void *user);
+
+  /** @brief Passed to @ref fn */
   void *user;
 };
 
+/** @brief Add an event log output
+ * @param lo Pointer to output to add
+ */
 void eventlog_add(struct eventlog_output *lo);
-/* add a log output */
 
+/** @brief Remove an event log output
+ * @param lo Pointer to output to remove
+ */
 void eventlog_remove(struct eventlog_output *lo);
-/* remove a log output */
 
+/** @brief Send a message to the event log
+ * @param keyword Distinguishing keyword for event
+ * @param ... Extra data, terminated by (char *)0
+ */
 void eventlog(const char *keyword, ...);
+
+/** @brief Send a message to the event log
+ * @param keyword Distinguishing keyword for event
+ * @param raw Unformatted data
+ * @param ... Extra data, terminated by (char *)0
+ */
 void eventlog_raw(const char *keyword, const char *raw, ...);
-/* send a message to the event log */
 
 #endif /* EVENTLOG_H */
 
index 573b50aa91b9a235294a0e59338ccb474f8a0faa..9dc346950680a2d83eb7d439ac3a0d7419437e5e 100644 (file)
@@ -25,6 +25,7 @@
 #include "log.h"
 #include "kvp.h"
 
+/** @brief One entry in a hash table */
 struct entry {
   struct entry *next;                   /* next entry same key */
   size_t h;                             /* hash of KEY */
@@ -32,6 +33,7 @@ struct entry {
   void *value;                          /* value of this entry */
 };
 
+/** @brief A hash table */
 struct hash {
   size_t nslots;                        /* number of slots */
   size_t nitems;                        /* total number of entries */
index 0f39b23800fa5c31991fda8e7b21fb9ecdbc4842..e39ca5f3f92fb36c28429bdb0fb74335833d9036 100644 (file)
@@ -194,13 +194,23 @@ static const char *marshall_origin(const struct queue_entry *q, size_t offset) {
 
 #define F(n, h) { #n, offsetof(struct queue_entry, n), marshall_##h, unmarshall_##h, free_##h }
 
-static const struct field {
+/** @brief A field in a @ref queue_entry */
+static const struct queue_field {
+  /** @brief Field name */
   const char *name;
+
+  /** @brief Offset of value in @ref queue_entry structure */
   size_t offset;
+
+  /** @brief Marshaling function */
   const char *(*marshall)(const struct queue_entry *q, size_t offset);
+
+  /** @brief Unmarshaling function */
   int (*unmarshall)(char *data, struct queue_entry *q, size_t offset,
                    void (*error_handler)(const char *, void *),
                    void *u);
+
+  /** @brief Destructor */
   void (*free)(struct queue_entry *q, size_t offset);
 } fields[] = {
   /* Keep this table sorted. */
index 39514ed37c3cf6497ba05a1e530053932db39d57..bee3d951394a74c80f88fdf8ced77c83711a7729 100644 (file)
  * @param input_channels Number of input channels
  * @param input_signed Whether input samples are signed or unsigned
  * @param input_rate Frames/second in input
+ * @param input_endian Input endianness (@c ENDIAN_BIG or @c ENDIAN_LITTLE)
  * @param output_bits Bits/sample in output
  * @param output_channels Number of output channels
  * @param output_rate Frames/second in output
  * @param output_signed Whether output samples are signed or unsigned
+ * @param output_endian Output endianness (@c ENDIAN_BIG or @c ENDIAN_LITTLE)
  *
  * For formats with more than two channels it's assume that the first
  * two channels are left and right.  No particular meaning is attached
@@ -199,7 +201,7 @@ static size_t resample_put_sample(const struct resampler *rs,
 /** @brief Convert input samples to floats
  * @param rs Resampler state
  * @param bytes Input bytes
- * @param nbytes Number of input bytes
+ * @param nframes Number of input frames
  * @param floats Where to store converted data
  *
  * @p floats must be big enough.  As well as converting to floats this
index e99aaeb3455de23d77fef9a981f61bcf0157120a..a78932571726afbe4b5ae11f59cebe9db7e49864 100644 (file)
 
 #include "byte-order.h"
 
+/** @brief An audio resampler */
 struct resampler {
-  int input_bits, input_channels, input_rate, input_signed, input_endian;
-  int output_bits, output_channels, output_rate, output_signed, output_endian;
+  /** @brief Bits/sample in input */
+  int input_bits;
+
+  /** @brief Number of input channels */
+  int input_channels;
+
+  /** @brief Frames/second in input */
+  int input_rate;
+
+  /** @brief Whether input samples are signed or unsigned */
+  int input_signed;
+
+  /** @brief Input endianness (@c ENDIAN_BIG or @c ENDIAN_LITTLE) */
+  int input_endian;
+
+  /** @brief Bits/sample in output */
+  int output_bits;
+
+  /** @brief Number of output channels */
+  int output_channels;
+
+  /** @brief Frames/second in output */
+  int output_rate;
+
+  /** @brief Whether output samples are signed or unsigned */
+  int output_signed;
+
+  /** @brief Output endianness (@c ENDIAN_BIG or @c ENDIAN_LITTLE) */
+  int output_endian;
+
+  /** @brief  */
   int input_bytes_per_sample;
+
+  /** @brief  */
   int input_bytes_per_frame;
 #if HAVE_SAMPLERATE_H
+  /** @brief Libsamplerate handle */
   SRC_STATE *state;
 #endif
 };
index 27f9509c49653419b7f19fdf8a0e3460035fe23b..316fe6a441fb217e186753d988716f0b741f1934 100644 (file)
 #include "table.h"
 #include "signame.h"
 
+/** @brief Mapping between signal names and numbers */
 static const struct sigtable {
+  /** @brief Signal number */
   int signal;
+
+  /* @brief Signal name ("SIGwhatever") */
   const char *name;
 } signals[] = {
 #define S(sig) { sig, #sig }
index e62e3c9434a80c0698d5ab69141710cff950f812..f272dc77fb96352c82cd845b56b217ead0c23993 100644 (file)
 #include "printf.h"
 #include "sink.h"
 
+/** @brief A @ref sink that stores to a fixed buffer
+ *
+ * If there is too much output, it is truncated.
+ */
 struct fixedstr_sink {
+  /** @brief Base */
   struct sink s;
+
+  /** @brief Output buffer */
   char *buffer;
+
+  /** @brief Bytes written so far */
   int nbytes;
+
+  /** @brief Size of buffer */
   size_t size;
 };
 
index 83d010da60d1b1eebe587156f93aae123854c133..27ef40aeffebae51b88188245631b0cb0418067e 100644 (file)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-
-/* strptime() is here reimplemented because the FreeBSD (and older MacOS) one
+/** @file lib/strptime.c
+ * @brief strptime() reimplementation
+ *
+ * strptime() is here reimplemented because the FreeBSD (and older MacOS) one
  * is broken and does not report errors properly.  See TODO remarks below for
- * some missing bits. */
+ * some missing bits.
+ */
 
 #include <ctype.h>
 #include <limits.h>
 #include <langinfo.h>
 #include "strptime.h"
 
+/** @brief Lookup table entry for locale-specific strings */
 struct locale_item_match {
+  /** @brief Locale key to try */
   nl_item key;
+
+  /** @brief Value to return if value of @ref key matches subject string */
   int value;
 };
 
index 324f88d1bd8d133986b6bcb43ae4646998ca4aab..b2b3715d244fca205998874a11d54266f530930c 100644 (file)
@@ -1,5 +1,8 @@
 #ifndef STRPTIME_H
 #define STRPTIME_H
+/** @file lib/strptime.h
+ * @brief strptime() reimplementation
+ */
 
 #include <time.h>
 
index 4afd9257929960eb168fb921d383a906a2968fd5..7be53c14d3b92d7866be5ef4b81bd9661d5cad1f 100644 (file)
@@ -1389,6 +1389,7 @@ int trackdb_obsolete(const char *track, DB_TXN *tid) {
 #define H(name) { #name, offsetof(DB_HASH_STAT, name) }
 #define B(name) { #name, offsetof(DB_BTREE_STAT, name) }
 
+/** @brief Table of libdb stats to return */
 static const struct statinfo {
   const char *name;
   size_t offset;
index 8ce2505842f5dff6716cca1d7aef420293676399..6254708e14f328e17b64242c7e3b268bc7d0bbf4 100644 (file)
@@ -17,7 +17,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  * USA
  */
-/** @file lib/validity.c
+/** @file lib/validity.h
  * @brief Various validity checks
  */
 #ifndef VALIDITY_H
index a838966bc0e28885477594af1c570ac8bf7c7b98..31a7e9d0774465564c5396e33fcd71b23614fe71 100644 (file)
 
 /* libFLAC's "simplified" interface is rather heavyweight... */
 
+/** @brief State used when computing FLAC file length */
 struct flac_state {
+  /** @brief Duration or -1 */
   long duration;
+
+  /** @brief File being analyzed */
   const char *path;
 };
 
index c8e22a44cf404c5bb1a4df2f4f371c5b442dadb0..112b652ebd7a364ac78d1554ebb98e014c2767ff 100644 (file)
@@ -15,6 +15,9 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+/** @file plugins/tracklength.h
+ * @brief Plugin to compute track lengths
+ */
 
 #ifndef TRACKLENGTH_H
 #define TRACKLENGTH_H
index 8584c8598327de17307e8a449853a9ea16283ce0..8a758c9bc11a586a631d6dc5f96722ba368cee51 100644 (file)
@@ -87,6 +87,7 @@ class Error(Exception):
   """Base class for DisOrder exceptions."""
 
 class _splitError(Error):
+  """Error parsing a quoted string list"""
   # _split failed
   def __init__(self, value):
     self.value = value
index f1399fba925813dca31f165d6bc8829f1ec47b49..9577d9db0fc40bf2e2268dc23fb6e0578b1c393f 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-/** @file server/decode.c
+/** @file server/decode-flac.c
  * @brief General-purpose decoder for use by speaker process
  */
 #include "decode.h"
index d499955225cf444cb732fe8f062c7f9379af8472..efa10a7d35c526b12dd758f197fb8a8807c518c5 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-/** @file server/decode.c
+/** @file server/decode-ogg.c
  * @brief General-purpose decoder for use by speaker process
  */
 #include "decode.h"
index fd58a140349b6d007f7dd638bd2eb55c7b8c7858..8fdc10e66e104ff4b600f12e4464d3d724080c28 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-/** @file server/decode.c
+/** @file server/decode-wav.c
  * @brief General-purpose decoder for use by speaker process
  */
 #include "decode.h"
index 2000a2f2d55aefafb732f30346605d7df2259da9..3e1ab441c897bfcdfd33dd8a74b54cc65a787aa9 100644 (file)
@@ -80,8 +80,12 @@ static int handle_sigterm(ev_source attribute((unused)) *ev_,
 
 /* periodic actions --------------------------------------------------------- */
 
+/** @brief A job executed periodically by the server */
 struct periodic_data {
+  /** @brief Callback to process job */
   void (*callback)(ev_source *);
+
+  /** @brief Period of job in seconds */
   int period;
 };
 
index 7afbde9ccd397010b79e7f041f616810e05b6b5f..013aa9415e676498af810172f31465a704c29fbc 100644 (file)
 # define SOSUFFIX ".so"
 #endif
 
+/** @brief A loaded plugin */
 struct plugin {
+  /** @brief Next plugin */
   struct plugin *next;
+
+  /** @brief Handle returned from dlopen() */
   void *dlhandle;
+
+  /** @brief Plugin name */
   const char *name;
 };
 
index 7cb24b6a3c1ef75538916a8519cf37698e3a562f..71b998ad948798a13ce358045c77b83e5c8e46ec 100644 (file)
@@ -164,14 +164,33 @@ done:
       ;
 }
 
+/** @brief State for the recheck phase of the rescan */
 struct recheck_state {
+  /** @brief Collection being rechecked */
   const struct collection *c;
-  long nobsolete, nnocollection, nlength;
+
+  /** @brief Number of tracks obsoleted */
+  long nobsolete;
+
+  /** @brief Number of tracks belonging to no collection */
+  long nnocollection;
+
+  /** @brief Number of lengths computed */
+  long nlength;
+
+  /** @brief Linked list of tracks to recheck */
   struct recheck_track *tracks;
 };
 
+/** @brief A track to recheck
+ *
+ * A node in a linked list.
+ */
 struct recheck_track {
+  /** @brief Next track */
   struct recheck_track *next;
+
+  /** @brief Track */
   const char *track;
 };
 
index 29efbbe75e28bad5231d0eac34b7c1401a3a9b38..1169e2fa09f6f7756b6c33e19e2c6bc6739b160c 100644 (file)
@@ -1845,7 +1845,8 @@ static int c_playlist_unlock(struct conn *c,
   return 1;
 }
 
-static const struct command {
+/** @brief Server's definition of a command */
+static const struct server_command {
   /** @brief Command name */
   const char *name;
 
index 1f939476f9931df592aa61abfb19512c5f21253e..0ce7a540ad059bca5ee30f14aed3e3bdee310b64 100644 (file)
@@ -19,8 +19,7 @@
 pkgdata_DATA=about.tmpl choose.tmpl playing.tmpl recent.tmpl           \
             prefs.tmpl help.tmpl error.tmpl                    \
             new.tmpl login.tmpl macros.tmpl                            \
-            options options.labels                                     \
-            options.columns
+            options options.labels
 pkghttp_DATA=disorder.css
 
 EXTRA_DIST=${pkgdata_DATA} $(pkghttp_DATA)
index a0842dbbab2cb71875db2a9b279291ca4f7e0471..9056b111b27a663c21b5c9b4a226eb685a46ac4f 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <!--
 This file is part of DisOrder.
-Copyright (C) 2004-2009 Richard Kettlewell
+Copyright (C) 2004-2011 Richard Kettlewell
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   <div class=section>
 
-   <p>Copyright &copy; 2003-2009 <a
+   <p>Copyright &copy; 2003-2011 <a
    href="http://www.greenend.org.uk/rjk/">Richard Kettlewell</a><br>
 
    Portions copyright &copy; 2007 <a
index c83fd35e9dbc26d2794747ad153e6f57f6cd679f..6b94317e8363330a3b16b2d96cb6432c82280b8f 100644 (file)
@@ -1,5 +1,5 @@
 This file is part of DisOrder.
-Copyright (C) 2008, 2009 Richard Kettlewell
+Copyright (C) 2008, 2009, 2011 Richard Kettlewell
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -117,7 +117,7 @@ and then redefine macros as desired.
   <a href="http://www.greenend.org.uk/rjk/disorder/"
      title="DisOrder web site">DisOrder
      version @version</a>
-  &copy; 2003-2009 Richard Kettlewell et al
+  &copy; 2003-2011 Richard Kettlewell et al
 </p>}
 
 @# Expand to the time that @id will be played
index e7313b07492d1b1613041523d774d6948cfeb995..ff61a5461592ff7938aa2099dd7e1b831e78a5fc 100644 (file)
@@ -1,8 +1,5 @@
 # default label values
 include options.labels
 
-# default columns
-include options.columns
-
 # user overrides - you supply this
 include options.user
diff --git a/templates/options.columns b/templates/options.columns
deleted file mode 100644 (file)
index 53badbd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-columns playing when who artist album title length button
-columns recent when who artist album title length
-columns search artist album title