summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2013-01-24 22:23:54 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2013-01-24 22:23:54 (GMT)
commit8e79746521d9bd70d815b522f3a69dc0c26ac4b6 (patch)
tree1fb2875276fc5cbc1467e2eb88932f8d4a1ff96f /generic
parentb4870fefb5de15615267fb0184f0e66b95fd925c (diff)
downloadtk-8e79746521d9bd70d815b522f3a69dc0c26ac4b6.zip
tk-8e79746521d9bd70d815b522f3a69dc0c26ac4b6.tar.gz
tk-8e79746521d9bd70d815b522f3a69dc0c26ac4b6.tar.bz2
more places converted
Diffstat (limited to 'generic')
-rw-r--r--generic/tk3d.c2
-rw-r--r--generic/tkBind.c8
-rw-r--r--generic/tkBusy.c2
-rw-r--r--generic/tkButton.c2
-rw-r--r--generic/tkCmds.c6
-rw-r--r--generic/tkConfig.c2
-rw-r--r--generic/tkConsole.c4
-rw-r--r--generic/tkFocus.c2
-rw-r--r--generic/tkFrame.c2
-rw-r--r--generic/tkGrid.c28
-rw-r--r--generic/tkImage.c2
-rw-r--r--generic/tkImgBmap.c2
-rw-r--r--generic/tkImgGIF.c2
-rw-r--r--generic/tkImgPNG.c2
-rw-r--r--generic/tkMenu.c28
-rw-r--r--generic/tkMenubutton.c2
-rw-r--r--generic/tkMessage.c2
-rw-r--r--generic/tkOption.c2
-rw-r--r--generic/tkPack.c24
-rw-r--r--generic/tkPlace.c4
-rw-r--r--generic/tkScale.c4
-rw-r--r--generic/tkSquare.c4
-rw-r--r--generic/tkTest.c20
-rw-r--r--generic/tkText.c32
-rw-r--r--generic/tkTextDisp.c8
-rw-r--r--generic/tkTextImage.c4
-rw-r--r--generic/tkTextMark.c4
-rw-r--r--generic/tkTextTag.c4
-rw-r--r--generic/tkTextWind.c4
29 files changed, 106 insertions, 106 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c
index 7609f00..87ddf76 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -625,7 +625,7 @@ Tk_GetReliefFromObj(
int *resultPtr) /* Where to place the answer. */
{
return Tcl_GetIndexFromObjStruct(interp, objPtr, reliefStrings,
- sizeof(char), "relief", 0, resultPtr);
+ sizeof(char *), "relief", 0, resultPtr);
}
/*
diff --git a/generic/tkBind.c b/generic/tkBind.c
index d5294fc..77d302f 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -2349,8 +2349,8 @@ Tk_EventObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -3006,8 +3006,8 @@ HandleEventGenerate(
optionPtr = objv[i];
valuePtr = objv[i + 1];
- if (Tcl_GetIndexFromObj(interp, optionPtr, fieldStrings, "option",
- TCL_EXACT, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, optionPtr, fieldStrings,
+ sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) {
return TCL_ERROR;
}
if (objc & 1) {
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 16c5128..7aeae74 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -817,7 +817,7 @@ Tk_BusyObjCmd(
}
if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum options) index) {
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 94a904d..30d8ae9 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -798,7 +798,7 @@ ButtonWidgetObjCmd(
return TCL_ERROR;
}
result = Tcl_GetIndexFromObjStruct(interp, objv[1], commandNames[butPtr->type],
- sizeof(char), "option", 0, &index);
+ sizeof(char *), "option", 0, &index);
if (result != TCL_OK) {
return result;
}
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 1e260b5..f203c4c 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -109,8 +109,8 @@ Tk_BellObjCmd(
}
for (i = 1; i < objc; i++) {
- if (Tcl_GetIndexFromObj(interp, objv[i], bellOptions, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], bellOptions,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum options) index) {
@@ -2118,7 +2118,7 @@ TkDeadAppCmd(
const char **argv) /* Argument strings. */
{
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't invoke \"%s\" command: application has been destroyed",
+ "can't invoke \"%s\" command: application has been destroyed",
argv[0]));
return TCL_ERROR;
}
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index e3a8401..375bca7 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -738,7 +738,7 @@ DoObjConfig(
int newValue;
if (Tcl_GetIndexFromObjStruct(interp, valuePtr,
- optionPtr->specPtr->clientData, sizeof(char),
+ optionPtr->specPtr->clientData, sizeof(char *),
optionPtr->specPtr->optionName+1, 0, &newValue) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index b78b6aa..12e9353 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -698,7 +698,7 @@ ConsoleObjCmd(
return TCL_ERROR;
}
if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -788,7 +788,7 @@ InterpreterObjCmd(
return TCL_ERROR;
}
if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkFocus.c b/generic/tkFocus.c
index bdd953e..60f631d 100644
--- a/generic/tkFocus.c
+++ b/generic/tkFocus.c
@@ -163,7 +163,7 @@ Tk_FocusObjCmd(
*/
if (Tcl_GetIndexFromObjStruct(interp, objv[1], focusOptions,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (objc != 3) {
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 2e7081a..90b3e95 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.c
@@ -728,7 +728,7 @@ FrameWidgetObjCmd(
return TCL_ERROR;
}
if (Tcl_GetIndexFromObjStruct(interp, objv[1], frameOptions,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
Tcl_Preserve(framePtr);
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index 19e4442..f8e18fd 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -242,7 +242,7 @@ typedef struct UniformGroup {
* Tk will set its requested size to fit the
* needs of its slaves.
* ALLOCED_MASTER 1 means that Grid has allocated itself as
- * geometry master for this window.
+ * geometry master for this window.
*/
#define REQUESTED_RELAYOUT 1
@@ -361,8 +361,8 @@ Tk_GridObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -910,7 +910,7 @@ GridPropagateCommand(
if (masterPtr->slavePtr != NULL) {
if (TkSetGeometryMaster(interp, master, "grid") != TCL_OK) {
- return TCL_ERROR;
+ return TCL_ERROR;
}
masterPtr->flags |= ALLOCED_MASTER;
}
@@ -1076,8 +1076,8 @@ GridRowColumnConfigureCommand(
* returned.
*/
- if (Tcl_GetIndexFromObj(interp, objv[4], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[4], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
Tcl_DecrRefCount(listCopy);
return TCL_ERROR;
}
@@ -1175,8 +1175,8 @@ GridRowColumnConfigureCommand(
*/
for (i = 4; i < objc; i += 2) {
- if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings,
- "option", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
Tcl_DecrRefCount(listCopy);
return TCL_ERROR;
}
@@ -1364,8 +1364,8 @@ GridSlavesCommand(
}
for (i = 3; i < objc; i += 2) {
- if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (Tcl_GetIntFromObj(interp, objv[i+1], &value) != TCL_OK) {
@@ -3058,8 +3058,8 @@ ConfigureSlaves(
*/
for (i = numWindows; i < objc; i += 2) {
- if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (index == CONF_IN) {
@@ -3161,8 +3161,8 @@ ConfigureSlaves(
*/
for (i = numWindows; i < objc; i += 2) {
- Tcl_GetIndexFromObj(interp, objv[i], optionStrings, "option", 0,
- &index);
+ Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
+ sizeof(char *), "option", 0, &index);
switch ((enum options) index) {
case CONF_COLUMN:
if (Tcl_GetIntFromObj(NULL, objv[i+1], &tmp) != TCL_OK
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 930fb7d..e22b735 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -235,7 +235,7 @@ Tk_ImageObjCmd(
}
if (Tcl_GetIndexFromObjStruct(interp, objv[1], imageOptions,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum options) index) {
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index 35a4d0b..0906673 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -765,7 +765,7 @@ ImgBmapCmd(
return TCL_ERROR;
}
if (Tcl_GetIndexFromObjStruct(interp, objv[1], bmapOptions,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch (index) {
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 4de086d..27de486 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -426,7 +426,7 @@ FileReadGIF(
}
for (i = 1; i < argc; i++) {
if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
- sizeof(char), "option name", 0, &nBytes) != TCL_OK) {
+ sizeof(char *), "option name", 0, &nBytes) != TCL_OK) {
return TCL_ERROR;
}
if (i == (argc-1)) {
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index 593ab12..f639694 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -2302,7 +2302,7 @@ ParseFormat(
int optIndex;
if (Tcl_GetIndexFromObjStruct(interp, objv[0], fmtOptions,
- sizeof(char), "option", 0, &optIndex) == TCL_ERROR) {
+ sizeof(char *), "option", 0, &optIndex) == TCL_ERROR) {
return TCL_ERROR;
}
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 391dfc1..63da41a 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -476,10 +476,10 @@ MenuCmd(
toplevel = 1;
for (i = 2; i < (objc - 1); i++) {
- if (Tcl_GetIndexFromObj(NULL, objv[i], typeStringList, NULL, 0,
- &index) != TCL_ERROR) {
- if ((Tcl_GetIndexFromObj(NULL, objv[i + 1], menuTypeStrings, NULL,
- 0, &index) == TCL_OK) && (index == MENUBAR)) {
+ if (Tcl_GetIndexFromObjStruct(NULL, objv[i], typeStringList,
+ sizeof(char *), NULL, 0, &index) != TCL_ERROR) {
+ if ((Tcl_GetIndexFromObjStruct(NULL, objv[i + 1], menuTypeStrings,
+ sizeof(char *), NULL, 0, &index) == TCL_OK) && (index == MENUBAR)) {
toplevel = 0;
}
break;
@@ -680,8 +680,8 @@ MenuWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], menuOptions, "option", 0,
- &option) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], menuOptions,
+ sizeof(char *), "option", 0, &option) != TCL_OK) {
return TCL_ERROR;
}
Tcl_Preserve(menuPtr);
@@ -1597,8 +1597,8 @@ ConfigureMenu(
*/
if (menuListPtr->menuType == UNKNOWN_TYPE) {
- Tcl_GetIndexFromObj(NULL, menuListPtr->menuTypePtr,
- menuTypeStrings, NULL, 0, &menuListPtr->menuType);
+ Tcl_GetIndexFromObjStruct(NULL, menuListPtr->menuTypePtr,
+ menuTypeStrings, sizeof(char *), NULL, 0, &menuListPtr->menuType);
/*
* Configure the new window to be either a pop-up menu or a
@@ -2406,8 +2406,8 @@ MenuAddOrInsert(
* Figure out the type of the new entry.
*/
- if (Tcl_GetIndexFromObj(interp, objv[0], menuEntryTypeStrings,
- "menu entry type", 0, &type) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[0], menuEntryTypeStrings,
+ sizeof(char *), "menu entry type", 0, &type) != TCL_OK) {
return TCL_ERROR;
}
@@ -2711,8 +2711,8 @@ CloneMenu(
if (newMenuTypePtr == NULL) {
menuType = MASTER_MENU;
} else {
- if (Tcl_GetIndexFromObj(menuPtr->interp, newMenuTypePtr,
- menuTypeStrings, "menu type", 0, &menuType) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(menuPtr->interp, newMenuTypePtr,
+ menuTypeStrings, sizeof(char *), "menu type", 0, &menuType) != TCL_OK) {
return TCL_ERROR;
}
}
@@ -2987,10 +2987,10 @@ GetIndexFromCoords(
*indexPtr = -1;
- /* set the width of the final column to the remainder of the window
+ /* set the width of the final column to the remainder of the window
* being aware of windows that may not be mapped yet.
*/
- max = Tk_IsMapped(menuPtr->tkwin)
+ max = Tk_IsMapped(menuPtr->tkwin)
? Tk_Width(menuPtr->tkwin) : Tk_ReqWidth(menuPtr->tkwin);
max -= borderwidth;
diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c
index 8830861..9b1e643 100644
--- a/generic/tkMenubutton.c
+++ b/generic/tkMenubutton.c
@@ -356,7 +356,7 @@ MenuButtonWidgetObjCmd(
return TCL_ERROR;
}
result = Tcl_GetIndexFromObjStruct(interp, objv[1], commandNames,
- sizeof(char), "option", 0, &index);
+ sizeof(char *), "option", 0, &index);
if (result != TCL_OK) {
return result;
}
diff --git a/generic/tkMessage.c b/generic/tkMessage.c
index ef07a7c..3e4bdce 100644
--- a/generic/tkMessage.c
+++ b/generic/tkMessage.c
@@ -319,7 +319,7 @@ MessageWidgetObjCmd(
}
if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
- sizeof(char), "option", 0, &index) != TCL_OK) {
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 9a6b306..2a8d501 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.c
@@ -632,7 +632,7 @@ Tk_OptionObjCmd(
}
result = Tcl_GetIndexFromObjStruct(interp, objv[1], optionCmds,
- sizeof(char), "option", 0, &index);
+ sizeof(char *), "option", 0, &index);
if (result != TCL_OK) {
return result;
}
diff --git a/generic/tkPack.c b/generic/tkPack.c
index 134b61f..928e793 100644
--- a/generic/tkPack.c
+++ b/generic/tkPack.c
@@ -88,7 +88,7 @@ typedef struct Packer {
* Tk will set its requested size to fit the
* needs of its slaves.
* ALLOCED_MASTER 1 means that Pack has allocated itself as
- * geometry master for this window.
+ * geometry master for this window.
*/
#define REQUESTED_REPACK 1
@@ -217,8 +217,8 @@ Tk_PackObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
/*
* Call it again without the deprecated ones to get a proper error
* message. This works well since there can't be any ambiguity between
@@ -226,8 +226,8 @@ Tk_PackObjCmd(
*/
Tcl_ResetResult(interp);
- Tcl_GetIndexFromObj(interp, objv[1], &optionStrings[4], "option", 0,
- &index);
+ Tcl_GetIndexFromObjStruct(interp, objv[1], &optionStrings[4],
+ sizeof(char *), "option", 0, &index);
return TCL_ERROR;
}
@@ -409,7 +409,7 @@ Tk_PackObjCmd(
if (masterPtr->slavePtr != NULL) {
if (TkSetGeometryMaster(interp, master, "pack") != TCL_OK) {
- return TCL_ERROR;
+ return TCL_ERROR;
}
masterPtr->flags |= ALLOCED_MASTER;
}
@@ -1287,7 +1287,7 @@ PackAfter(
!= TCL_OK) {
Tk_ManageGeometry(tkwin, NULL, NULL);
Unlink(packPtr);
- return TCL_ERROR;
+ return TCL_ERROR;
}
masterPtr->flags |= ALLOCED_MASTER;
}
@@ -1593,8 +1593,8 @@ ConfigureSlaves(
Tcl_SetErrorCode(interp, "TK", "PACK", "BAD_PARAMETER", NULL);
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings, "option",
- 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -1725,8 +1725,8 @@ ConfigureSlaves(
}
break;
case CONF_SIDE:
- if (Tcl_GetIndexFromObj(interp, objv[i+1], sideNames, "side",
- TCL_EXACT, &side) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i+1], sideNames,
+ sizeof(char *), "side", TCL_EXACT, &side) != TCL_OK) {
return TCL_ERROR;
}
slavePtr->side = (Side) side;
@@ -1829,7 +1829,7 @@ ConfigureSlaves(
!= TCL_OK) {
Tk_ManageGeometry(slave, NULL, NULL);
Unlink(slavePtr);
- return TCL_ERROR;
+ return TCL_ERROR;
}
masterPtr->flags |= ALLOCED_MASTER;
}
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index afba488..9fa406a 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -276,8 +276,8 @@ Tk_PlaceObjCmd(
dispPtr->placeInit = 1;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkScale.c b/generic/tkScale.c
index b27034f..f2024ad 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -340,8 +340,8 @@ ScaleWidgetObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
return TCL_ERROR;
}
- result = Tcl_GetIndexFromObj(interp, objv[1], commandNames,
- "option", 0, &index);
+ result = Tcl_GetIndexFromObjStruct(interp, objv[1], commandNames,
+ sizeof(char *), "option", 0, &index);
if (result != TCL_OK) {
return result;
}
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index 787630d..ad1506c 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -237,8 +237,8 @@ SquareWidgetObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], squareOptions, "command",
- 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], squareOptions,
+ sizeof(char *), "command", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkTest.c b/generic/tkTest.c
index c2d3ef9..e084a52 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -547,8 +547,8 @@ TestobjconfigObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], options, "command", 0, &index)
- != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
+ sizeof(char *), "command", 0, &index)!= TCL_OK) {
return TCL_ERROR;
}
@@ -797,8 +797,8 @@ TestobjconfigObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, "tableName");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], options, "table", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], options,
+ sizeof(char *), "table", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
if (tables[index] != NULL) {
@@ -811,8 +811,8 @@ TestobjconfigObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, "tableName");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], options, "table", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], options,
+ sizeof(char *), "table", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
Tcl_SetObjResult(interp, TkDebugConfig(interp, tables[index]));
@@ -1143,8 +1143,8 @@ TrivialConfigObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], options, "command", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
+ sizeof(char *), "command", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -1321,8 +1321,8 @@ TestfontObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], options, "command", 0, &index)
- != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], options,
+ sizeof(char *), "command", 0, &index)!= TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkText.c b/generic/tkText.c
index e7b1c4d..b3fbaa1 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -718,8 +718,8 @@ TextWidgetObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
textPtr->refCount++;
@@ -1559,8 +1559,8 @@ SharedTextObjCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[1], optionStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -1664,8 +1664,8 @@ TextPeerCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], peerOptionStrings,
- "peer option", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], peerOptionStrings,
+ sizeof(char *), "peer option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
@@ -3713,15 +3713,15 @@ TextSearchCmd(
break;
}
- if (Tcl_GetIndexFromObj(NULL, objv[i], switchStrings, "switch", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(NULL, objv[i], switchStrings,
+ sizeof(char *), "switch", 0, &index) != TCL_OK) {
/*
* Hide the -hidden option, generating the error description with
* the side effects of T_GIFO.
*/
- (void) Tcl_GetIndexFromObj(interp, objv[i], switchStrings+1,
- "switch", 0, &index);
+ (void) Tcl_GetIndexFromObjStruct(interp, objv[i], switchStrings+1,
+ sizeof(char *), "switch", 0, &index);
return TCL_ERROR;
}
@@ -4482,8 +4482,8 @@ TkTextGetTabs(
}
i += 1;
- if (Tcl_GetIndexFromObj(interp, objv[i], tabOptionStrings,
- "tab alignment", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[i], tabOptionStrings,
+ sizeof(char *), "tab alignment", 0, &index) != TCL_OK) {
goto error;
}
tabPtr->alignment = (TkTextTabAlign) index;
@@ -4560,8 +4560,8 @@ TextDumpCmd(
if (Tcl_GetString(objv[arg])[0] != '-') {
break;
}
- if (Tcl_GetIndexFromObj(interp, objv[arg], optStrings, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[arg], optStrings,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum opts) index) {
@@ -5077,8 +5077,8 @@ TextEditCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], editOptionStrings,
- "edit option", 0, &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], editOptionStrings,
+ sizeof(char *), "edit option", 0, &index) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index d75f61c..454ccff 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -8196,8 +8196,8 @@ TextGetScrollInfoObj(
};
int index;
- if (Tcl_GetIndexFromObj(interp, objv[2], subcommands, "option", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], subcommands,
+ sizeof(char *), "option", 0, &index) != TCL_OK) {
return TKTEXT_SCROLL_ERROR;
}
@@ -8216,8 +8216,8 @@ TextGetScrollInfoObj(
Tcl_WrongNumArgs(interp, 3, objv, "number units|pages|pixels");
return TKTEXT_SCROLL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[4], units, "argument", 0,
- &index) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[4], units,
+ sizeof(char *), "argument", 0, &index) != TCL_OK) {
return TKTEXT_SCROLL_ERROR;
}
switch ((enum viewUnits) index) {
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 4a98d42..41dd448 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -138,8 +138,8 @@ TkTextImageCmd(
Tcl_WrongNumArgs(interp, 2, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], optionStrings, "option", 0,
- &idx) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], optionStrings,
+ sizeof(char *), "option", 0, &idx) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum opts) idx) {
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c
index a306a05..56a21f9 100644
--- a/generic/tkTextMark.c
+++ b/generic/tkTextMark.c
@@ -118,8 +118,8 @@ TkTextMarkCmd(
Tcl_WrongNumArgs(interp, 2, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], markOptionStrings, "mark option",
- 0, &optionIndex) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], markOptionStrings,
+ sizeof(char *), "mark option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index beb7eb5..3bac7d4 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -148,8 +148,8 @@ TkTextTagCmd(
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], tagOptionStrings,
- "tag option", 0, &optionIndex) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], tagOptionStrings,
+ sizeof(char *), "tag option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index ad69004..bd61d75 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -153,8 +153,8 @@ TkTextWindowCmd(
Tcl_WrongNumArgs(interp, 2, objv, "option ?arg ...?");
return TCL_ERROR;
}
- if (Tcl_GetIndexFromObj(interp, objv[2], windOptionStrings,
- "window option", 0, &optionIndex) != TCL_OK) {
+ if (Tcl_GetIndexFromObjStruct(interp, objv[2], windOptionStrings,
+ sizeof(char *), "window option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum windOptions) optionIndex) {