a size_t variable.
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.303 2006-03-31 09:51:21 adam Exp $
+ * $Id: client.c,v 1.304 2006-04-21 10:28:06 adam Exp $
*/
#include <stdio.h>
if (!(*type->fun)(in, &rr, 0, 0))
{
odr_perror(in, "Decoding constructed record.");
- fprintf(stdout, "[Near %d]\n", odr_offset(in));
+ fprintf(stdout, "[Near %ld]\n", (long) odr_offset(in));
fprintf(stdout, "Packet dump:\n---------\n");
odr_dumpBER(stdout, (char*)r->u.octet_aligned->buf,
r->u.octet_aligned->len);
const char *pqf_msg;
size_t off;
int code = yaz_pqf_error (pqf_parser, &pqf_msg, &off);
- printf("%*s^\n", off+4, "");
+ int ioff = off;
+ printf("%*s^\n", ioff+4, "");
printf("Prefix query error: %s (code %d)\n", pqf_msg, code);
yaz_pqf_destroy (pqf_parser);
const char *pqf_msg;
size_t off;
int code = yaz_pqf_error (pqf_parser, &pqf_msg, &off);
- printf("%*s^\n", off+7, "");
+ int ioff = off;
+ printf("%*s^\n", ioff+7, "");
printf("Prefix query error: %s (code %d)\n", pqf_msg, code);
yaz_pqf_destroy (pqf_parser);
return -1;
{
FILE *f = ber_file ? ber_file : stdout;
odr_perror(in, "Decoding incoming APDU");
- fprintf(f, "[Near %d]\n", odr_offset(in));
+ fprintf(f, "[Near %ld]\n", (long) odr_offset(in));
fprintf(f, "Packet dump:\n---------\n");
odr_dumpBER(f, netbuffer, res);
fprintf(f, "---------\n");
rpn = ccl_find_str (bibset, arg, &error, &pos);
if (error) {
- printf ("%*s^ - ", 3+strlen(last_cmd)+1+pos, " ");
+ int ioff = 3+strlen(last_cmd)+1+pos;
+ printf ("%*s^ - ", ioff, " ");
printf ("%s\n", ccl_err_msg (error));
}
else
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: nmem.c,v 1.21 2006-02-01 20:29:19 adam Exp $
+ * $Id: nmem.c,v 1.22 2006-04-21 10:28:06 adam Exp $
*/
/**
if (get < size)
get = size;
if(log_level)
- yaz_log (log_level, "nmem get_block alloc new block size=%d", get);
+ yaz_log (log_level, "nmem get_block alloc new block size=%ld",
+ (long) get);
r = (nmem_block *)xmalloc(sizeof(*r));
r->buf = (char *)xmalloc(r->size = get);
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.74 2006-04-05 12:05:36 mike Exp $
+ * $Id: seshigh.c,v 1.75 2006-04-21 10:28:07 adam Exp $
*/
/**
* \file seshigh.c
if (!z_GDU(assoc->decode, &req->gdu_request, 0, 0))
{
yaz_log(YLOG_WARN, "ODR error on incoming PDU: %s [element %s] "
- "[near byte %d] ",
+ "[near byte %ld] ",
odr_errmsg(odr_geterror(assoc->decode)),
odr_getelement(assoc->decode),
- odr_offset(assoc->decode));
+ (long) odr_offset(assoc->decode));
if (assoc->decode->error != OHTTP)
{
yaz_log(YLOG_WARN, "PDU dump:");
const char *pqf_msg;
size_t off;
int code = yaz_pqf_error (pqf_parser, &pqf_msg, &off);
- yaz_log(log_requestdetail, "Parse error %d %s near offset %d",
- code, pqf_msg, off);
+ yaz_log(log_requestdetail, "Parse error %d %s near offset %ld",
+ code, pqf_msg, (long) off);
srw_error = YAZ_SRW_QUERY_SYNTAX_ERROR;
}
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
- version = odr_strdup(assoc->encode, "$Revision: 1.74 $");
+ version = odr_strdup(assoc->encode, "$Revision: 1.75 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
* Copyright (C) 1995-2005, Index Data ApS
* All rights reserved.
*
- * $Id: xmalloc.c,v 1.6 2005-06-25 15:46:06 adam Exp $
+ * $Id: xmalloc.c,v 1.7 2006-04-21 10:28:07 adam Exp $
*/
/**
* \file xmalloc.c
if(log_level)
yaz_log (log_level,
- "%s:%d: xrealloc(s=%d) %p -> %p", file, line, size, o, p);
+ "%s:%d: xrealloc(s=%ld) %p -> %p", file, line, (long) size, o, p);
if (!p)
{
- yaz_log (YLOG_FATAL|YLOG_ERRNO, "Out of memory, realloc (%d bytes)",
- size);
+ yaz_log (YLOG_FATAL|YLOG_ERRNO, "Out of memory, realloc (%ld bytes)",
+ (long) size);
exit(1);
}
return p;
}
if (log_level)
- yaz_log (log_level, "%s:%d: xmalloc(s=%d) %p", file, line, size, p);
+ yaz_log (log_level, "%s:%d: xmalloc(s=%ld) %p", file, line,
+ (long) size, p);
if (!p)
{
- yaz_log (YLOG_FATAL, "Out of memory - malloc (%d bytes)", size);
+ yaz_log (YLOG_FATAL, "Out of memory - malloc (%ld bytes)",
+ (long) size);
exit (1);
}
return p;
}
if (log_level)
- yaz_log (log_level, "%s:%d: xcalloc(s=%d) %p", file, line, size, p);
+ yaz_log (log_level, "%s:%d: xcalloc(s=%ld) %p", file, line,
+ (long) size, p);
if (!p)
{
- yaz_log (YLOG_FATAL, "Out of memory - calloc (%d, %d)", nmemb, size);
+ yaz_log (YLOG_FATAL, "Out of memory - calloc (%ld, %ld)",
+ (long) nmemb, (long) size);
exit (1);
}
return p;
}
if (log_level)
- yaz_log (log_level, "%s:%d: xstrdup(s=%d) %p", file, line, strlen(s)+1, p);
+ yaz_log (log_level, "%s:%d: xstrdup(s=%ld) %p", file, line,
+ (long) strlen(s)+1, p);
strcpy (p, s);
return p;
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: zoom-c.c,v 1.69 2006-04-19 10:05:03 adam Exp $
+ * $Id: zoom-c.c,v 1.70 2006-04-21 10:28:07 adam Exp $
*/
/**
* \file zoom-c.c
if (!r)
return ;
- yaz_log(log_api, "%p ZOOM_resultset_records r=%p start=%d count=%d",
- r, r, start, count);
+ yaz_log(log_api, "%p ZOOM_resultset_records r=%p start=%ld count=%ld",
+ r, r, (long) start, (long) count);
if (count && recs)
force_present = 1;
ZOOM_resultset_retrieve (r, force_present, start, count);
ZOOM_options_get(c->options, "implementationName"),
odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName));
- version = odr_strdup(c->odr_out, "$Revision: 1.69 $");
+ version = odr_strdup(c->odr_out, "$Revision: 1.70 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
ireq->implementationVersion = odr_prepend(c->odr_out,
* Copyright (C) 1995-2006, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: marcdump.c,v 1.36 2006-04-19 10:05:04 adam Exp $
+ * $Id: marcdump.c,v 1.37 2006-04-21 10:28:07 adam Exp $
*/
#define _FILE_OFFSET_BITS 64
if (r < 5)
{
if (r && print_offset && verbose)
- printf ("<!-- Extra %d bytes at end of file -->\n", r);
+ printf ("<!-- Extra %ld bytes at end of file -->\n",
+ (long) r);
break;
}
while (*buf < '0' || *buf > '9')
Notice that the selection rules can equally either be written
'attr/@type=7' or 'attr[@type=8]' with no difference -->
<!--
- <xsl:template match="apt[attr/@type=7 and attr[@type=8]]">
+ <xsl:template match="apt[attr/@type=7 and attr/@type=8]">
<apt>
<xsl:apply-templates select="attr[@type=1]"/>
<xsl:apply-templates select="attr[@type=2]"/>
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: yaziconv.c,v 1.4 2005-06-25 15:46:07 adam Exp $
+ * $Id: yaziconv.c,v 1.5 2006-04-21 10:28:07 adam Exp $
*/
#if HAVE_CONFIG_H
}
if (verbose > 1)
{
- fprintf (stderr, "yaz_iconv: inbytesleft=%d outbytesleft=%d\n",
- inbytesleft, outbytesleft);
+ fprintf (stderr, "yaz_iconv: inbytesleft=%ld outbytesleft=%ld\n",
+ (long) inbytesleft, (long) outbytesleft);
}
r = yaz_iconv (cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: zoomsh.c,v 1.39 2005-11-02 21:41:27 adam Exp $
+ * $Id: zoomsh.c,v 1.40 2006-04-21 10:28:07 adam Exp $
*/
-/* ZOOM-C Shell */
+/** \file zoomsh.c
+ \brief ZOOM C command line tool (shell)
+*/
#include <stdio.h>
#include <stdlib.h>
int start = ZOOM_options_get_int (options, "start", 0);
int count = ZOOM_options_get_int (options, "count", 0);
- printf ("%s: %d hits\n", ZOOM_connection_option_get(c[i], "host"),
+ printf ("%s: %ld hits\n", ZOOM_connection_option_get(c[i], "host"),
ZOOM_resultset_size(r[i]));
/* and display */
display_records (c[i], r[i], start, count);
-/*
- * $Id: zoomtst1.c,v 1.4 2005-06-25 15:46:08 adam Exp $
- *
- * Synchronous single-target client doing search (but no retrieval)
- */
+/* $Id: zoomtst1.c,v 1.5 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst1.c
+ \brief Synchronous single-target client doing search (but no retrieval)
+*/
#include <stdlib.h>
#include <stdio.h>
if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
fprintf (stderr, "Error: %s (%d) %s\n", errmsg, error, addinfo);
else
- printf ("Result count: %d\n", ZOOM_resultset_size(r));
+ printf ("Result count: %ld\n", (long) ZOOM_resultset_size(r));
ZOOM_resultset_destroy (r);
ZOOM_connection_destroy (z);
exit (0);
-/*
- * $Id: zoomtst2.c,v 1.7 2006-03-01 23:24:26 adam Exp $
- *
- * Asynchronous single-target client performing search (no retrieval)
- */
+/* $Id: zoomtst2.c,v 1.8 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst2.c
+ \brief Asynchronous single-target client performing search (no retrieval)
+*/
#include <stdio.h>
#include <stdlib.h>
exit (2);
}
else /* OK print hit count */
- printf ("Result count: %d\n", ZOOM_resultset_size(r));
+ printf ("Result count: %ld\n", (long) ZOOM_resultset_size(r));
ZOOM_resultset_destroy (r);
ZOOM_connection_destroy (z);
exit (0);
-/*
- * $Id: zoomtst3.c,v 1.10 2006-04-19 09:05:09 adam Exp $
- *
- * Asynchronous multi-target client doing search and piggyback retrieval
- */
+/* $Id: zoomtst3.c,v 1.11 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst3.c
+ \brief Asynchronous multi-target client
+
+ Performs search and piggyback retrieval of records
+*/
#include <stdio.h>
#include <stdlib.h>
{
/* OK, no major errors. Look at the result count */
int pos;
- printf ("%s: %d hits\n", tname, ZOOM_resultset_size(r[i]));
+ printf ("%s: %ld hits\n", tname, (long) ZOOM_resultset_size(r[i]));
/* go through all records at target */
for (pos = 0; pos < 10; pos++)
{
-/*
- * $Id: zoomtst4.c,v 1.8 2005-06-25 15:46:08 adam Exp $
- *
- * Asynchronous multi-target going through proxy doing search and retrieve
- * using present.
- */
+/* $Id: zoomtst4.c,v 1.9 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst4.c
+ \brief Asynchronous multi-target client with separate present
+
+ Asynchronous multi-target going through proxy doing search and retrieve
+ using present.
+*/
#include <stdio.h>
#include <string.h>
ZOOM_connection_option_get(z[i], "host"),
errmsg, error, addinfo);
else
- printf ("%s: %d hits\n", ZOOM_connection_option_get(z[i], "host"),
- ZOOM_resultset_size(r[i]));
+ printf ("%s: %ld hits\n", ZOOM_connection_option_get(z[i], "host"),
+ (long) ZOOM_resultset_size(r[i]));
}
/* destroy stuff and exit */
-/*
- * $Id: zoomtst5.c,v 1.10 2005-06-25 15:46:08 adam Exp $
- *
- * Asynchronous multi-target client doing search, sort and present
- */
+/* $Id: zoomtst5.c,v 1.11 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst5.c
+ \brief Asynchronous multi-target client with sort
+
+ Asynchronous multi-target client doing search, sort and present
+*/
#include <stdio.h>
#include <string.h>
{
/* OK, no major errors. Look at the result count */
int pos;
- printf ("%s: %d hits\n", ZOOM_connection_option_get(z[i], "host"),
- ZOOM_resultset_size(r[i]));
+ printf ("%s: %ld hits\n", ZOOM_connection_option_get(z[i], "host"),
+ (long) ZOOM_resultset_size(r[i]));
/* go through first 20 records at target */
for (pos = 0; pos < 20; pos++)
{
-/*
- * $Id: zoomtst6.c,v 1.11 2005-11-04 15:51:02 mike Exp $
- *
- * Asynchronous multi-target client doing two searches
- */
+/* $Id: zoomtst6.c,v 1.12 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst6.c
+ \brief Asynchronous multi-target client with two searches
+*/
#include <stdio.h>
#include <yaz/nmem.h>
{
/* 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++)
{
-/*
- * $Id: zoomtst7.c,v 1.14 2005-06-25 15:46:08 adam Exp $
- *
- * API test..
- */
+/* $Id: zoomtst7.c,v 1.15 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst7.c
+ \brief Mix of operations
+*/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int block;
- size_t j, i;
+ int i, j;
ZOOM_connection z;
ZOOM_resultset r[10]; /* and result sets .. */
ZOOM_options o;
if (block > 0)
while (ZOOM_event (1, &z))
;
- printf (" scan size = %d\n", ZOOM_scanset_size(scan));
+ printf (" scan size = %ld\n", (long) ZOOM_scanset_size(scan));
for (j = 0; j<ZOOM_scanset_size (scan); j++)
{
int occur, len;
-/*
- * $Id: zoomtst8.c,v 1.4 2005-06-25 15:46:08 adam Exp $
- *
- * Asynchronous multi-target client doing scan
- */
+/* $Id: zoomtst8.c,v 1.5 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst8.c
+ \brief Asynchronous multi-target client doing scan
+*/
#include <stdio.h>
#include <string.h>
errmsg, error, addinfo);
else
{
- size_t j;
+ int j;
printf ("%s\n", ZOOM_connection_option_get(z[i], "host"));
for (j = 0; j<ZOOM_scanset_size (s[i]); j++)
{
-/*
- * $Id: zoomtst9.c,v 1.1 2005-11-24 10:04:12 adam Exp $
- *
- * Program which illustrates the use of extended services update
- */
+/* $Id: zoomtst9.c,v 1.2 2006-04-21 10:28:08 adam Exp $ */
+
+/** \file zoomtst9.c
+ \brief Extended Service Update
+*/
#include <stdio.h>
#include <string.h>
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.78 2006-03-13 12:14:00 adam Exp $
+ * $Id: ztest.c,v 1.79 2006-04-21 10:28:09 adam Exp $
*/
/*
if (!ill_ItemRequest (rr->decode, &item_req, 0, 0))
{
yaz_log (log_level,
- "Couldn't decode ItemRequest %s near %d",
+ "Couldn't decode ItemRequest %s near %ld",
odr_errmsg(odr_geterror(rr->decode)),
- odr_offset(rr->decode));
+ (long) odr_offset(rr->decode));
}
else
yaz_log(log_level, "Decode ItemRequest OK");
if (!ill_APDU (rr->decode, &ill_apdu, 0, 0))
{
yaz_log (log_level,
- "Couldn't decode ILL APDU %s near %d",
+ "Couldn't decode ILL APDU %s near %ld",
odr_errmsg(odr_geterror(rr->decode)),
- odr_offset(rr->decode));
+ (long) odr_offset(rr->decode));
yaz_log(log_level, "PDU dump:");
odr_dumpBER(yaz_log_file(),
(char *) r->u.single_ASN1_type->buf,