1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00
freebsd-ports/x11-fm/tkdesk/files/patch-aj
Akinori MUSHA c98fc0d32d Update to use Tcl/Tk 8.2, itcl3.2 and the latest version of BLT.
Bump PORTREVISION.

PR:		30279
Submitted by:	Andy Sparrow <spadger@best.com> (MAINTAINER)
2001-09-03 18:17:47 +00:00

64 lines
2.1 KiB
Plaintext

--- libdesk/tixImgXpm.c.orig Sun Nov 14 16:07:47 1999
+++ libdesk/tixImgXpm.c Sun Sep 2 22:41:43 2001
@@ -156,7 +156,7 @@
*/
static int ImgXpmCreate _ANSI_ARGS_((Tcl_Interp *interp,
- char *name, int argc, char **argv,
+ char *name, int objc, Tcl_Obj *CONST objv[],
Tk_ImageType *typePtr, Tk_ImageMaster master,
ClientData *clientDataPtr));
static ClientData ImgXpmGet _ANSI_ARGS_((Tk_Window tkwin,
@@ -176,7 +176,7 @@
ImgXpmDisplay, /* displayProc */
ImgXpmFree, /* freeProc */
ImgXpmDelete, /* deleteProc */
- (Tk_ImageType *) NULL /* nextPtr */
+ /* (Tk_ImageType *) NULL *//* nextPtr */
};
/*
@@ -241,12 +241,12 @@
*----------------------------------------------------------------------
*/
static int
-ImgXpmCreate(interp, name, argc, argv, typePtr, master, clientDataPtr)
+ImgXpmCreate(interp, name, objc, objv, typePtr, master, clientDataPtr)
Tcl_Interp *interp; /* Interpreter for application containing
* image. */
char *name; /* Name to use for image. */
- int argc; /* Number of arguments. */
- char **argv; /* Argument strings for options (doesn't
+ int objc; /* Number of arguments. */
+ Tcl_Obj *CONST objv[]; /* Argument strings for options (doesn't
* include image name or type). */
Tk_ImageType *typePtr; /* Pointer to our type record (not used). */
Tk_ImageMaster master; /* Token for image, to be used by us in
@@ -256,6 +256,13 @@
{
PixmapMaster *masterPtr;
+ int i;
+ char **argv = (char **) Tcl_Alloc(objc * sizeof(char*));
+ for (i=0; i < objc; i++) {
+
+ argv[i] = Tcl_GetString(objv[i]);
+ }
+
masterPtr = (PixmapMaster *) ckalloc(sizeof(PixmapMaster));
masterPtr->tkMaster = master;
masterPtr->interp = interp;
@@ -269,10 +276,11 @@
masterPtr->isDataAlloced = 0;
masterPtr->instancePtr = NULL;
- if (ImgXpmConfigureMaster(masterPtr, argc, argv, 0) != TCL_OK) {
+ if (ImgXpmConfigureMaster(masterPtr, objc, argv, 0) != TCL_OK) {
ImgXpmDelete((ClientData) masterPtr);
return TCL_ERROR;
}
+ Tcl_Free((char *) argv);
*clientDataPtr = (ClientData) masterPtr;
return TCL_OK;
}