use own version handler for all commands.
[paraslash.git] / write.c
diff --git a/write.c b/write.c
index bf5ce629175e70dd35b34655e102416b6699c973..683a91b0a78c6f93d19dae229a3fbf510a0fb2e8 100644 (file)
--- a/write.c
+++ b/write.c
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (C) 2005-2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
  *
  *     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
  *
  *     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
@@ -60,9 +60,9 @@ struct initial_delay_task {
 };
 
 static struct write_args_info conf;
 };
 
 static struct write_args_info conf;
-struct stdin_task sit;
-struct check_wav_task cwt;
-struct initial_delay_task idt;
+static struct stdin_task sit;
+static struct check_wav_task cwt;
+static struct initial_delay_task idt;
 static struct writer_node_group *wng;
 
 /** length of a standard wav header */
 static struct writer_node_group *wng;
 
 /** length of a standard wav header */
@@ -113,22 +113,7 @@ static void initial_delay_pre_select(struct sched *s, struct task *t)
                s->timeout = diff;
 }
 
                s->timeout = diff;
 }
 
-/**
- * all log messages are written to stderr
- *
- * \param ll: loglevel
- * \param fmt: format string
- */
-void para_log(int ll, const char* fmt,...)
-{
-       va_list argp;
-
-       if (ll < conf.loglevel_arg)
-               return;
-       va_start(argp, fmt);
-       vfprintf(stderr, fmt, argp);
-       va_end(argp);
-}
+INIT_STDERR_LOGGING(conf.loglevel_arg)
 
 static struct writer_node_group *check_args(void)
 {
 
 static struct writer_node_group *check_args(void)
 {
@@ -241,6 +226,7 @@ int main(int argc, char *argv[])
        struct sched s;
 
        write_cmdline_parser(argc, argv, &conf);
        struct sched s;
 
        write_cmdline_parser(argc, argv, &conf);
+       HANDLE_VERSION_FLAG("write", conf);
        init_supported_writers();
 
        wng = check_args();
        init_supported_writers();
 
        wng = check_args();