-/* $Id: extract.c,v 1.256 2007-04-25 08:22:01 adam Exp $
+/* $Id: extract.c,v 1.258 2007-05-08 14:27:23 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
}
+static WRBUF wrbuf_hex_str(const char *cstr)
+{
+ size_t i;
+ WRBUF w = wrbuf_alloc();
+ for (i = 0; cstr[i]; i++)
+ {
+ if (cstr[i] < ' ' || cstr[i] > 126)
+ wrbuf_printf(w, "\\%02X", cstr[i] & 0xff);
+ else
+ wrbuf_putc(w, cstr[i]);
+ }
+ return w;
+}
+
ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh,
struct ZebraRecStream *stream,
enum zebra_recctrl_action_t action,
int db_ord = zebraExplain_get_database_ord(zh->reg->zei);
char *rinfo = dict_lookup_ord(zh->reg->matchDict, db_ord,
matchStr);
+
+
+ if (log_level_extract)
+ {
+ WRBUF w = wrbuf_hex_str(matchStr);
+ yaz_log(log_level_extract, "matchStr: %s", wrbuf_cstr(w));
+ wrbuf_destroy(w);
+ }
if (rinfo)
{
assert(*rinfo == sizeof(*sysno));
memcpy (sysno, rinfo+1, sizeof(*sysno));
}
- }
+ }
}
if (zebra_rec_keys_empty(zh->reg->keys))
{