X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomtst7.c;h=2de80f6fba815b6f7da7b87a26d47dc9cdd55288;hb=806d40e9fc4341a0366dac49291f7cb5ca79809f;hp=fd113cfb509a3914d1726c889ee21cba6fe12534;hpb=67e7a7a13ff1e787b9e5cfe84494dfd446c1bcb9;p=yaz-moved-to-github.git diff --git a/zoom/zoomtst7.c b/zoom/zoomtst7.c index fd113cf..2de80f6 100644 --- a/zoom/zoomtst7.c +++ b/zoom/zoomtst7.c @@ -1,5 +1,5 @@ /* - * $Id: zoomtst7.c,v 1.3 2001-11-06 17:05:19 adam Exp $ + * $Id: zoomtst7.c,v 1.6 2001-11-15 08:58:29 adam Exp $ * * API test.. */ @@ -22,6 +22,15 @@ int main(int argc, char **argv) o = Z3950_options_create (); + z = Z3950_connection_new ("localhost", 9999); + if (Z3950_connection_error (z, 0, 0)) + { + printf ("error - couldn't connect?\n"); + exit (1); + } + + Z3950_connection_destroy (z); + for (block = 0; block < 3; block++) { switch (block) @@ -49,7 +58,6 @@ int main(int argc, char **argv) for (j = 0; j < 10; j++) { Z3950_record recs[2]; - size_t recs_count = 2; char query[40]; Z3950_query s = Z3950_query_create (); @@ -68,6 +76,7 @@ int main(int argc, char **argv) Z3950_resultset_records (r[j], recs, 0, 2); /* first two */ Z3950_resultset_records (r[j], recs, 1, 2); /* third */ + Z3950_resultset_records (r[j], recs, 0, 0); /* ignored */ if (Z3950_resultset_size (r[j]) > 2) @@ -78,8 +87,6 @@ int main(int argc, char **argv) exit (1); } } - Z3950_record_destroy (recs[0]); - Z3950_record_destroy (recs[1]); Z3950_query_destroy (s); @@ -137,8 +144,9 @@ int main(int argc, char **argv) } } Z3950_options_destroy (o); + xmalloc_trav(""); + nmem_exit(); + xmalloc_trav(""); exit (0); } - -