From a7334bf2f1a57040a010a7dabdfa5d50d62f4ae4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 4 Jan 1996 16:12:09 +0000 Subject: [PATCH] Setting PDUType renamed to eventType. --- CHANGELOG | 5 +++-- ir-tcl.c | 29 ++++++++++++++++------------- ir-tclp.h | 7 +++++-- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0132941..e01a075 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -$Id: CHANGELOG,v 1.8 1996-01-04 11:05:20 adam Exp $ +$Id: CHANGELOG,v 1.9 1996-01-04 16:12:09 adam Exp $ 06/19/95 Release of ir-tcl-1.0b ------------------------------------------------------ @@ -56,4 +56,5 @@ $Id: CHANGELOG,v 1.8 1996-01-04 11:05:20 adam Exp $ 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. +04/01/96:New setting: eventType. Returns type of last event: connect, init, + search, present or scan. diff --git a/ir-tcl.c b/ir-tcl.c index 7383948..7f07d79 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tcl.c,v $ - * Revision 1.68 1996-01-04 11:05:22 adam + * 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. * @@ -997,7 +1000,7 @@ static int do_connect (void *obj, Tcl_Interp *interp, do_disconnect (p, NULL, 2, NULL); return TCL_ERROR; } - p->pduType = "connect"; + p->eventType = "connect"; ir_select_add (cs_fileno (p->cs_link), p); if (r == 1) { @@ -1027,7 +1030,7 @@ static int do_disconnect (void *obj, Tcl_Interp *interp, if (argc == 0) { p->state = IR_TCL_R_Idle; - p->pduType = NULL; + p->eventType = NULL; p->hostname = NULL; p->cs_link = NULL; return TCL_OK; @@ -1102,19 +1105,19 @@ static int do_logLevel (void *o, Tcl_Interp *interp, /* - * do_pduType: Return type of last PDU received + * do_eventType: Return type of last event */ -static int do_pduType (void *obj, Tcl_Interp *interp, - int argc, char **argv) +static int do_eventType (void *obj, Tcl_Interp *interp, + int argc, char **argv) { IrTcl_Obj *p = obj; if (argc <= 0) { - p->pduType = NULL; + p->eventType = NULL; return TCL_OK; } - Tcl_AppendElement (interp, p->pduType ? p->pduType : ""); + Tcl_AppendElement (interp, p->eventType ? p->eventType : ""); return TCL_OK; } @@ -1531,7 +1534,7 @@ static IrTcl_Method ir_method_tab[] = { { 0, "failInfo", do_failInfo }, { 0, "logLevel", do_logLevel }, -{ 0, "PDUType", do_pduType }, +{ 0, "eventType", do_eventType }, { 1, "connect", do_connect }, { 0, "protocolVersion", do_protocolVersion }, { 1, "preferredMessageSize", do_preferredMessageSize }, @@ -3237,21 +3240,21 @@ void ir_select_read (ClientData clientData) switch(apdu->which) { case Z_APDU_initResponse: - p->pduType = "init"; + p->eventType = "init"; ir_initResponse (p, apdu->u.initResponse); break; case Z_APDU_searchResponse: - p->pduType = "search"; + p->eventType = "search"; ir_searchResponse (p, apdu->u.searchResponse, (IrTcl_SetObj *) cmd_info.clientData); break; case Z_APDU_presentResponse: - p->pduType = "present"; + p->eventType = "present"; ir_presentResponse (p, apdu->u.presentResponse, (IrTcl_SetObj *) cmd_info.clientData); break; case Z_APDU_scanResponse: - p->pduType = "scan"; + p->eventType = "scan"; ir_scanResponse (p, apdu->u.scanResponse, (IrTcl_ScanObj *) cmd_info.clientData); break; diff --git a/ir-tclp.h b/ir-tclp.h index 93edf18..31faf8c 100644 --- a/ir-tclp.h +++ b/ir-tclp.h @@ -5,7 +5,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tclp.h,v $ - * Revision 1.20 1996-01-04 11:05:23 adam + * Revision 1.21 1996-01-04 16:12:14 adam + * Setting PDUType renamed to eventType. + * + * 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. * @@ -154,7 +157,7 @@ typedef struct { char *userInformationField; char *hostname; - char *pduType; + char *eventType; char *buf_in; int len_in; -- 1.7.10.4