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
Document the very useful ZOOM-C option "apdulog".
[yaz-moved-to-github.git]
/
src
/
querytowrbuf.c
diff --git
a/src/querytowrbuf.c
b/src/querytowrbuf.c
index
8ca78a2
..
eb1eab5
100644
(file)
--- a/
src/querytowrbuf.c
+++ b/
src/querytowrbuf.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
*/
/** \file querytowrbuf.c
* See the file LICENSE for details.
*/
/** \file querytowrbuf.c
@@
-24,7
+24,9
@@
void yaz_encode_pqf_term(WRBUF b, const char *term, int len)
break;
if (len > 0 && i == len)
{
break;
if (len > 0 && i == len)
{
- for (i = 0; i<len; i++)
+ if (term[0] == '@')
+ wrbuf_putc(b, '\\');
+ for (i = 0; i < len; i++)
{
if (term[i] == '\\')
wrbuf_putc(b, '\\');
{
if (term[i] == '\\')
wrbuf_putc(b, '\\');
@@
-34,7
+36,7
@@
void yaz_encode_pqf_term(WRBUF b, const char *term, int len)
else
{
wrbuf_putc(b, '"');
else
{
wrbuf_putc(b, '"');
- for (i = 0; i<len; i++)
+ for (i = 0; i < len; i++)
{
if (term[i] == '"' || term[i] == '\\')
wrbuf_putc(b, '\\');
{
if (term[i] == '"' || term[i] == '\\')
wrbuf_putc(b, '\\');
@@
-69,7
+71,7
@@
static void yaz_attribute_element_to_wrbuf(WRBUF b,
wrbuf_printf(b, ODR_INT_PRINTF, *element->value.numeric);
break;
case Z_AttributeValue_complex:
wrbuf_printf(b, ODR_INT_PRINTF, *element->value.numeric);
break;
case Z_AttributeValue_complex:
- for (i = 0; i<element->value.complex->num_list; i++)
+ for (i = 0; i < element->value.complex->num_list; i++)
{
if (i)
wrbuf_puts(b, ",");
{
if (i)
wrbuf_puts(b, ",");
@@
-109,7
+111,7
@@
static void yaz_apt_to_wrbuf(WRBUF b, const Z_AttributesPlusTerm *zapt)
{
int num_attributes = zapt->attributes->num_attributes;
int i;
{
int num_attributes = zapt->attributes->num_attributes;
int i;
- for (i = 0; i<num_attributes; i++)
+ for (i = 0; i < num_attributes; i++)
yaz_attribute_element_to_wrbuf(b,zapt->attributes->attributes[i]);
switch (zapt->term->which)
yaz_attribute_element_to_wrbuf(b,zapt->attributes->attributes[i]);
switch (zapt->term->which)
@@
-251,7
+253,7
@@
void wrbuf_diags(WRBUF b, int num_diagnostics, Z_DiagRec **diags)
wrbuf_puts(b,"(diag not in default format?)");
else
{
wrbuf_puts(b,"(diag not in default format?)");
else
{
- Z_DefaultDiagFormat *e=diags[0]->u.defaultFormat;
+ Z_DefaultDiagFormat *e = diags[0]->u.defaultFormat;
if (e->condition)
wrbuf_printf(b, ODR_INT_PRINTF " ",*e->condition);
else
if (e->condition)
wrbuf_printf(b, ODR_INT_PRINTF " ",*e->condition);
else