cleared by supplying no arguments. This is used by the test scripts to
ensure they aren't picking up install versions of the plugins.
This is on disorder.unicode rather than disorder.dev because the tests
that matter are all there...
Plugins are opened the first time they are required and never after,
so after changing a plugin you must restart the server before it is
guaranteed to take effect.
Plugins are opened the first time they are required and never after,
so after changing a plugin you must restart the server before it is
guaranteed to take effect.
+.IP
+If
+.B plugins
+is used without arguments the plugin path is cleared.
.SS "Server Configuration"
.TP
.B alias \fIPATTERN\fR
.SS "Server Configuration"
.TP
.B alias \fIPATTERN\fR
command corresponding to each
.B player
command.
command corresponding to each
.B player
command.
+.IP
+If
+.B player
+is used without arguments, the list of players is cleared.
.TP
.B prefsync \fISECONDS\fR
The interval at which the preferences log file will be synchronised. Defaults
.TP
.B prefsync \fISECONDS\fR
The interval at which the preferences log file will be synchronised. Defaults
.IP
At least for the time being, path names of scratches must be encoded using
UTF-8 (which means that ASCII will do).
.IP
At least for the time being, path names of scratches must be encoded using
UTF-8 (which means that ASCII will do).
+.IP
+If \fBscratch\fR is used without arguments then the list of scratches is
+cleared.
.TP
.B stopword \fIWORD\fR ...
Specifies one or more stopwords that should not take part in searches
over track names.
.TP
.B stopword \fIWORD\fR ...
Specifies one or more stopwords that should not take part in searches
over track names.
+.IP
+If \fBstopword\fR is used without arguments then the list of stopwords is
+cleared.
.TP
.B tracklength \fIPATTERN\fR \fIMODULE\fR
Specifies the module used to calculate the length of files matching
\fIPATTERN\fR. \fIMODULE\fR specifies which plugin module to use.
.TP
.B tracklength \fIPATTERN\fR \fIMODULE\fR
Specifies the module used to calculate the length of files matching
\fIPATTERN\fR. \fIMODULE\fR specifies which plugin module to use.
+.IP
+If \fBtracklength\fR is used without arguments then the list of modules is
+cleared.
.SS "Client Configuration"
.TP
.B connect \fIHOST SERVICE\fR
.SS "Client Configuration"
.TP
.B connect \fIHOST SERVICE\fR
then the one in the earliest directory specified is chosen.
.IP
See below for further details.
then the one in the earliest directory specified is chosen.
.IP
See below for further details.
+.IP
+If \fBtemplates\fR is used without arguments then the template path is cleared.
.TP
.B transform \fITYPE\fR \fIREGEXP\fR \fISUBST\fR [\fICONTEXT\fR [\fIREFLAGS\fR]]
Determines how names are sorted and displayed in track choice displays.
.TP
.B transform \fITYPE\fR \fIREGEXP\fR \fISUBST\fR [\fICONTEXT\fR [\fIREFLAGS\fR]]
Determines how names are sorted and displayed in track choice displays.
.TP
.B allow \fIUSERNAME\fR \fIPASSWORD\fR
Specify a username/password pair.
.TP
.B allow \fIUSERNAME\fR \fIPASSWORD\fR
Specify a username/password pair.
+.IP
+If
+.B allow
+is used without arguments, the list of allowed users is cleared.
.TP
.B password \fIPASSWORD\fR
Specify password.
.TP
.B password \fIPASSWORD\fR
Specify password.
.B trust \fIUSERNAME\fR
Allow \fIUSERNAME\fR to perform privileged operations such as shutting
down or reconfiguring the daemon, or becoming another user.
.B trust \fIUSERNAME\fR
Allow \fIUSERNAME\fR to perform privileged operations such as shutting
down or reconfiguring the daemon, or becoming another user.
+.IP
+If \fBtrust\fR is used without arguments then the list of trusted users is
+cleared.
.TP
.B user \fIUSER\fR
Specifies the user to run as. Only makes sense if invoked as root (or
.TP
.B user \fIUSER\fR
Specifies the user to run as. Only makes sense if invoked as root (or
argument to \fBchoose\fR.
.TP
.B @files{\fITEMPLATE\fB}
argument to \fBchoose\fR.
.TP
.B @files{\fITEMPLATE\fB}
-Expands \fITEMPLATE\fB once for each file indicated by the \fBdirectory\fR CGI
+Expands \fITEMPLATE\fR once for each file indicated by the \fBdirectory\fR CGI
arg if it is present, or otherwise for the list of files counted by \fBfiles\fR
with names \fB0_file\fR, \fB1_file\fR etc.
.TP
arg if it is present, or otherwise for the list of files counted by \fBfiles\fR
with names \fB0_file\fR, \fB1_file\fR etc.
.TP
Expands to \fBdisorder.cgi\fR's version string.
.TP
.B @volume:\fISPEAKER\fB@
Expands to \fBdisorder.cgi\fR's version string.
.TP
.B @volume:\fISPEAKER\fB@
-The volume on the left or right speaker. \fISPEAKER\fR must be \fBleft\fB or
+The volume on the left or right speaker. \fISPEAKER\fR must be \fBleft\fR or
\fBright\fR.
.TP
.B @when@
\fBright\fR.
.TP
.B @when@
struct stringlistlist *sll;
sll = ADDRESS(cs->config, struct stringlistlist);
struct stringlistlist *sll;
sll = ADDRESS(cs->config, struct stringlistlist);
+ if(nvec == 0) {
+ sll->n = 0;
+ return 0;
+ }
sll->n++;
sll->s = xrealloc(sll->s, (sll->n * sizeof (struct stringlist)));
s = &sll->s[sll->n - 1];
sll->n++;
sll->s = xrealloc(sll->s, (sll->n * sizeof (struct stringlist)));
s = &sll->s[sll->n - 1];
struct stringlist *sl;
sl = ADDRESS(cs->config, struct stringlist);
struct stringlist *sl;
sl = ADDRESS(cs->config, struct stringlist);
+ if(nvec == 0) {
+ sl->n = 0;
+ return 0;
+ }
for(n = 0; n < nvec; ++n) {
sl->n++;
sl->s = xrealloc(sl->s, (sl->n * sizeof (char *)));
for(n = 0; n < nvec; ++n) {
sl->n++;
sl->s = xrealloc(sl->s, (sl->n * sizeof (char *)));
username fred
password fredpass
allow fred fredpass
username fred
password fredpass
allow fred fredpass
+plugins %s/plugins/.libs
player *.mp3 execraw disorder-decode
player *.ogg execraw disorder-decode
player *.wav execraw disorder-decode
player *.mp3 execraw disorder-decode
player *.ogg execraw disorder-decode
player *.wav execraw disorder-decode
tracklength *.ogg disorder-tracklength
tracklength *.wav disorder-tracklength
tracklength *.flac disorder-tracklength
tracklength *.ogg disorder-tracklength
tracklength *.wav disorder-tracklength
tracklength *.flac disorder-tracklength
-""" % (testroot, testroot, testroot, testroot, top_builddir))
+""" % (testroot, testroot, testroot, testroot, top_builddir, top_builddir))
copyfile("%s/sounds/scratch.ogg" % top_srcdir,
"%s/scratch.ogg" % testroot)
copyfile("%s/sounds/scratch.ogg" % top_srcdir,
"%s/scratch.ogg" % testroot)