[Debian-astro-commits] [x11iraf] 02/02: Adjust for Tcl 8.6

Ole Streicher olebole at moszumanska.debian.org
Thu Dec 7 16:55:22 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 30eb6b413b7be1f22ff821103144082722661a39
Author: Ole Streicher <olebole at debian.org>
Date:   Thu Dec 7 17:37:38 2017 +0100

    Adjust for Tcl 8.6
---
 ...access-errorLine-and-Result-of-Tcl-interp.patch | 570 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 571 insertions(+)

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
new file mode 100644
index 0000000..ef66bdd
--- /dev/null
+++ b/debian/patches/Use-function-to-access-errorLine-and-Result-of-Tcl-interp.patch
@@ -0,0 +1,570 @@
+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/series b/debian/patches/series
index f20bd8b..a9ef152 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ 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