diff options
author | mi <mi@FreeBSD.org> | 2010-01-23 10:14:39 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2010-01-23 10:14:39 +0800 |
commit | 6f2b4462b71f63045753d68a80d8a931bcac32cf (patch) | |
tree | 0874e0880bf271ff7cd7020e30307889c8395128 | |
parent | fd92f597441730ec2eb783f2f47485f81539ddcc (diff) | |
download | freebsd-ports-graphics-6f2b4462b71f63045753d68a80d8a931bcac32cf.tar.gz freebsd-ports-graphics-6f2b4462b71f63045753d68a80d8a931bcac32cf.tar.zst freebsd-ports-graphics-6f2b4462b71f63045753d68a80d8a931bcac32cf.zip |
Add a forgotten new patch, that addresses compatibility with against
newer versions of Tcl (8.5+)
-rw-r--r-- | x11-toolkits/blt/files/patch-newertcl | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/x11-toolkits/blt/files/patch-newertcl b/x11-toolkits/blt/files/patch-newertcl new file mode 100644 index 00000000000..2d89ca77264 --- /dev/null +++ b/x11-toolkits/blt/files/patch-newertcl @@ -0,0 +1,146 @@ +--- src/bltNsUtil.h 2002-07-18 02:35:32.000000000 -0400 ++++ src/bltNsUtil.h 2010-01-16 11:39:20.000000000 -0500 +@@ -47,7 +47,8 @@ + #endif + +- ++#if TCL_MAJOR_VERSION < 8 || TCL_MINOR_VERSION < 5 + EXTERN Tcl_Command Tcl_FindCommand _ANSI_ARGS_((Tcl_Interp *interp, + char *name, Tcl_Namespace *nsPtr, int flags)); ++#endif + + #define NS_SEARCH_NONE (0) +@@ -64,15 +65,19 @@ + EXTERN Tcl_Namespace *Tcl_GetGlobalNamespace _ANSI_ARGS_((Tcl_Interp *interp)); + +-#if (TCL_MAJOR_VERSION >= 8) ++#if TCL_MAJOR_VERSION == 8 ++# if TCL_MINOR_VERSION < 5 + EXTERN Tcl_Namespace *Tcl_CreateNamespace _ANSI_ARGS_((Tcl_Interp *interp, +- char *name, ClientData clientData, Tcl_NamespaceDeleteProc *nsDelProc)); +- +-EXTERN void Tcl_DeleteNamespace _ANSI_ARGS_((Tcl_Namespace *nsPtr)); ++ const char *name, ClientData clientData, ++ Tcl_NamespaceDeleteProc *nsDelProc)); + + EXTERN Tcl_Namespace *Tcl_FindNamespace _ANSI_ARGS_((Tcl_Interp *interp, +- char *name, Tcl_Namespace *context, int flags)); ++ const char *name, Tcl_Namespace *context, int flags)); ++ ++EXTERN int Tcl_Export _ANSI_ARGS_((Tcl_Interp *interp, ++ Tcl_Namespace *nsPtr, ++ const char *pattern, int resetFlag)); ++# endif + +-EXTERN int Tcl_Export _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Namespace *nsPtr, +- char *name, int resetFlag)); ++EXTERN void Tcl_DeleteNamespace _ANSI_ARGS_((Tcl_Namespace *nsPtr)); + + EXTERN Tcl_Var Tcl_FindNamespaceVar _ANSI_ARGS_((Tcl_Interp *interp, char *name, +@@ -87,5 +92,5 @@ + Tcl_Interp *interp, CONST char *varName, int flags)); + +-#endif /* TCL_MAJOR_VERSION >= 8 */ ++#endif /* TCL_MAJOR_VERSION == 8 */ + + +--- src/bltCanvEps.c 2002-08-15 01:22:10.000000000 -0400 ++++ src/bltCanvEps.c 2010-01-16 23:36:39.000000000 -0500 +@@ -324,5 +324,5 @@ + int width, int height, int imgWidth, int imgHeight)); + static int EpsCoords _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, +- Tk_Item * itemPtr, int argc, char **argv)); ++ Tk_Item * itemPtr, int argc, Tcl_Obj * const objv[])); + static int EpsToArea _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item * itemPtr, + double *rectPtr)); +@@ -331,7 +331,7 @@ + static void ComputeEpsBbox _ANSI_ARGS_((Tk_Canvas canvas, EpsItem *imgPtr)); + static int ConfigureEps _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, +- Tk_Item * itemPtr, int argc, char **argv, int flags)); ++ Tk_Item * itemPtr, int argc, Tcl_Obj * const objv[], int flags)); + static int CreateEps _ANSI_ARGS_((Tcl_Interp *interp, Tk_Canvas canvas, +- struct Tk_Item * itemPtr, int argc, char **argv)); ++ struct Tk_Item * itemPtr, int argc, Tcl_Obj * const objv[])); + static void DeleteEps _ANSI_ARGS_((Tk_Canvas canvas, Tk_Item * itemPtr, + Display *display)); +@@ -916,5 +916,5 @@ + */ + static int +-CreateEps(interp, canvas, itemPtr, argc, argv) ++CreateEps(interp, canvas, itemPtr, argc, objv) + Tcl_Interp *interp; /* Interpreter for error reporting. */ + Tk_Canvas canvas; /* Canvas to hold new item. */ +@@ -922,5 +922,5 @@ + * has been initialized by caller. */ + int argc; /* Number of arguments in argv. */ +- char **argv; /* Arguments describing rectangle. */ ++ Tcl_Obj * const objv[]; /* Arguments describing rectangle. */ + { + EpsItem *epsPtr = (EpsItem *)itemPtr; +@@ -972,10 +972,9 @@ + * Process the arguments to fill in the item record. + */ +- +- if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &(epsPtr->x)) != TCL_OK) || +- (Tk_CanvasGetCoord(interp, canvas, argv[1], &(epsPtr->y)) != TCL_OK)) { ++ if ((Tk_CanvasGetCoord(interp, canvas, Tcl_GetString(objv[0]), &(epsPtr->x)) != TCL_OK) || ++ (Tk_CanvasGetCoord(interp, canvas, Tcl_GetString(objv[1]), &(epsPtr->y)) != TCL_OK)) { + return TCL_ERROR; + } +- if (ConfigureEps(interp, canvas, itemPtr, argc - 2, argv + 2, 0) ++ if (ConfigureEps(interp, canvas, itemPtr, argc - 2, objv + 2, 0) + != TCL_OK) { + DeleteEps(canvas, itemPtr, Tk_Display(tkwin)); +@@ -1039,10 +1038,10 @@ + */ + static int +-ConfigureEps(interp, canvas, itemPtr, argc, argv, flags) ++ConfigureEps(interp, canvas, itemPtr, argc, objv, flags) + Tcl_Interp *interp; /* Used for error reporting. */ + Tk_Canvas canvas; /* Canvas containing itemPtr. */ + Tk_Item *itemPtr; /* EPS item to reconfigure. */ + int argc; /* Number of elements in argv. */ +- char **argv; /* Arguments describing things to configure. */ ++ Tcl_Obj * const objv[]; /* Arguments describing things to configure. */ + int flags; /* Flags to pass to Tk_ConfigureWidget. */ + { +@@ -1053,4 +1052,9 @@ + GC newGC; + int width, height; ++ char *argv[argc]; ++ int i; ++ ++ for (i = 0; i < argc; i++) ++ argv[i] = Tcl_GetString(objv[i]); + + tkwin = Tk_CanvasTkwin(canvas); +@@ -1193,5 +1197,5 @@ + */ + static int +-EpsCoords(interp, canvas, itemPtr, argc, argv) ++EpsCoords(interp, canvas, itemPtr, argc, objv) + Tcl_Interp *interp; /* Used for error reporting. */ + Tk_Canvas canvas; /* Canvas containing item. */ +@@ -1200,5 +1204,5 @@ + int argc; /* Number of coordinates supplied in + * argv. */ +- char **argv; /* Array of coordinates: x1, y1, ++ Tcl_Obj * const objv[]; /* Array of coordinates: x1, y1, + * x2, y2, ... */ + { +@@ -1213,6 +1217,6 @@ + double x, y; /* Don't overwrite old coordinates on errors */ + +- if ((Tk_CanvasGetCoord(interp, canvas, argv[0], &x) != TCL_OK) || +- (Tk_CanvasGetCoord(interp, canvas, argv[1], &y) != TCL_OK)) { ++ if ((Tk_CanvasGetCoord(interp, canvas, Tcl_GetString(objv[0]), &x) != TCL_OK) || ++ (Tk_CanvasGetCoord(interp, canvas, Tcl_GetString(objv[1]), &y) != TCL_OK)) { + return TCL_ERROR; + } +@@ -1714,5 +1718,5 @@ + Tk_CreateItemType(&epsItemType); + /* Initialize custom canvas option routines. */ +- tagsOption.parseProc = Tk_CanvasTagsParseProc; ++ tagsOption.parseProc = (Tk_OptionParseProc *)Tk_CanvasTagsParseProc; + tagsOption.printProc = Tk_CanvasTagsPrintProc; + } |