From f24cd8a4e4caa9629e6320cfc81a57011c2e9d5e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 28 Apr 2005 11:25:24 +0000 Subject: [PATCH] Get rid of global log_level. WS updates --- test/api/t10.c | 8 ++++---- test/api/testlib.h | 7 ++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/test/api/t10.c b/test/api/t10.c index aae64dd..cd68776 100644 --- a/test/api/t10.c +++ b/test/api/t10.c @@ -1,4 +1,4 @@ -/* $Id: t10.c,v 1.6 2005-01-15 19:38:35 adam Exp $ +/* $Id: t10.c,v 1.7 2005-04-28 11:25:24 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -78,16 +78,16 @@ int main(int argc, char **argv) ZebraService zs = start_up("zebrazv.cfg", argc, argv); ZebraHandle zh = zebra_open (zs); - int loglevel=yaz_log_mask_str("zvrank,rank1,t10"); + int loglevel = yaz_log_mask_str("zvrank,rank1,t10"); init_data(zh, recs); zebra_close(zh); yaz_log_init_level(loglevel); - for (i=0; tests[i].schema; i++) + for (i = 0; tests[i].schema; i++) { zh = zebra_open (zs); zebra_select_database(zh, "Default"); zebra_set_resource(zh, "zvrank.weighting-scheme", tests[i].schema); - yaz_log(log_level,"============%d: %s ============", i,tests[i].schema); + yaz_log(loglevel,"============%d: %s ===========", i, tests[i].schema); ranking_query( __LINE__, zh, "@attr 1=1016 @attr 2=102 the", 3, tests[i].hit1, tests[i].score1); diff --git a/test/api/testlib.h b/test/api/testlib.h index 23de293..6c2e3fa 100644 --- a/test/api/testlib.h +++ b/test/api/testlib.h @@ -1,4 +1,4 @@ -/* $Id: testlib.h,v 1.11 2005-04-15 10:47:49 adam Exp $ +/* $Id: testlib.h,v 1.12 2005-04-28 11:25:24 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -28,9 +28,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -int log_level; - - /** * start_up : Does all the usual start functions * - nmem_init @@ -73,7 +70,7 @@ ZebraService start_service(char *cfgname); int close_down(ZebraHandle zh, ZebraService zs, int retcode); /** inits the database and inserts test data */ -void init_data( ZebraHandle zh, const char **recs); +void init_data(ZebraHandle zh, const char **recs); /** -- 1.7.10.4