/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
+#include <yaz/yaz-iconv.h>
#include <yaz/xmalloc.h>
"%s number target query\n", *argv, *argv);
exit (1);
}
- if (argc == 4 && isdigit(argv[1][0]) && !strchr(argv[1],'.'))
+ if (argc == 4 && yaz_isdigit(argv[1][0]) && !strchr(argv[1],'.'))
{
no = atoi(argv[1]);
same_target = 1;
/* get first 10 records of result set (using piggyback) */
ZOOM_options_set (o, "count", "10");
+ ZOOM_options_set (o, "step", "5");
/* preferred record syntax */
ZOOM_options_set (o, "preferredRecordSyntax", "usmarc");
while ((i = ZOOM_event (no, z)))
{
int peek = ZOOM_connection_peek_event(z[i-1]);
- printf ("no = %d peek = %d event = %d\n", i-1,
+ int event = ZOOM_connection_last_event(z[i-1]);
+ printf ("no = %d peek = %d event = %d %s\n", i-1,
peek,
- ZOOM_connection_last_event(z[i-1]));
+ event,
+ ZOOM_get_event_str(event));
}
-
+
/* no more to be done. Inspect results */
for (i = 0; i<no; i++)
{