summaryrefslogtreecommitdiffstats
path: root/doc/GetIndex.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/GetIndex.3')
-rw-r--r--doc/GetIndex.331
1 files changed, 27 insertions, 4 deletions
diff --git a/doc/GetIndex.3 b/doc/GetIndex.3
index 4cacdb2..342069a 100644
--- a/doc/GetIndex.3
+++ b/doc/GetIndex.3
@@ -4,10 +4,10 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: GetIndex.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
+'\" RCS: @(#) $Id: GetIndex.3,v 1.3 1999/04/16 00:46:31 stanton Exp $
'\"
.so man.macros
-.TH Tcl_GetIndexFromObj 3 8.0 Tcl "Tcl Library Procedures"
+.TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetIndexFromObj \- lookup string in table of keywords
@@ -16,7 +16,14 @@ Tcl_GetIndexFromObj \- lookup string in table of keywords
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_GetIndexFromObj\fR(\fIinterp, objPtr, tablePtr, msg, flags, indexPtr\fR)
+\fBTcl_GetIndexFromObj\fR(\fIinterp, objPtr, tablePtr, msg, flags,
+indexPtr\fR)
+.VS
+.sp
+int
+\fBTcl_GetIndexFromObjStruct\fR(\fIinterp, objPtr, tablePtr, offset,
+msg, flags, indexPtr\fR)
+.VE
.SH ARGUMENTS
.AS Tcl_Interp **tablePtr
.AP Tcl_Interp *interp in
@@ -29,6 +36,11 @@ table entry.
.AP char **tablePtr in
An array of null-terminated strings. The end of the array is marked
by a NULL string pointer.
+.VS
+.AP int offset in
+The offset to add to tablePtr to get to the next string in the
+list. The end of the array is marked by a NULL string pointer.
+.VE
.AP char *msg in
Null-terminated string describing what is being looked up, such as
\fBoption\fR. This string is included in error messages.
@@ -68,7 +80,18 @@ is invoked again with the same \fIobjPtr\fR and \fItablePtr\fR
arguments (e.g. during a reinvocation of a Tcl command), it returns
the matching index immediately without having to redo the lookup
operation. Note: \fBTcl_GetIndexFromObj\fR assumes that the entries
-in \fItablePtr\fR are static: they must not change between invocations.
+in \fItablePtr\fR are static: they must not change between
+invocations.
+.VS
+.PP
+\fBTcl_GetIndexFromObjStruct\fR works just like
+\fBTcl_GetIndexFromObj\fR, except that instead of treating
+\fItablePtr\fR as an array of string pointers, it treats it as the
+first in a series of string ptrs that are spaced apart by \fIoffset\fR
+bytes. This is particularly useful when processing things like
+\fBTk_ConfigurationSpec\fR, whose string keys are in the same place in
+each of several array elements.
+.VE
.SH "SEE ALSO"
Tcl_WrongNumArgs