X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/460b9539a7c15580e41a71bbc0f47ae776238915..05b75f8d50b83e943af3be4071449304d82dbdcd:/clients/disorderfm.c diff --git a/clients/disorderfm.c b/clients/disorderfm.c index 0fd4fa0..b293301 100644 --- a/clients/disorderfm.c +++ b/clients/disorderfm.c @@ -1,6 +1,6 @@ /* * 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 * it under the terms of the GNU General Public License as published by @@ -18,8 +18,7 @@ * USA */ -#include -#include "types.h" +#include "common.h" #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include "syscalls.h" @@ -38,6 +36,7 @@ #include "charset.h" #include "defs.h" #include "mem.h" +#include "version.h" /* Arguments etc ----------------------------------------------------------- */ @@ -127,13 +126,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 +343,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 +403,3 @@ fill-column:79 indent-tabs-mode:nil End: */ -/* arch-tag:YWy+lwnCOS0d8Q5hjJ5gyQ */