+ * Revision 1.105 1998-04-02 14:31:08 adam
+ * This version works with compiled ASN.1 code.
+ *
+ * Revision 1.104 1998/02/27 14:26:07 adam
+ * Changed client so that it still works if target sets numberOfRecords
+ * in response to an illegal value.
+ *
+ * Revision 1.103 1997/11/19 11:22:10 adam
+ * Object identifiers can be accessed in GRS-1 records.
+ *
+ * Revision 1.102 1997/09/17 12:22:40 adam
+ * Changed to use YAZ version 1.4. The new comstack utility, cs_straddr,
+ * is used.
+ *
+ * Revision 1.101 1997/09/09 10:19:53 adam
+ * New MSV5.0 port with fewer warnings.
+ *
+ * Revision 1.100 1997/05/01 15:04:05 adam
+ * Added ir-log command.
+ *
+ * Revision 1.99 1997/04/30 07:24:47 adam
+ * Spell fix of an error message.
+ *
+ * Revision 1.98 1997/04/13 18:57:20 adam
+ * Better error reporting and aligned with Tcl/Tk style.
+ * Rework of notifier code with Tcl_File handles.
+ *
+ * Revision 1.97 1996/11/14 17:11:07 adam
+ * Added Explain documentaion.
+ *
+ * Revision 1.96 1996/10/08 13:02:50 adam
+ * When dealing with records, odr_choice_enable_bias function is used to
+ * prevent decoding of externals.
+ *
+ * Revision 1.95 1996/09/13 10:51:49 adam
+ * Bug fix: ir_tcl_select_set called Tcl_GetFile at disconnect.
+ *
+ * Revision 1.94 1996/08/21 13:32:53 adam
+ * Implemented saveFile method and extended loadFile method to work with it.
+ *
+ * Revision 1.93 1996/08/16 15:07:45 adam
+ * First work on Explain.
+ *
+ * Revision 1.92 1996/08/09 15:33:07 adam
+ * Modified the code to use tk4.1/tcl7.5 patch level 1. The time-driven
+ * polling is no longer activated on Windows since asynchrounous I/O works
+ * better.
+ *
+ * Revision 1.91 1996/07/03 13:31:11 adam
+ * The xmalloc/xfree functions from YAZ are used to manage memory.
+ *
+ * Revision 1.90 1996/06/27 14:21:00 adam
+ * Yet another Windows port.
+ *
+ * Revision 1.89 1996/06/11 15:27:15 adam
+ * Event type set to connect a little earlier in the do_connect function.
+ *
+ * Revision 1.88 1996/06/03 09:04:22 adam
+ * Changed a few logf calls.
+ *
+ * Revision 1.87 1996/05/29 06:37:51 adam
+ * Function ir_tcl_get_grs_r enhanced so that specific elements can be
+ * extracted.
+ *
+ * Revision 1.86 1996/03/20 13:54:04 adam
+ * The Tcl_File structure is only manipulated in the Tk-event interface
+ * in tkinit.c.
+ *
+ * Revision 1.85 1996/03/15 11:15:48 adam
+ * Modified to use new prototypes for p_query_rpn and p_query_scan.
+ *
+ * Revision 1.84 1996/03/07 12:42:49 adam
+ * Better logging when callback is invoked.
+ *
+ * Revision 1.83 1996/03/05 09:21:09 adam
+ * Bug fix: memory used by GRS records wasn't freed.
+ * Rewrote some of the error handling code - the connection is always
+ * closed before failback is called.
+ * If failback is defined the send APDU methods (init, search, ...) will
+ * return OK but invoke failback (as is the case if the write operation
+ * fails).
+ * Bug fix: ref_count in assoc object could grow if fraction of PDU was
+ * read.
+ *
+ * Revision 1.82 1996/02/29 15:30:21 adam
+ * Export of IrTcl functionality to extensions.
+ *
+ * Revision 1.81 1996/02/26 18:38:32 adam
+ * Work on export of set methods.
+ *
+ * Revision 1.80 1996/02/23 17:31:39 adam
+ * More functions made available to the wais tcl extension.
+ *
+ * Revision 1.79 1996/02/23 13:41:38 adam
+ * Work on public access to simple ir class system.
+ *
+ * Revision 1.78 1996/02/21 10:16:08 adam
+ * Simplified select handling. Only one function ir_tcl_select_set has
+ * to be externally defined.
+ *
+ * Revision 1.77 1996/02/20 17:52:58 adam
+ * Uses the YAZ oid system to name record syntax object identifiers.
+ *
+ * Revision 1.76 1996/02/20 16:09:51 adam
+ * Bug fix: didn't set element set names stamp correctly on result
+ * set records when element set names were set to the empty string.
+ *
+ * Revision 1.75 1996/02/19 15:41:53 adam
+ * Better log messages.
+ * Minor improvement of connect method.
+ *
+ * Revision 1.74 1996/02/05 17:58:03 adam
+ * Ported ir-tcl to use the beta releases of tcl7.5/tk4.1.
+ *
+ * Revision 1.73 1996/01/29 11:35:19 adam
+ * Bug fix: cs_type member renamed to comstackType to avoid conflict with
+ * cs_type macro defined by YAZ.
+ *
+ * Revision 1.72 1996/01/19 17:45:34 quinn
+ * Added debugging output
+ *
+ * Revision 1.71 1996/01/19 16:22:38 adam
+ * New method: apduDump - returns information about last incoming APDU.
+ *
+ * Revision 1.70 1996/01/10 09:18:34 adam
+ * PDU specific callbacks implemented: initRespnse, searchResponse,
+ * presentResponse and scanResponse.
+ * Bug fix in the command line shell (tclmain.c) - discovered on OSF/1.
+ *
+ * Revision 1.69 1996/01/04 16:12:12 adam
+ * Setting PDUType renamed to eventType.
+ *
+ * Revision 1.68 1996/01/04 11:05:22 adam
+ * New setting: PDUType - returns type of last PDU returned from the target.
+ * Fixed a bug in configure/Makefile.
+ *
+ * Revision 1.67 1996/01/03 09:00:51 adam
+ * Updated to use new version of Yaz (names changed to avoid C++ conflict).
+ *
+ * Revision 1.66 1995/11/28 17:26:39 adam
+ * Removed Carriage return from ir-tcl.c!
+ * Removed misc. debug logs.
+ *
+ * Revision 1.65 1995/11/28 13:53:00 quinn
+ * Windows port.
+ *
+ * Revision 1.64 1995/11/13 15:39:18 adam
+ * Bug fix: {small,medium}SetElementSetNames weren't set correctly.
+ * Bug fix: idAuthentication weren't set correctly.
+ *
+ * Revision 1.63 1995/11/13 09:55:39 adam
+ * Multiple records at a position in a result-set with differnt
+ * element specs.
+ *
+ * Revision 1.62 1995/10/18 17:20:33 adam
+ * Work on target setup in client.tcl.
+ *
+ * Revision 1.61 1995/10/18 16:42:42 adam
+ * New settings: smallSetElementSetNames and mediumSetElementSetNames.
+ *
+ * Revision 1.60 1995/10/18 15:43:31 adam
+ * In search: mediumSetElementSetNames and smallSetElementSetNames are
+ * set to elementSetNames.
+ *
+ * Revision 1.59 1995/10/17 12:18:58 adam
+ * Bug fix: when target connection closed, the connection was not
+ * properly reestablished.
+ *
+ * Revision 1.58 1995/10/16 17:00:55 adam
+ * New setting: elementSetNames.
+ * Various client improvements. Medium presentation format looks better.
+ *
+ * Revision 1.57 1995/09/21 13:11:51 adam
+ * Support of dynamic loading.
+ * Test script uses load command if necessary.
+ *
+ * Revision 1.56 1995/08/29 15:30:14 adam
+ * Work on GRS records.
+ *
+ * Revision 1.55 1995/08/28 09:43:25 adam
+ * Minor changes. configure only searches for yaz beta 3 and versions after
+ * that.
+ *
+ * Revision 1.54 1995/08/24 12:25:16 adam
+ * Modified to work with yaz 1.0b3.
+ *
+ * Revision 1.53 1995/08/04 12:49:26 adam
+ * Bug fix: reading uninitialized variable p.
+ *
+ * Revision 1.52 1995/08/04 11:32:38 adam
+ * More work on output queue. Memory related routines moved
+ * to mem.c
+ *
+ * Revision 1.51 1995/08/03 13:22:54 adam
+ * Request queue.
+ *
+ * Revision 1.50 1995/07/20 08:09:49 adam
+ * client.tcl: Targets removed from hotTargets list when targets
+ * are removed/modified.
+ * ir-tcl.c: More work on triggerResourceControl.
+ *
+ * Revision 1.49 1995/06/30 12:39:21 adam
+ * Bug fix: loadFile didn't set record type.
+ * The MARC routines are a little less strict in the interpretation.
+ * Script display.tcl replaces the old marc.tcl.
+ * New interactive script: shell.tcl.
+ *
+ * Revision 1.48 1995/06/27 19:03:50 adam
+ * Bug fix in do_present in ir-tcl.c: p->set_child member weren't set.
+ * nextResultSetPosition used instead of setOffset.
+ *
+ * Revision 1.47 1995/06/25 10:25:04 adam
+ * Working on triggerResourceControl. Description of compile/install
+ * procedure moved to ir-tcl.sgml.
+ *
+ * Revision 1.46 1995/06/22 13:15:06 adam
+ * Feature: SUTRS. Setting getSutrs implemented.
+ * Work on display formats.
+ * Preferred record syntax can be set by the user.
+ *
+ * Revision 1.45 1995/06/20 08:07:30 adam