tclBasic.c File Reference

#include "tclInt.h"
#include "tclCompile.h"
#include <float.h>
#include <limits.h>
#include <math.h>
#include "tommath.h"

Go to the source code of this file.

Data Structures

struct  OldMathFuncData
struct  CmdInfo
struct  BuiltinFuncDef
struct  OpCmdInfo

Defines

#define GetCStackParams(iPtr)   TclpGetCStackParams(&((iPtr)->stackBound))
#define CheckCStack(iPtr, localIntPtr)   ((localIntPtr) > (iPtr)->stackBound)
#define MATH_FUNC_PREFIX_LEN   17
#define MATH_OP_PREFIX_LEN   15
#define RAND_IA   16807
#define RAND_IM   2147483647
#define RAND_IQ   127773
#define RAND_IR   2836
#define RAND_MASK   123459876

Functions

Tcl_InterpTcl_CreateInterp (void)
int TclHideUnsafeCommands (Tcl_Interp *interp)
void Tcl_CallWhenDeleted (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, ClientData clientData)
void Tcl_DontCallWhenDeleted (Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, ClientData clientData)
void Tcl_SetAssocData (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc *proc, ClientData clientData)
void Tcl_DeleteAssocData (Tcl_Interp *interp, const char *name)
ClientData Tcl_GetAssocData (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc **procPtr)
int Tcl_InterpDeleted (Tcl_Interp *interp)
void Tcl_DeleteInterp (Tcl_Interp *interp)
int Tcl_HideCommand (Tcl_Interp *interp, const char *cmdName, const char *hiddenCmdToken)
int Tcl_ExposeCommand (Tcl_Interp *interp, const char *hiddenCmdToken, const char *cmdName)
Tcl_Command Tcl_CreateCommand (Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc)
Tcl_Command Tcl_CreateObjCommand (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc)
int TclInvokeStringCommand (ClientData clientData, Tcl_Interp *interp, register int objc, Tcl_Obj *const objv[])
int TclInvokeObjectCommand (ClientData clientData, Tcl_Interp *interp, int argc, register const char **argv)
int TclRenameCommand (Tcl_Interp *interp, const char *oldName, const char *newName)
int Tcl_SetCommandInfo (Tcl_Interp *interp, const char *cmdName, const Tcl_CmdInfo *infoPtr)
int Tcl_SetCommandInfoFromToken (Tcl_Command cmd, const Tcl_CmdInfo *infoPtr)
int Tcl_GetCommandInfo (Tcl_Interp *interp, const char *cmdName, Tcl_CmdInfo *infoPtr)
int Tcl_GetCommandInfoFromToken (Tcl_Command cmd, Tcl_CmdInfo *infoPtr)
const char * Tcl_GetCommandName (Tcl_Interp *interp, Tcl_Command command)
void Tcl_GetCommandFullName (Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr)
int Tcl_DeleteCommand (Tcl_Interp *interp, const char *cmdName)
int Tcl_DeleteCommandFromToken (Tcl_Interp *interp, Tcl_Command cmd)
void TclCleanupCommand (register Command *cmdPtr)
void Tcl_CreateMathFunc (Tcl_Interp *interp, const char *name, int numArgs, Tcl_ValueType *argTypes, Tcl_MathProc *proc, ClientData clientData)
int Tcl_GetMathFuncInfo (Tcl_Interp *interp, const char *name, int *numArgsPtr, Tcl_ValueType **argTypesPtr, Tcl_MathProc **procPtr, ClientData *clientDataPtr)
Tcl_ObjTcl_ListMathFuncs (Tcl_Interp *interp, const char *pattern)
int TclInterpReady (Tcl_Interp *interp)
int TclEvalObjvInternal (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], const char *command, int length, int flags)
int Tcl_EvalObjv (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags)
int Tcl_EvalTokensStandard (Tcl_Interp *interp, Tcl_Token *tokenPtr, int count)
Tcl_ObjTcl_EvalTokens (Tcl_Interp *interp, Tcl_Token *tokenPtr, int count)
int Tcl_EvalEx (Tcl_Interp *interp, const char *script, int numBytes, int flags)
int TclEvalEx (Tcl_Interp *interp, const char *script, int numBytes, int flags, int line)
void TclAdvanceLines (int *line, const char *start, const char *end)
int Tcl_Eval (Tcl_Interp *interp, const char *script)
int Tcl_EvalObj (Tcl_Interp *interp, Tcl_Obj *objPtr)
int Tcl_GlobalEvalObj (Tcl_Interp *interp, Tcl_Obj *objPtr)
int Tcl_EvalObjEx (Tcl_Interp *interp, register Tcl_Obj *objPtr, int flags)
int TclEvalObjEx (Tcl_Interp *interp, register Tcl_Obj *objPtr, int flags, const CmdFrame *invoker, int word)
int Tcl_ExprLong (Tcl_Interp *interp, const char *exprstring, long *ptr)
int Tcl_ExprDouble (Tcl_Interp *interp, const char *exprstring, double *ptr)
int Tcl_ExprBoolean (Tcl_Interp *interp, const char *exprstring, int *ptr)
int Tcl_ExprLongObj (Tcl_Interp *interp, register Tcl_Obj *objPtr, long *ptr)
int Tcl_ExprDoubleObj (Tcl_Interp *interp, register Tcl_Obj *objPtr, double *ptr)
int Tcl_ExprBooleanObj (Tcl_Interp *interp, register Tcl_Obj *objPtr, int *ptr)
int TclObjInvokeNamespace (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Namespace *nsPtr, int flags)
int TclObjInvoke (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags)
int Tcl_ExprString (Tcl_Interp *interp, const char *expr)
void Tcl_AppendObjToErrorInfo (Tcl_Interp *interp, Tcl_Obj *objPtr)
void Tcl_AddErrorInfo (Tcl_Interp *interp, const char *message)
void Tcl_AddObjErrorInfo (Tcl_Interp *interp, const char *message, int length)
int Tcl_VarEvalVA (Tcl_Interp *interp, va_list argList)
int Tcl_VarEval (Tcl_Interp *interp,...)
int Tcl_GlobalEval (Tcl_Interp *interp, const char *command)
int Tcl_SetRecursionLimit (Tcl_Interp *interp, int depth)
void Tcl_AllowExceptions (Tcl_Interp *interp)
void Tcl_GetVersion (int *majorV, int *minorV, int *patchLevelV, int *type)

Variables

TclStubs tclStubs


Define Documentation

#define CheckCStack ( iPtr,
localIntPtr   )     ((localIntPtr) > (iPtr)->stackBound)

Definition at line 359 of file tclBasic.c.

Referenced by TclInterpReady().

#define GetCStackParams ( iPtr   )     TclpGetCStackParams(&((iPtr)->stackBound))

Definition at line 353 of file tclBasic.c.

Referenced by Tcl_CreateInterp().

#define MATH_FUNC_PREFIX_LEN   17

#define MATH_OP_PREFIX_LEN   15

#define RAND_IA   16807

#define RAND_IM   2147483647

#define RAND_IQ   127773

#define RAND_IR   2836

#define RAND_MASK   123459876


Function Documentation

void Tcl_AddErrorInfo ( Tcl_Interp interp,
const char *  message 
)

Definition at line 5311 of file tclBasic.c.

References Tcl_AddObjErrorInfo().

Referenced by Tcl_ForObjCmd(), Tcl_ProcObjCmd(), TclGetOpenModeEx(), and TclIncrObj().

void Tcl_AllowExceptions ( Tcl_Interp interp  ) 

Definition at line 5558 of file tclBasic.c.

References Interp::evalFlags, and TCL_ALLOW_EXCEPTIONS.

Referenced by TclDefaultBgErrorHandlerObjCmd().

void Tcl_CallWhenDeleted ( Tcl_Interp interp,
Tcl_InterpDeleteProc *  proc,
ClientData  clientData 
)

Tcl_Interp* Tcl_CreateInterp ( void   ) 

Definition at line 383 of file tclBasic.c.

References Interp::activeCmdTracePtr, Interp::activeInterpTracePtr, Interp::activeVarTracePtr, Interp::allocCache, Interp::appendAvl, Interp::appendResult, Interp::appendUsed, Interp::assocData, Interp::asyncReadyPtr, Interp::chanMsg, ckalloc, Command::clientData, Interp::cmdCount, Command::cmdEpoch, Interp::cmdFramePtr, Namespace::cmdTable, Interp::compiledProcPtr, Interp::compileEpoch, CmdInfo::compileProc, Command::compileProc, Command::deleteData, Command::deleteProc, Interp::ecVar, Interp::eiVar, Interp::emptyObjPtr, Interp::ensembleRewrite, Interp::errorCode, Interp::errorInfo, Interp::errorLine, Interp::evalFlags, Interp::execEnvPtr, Interp::flags, Command::flags, Interp::framePtr, Interp::freeProc, GetCStackParams, Interp::globalNsPtr, Interp::handle, Interp::hiddenCmdTablePtr, Command::hPtr, Command::importRefPtr, Interp::interpInfo, iPtr, Interp::lineBCPtr, Interp::linePBodyPtr, Interp::literalTable, Interp::lookupNsPtr, MAX_NESTING_DEPTH, Interp::maxNestingDepth, CmdInfo::name, Command::nsPtr, Interp::numInsertedObjs, Interp::numLevels, Interp::numRemovedObjs, Command::objClientData, CmdInfo::objProc, Command::objProc, Interp::objResultPtr, Interp::packagePrefer, Interp::packageTable, Interp::packageUnknown, Interp::pendingObjDataPtr, PKG_PREFER_LATEST, PKG_PREFER_STABLE, Command::proc, Command::refCount, Interp::resolverPtr, Interp::result, Interp::resultSpace, Interp::returnCode, Interp::returnLevel, Interp::returnOpts, Interp::rootFramePtr, Interp::scriptFile, Interp::sourceObjs, Interp::stubTable, Tcl_CreateHashEntry, Tcl_CreateNamespace(), Tcl_GetCurrentThread(), Tcl_IncrRefCount, Tcl_InitHashTable(), Tcl_NewObj(), TCL_OK, TCL_ONE_WORD_KEYS, Tcl_Panic(), Tcl_PushCallFrame(), Tcl_SetHashValue, TCL_STRING_KEYS, TclCreateExecEnv(), TclGetAsyncReadyPtr(), TclHandleCreate(), TclInitLimitSupport(), TclInitLiteralTable(), TclInitSubsystems(), TclInvokeObjectCommand(), TclNewLiteralStringObj, tclStubs, Interp::threadId, Interp::tracePtr, Command::tracePtr, Interp::tracesForbiddingInline, Interp::varFramePtr, Interp::varSearches, and Interp::varTraces.

Referenced by Tcl_Main().

void Tcl_CreateMathFunc ( Tcl_Interp interp,
const char *  name,
int  numArgs,
Tcl_ValueType argTypes,
Tcl_MathProc *  proc,
ClientData  clientData 
)

void Tcl_DeleteAssocData ( Tcl_Interp interp,
const char *  name 
)

int Tcl_DeleteCommand ( Tcl_Interp interp,
const char *  cmdName 
)

Definition at line 2643 of file tclBasic.c.

References Tcl_DeleteCommandFromToken(), and Tcl_FindCommand().

void Tcl_DeleteInterp ( Tcl_Interp interp  ) 

Definition at line 1145 of file tclBasic.c.

References Interp::compileEpoch, DELETED, Interp::flags, iPtr, and Tcl_EventuallyFree().

Referenced by Tcl_Main(), and Tcltest_Init().

void Tcl_DontCallWhenDeleted ( Tcl_Interp interp,
Tcl_InterpDeleteProc *  proc,
ClientData  clientData 
)

int Tcl_Eval ( Tcl_Interp interp,
const char *  script 
)

Definition at line 4468 of file tclBasic.c.

References Tcl_EvalEx(), and Tcl_GetStringResult().

Referenced by Pkge_Init(), Tcl_GlobalEval(), Tcl_Init(), and Tcl_VarEvalVA().

int Tcl_EvalEx ( Tcl_Interp interp,
const char *  script,
int  numBytes,
int  flags 
)

Definition at line 3989 of file tclBasic.c.

References TclEvalEx().

Referenced by Tcl_Eval(), Tcl_FSEvalFileEx(), TclEvalObjEx(), and TclExecuteByteCode().

int Tcl_EvalObj ( Tcl_Interp interp,
Tcl_Obj objPtr 
)

Definition at line 4504 of file tclBasic.c.

References Tcl_EvalObjEx().

int Tcl_EvalObjEx ( Tcl_Interp interp,
register Tcl_Obj objPtr,
int  flags 
)

Tcl_Obj* Tcl_EvalTokens ( Tcl_Interp interp,
Tcl_Token tokenPtr,
int  count 
)

int Tcl_EvalTokensStandard ( Tcl_Interp interp,
Tcl_Token tokenPtr,
int  count 
)

Definition at line 3907 of file tclBasic.c.

References TclSubstTokens().

Referenced by Tcl_EvalTokens().

int Tcl_ExprBoolean ( Tcl_Interp interp,
const char *  exprstring,
int *  ptr 
)

int Tcl_ExprBooleanObj ( Tcl_Interp interp,
register Tcl_Obj objPtr,
int *  ptr 
)

int Tcl_ExprDouble ( Tcl_Interp interp,
const char *  exprstring,
double *  ptr 
)

int Tcl_ExprDoubleObj ( Tcl_Interp interp,
register Tcl_Obj objPtr,
double *  ptr 
)

int Tcl_ExprLong ( Tcl_Interp interp,
const char *  exprstring,
long *  ptr 
)

int Tcl_ExprString ( Tcl_Interp interp,
const char *  expr 
)

ClientData Tcl_GetAssocData ( Tcl_Interp interp,
const char *  name,
Tcl_InterpDeleteProc **  procPtr 
)

void Tcl_GetCommandFullName ( Tcl_Interp interp,
Tcl_Command  command,
Tcl_Obj objPtr 
)

int Tcl_GetCommandInfo ( Tcl_Interp interp,
const char *  cmdName,
Tcl_CmdInfo infoPtr 
)

Definition at line 2472 of file tclBasic.c.

References Tcl_FindCommand(), and Tcl_GetCommandInfoFromToken().

Referenced by Tcl_InterpObjCmd(), and Tcl_RecordAndEvalObj().

const char* Tcl_GetCommandName ( Tcl_Interp interp,
Tcl_Command  command 
)

Definition at line 2551 of file tclBasic.c.

References Command::hPtr, Tcl_HashEntry::tablePtr, and Tcl_GetHashKey.

Referenced by Tcl_ForgetImport(), and TclPreventAliasLoop().

int Tcl_GetMathFuncInfo ( Tcl_Interp interp,
const char *  name,
int *  numArgsPtr,
Tcl_ValueType **  argTypesPtr,
Tcl_MathProc **  procPtr,
ClientData *  clientDataPtr 
)

void Tcl_GetVersion ( int *  majorV,
int *  minorV,
int *  patchLevelV,
int *  type 
)

int Tcl_GlobalEval ( Tcl_Interp interp,
const char *  command 
)

Definition at line 5491 of file tclBasic.c.

References Interp::rootFramePtr, Tcl_Eval(), and Interp::varFramePtr.

int Tcl_GlobalEvalObj ( Tcl_Interp interp,
Tcl_Obj objPtr 
)

Definition at line 4513 of file tclBasic.c.

References TCL_EVAL_GLOBAL, and Tcl_EvalObjEx().

int Tcl_InterpDeleted ( Tcl_Interp interp  ) 

Definition at line 1115 of file tclBasic.c.

References DELETED.

Referenced by Tcl_LimitCheck(), Tcl_Main(), TclCallVarTraces(), TclPrecTraceProc(), and TclPreventAliasLoop().

void Tcl_SetAssocData ( Tcl_Interp interp,
const char *  name,
Tcl_InterpDeleteProc *  proc,
ClientData  clientData 
)

int Tcl_SetCommandInfo ( Tcl_Interp interp,
const char *  cmdName,
const Tcl_CmdInfo infoPtr 
)

Definition at line 2389 of file tclBasic.c.

References Tcl_FindCommand(), and Tcl_SetCommandInfoFromToken().

int Tcl_SetRecursionLimit ( Tcl_Interp interp,
int  depth 
)

Definition at line 5524 of file tclBasic.c.

References Interp::maxNestingDepth.

int Tcl_VarEval ( Tcl_Interp interp,
  ... 
)

Definition at line 5457 of file tclBasic.c.

References Tcl_VarEvalVA().

int Tcl_VarEvalVA ( Tcl_Interp interp,
va_list  argList 
)

Definition at line 5410 of file tclBasic.c.

References Tcl_DStringAppend(), Tcl_DStringFree(), Tcl_DStringInit(), Tcl_DStringValue, and Tcl_Eval().

Referenced by Tcl_VarEval().

void TclAdvanceLines ( int *  line,
const char *  start,
const char *  end 
)

void TclCleanupCommand ( register Command cmdPtr  ) 

Definition at line 3001 of file tclBasic.c.

References ckfree.

int TclEvalObjvInternal ( Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[],
const char *  command,
int  length,
int  flags 
)

int TclHideUnsafeCommands ( Tcl_Interp interp  ) 

Definition at line 851 of file tclBasic.c.

References CmdInfo::isSafe, CmdInfo::name, TCL_ERROR, and Tcl_HideCommand().

Referenced by Tcl_MakeSafe().

int TclInvokeObjectCommand ( ClientData  clientData,
Tcl_Interp interp,
int  argc,
register const char **  argv 
)

int TclInvokeStringCommand ( ClientData  clientData,
Tcl_Interp interp,
register int  objc,
Tcl_Obj *const   objv[] 
)

int TclObjInvokeNamespace ( Tcl_Interp interp,
int  objc,
Tcl_Obj *const   objv[],
Tcl_Namespace nsPtr,
int  flags 
)

Definition at line 5083 of file tclBasic.c.

References TCL_ERROR, TCL_OK, TclObjInvoke(), TclPopStackFrame(), and TclPushStackFrame().


Variable Documentation



Generated on Wed Mar 12 12:18:28 2008 by  doxygen 1.5.1