chiark / gitweb /
Disobedience notices when tracks are adopted now.
[disorder] / clients / disorderfm.c
index 0fd4fa0f74b4aab026e14d4a2c8b07a775ee2175..07743f88aaf6a9b45b89d9307704a22bcfbb00b7 100644 (file)
@@ -1,25 +1,27 @@
 /*
  * This file is part of DisOrder.
- * Copyright (C) 2006 Richard Kettlewell
+ * Copyright (C) 2006, 2007, 2008 Richard Kettlewell
  *
- * This program is free software; you can redistribute it and/or modify
+ * 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
+ * the Free Software Foundation, either version 3 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.
- *
+ * 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
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-
-#include <config.h>
-#include "types.h"
+/** @file clients/disorderfm.c
+ * @brief DisOrder file manager
+ *
+ * Intended to support encoding conversion, tag extraction, etc.  Not yet
+ * complete (and hasn't been worked on for ages).
+ */
+#include "common.h"
 
 #include <getopt.h>
 #include <unistd.h>
@@ -29,7 +31,6 @@
 #include <dirent.h>
 #include <sys/stat.h>
 #include <langinfo.h>
-#include <string.h>
 #include <fnmatch.h>
 
 #include "syscalls.h"
@@ -38,6 +39,7 @@
 #include "charset.h"
 #include "defs.h"
 #include "mem.h"
+#include "version.h"
 
 /* Arguments etc ----------------------------------------------------------- */
 
@@ -127,13 +129,6 @@ static void help(void) {
   exit(0);
 }
 
-/* display version number and terminate */
-static void version(void) {
-  xprintf("disorderfm version %s\n", disorder_version_string);
-  xfclose(stdout);
-  exit(0);
-}
-
 /* Utilities --------------------------------------------------------------- */
 
 /* Copy FROM to TO.  Has the same signature as link/symlink. */
@@ -351,12 +346,12 @@ int main(int argc, char **argv) {
   int n;
   struct pattern *p;
 
-  mem_init(1);
+  mem_init();
   if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
   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;
@@ -411,4 +406,3 @@ fill-column:79
 indent-tabs-mode:nil
 End:
 */
-/* arch-tag:YWy+lwnCOS0d8Q5hjJ5gyQ */