X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=filter.c;h=1bb20b31fb8b7ed421edf357d8b86195f89e96e3;hb=6f58bbe94b49c0fb473bffebde598a3d26b051f3;hp=56afebf3a6ecfed020cf2c6dad065168a80277e0;hpb=2a8029478dfc65f0c935d864faf4aea9e3deb27d;p=paraslash.git diff --git a/filter.c b/filter.c index 56afebf3..1bb20b31 100644 --- a/filter.c +++ b/filter.c @@ -1,5 +1,5 @@ /* - * 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 @@ -37,7 +37,7 @@ static struct filter_chain *fc = &filter_chain_struct; static struct stdout_task stdout_task_struct; static struct stdout_task *sot = &stdout_task_struct; -struct gengetopt_args_info conf; +static struct filter_args_info conf; __printf_2_3 void para_log(int ll, const char* fmt,...) { @@ -51,7 +51,7 @@ __printf_2_3 void para_log(int ll, const char* fmt,...) va_end(argp); } -void filter_event_handler(struct task *t) +static void filter_event_handler(struct task *t) { PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret)); unregister_task(t); @@ -69,7 +69,6 @@ static void open_filters(void) } } - static int init_filter_chain(void) { int i, filter_num; @@ -113,7 +112,7 @@ static int parse_config(int argc, char *argv[]) struct stat statbuf; int i; - if (cmdline_parser(argc, argv, &conf)) + if (filter_cmdline_parser(argc, argv, &conf)) return -E_FILTER_SYNTAX; if (!cf) { char *home = para_homedir(); @@ -121,7 +120,7 @@ static int parse_config(int argc, char *argv[]) free(home); } if (!stat(cf, &statbuf)) { - if (cmdline_parser_configfile(cf, &conf, 0, 0, 0)) + if (filter_cmdline_parser_configfile(cf, &conf, 0, 0, 0)) return -E_FILTER_SYNTAX; } if (!conf.list_filters_given) @@ -140,7 +139,6 @@ int main(int argc, char *argv[]) int ret; struct sched s; - init_sched(); stdin_set_defaults(sit); sit->buf = para_malloc(sit->bufsize), @@ -153,7 +151,6 @@ int main(int argc, char *argv[]) goto out; stdout_set_defaults(sot); - PARA_EMERG_LOG("fc->output_eof: %d\n", *fc->output_eof); sot->buf = fc->outbuf; sot->loaded = fc->out_loaded; sot->input_eof = &fc->eof; @@ -163,7 +160,6 @@ int main(int argc, char *argv[]) register_task(&sit->task); s.default_timeout.tv_sec = 1; s.default_timeout.tv_usec = 0; - PARA_EMERG_LOG("fc->output_eof: %d\n", *fc->output_eof); ret = sched(&s); out: free(sit->buf);