Fixed a bug in configure/Makefile.
-$Id: CHANGELOG,v 1.7 1995-11-13 09:55:34 adam Exp $
+$Id: CHANGELOG,v 1.8 1996-01-04 11:05:20 adam Exp $
06/19/95 Release of ir-tcl-1.0b
------------------------------------------------------
06/19/95 Release of ir-tcl-1.0b
------------------------------------------------------
11/12/95:New setting: recordElements. This is used to get a record at
a position with a given element specification.
11/12/95:New setting: recordElements. This is used to get a record at
a position with a given element specification.
+
+04/01/96:New setting: PDUType. Returns type of last PDU returned.
# (c) Index Data 1995
# See the file LICENSE for details.
# Sebastian Hammer, Adam Dickmeiss
# (c) Index Data 1995
# See the file LICENSE for details.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile.in,v 1.21 1995-12-22 09:10:03 adam Exp $
+# $Id: Makefile.in,v 1.22 1996-01-04 11:05:20 adam Exp $
SHELL=/bin/sh
# IrTcl Version
SHELL=/bin/sh
# IrTcl Version
IRTCLDIR=$(prefix)/lib/irtcl
YAZDIR=@YAZDIR@
IRTCLDIR=$(prefix)/lib/irtcl
YAZDIR=@YAZDIR@
TKLIB=@TKLIB@
TCLINCLUDE=@TCLINCLUDE@
TKLIB=@TKLIB@
TCLINCLUDE=@TCLINCLUDE@
-# MOSI directory with libmosi.a and source
+# MOSI settings, directory with libmosi.a and source
+MOSI=@MOSI@
+MOSIDIR=@MOSIDIR@
# All YAZ libraries - including MOSI libraries.
YAZLIB=$(YAZDIR)/lib/libyaz.a $(MOSILIB)
# All include paths
# All YAZ libraries - including MOSI libraries.
YAZLIB=$(YAZDIR)/lib/libyaz.a $(MOSILIB)
# All include paths
-INCLUDE=-I$(YAZDIR)/include $(XINCLUDE) $(TCLINCLUDE)
+INCLUDE=-I$(YAZDIR)/include $(XINCLUDE) $(TCLINCLUDE) $(MOSIINC)
# All command line options except CFLAGS
# All command line options except CFLAGS
-DEFS=-DCCL2RPN=0 @DEFS@ -DMOSI=@MOSI@ -DIRTCLDIR=\"$(IRTCLDIR)\" \
+DEFS=-DCCL2RPN=0 @DEFS@ -DMOSI=$(MOSI) -DIRTCLDIR=\"$(IRTCLDIR)\" \
$(INCLUDE) -DIR_TCL_VERSION=\"$(VERSION)\"
INSTALL = @INSTALL@
$(INCLUDE) -DIR_TCL_VERSION=\"$(VERSION)\"
INSTALL = @INSTALL@
dnl IR toolkit for tcl/tk
dnl (c) Index Data 1995
dnl See the file LICENSE for details.
dnl IR toolkit for tcl/tk
dnl (c) Index Data 1995
dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.11 1995-12-22 09:10:05 adam Exp $
+dnl $Id: configure.in,v 1.12 1996-01-04 11:05:21 adam Exp $
AC_INIT(ir-tcl.h)
CC=${CC-cc}
AC_SUBST(CC)
AC_INIT(ir-tcl.h)
CC=${CC-cc}
AC_SUBST(CC)
done
AC_SUBST(YAZDIR)
AC_SUBST(MOSI)
done
AC_SUBST(YAZDIR)
AC_SUBST(MOSI)
+AC_SUBST(MOSILIB)
+AC_SUBST(MOSIINC)
AC_MSG_CHECKING(for YAZ directory)
AC_ARG_WITH(yazdir,[ --with-yazdir Yaz directory], [YAZDIR=$withval])
if test "$YAZDIR" = "yes"; then
AC_MSG_CHECKING(for YAZ directory)
AC_ARG_WITH(yazdir,[ --with-yazdir Yaz directory], [YAZDIR=$withval])
if test "$YAZDIR" = "yes"; then
MOSI=1
MOSIDIR=$MOSIDIR
MOSILIB='$(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
MOSI=1
MOSIDIR=$MOSIDIR
MOSILIB='$(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
MOSITELL=yes
else
MOSI=0
MOSIDIR=$MOSIDIR
MOSILIB='# $(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
MOSITELL=yes
else
MOSI=0
MOSIDIR=$MOSIDIR
MOSILIB='# $(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
+ MOSIINC='# -I$(MOSIDIR)'
MOSITELL=no
fi
AC_MSG_RESULT($MOSITELL)
MOSITELL=no
fi
AC_MSG_RESULT($MOSITELL)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
- * Revision 1.67 1996-01-03 09:00:51 adam
+ * 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
* Updated to use new version of Yaz (names changed to avoid C++ conflict).
*
* Revision 1.66 1995/11/28 17:26:39 adam
do_disconnect (p, NULL, 2, NULL);
return TCL_ERROR;
}
do_disconnect (p, NULL, 2, NULL);
return TCL_ERROR;
}
+ p->pduType = "connect";
ir_select_add (cs_fileno (p->cs_link), p);
if (r == 1)
{
ir_select_add (cs_fileno (p->cs_link), p);
if (r == 1)
{
if (argc == 0)
{
p->state = IR_TCL_R_Idle;
if (argc == 0)
{
p->state = IR_TCL_R_Idle;
p->hostname = NULL;
p->cs_link = NULL;
return TCL_OK;
p->hostname = NULL;
p->cs_link = NULL;
return TCL_OK;
+ * do_pduType: Return type of last PDU received
+ */
+static int do_pduType (void *obj, Tcl_Interp *interp,
+ int argc, char **argv)
+{
+ IrTcl_Obj *p = obj;
+
+ if (argc <= 0)
+ {
+ p->pduType = NULL;
+ return TCL_OK;
+ }
+ Tcl_AppendElement (interp, p->pduType ? p->pduType : "");
+ return TCL_OK;
+}
+
+
+/*
* do_callback: add callback
*/
static int do_callback (void *obj, Tcl_Interp *interp,
* do_callback: add callback
*/
static int do_callback (void *obj, Tcl_Interp *interp,
static IrTcl_Method ir_method_tab[] = {
{ 1, "comstack", do_comstack },
{ 1, "protocol", do_protocol },
static IrTcl_Method ir_method_tab[] = {
{ 1, "comstack", do_comstack },
{ 1, "protocol", do_protocol },
{ 0, "failInfo", do_failInfo },
{ 0, "logLevel", do_logLevel },
{ 0, "failInfo", do_failInfo },
{ 0, "logLevel", do_logLevel },
+{ 0, "PDUType", do_pduType },
{ 1, "connect", do_connect },
{ 0, "protocolVersion", do_protocolVersion },
{ 1, "preferredMessageSize", do_preferredMessageSize },
{ 1, "connect", do_connect },
{ 0, "protocolVersion", do_protocolVersion },
{ 1, "preferredMessageSize", do_preferredMessageSize },
switch(apdu->which)
{
case Z_APDU_initResponse:
switch(apdu->which)
{
case Z_APDU_initResponse:
ir_initResponse (p, apdu->u.initResponse);
break;
case Z_APDU_searchResponse:
ir_initResponse (p, apdu->u.initResponse);
break;
case Z_APDU_searchResponse:
ir_searchResponse (p, apdu->u.searchResponse,
(IrTcl_SetObj *) cmd_info.clientData);
break;
case Z_APDU_presentResponse:
ir_searchResponse (p, apdu->u.searchResponse,
(IrTcl_SetObj *) cmd_info.clientData);
break;
case Z_APDU_presentResponse:
+ p->pduType = "present";
ir_presentResponse (p, apdu->u.presentResponse,
(IrTcl_SetObj *) cmd_info.clientData);
break;
case Z_APDU_scanResponse:
ir_presentResponse (p, apdu->u.presentResponse,
(IrTcl_SetObj *) cmd_info.clientData);
break;
case Z_APDU_scanResponse:
ir_scanResponse (p, apdu->u.scanResponse,
(IrTcl_ScanObj *) cmd_info.clientData);
break;
ir_scanResponse (p, apdu->u.scanResponse,
(IrTcl_ScanObj *) cmd_info.clientData);
break;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tclp.h,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tclp.h,v $
- * Revision 1.19 1995-11-13 09:55:46 adam
+ * Revision 1.20 1996-01-04 11:05:23 adam
+ * New setting: PDUType - returns type of last PDU returned from the target.
+ * Fixed a bug in configure/Makefile.
+ *
+ * Revision 1.19 1995/11/13 09:55:46 adam
* Multiple records at a position in a result-set with differnt
* element specs.
*
* Multiple records at a position in a result-set with differnt
* element specs.
*
char *userInformationField;
char *hostname;
char *userInformationField;
char *hostname;
char *buf_in;
int len_in;
char *buf_in;
int len_in;