From 74b2585ecf03192ddc7cf9796634b9cde008ec8b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 30 Jul 2004 08:37:52 +0000 Subject: [PATCH] For yaz-client, command set_marcdump and -m dumps SUTRS/XML/.. records as well. --- NEWS | 3 +++ client/client.c | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 47912cf..46445e4 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ Possible compatibility problems with earlier versions marked with '*'. +For yaz-client, command set_marcdump / -m dumps SUTRS/XML/.. +records as well. + Yet another small fix for configure of SSL. --- 2.0.21 2004/05/14 diff --git a/client/client.c b/client/client.c index 9c340ab..09ab220 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.244 2004-05-27 21:24:44 ja7 Exp $ + * $Id: client.c,v 1.245 2004-07-30 08:37:52 adam Exp $ */ #include @@ -723,6 +723,8 @@ static void print_record(const unsigned char *buf, size_t len) /* add newline if not already added ... */ if (i <= 0 || buf[i-1] != '\n') printf ("\n"); + if (marc_file) + fwrite (buf, 1, len, marc_file); } static void display_record(Z_External *r) @@ -3325,7 +3327,11 @@ static void handle_srw_record(Z_SRW_record *rec) printf (" schema=%s", rec->recordSchema); printf ("\n"); if (rec->recordData_buf && rec->recordData_len) + { fwrite(rec->recordData_buf, 1, rec->recordData_len, stdout); + if (marc_file) + fwrite (rec->recordData_buf, 1, rec->recordData_len, marc_file); + } else printf ("No data!"); printf("\n"); -- 1.7.10.4