X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstlogthread.c;h=41c4ceb839a5abd45d898ca502365d3696ee4a7e;hp=6241d81a086dfdb486b92d25d1fa16617cb4020b;hb=f03f934986cd3ff1fbb98f8b1432d70c46f6809e;hpb=9eca093a375190581d3ce6b4eb119dadd39692eb diff --git a/test/tstlogthread.c b/test/tstlogthread.c index 6241d81..41c4ceb 100644 --- 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-2010 Index Data * See the file LICENSE for details. - * - * $Id: tstlogthread.c,v 1.2 2005-09-08 13:51:27 adam Exp $ */ #if HAVE_CONFIG_H @@ -33,7 +31,7 @@ static void *t_loop2(void *vp) return 0; } -static void t_test() +static void t_test(void) { pthread_t tids[4]; @@ -49,7 +47,7 @@ static void t_test() 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; + /* t_test is only invoked if a non-option arg is given .. */ while ((ret = options("v:l:", argv, argc, &arg)) != -2) { switch (ret) @@ -70,16 +69,19 @@ int main(int argc, char **argv) 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