X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=b8181a5177ac027d93ab77fea68a70b3589e71ef;hb=297ba5c5c265a5f869f43a0a211bf9f48f700add;hp=8c4633f076543c903ad73a4592d2b4842c6f6880;hpb=1c1f26b0b758efb903aaa0a6288dfabf1efcdc17;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index 8c4633f..b8181a5 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -3,7 +3,13 @@ * All rights reserved. * * $Log: zebraapi.c,v $ - * Revision 1.31 2000-04-05 10:07:02 adam + * Revision 1.33 2000-05-18 12:01:36 adam + * System call times(2) used again. More 64-bit fixes. + * + * Revision 1.32 2000/04/19 14:35:59 adam + * WIN32 update (this version is known not to work on Windows). + * + * Revision 1.31 2000/04/05 10:07:02 adam * Minor zebra compile fix. * * Revision 1.30 2000/04/05 09:49:35 adam @@ -156,11 +162,21 @@ static int zebra_register_lock (ZebraHandle zh) zh->errCode = 1019; return 1; } +#if HAVE_SYS_TIMES_H + times (&zh->tms1); +#endif return 0; } static void zebra_register_unlock (ZebraHandle zh) { +#if HAVE_SYS_TIMES_H + times (&zh->tms2); + logf (LOG_LOG, "user/system: %ld/%ld", + (long) (zh->tms2.tms_utime - zh->tms1.tms_utime), + (long) (zh->tms2.tms_stime - zh->tms1.tms_stime)); + +#endif } ZebraHandle zebra_open (ZebraService zs) @@ -169,10 +185,7 @@ ZebraHandle zebra_open (ZebraService zs) assert (zs); if (zs->stop_flag) - { - zh->errCode = 1019; return 0; - } zh = (ZebraHandle) xmalloc (sizeof(*zh)); @@ -272,7 +285,7 @@ static int zebra_register_activate (ZebraService zh) logf (LOG_WARN, "rec_open"); return -1; } - if (!(zh->dict = dict_open (zh->bfs, FNAME_DICT, 40, 1, 0))) + if (!(zh->dict = dict_open (zh->bfs, FNAME_DICT, 80, 1, 0))) { logf (LOG_WARN, "dict_open"); return -1;