projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
log: disable the non-buffered logging YAZ-780
[yaz-moved-to-github.git]
/
zoom
/
zoomtst6.c
diff --git
a/zoom/zoomtst6.c
b/zoom/zoomtst6.c
index
44177e0
..
2ac31f7
100644
(file)
--- a/
zoom/zoomtst6.c
+++ b/
zoom/zoomtst6.c
@@
-1,7
+1,6
@@
-/*
- * $Id: zoomtst6.c,v 1.10 2005-06-25 15:46:08 adam Exp $
- *
- * Asynchronous multi-target client doing two searches
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) Index Data
+ * See the file LICENSE for details.
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-14,7
+13,7
@@
static void display_records (const char *tname, ZOOM_resultset r)
{
/* OK, no major errors. Look at the result count */
int pos;
{
/* OK, no major errors. Look at the result count */
int pos;
- printf ("%s: %d hits\n", tname, ZOOM_resultset_size(r));
+ printf ("%s: %ld hits\n", tname, (long) ZOOM_resultset_size(r));
/* go through all records at target */
for (pos = 0; pos < 4; pos++)
{
/* go through all records at target */
for (pos = 0; pos < 4; pos++)
{
@@
-30,7
+29,10
@@
static void display_records (const char *tname, ZOOM_resultset r)
{
printf ("%d %s\n", pos+1, (db ? db : "unknown"));
if (render)
{
printf ("%d %s\n", pos+1, (db ? db : "unknown"));
if (render)
- fwrite (render, 1, len, stdout);
+ {
+ if (fwrite (render, 1, len, stdout) != (size_t) len)
+ printf("write to stdout failed\n");
+ }
printf ("\n");
}
}
printf ("\n");
}
}
@@
-81,7
+83,7
@@
int main(int argc, char **argv)
}
if (ZOOM_query_prefix (q, argv[argc-1]))
{
}
if (ZOOM_query_prefix (q, argv[argc-1]))
{
- printf ("bad sort spec: %s\n", argv[argc-1]);
+ printf ("bad prefix query: %s\n", argv[argc-1]);
exit (2);
}
/* queue second search */
exit (2);
}
/* queue second search */
@@
-125,6
+127,7
@@
int main(int argc, char **argv)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab