X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=6b86e8c4e65c4c5a39ebe80c83fae7e81685dc3a;hb=2b17f66a25f1e9cf6e6a072736ea4459eefcc2b8;hp=9c340ab22390e8cc31558fb9cff73be664dbeb26;hpb=6e8e985ed2ed85ebad7ee26a86dabcafebc18573;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 9c340ab..6b86e8c 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.247 2004-08-13 11:36:48 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) @@ -3210,7 +3212,7 @@ int cmd_register_oid(const char* args) { name = oid_str; val = 0; - while (isdigit (*name)) + while (isdigit (*(unsigned char *) name)) { val = val*10 + (*name - '0'); name++; @@ -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"); @@ -3970,7 +3976,7 @@ void process_cmd_line(char* line) char* lastnonspace=NULL; for(;*p; ++p) { - if(!isspace(*p)) { + if(!isspace(*(unsigned char *) p)) { lastnonspace = p; } }