X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoom-c.c;h=2c6297b07d9ddb7c1aff356f130dac0de36d284d;hb=cd8a27308e5bb886f561b517d091437c7afbf53c;hp=094c6e6051901b7b20a7499160be15a1c71cbbde;hpb=3599bbc013ec757862d8a2d6e62aa6a432ba4514;p=yaz-moved-to-github.git diff --git a/zoom/zoom-c.c b/zoom/zoom-c.c index 094c6e6..2c6297b 100644 --- a/zoom/zoom-c.c +++ b/zoom/zoom-c.c @@ -1,5 +1,5 @@ /* - * $Id: zoom-c.c,v 1.16 2002-01-02 10:30:25 adam Exp $ + * $Id: zoom-c.c,v 1.18 2002-01-03 12:18:38 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -446,7 +446,6 @@ static void ZOOM_resultset_retrieve (ZOOM_resultset r, { ZOOM_task task; ZOOM_connection c; - const char *cp; if (!r) return; @@ -1093,7 +1092,17 @@ static int scan_response (ZOOM_connection c, Z_ScanResponse *res) response_diag(c, res->entries->nonsurrogateDiagnostics[0]); scan->scan_response = res; nmem_transfer (scan->odr->mem, nmem); + if (res->stepSize) + ZOOM_options_set_int (scan->options, "stepSize", *res->stepSize); + if (res->positionOfTerm) + ZOOM_options_set_int (scan->options, "position", *res->positionOfTerm); + if (res->scanStatus) + ZOOM_options_set_int (scan->options, "scanStatus", *res->scanStatus); + if (res->numberOfEntriesReturned) + ZOOM_options_set_int (scan->options, "number", + *res->numberOfEntriesReturned); nmem_destroy (nmem); + return 1; } static int send_sort (ZOOM_connection c) @@ -1350,6 +1359,17 @@ const char *ZOOM_scanset_term (ZOOM_scanset scan, size_t pos, return term; } +const char *ZOOM_scanset_option_get (ZOOM_scanset scan, const char *key) +{ + return ZOOM_options_get (scan->options, key); +} + +void ZOOM_scanset_option_set (ZOOM_scanset scan, const char *key, + const char *val) +{ + ZOOM_options_set (scan->options, key, val); +} + static int ZOOM_connection_exec_task (ZOOM_connection c) { ZOOM_task task = c->tasks; @@ -1841,7 +1861,7 @@ int ZOOM_event (int no, ZOOM_connection *cs) } if (r == 0 && c->mask) { - ZOOM_Event event = ZOOM_Event_create(ZOOM_EVENT_IO_TIMEOUT); + ZOOM_Event event = ZOOM_Event_create(ZOOM_EVENT_TIMEOUT); /* timeout and this connection was waiting */ c->error = ZOOM_ERROR_TIMEOUT; do_close (c);