projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Re-format
[yaz-moved-to-github.git]
/
test
/
tstlogthread.c
diff --git
a/test/tstlogthread.c
b/test/tstlogthread.c
index
501795f
..
9125cf3
100644
(file)
--- a/
test/tstlogthread.c
+++ b/
test/tstlogthread.c
@@
-1,8
+1,6
@@
-/*
- * Copyright (c) 1998-2005, Index Data.
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: tstlogthread.c,v 1.1 2005-09-08 13:25:33 adam Exp $
*/
#if HAVE_CONFIG_H
*/
#if HAVE_CONFIG_H
@@
-14,7
+12,7
@@
#include <yaz/log.h>
#include <yaz/options.h>
#include <yaz/log.h>
#include <yaz/options.h>
-#if HAVE_POSIX_THREADS
+#if YAZ_POSIX_THREADS
#include <pthread.h>
#include <pthread.h>
@@
-33,7
+31,7
@@
static void *t_loop2(void *vp)
return 0;
}
return 0;
}
-static void t_test()
+static void t_test(void)
{
pthread_t tids[4];
{
pthread_t tids[4];
@@
-49,7
+47,7
@@
static void t_test()
exit(0);
}
#else
exit(0);
}
#else
-static void t_test()
+static void t_test(void)
{
}
{
}
@@
-60,6
+58,7
@@
int main(int argc, char **argv)
char *arg;
int ret;
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)
while ((ret = options("v:l:", argv, argc, &arg)) != -2)
{
switch (ret)
@@
-70,11
+69,13
@@
int main(int argc, char **argv)
case 'l':
yaz_log_init_file(arg);
break;
case 'l':
yaz_log_init_file(arg);
break;
+ case 0:
+ t_test();
+ break;
default:
default:
- return 1;
+ exit(1);
}
}
}
}
- t_test();
return 0;
}
/*
return 0;
}
/*