Do not use obsolete YAZ defines
[yaz-moved-to-github.git] / ztest / ztest.c
index a92a335..b327fdd 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1995-2003, Index Data.
+ * Copyright (c) 1995-2004, Index Data.
  * See the file LICENSE for details.
  *
- * $Id: ztest.c,v 1.60 2004-01-15 10:04:39 adam Exp $
+ * $Id: ztest.c,v 1.64 2004-05-10 10:46:42 adam Exp $
  */
 
 /*
@@ -34,12 +34,14 @@ int ztest_search (void *handle, bend_search_rr *rr)
         rr->errcode = 23;
         return 0;
     }
-    /* if database is stop, stop this process.. For debugging only.
+#if NMEM_DEBUG
+    /* if database is stop, stop this process.. For debugging only. */
     if (!yaz_matchstr (rr->basenames[0], "stop"))
     {
        nmem_print_list_l(LOG_LOG);
         exit(0);
     }
+#endif
     /* Throw Database unavailable if other than Default */
     if (yaz_matchstr (rr->basenames[0], "Default"))
     {
@@ -420,7 +422,7 @@ int ztest_delete (void *handle, bend_delete_rr *rr)
 int ztest_sort (void *handle, bend_sort_rr *rr)
 {
     rr->errcode = 0;
-    rr->sort_status = Z_SortStatus_success;
+    rr->sort_status = Z_SortResponse_success;
     return 0;
 }
 
@@ -435,7 +437,7 @@ int ztest_present (void *handle, bend_present_rr *rr)
 int ztest_fetch(void *handle, bend_fetch_rr *r)
 {
     char *cp;
-    r->errstring = 0;
+
     r->last_in_set = 0;
     r->basename = "Default";
     r->output_format = r->request_format;  
@@ -639,6 +641,7 @@ bend_initresult *bend_init(bend_initrequest *q)
     q->bend_fetch = ztest_fetch;
     q->bend_scan = ztest_scan;
     q->bend_explain = ztest_explain;
+
     return r;
 }