Compare commits
129
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ed027b7bc | ||
|
|
258b9f4333 | ||
|
|
c38755a732 | ||
|
|
9c75e1c5f8 | ||
|
|
08553f531f | ||
|
|
7e7ec63c2c | ||
|
|
e354aa0e3d | ||
|
|
0957b2c850 | ||
|
|
57665b295c | ||
|
|
dfff588886 | ||
|
|
ca7c7ce1b7 | ||
|
|
4349c08e31 | ||
|
|
bb71951f1a | ||
|
|
4f37f05a9c | ||
|
|
abc5015131 | ||
|
|
f50166e4fc | ||
|
|
2c163978e7 | ||
|
|
4acf174468 | ||
|
|
e8b3de6a75 | ||
|
|
6fa4858662 | ||
|
|
dd7709baa2 | ||
|
|
c67bfbf1a4 | ||
|
|
b0bf6914f1 | ||
|
|
330e115d11 | ||
|
|
03c4df2e30 | ||
|
|
ff878198ef | ||
|
|
84707cf702 | ||
|
|
d8b1866404 | ||
|
|
45c9d1dc2c | ||
|
|
a3100689bc | ||
|
|
014e7b1951 | ||
|
|
ad5f7e5464 | ||
|
|
3b0f6c1c31 | ||
|
|
4198cbe8cd | ||
|
|
3e3a85339f | ||
|
|
adf3bedc0c | ||
|
|
c260fedf0c | ||
|
|
1c58938f2c | ||
|
|
051f9006ef | ||
|
|
361141a857 | ||
|
|
75194c3206 | ||
|
|
04a740f5c6 | ||
|
|
6aa85ad35f | ||
|
|
6797693d1b | ||
|
|
aef36bf11d | ||
|
|
0dc45b9fe3 | ||
|
|
e65b021050 | ||
|
|
b5100ee98f | ||
|
|
2951fec86b | ||
|
|
d07793f49c | ||
|
|
2acbdb0493 | ||
|
|
e00ad288cc | ||
|
|
5b8ce14566 | ||
|
|
facce70703 | ||
|
|
26f4ba76ca | ||
|
|
aaf8665696 | ||
|
|
e4dd07e735 | ||
|
|
e98a68549d | ||
|
|
1fc4f8eaa3 | ||
|
|
70bccae334 | ||
|
|
052f5d50c9 | ||
|
|
5815a325af | ||
|
|
3ff398393a | ||
|
|
ef0bb68bcb | ||
|
|
382a840e23 | ||
|
|
1e6fd4531c | ||
|
|
21e80b3a25 | ||
|
|
8e6efd7026 | ||
|
|
39365ed3c0 | ||
|
|
f52f05c3b1 | ||
|
|
388741b7d0 | ||
|
|
b2ca802381 | ||
|
|
b05600e60a | ||
|
|
98a8b3604f | ||
|
|
905d1e5d03 | ||
|
|
cb7c84c310 | ||
|
|
03bdf41de2 | ||
|
|
206428d2cf | ||
|
|
bc0d613154 | ||
|
|
1d6f003314 | ||
|
|
e81a4abd60 | ||
|
|
06ebe62a5e | ||
|
|
0d78d389e1 | ||
|
|
eea64f8d90 | ||
|
|
4c5cc88bdf | ||
|
|
a1cee7cd20 | ||
|
|
3327979282 | ||
|
|
8c19725a30 | ||
|
|
0a224ddfc8 | ||
|
|
9a7c011683 | ||
|
|
44427fccaa | ||
|
|
c4cf77f310 | ||
|
|
9b00a63b22 | ||
|
|
91d9bd02c0 | ||
|
|
56b69c4e9a | ||
|
|
d2b1e66352 | ||
|
|
d29d888dc6 | ||
|
|
f4ed4079b7 | ||
|
|
dde5a2565e | ||
|
|
e59a1e0b14 | ||
|
|
c4b5bfbd50 | ||
|
|
44869c9e35 | ||
|
|
e5463e8ec8 | ||
|
|
bddf737714 | ||
|
|
ef0fd808de | ||
|
|
f4fb1d1752 | ||
|
|
59ea8cb145 | ||
|
|
e9cf99c212 | ||
|
|
80630f4ec9 | ||
|
|
e63dcc2677 | ||
|
|
9bbc90b227 | ||
|
|
8e5dbc8a27 | ||
|
|
29c6b72a83 | ||
|
|
fd5b3bb085 | ||
|
|
2fda7e49a0 | ||
|
|
27256fcd71 | ||
|
|
e702454abe | ||
|
|
9423df2491 | ||
|
|
05b1764f74 | ||
|
|
bff7817ec0 | ||
|
|
13bc69a8a4 | ||
|
|
9aa711e8e0 | ||
|
|
b339d4bf03 | ||
|
|
1e58e8e42d | ||
|
|
91af7f6f90 | ||
|
|
68191ded75 | ||
|
|
ac3d0b69d3 | ||
|
|
96f611f896 | ||
|
|
ec9c29c80d |
+1
-6
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_SetErrorLine, Tcl_GetErrorLine, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options
|
||||
Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorLine, Tcl_GetErrorLine, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -30,8 +30,6 @@ int
|
||||
.sp
|
||||
\fBTcl_SetErrorCode\fR(\fIinterp, element, element, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_SetErrorCodeVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
\fBTcl_GetErrorLine\fR(\fIinterp\fR)
|
||||
.sp
|
||||
\fBTcl_SetErrorLine\fR(\fIinterp, lineNum\fR)
|
||||
@@ -245,9 +243,6 @@ The procedure \fBTcl_SetErrorCode\fR is also used to set the
|
||||
record instead of a value. Otherwise, it is similar to
|
||||
\fBTcl_SetObjErrorCode\fR in behavior.
|
||||
.PP
|
||||
\fBTcl_SetErrorCodeVA\fR is the same as \fBTcl_SetErrorCode\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
.PP
|
||||
The procedure \fBTcl_GetErrorLine\fR is used to read the integer value
|
||||
of the \fB\-errorline\fR return option without the overhead of a full
|
||||
call to \fBTcl_GetReturnOptions\fR. Likewise, \fBTcl_SetErrorLine\fR
|
||||
|
||||
+1
-2
@@ -30,8 +30,7 @@ or \fBTCL_RETURN\fR, then Tcl normally converts this into a \fBTCL_ERROR\fR
|
||||
return with an appropriate message. The particular script
|
||||
evaluation procedures of Tcl that act in the manner are
|
||||
\fBTcl_EvalObjEx\fR, \fBTcl_EvalObjv\fR, \fBTcl_Eval\fR, \fBTcl_EvalEx\fR,
|
||||
\fBTcl_GlobalEval\fR, \fBTcl_GlobalEvalObj\fR, \fBTcl_VarEval\fR and
|
||||
\fBTcl_VarEvalVA\fR.
|
||||
\fBTcl_GlobalEval\fR, \fBTcl_GlobalEvalObj\fR and \fBTcl_VarEval\fR.
|
||||
.PP
|
||||
However, if \fBTcl_AllowExceptions\fR is invoked immediately before
|
||||
calling one of those a procedures, then arbitrary completion
|
||||
|
||||
+1
-11
@@ -10,7 +10,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA \- execute Tcl scripts
|
||||
Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval \- execute Tcl scripts
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -38,9 +38,6 @@ int
|
||||
.sp
|
||||
int
|
||||
\fBTcl_VarEval\fR(\fIinterp, part, part, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_VarEvalVA\fR(\fIinterp, argList\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp **termPtr
|
||||
.AP Tcl_Interp *interp in
|
||||
@@ -67,9 +64,6 @@ first null byte are used.
|
||||
Points to first byte of script to execute (null-terminated and UTF-8).
|
||||
.AP char *part in
|
||||
String forming part of a Tcl script.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialized using
|
||||
\fBva_start\fR, and cleared using \fBva_end\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -153,10 +147,6 @@ It returns the result of the command and also modifies
|
||||
\fIinterp->result\fR in the same way as \fBTcl_Eval\fR.
|
||||
The last argument to \fBTcl_VarEval\fR must be NULL to indicate the end
|
||||
of arguments. \fBTcl_VarEval\fR is now deprecated.
|
||||
.PP
|
||||
\fBTcl_VarEvalVA\fR is the same as \fBTcl_VarEval\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument
|
||||
list. Like \fBTcl_VarEval\fR, \fBTcl_VarEvalVA\fR is deprecated.
|
||||
|
||||
.SH "FLAG BITS"
|
||||
.PP
|
||||
|
||||
+1
-7
@@ -7,7 +7,7 @@
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
Tcl_Panic, Tcl_PanicVA, Tcl_SetPanicProc \- report fatal error and abort
|
||||
Tcl_Panic, Tcl_SetPanicProc \- report fatal error and abort
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -16,9 +16,6 @@ void
|
||||
\fBTcl_Panic\fR(\fIformat\fR, \fIarg\fR, \fIarg\fR, \fI...\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_PanicVA\fR(\fIformat\fR, \fIargList\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_SetPanicProc\fR(\fIpanicProc\fR)
|
||||
.sp
|
||||
.SH ARGUMENTS
|
||||
@@ -80,9 +77,6 @@ the Tcl library, \fBTcl_Panic\fR is a public function and may be called
|
||||
by any extension or application that wishes to abort the process and
|
||||
have a panic message displayed the same way that panic messages from Tcl
|
||||
will be displayed.
|
||||
.PP
|
||||
\fBTcl_PanicVA\fR is the same as \fBTcl_Panic\fR except that instead of
|
||||
taking a variable number of arguments it takes an argument list.
|
||||
.SH "SEE ALSO"
|
||||
abort(3), printf(3), exec(n), format(n)
|
||||
.SH KEYWORDS
|
||||
|
||||
+1
-6
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult, Tcl_FreeResult \- manipulate Tcl result
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult, Tcl_FreeResult \- manipulate Tcl result
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -26,8 +26,6 @@ const char *
|
||||
.sp
|
||||
\fBTcl_AppendResult\fR(\fIinterp, result, result, ... , \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_AppendResultVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
\fBTcl_ResetResult\fR(\fIinterp\fR)
|
||||
.sp
|
||||
.VS 8.6
|
||||
@@ -152,9 +150,6 @@ extensions.
|
||||
Any number of \fIresult\fR arguments may be passed in a single
|
||||
call; the last argument in the list must be a NULL pointer.
|
||||
.PP
|
||||
\fBTcl_AppendResultVA\fR is the same as \fBTcl_AppendResult\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
.PP
|
||||
.VS 8.6
|
||||
\fBTcl_TransferResult\fR moves a result from one interpreter to another,
|
||||
optionally (dependent on the \fIresult\fR parameter) including the error
|
||||
|
||||
+1
-8
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_NewStringObj, Tcl_NewUnicodeObj, Tcl_SetStringObj, Tcl_SetUnicodeObj, Tcl_GetStringFromObj, Tcl_GetString, Tcl_GetUnicodeFromObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendToObj, Tcl_AppendUnicodeToObj, Tcl_AppendObjToObj, Tcl_AppendStringsToObj, Tcl_AppendStringsToObjVA, Tcl_AppendLimitedToObj, Tcl_Format, Tcl_AppendFormatToObj, Tcl_ObjPrintf, Tcl_AppendPrintfToObj, Tcl_SetObjLength, Tcl_AttemptSetObjLength, Tcl_ConcatObj \- manipulate Tcl values as strings
|
||||
Tcl_NewStringObj, Tcl_NewUnicodeObj, Tcl_SetStringObj, Tcl_SetUnicodeObj, Tcl_GetStringFromObj, Tcl_GetString, Tcl_GetUnicodeFromObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendToObj, Tcl_AppendUnicodeToObj, Tcl_AppendObjToObj, Tcl_AppendStringsToObj, Tcl_AppendLimitedToObj, Tcl_Format, Tcl_AppendFormatToObj, Tcl_ObjPrintf, Tcl_AppendPrintfToObj, Tcl_SetObjLength, Tcl_AttemptSetObjLength, Tcl_ConcatObj \- manipulate Tcl values as strings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -59,9 +59,6 @@ void
|
||||
\fBTcl_AppendStringsToObj\fR(\fIobjPtr, string, string, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_AppendStringsToObjVA\fR(\fIobjPtr, argList\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_AppendLimitedToObj\fR(\fIobjPtr, bytes, length, limit, ellipsis\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -246,10 +243,6 @@ values may contain internal null characters). Any number of
|
||||
\fIstring\fR arguments may be provided, but the last argument
|
||||
must be a NULL pointer to indicate the end of the list.
|
||||
.PP
|
||||
\fBTcl_AppendStringsToObjVA\fR is the same as \fBTcl_AppendStringsToObj\fR
|
||||
except that instead of taking a variable number of arguments it takes an
|
||||
argument list.
|
||||
.PP
|
||||
\fBTcl_AppendLimitedToObj\fR is similar to \fBTcl_AppendToObj\fR
|
||||
except that it imposes a limit on how many bytes are appended.
|
||||
This can be handy when the string to be appended might be
|
||||
|
||||
+20
-15
@@ -945,12 +945,14 @@ declare 265 {
|
||||
declare 266 {
|
||||
void Tcl_ValidateAllMemory(const char *file, int line)
|
||||
}
|
||||
declare 267 {
|
||||
void Tcl_AppendResultVA(Tcl_Interp *interp, va_list argList)
|
||||
}
|
||||
declare 268 {
|
||||
void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList)
|
||||
}
|
||||
# Removed in 9.0
|
||||
#declare 267 {
|
||||
# void Tcl_AppendResultVA(Tcl_Interp *interp, va_list argList)
|
||||
#}
|
||||
# Removed in 9.0
|
||||
#declare 268 {
|
||||
# void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList)
|
||||
#}
|
||||
declare 269 {
|
||||
char *Tcl_HashStats(Tcl_HashTable *tablePtr)
|
||||
}
|
||||
@@ -976,18 +978,21 @@ declare 274 {
|
||||
CONST84_RETURN char *Tcl_PkgRequire(Tcl_Interp *interp, const char *name,
|
||||
const char *version, int exact)
|
||||
}
|
||||
declare 275 {
|
||||
void Tcl_SetErrorCodeVA(Tcl_Interp *interp, va_list argList)
|
||||
}
|
||||
declare 276 {
|
||||
int Tcl_VarEvalVA(Tcl_Interp *interp, va_list argList)
|
||||
}
|
||||
# Removed in 9.0
|
||||
#declare 275 {
|
||||
# void Tcl_SetErrorCodeVA(Tcl_Interp *interp, va_list argList)
|
||||
#}
|
||||
# Removed in 9.0
|
||||
#declare 276 {
|
||||
# int Tcl_VarEvalVA(Tcl_Interp *interp, va_list argList)
|
||||
#}
|
||||
declare 277 {
|
||||
Tcl_Pid Tcl_WaitPid(Tcl_Pid pid, int *statPtr, int options)
|
||||
}
|
||||
declare 278 {
|
||||
TCL_NORETURN void Tcl_PanicVA(const char *format, va_list argList)
|
||||
}
|
||||
# Removed in 9.0
|
||||
#declare 278 {
|
||||
# TCL_NORETURN void Tcl_PanicVA(const char *format, va_list argList)
|
||||
#}
|
||||
declare 279 {
|
||||
void Tcl_GetVersion(int *major, int *minor, int *patchLevel, int *type)
|
||||
}
|
||||
|
||||
@@ -125,18 +125,6 @@ extern "C" {
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
* Support for functions with a variable number of arguments.
|
||||
*
|
||||
* The following TCL_VARARGS* macros are to support old extensions
|
||||
* written for older versions of Tcl where the macros permitted
|
||||
* support for the varargs.h system as well as stdarg.h .
|
||||
*
|
||||
* New code should just directly be written to use stdarg.h conventions.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
# define TCL_VARARGS(type, name) (type name, ...)
|
||||
# define TCL_VARARGS_DEF(type, name) (type name, ...)
|
||||
@@ -2586,7 +2574,6 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
|
||||
#if !defined(__APPLE__) /* On OSX, there is a conflict with "mach/mach.h" */
|
||||
# define panic Tcl_Panic
|
||||
#endif
|
||||
# define panicVA Tcl_PanicVA
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
|
||||
+18
-49
@@ -6780,53 +6780,6 @@ Tcl_AddObjErrorInfo(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_VarEvalVA --
|
||||
*
|
||||
* Given a variable number of string arguments, concatenate them all
|
||||
* together and execute the result as a Tcl command.
|
||||
*
|
||||
* Results:
|
||||
* A standard Tcl return result. An error message or other result may be
|
||||
* left in the interp's result.
|
||||
*
|
||||
* Side effects:
|
||||
* Depends on what was done by the command.
|
||||
*
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
Tcl_VarEvalVA(
|
||||
Tcl_Interp *interp, /* Interpreter in which to evaluate command */
|
||||
va_list argList) /* Variable argument list. */
|
||||
{
|
||||
Tcl_DString buf;
|
||||
char *string;
|
||||
int result;
|
||||
|
||||
/*
|
||||
* Copy the strings one after the other into a single larger string. Use
|
||||
* stack-allocated space for small commands, but if the command gets too
|
||||
* large than call ckalloc to create the space.
|
||||
*/
|
||||
|
||||
Tcl_DStringInit(&buf);
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_DStringAppend(&buf, string, -1);
|
||||
}
|
||||
|
||||
result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0);
|
||||
Tcl_DStringFree(&buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -6852,11 +6805,27 @@ Tcl_VarEval(
|
||||
{
|
||||
va_list argList;
|
||||
int result;
|
||||
Tcl_DString buf;
|
||||
char *string;
|
||||
|
||||
va_start(argList, interp);
|
||||
result = Tcl_VarEvalVA(interp, argList);
|
||||
va_end(argList);
|
||||
/*
|
||||
* Copy the strings one after the other into a single larger string. Use
|
||||
* stack-allocated space for small commands, but if the command gets too
|
||||
* large than call ckalloc to create the space.
|
||||
*/
|
||||
|
||||
Tcl_DStringInit(&buf);
|
||||
while (1) {
|
||||
string = va_arg(argList, char *);
|
||||
if (string == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_DStringAppend(&buf, string, -1);
|
||||
}
|
||||
|
||||
result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0);
|
||||
Tcl_DStringFree(&buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+15
-28
@@ -811,12 +811,8 @@ EXTERN void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc,
|
||||
EXTERN int Tcl_DumpActiveMemory(const char *fileName);
|
||||
/* 266 */
|
||||
EXTERN void Tcl_ValidateAllMemory(const char *file, int line);
|
||||
/* 267 */
|
||||
EXTERN void Tcl_AppendResultVA(Tcl_Interp *interp,
|
||||
va_list argList);
|
||||
/* 268 */
|
||||
EXTERN void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr,
|
||||
va_list argList);
|
||||
/* Slot 267 is reserved */
|
||||
/* Slot 268 is reserved */
|
||||
/* 269 */
|
||||
EXTERN char * Tcl_HashStats(Tcl_HashTable *tablePtr);
|
||||
/* 270 */
|
||||
@@ -837,15 +833,11 @@ EXTERN int Tcl_PkgProvide(Tcl_Interp *interp, const char *name,
|
||||
EXTERN CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp,
|
||||
const char *name, const char *version,
|
||||
int exact);
|
||||
/* 275 */
|
||||
EXTERN void Tcl_SetErrorCodeVA(Tcl_Interp *interp,
|
||||
va_list argList);
|
||||
/* 276 */
|
||||
EXTERN int Tcl_VarEvalVA(Tcl_Interp *interp, va_list argList);
|
||||
/* Slot 275 is reserved */
|
||||
/* Slot 276 is reserved */
|
||||
/* 277 */
|
||||
EXTERN Tcl_Pid Tcl_WaitPid(Tcl_Pid pid, int *statPtr, int options);
|
||||
/* 278 */
|
||||
EXTERN TCL_NORETURN void Tcl_PanicVA(const char *format, va_list argList);
|
||||
/* Slot 278 is reserved */
|
||||
/* 279 */
|
||||
EXTERN void Tcl_GetVersion(int *major, int *minor,
|
||||
int *patchLevel, int *type);
|
||||
@@ -2133,18 +2125,18 @@ typedef struct TclStubs {
|
||||
void (*tcl_WrongNumArgs) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], const char *message); /* 264 */
|
||||
int (*tcl_DumpActiveMemory) (const char *fileName); /* 265 */
|
||||
void (*tcl_ValidateAllMemory) (const char *file, int line); /* 266 */
|
||||
void (*tcl_AppendResultVA) (Tcl_Interp *interp, va_list argList); /* 267 */
|
||||
void (*tcl_AppendStringsToObjVA) (Tcl_Obj *objPtr, va_list argList); /* 268 */
|
||||
void (*reserved267)(void);
|
||||
void (*reserved268)(void);
|
||||
char * (*tcl_HashStats) (Tcl_HashTable *tablePtr); /* 269 */
|
||||
CONST84_RETURN char * (*tcl_ParseVar) (Tcl_Interp *interp, const char *start, CONST84 char **termPtr); /* 270 */
|
||||
CONST84_RETURN char * (*tcl_PkgPresent) (Tcl_Interp *interp, const char *name, const char *version, int exact); /* 271 */
|
||||
CONST84_RETURN char * (*tcl_PkgPresentEx) (Tcl_Interp *interp, const char *name, const char *version, int exact, void *clientDataPtr); /* 272 */
|
||||
int (*tcl_PkgProvide) (Tcl_Interp *interp, const char *name, const char *version); /* 273 */
|
||||
CONST84_RETURN char * (*tcl_PkgRequire) (Tcl_Interp *interp, const char *name, const char *version, int exact); /* 274 */
|
||||
void (*tcl_SetErrorCodeVA) (Tcl_Interp *interp, va_list argList); /* 275 */
|
||||
int (*tcl_VarEvalVA) (Tcl_Interp *interp, va_list argList); /* 276 */
|
||||
void (*reserved275)(void);
|
||||
void (*reserved276)(void);
|
||||
Tcl_Pid (*tcl_WaitPid) (Tcl_Pid pid, int *statPtr, int options); /* 277 */
|
||||
TCL_NORETURN1 void (*tcl_PanicVA) (const char *format, va_list argList); /* 278 */
|
||||
void (*reserved278)(void);
|
||||
void (*tcl_GetVersion) (int *major, int *minor, int *patchLevel, int *type); /* 279 */
|
||||
void (*tcl_InitMemory) (Tcl_Interp *interp); /* 280 */
|
||||
Tcl_Channel (*tcl_StackChannel) (Tcl_Interp *interp, const Tcl_ChannelType *typePtr, ClientData instanceData, int mask, Tcl_Channel prevChan); /* 281 */
|
||||
@@ -3063,10 +3055,8 @@ extern const TclStubs *tclStubsPtr;
|
||||
(tclStubsPtr->tcl_DumpActiveMemory) /* 265 */
|
||||
#define Tcl_ValidateAllMemory \
|
||||
(tclStubsPtr->tcl_ValidateAllMemory) /* 266 */
|
||||
#define Tcl_AppendResultVA \
|
||||
(tclStubsPtr->tcl_AppendResultVA) /* 267 */
|
||||
#define Tcl_AppendStringsToObjVA \
|
||||
(tclStubsPtr->tcl_AppendStringsToObjVA) /* 268 */
|
||||
/* Slot 267 is reserved */
|
||||
/* Slot 268 is reserved */
|
||||
#define Tcl_HashStats \
|
||||
(tclStubsPtr->tcl_HashStats) /* 269 */
|
||||
#define Tcl_ParseVar \
|
||||
@@ -3079,14 +3069,11 @@ extern const TclStubs *tclStubsPtr;
|
||||
(tclStubsPtr->tcl_PkgProvide) /* 273 */
|
||||
#define Tcl_PkgRequire \
|
||||
(tclStubsPtr->tcl_PkgRequire) /* 274 */
|
||||
#define Tcl_SetErrorCodeVA \
|
||||
(tclStubsPtr->tcl_SetErrorCodeVA) /* 275 */
|
||||
#define Tcl_VarEvalVA \
|
||||
(tclStubsPtr->tcl_VarEvalVA) /* 276 */
|
||||
/* Slot 275 is reserved */
|
||||
/* Slot 276 is reserved */
|
||||
#define Tcl_WaitPid \
|
||||
(tclStubsPtr->tcl_WaitPid) /* 277 */
|
||||
#define Tcl_PanicVA \
|
||||
(tclStubsPtr->tcl_PanicVA) /* 278 */
|
||||
/* Slot 278 is reserved */
|
||||
#define Tcl_GetVersion \
|
||||
(tclStubsPtr->tcl_GetVersion) /* 279 */
|
||||
#define Tcl_InitMemory \
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef NO_STDLIB_H
|
||||
# include "../compat/stdlib.h"
|
||||
#else
|
||||
|
||||
+15
-41
@@ -63,7 +63,7 @@ Tcl_SetPanicProc(
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_PanicVA --
|
||||
* Tcl_Panic --
|
||||
*
|
||||
* Print an error message and kill the process.
|
||||
*
|
||||
@@ -76,16 +76,25 @@ Tcl_SetPanicProc(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
/*
|
||||
* The following comment is here so that Coverity's static analizer knows that
|
||||
* a Tcl_Panic() call can never return and avoids lots of false positives.
|
||||
*/
|
||||
|
||||
/* coverity[+kill] */
|
||||
void
|
||||
Tcl_PanicVA(
|
||||
const char *format, /* Format string, suitable for passing to
|
||||
* fprintf. */
|
||||
va_list argList) /* Variable argument list. */
|
||||
Tcl_Panic(
|
||||
const char *format,
|
||||
...)
|
||||
{
|
||||
va_list argList;
|
||||
char *arg1, *arg2, *arg3; /* Additional arguments (variable in number)
|
||||
* to pass to fprintf. */
|
||||
char *arg4, *arg5, *arg6, *arg7, *arg8;
|
||||
|
||||
|
||||
va_start(argList, format);
|
||||
arg1 = va_arg(argList, char *);
|
||||
arg2 = va_arg(argList, char *);
|
||||
arg3 = va_arg(argList, char *);
|
||||
@@ -94,6 +103,7 @@ Tcl_PanicVA(
|
||||
arg6 = va_arg(argList, char *);
|
||||
arg7 = va_arg(argList, char *);
|
||||
arg8 = va_arg(argList, char *);
|
||||
va_end (argList);
|
||||
|
||||
if (panicProc != NULL) {
|
||||
panicProc(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
|
||||
@@ -125,42 +135,6 @@ Tcl_PanicVA(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_Panic --
|
||||
*
|
||||
* Print an error message and kill the process.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The process dies, entering the debugger if possible.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
|
||||
/*
|
||||
* The following comment is here so that Coverity's static analizer knows that
|
||||
* a Tcl_Panic() call can never return and avoids lots of false positives.
|
||||
*/
|
||||
|
||||
/* coverity[+kill] */
|
||||
void
|
||||
Tcl_Panic(
|
||||
const char *format,
|
||||
...)
|
||||
{
|
||||
va_list argList;
|
||||
|
||||
va_start(argList, format);
|
||||
Tcl_PanicVA(format, argList);
|
||||
va_end (argList);
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
|
||||
+32
-79
@@ -446,41 +446,6 @@ Tcl_GetObjResult(
|
||||
return iPtr->objResultPtr;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_AppendResultVA --
|
||||
*
|
||||
* Append a variable number of strings onto the interpreter's result.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The result of the interpreter given by the first argument is extended
|
||||
* by the strings in the va_list (up to a terminating NULL argument).
|
||||
*
|
||||
* If the string result is non-empty, the object result forced to be a
|
||||
* duplicate of it first. There will be a string result afterwards.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_AppendResultVA(
|
||||
Tcl_Interp *interp, /* Interpreter with which to associate the
|
||||
* return value. */
|
||||
va_list argList) /* Variable argument list. */
|
||||
{
|
||||
Tcl_Obj *objPtr = Tcl_GetObjResult(interp);
|
||||
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
objPtr = Tcl_DuplicateObj(objPtr);
|
||||
}
|
||||
Tcl_AppendStringsToObjVA(objPtr, argList);
|
||||
Tcl_SetObjResult(interp, objPtr);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -507,9 +472,23 @@ Tcl_AppendResult(
|
||||
Tcl_Interp *interp, ...)
|
||||
{
|
||||
va_list argList;
|
||||
Tcl_Obj *objPtr;
|
||||
|
||||
va_start(argList, interp);
|
||||
Tcl_AppendResultVA(interp, argList);
|
||||
objPtr = Tcl_GetObjResult(interp);
|
||||
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
objPtr = Tcl_DuplicateObj(objPtr);
|
||||
}
|
||||
while (1) {
|
||||
const char *bytes = va_arg(argList, char *);
|
||||
|
||||
if (bytes == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_AppendToObj(objPtr, bytes, -1);
|
||||
}
|
||||
Tcl_SetObjResult(interp, objPtr);
|
||||
va_end(argList);
|
||||
}
|
||||
|
||||
@@ -685,48 +664,6 @@ ResetObjResult(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_SetErrorCodeVA --
|
||||
*
|
||||
* This function is called to record machine-readable information about
|
||||
* an error that is about to be returned.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The errorCode field of the interp is modified to hold all of the
|
||||
* arguments to this function, in a list form with each argument becoming
|
||||
* one element of the list.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_SetErrorCodeVA(
|
||||
Tcl_Interp *interp, /* Interpreter in which to set errorCode */
|
||||
va_list argList) /* Variable argument list. */
|
||||
{
|
||||
Tcl_Obj *errorObj = Tcl_NewObj();
|
||||
|
||||
/*
|
||||
* Scan through the arguments one at a time, appending them to the
|
||||
* errorCode field as list elements.
|
||||
*/
|
||||
|
||||
while (1) {
|
||||
char *elem = va_arg(argList, char *);
|
||||
|
||||
if (elem == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_ListObjAppendElement(NULL, errorObj, Tcl_NewStringObj(elem, -1));
|
||||
}
|
||||
Tcl_SetObjErrorCode(interp, errorObj);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -751,6 +688,7 @@ Tcl_SetErrorCode(
|
||||
Tcl_Interp *interp, ...)
|
||||
{
|
||||
va_list argList;
|
||||
Tcl_Obj *errorObj;
|
||||
|
||||
/*
|
||||
* Scan through the arguments one at a time, appending them to the
|
||||
@@ -758,7 +696,22 @@ Tcl_SetErrorCode(
|
||||
*/
|
||||
|
||||
va_start(argList, interp);
|
||||
Tcl_SetErrorCodeVA(interp, argList);
|
||||
errorObj = Tcl_NewObj();
|
||||
|
||||
/*
|
||||
* Scan through the arguments one at a time, appending them to the
|
||||
* errorCode field as list elements.
|
||||
*/
|
||||
|
||||
while (1) {
|
||||
char *elem = va_arg(argList, char *);
|
||||
|
||||
if (elem == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_ListObjAppendElement(NULL, errorObj, Tcl_NewStringObj(elem, -1));
|
||||
}
|
||||
Tcl_SetObjErrorCode(interp, errorObj);
|
||||
va_end(argList);
|
||||
}
|
||||
|
||||
|
||||
+12
-38
@@ -1552,43 +1552,6 @@ AppendUtfToUtfRep(
|
||||
objPtr->length = newLength;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_AppendStringsToObjVA --
|
||||
*
|
||||
* This function appends one or more null-terminated strings to an
|
||||
* object.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* The contents of all the string arguments are appended to the string
|
||||
* representation of objPtr.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_AppendStringsToObjVA(
|
||||
Tcl_Obj *objPtr, /* Points to the object to append to. */
|
||||
va_list argList) /* Variable argument list. */
|
||||
{
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
Tcl_Panic("%s called with shared object", "Tcl_AppendStringsToObj");
|
||||
}
|
||||
|
||||
while (1) {
|
||||
const char *bytes = va_arg(argList, char *);
|
||||
|
||||
if (bytes == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_AppendToObj(objPtr, bytes, -1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -1615,7 +1578,18 @@ Tcl_AppendStringsToObj(
|
||||
va_list argList;
|
||||
|
||||
va_start(argList, objPtr);
|
||||
Tcl_AppendStringsToObjVA(objPtr, argList);
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
Tcl_Panic("%s called with shared object", "Tcl_AppendStringsToObj");
|
||||
}
|
||||
|
||||
while (1) {
|
||||
const char *bytes = va_arg(argList, char *);
|
||||
|
||||
if (bytes == NULL) {
|
||||
break;
|
||||
}
|
||||
Tcl_AppendToObj(objPtr, bytes, -1);
|
||||
}
|
||||
va_end(argList);
|
||||
}
|
||||
|
||||
|
||||
@@ -1171,18 +1171,18 @@ const TclStubs tclStubs = {
|
||||
Tcl_WrongNumArgs, /* 264 */
|
||||
Tcl_DumpActiveMemory, /* 265 */
|
||||
Tcl_ValidateAllMemory, /* 266 */
|
||||
Tcl_AppendResultVA, /* 267 */
|
||||
Tcl_AppendStringsToObjVA, /* 268 */
|
||||
0, /* 267 */
|
||||
0, /* 268 */
|
||||
Tcl_HashStats, /* 269 */
|
||||
Tcl_ParseVar, /* 270 */
|
||||
Tcl_PkgPresent, /* 271 */
|
||||
Tcl_PkgPresentEx, /* 272 */
|
||||
Tcl_PkgProvide, /* 273 */
|
||||
Tcl_PkgRequire, /* 274 */
|
||||
Tcl_SetErrorCodeVA, /* 275 */
|
||||
Tcl_VarEvalVA, /* 276 */
|
||||
0, /* 275 */
|
||||
0, /* 276 */
|
||||
Tcl_WaitPid, /* 277 */
|
||||
Tcl_PanicVA, /* 278 */
|
||||
0, /* 278 */
|
||||
Tcl_GetVersion, /* 279 */
|
||||
Tcl_InitMemory, /* 280 */
|
||||
Tcl_StackChannel, /* 281 */
|
||||
|
||||
Reference in New Issue
Block a user