diff options
| -rw-r--r-- | doc/AddErrInfo.3 | 4 | ||||
| -rw-r--r-- | doc/CrtChannel.3 | 2 | ||||
| -rw-r--r-- | doc/ParseCmd.3 | 2 | ||||
| -rw-r--r-- | generic/tclCompile.h | 10 | ||||
| -rw-r--r-- | generic/tclDisassemble.c | 6 |
5 files changed, 12 insertions, 12 deletions
diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index ba998c0..b273c70 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -76,8 +76,8 @@ The line number of a script where an error occurred. Pointer to first character in script containing command (must be <= command) .AP "const char" *command in Pointer to first character in command that generated the error -.AP int commandLength in -Number of bytes in command; -1 means use all bytes up to first null byte +.AP size_t commandLength in +Number of bytes in command; TCL_INDEX_NONE means use all bytes up to first null byte .BE .SH DESCRIPTION .PP diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index 299bc29..968328c 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -136,7 +136,7 @@ means the output handle is wanted. .AP void **handlePtr out Points to the location where the desired OS-specific handle should be stored. -.AP int size in +.AP size_t size in The size, in bytes, of buffers to allocate in this channel. .AP int mask in An OR-ed combination of \fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3 index d93f00c..5235325 100644 --- a/doc/ParseCmd.3 +++ b/doc/ParseCmd.3 @@ -45,7 +45,7 @@ For \fBTcl_EvalTokensStandard\fR, determines the context for evaluating the script and also is used for error reporting; must not be NULL. .AP "const char" *start in Pointer to first character in string to parse. -.AP int numBytes in +.AP size_t numBytes in Number of bytes in string to parse, not including any terminating null character. If less than 0 then the script consists of all characters following \fIstart\fR up to the first null character. diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 9f47a03..b0491be 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -1501,15 +1501,15 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData, (*((p)+3)))) /* - * Macros used to compute the minimum and maximum of two integers. The ANSI C + * Macros used to compute the minimum and maximum of two values. The ANSI C * "prototypes" for these macros are: * - * int TclMin(int i, int j); - * int TclMax(int i, int j); + * size_t TclMin(size_t i, size_t j); + * size_t TclMax(size_t i, size_t j); */ -#define TclMin(i, j) ((((int) i) < ((int) j))? (i) : (j)) -#define TclMax(i, j) ((((int) i) > ((int) j))? (i) : (j)) +#define TclMin(i, j) ((((size_t) i) + 1 < ((size_t) j) + 1 )? (i) : (j)) +#define TclMax(i, j) ((((size_t) i) + 1 > ((size_t) j) + 1 )? (i) : (j)) /* * Convenience macros for use when compiling bodies of commands. The ANSI C diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 1cdee5c..1cef2d2 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -28,7 +28,7 @@ static int FormatInstruction(ByteCode *codePtr, static void GetLocationInformation(Proc *procPtr, Tcl_Obj **fileObjPtr, int *linePtr); static void PrintSourceToObj(Tcl_Obj *appendObj, - const char *stringPtr, int maxChars); + const char *stringPtr, size_t maxChars); static void UpdateStringOfInstName(Tcl_Obj *objPtr); /* @@ -858,10 +858,10 @@ static void PrintSourceToObj( Tcl_Obj *appendObj, /* The object to print the source to. */ const char *stringPtr, /* The string to print. */ - int maxChars) /* Maximum number of chars to print. */ + size_t maxChars) /* Maximum number of chars to print. */ { const char *p; - int i = 0, len; + size_t i = 0, len; if (stringPtr == NULL) { Tcl_AppendToObj(appendObj, "\"\"", -1); |
