X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmain.c;h=f5073a1579e500579d07159fcf7fdc42560e7a1a;hb=d66990c38540b6196ede05d4b5636a9b51609134;hp=f14aaec95404115f7511100cb39f28657e9ca90e;hpb=3bf301b46354151f3ed2ece4ad69b98f73db15fa;p=idzebra-moved-to-github.git diff --git a/index/main.c b/index/main.c index f14aaec..f5073a1 100644 --- a/index/main.c +++ b/index/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.106 2003-09-16 13:58:25 adam Exp $ +/* $Id: main.c,v 1.108 2003-11-24 12:58:00 mike Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -39,6 +39,10 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #endif +#if HAVE_EXPAT_H +#include +#endif + #include #include "zebraapi.h" @@ -58,7 +62,7 @@ int main (int argc, char **argv) #if HAVE_SYS_TIMES_H struct tms tms1, tms2; struct timeval start_time, end_time; - long usec; + double usec; #endif #ifndef WIN32 char nbuf[100]; @@ -264,6 +268,14 @@ int main (int argc, char **argv) #if HAVE_TCL_H printf("Using: Tcl %s\n", TCL_VERSION); #endif +#if HAVE_EXPAT_H + if (1) + { + XML_Expat_Version v = XML_ExpatVersionInfo(); + printf ("Using: Expat %d.%d.%d\n", + v.major, v.minor, v.micro); + } +#endif } else if (ret == 'v') yaz_log_init_level (yaz_log_mask_str(arg)); @@ -300,11 +312,11 @@ int main (int argc, char **argv) if (trans_started) { gettimeofday(&end_time, 0); - usec = (end_time.tv_sec - start_time.tv_sec) * 1000000L + + usec = (end_time.tv_sec - start_time.tv_sec) * 1000000.0 + end_time.tv_usec - start_time.tv_usec; times(&tms2); yaz_log (LOG_LOG, "zebraidx times: %5.2f %5.2f %5.2f", - (double) usec / 1000000.0, + usec / 1000000, (double) (tms2.tms_utime - tms1.tms_utime)/100, (double) (tms2.tms_stime - tms1.tms_stime)/100); }