diff options
author | hobbs <hobbs> | 1999-12-06 01:54:24 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 1999-12-06 01:54:24 (GMT) |
commit | 60c81a7684be2edbc5f8f8597580cf7ce7a89667 (patch) | |
tree | 7d837083d3a0f1c9dea806c17496065636843020 /generic/tkTest.c | |
parent | 0d13ab2ed97c0d1935e9a1601d45e4f1ccbbf318 (diff) | |
download | tk-60c81a7684be2edbc5f8f8597580cf7ce7a89667.zip tk-60c81a7684be2edbc5f8f8597580cf7ce7a89667.tar.gz tk-60c81a7684be2edbc5f8f8597580cf7ce7a89667.tar.bz2 |
objectified ImageCreate in tkTest.c
Diffstat (limited to 'generic/tkTest.c')
-rw-r--r-- | generic/tkTest.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c index 93965e5..fd68a32 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -13,11 +13,9 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTest.c,v 1.7 1999/10/29 03:57:57 hobbs Exp $ + * RCS: @(#) $Id: tkTest.c,v 1.8 1999/12/06 01:54:24 hobbs Exp $ */ -#define USE_OLD_IMAGE - #include "tkInt.h" #include "tkPort.h" #include "tkText.h" @@ -64,7 +62,7 @@ typedef struct TImageInstance { */ static int ImageCreate _ANSI_ARGS_((Tcl_Interp *interp, - char *name, int argc, char **argv, + char *name, int argc, Tcl_Obj *CONST objv[], Tk_ImageType *typePtr, Tk_ImageMaster master, ClientData *clientDataPtr)); static ClientData ImageGet _ANSI_ARGS_((Tk_Window tkwin, @@ -1559,12 +1557,12 @@ TestfontObjCmd(clientData, interp, objc, objv) /* ARGSUSED */ static int -ImageCreate(interp, name, argc, argv, typePtr, master, clientDataPtr) +ImageCreate(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 @@ -1577,18 +1575,18 @@ ImageCreate(interp, name, argc, argv, typePtr, master, clientDataPtr) int i; varName = "log"; - for (i = 0; i < argc; i += 2) { - if (strcmp(argv[i], "-variable") != 0) { - Tcl_AppendResult(interp, "bad option name \"", argv[i], - "\"", (char *) NULL); + for (i = 0; i < objc; i += 2) { + if (strcmp(Tcl_GetString(objv[i]), "-variable") != 0) { + Tcl_AppendResult(interp, "bad option name \"", + Tcl_GetString(objv[i]), "\"", (char *) NULL); return TCL_ERROR; } - if ((i+1) == argc) { - Tcl_AppendResult(interp, "no value given for \"", argv[i], - "\" option", (char *) NULL); + if ((i+1) == objc) { + Tcl_AppendResult(interp, "no value given for \"", + Tcl_GetString(objv[i]), "\" option", (char *) NULL); return TCL_ERROR; } - varName = argv[i+1]; + varName = Tcl_GetString(objv[i+1]); } timPtr = (TImageMaster *) ckalloc(sizeof(TImageMaster)); timPtr->master = master; |