* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.329 2007-03-19 14:40:06 adam Exp $
+ * $Id: client.c,v 1.330 2007-03-19 22:17:41 adam Exp $
*/
/** \file client.c
* \brief yaz-client program
}
w = wrbuf_alloc();
yaz_display_grs1(w, r->u.grs1, 0);
- puts (wrbuf_buf(w));
+ puts (wrbuf_cstr(w));
wrbuf_destroy(w);
}
else if (ent && ent->value == VAL_OPAC)
}
wrbuf_iconv_write(w, cd, q, strlen(q));
if (wrbuf_len(w))
- {
- int len = wrbuf_len(w);
- res = odr_strdupn(o, wrbuf_buf(w), len);
- }
+ res = odr_strdup(o, wrbuf_cstr(w));
else
res = odr_strdup(o, q);
yaz_iconv_close(cd);
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: fhistory.c,v 1.2 2007-01-24 23:09:48 adam Exp $
+ * $Id: fhistory.c,v 1.3 2007-03-19 22:17:41 adam Exp $
*/
/** \file fhistory.c
* \brief file history implementation
if (wrbuf_buf(fh->wr)[i] == '\n')
{
wrbuf_buf(fh->wr)[i] = '\0';
- callback(client_data, wrbuf_buf(fh->wr) + off);
+ callback(client_data, wrbuf_cstr(fh->wr) + off);
wrbuf_buf(fh->wr)[i] = '\n';
i++;
break;
/* CCL print rpn tree - infix notation
* Europagate, 1995
*
- * $Id: cclptree.c,v 1.7 2007-03-19 14:40:07 adam Exp $
+ * $Id: cclptree.c,v 1.8 2007-03-19 22:17:41 adam Exp $
*
* Old Europagate Log:
*
wrbuf_puts (w, " ");
break;
}
- wrbuf_cstr(w);
}
/*
* Local variables:
* Copyright (C) 2005-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tst_record_conv.c,v 1.14 2007-03-19 14:40:07 adam Exp $
+ * $Id: tst_record_conv.c,v 1.15 2007-03-19 22:17:41 adam Exp $
*
*/
#include <yaz/record_conv.h>
{
ret = 0;
}
- else if (strlen(output_expect_record) != wrbuf_len(output_record))
- {
- int expect_len = strlen(output_expect_record);
- ret = 0;
- printf("output_record expect-len=%d got-len=%d\n", expect_len,
- wrbuf_len(output_record));
- printf("got-output_record = %s\n", wrbuf_cstr(output_record));
- printf("output_expect_record = %s\n", output_expect_record);
- }
- else if (memcmp(output_expect_record, wrbuf_buf(output_record),
- strlen(output_expect_record)))
+ else if (strcmp(output_expect_record, wrbuf_cstr(output_record)))
{
ret = 0;
printf("got-output_record = %s\n", wrbuf_cstr(output_record));
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tstccl.c,v 1.14 2007-03-19 14:40:07 adam Exp $
+ * $Id: tstccl.c,v 1.15 2007-03-19 22:17:41 adam Exp $
*/
/* CCL test */
ccl_pquery(wrbuf, rpn);
/* check expect a result and that it matches */
- if (result && !strcmp(wrbuf_buf(wrbuf), result))
+ if (result && !strcmp(wrbuf_cstr(wrbuf), result))
ret = 1;
else
ret = 0;
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tstxmlquery.c,v 1.15 2007-03-19 14:40:07 adam Exp $
+ * $Id: tstxmlquery.c,v 1.16 2007-03-19 22:17:41 adam Exp $
*/
#include <stdlib.h>
else
{
status = XML_NO_MATCH;
- printf("Result: %s\n", wrbuf_buf(w));
+ printf("Result: %s\n", wrbuf_cstr(w));
}
wrbuf_destroy(w);
}
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: yaz-xmlquery.c,v 1.7 2007-03-19 14:40:08 adam Exp $
+ * $Id: yaz-xmlquery.c,v 1.8 2007-03-19 22:17:41 adam Exp $
*/
#include <stdlib.h>
{
WRBUF w = wrbuf_alloc();
yaz_query_to_wrbuf(w, query);
- printf("%s\n", wrbuf_buf(w));
+ printf("%s\n", wrbuf_cstr(w));
wrbuf_destroy(w);
}
odr_destroy(odr);