-/*
- * Copyright (c) 1998-2005, Index Data.
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
- *
- * $Id: tstlogthread.c,v 1.1 2005-09-08 13:25:33 adam Exp $
*/
#if HAVE_CONFIG_H
#include <yaz/log.h>
#include <yaz/options.h>
-#if HAVE_POSIX_THREADS
+#if YAZ_POSIX_THREADS
#include <pthread.h>
return 0;
}
-static void t_test()
+static void t_test(void)
{
pthread_t tids[4];
exit(0);
}
#else
-static void t_test()
+static void t_test(void)
{
}
char *arg;
int ret;
+ /* t_test is only invoked if a non-option arg is given .. */
while ((ret = options("v:l:", argv, argc, &arg)) != -2)
{
switch (ret)
case 'l':
yaz_log_init_file(arg);
break;
+ case 0:
+ t_test();
+ break;
default:
- return 1;
+ exit(1);
}
}
- t_test();
return 0;
}
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab