From 4415b9fca5a03d8ae7f4a67bdd109ad87d95bf7d Mon Sep 17 00:00:00 2001 From: joye Date: Thu, 13 Mar 2014 22:08:18 +0000 Subject: *** empty log message *** --- src/bltConfig.C | 12 ++++++------ src/bltGrMarker.C | 23 +++++++++++------------ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/bltConfig.C b/src/bltConfig.C index 9ac7e2d..215a6ab 100644 --- a/src/bltConfig.C +++ b/src/bltConfig.C @@ -57,7 +57,7 @@ static int PointSetProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj** objPtr, char* widgRec, int offset, char* save, int flags) { - XPoint* pointPtr = (XPoint*)(widgRec+offset); + XPoint* pointPtr = (XPoint*)(widgRec + offset); int x, y; if (Blt_GetXY(interp, tkwin, Tcl_GetString(*objPtr), &x, &y) != TCL_OK) @@ -72,7 +72,7 @@ static int PointSetProc(ClientData clientData, Tcl_Interp *interp, static Tcl_Obj* PointGetProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset) { - XPoint* pointPtr = (XPoint*)(widgRec+offset); + XPoint* pointPtr = (XPoint*)(widgRec + offset); if ((pointPtr->x != -SHRT_MAX) && (pointPtr->y != -SHRT_MAX)) { char string[200]; @@ -95,7 +95,7 @@ static int DashesSetProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj** objPtr, char* widgRec, int offset, char* save, int flags) { - Blt_Dashes* dashesPtr = (Blt_Dashes*)(widgRec+offset); + Blt_Dashes* dashesPtr = (Blt_Dashes*)(widgRec + offset); int length; const char* string = Tcl_GetStringFromObj(*objPtr, &length); @@ -176,7 +176,7 @@ static int DashesSetProc(ClientData clientData, Tcl_Interp *interp, static Tcl_Obj* DashesGetProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset) { - Blt_Dashes* dashesPtr = (Blt_Dashes*)(widgRec+offset); + Blt_Dashes* dashesPtr = (Blt_Dashes*)(widgRec + offset); // count how many int cnt =0; @@ -207,7 +207,7 @@ static int ListSetProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj** objPtr, char* widgRec, int offset, char* save, int flags) { - const char*** listPtr = (const char***)(widgRec+offset); + const char*** listPtr = (const char***)(widgRec + offset); const char** argv; int argc; @@ -226,7 +226,7 @@ static int ListSetProc(ClientData clientData, Tcl_Interp *interp, static Tcl_Obj* ListGetProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset) { - const char*** listPtr = (const char***)(widgRec+offset); + const char*** listPtr = (const char***)(widgRec + offset); // count how many int cnt=0; diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C index bb21644..d4c18d3 100644 --- a/src/bltGrMarker.C +++ b/src/bltGrMarker.C @@ -76,10 +76,9 @@ extern "C" { static Tk_CustomOptionSetProc CoordsSetProc; static Tk_CustomOptionGetProc CoordsGetProc; -static Tk_CustomOptionFreeProc CoordsFreeProc; Tk_ObjCustomOption coordsObjOption = { - "coords", CoordsSetProc, CoordsGetProc, NULL, CoordsFreeProc, NULL + "coords", CoordsSetProc, CoordsGetProc, NULL, NULL, NULL }; static int CoordsSetProc(ClientData clientData, Tcl_Interp* interp, @@ -118,12 +117,6 @@ static Tcl_Obj* CoordsGetProc(ClientData clientData, Tk_Window tkwin, return listObjPtr; } -static void CoordsFreeProc(ClientData clientData, Tk_Window tkwin, char* ptr) -{ - int i =0; - i++; -} - static Tk_CustomOptionSetProc CapStyleSetProc; static Tk_CustomOptionGetProc CapStyleGetProc; Tk_ObjCustomOption capStyleObjOption = @@ -135,7 +128,7 @@ static int CapStyleSetProc(ClientData clientData, Tcl_Interp* interp, Tk_Window tkwin, Tcl_Obj** objPtr, char* widgRec, int offset, char* save, int flags) { - int* ptr = (int*)(widgRec+offset); + int* ptr = (int*)(widgRec + offset); Tk_Uid uid = Tk_GetUid(Tcl_GetString(*objPtr)); int cap; @@ -149,7 +142,7 @@ static int CapStyleSetProc(ClientData clientData, Tcl_Interp* interp, static Tcl_Obj* CapStyleGetProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset) { - int* ptr = (int*)(widgRec+offset); + int* ptr = (int*)(widgRec + offset); return Tcl_NewStringObj(Tk_NameOfCapStyle(*ptr), -1); } @@ -164,7 +157,7 @@ static int JoinStyleSetProc(ClientData clientData, Tcl_Interp* interp, Tk_Window tkwin, Tcl_Obj** objPtr, char* widgRec, int offset, char* save, int flags) { - int* ptr = (int*)(widgRec+offset); + int* ptr = (int*)(widgRec + offset); Tk_Uid uid = Tk_GetUid(Tcl_GetString(*objPtr)); int join; @@ -178,7 +171,7 @@ static int JoinStyleSetProc(ClientData clientData, Tcl_Interp* interp, static Tcl_Obj* JoinStyleGetProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset) { - int* ptr = (int*)(widgRec+offset); + int* ptr = (int*)(widgRec + offset); return Tcl_NewStringObj(Tk_NameOfJoinStyle(*ptr), -1); } @@ -275,6 +268,12 @@ static void DestroyMarker(Marker *markerPtr) if (markerPtr->link) Blt_Chain_DeleteLink(graphPtr->markers.displayList, markerPtr->link); + // if (markerPtr->axes) + // ReleaseAxis(markerPtr->axes); + + if (markerPtr->worldPts) + free(markerPtr->worldPts); + // will be freed via Tk_FreeConfigOptions // if (markerPtr->obj.name) // free((void*)(markerPtr->obj.name)); -- cgit v0.12