From 4eacc9c6e7ccaf5cd10173113a6e515bf25af027 Mon Sep 17 00:00:00 2001 From: joye Date: Fri, 25 Apr 2014 18:16:59 +0000 Subject: *** empty log message *** --- src/bltGrElem.h | 3 ++- src/bltGrElemOption.C | 2 +- src/bltGrMarkerOp.C | 11 +++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/bltGrElem.h b/src/bltGrElem.h index 6984aa5..54a3fb6 100644 --- a/src/bltGrElem.h +++ b/src/bltGrElem.h @@ -78,7 +78,8 @@ typedef struct { double *values; int nValues; int arraySize; - double min, max; + double min; + double max; } ElemValues; typedef struct { diff --git a/src/bltGrElemOption.C b/src/bltGrElemOption.C index ee1c6cc..6f49438 100644 --- a/src/bltGrElemOption.C +++ b/src/bltGrElemOption.C @@ -430,7 +430,7 @@ static void VectorChangedProc(Tcl_Interp* interp, ClientData clientData, else { Blt_Vector* vector; Blt_GetVectorById(interp, valuesPtr->vectorSource.vector, &vector); - if (FetchVectorValues(NULL, valuesPtr, vector) != TCL_OK) + if (FetchVectorValues(interp, valuesPtr, vector) != TCL_OK) return; } diff --git a/src/bltGrMarkerOp.C b/src/bltGrMarkerOp.C index 6309d58..0e1e676 100644 --- a/src/bltGrMarkerOp.C +++ b/src/bltGrMarkerOp.C @@ -108,14 +108,15 @@ static int CreateMarker(Graph* graphPtr, Tcl_Interp* interp, if (objc == 4) { offset = 4; str << "marker" << graphPtr->nextMarkerId_++ << ends; - name = str.str().c_str(); + name = dupstr(str.str().c_str()); } else { - name = Tcl_GetString(objv[4]); + name = dupstr(Tcl_GetString(objv[4])); if (name[0] == '-') { + delete [] name; offset = 4; str << "marker" << graphPtr->nextMarkerId_++ << ends; - name = str.str().c_str(); + name = dupstr(str.str().c_str()); } } @@ -152,9 +153,11 @@ static int CreateMarker(Graph* graphPtr, Tcl_Interp* interp, } // Unlike elements, new markers are drawn on top of old markers - markerPtr->link = Blt_Chain_Prepend(graphPtr->markers_.displayList, markerPtr); + markerPtr->link =Blt_Chain_Prepend(graphPtr->markers_.displayList, markerPtr); Tcl_SetStringObj(Tcl_GetObjResult(interp), name, -1); + + delete [] name; return TCL_OK; } -- cgit v0.12