summaryrefslogtreecommitdiff
path: root/math/plplot/files/patch-bindings__tk-x-plat__plolotter.c
blob: d1f6c28d495c9f860b2beb2db0b28b4c90b64bfc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
--- bindings/tk-x-plat/plplotter.c.orig
+++ bindings/tk-x-plat/plplotter.c
@@ -463,7 +463,7 @@
     PlPlotterFirstInit( (ClientData) plPlotterPtr );
     Tk_GeometryRequest( plPlotterPtr->tkwin, 200, 200 );
 
-    interp->result = Tk_PathName( plPlotterPtr->tkwin );
+    Tcl_SetResult(interp,(char*)Tk_PathName(plPlotterPtr->tkwin) ,TCL_VOLATILE);
 
     return TCL_OK;
 }
@@ -2018,7 +2018,7 @@
 //
 // Results:
 //      The return value is a standard Tcl result.  If TCL_ERROR is
-//      returned, then interp->result contains an error message.
+//      returned, then Tcl_GetStringResult(interp) contains an error message.
 //
 // Side effects:
 //      Configuration information, such as text string, colors, font, etc.
@@ -2469,7 +2469,7 @@
         plr->at_bop = 0;
         if ( Tcl_Eval( interp, plPlotterPtr->bopCmd ) != TCL_OK )
             fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
-                plPlotterPtr->bopCmd, interp->result );
+                plPlotterPtr->bopCmd, Tcl_GetStringResult(interp) );
     }
 
 // Signal eop if necessary
@@ -2479,7 +2479,7 @@
         plr->at_eop = 0;
         if ( Tcl_Eval( interp, plPlotterPtr->eopCmd ) != TCL_OK )
             fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
-                plPlotterPtr->eopCmd, interp->result );
+                plPlotterPtr->eopCmd, Tcl_GetStringResult(interp) );
     }
 
     return result;
@@ -2491,7 +2491,7 @@
     {
         if ( Tcl_Eval( interp, plPlotterPtr->eopCmd ) != TCL_OK )
             fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
-                plPlotterPtr->eopCmd, interp->result );
+                plPlotterPtr->eopCmd, Tcl_GetStringResult(interp) );
     }
 }
 
@@ -2501,7 +2501,7 @@
     {
         if ( Tcl_Eval( interp, plPlotterPtr->bopCmd ) != TCL_OK )
             fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
-                plPlotterPtr->bopCmd, interp->result );
+                plPlotterPtr->bopCmd, Tcl_GetStringResult(interp ) );
     }
 }
 
@@ -2536,7 +2536,7 @@
         {
         #endif
             Tcl_AppendResult( interp, "Packet receive failed:\n\t %s\n",
-                interp->result, (char *) NULL );
+                Tcl_GetStringResult(interp), (char *) NULL );
             return TCL_ERROR;
         }
 
@@ -3082,7 +3082,7 @@
 
     if ( argc == 0 )
     {
-        interp->result = "report what?";
+        Tcl_SetResult(interp,(char*)"report what?",TCL_VOLATILE);
         return TCL_ERROR;
     }
 
@@ -3093,7 +3093,7 @@
 
         if ( argc != 3 )
         {
-            interp->result = "Wrong # of args: report wc x y";
+            Tcl_SetResult(interp,(char*)"Wrong # of args: report wc x y",TCL_VOLATILE);
             return TCL_ERROR;
         }
 
@@ -3107,15 +3107,15 @@
 
         if ( plTranslateCursor( gin ) )
         {
-            sprintf( interp->result, "%f %f", gin->wX, gin->wY );
+            sprintf( Tcl_GetStringResult(interp), "%f %f", gin->wX, gin->wY );
             return TCL_OK;
         }
 
-        interp->result = "Cannot locate";
+        Tcl_SetResult(interp,(char*)"Cannot locate",TCL_VOLATILE);
         return TCL_OK;
     }
 
-    interp->result = "nonsensical request.";
+    Tcl_SetResult(interp,(char*)"nonsensical request.",TCL_VOLATILE);
     return TCL_ERROR;
 }