procedure moved to ir-tcl.sgml.
--- /dev/null
+$Id: CHANGELOG,v 1.1 1995-06-25 10:24:58 adam Exp $
+
+06/19/95 Release of ir-tcl-1.0b
+------------------------------------------------------
+06/20/95 Cancel mechanism changed in client.tcl. After a cancel, the
+ interface becomes 'ready' immediately.
+
+06/20/95 New setting: failInfo. It returns failback diagnostics.
+
+06/21/95 Bitmaps (book[1-9]) moved to subdirectory bitmaps.
+
+06/21/95 Install procedure change. GNU autoconf used to create the
+ Makefile. The user may type 'make install' to copy system files
+ to /usr/local/...
+
+06/22/95 SUTRS. New setting, 'getSutrs', to retrieve a SUTRS record
+ as a Tcl string.
+
+06/22/95 Display format routines (line.tcl,medium.tcl,raw.tcl) changed
+ to handle display of SUTRS records.
+
+06/22/95 Preferred record syntax can be specified by the user in client.tcl.
+
# (c) Index Data 1995
# See the file LICENSE for details.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile.in,v 1.5 1995-06-23 10:58:10 adam Exp $
+# $Id: Makefile.in,v 1.6 1995-06-25 10:24:59 adam Exp $
SHELL=/bin/sh
# IrTcl Version
BINDIR=$(exec_prefix)/bin
LIBDIR=$(exec_prefix)/lib
MANDIR=$(prefix)/man
+INCDIR=$(prefix)/include
IRTCLDIR=$(prefix)/lib/irtcl
YAZDIR=@YAZDIR@
ar qc libirtcl.a $(O)
$(RANLIB) libirtcl.a
-install-tcl: ir-tcl
+install: ir-tcl
for d in $(IRTCLDIR) $(IRTCLDIR)/formats $(IRTCLDIR)/bitmaps; do \
if [ ! -d $$d ]; then \
echo Making $$d; \
fi; \
done;
$(INSTALL_PROGRAM) ir-tcl $(BINDIR)
-
-install-tk: ir-tk
- for d in $(IRTCLDIR) $(IRTCLDIR)/formats $(IRTCLDIR)/bitmaps; do \
- if [ ! -d $$d ]; then \
- echo Making $$d; \
- mkdir $$d; \
- chmod 755 $$d; \
- fi; \
- done;
+ $(INSTALL_DATA) libirtcl.a $(LIBDIR)
+ $(INSTALL_DATA) ir-tcl.h $(INCDIR)
+ $(INSTALL_DATA) LICENSE clientrc.tcl $(IRTCLDIR)
sed "s,^set libdir LIBDIR,set libdir $(IRTCLDIR)," <client.tcl >client.bak
- $(INSTALL_PROGRAM) ir-tk $(BINDIR)
+ if [ -f ir-tk ]; then $(INSTALL_PROGRAM) ir-tk $(BINDIR)
$(INSTALL_DATA) client.bak $(IRTCLDIR)/client.tcl
- $(INSTALL_DATA) LICENSE clientrc.tcl $(IRTCLDIR)
$(INSTALL_DATA) formats/*.tcl $(IRTCLDIR)/formats
$(INSTALL_DATA) bitmaps/book? $(IRTCLDIR)/bitmaps
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
-$Revision: 1.5 $
+$Revision: 1.6 $
-Notes about IrTcl 1.0beta.
+Documentation can be found in the doc directory.
-Prerequisites
--------------
-
-In order to compile you need:
-
- o An ANSI-C compiler such as GNU C
- o Tcl version 7.3
- o YAZ version 1.0 or higher
-
-You may also need:
-
- o Tk version 3.6
- o The XTI/mosi package
-
-Compilation
------------
-
- o Compile/install yaz/tcl, etc.
-
- o Edit Makefile (in current directory).
- Set MOSI to 1/0.
- Define include directory paths and libraries.
-
- o Type 'make ir-tcl' to make the Tcl version or IrTcl.
- o Type 'make ir-tk' to make the Tk version of IrTcl.
-
-Install/run
------------
-
-The resulting files are:
- ir-tcl Tcl version of IrTcl
- ir-tk Tk version of IrTcl.
- Options:
- -file <tclfile>
- Tcl startup script. Default is client.tcl.
- -geometry <spec>
- X11 geometry of main window.
- -display <spec>
- X11 display.
- -name <name>
- Name of top window.
- -logLevel <logLevel>
- log level. (fatal, debug, warn, log, all).
- -logFile <fname>
- log file. If omitted stderr is used.
- formats/*.tcl Small IrTcl scripts to display records in
- different formats.
- client.tcl Tk graphical client - normally executed by ir-tk.
- clientrc.tcl Startup script - read by client.tcl - holds
- user/target definitions.
- clientg.tcl User preferrences - read by client.tcl.
- Holds geometry of windows, current display
- format, and hot targets.
- book[1-9] book logo.
- LICENSE License info - read by client.tcl.
-
-Type 'ir-tk' to run the Tk graphical client - client.tcl,
-clientrc.tcl, book[1-9] and formats/*.tcl should exist!
-
-Type 'ir-tcl' to run the Tcl client. Very similar to tclsh.
-
-Information
------------
-
-Documentation about the IrTcl API can be found in the doc directory -
-ascii/postscript/HTML.
+ ir-tcl.txt - ascii version
+ ir-tcl.ps - postscript
+ ir-tcl.html - HTML.
To get more information or assistance, send mail to yaz-help@index.ping.dk.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
- * Revision 1.46 1995-06-22 13:15:06 adam
+ * 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.
}
/*
+ * do_triggerResourceControl:
+ */
+static int do_triggerResourceControl (void *obj, Tcl_Interp *interp,
+ int argc, char **argv)
+{
+ IrTcl_Obj *p = obj;
+ Z_APDU *apdu;
+ Z_TriggerResourceControlRequest *req;
+ int r;
+
+ if (argc <= 0)
+ return TCL_OK;
+ if (!p->cs_link)
+ {
+ interp->result = "not connected";
+ return TCL_ERROR;
+ }
+ apdu = zget_APDU (p->odr_out, Z_APDU_triggerResourceControlRequest);
+ req = apdu->u.triggerResourceControlRequest;
+
+ if (!z_APDU (p->odr_out, &apdu, 0))
+ {
+ Tcl_AppendResult (interp, odr_errlist [odr_geterror (p->odr_out)],
+ NULL);
+ odr_reset (p->odr_out);
+ return TCL_ERROR;
+ }
+ p->sbuf = odr_getbuf (p->odr_out, &p->slen, NULL);
+ if ((r=cs_put (p->cs_link, p->sbuf, p->slen)) < 0)
+ {
+ interp->result = "cs_put failed in triggerResourceControl";
+ do_disconnect (p, NULL, 2, NULL);
+ return TCL_ERROR;
+ }
+ else if (r == 1)
+ {
+ ir_select_add_write (cs_fileno(p->cs_link), p);
+ logf (LOG_DEBUG, "Sent part of triggerResourceControl (%d bytes)",
+ p->slen);
+ }
+ else
+ logf (LOG_DEBUG, "Sent whole of triggerResourceControl (%d bytes)",
+ p->slen);
+ return TCL_OK;
+}
+
+/*
* do_databaseNames: specify database names
*/
static int do_databaseNames (void *obj, Tcl_Interp *interp,
{ 0, "initResult", do_initResult },
{ 0, "disconnect", do_disconnect },
{ 0, "callback", do_callback },
+{ 0, "triggerResourceControl", do_triggerResourceControl },
{ 0, NULL, NULL}
};