diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | doc/GetIndex.3 | 8 | ||||
-rw-r--r-- | doc/WrongNumArgs.3 | 4 | ||||
-rw-r--r-- | generic/tcl.decls | 9 | ||||
-rw-r--r-- | generic/tclDecls.h | 18 | ||||
-rw-r--r-- | generic/tclIndexObj.c | 15 |
6 files changed, 39 insertions, 26 deletions
@@ -1,3 +1,14 @@ +2002-01-14 Don Porter <dgp@users.sourceforge.net> + + * doc/GetIndex.3: + * doc/WrongNumArgs.3: + * generic/tcl.decls (Tcl_GetIndexFromObj, Tcl_GetIndexFromObjStruct, + Tcl_WrongNumArgs): + * generic/tclIndexObj.c (Tcl_GetIndexFromObj, Tcl_GetIndexFromObjStruct, + Tcl_WrongNumArgs): Updated APIs in the file generic/tclIndexObj.c + according to the guidelines of TIP 27. + * generic/tclDecls.h: make genstubs + 2002-01-11 Mo DeJong <mdejong@users.sourceforge.net> * unix/configure: Regen. diff --git a/doc/GetIndex.3 b/doc/GetIndex.3 index 822d8b7..d641fdc 100644 --- a/doc/GetIndex.3 +++ b/doc/GetIndex.3 @@ -4,7 +4,7 @@ '\" 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.6 2000/07/24 00:03:02 jenglish Exp $ +'\" RCS: @(#) $Id: GetIndex.3,v 1.7 2002/01/14 15:07:39 dgp Exp $ '\" .so man.macros .TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures" @@ -25,7 +25,7 @@ int msg, flags, indexPtr\fR) .VE .SH ARGUMENTS -.AS Tcl_Interp **tablePtr +.AS "char * CONST" *tablePtr .AP Tcl_Interp *interp in Interpreter to use for error reporting; if NULL, then no message is provided on errors. @@ -33,7 +33,7 @@ provided on errors. The string value of this object is used to search through \fItablePtr\fR. The internal representation is modified to hold the index of the matching table entry. -.AP char **tablePtr in +.AP "char * CONST" *tablePtr in An array of null-terminated strings. The end of the array is marked by a NULL string pointer. .VS @@ -41,7 +41,7 @@ by a NULL string pointer. 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 +.AP "CONST char" *msg in Null-terminated string describing what is being looked up, such as \fBoption\fR. This string is included in error messages. .AP int flags in diff --git a/doc/WrongNumArgs.3 b/doc/WrongNumArgs.3 index 8cda3f4..22b69aa 100644 --- a/doc/WrongNumArgs.3 +++ b/doc/WrongNumArgs.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: WrongNumArgs.3,v 1.3 1999/08/21 19:40:48 hobbs Exp $ +'\" RCS: @(#) $Id: WrongNumArgs.3,v 1.4 2002/01/14 15:07:39 dgp Exp $ '\" .so man.macros .TH Tcl_WrongNumArgs 3 8.0 Tcl "Tcl Library Procedures" @@ -26,7 +26,7 @@ Number of leading arguments from \fIobjv\fR to include in error message. .AP Tcl_Obj "*CONST\ objv[]" in Arguments to command that had the wrong number of arguments. -.AP char *message in +.AP "CONST char" *message in Additional error information to print after leading arguments from \fIobjv\fR. This typically gives the acceptable syntax of the command. This argument may be NULL. diff --git a/generic/tcl.decls b/generic/tcl.decls index e905f96..913d7c9 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.68 2002/01/09 19:09:28 kennykb Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.69 2002/01/14 15:07:39 dgp Exp $ library tcl @@ -154,7 +154,7 @@ declare 35 generic { } declare 36 generic { int Tcl_GetIndexFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, \ - char **tablePtr, char *msg, int flags, int *indexPtr) + char * CONST *tablePtr, CONST char *msg, int flags, int *indexPtr) } declare 37 generic { int Tcl_GetInt(Tcl_Interp *interp, CONST char *str, int *intPtr) @@ -927,7 +927,7 @@ declare 263 generic { } declare 264 generic { void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc, \ - Tcl_Obj *CONST objv[], char *message) + Tcl_Obj *CONST objv[], CONST char *message) } declare 265 generic { int Tcl_DumpActiveMemory( CONST char *fileName ) @@ -1083,7 +1083,8 @@ declare 303 generic { } declare 304 generic { int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr, \ - char **tablePtr, int offset, char *msg, int flags, int *indexPtr) + char * CONST *tablePtr, int offset, CONST char *msg, int flags, \ + int *indexPtr) } declare 305 generic { VOID * Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 49dc2f3..2a718d1 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.68 2002/01/09 19:09:28 kennykb Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.69 2002/01/14 15:07:39 dgp Exp $ */ #ifndef _TCLDECLS @@ -137,8 +137,8 @@ EXTERN int Tcl_GetDoubleFromObj _ANSI_ARGS_(( double * doublePtr)); /* 36 */ EXTERN int Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp * interp, - Tcl_Obj * objPtr, char ** tablePtr, - char * msg, int flags, int * indexPtr)); + Tcl_Obj * objPtr, char * CONST * tablePtr, + CONST char * msg, int flags, int * indexPtr)); /* 37 */ EXTERN int Tcl_GetInt _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * intPtr)); @@ -858,7 +858,7 @@ EXTERN int Tcl_Write _ANSI_ARGS_((Tcl_Channel chan, char * s, /* 264 */ EXTERN void Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], - char * message)); + CONST char * message)); /* 265 */ EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_(( CONST char * fileName)); @@ -979,8 +979,8 @@ EXTERN void Tcl_GetEncodingNames _ANSI_ARGS_(( /* 304 */ EXTERN int Tcl_GetIndexFromObjStruct _ANSI_ARGS_(( Tcl_Interp * interp, Tcl_Obj * objPtr, - char ** tablePtr, int offset, char * msg, - int flags, int * indexPtr)); + char * CONST * tablePtr, int offset, + CONST char * msg, int flags, int * indexPtr)); /* 305 */ EXTERN VOID * Tcl_GetThreadData _ANSI_ARGS_(( Tcl_ThreadDataKey * keyPtr, int size)); @@ -1573,7 +1573,7 @@ typedef struct TclStubs { unsigned char * (*tcl_GetByteArrayFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 33 */ int (*tcl_GetDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, double * doublePtr)); /* 34 */ int (*tcl_GetDoubleFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr)); /* 35 */ - int (*tcl_GetIndexFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, char ** tablePtr, char * msg, int flags, int * indexPtr)); /* 36 */ + int (*tcl_GetIndexFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, char * CONST * tablePtr, CONST char * msg, int flags, int * indexPtr)); /* 36 */ int (*tcl_GetInt) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * intPtr)); /* 37 */ int (*tcl_GetIntFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr)); /* 38 */ int (*tcl_GetLongFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr)); /* 39 */ @@ -1833,7 +1833,7 @@ typedef struct TclStubs { ClientData (*tcl_VarTraceInfo) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData)); /* 261 */ ClientData (*tcl_VarTraceInfo2) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData)); /* 262 */ int (*tcl_Write) _ANSI_ARGS_((Tcl_Channel chan, char * s, int slen)); /* 263 */ - void (*tcl_WrongNumArgs) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], char * message)); /* 264 */ + void (*tcl_WrongNumArgs) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], CONST char * message)); /* 264 */ int (*tcl_DumpActiveMemory) _ANSI_ARGS_((CONST char * fileName)); /* 265 */ void (*tcl_ValidateAllMemory) _ANSI_ARGS_((CONST char * file, int line)); /* 266 */ void (*tcl_AppendResultVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 267 */ @@ -1873,7 +1873,7 @@ typedef struct TclStubs { Tcl_Encoding (*tcl_GetEncoding) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 301 */ char * (*tcl_GetEncodingName) _ANSI_ARGS_((Tcl_Encoding encoding)); /* 302 */ void (*tcl_GetEncodingNames) _ANSI_ARGS_((Tcl_Interp * interp)); /* 303 */ - int (*tcl_GetIndexFromObjStruct) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, char ** tablePtr, int offset, char * msg, int flags, int * indexPtr)); /* 304 */ + int (*tcl_GetIndexFromObjStruct) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, char * CONST * tablePtr, int offset, CONST char * msg, int flags, int * indexPtr)); /* 304 */ VOID * (*tcl_GetThreadData) _ANSI_ARGS_((Tcl_ThreadDataKey * keyPtr, int size)); /* 305 */ Tcl_Obj * (*tcl_GetVar2Ex) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags)); /* 306 */ ClientData (*tcl_InitNotifier) _ANSI_ARGS_((void)); /* 307 */ diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 454bda6..c9dd542 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIndexObj.c,v 1.10 2001/08/30 19:02:43 hobbs Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.11 2002/01/14 15:07:39 dgp Exp $ */ #include "tclInt.h" @@ -76,10 +76,10 @@ int Tcl_GetIndexFromObj(interp, objPtr, tablePtr, msg, flags, indexPtr) Tcl_Interp *interp; /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr; /* Object containing the string to lookup. */ - char **tablePtr; /* Array of strings to compare against the + char * CONST *tablePtr; /* Array of strings to compare against the * value of objPtr; last entry must be NULL * and there must not be duplicate entries. */ - char *msg; /* Identifying word to use in error messages. */ + CONST char *msg; /* Identifying word to use in error messages. */ int flags; /* 0 or TCL_EXACT */ int *indexPtr; /* Place to store resulting integer index. */ { @@ -135,18 +135,19 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, indexPtr) Tcl_Interp *interp; /* Used for error reporting if not NULL. */ Tcl_Obj *objPtr; /* Object containing the string to lookup. */ - char **tablePtr; /* The first string in the table. The second + char * CONST *tablePtr; /* The first string in the table. The second * string will be at this address plus the * offset, the third plus the offset again, * etc. The last entry must be NULL * and there must not be duplicate entries. */ int offset; /* The number of bytes between entries */ - char *msg; /* Identifying word to use in error messages. */ + CONST char *msg; /* Identifying word to use in error messages. */ int flags; /* 0 or TCL_EXACT */ int *indexPtr; /* Place to store resulting integer index. */ { int index, length, i, numAbbrev; - char *key, *p1, *p2, **entryPtr; + char *key, *p1, *p2; + char * CONST *entryPtr; Tcl_Obj *resultPtr; /* @@ -301,7 +302,7 @@ Tcl_WrongNumArgs(interp, objc, objv, message) Tcl_Obj *CONST objv[]; /* Initial argument objects, which * should be included in the error * message. */ - char *message; /* Error message to print after the + CONST char *message; /* Error message to print after the * leading objects in objv. The * message may be NULL. */ { |