X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=527b7c4ca6edab8109c8e2827c7db48e2a0db7b0;hb=cef1af6f2b0a094a907dec1a7bd1c4f6a42ef13c;hp=66dc48e131f9f82e9173053a7402befe40af3e6e;hpb=79bf9f1b8b224b6b7323b280fca704591ac17324;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 66dc48e..527b7c4 100644 --- a/client/client.c +++ b/client/client.c @@ -4,7 +4,18 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: client.c,v $ - * Revision 1.53 1997-09-29 13:18:59 adam + * Revision 1.56 1997-11-05 09:18:31 adam + * The client handles records with no associated syntax. + * + * Revision 1.55 1997/10/31 12:20:08 adam + * Improved memory debugging for xmalloc/nmem.c. References to NMEM + * instead of ODR in n ESPEC-1 handling in source d1_espec.c. + * Bug fix: missing fclose in data1_read_espec1. + * + * Revision 1.54 1997/10/27 13:52:46 adam + * Header yaz-util includes all YAZ utility header files. + * + * Revision 1.53 1997/09/29 13:18:59 adam * Added function, oid_ent_to_oid, to replace the function * oid_getoidbyent, which is not thread safe. * @@ -176,12 +187,13 @@ * to illustrate the use of the YAZ service-level API. */ -#include #include #include #include #include +#include + #include #include #ifdef USE_XTIMOSI @@ -191,7 +203,6 @@ #include #include #include -#include #include @@ -492,7 +503,6 @@ static void display_record(Z_DatabaseRecord *p) odr_reset(print); } } - /* Check if this is a known, ASN.1 type tucked away in an octet string */ if (ent && r->which == Z_External_octet) { @@ -524,7 +534,7 @@ static void display_record(Z_DatabaseRecord *p) r->which = type->what; } } - if (ent->value == VAL_SOIF) + if (ent && ent->value == VAL_SOIF) printf("%.*s", r->u.octet_aligned->len, r->u.octet_aligned->buf); else if (r->which == Z_External_octet && p->u.octet_aligned->len) { @@ -533,7 +543,7 @@ static void display_record(Z_DatabaseRecord *p) if (marcdump) fwrite (marc_buf, strlen (marc_buf), 1, marcdump); } - else if (ent->value == VAL_SUTRS) + else if (ent && ent->value == VAL_SUTRS) { if (r->which != Z_External_sutrs) { @@ -542,7 +552,7 @@ static void display_record(Z_DatabaseRecord *p) } printf("%.*s", r->u.sutrs->len, r->u.sutrs->buf); } - else if (ent->value == VAL_GRS1) + else if (ent && ent->value == VAL_GRS1) { if (r->which != Z_External_grs1) { @@ -670,7 +680,6 @@ static int send_searchRequest(char *arg) mediumSetPresentNumber > 0)) { oident prefsyn; - int oid[OID_SIZE]; prefsyn.proto = protocol; prefsyn.oclass = CLASS_RECSYN;