From 848616be8d6a53b195deda0f666bf89603b5139c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 15 Mar 1995 13:59:23 +0000 Subject: [PATCH] Minor changes. --- client.tcl | 10 +++++++--- ir-tcl.c | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/client.tcl b/client.tcl index 118cb92..23175bb 100644 --- a/client.tcl +++ b/client.tcl @@ -1,6 +1,9 @@ # # $Log: client.tcl,v $ -# Revision 1.4 1995-03-14 17:32:29 adam +# Revision 1.5 1995-03-15 13:59:23 adam +# Minor changes. +# +# Revision 1.4 1995/03/14 17:32:29 adam # Presentation of full Marc record in popup window. # # Revision 1.3 1995/03/12 19:31:52 adam @@ -301,8 +304,8 @@ proc search-response {} { show-message "[z39.$setNo resultCount] hits" set setMax [z39.$setNo resultCount] puts $setMax - if {$setMax > 16} { - set setMax 16 + if {$setMax > 30} { + set setMax 30 } z39 callback {present-response} set setOffset 1 @@ -564,3 +567,4 @@ set setNo 0 ir z39 z39 comstack tcpip set csRadioType [z39 comstack] +z39 preferredMessageSize 12000 diff --git a/ir-tcl.c b/ir-tcl.c index 331dc82..2b078b1 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -3,7 +3,10 @@ * (c) Index Data 1995 * * $Log: ir-tcl.c,v $ - * Revision 1.8 1995-03-15 08:25:16 adam + * Revision 1.9 1995-03-15 13:59:24 adam + * Minor changes. + * + * Revision 1.8 1995/03/15 08:25:16 adam * New method presentStatus to check for error on present. Misc. cleanup * of IRRecordList manipulations. Full MARC record presentation in * search.tcl. @@ -36,6 +39,7 @@ #include #include +#include #include @@ -45,7 +49,7 @@ typedef struct { COMSTACK cs_link; int preferredMessageSize; - int maximumMessageSize; + int maximumRecordSize; Odr_bitmask options; Odr_bitmask protocolVersion; char *idAuthentication; @@ -293,7 +297,7 @@ static int do_init_request (void *obj, Tcl_Interp *interp, req.options = &p->options; req.protocolVersion = &p->protocolVersion; req.preferredMessageSize = &p->preferredMessageSize; - req.maximumRecordSize = &p->maximumMessageSize; + req.maximumRecordSize = &p->maximumRecordSize; req.idAuthentication = p->idAuthentication; req.implementationId = p->implementationId; @@ -363,19 +367,19 @@ static int do_preferredMessageSize (void *obj, Tcl_Interp *interp, } /* - * do_maximumMessageSize: Set/get maximum message size + * do_maximumRecordSize: Set/get maximum record size */ -static int do_maximumMessageSize (void *obj, Tcl_Interp *interp, +static int do_maximumRecordSize (void *obj, Tcl_Interp *interp, int argc, char **argv) { char buf[20]; if (argc == 3) { if (Tcl_GetInt (interp, argv[2], - &((IRObj *)obj)->maximumMessageSize)==TCL_ERROR) + &((IRObj *)obj)->maximumRecordSize)==TCL_ERROR) return TCL_ERROR; } - sprintf (buf, "%d", ((IRObj *)obj)->maximumMessageSize); + sprintf (buf, "%d", ((IRObj *)obj)->maximumRecordSize); Tcl_AppendResult (interp, buf, NULL); return TCL_OK; } @@ -624,7 +628,7 @@ static int ir_obj_method (ClientData clientData, Tcl_Interp *interp, { 0, "protocolVersion", do_protocolVersion }, { 0, "options", do_options }, { 1, "preferredMessageSize", do_preferredMessageSize }, - { 1, "maximumMessageSize", do_maximumMessageSize }, + { 1, "maximumRecordSize", do_maximumRecordSize }, { 1, "implementationName", do_implementationName }, { 1, "implementationId", do_implementationId }, { 1, "idAuthentication", do_idAuthentication }, @@ -666,7 +670,7 @@ static int ir_obj_mk (ClientData clientData, Tcl_Interp *interp, return TCL_ERROR; obj->cs_link = cs_create (tcpip_type, 0); - obj->maximumMessageSize = 32768; + obj->maximumRecordSize = 32768; obj->preferredMessageSize = 4096; obj->idAuthentication = NULL; @@ -1020,18 +1024,27 @@ static int do_presentStatus (void *o, Tcl_Interp *interp, int argc, char **argv) { IRSetObj *obj = o; + const char *cp; char buf[28]; switch (obj->which) { case Z_Records_DBOSD: - Tcl_AppendResult (interp, "DBOSD", NULL); + Tcl_AppendElement (interp, "DBOSD"); break; case Z_Records_NSD: - sprintf (buf, "NSD %d", obj->condition); - Tcl_AppendResult (interp, buf, " {", - (obj->addinfo ? obj->addinfo : ""), - "}", NULL); + Tcl_AppendElement (interp, "NSD"); + sprintf (buf, "%d", obj->condition); + Tcl_AppendElement (interp, buf); + cp = diagbib1_str (obj->condition); + if (cp) + Tcl_AppendElement (interp, (char*) cp); + else + Tcl_AppendElement (interp, ""); + if (obj->addinfo) + Tcl_AppendElement (interp, obj->addinfo); + else + Tcl_AppendElement (interp, ""); break; } return TCL_OK; -- 1.7.10.4