X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write.c;h=64c08d8b9e1412e7ed88c234609bc68173283049;hp=ec27f3d35ac078824e03f33c3ba38572177ef38d;hb=64e19e1bdabc9bb04941f285fb828a8317359816;hpb=9b3b5e8babdf1fd13e2e5c18572f33d9a701cb4f diff --git a/write.c b/write.c index ec27f3d3..64c08d8b 100644 --- a/write.c +++ b/write.c @@ -1,19 +1,7 @@ /* - * Copyright (C) 2005-2006 Andre Noll + * Copyright (C) 2005-2007 Andre Noll * - * 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, USA. + * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file write.c Paraslash's standalone wav/raw player */ @@ -113,22 +101,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 +204,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 +218,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();