.DS_Store
tests/disorder-udplog
lib/version-string
-lib/version.h
+lib/versionstring.h
scripts/setup
examples/disorder.rc
scripts/teardown
#include "defs.h"
#include "authorize.h"
#include "vector.h"
+#include "version.h"
static disorder_client *client;
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
static disorder_client *getclient(void) {
if(!client) {
if(!(client = disorder_new(1))) exit(EXIT_FAILURE);
switch(n) {
case 'h': help();
case 'H': help_commands();
- case 'V': version();
+ case 'V': version("disorder");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'l': local = 1; break;
#include "charset.h"
#include "defs.h"
#include "mem.h"
+#include "version.h"
/* Arguments etc ----------------------------------------------------------- */
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
/* Utilities --------------------------------------------------------------- */
/* Copy FROM to TO. Has the same signature as link/symlink. */
while((n = getopt_long(argc, argv, "hVdf:t:i:e:ET:u:wlscn", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorderfm");
case 'd': debugging = 1; break;
case 'f': fromencoding = optarg; break;
case 't': toencoding = optarg; break;
#include "client.h"
#include "playrtp.h"
#include "inputline.h"
+#include "version.h"
#define readahead linux_headers_are_borked
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
int main(int argc, char **argv) {
int n, err;
struct addrinfo *res;
while((n = getopt_long(argc, argv, "hVdD:m:b:x:L:R:M:aocC:r", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-playrtp");
case 'd': debugging = 1; break;
case 'D': device = optarg; break;
case 'm': minbuffer = 2 * atol(optarg); break;
#include "disobedience.h"
#include "mixer.h"
+#include "version.h"
#include <getopt.h>
#include <locale.h>
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
/* reset state */
void reset(void) {
struct reset_callback_node *r;
while((n = getopt_long(argc, argv, "hVc:dtHC", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disobedience");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 't': goesupto = 11; break;
unidata.h unidata.c \
vacopy.h \
vector.c vector.h \
+ version.c version.h \
wav.h wav.c \
wstat.c wstat.h \
disorder.h
echo rm -f $@.new; rm -f $@.new; else \
echo mv $@.new $@; mv $@.new $@; fi
-version.h: version-string ${top_srcdir}/scripts/text2c
+versionstring.h: version-string ${top_srcdir}/scripts/text2c
${top_srcdir}/scripts/text2c -extern disorder_version_string \
version-string > $@.new
@if cmp $@.new $@; then \
@if cmp $@.new $@; then \
echo rm -f $@.new; rm -f $@.new; else \
echo mv $@.new $@; mv $@.new $@; fi
-defs.o: definitions.h version.h
-defs.lo: definitions.h version.h
+defs.o: definitions.h versionstring.h
+defs.lo: definitions.h versionstring.h
test_SOURCES=test.c memgc.c test.h t-addr.c t-basen.c t-cache.c \
t-casefold.c t-cookies.c t-filepart.c t-hash.c t-heap.c \
/** @brief Package documentation directory */
const char docdir[] = DOCDIR;
-#include "version.h"
+#include "versionstring.h"
/*
Local Variables:
--- /dev/null
+/*
+ * This file is part of DisOrder
+ * Copyright (C) 2008 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#include <config.h>
+#include "types.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "syscalls.h"
+#include "version.h"
+#include "defs.h"
+
+/** @brief Display version string and exit
+ * @param name Name of this program
+ */
+void version(const char *name) {
+ xprintf(disorder_version_string, name);
+ xfclose(stdout);
+ exit(0);
+}
+
+/*
+Local Variables:
+c-basic-offset:2
+comment-column:40
+fill-column:79
+indent-tabs-mode:nil
+End:
+*/
--- /dev/null
+/*
+ * This file is part of DisOrder
+ * Copyright (C) 2008 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+#ifndef VERSION_H
+#define VERSION_H
+
+void version(const char *name);
+
+#endif /* VERSION_H */
+
+/*
+Local Variables:
+c-basic-offset:2
+comment-column:40
+fill-column:79
+indent-tabs-mode:nil
+End:
+*/
$compiler = $cv[0];
}
die "no version found\n" unless defined $version;
-output("DisOrder $version\n");
+output("%s (DisOrder) $version\n");
output(" configure options: $options\n") if defined $options;
output(" compiler: $cc\n") if defined $compiler;
output(" version: $compiler\n") if defined $cc;
+output("Copyright (C) 2003-2008 Richard Kettlewell et al\n");
+output("License GPLv2+: GNU GPL version 2 or later:\n");
+output(" http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n");
+output("This is free software: you are free to change and redistribute it.\n");
+output("There is NO WARRANTY, to the extent permitted by law.\n");
+
close STDOUT or die "$0: stdout: $!\n";
#include "mem.h"
#include "configuration.h"
#include "unicode.h"
+#include "version.h"
static DB_TXN *global_tid;
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
/** @brief Visit each key in a database and call @p callback
* @return 0 or DB_LOCK_DEADLOCK
*
while((n = getopt_long(argc, argv, "hVc:dDSsxX", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-dbupgrade");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'D': debugging = 0; break;
#include "rights.h"
#include "trackdb.h"
#include "trackdb-int.h"
+#include "version.h"
static const struct option options[] = {
{ "help", no_argument, 0, 'h' },
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
int main(int argc, char **argv) {
int n, err, aborted, logsyslog = !isatty(2);
while((n = getopt_long(argc, argv, "hVc:dDSs", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-deadlock");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'D': debugging = 0; break;
#include "defs.h"
#include "wav.h"
#include "speaker-protocol.h"
+#include "version.h"
/** @brief Encoding lookup table type */
struct decoder {
exit(0);
}
-/* Display version number and terminate. */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
int main(int argc, char **argv) {
int n;
const char *e;
while((n = getopt_long(argc, argv, "hV", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-decode");
default: fatal(0, "invalid option");
}
}
#include "mixer.h"
#include "eventlog.h"
#include "printf.h"
+#include "version.h"
static ev_source *ev;
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
/* SIGHUP callback */
static int handle_sighup(ev_source attribute((unused)) *ev_,
int attribute((unused)) sig,
while((n = getopt_long(argc, argv, "hVc:dfP:Ns", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorderd");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'f': background = 0; break;
#include "trackdb.h"
#include "trackdb-int.h"
#include "charset.h"
+#include "version.h"
static const struct option options[] = {
{ "help", no_argument, 0, 'h' },
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
/* dump prefs to FP, return nonzero on error */
static void do_dump(FILE *fp, const char *tag,
int tracksdb, int searchdb) {
while((n = getopt_long(argc, argv, "hVc:dDutsrRaP", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-dump");
case 'c': configfile = optarg; break;
case 'd': dump = 1; break;
case 'u': undump = 1; break;
#include "configuration.h"
#include "speaker-protocol.h"
#include "defs.h"
+#include "version.h"
static const struct option options[] = {
{ "help", no_argument, 0, 'h' },
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
/** @brief Copy bytes from one file descriptor to another
* @param infd File descriptor read from
* @param outfd File descriptor to write to
while((n = getopt_long(argc, argv, "hVc:dDSs", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-normalize");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'D': debugging = 0; break;
#include "trackdb-int.h"
#include "trackname.h"
#include "unicode.h"
+#include "version.h"
static DB_TXN *global_tid;
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
static volatile sig_atomic_t signalled;
static void signal_handler(int sig) {
while((n = getopt_long(argc, argv, "hVc:dDSsKC", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-rescan");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'D': debugging = 0; break;
* this is arranged by the @c disorder-normalize program (see @ref
* server/normalize.c).
*
- * @b Garbage @b Collection. This program deliberately does not use the
+7 * @b Garbage @b Collection. This program deliberately does not use the
* garbage collector even though it might be convenient to do so. This is for
* two reasons. Firstly some sound APIs use thread threads and we do not want
* to have to deal with potential interactions between threading and garbage
#include "user.h"
#include "speaker.h"
#include "printf.h"
+#include "version.h"
/** @brief Linked list of all prepared tracks */
struct track *tracks;
exit(0);
}
-/* Display version number and terminate. */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
/** @brief Return the number of bytes per frame in @p format */
static size_t bytes_per_frame(const struct stream_header *format) {
return format->channels * format->bits / 8;
while((n = getopt_long(argc, argv, "hVc:dDSs", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("disorder-speaker");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
case 'D': debugging = 0; break;
#include "mem.h"
#include "charset.h"
#include "defs.h"
+#include "version.h"
static const struct option options[] = {
{ "help", no_argument, 0, 'h' },
exit(0);
}
-/* display version number and terminate */
-static void version(void) {
- xprintf("%s", disorder_version_string);
- xfclose(stdout);
- exit(0);
-}
-
int main(int argc, char **argv) {
int n;
const char *s;
while((n = getopt_long(argc, argv, "hVc:d", options, 0)) >= 0) {
switch(n) {
case 'h': help();
- case 'V': version();
+ case 'V': version("trackname");
case 'c': configfile = optarg; break;
case 'd': debugging = 1; break;
default: fatal(0, "invalid option");