diff -u -r blt2.5_orig\demos\tour.tcl blt2.5\demos\tour.tcl --- blt2.5_orig\demos\tour.tcl Thu Dec 19 00:05:59 2013 +++ blt2.5\demos\tour.tcl Wed Dec 18 22:45:27 2013 @@ -1,6 +1,6 @@ #!/usr/bin/env wish -#package require BLT +package require BLT # -------------------------------------------------------------------------- # Starting with Tcl 8.x, the BLT commands are stored in their own # namespace called "blt". The idea is to prevent name clashes with diff -u -r blt2.5_orig\examples\calendar.tcl blt2.5\examples\calendar.tcl --- blt2.5_orig\examples\calendar.tcl Thu Dec 19 00:05:55 2013 +++ blt2.5\examples\calendar.tcl Wed Dec 18 23:08:56 2013 @@ -5,20 +5,20 @@ # -------------------------------------------------------------------------- # Starting with Tcl 8.x, the BLT commands are stored in their own # namespace called "blt". The idea is to prevent name clashes with -# Tcl commands and variables from other packages, such as a "table" +# Tcl commands and variables from other packages, such as a "blttable" # command in two different packages. # # You can access the BLT commands in a couple of ways. You can prefix # all the BLT commands with the namespace qualifier "blt::" # # blt::graph .g -# blt::table . .g -resize both +# blt::blttable . .g -resize both # # or you can import all the command into the global namespace. # # namespace import blt::* # graph .g -# table . .g -resize both +# blttable . .g -resize both # # -------------------------------------------------------------------------- @@ -94,20 +94,20 @@ label .calendar.month \ -text "[lindex $info 0] $year" \ -font { Courier 14 bold } - table .calendar .calendar.month 1,0 -cspan 7 -pady 10 + blttable .calendar .calendar.month 1,0 -cspan 7 -pady 10 set cnt 0 frame .calendar.weekframe -relief sunken -bd 1 - table .calendar .calendar.weekframe 2,0 -columnspan 7 -fill both + blttable .calendar .calendar.weekframe 2,0 -columnspan 7 -fill both foreach dayName $abbrDays { set name [string tolower $dayName] label .calendar.$name \ -text $dayName \ -font { Helvetica 12 } - table .calendar .calendar.$name 2,$cnt -pady 2 -padx 2 + blttable .calendar .calendar.$name 2,$cnt -pady 2 -padx 2 incr cnt } - table configure .calendar c* r2 -pad 4 + blttable configure .calendar c* r2 -pad 4 set week 0 set numDays [lindex $info 1] for { set cnt 1 } { $cnt <= $numDays } { incr cnt } { @@ -120,19 +120,19 @@ incr week set wkday 0 } - table .calendar .calendar.day${cnt} $week+3,$wkday \ + blttable .calendar .calendar.day${cnt} $week+3,$wkday \ -fill both -ipadx 10 -ipady 4 } frame .calendar.quit -bd 1 -relief sunken button .calendar.quit.button -command { exit } -text {Quit} -bd 2 - table .calendar.quit \ + blttable .calendar.quit \ .calendar.quit.button -padx 4 -pady 4 - table .calendar \ + blttable .calendar \ .calendar.quit $week+4,5 -cspan 2 -pady 4 - table . \ + blttable . \ .calendar -fill both - table configure .calendar r0 -resize none - table configure .calendar c0 c6 + blttable configure .calendar r0 -resize none + blttable configure .calendar c0 c6 } set date [clock format [clock seconds] -format {%a %b %d %Y}] diff -u -r blt2.5_orig\examples\form.tcl blt2.5\examples\form.tcl --- blt2.5_orig\examples\form.tcl Thu Dec 19 00:05:55 2013 +++ blt2.5\examples\form.tcl Wed Dec 18 23:08:49 2013 @@ -4,20 +4,20 @@ # -------------------------------------------------------------------------- # Starting with Tcl 8.x, the BLT commands are stored in their own # namespace called "blt". The idea is to prevent name clashes with -# Tcl commands and variables from other packages, such as a "table" +# Tcl commands and variables from other packages, such as a "blttable" # command in two different packages. # # You can access the BLT commands in a couple of ways. You can prefix # all the BLT commands with the namespace qualifier "blt::" # # blt::graph .g -# blt::table . .g -resize both +# blt::blttable . .g -resize both # # or you can import all the command into the global namespace. # # namespace import blt::* # graph .g -# table . .g -resize both +# blttable . .g -resize both # # -------------------------------------------------------------------------- if { $tcl_version >= 8.0 } { @@ -846,7 +846,7 @@ busy hold . .status_label configure -text "Searching..." global topLevel - table $topLevel .cancel_button 18,8 -anchor e -reqwidth .70i + blttable $topLevel .cancel_button 18,8 -anchor e -reqwidth .70i winop raise .cancel_button .quit_button configure -state disabled .clear_button configure -state disabled @@ -857,7 +857,7 @@ update } off { - table forget .cancel_button + blttable forget .cancel_button .quit_button configure -state normal .clear_button configure -state normal .trademark configure -bitmap attlogo @@ -927,7 +927,7 @@ text .text -yscrollcommand { .vscroll set } -state disabled scrollbar .vscroll -command { .text yview } -table $topLevel \ +blttable $topLevel \ .overall_label 0,1 -cspan 10 -pady 5 \ .name_label 1,2 \ .last_entry 2,2 -cspan 2 \ @@ -976,28 +976,28 @@ .clear_button 18,5 -reqwidth .9i -anchor center \ .quit_button 18,8 -reqwidth .9i -anchor center -eval table configure $topLevel \ +eval blttable configure $topLevel \ [info command .*_label] [info commands .*_title] \ -anchor w -padx 2 -ipadx 2 -eval table configure $topLevel [info command .*_entry] \ +eval blttable configure $topLevel [info command .*_entry] \ -fill both -padx 2 -eval table configure $topLevel .name_label .tel_label .org_title \ +eval blttable configure $topLevel .name_label .tel_label .org_title \ .com_label .addr_label .street_entry .street_label \ -cspan 3 -eval table configure $topLevel .last_entry .ema_entry .city_entry \ +eval blttable configure $topLevel .last_entry .ema_entry .city_entry \ .ema_label .city_label -cspan 2 -table configure $topLevel .overall_label -anchor center -table configure $topLevel r16 -pady { 5 5 } -resize both -table configure $topLevel c0 -width .vscroll -table configure $topLevel c0 c10 -resize none -table configure $topLevel r3 r6 r10 r12 -resize none -table configure $topLevel r17 -height { 40 {} } -table configure $topLevel r16 r18 -resize none -table configure $topLevel c6 -pad { 5 5 } +blttable configure $topLevel .overall_label -anchor center +blttable configure $topLevel r16 -pady { 5 5 } -resize both +blttable configure $topLevel c0 -width .vscroll +blttable configure $topLevel c0 c10 -resize none +blttable configure $topLevel r3 r6 r10 r12 -resize none +blttable configure $topLevel r17 -height { 40 {} } +blttable configure $topLevel r16 r18 -resize none +blttable configure $topLevel c6 -pad { 5 5 } if { $topLevel == ".frame" } { - table . \ + blttable . \ $topLevel 0,0 -fill both } diff -u -r blt2.5_orig\examples\pareto.tcl blt2.5\examples\pareto.tcl --- blt2.5_orig\examples\pareto.tcl Thu Dec 19 00:05:55 2013 +++ blt2.5\examples\pareto.tcl Wed Dec 18 23:09:34 2013 @@ -5,20 +5,20 @@ # -------------------------------------------------------------------------- # Starting with Tcl 8.x, the BLT commands are stored in their own # namespace called "blt". The idea is to prevent name clashes with -# Tcl commands and variables from other packages, such as a "table" +# Tcl commands and variables from other packages, such as a "blttable" # command in two different packages. # # You can access the BLT commands in a couple of ways. You can prefix # all the BLT commands with the namespace qualifier "blt::" # # blt::graph .g -# blt::table . .g -resize both +# blt::blttable . .g -resize both # # or you can import all the command into the global namespace. # # namespace import blt::* # graph .g -# table . .g -resize both +# blttable . .g -resize both # # -------------------------------------------------------------------------- @@ -40,7 +40,7 @@ -plotpady { 12 4 } \ -width 6i \ -height 5i -table . .b -fill both +blttable . .b -fill both set data { "Spot Weld" 82 yellow diff -u -r blt2.5_orig\generic\bltArrayObj.c blt2.5\generic\bltArrayObj.c --- blt2.5_orig\generic\bltArrayObj.c Thu Dec 19 00:05:58 2013 +++ blt2.5\generic\bltArrayObj.c Wed Dec 18 19:14:53 2013 @@ -69,6 +69,7 @@ } if (nElem%2) { if (interp != NULL) { + string = Tcl_GetString(objPtr); Tcl_AppendResult(interp, "odd length: ", string, 0); } return TCL_ERROR; diff -u -r blt2.5_orig\generic\bltBgexec.c blt2.5\generic\bltBgexec.c --- blt2.5_orig\generic\bltBgexec.c Thu Dec 19 00:05:56 2013 +++ blt2.5\generic\bltBgexec.c Wed Dec 18 19:11:51 2013 @@ -2140,11 +2140,12 @@ static int -KillCmd(clientData, interp, argc, argv) - ClientData clientData; /* Thread-specific data. */ - Tcl_Interp *interp; /* Current interpreter. */ - int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ +KillCmd( + ClientData clientData, /* Thread-specific data. */ + Tcl_Interp *interp, /* Current interpreter. */ + int argc, /* Number of arguments. */ + char **argv /* Argument strings. */ +) { char *string; int signalNum = SIGKILL; diff -u -r blt2.5_orig\generic\bltConfig.c blt2.5\generic\bltConfig.c --- blt2.5_orig\generic\bltConfig.c Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\bltConfig.c Wed Aug 20 07:20:38 2014 @@ -1461,6 +1461,7 @@ return Blt_NameOfTile(tile); } + /* *---------------------------------------------------------------------- * @@ -1545,7 +1546,7 @@ Tk_Window tkwin; int result; char *tempName; - char *oldClass; + CONST char *oldClass; int isTemporary = FALSE; tempName = Blt_Strdup(resName); diff -u -r blt2.5_orig\generic\bltGraph.c blt2.5\generic\bltGraph.c --- blt2.5_orig\generic\bltGraph.c Thu Dec 19 00:05:58 2013 +++ blt2.5\generic\bltGraph.c Wed Aug 20 07:20:57 2014 @@ -67,6 +67,16 @@ extern Tk_CustomOption bltTileOption; extern Tk_CustomOption bltShadowOption; +static int StringToMarkerClippingArea _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, + Tk_Window tkwin, char *value, char *widgRec, int flags)); +static char *MarkerClippingAreaToString _ANSI_ARGS_((ClientData clientData, Tk_Window tkwin, + char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)); + +Tk_CustomOption bltMarkerClippingAreaOption = +{ + StringToMarkerClippingArea, MarkerClippingAreaToString, (ClientData)0 +}; + #define DEF_GRAPH_ASPECT_RATIO "0.0" #define DEF_GRAPH_BAR_BASELINE "0.0" #define DEF_GRAPH_BAR_MODE "normal" @@ -107,6 +117,7 @@ #define DEF_GRAPH_WIDTH "5i" #define DEF_GRAPH_DATA (char *)NULL #define DEF_GRAPH_DATA_COMMAND (char *)NULL +#define DEF_GRAPH_MARKER_CLIPPING_AREA "plot" static Tk_ConfigSpec configSpecs[] = { @@ -247,6 +258,9 @@ {TK_CONFIG_CUSTOM, "-width", "width", "Width", DEF_GRAPH_WIDTH, Tk_Offset(Graph, reqWidth), 0, &bltDistanceOption}, + {TK_CONFIG_CUSTOM, "-markerclippingarea", "markerclippingarea", "MarkerClippingArea", + DEF_GRAPH_MARKER_CLIPPING_AREA, Tk_Offset(Graph, markerClipArea), + 0, &bltMarkerClippingAreaOption}, {TK_CONFIG_END, NULL, NULL, NULL, NULL, 0, 0} }; @@ -2233,11 +2247,18 @@ DrawPlotRegion(graphPtr, drawable); } - /* Draw markers above elements */ + /* Draw margins before markers when MARKERCLIPPINGAREA_GRAPH. */ + if (graphPtr->markerClipArea == MARKERCLIPPINGAREA_GRAPH && + (graphPtr->flags & DRAW_MARGINS)) { + DrawMargins(graphPtr, drawable); + } + + /* Draw markers above elements */ Blt_DrawMarkers(graphPtr, drawable, MARKER_ABOVE); Blt_DrawActiveElements(graphPtr, drawable); - if (graphPtr->flags & DRAW_MARGINS) { + if (graphPtr->markerClipArea == MARKERCLIPPINGAREA_PLOT && + (graphPtr->flags & DRAW_MARGINS)) { DrawMargins(graphPtr, drawable); } if (graphPtr->gridPtr->hidden == 0 && graphPtr->gridPtr->raised) { @@ -2461,3 +2482,75 @@ } return 0; } + +/* + *---------------------------------------------------------------------- + * + * StringToMarkerClippingArea -- + * + * Converts. + * + *---------------------------------------------------------------------- + */ +/*ARGSUSED*/ +static int +StringToMarkerClippingArea(clientData, interp, tkwin, string, widgRec, offset) + ClientData clientData; /* Not used. */ + Tcl_Interp *interp; /* Interpreter to send results back to */ + Tk_Window tkwin; /* Not used. */ + char *string; /* Name of style */ + char *widgRec; /* Widget structure record */ + int offset; /* Offset of style in record */ +{ + Blt_MarkerClippingArea *mcaPtr = (Blt_MarkerClippingArea *)(widgRec + offset); + unsigned int length; + char c; + + c = string[0]; + length = strlen(string); + if ((c == 'p') && (strncmp(string, "plot", length) == 0)) { + *mcaPtr = MARKERCLIPPINGAREA_PLOT; + } else if ((c == 'g') && (strncmp(string, "graph", length) == 0)) { + *mcaPtr = MARKERCLIPPINGAREA_GRAPH; + } else { + Tcl_AppendResult(interp, "bad mode argument \"", string, + "\": should be \"plot\" or \"graph\"", + (char *)NULL); + return TCL_ERROR; + } + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * MarkerClippingAreaToString -- + * + * Returns the name of the tile. + * + * Results: + * The name of the tile is returned. + * + *---------------------------------------------------------------------- + */ +/*ARGSUSED*/ +static char * +MarkerClippingAreaToString(clientData, tkwin, widgRec, offset, freeProcPtr) + ClientData clientData; /* Not used. */ + Tk_Window tkwin; /* Not used. */ + char *widgRec; /* Widget structure record */ + int offset; /* Offset of tile in record */ + Tcl_FreeProc **freeProcPtr; /* Not used. */ +{ + Blt_MarkerClippingArea mode = *(Blt_MarkerClippingArea *)(widgRec + offset); + switch (mode){ + case MARKERCLIPPINGAREA_PLOT: + return "plot"; + case MARKERCLIPPINGAREA_GRAPH: + return "graph"; + default: + return "unknown value"; + } +} + + diff -u -r blt2.5_orig\generic\bltGraph.h blt2.5\generic\bltGraph.h --- blt2.5_orig\generic\bltGraph.h Thu Dec 19 00:05:56 2013 +++ blt2.5\generic\bltGraph.h Wed Aug 20 07:15:20 2014 @@ -318,6 +318,18 @@ /* * ------------------------------------------------------------------- * + * MarkerClippingArea -- + * + * ------------------------------------------------------------------- + */ +typedef enum { + MARKERCLIPPINGAREA_PLOT, + MARKERCLIPPINGAREA_GRAPH +} Blt_MarkerClippingArea; + +/* + * ------------------------------------------------------------------- + * * Graph -- * * Top level structure containing everything pertaining to @@ -486,6 +498,7 @@ See the movie.tcl example. */ + Blt_MarkerClippingArea markerClipArea; /* Marker clipping area */ }; diff -u -r blt2.5_orig\generic\bltGrLegd.c blt2.5\generic\bltGrLegd.c --- blt2.5_orig\generic\bltGrLegd.c Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\bltGrLegd.c Sat Sep 13 14:57:20 2014 @@ -890,9 +890,14 @@ } (*elemPtr->procsPtr->drawSymbolProc) (graphPtr, pixmap, elemPtr, x + symbolX, y + symbolY, symbolSize); - Blt_DrawText(legendPtr->tkwin, pixmap, elemPtr->label, - &legendPtr->style, x + labelX, - y + legendPtr->entryBorderWidth + legendPtr->ipadY.side1); + // save width and height for overwritten by Blt_DrawText. + { + int width = legendPtr->style.width, height = legendPtr->style.height; + Blt_DrawText(legendPtr->tkwin, pixmap, elemPtr->label, + &legendPtr->style, x + labelX, + y + legendPtr->entryBorderWidth + legendPtr->ipadY.side1); + legendPtr->style.width = width, legendPtr->style.height = height; + } count++; /* Check when to move to the next column */ diff -u -r blt2.5_orig\generic\bltGrMarker.c blt2.5\generic\bltGrMarker.c --- blt2.5_orig\generic\bltGrMarker.c Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\bltGrMarker.c Thu Aug 21 07:00:15 2014 @@ -1070,22 +1070,27 @@ Graph *graphPtr; Extents2D *extsPtr; { - /*if(extsPtr->right >= extsPtr->left || extsPtr->bottom >= extsPtr->top || - graphPtr->right >= graphPtr->left || graphPtr->bottom >= graphPtr->top)*/ - if(extsPtr->right <= extsPtr->left || extsPtr->bottom <= extsPtr->top || - graphPtr->right <= graphPtr->left || graphPtr->bottom <= graphPtr->top) - { - return 1; - } - assert(extsPtr->right >= extsPtr->left); - assert(extsPtr->bottom >= extsPtr->top); - assert(graphPtr->right >= graphPtr->left); - assert(graphPtr->bottom >= graphPtr->top); + if (graphPtr->markerClipArea == MARKERCLIPPINGAREA_PLOT){ + /*if(extsPtr->right >= extsPtr->left || extsPtr->bottom >= extsPtr->top || + graphPtr->right >= graphPtr->left || graphPtr->bottom >= graphPtr->top)*/ + if(extsPtr->right <= extsPtr->left || extsPtr->bottom <= extsPtr->top || + graphPtr->right <= graphPtr->left || graphPtr->bottom <= graphPtr->top) + { + return 1; + } + assert(extsPtr->right >= extsPtr->left); + assert(extsPtr->bottom >= extsPtr->top); + assert(graphPtr->right >= graphPtr->left); + assert(graphPtr->bottom >= graphPtr->top); - return (((double)graphPtr->right < extsPtr->left) || - ((double)graphPtr->bottom < extsPtr->top) || - (extsPtr->right < (double)graphPtr->left) || - (extsPtr->bottom < (double)graphPtr->top)); + return (((double)graphPtr->right < extsPtr->left) || + ((double)graphPtr->bottom < extsPtr->top) || + (extsPtr->right < (double)graphPtr->left) || + (extsPtr->bottom < (double)graphPtr->top)); + } else { + return (((double)graphPtr->width < extsPtr->left) || + ((double)graphPtr->height < extsPtr->top) || (extsPtr->right < 0.0) || (extsPtr->bottom < 0.0)); + } } diff -u -r blt2.5_orig\generic\bltGrMisc.c blt2.5\generic\bltGrMisc.c --- blt2.5_orig\generic\bltGrMisc.c Thu Dec 19 00:05:58 2013 +++ blt2.5\generic\bltGrMisc.c Tue Aug 19 07:15:43 2014 @@ -497,12 +497,21 @@ Graph *graphPtr; Extents2D *extsPtr; { - extsPtr->left = (double)(graphPtr->hOffset - graphPtr->padX.side1); - extsPtr->top = (double)(graphPtr->vOffset - graphPtr->padY.side1); - extsPtr->right = (double)(graphPtr->hOffset + graphPtr->hRange + - graphPtr->padX.side2); - extsPtr->bottom = (double)(graphPtr->vOffset + graphPtr->vRange + - graphPtr->padY.side2); + if (graphPtr->markerClipArea == MARKERCLIPPINGAREA_PLOT) + { + extsPtr->left = (double)(graphPtr->hOffset - graphPtr->padX.side1); + extsPtr->top = (double)(graphPtr->vOffset - graphPtr->padY.side1); + extsPtr->right = (double)(graphPtr->hOffset + graphPtr->hRange + + graphPtr->padX.side2); + extsPtr->bottom = (double)(graphPtr->vOffset + graphPtr->vRange + + graphPtr->padY.side2); + } else if (graphPtr->markerClipArea == MARKERCLIPPINGAREA_GRAPH) + { + extsPtr->left = 0; + extsPtr->top = 0; + extsPtr->right = graphPtr->width; + extsPtr->bottom = graphPtr->height; + } } static int Only in blt2.5\generic: bltHash.h diff -u -r blt2.5_orig\generic\bltInit.c blt2.5\generic\bltInit.c --- blt2.5_orig\generic\bltInit.c Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\bltInit.c Wed Dec 18 22:18:52 2013 @@ -244,6 +244,7 @@ * *---------------------------------------------------------------------- */ +#ifndef STATIC_BUILD BOOL APIENTRY DllMain( HINSTANCE hInst, /* Library instance handle. */ @@ -253,7 +254,6 @@ return TRUE; } -#ifndef STATIC_BUILD BOOL APIENTRY DllEntryPoint(hInst, reason, reserved) HINSTANCE hInst; /* Library instance handle. */ diff -u -r blt2.5_orig\generic\bltNsUtil.c blt2.5\generic\bltNsUtil.c --- blt2.5_orig\generic\bltNsUtil.c Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\bltNsUtil.c Wed Dec 18 19:10:28 2013 @@ -28,6 +28,10 @@ #include "bltInt.h" #include "bltList.h" +EXTERN Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp, + CONST char *name, + Tcl_Namespace *contextNsPtr, int flags); + /* Namespace related routines */ /* @@ -64,7 +68,7 @@ Tcl_Obj *objPtr; char *str, *cp; - varPtr = Tcl_FindNamespaceVar(interp, (char *)name, + varPtr = Tcl_FindNamespaceVar(interp, name, (Tcl_Namespace *)NULL, 0); if (varPtr == NULL) { return NULL; @@ -72,7 +76,7 @@ objPtr = Tcl_NewObj(); Tcl_GetVariableFullName(interp, varPtr, objPtr); str = Tcl_GetString(objPtr); - if (Blt_ParseQualifiedName(interp, str, &nsPtr, &cp) == NULL) { + if (Blt_ParseQualifiedName(interp, str, &nsPtr, &cp) == 0) { nsPtr = NULL; } Tcl_DecrRefCount(objPtr); diff -u -r blt2.5_orig\generic\bltTreeViewColumn.c blt2.5\generic\bltTreeViewColumn.c --- blt2.5_orig\generic\bltTreeViewColumn.c Thu Dec 19 00:05:58 2013 +++ blt2.5\generic\bltTreeViewColumn.c Wed Dec 18 17:20:51 2013 @@ -3009,11 +3009,12 @@ { TreeView *tvPtr = treeViewInstance; TreeViewEntry *e1Ptr, *e2Ptr; + TreeViewColumn *columnPtr; e1Ptr = Blt_NodeToEntry(tvPtr, *n1Ptr); e2Ptr = Blt_NodeToEntry(tvPtr, *n2Ptr); - TreeViewColumn *columnPtr = tvPtr->sortColumnPtr; + columnPtr = tvPtr->sortColumnPtr; /* Fetch the data for sorting. */ if (tvPtr->sortType == SORT_TYPE_COMMAND) { diff -u -r blt2.5_orig\generic\bltVector.c blt2.5\generic\bltVector.c --- blt2.5_orig\generic\bltVector.c Thu Dec 19 00:05:56 2013 +++ blt2.5\generic\bltVector.c Wed Dec 18 19:20:46 2013 @@ -248,10 +248,10 @@ * ---------------------------------------------------------------------- */ int -Blt_VectorGetIndex(interp, vPtr, string, indexPtr, flags, procPtrPtr) +Blt_VectorGetIndex(interp, vPtr, string_, indexPtr, flags, procPtrPtr) Tcl_Interp *interp; VectorObject *vPtr; - CONST char *string; + CONST char *string_; int *indexPtr; int flags; Blt_VectorIndexProc **procPtrPtr; @@ -260,15 +260,16 @@ int value = -1, value2 = -1, sz, result = TCL_OK; char *comma, *zBuf; char zStatic[201]; - + char *string; + /* Need a static copy of index. */ - sz = strlen(string); + sz = strlen(string_); if (sz>=200) { zBuf = Blt_Malloc(sz+1); - strcpy(zBuf, string); + strcpy(zBuf, string_); string = zBuf; } else { - strcpy(zStatic, string); + strcpy(zStatic, string_); string = zStatic; } @@ -2072,11 +2073,12 @@ static int nCmdOps = sizeof(vectorCmdOps) / sizeof(Blt_OpSpec); static int -VectorObjCmd(clientData, interp, objc, objv) - ClientData clientData; /* Interpreter-specific data. */ - Tcl_Interp *interp; - int objc; - Tcl_Obj *CONST *objv; +VectorObjCmd( + ClientData clientData, /* Interpreter-specific data. */ + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST *objv +) { Blt_Op proc; VectorInterpData *dataPtr = clientData; diff -u -r blt2.5_orig\generic\bltWin.h blt2.5\generic\bltWin.h --- blt2.5_orig\generic\bltWin.h Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\bltWin.h Sun Dec 22 23:05:15 2013 @@ -151,6 +151,9 @@ #define XFillPolygon Blt_EmulateXFillPolygon #define XFillRectangle Blt_EmulateXFillRectangle #define XFillRectangles Blt_EmulateXFillRectangles +#ifdef XFree +#undef XFree +#endif #define XFree Blt_EmulateXFree #define XGetWindowAttributes Blt_EmulateXGetWindowAttributes #define XLowerWindow Blt_EmulateXLowerWindow diff -u -r blt2.5_orig\generic\Makefile.vc blt2.5\generic\Makefile.vc --- blt2.5_orig\generic\Makefile.vc Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\Makefile.vc Wed Dec 18 16:09:07 2013 @@ -3,16 +3,16 @@ # Makefile for BLT library using VC++. # ------------------------------------------------------------------------ -include e:/src/blt/win/makedefs +include d:/src/blt/win/makedefs TOOLS32 = c:/Program\ Files/Microsoft\ Visual\ Studio/Vc98 -AR = lib.exe -link50compat +AR = lib.exe LD = link.exe CC = cl.exe rc32 = rc.exe ifeq ($(WITH_JPEG),0) -EXTRA_DEFINES = +EXTRA_DEFINES = endif ifeq ($(WITH_JPEG),1) EXTRA_DEFINES = -DHAVE_JPEGLIB_H=1 @@ -35,7 +35,7 @@ $(DEBUG_DEFINES) $(SHLIB_DEFINES) $(EXTRA_DEFINES) ifeq ($(SHARED),1) -SHLIB_DEFINES = -D_DLL +SHLIB_DEFINES = SHLIB_TARGET = build-dll LIBS = $(COMMON_LIBS) else @@ -44,18 +44,16 @@ endif ifeq ($(DEBUG),1) -CFLAGS = -Z7 -Od -DEBUG_LDFLAGS = -debug:full -debugtype:cv +CFLAGS = -MT -ZI -Od -wd4996 +DEBUG_LDFLAGS = /debug DEBUG_DEFINES = -DUSE_TCLALLOC=0 -TK_LIB = $(TKDIR)/win/Debug/tk$(v2)d.lib -TCL_LIB = $(TCLDIR)/win/Debug/tcl$(v2)d.lib -MSVCRT = msvcrtd.lib +TK_LIB = $(TKDIR)/win/Debug_$(VCVER)/tk$(v2)tg.lib +TCL_LIB = $(TCLDIR)/win/Debug_$(VCVER)/tcl$(v2)tg.lib else -CFLAGS = -Ox -GB -GD -DEBUG_LDFLAGS = -debug:full -debugtype:cv -TK_LIB = $(TKDIR)/win/Release/tk$(v2).lib -TCL_LIB = $(TCLDIR)/win/Release/tcl$(v2).lib -MSVCRT = msvcrt.lib +CFLAGS = -MT -Ox -wd4996 -DNDEBUG +DEBUG_LDFLAGS = +TK_LIB = $(TKDIR)/win/Release_$(VCVER)/tk$(v2)t.lib +TCL_LIB = $(TCLDIR)/win/Release_$(VCVER)/tcl$(v2)t.lib endif EXTRA_CFLAGS = -nologo -W3 @@ -64,9 +62,7 @@ # Linker flags and options # ------------------------------------------------------------------------ -COMMON_LDFLAGS = -nodefaultlib -release -nologo -warn:3 \ - -machine:IX86 -align:0x1000 \ - $(DEBUG_LDFLAGS) +COMMON_LDFLAGS = -release -nologo $(DEBUG_LDFLAGS) DLLENTRY = @12 SHLIB_LDFLAGS = $(COMMON_LDFLAGS) \ @@ -78,7 +74,6 @@ -fixed:NO -stack:2300000 COMMON_LIBS = $(TK_LIB) $(TCL_LIB) \ - $(MSVCRT) \ kernel32.lib user32.lib EXTRA_LIBS = $(OLELIB) \ @@ -89,7 +84,7 @@ winspool.lib \ comdlg32.lib -TCL_ONLY_LIBS = $(TCL_LIB) $(MSVCRT) kernel32.lib user32.lib advapi32.lib +TCL_ONLY_LIBS = $(TCL_LIB) kernel32.lib user32.lib advapi32.lib # ------------------------------------------------------------------------ @@ -235,7 +230,6 @@ $(RM) $(bltwish) $(CC) -c $(CC_SWITCHES) -DTCLLIBPATH=\"$(TCLLIBPATH)\" \ -FobltWinMain.o $(srcdir)/bltWinMain.c - LIB=$(TOOLS32)/lib \ $(LD) $(LDFLAGS) tkConsole.o bltWinMain.o -out:$(bltwish) \ $(lib_a) $(LIBS) @@ -244,7 +238,6 @@ $(CC) -c $(CC_SWITCHES) -DTCL_ONLY \ -DTCLLIBPATH=\"$(TCLLIBPATH)\" \ -FobltWinMain.o $(srcdir)/bltWinMain.c - LIB=$(TOOLS32)/lib \ $(LD) $(LDFLAGS) bltWinMain.o -out:$(bltsh) \ $(tcl_only_lib_a) $(TCL_ONLY_LIBS) @@ -260,7 +253,6 @@ $(CC) -c $(CC_SWITCHES) -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \ -FobltInit.o $(srcdir)/bltInit.c $(RM) $@ - LIB=$(TOOLS32)/lib \ $(LD) $(SHLIB_LDFLAGS) -out:$@ bltInit.o $(OBJS) $(SHLIB_LD_LIBS) $(tcl_only_lib_a): bltHash.h $(TCL_ONLY_OBJS) bltInit.c @@ -275,16 +267,15 @@ $(CC) -c $(CC_SWITCHES) -DTCL_ONLY -DBLT_LIBRARY=\"$(BLT_LIBRARY)\" \ -FobltInit.o $(srcdir)/bltInit.c $(RM) $@ - LIB=$(TOOLS32)/lib \ $(LD) $(SHLIB_LDFLAGS) -out:$@ bltInit.o $(TCL_ONLY_OBJS) \ $(TCL_ONLY_LIBS) bltHash.h: bltHash.h.in - sed -e 's/@SIZEOF_VOID_P@/4/' \ - -e 's/@SIZEOF_INT@/4/' \ - -e 's/@SIZEOF_LONG@/4/' \ - -e 's/@SIZEOF_LONG_LONG@/8/' \ - -e 's/@HAVE_INTTYPES_H@/0/' \ + sed -e "s/@SIZEOF_VOID_P@/4/" \ + -e "s/@SIZEOF_INT@/4/" \ + -e "s/@SIZEOF_LONG@/4/" \ + -e "s/@SIZEOF_LONG_LONG@/8/" \ + -e "s/@HAVE_INTTYPES_H@/0/" \ bltHash.h.in > bltHash.h install-dirs: diff -u -r blt2.5_orig\generic\tkButton.c blt2.5\generic\tkButton.c --- blt2.5_orig\generic\tkButton.c Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\tkButton.c Wed Dec 18 18:22:12 2013 @@ -898,7 +898,7 @@ StringToIcons( ClientData clientData, Tcl_Interp *interp, Tk_Window parent, char *string, char *widgRec, int offset) { - Button *butPtr = (Button*)widgRec;; + Button *butPtr = (Button*)widgRec; int argc = 0; int result, i; char **argv; @@ -1031,6 +1031,16 @@ *-------------------------------------------------------------- */ +static int FrameCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); +static int MenubuttonCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); +static int BFrameCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); +static int BButtonCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); +static int BCheckbuttonCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); +static int BRadiobuttonCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); +static int BLabelCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); +static int BMenubuttonCmd(ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]); + + static int ButtonCmd(clientData, interp, argc, argv) ClientData clientData; /* Main window associated with @@ -1070,7 +1080,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_FRAME+BBOFS); } @@ -1081,7 +1091,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_FRAME); } @@ -1092,7 +1102,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_MENU_BUTTON); } @@ -1113,7 +1123,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_BUTTON+BBOFS); } @@ -1124,7 +1134,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_CHECK_BUTTON+BBOFS); } @@ -1135,7 +1145,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_LABEL+BBOFS); } @@ -1146,7 +1156,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_MENU_BUTTON+BBOFS); } @@ -1157,7 +1167,7 @@ * interpreter. */ Tcl_Interp *interp; /* Current interpreter. */ int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + CONST84 char *argv[]; /* Argument strings. */ { return ButtonCreate(clientData, interp, argc, argv, TYPE_RADIO_BUTTON+BBOFS); } @@ -1316,7 +1326,7 @@ return TCL_OK; } -static char *ButtonGetValue(Button *butPtr) { +static CONST char *ButtonGetValue(Button *butPtr) { Blt_TreeNode nodePtr; Tcl_Obj *valuePtr; CONST char *value; @@ -2873,7 +2883,7 @@ if (butPtr->type == TYPE_CHECK_BUTTON && butPtr->tristateValue && butPtr->selVarName) { - char *value; + CONST char *value; value = ButtonGetValue(butPtr); diff -u -r blt2.5_orig\generic\tkScrollbar.c blt2.5\generic\tkScrollbar.c --- blt2.5_orig\generic\tkScrollbar.c Thu Dec 19 00:05:57 2013 +++ blt2.5\generic\tkScrollbar.c Wed Dec 18 19:15:53 2013 @@ -261,7 +261,7 @@ "HighlightThickness", DEF_SCROLLBAR_HIGHLIGHT_WIDTH, Tk_Offset(Scrollbar, highlightWidth), 0}, {TK_CONFIG_STRING, "-image", "image", "Image", - NULL, Tk_Offset(TkScrollbar, imagePtr), 0}, + NULL, Tk_Offset(Scrollbar, imagePtr), 0}, {TK_CONFIG_BOOLEAN, "-jump", "jump", "Jump", DEF_SCROLLBAR_JUMP, Tk_Offset(Scrollbar, jump), 0}, {TK_CONFIG_UID, "-orient", "orient", "Orient", @@ -425,23 +425,25 @@ } static int -BScrollbarCmd(clientData, interp, argc, argv) - ClientData clientData; /* Main window associated with +BScrollbarCmd( + ClientData clientData, /* Main window associated with * interpreter. */ - Tcl_Interp *interp; /* Current interpreter. */ - int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + Tcl_Interp *interp, /* Current interpreter. */ + int argc, /* Number of arguments. */ + CONST84 char *argv[] /* Argument strings. */ +) { return scrollbarCmd(clientData, interp, argc, argv, 1); } static int -ScrollbarCmd(clientData, interp, argc, argv) - ClientData clientData; /* Main window associated with +ScrollbarCmd( + ClientData clientData, /* Main window associated with * interpreter. */ - Tcl_Interp *interp; /* Current interpreter. */ - int argc; /* Number of arguments. */ - char **argv; /* Argument strings. */ + Tcl_Interp *interp, /* Current interpreter. */ + int argc, /* Number of arguments. */ + CONST84 char *argv[] /* Argument strings. */ +) { return scrollbarCmd(clientData, interp, argc, argv, 0); } @@ -806,9 +808,10 @@ */ /*ARGSUSED*/ static void -TileChangedProc(clientData, tile) - ClientData clientData; - Blt_Tile tile; /* Not used. */ +TileChangedProc( + ClientData clientData, + Blt_Tile tile /* Not used. */ +) { Scrollbar *scrollPtr = clientData; @@ -844,12 +847,12 @@ * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkScrollbar *scrollPtr = (TkScrollbar *) clientData; + register Scrollbar *scrollPtr = (Scrollbar *) clientData; if (scrollPtr->tkwin != NULL) { ComputeScrollbarGeometry(scrollPtr); if (Tk_IsMapped(scrollPtr->tkwin) && !(scrollPtr->flags & REDRAW_PENDING)) { - Tcl_DoWhenIdle(TkpDisplayScrollbar, (ClientData) scrollPtr); + Tcl_DoWhenIdle(DisplayScrollbar, (ClientData) scrollPtr); scrollPtr->flags |= REDRAW_PENDING; } }