[Debian-astro-commits] [x11iraf] 01/01: Add more Tcl-8.6 compatibility patches

Ole Streicher olebole at moszumanska.debian.org
Thu Dec 7 20:36:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch master
in repository x11iraf.

commit 846adbb5475a065600f9ea74710b3bf64d06889b
Author: Ole Streicher <olebole at debian.org>
Date:   Thu Dec 7 21:35:41 2017 +0100

    Add more Tcl-8.6 compatibility patches
---
 debian/patches/Realloc-ttydev.patch                |  22 +
 ...access-errorLine-and-Result-of-Tcl-interp.patch | 570 ------------------
 debian/patches/Use-system-Tcl-library.patch        | 657 ++++++++++++++++++++-
 debian/patches/Use-system-libs-when-possible.patch |   2 +-
 debian/patches/series                              |   2 +-
 5 files changed, 670 insertions(+), 583 deletions(-)

diff --git a/debian/patches/Realloc-ttydev.patch b/debian/patches/Realloc-ttydev.patch
new file mode 100644
index 0000000..492c23a
--- /dev/null
+++ b/debian/patches/Realloc-ttydev.patch
@@ -0,0 +1,22 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Thu, 7 Dec 2017 20:22:32 +0100
+Subject: Realloc ttydev
+
+---
+ xgterm/main.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/xgterm/main.c b/xgterm/main.c
+index 01937cc..20045d5 100644
+--- a/xgterm/main.c
++++ b/xgterm/main.c
+@@ -474,9 +474,7 @@ extern void exit();
+ extern char *ttyname();
+ #endif
+ 
+-#ifdef SYSV
+ extern char *ptsname();
+-#endif
+ 
+ extern char *strindex ();
+ extern void HandlePopupMenu();
diff --git a/debian/patches/Use-function-to-access-errorLine-and-Result-of-Tcl-interp.patch b/debian/patches/Use-function-to-access-errorLine-and-Result-of-Tcl-interp.patch
deleted file mode 100644
index ef66bdd..0000000
--- a/debian/patches/Use-function-to-access-errorLine-and-Result-of-Tcl-interp.patch
+++ /dev/null
@@ -1,570 +0,0 @@
-From: Ole Streicher <olebole at debian.org>
-Date: Thu, 7 Dec 2017 17:19:10 +0100
-Subject: Use function to access errorLine and Result of Tcl interp
-
----
- obm/Obm.c    |  8 +++---
- obm/gterm.c  | 12 ++++-----
- obm/html.c   |  6 ++---
- obm/marker.c | 18 +++++++-------
- obm/param.c  | 18 +++++++-------
- obm/server.c | 26 +++++++++----------
- obm/widget.c | 81 ++++++++++++++++++++++++++++++------------------------------
- 7 files changed, 84 insertions(+), 85 deletions(-)
-
-diff --git a/obm/Obm.c b/obm/Obm.c
-index a3172a7..b6a0eb6 100644
---- a/obm/Obm.c
-+++ b/obm/Obm.c
-@@ -377,8 +377,8 @@ int state;
- 		if (status != TCL_OK) {
- 		    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 		    fprintf (stderr, "Error on line %d in activate: %s\n",
--			obm->tcl->errorLine,
--			errstr ? errstr : obm->tcl->result);
-+			Tcl_GetErrorLine (obm->tcl),
-+			errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 		}
- 	    }
- }
-@@ -458,8 +458,8 @@ char *message;
- 		if (status != TCL_OK) {
- 		    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 		    fprintf (stderr, "Error in message to %s, line %d: %s\n",
--			object, obm->tcl->errorLine,
--			errstr ? errstr : obm->tcl->result);
-+			object, Tcl_GetErrorLine (obm->tcl),
-+			     errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 		}
- 	    } else
- 		status = TCL_OK;
-diff --git a/obm/gterm.c b/obm/gterm.c
-index 095cba5..1dc11b1 100644
---- a/obm/gterm.c
-+++ b/obm/gterm.c
-@@ -889,8 +889,8 @@ XEvent *event;
- 	if (status != TCL_OK) {
- 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 	    fprintf (stderr, "Error on line %d in %s: %s\n",
--		obm->tcl->errorLine, cb->name,
--		errstr ? errstr : obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), cb->name,
-+		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	}
- }
- 
-@@ -925,8 +925,8 @@ Widget w;
- 	if (status != TCL_OK) {
- 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 	    fprintf (stderr, "Error on line %d in %s: %s\n",
--		obm->tcl->errorLine, cb->name,
--		errstr ? errstr : obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), cb->name,
-+		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	}
- }
- 
-@@ -954,8 +954,8 @@ Widget w;
- 	if (status != TCL_OK) {
- 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 	    fprintf (stderr, "Error on line %d in %s: %s\n",
--		obm->tcl->errorLine, cb->name,
--		errstr ? errstr : obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), cb->name,
-+		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	}
- }
- 
-diff --git a/obm/html.c b/obm/html.c
-index 3679a7a..d102a5b 100644
---- a/obm/html.c
-+++ b/obm/html.c
-@@ -1243,7 +1243,7 @@ char *href;
- 
- 	    if (status != TCL_OK)
- 		cb_error (obm, cb);
--	    else if (atoi (obm->tcl->result))
-+	    else if (atoi (Tcl_GetStringResult (obm->tcl)))
- 		retval = 1;
- 	}
- 
-@@ -1478,8 +1478,8 @@ register ObmCallback cb;
- 	register Tcl_Interp *tcl = obm->tcl;
- 	char *errstr = Tcl_GetVar (tcl, "errorInfo", 0);
- 	fprintf (stderr, "Error on line %d in %s: %s\n",
--	    tcl->errorLine, cb->name,
--	    errstr ? errstr : tcl->result);
-+	    Tcl_GetErrorLine (tcl), cb->name,
-+	    errstr ? errstr : Tcl_GetStringResult (tcl));
- }
- 
- /* cb_decode -- Convert a callback_type string to a callback type code.
-diff --git a/obm/marker.c b/obm/marker.c
-index 82b5cee..6916c8a 100644
---- a/obm/marker.c
-+++ b/obm/marker.c
-@@ -393,16 +393,16 @@ char *command;
- 	} else {
- 	    status = Tcl_Eval (msg->tcl, command);
- 	    if (status == TCL_ERROR) {
--		if (*msg->tcl->result)
--		    Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
-+		if (*Tcl_GetStringResult (msg->tcl))
-+		    Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
- 		else {
- 		    /* Supply a default error message if none was returned. */
- 		    Tcl_SetResult (obm->tcl, "evaluation error", TCL_VOLATILE);
- 		}
--		obm->tcl->errorLine = msg->tcl->errorLine;
-+		Tcl_SetErrorLine (obm->tcl, Tcl_GetErrorLine (msg->tcl));
- 
--	    } else if (*msg->tcl->result)
--		Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
-+	    } else if (*Tcl_GetStringResult (msg->tcl))
-+		Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
- 	}
- 
- 	msg->level--;
-@@ -777,8 +777,8 @@ Cardinal nparams;
- 	    /* Process the list of modified values returned by the client.
- 	     * This is a list of lists, one for each modified value.
- 	     */
--	    if (*tcl->result && strcmp(tcl->result,"{}") != 0) {
--		if (Tcl_SplitList(tcl,tcl->result,&nitems,&items) != TCL_OK)
-+	    if (*Tcl_GetStringResult (tcl) && strcmp(Tcl_GetStringResult (tcl),"{}") != 0) {
-+		if (Tcl_SplitList(tcl,Tcl_GetStringResult (tcl),&nitems,&items) != TCL_OK)
- 		    status = ERR;
- 		else {
- 		    for (i=0;  i < nitems;  i++) {
-@@ -803,8 +803,8 @@ Cardinal nparams;
- 	if (status != TCL_OK) {
- 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 	    fprintf (stderr, "Error on line %d in %s: %s\n",
--		obm->tcl->errorLine, cb->name,
--		errstr ? errstr : obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), cb->name,
-+		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	}
- 
- 	return (status ? ERR : OK);
-diff --git a/obm/param.c b/obm/param.c
-index 2722633..efe1dc0 100644
---- a/obm/param.c
-+++ b/obm/param.c
-@@ -209,16 +209,16 @@ char *command;
- 	} else {
- 	    status = Tcl_Eval (msg->tcl, command);
- 	    if (status == TCL_ERROR) {
--		if (*msg->tcl->result)
--		    Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
-+		if (*Tcl_GetStringResult (msg->tcl))
-+		    Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
- 		else {
- 		    /* Supply a default error message if none was returned. */
- 		    Tcl_SetResult (obm->tcl, "evaluation error", TCL_VOLATILE);
- 		}
--		obm->tcl->errorLine = msg->tcl->errorLine;
-+		Tcl_SetErrorLine (obm->tcl, Tcl_GetErrorLine (msg->tcl));
- 
--	    } else if (*msg->tcl->result)
--		Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
-+	    } else if (*Tcl_GetStringResult (msg->tcl))
-+		Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
- 	}
- 
- 	msg->level--;
-@@ -268,8 +268,8 @@ i, obj->core.name, cb->name, new_value);*/
- 	    if (status != TCL_OK) {
- 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 		fprintf (stderr, "Error on line %d in %s: %s\n",
--		    obm->tcl->errorLine, cb->name,
--		    errstr ? errstr : obm->tcl->result);
-+		    Tcl_GetErrorLine (obm->tcl), cb->name,
-+		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	    }
- 	}
- 
-@@ -328,8 +328,8 @@ char **argv;
- 	    if (status != TCL_OK) {
- 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 		fprintf (stderr, "Error on line %d in %s: %s\n",
--		    obm->tcl->errorLine, cb->name,
--		    errstr ? errstr : obm->tcl->result);
-+		    Tcl_GetErrorLine (obm->tcl), cb->name,
-+		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	    }
- 	}
- 
-diff --git a/obm/server.c b/obm/server.c
-index 7bdc8fc..bce5aff 100644
---- a/obm/server.c
-+++ b/obm/server.c
-@@ -991,13 +991,13 @@ char **argv;
- 	Value values[MAX_RESOURCES];
- 
- 	if (argc < 2) {
--	    tcl->result = "missing resource-list argument";
-+	    Tcl_SetResult (tcl, "missing resource-list argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else
- 	    resource_list = argv[1];
- 
- 	if (Tcl_SplitList (tcl, resource_list, &nitems, &items) != TCL_OK) {
--	    tcl->result = "could not parse resource list";
-+	    Tcl_SetResult (tcl, "could not parse resource list", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else if (nitems > MAX_MENUITEMS)
- 	    nitems = MAX_MENUITEMS;
-@@ -1138,8 +1138,8 @@ XtIntervalId *id;
- 	if (status != TCL_OK) {
- 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 	    fprintf (stderr, "Error on line %d in %s: %s\n",
--		obm->tcl->errorLine, cb->userproc,
--		errstr ? errstr : obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), cb->userproc,
-+		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	}
- 
- 	unlink_callback (&obj->server, cb);
-@@ -1264,11 +1264,11 @@ XtPointer cb_ptr;
- 	if (status != TCL_OK) {
- 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 	    fprintf (stderr, "Error on line %d in %s: %s\n",
--		obm->tcl->errorLine, cb->userproc,
--		errstr ? errstr : obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), cb->userproc,
-+		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	    done = True;
- 	} else
--	    done = (strcmp (obm->tcl->result, "done") == 0) ? True : False;
-+	    done = (strcmp (Tcl_GetStringResult (obm->tcl), "done") == 0) ? True : False;
- 
- 	if (done) {
- 	    unlink_callback (&obj->server, cb);
-@@ -2171,8 +2171,8 @@ char **argv;
- 		if (Tcl_ExprString (tcl, cp) != TCL_OK)
- 		    ip->label = cp;
- 		else {
--		    ip->label = XtMalloc (strlen(tcl->result) + 1);
--		    strcpy (ip->label, tcl->result);
-+		    ip->label = XtMalloc (strlen(Tcl_GetStringResult (tcl)) + 1);
-+		    strcpy (ip->label, Tcl_GetStringResult (tcl));
- 		    ip->flags |= M_FreeLabel;
- 		}
- 	    }
-@@ -2218,7 +2218,7 @@ char **argv;
- 		    if (Tcl_ExprString (tcl, cp) != TCL_OK)
- 			ip->pixmap = findBitmap (obm, cp);
- 		    else
--			ip->pixmap = findBitmap (obm, tcl->result);
-+			ip->pixmap = findBitmap (obm, Tcl_GetStringResult (tcl));
- 
- 		} else if (strcmp (fields[field], "justify") == 0) {
- 		    char *justify = fields[++field];
-@@ -2242,7 +2242,7 @@ char **argv;
- 				fields[field], &bval) != TCL_OK) {
- 			    fprintf (stderr,
- 				"menu %s.%d sensitive option: %s\n",
--				menu_name, item, tcl->result);
-+				menu_name, item, Tcl_GetStringResult (tcl));
- 			} else if (!bval)
- 			    ip->flags |= M_Insensitive;
- 		    }
-@@ -2743,8 +2743,8 @@ XtPointer call_data;
- 	    if (Tcl_Eval (obm->tcl, ip->data) != TCL_OK) {
- 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 		fprintf (stderr, "Error %s.%s line %d: %s\n",
--		    mp->obj->core.name, XtName(ip->entry), obm->tcl->errorLine,
--		    errstr ? errstr : obm->tcl->result);
-+		    mp->obj->core.name, XtName(ip->entry), Tcl_GetErrorLine (obm->tcl),
-+		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	    }
- }
- 
-diff --git a/obm/widget.c b/obm/widget.c
-index c78af9a..af140a2 100644
---- a/obm/widget.c
-+++ b/obm/widget.c
-@@ -687,8 +687,8 @@ char *command;
- 	if (omsg && (tcl = omsg->tcl) && obmClientCommand(tcl,command)) {
- 	    omsg->object[++omsg->level] = object;
- 	    if (Tcl_Eval (tcl, command) == TCL_OK) {
--		if (*tcl->result)
--		    Tcl_SetResult (server, tcl->result, TCL_VOLATILE);
-+		if (*Tcl_GetStringResult (tcl))
-+		    Tcl_SetResult (server, Tcl_GetStringResult (tcl), TCL_VOLATILE);
- 		omsg->level--;
- 		return (TCL_OK);
- 
-@@ -699,7 +699,7 @@ char *command;
- 		/* Exit with an error return if the class code recognized
- 		 * the command but failed to execute it.
- 		 */
--		if (strncmp (tcl->result, invalid, strlen(invalid)) != 0)
-+		if (strncmp (Tcl_GetStringResult (tcl), invalid, strlen(invalid)) != 0)
- 		    goto error;
- 	    }
- 	}
-@@ -711,8 +711,8 @@ char *command;
- 		obmClientCommand(tcl,command)) {
- 	    pmsg->object[++pmsg->level] = object;
- 	    if (Tcl_Eval (tcl, command) == TCL_OK) {
--		if (*tcl->result)
--		    Tcl_SetResult (server, tcl->result, TCL_VOLATILE);
-+	    	if (*Tcl_GetStringResult (tcl))
-+		    Tcl_SetResult (server, Tcl_GetStringResult (tcl), TCL_VOLATILE);
- 		pmsg->level--;
- 		return (TCL_OK);
- 	    } else
-@@ -720,14 +720,14 @@ char *command;
- 	}
- 
- error:
--	if (*tcl->result)
--	    Tcl_SetResult (server, tcl->result, TCL_VOLATILE);
-+	if (*Tcl_GetStringResult (tcl))
-+	    Tcl_SetResult (server, Tcl_GetStringResult (tcl), TCL_VOLATILE);
- 	else {
- 	    /* Supply a default error message if none was returned. */
- 	    Tcl_SetResult (server, obmClientCommand (tcl, command) ?
- 		"evaluation error" : "invalid command", TCL_VOLATILE);
- 	}
--	server->errorLine = tcl->errorLine;
-+	Tcl_SetErrorLine (server, Tcl_GetErrorLine (tcl));
- 	return (TCL_ERROR);
- }
- 
-@@ -1349,12 +1349,12 @@ caddr_t call_data;
- 		callback_name, " ",
- 		NULL);
- 	    if (status == TCL_OK)
--		*((double *)call_data) = atof (obm->tcl->result);
-+	        *((double *)call_data) = atof (Tcl_GetStringResult (obm->tcl));
- 	    else {
- 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 		fprintf (stderr, "Error on line %d in %s: %s\n",
--		    obm->tcl->errorLine, cb->name,
--		    errstr ? errstr : obm->tcl->result);
-+		    Tcl_GetErrorLine (obm->tcl), cb->name,
-+		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	    }
- 	    break;
- 	}
-@@ -1441,8 +1441,8 @@ char *message;
- 	    if (status != TCL_OK) {
- 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
- 		fprintf (stderr, "Error on line %d in %s: %s\n",
--		    obm->tcl->errorLine, cb->name,
--		    errstr ? errstr : obm->tcl->result);
-+		    Tcl_GetErrorLine (obm->tcl), cb->name,
-+		     errstr ? errstr : Tcl_GetStringResult (obm->tcl));
- 	    }
- 	}
- }
-@@ -1617,7 +1617,7 @@ Cardinal *num_params;
- 	status = Tcl_Eval (obm->tcl, cmd);
- 	if (status != TCL_OK) {
- 	    fprintf (stderr, "Error on line %d of %s: %s\n",
--		obm->tcl->errorLine, params[0], obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), params[0], Tcl_GetStringResult (obm->tcl));
- 	}
- }
- 
-@@ -2186,12 +2186,12 @@ char **argv;
- 	char *text;
- 
- 	if (!(obmClass (obj->core.classrec, WtAsciiText))) {
--	    obm->tcl->result = "not a text widget";
-+	    Tcl_SetResult (obm->tcl, "not a text widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 2) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else
- 	    text = argv[1];
-@@ -2251,12 +2251,12 @@ char **argv;
- 
- 	if (!(obmClass (obj->core.classrec, WtList) ||
- 	      obmClass (obj->core.classrec, WtMultiList))) {
--	    obm->tcl->result = "not a list widget";
-+	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 2) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else
- 	    list = argv[1];
-@@ -2315,12 +2315,12 @@ char **argv;
- 
- 	if (!(obmClass (obj->core.classrec, WtList) ||
- 	      obmClass (obj->core.classrec, WtMultiList))) {
--	    obm->tcl->result = "not a list widget";
-+	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 2) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else
- 	    itemno = argv[1];
-@@ -2430,12 +2430,12 @@ char **argv;
- 
- 	if (!(obmClass (obj->core.classrec, WtList) ||
- 	      obmClass (obj->core.classrec, WtMultiList))) {
--	    obm->tcl->result = "not a list widget";
-+	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 2) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else
- 	    itemno = get_itemno (obj, argv[1]);
-@@ -2473,7 +2473,7 @@ char **argv;
- 
- 	if (!(obmClass (obj->core.classrec, WtList) ||
- 	      obmClass (obj->core.classrec, WtMultiList))) {
--	    obm->tcl->result = "not a list widget";
-+	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
-@@ -2555,7 +2555,7 @@ char **argv;
- 	char *value;
- 
- 	if (!(obmClass (obj->core.classrec, WtDialog))) {
--	    obm->tcl->result = "not a dialog widget";
-+	    Tcl_SetResult (obm->tcl, "not a dialog widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
-@@ -2585,7 +2585,7 @@ char **argv;
- 	char buf[SZ_NUMBER];
- 
- 	if (!(obmClass (obj->core.classrec, WtSlider2d))) {
--	    obm->tcl->result = "not a slider2d widget";
-+	    Tcl_SetResult (obm->tcl, "not a slider2d widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
-@@ -2638,12 +2638,12 @@ char **argv;
- 	double atof();
- 
- 	if (!(obmClass (obj->core.classrec, WtSlider2d))) {
--	    obm->tcl->result = "not a slider2D widget";
-+	    Tcl_SetResult (obm->tcl, "not a slider2d widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 2) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else {
- 	    x = atof (argv[1]);
-@@ -2680,12 +2680,12 @@ char **argv;
- 	double atof();
- 
- 	if (!(obmClass (obj->core.classrec, WtSlider2d))) {
--	    obm->tcl->result = "not a slider2D widget";
-+	    Tcl_SetResult (obm->tcl, "not a slider2d widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 2) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else {
- 	    width = atof (argv[1]);
-@@ -2723,13 +2723,12 @@ char **argv;
- 
- 	if (!(obmClass (obj->core.classrec, WtScrollbar) ||
- 	      obmClass (obj->core.classrec, WtScrollbar2))) {
--
--	    obm->tcl->result = "not a scrollbar widget";
-+	    Tcl_SetResult (obm->tcl, "not a scrollbar widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 3) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else {
- 	    position = atof (argv[1]);
-@@ -2767,12 +2766,12 @@ char **argv;
- 	double atof();
- 
- 	if (!(obmClass (obj->core.classrec, WtViewport))) {
--	    obm->tcl->result = "not a viewport widget";
-+	    Tcl_SetResult (obm->tcl, "not a viewport widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 3) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else {
- 	    x = atof (argv[1]);
-@@ -2804,12 +2803,12 @@ char **argv;
- 	double atof();
- 
- 	if (!(obmClass (obj->core.classrec, WtViewport))) {
--	    obm->tcl->result = "not a viewport widget";
-+	    Tcl_SetResult (obm->tcl, "not a viewport widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
- 	if (argc < 3) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else {
- 	    x = atoi (argv[1]);
-@@ -2840,10 +2839,10 @@ char **argv;
- 	ObmObject child = (ObmObject) NULL;
- 
- 	if (!(obmClass (obj->core.classrec, WtTabs))) {
--	    obm->tcl->result = "not a Tabs widget";
-+	    Tcl_SetResult (obm->tcl, "not a tabs widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else if (argc < 2) {
--	    obm->tcl->result = "missing argument";
-+	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
-@@ -2896,10 +2895,10 @@ char **argv;
- 
- 	/* Do some error checking first. */
- 	if (!(obmClass (obj->core.classrec, WtListTree))) {
--	    obm->tcl->result = "not a ListTree widget";
-+	    Tcl_SetResult (obm->tcl, "not a ListTree widget", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	} else if (argc < 2) {
--	    obm->tcl->result = "missing list argument";
-+	    Tcl_SetResult (obm->tcl, "missing list argument", TCL_STATIC);
- 	    return (TCL_ERROR);
- 	}
- 
-@@ -4926,7 +4925,7 @@ Boolean *continue_to_dispatch;
- 	status = Tcl_Eval (obm->tcl, cmd);
- 	if (status != TCL_OK) {
- 	    fprintf (stderr, "Error on line %d of %s: %s\n",
--		obm->tcl->errorLine, cb->name, obm->tcl->result);
-+		Tcl_GetErrorLine (obm->tcl), cb->name, Tcl_GetStringResult (obm->tcl));
- 	}
- }
- 
diff --git a/debian/patches/Use-system-Tcl-library.patch b/debian/patches/Use-system-Tcl-library.patch
index ca6c139..e349d51 100644
--- a/debian/patches/Use-system-Tcl-library.patch
+++ b/debian/patches/Use-system-Tcl-library.patch
@@ -4,19 +4,23 @@ Subject: Use system Tcl library
 
 This requires an update for several tcl lib functions
 ---
- obm/Imakefile        |  7 +++----
+ obm/Imakefile        |  7 ++--
+ obm/Obm.c            |  8 ++---
  obm/ObmP.h           |  2 +-
- obm/client.c         |  4 ++--
- obm/gterm.c          |  6 ++++--
- obm/server.c         | 10 +++++-----
- obm/widget.c         |  2 +-
+ obm/client.c         |  6 ++--
+ obm/gterm.c          | 20 ++++++------
+ obm/html.c           |  6 ++--
+ obm/marker.c         | 26 +++++++--------
+ obm/param.c          | 18 +++++------
+ obm/server.c         | 38 +++++++++++-----------
+ obm/widget.c         | 91 ++++++++++++++++++++++++++--------------------------
  obmsh/Imakefile      |  2 +-
  xgterm/Imakefile     |  2 +-
  ximtool/Imakefile    |  2 +-
  ximtool/ism.c        |  2 +-
  ximtool/ism_wcspix.c |  2 +-
- ximtool/ximclient.c  |  4 ++--
- 12 files changed, 23 insertions(+), 22 deletions(-)
+ ximtool/ximclient.c  |  4 +--
+ 16 files changed, 118 insertions(+), 118 deletions(-)
 
 diff --git a/obm/Imakefile b/obm/Imakefile
 index 85090b7..c08def2 100644
@@ -50,6 +54,32 @@ index 85090b7..c08def2 100644
  	@(cd ObmW; $(MAKE) $(MFLAGS) all X11IRAFDIR=../../)
  	$(AR) $@ $(OBJS)
  	$(ARADD) $@ $(ALL_OBJS)
+diff --git a/obm/Obm.c b/obm/Obm.c
+index a3172a7..b6a0eb6 100644
+--- a/obm/Obm.c
++++ b/obm/Obm.c
+@@ -377,8 +377,8 @@ int state;
+ 		if (status != TCL_OK) {
+ 		    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 		    fprintf (stderr, "Error on line %d in activate: %s\n",
+-			obm->tcl->errorLine,
+-			errstr ? errstr : obm->tcl->result);
++			Tcl_GetErrorLine (obm->tcl),
++			errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 		}
+ 	    }
+ }
+@@ -458,8 +458,8 @@ char *message;
+ 		if (status != TCL_OK) {
+ 		    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 		    fprintf (stderr, "Error in message to %s, line %d: %s\n",
+-			object, obm->tcl->errorLine,
+-			errstr ? errstr : obm->tcl->result);
++			object, Tcl_GetErrorLine (obm->tcl),
++			     errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 		}
+ 	    } else
+ 		status = TCL_OK;
 diff --git a/obm/ObmP.h b/obm/ObmP.h
 index 6d0193b..2c8906a 100644
 --- a/obm/ObmP.h
@@ -64,7 +94,7 @@ index 6d0193b..2c8906a 100644
  /* Size limiting definitions. */
  #define SZ_NAME		128		/* class or object name */
 diff --git a/obm/client.c b/obm/client.c
-index 00cc2c5..e1fbbff 100644
+index 00cc2c5..6cefe4b 100644
 --- a/obm/client.c
 +++ b/obm/client.c
 @@ -142,7 +142,7 @@ literal:    if (Tcl_SplitList (tcl, command, &argc, &argvp) == TCL_OK) {
@@ -76,6 +106,15 @@ index 00cc2c5..e1fbbff 100644
  	    }
  	}
  
+@@ -172,7 +172,7 @@ char **argv;
+ 	if (argc >= 2) {
+ 	    char *message = Tcl_Concat (argc-1, &argv[1]);
+ 	    stat = client_output (obm, obj->core.name, ':', message);
+-	    free ((char *)message);
++	    Tcl_Free ((char *)message);
+ 	} else
+ 	    stat = -1;
+ 
 @@ -224,7 +224,7 @@ char **argv;
  	if (argc >= 2) {
  	    char *message = Tcl_Concat (argc-1, &argv[1]);
@@ -86,9 +125,51 @@ index 00cc2c5..e1fbbff 100644
  	    stat = -1;
  
 diff --git a/obm/gterm.c b/obm/gterm.c
-index 7185635..095cba5 100644
+index 7185635..476c7f8 100644
 --- a/obm/gterm.c
 +++ b/obm/gterm.c
+@@ -544,7 +544,7 @@ char **argv;
+ 		(*cb->u.fcn) (cb->client_data, wp->w, message);
+ 
+ 	if (message)
+-	    free ((char *)message);
++	    Tcl_Free ((char *)message);
+ 
+ 	return (TCL_OK);
+ }
+@@ -889,8 +889,8 @@ XEvent *event;
+ 	if (status != TCL_OK) {
+ 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 	    fprintf (stderr, "Error on line %d in %s: %s\n",
+-		obm->tcl->errorLine, cb->name,
+-		errstr ? errstr : obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), cb->name,
++		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	}
+ }
+ 
+@@ -925,8 +925,8 @@ Widget w;
+ 	if (status != TCL_OK) {
+ 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 	    fprintf (stderr, "Error on line %d in %s: %s\n",
+-		obm->tcl->errorLine, cb->name,
+-		errstr ? errstr : obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), cb->name,
++		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	}
+ }
+ 
+@@ -954,8 +954,8 @@ Widget w;
+ 	if (status != TCL_OK) {
+ 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 	    fprintf (stderr, "Error on line %d in %s: %s\n",
+-		obm->tcl->errorLine, cb->name,
+-		errstr ? errstr : obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), cb->name,
++		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	}
+ }
+ 
 @@ -4127,8 +4127,10 @@ char **argv;
  
  	obmNewObject (obm, name, "Marker", obj->core.name, args, nargs);
@@ -102,8 +183,159 @@ index 7185635..095cba5 100644
  
  	return (TCL_OK);
  }
+diff --git a/obm/html.c b/obm/html.c
+index 3679a7a..d102a5b 100644
+--- a/obm/html.c
++++ b/obm/html.c
+@@ -1243,7 +1243,7 @@ char *href;
+ 
+ 	    if (status != TCL_OK)
+ 		cb_error (obm, cb);
+-	    else if (atoi (obm->tcl->result))
++	    else if (atoi (Tcl_GetStringResult (obm->tcl)))
+ 		retval = 1;
+ 	}
+ 
+@@ -1478,8 +1478,8 @@ register ObmCallback cb;
+ 	register Tcl_Interp *tcl = obm->tcl;
+ 	char *errstr = Tcl_GetVar (tcl, "errorInfo", 0);
+ 	fprintf (stderr, "Error on line %d in %s: %s\n",
+-	    tcl->errorLine, cb->name,
+-	    errstr ? errstr : tcl->result);
++	    Tcl_GetErrorLine (tcl), cb->name,
++	    errstr ? errstr : Tcl_GetStringResult (tcl));
+ }
+ 
+ /* cb_decode -- Convert a callback_type string to a callback type code.
+diff --git a/obm/marker.c b/obm/marker.c
+index 82b5cee..9e60120 100644
+--- a/obm/marker.c
++++ b/obm/marker.c
+@@ -393,16 +393,16 @@ char *command;
+ 	} else {
+ 	    status = Tcl_Eval (msg->tcl, command);
+ 	    if (status == TCL_ERROR) {
+-		if (*msg->tcl->result)
+-		    Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
++		if (*Tcl_GetStringResult (msg->tcl))
++		    Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
+ 		else {
+ 		    /* Supply a default error message if none was returned. */
+ 		    Tcl_SetResult (obm->tcl, "evaluation error", TCL_VOLATILE);
+ 		}
+-		obm->tcl->errorLine = msg->tcl->errorLine;
++		Tcl_SetErrorLine (obm->tcl, Tcl_GetErrorLine (msg->tcl));
+ 
+-	    } else if (*msg->tcl->result)
+-		Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
++	    } else if (*Tcl_GetStringResult (msg->tcl))
++		Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
+ 	}
+ 
+ 	msg->level--;
+@@ -777,8 +777,8 @@ Cardinal nparams;
+ 	    /* Process the list of modified values returned by the client.
+ 	     * This is a list of lists, one for each modified value.
+ 	     */
+-	    if (*tcl->result && strcmp(tcl->result,"{}") != 0) {
+-		if (Tcl_SplitList(tcl,tcl->result,&nitems,&items) != TCL_OK)
++	    if (*Tcl_GetStringResult (tcl) && strcmp(Tcl_GetStringResult (tcl),"{}") != 0) {
++		if (Tcl_SplitList(tcl,Tcl_GetStringResult (tcl),&nitems,&items) != TCL_OK)
+ 		    status = ERR;
+ 		else {
+ 		    for (i=0;  i < nitems;  i++) {
+@@ -792,19 +792,19 @@ Cardinal nparams;
+ 				    strcpy (params[j+2], fields[1]);
+ 				    break;
+ 				}
+-			free ((char *) fields);
++			Tcl_Free ((char *) fields);
+ 		    }
+ 		}
+ 
+-		free ((char *) items);
++		Tcl_Free ((char *) items);
+ 	    }
+ 	}
+ 
+ 	if (status != TCL_OK) {
+ 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 	    fprintf (stderr, "Error on line %d in %s: %s\n",
+-		obm->tcl->errorLine, cb->name,
+-		errstr ? errstr : obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), cb->name,
++		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	}
+ 
+ 	return (status ? ERR : OK);
+@@ -1272,7 +1272,7 @@ char **argv;
+ 		status++;
+ 	}
+ 
+-	free ((char *) items);
++	XtFree ((char *) items);
+ 	return (status ? TCL_ERROR : TCL_OK);
+ }
+ 
+@@ -1329,7 +1329,7 @@ char **argv;
+ 	else
+ 	    status = TCL_OK;
+ 
+-	free ((char *) items);
++	XtFree ((char *) items);
+ 	return (status);
+ }
+ 
+diff --git a/obm/param.c b/obm/param.c
+index 2722633..efe1dc0 100644
+--- a/obm/param.c
++++ b/obm/param.c
+@@ -209,16 +209,16 @@ char *command;
+ 	} else {
+ 	    status = Tcl_Eval (msg->tcl, command);
+ 	    if (status == TCL_ERROR) {
+-		if (*msg->tcl->result)
+-		    Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
++		if (*Tcl_GetStringResult (msg->tcl))
++		    Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
+ 		else {
+ 		    /* Supply a default error message if none was returned. */
+ 		    Tcl_SetResult (obm->tcl, "evaluation error", TCL_VOLATILE);
+ 		}
+-		obm->tcl->errorLine = msg->tcl->errorLine;
++		Tcl_SetErrorLine (obm->tcl, Tcl_GetErrorLine (msg->tcl));
+ 
+-	    } else if (*msg->tcl->result)
+-		Tcl_SetResult (obm->tcl, msg->tcl->result, TCL_VOLATILE);
++	    } else if (*Tcl_GetStringResult (msg->tcl))
++		Tcl_SetResult (obm->tcl, Tcl_GetStringResult (msg->tcl), TCL_VOLATILE);
+ 	}
+ 
+ 	msg->level--;
+@@ -268,8 +268,8 @@ i, obj->core.name, cb->name, new_value);*/
+ 	    if (status != TCL_OK) {
+ 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 		fprintf (stderr, "Error on line %d in %s: %s\n",
+-		    obm->tcl->errorLine, cb->name,
+-		    errstr ? errstr : obm->tcl->result);
++		    Tcl_GetErrorLine (obm->tcl), cb->name,
++		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	    }
+ 	}
+ 
+@@ -328,8 +328,8 @@ char **argv;
+ 	    if (status != TCL_OK) {
+ 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 		fprintf (stderr, "Error on line %d in %s: %s\n",
+-		    obm->tcl->errorLine, cb->name,
+-		    errstr ? errstr : obm->tcl->result);
++		    Tcl_GetErrorLine (obm->tcl), cb->name,
++		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	    }
+ 	}
+ 
 diff --git a/obm/server.c b/obm/server.c
-index 9c8be1b..c24f3e1 100644
+index 9c8be1b..734c14c 100644
 --- a/obm/server.c
 +++ b/obm/server.c
 @@ -830,7 +830,7 @@ char **argv;
@@ -115,6 +347,31 @@ index 9c8be1b..c24f3e1 100644
  	}
  	
  	return (status);
+@@ -856,7 +856,7 @@ char **argv;
+ 	    char *message = Tcl_Concat (argc-1, &argv[1]);
+ 	    printf ("%s\n", message);
+ 	    fflush (stdout);
+-	    free ((char *)message);
++	    Tcl_Free ((char *)message);
+ 	}
+ 	
+ 	return (TCL_OK);
+@@ -991,13 +991,13 @@ char **argv;
+ 	Value values[MAX_RESOURCES];
+ 
+ 	if (argc < 2) {
+-	    tcl->result = "missing resource-list argument";
++	    Tcl_SetResult (tcl, "missing resource-list argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else
+ 	    resource_list = argv[1];
+ 
+ 	if (Tcl_SplitList (tcl, resource_list, &nitems, &items) != TCL_OK) {
+-	    tcl->result = "could not parse resource list";
++	    Tcl_SetResult (tcl, "could not parse resource list", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else if (nitems > MAX_MENUITEMS)
+ 	    nitems = MAX_MENUITEMS;
 @@ -1042,9 +1042,9 @@ err:		sprintf (buf, "bad item '%d' in resource list", item + 1);
  		    "Warning (getResources): cannot set value of %s\n",
  		    values[item].variable);
@@ -127,6 +384,61 @@ index 9c8be1b..c24f3e1 100644
  
  	return (TCL_OK);
  }
+@@ -1138,8 +1138,8 @@ XtIntervalId *id;
+ 	if (status != TCL_OK) {
+ 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 	    fprintf (stderr, "Error on line %d in %s: %s\n",
+-		obm->tcl->errorLine, cb->userproc,
+-		errstr ? errstr : obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), cb->userproc,
++		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	}
+ 
+ 	unlink_callback (&obj->server, cb);
+@@ -1264,11 +1264,11 @@ XtPointer cb_ptr;
+ 	if (status != TCL_OK) {
+ 	    char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 	    fprintf (stderr, "Error on line %d in %s: %s\n",
+-		obm->tcl->errorLine, cb->userproc,
+-		errstr ? errstr : obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), cb->userproc,
++		errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	    done = True;
+ 	} else
+-	    done = (strcmp (obm->tcl->result, "done") == 0) ? True : False;
++	    done = (strcmp (Tcl_GetStringResult (obm->tcl), "done") == 0) ? True : False;
+ 
+ 	if (done) {
+ 	    unlink_callback (&obj->server, cb);
+@@ -2171,8 +2171,8 @@ char **argv;
+ 		if (Tcl_ExprString (tcl, cp) != TCL_OK)
+ 		    ip->label = cp;
+ 		else {
+-		    ip->label = XtMalloc (strlen(tcl->result) + 1);
+-		    strcpy (ip->label, tcl->result);
++		    ip->label = XtMalloc (strlen(Tcl_GetStringResult (tcl)) + 1);
++		    strcpy (ip->label, Tcl_GetStringResult (tcl));
+ 		    ip->flags |= M_FreeLabel;
+ 		}
+ 	    }
+@@ -2218,7 +2218,7 @@ char **argv;
+ 		    if (Tcl_ExprString (tcl, cp) != TCL_OK)
+ 			ip->pixmap = findBitmap (obm, cp);
+ 		    else
+-			ip->pixmap = findBitmap (obm, tcl->result);
++			ip->pixmap = findBitmap (obm, Tcl_GetStringResult (tcl));
+ 
+ 		} else if (strcmp (fields[field], "justify") == 0) {
+ 		    char *justify = fields[++field];
+@@ -2242,7 +2242,7 @@ char **argv;
+ 				fields[field], &bval) != TCL_OK) {
+ 			    fprintf (stderr,
+ 				"menu %s.%d sensitive option: %s\n",
+-				menu_name, item, tcl->result);
++				menu_name, item, Tcl_GetStringResult (tcl));
+ 			} else if (!bval)
+ 			    ip->flags |= M_Insensitive;
+ 		    }
 @@ -2261,7 +2261,7 @@ char **argv;
  	}
  
@@ -145,10 +457,145 @@ index 9c8be1b..c24f3e1 100644
  	}
  
  	XtFree ((char *)mp);
+@@ -2743,8 +2743,8 @@ XtPointer call_data;
+ 	    if (Tcl_Eval (obm->tcl, ip->data) != TCL_OK) {
+ 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 		fprintf (stderr, "Error %s.%s line %d: %s\n",
+-		    mp->obj->core.name, XtName(ip->entry), obm->tcl->errorLine,
+-		    errstr ? errstr : obm->tcl->result);
++		    mp->obj->core.name, XtName(ip->entry), Tcl_GetErrorLine (obm->tcl),
++		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	    }
+ }
+ 
 diff --git a/obm/widget.c b/obm/widget.c
-index e33723f..c78af9a 100644
+index e33723f..e472c35 100644
 --- a/obm/widget.c
 +++ b/obm/widget.c
+@@ -687,8 +687,8 @@ char *command;
+ 	if (omsg && (tcl = omsg->tcl) && obmClientCommand(tcl,command)) {
+ 	    omsg->object[++omsg->level] = object;
+ 	    if (Tcl_Eval (tcl, command) == TCL_OK) {
+-		if (*tcl->result)
+-		    Tcl_SetResult (server, tcl->result, TCL_VOLATILE);
++		if (*Tcl_GetStringResult (tcl))
++		    Tcl_SetResult (server, Tcl_GetStringResult (tcl), TCL_VOLATILE);
+ 		omsg->level--;
+ 		return (TCL_OK);
+ 
+@@ -699,7 +699,7 @@ char *command;
+ 		/* Exit with an error return if the class code recognized
+ 		 * the command but failed to execute it.
+ 		 */
+-		if (strncmp (tcl->result, invalid, strlen(invalid)) != 0)
++		if (strncmp (Tcl_GetStringResult (tcl), invalid, strlen(invalid)) != 0)
+ 		    goto error;
+ 	    }
+ 	}
+@@ -711,8 +711,8 @@ char *command;
+ 		obmClientCommand(tcl,command)) {
+ 	    pmsg->object[++pmsg->level] = object;
+ 	    if (Tcl_Eval (tcl, command) == TCL_OK) {
+-		if (*tcl->result)
+-		    Tcl_SetResult (server, tcl->result, TCL_VOLATILE);
++	    	if (*Tcl_GetStringResult (tcl))
++		    Tcl_SetResult (server, Tcl_GetStringResult (tcl), TCL_VOLATILE);
+ 		pmsg->level--;
+ 		return (TCL_OK);
+ 	    } else
+@@ -720,14 +720,14 @@ char *command;
+ 	}
+ 
+ error:
+-	if (*tcl->result)
+-	    Tcl_SetResult (server, tcl->result, TCL_VOLATILE);
++	if (*Tcl_GetStringResult (tcl))
++	    Tcl_SetResult (server, Tcl_GetStringResult (tcl), TCL_VOLATILE);
+ 	else {
+ 	    /* Supply a default error message if none was returned. */
+ 	    Tcl_SetResult (server, obmClientCommand (tcl, command) ?
+ 		"evaluation error" : "invalid command", TCL_VOLATILE);
+ 	}
+-	server->errorLine = tcl->errorLine;
++	Tcl_SetErrorLine (server, Tcl_GetErrorLine (tcl));
+ 	return (TCL_ERROR);
+ }
+ 
+@@ -1349,12 +1349,12 @@ caddr_t call_data;
+ 		callback_name, " ",
+ 		NULL);
+ 	    if (status == TCL_OK)
+-		*((double *)call_data) = atof (obm->tcl->result);
++	        *((double *)call_data) = atof (Tcl_GetStringResult (obm->tcl));
+ 	    else {
+ 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 		fprintf (stderr, "Error on line %d in %s: %s\n",
+-		    obm->tcl->errorLine, cb->name,
+-		    errstr ? errstr : obm->tcl->result);
++		    Tcl_GetErrorLine (obm->tcl), cb->name,
++		    errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	    }
+ 	    break;
+ 	}
+@@ -1441,8 +1441,8 @@ char *message;
+ 	    if (status != TCL_OK) {
+ 		char *errstr = Tcl_GetVar (obm->tcl, "errorInfo", 0);
+ 		fprintf (stderr, "Error on line %d in %s: %s\n",
+-		    obm->tcl->errorLine, cb->name,
+-		    errstr ? errstr : obm->tcl->result);
++		    Tcl_GetErrorLine (obm->tcl), cb->name,
++		     errstr ? errstr : Tcl_GetStringResult (obm->tcl));
+ 	    }
+ 	}
+ }
+@@ -1617,7 +1617,7 @@ Cardinal *num_params;
+ 	status = Tcl_Eval (obm->tcl, cmd);
+ 	if (status != TCL_OK) {
+ 	    fprintf (stderr, "Error on line %d of %s: %s\n",
+-		obm->tcl->errorLine, params[0], obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), params[0], Tcl_GetStringResult (obm->tcl));
+ 	}
+ }
+ 
+@@ -2151,7 +2151,7 @@ char **argv;
+   	    if (font_struct == NULL || name == NULL)
+ 	        name = XtNewString("-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1");
+ 	    strcpy (result, name);
+-	    free ((char *)name);
++	    XtFree ((char *)name);
+ 
+ 	} else {
+ 	    caddr_t value;  Arg args[1];
+@@ -2186,12 +2186,12 @@ char **argv;
+ 	char *text;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtAsciiText))) {
+-	    obm->tcl->result = "not a text widget";
++	    Tcl_SetResult (obm->tcl, "not a text widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 2) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else
+ 	    text = argv[1];
+@@ -2251,12 +2251,12 @@ char **argv;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtList) ||
+ 	      obmClass (obj->core.classrec, WtMultiList))) {
+-	    obm->tcl->result = "not a list widget";
++	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 2) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else
+ 	    list = argv[1];
 @@ -2273,7 +2273,7 @@ char **argv;
  		items, nitems, 0, resize, NULL);
  
@@ -158,6 +605,194 @@ index e33723f..c78af9a 100644
  
  	wp->data = (char *) items;
  	wp->datalen = nitems;
+@@ -2315,12 +2315,12 @@ char **argv;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtList) ||
+ 	      obmClass (obj->core.classrec, WtMultiList))) {
+-	    obm->tcl->result = "not a list widget";
++	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 2) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else
+ 	    itemno = argv[1];
+@@ -2430,12 +2430,12 @@ char **argv;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtList) ||
+ 	      obmClass (obj->core.classrec, WtMultiList))) {
+-	    obm->tcl->result = "not a list widget";
++	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 2) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else
+ 	    itemno = get_itemno (obj, argv[1]);
+@@ -2473,7 +2473,7 @@ char **argv;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtList) ||
+ 	      obmClass (obj->core.classrec, WtMultiList))) {
+-	    obm->tcl->result = "not a list widget";
++	    Tcl_SetResult (obm->tcl, "not a list widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+@@ -2555,7 +2555,7 @@ char **argv;
+ 	char *value;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtDialog))) {
+-	    obm->tcl->result = "not a dialog widget";
++	    Tcl_SetResult (obm->tcl, "not a dialog widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+@@ -2585,7 +2585,7 @@ char **argv;
+ 	char buf[SZ_NUMBER];
+ 
+ 	if (!(obmClass (obj->core.classrec, WtSlider2d))) {
+-	    obm->tcl->result = "not a slider2d widget";
++	    Tcl_SetResult (obm->tcl, "not a slider2d widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+@@ -2638,12 +2638,12 @@ char **argv;
+ 	double atof();
+ 
+ 	if (!(obmClass (obj->core.classrec, WtSlider2d))) {
+-	    obm->tcl->result = "not a slider2D widget";
++	    Tcl_SetResult (obm->tcl, "not a slider2d widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 2) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else {
+ 	    x = atof (argv[1]);
+@@ -2680,12 +2680,12 @@ char **argv;
+ 	double atof();
+ 
+ 	if (!(obmClass (obj->core.classrec, WtSlider2d))) {
+-	    obm->tcl->result = "not a slider2D widget";
++	    Tcl_SetResult (obm->tcl, "not a slider2d widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 2) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else {
+ 	    width = atof (argv[1]);
+@@ -2723,13 +2723,12 @@ char **argv;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtScrollbar) ||
+ 	      obmClass (obj->core.classrec, WtScrollbar2))) {
+-
+-	    obm->tcl->result = "not a scrollbar widget";
++	    Tcl_SetResult (obm->tcl, "not a scrollbar widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 3) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else {
+ 	    position = atof (argv[1]);
+@@ -2767,12 +2766,12 @@ char **argv;
+ 	double atof();
+ 
+ 	if (!(obmClass (obj->core.classrec, WtViewport))) {
+-	    obm->tcl->result = "not a viewport widget";
++	    Tcl_SetResult (obm->tcl, "not a viewport widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 3) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else {
+ 	    x = atof (argv[1]);
+@@ -2804,12 +2803,12 @@ char **argv;
+ 	double atof();
+ 
+ 	if (!(obmClass (obj->core.classrec, WtViewport))) {
+-	    obm->tcl->result = "not a viewport widget";
++	    Tcl_SetResult (obm->tcl, "not a viewport widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+ 	if (argc < 3) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else {
+ 	    x = atoi (argv[1]);
+@@ -2840,10 +2839,10 @@ char **argv;
+ 	ObmObject child = (ObmObject) NULL;
+ 
+ 	if (!(obmClass (obj->core.classrec, WtTabs))) {
+-	    obm->tcl->result = "not a Tabs widget";
++	    Tcl_SetResult (obm->tcl, "not a tabs widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else if (argc < 2) {
+-	    obm->tcl->result = "missing argument";
++	    Tcl_SetResult (obm->tcl, "missing argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+@@ -2896,10 +2895,10 @@ char **argv;
+ 
+ 	/* Do some error checking first. */
+ 	if (!(obmClass (obj->core.classrec, WtListTree))) {
+-	    obm->tcl->result = "not a ListTree widget";
++	    Tcl_SetResult (obm->tcl, "not a ListTree widget", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	} else if (argc < 2) {
+-	    obm->tcl->result = "missing list argument";
++	    Tcl_SetResult (obm->tcl, "missing list argument", TCL_STATIC);
+ 	    return (TCL_ERROR);
+ 	}
+ 
+@@ -2983,7 +2982,7 @@ char	*item;
+ 	        buildTreeList (w, tcl, level, entry[i]);
+ 	}
+ 
+-	free ((char *) fields);
++	Tcl_Free ((char *) fields);
+ /*	free ((char *) entry);*/
+ 	return (TCL_OK);
+ }
+@@ -3340,8 +3339,8 @@ char **argv;
+ 	        XawTableSetLabel (wp->w, i, j, cols[j]);
+ 	}
+ 
+-	free ((char *) rows);
+-	free ((char *) cols);
++	Tcl_Free ((char *) rows);
++	Tcl_Free ((char *) cols);
+         return (TCL_OK);
+ }
+ 
+@@ -4926,7 +4925,7 @@ Boolean *continue_to_dispatch;
+ 	status = Tcl_Eval (obm->tcl, cmd);
+ 	if (status != TCL_OK) {
+ 	    fprintf (stderr, "Error on line %d of %s: %s\n",
+-		obm->tcl->errorLine, cb->name, obm->tcl->result);
++		Tcl_GetErrorLine (obm->tcl), cb->name, Tcl_GetStringResult (obm->tcl));
+ 	}
+ }
+ 
 diff --git a/obmsh/Imakefile b/obmsh/Imakefile
 index 8a67758..000fdd0 100644
 --- a/obmsh/Imakefile
diff --git a/debian/patches/Use-system-libs-when-possible.patch b/debian/patches/Use-system-libs-when-possible.patch
index 0becb85..4b2e717 100644
--- a/debian/patches/Use-system-libs-when-possible.patch
+++ b/debian/patches/Use-system-libs-when-possible.patch
@@ -78,7 +78,7 @@ index d139296..550a70b 100644
      switch (status) {
      case XpmOpenFailed:
 diff --git a/obm/server.c b/obm/server.c
-index c24f3e1..7bdc8fc 100644
+index 734c14c..03403f8 100644
 --- a/obm/server.c
 +++ b/obm/server.c
 @@ -1757,7 +1757,7 @@ char *description;
diff --git a/debian/patches/series b/debian/patches/series
index a9ef152..ed39908 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,9 @@
 Don-t-use-mkpkg.patch
 Remove-declaration-of-malloc.patch
+Realloc-ttydev.patch
 Force-use-of-stdarg.patch
 Fix-pixel-window-copy-in-ObmW-Gterm.patch
 Include-install-directory.patch
 Fix-function-type-of-Create-functions-in-obm.patch
 Use-system-Tcl-library.patch
 Use-system-libs-when-possible.patch
-Use-function-to-access-errorLine-and-Result-of-Tcl-interp.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/x11iraf.git



More information about the Debian-astro-commits mailing list