Merge /fml/ag-raetsch/home/maan/scm/paraslash_meins/paraslash
[paraslash.git] / write.c
diff --git a/write.c b/write.c
index ec27f3d35ac078824e03f33c3ba38572177ef38d..3671633b2d3032d5041693f15eaa558df085acdc 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
@@ -113,22 +113,7 @@ static void initial_delay_pre_select(struct sched *s, struct task *t)
                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)
 {
@@ -231,9 +216,13 @@ static void cwt_event_handler(struct task *t)
 /**
  * para_write's main function
  *
+ * \param argc the usual argument counter
+ * \param argv the usual argument vector
+ *
  * It registers the stdin task, the check_wav_task, the task for initial delay
  * and all tasks for actually writing out the stream.
  *
+ * \return \p EXIT_SUCCESS or EXIT_FAILURE
  */
 int main(int argc, char *argv[])
 {
@@ -241,6 +230,7 @@ int main(int argc, char *argv[])
        struct sched s;
 
        write_cmdline_parser(argc, argv, &conf);
+       HANDLE_VERSION_FLAG("write", conf);
        init_supported_writers();
 
        wng = check_args();