Functions ZOOM_scanset_term and ZOOM_scanset_display_term have changed,
so that occ (hit count) and len (string length) are now of type size_t
pointer rather than int pointer. This is to be able to represent large
hit counts and to also just to use the proper type for string length
(strlen result).
ZOOM_API(const char *)
ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
ZOOM_API(const char *)
ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
+ size_t *occ, size_t *len);
ZOOM_API(const char *)
ZOOM_scanset_display_term(ZOOM_scanset scan, size_t pos,
ZOOM_API(const char *)
ZOOM_scanset_display_term(ZOOM_scanset scan, size_t pos,
+ size_t *occ, size_t *len);
ZOOM_API(size_t)
ZOOM_scanset_size(ZOOM_scanset scan);
ZOOM_API(size_t)
ZOOM_scanset_size(ZOOM_scanset scan);
}
static void ZOOM_scanset_term_x(ZOOM_scanset scan, size_t pos,
}
static void ZOOM_scanset_term_x(ZOOM_scanset scan, size_t pos,
const char **value_term, size_t *value_len,
const char **disp_term, size_t *disp_len)
{
const char **value_term, size_t *value_len,
const char **disp_term, size_t *disp_len)
{
ZOOM_API(const char *)
ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
ZOOM_API(const char *)
ZOOM_scanset_term(ZOOM_scanset scan, size_t pos,
+ size_t *occ, size_t *len)
{
const char *value_term = 0;
size_t value_len = 0;
{
const char *value_term = 0;
size_t value_len = 0;
ZOOM_API(const char *)
ZOOM_scanset_display_term(ZOOM_scanset scan, size_t pos,
ZOOM_API(const char *)
ZOOM_scanset_display_term(ZOOM_scanset scan, size_t pos,
+ size_t *occ, size_t *len)
{
const char *value_term = 0;
size_t value_len = 0;
{
const char *value_term = 0;
size_t value_len = 0;
#include <string.h>
#include <ctype.h>
#include <string.h>
#include <ctype.h>
-#include <yaz/comstack.h>
-
#if HAVE_READLINE_READLINE_H
#include <readline/readline.h>
#endif
#if HAVE_READLINE_READLINE_H
#include <readline/readline.h>
#endif
#include <readline/history.h>
#endif
#include <readline/history.h>
#endif
-#include <yaz/xmalloc.h>
-
#include <yaz/zoom.h>
#define MAX_CON 100
#include <yaz/zoom.h>
#define MAX_CON 100
int start = ZOOM_options_get_int(options, "start", 0);
int count = ZOOM_options_get_int(options, "count", 0);
int start = ZOOM_options_get_int(options, "start", 0);
int count = ZOOM_options_get_int(options, "count", 0);
- printf("%s: %ld hits\n", ZOOM_connection_option_get(c[i], "host"),
- (long) ZOOM_resultset_size(r[i]));
+ printf("%s: %lld hits\n", ZOOM_connection_option_get(c[i], "host"),
+ (long long int) ZOOM_resultset_size(r[i]));
/* and display */
display_records(c[i], r[i], start, count, "render");
}
/* and display */
display_records(c[i], r[i], start, count, "render");
}
size_t p, sz = ZOOM_scanset_size(s[i]);
for (p = 0; p < sz; p++)
{
size_t p, sz = ZOOM_scanset_size(s[i]);
for (p = 0; p < sz; p++)
{
- int occ = 0;
- int len = 0;
+ size_t occ = 0;
+ size_t len = 0;
const char *term = ZOOM_scanset_display_term(s[i], p,
&occ, &len);
const char *term = ZOOM_scanset_display_term(s[i], p,
&occ, &len);
-
- printf("%.*s %d\n", len, term, occ);
+ printf("%.*s %lld\n", (int) len, term, (long long int) occ);
}
ZOOM_scanset_destroy(s[i]);
}
}
ZOOM_scanset_destroy(s[i]);
}