summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
Commit message (Collapse)AuthorAgeFilesLines
* comment adjustmentdgp2006-03-231-2/+1
|
* TIP#258 IMPLEMENTATIONdgp2006-02-081-8/+13
| | | | | | | | | | | | | | | | | | | | | * doc/Encoding.3: New subcommand [encoding dirs]. * doc/encoding.n: New routine Tcl_GetEncodingNameFromEnvironment. * generic/tcl.decls: Made public: * generic/tclBasic.c: TclGetEncodingFromObj * generic/tclCmdAH.c: -> Tcl_GetEncodingFromObj * generic/tclEncoding.c:TclGetEncodingSearchPath * generic/tclInt.decls: -> Tcl_GetEncodingSearchPath * generic/tclInt.h: TclSetEncodingSearchPath * generic/tclTest.c: -> Tcl_SetEncodingSearchPath * library/init.tcl: Removed commands: * tests/cmdAH.test: [tcl::unsupported::EncodingDirs] * tests/encoding.test: [testencoding path] (Tcltest) * unix/tclUnixInit.c: [Patch 1413934]. * win/tclWinInit.c: * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclStubInit.c:
* * win/Makefile.in, win/makefile.vc: Add Win x64 and CE build supporthobbs2005-12-081-15/+4
| | | | * win/tcl.m4, win/configure: CE still requires C code fixes.
* * generic/tclBinary.c:Miguel Sofer2005-11-041-8/+1
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIOCmd.c: * generic/tclLink.c: * generic/tclTest.c: * generic/tclVar.c: fix for [Bug 1334947]. The functions TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume the newValuePtr argument - i.e., they will free a 0-refCount object if they failed to set the variable. Fixed all callers in the core.
* TIP#237 IMPLEMENTATIONdgp2005-10-081-1/+4
| | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* * generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed todgp2005-09-141-24/+11
| | | | | | | | | | | | | | | | | | support "*" fields and needed to interpret precision limits on %s conversions as a maximum number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCkalloc.c: TclFormatToErrorInfo() and/or * generic/tclCmdAH.c: TclObjPrintf(). * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclProc.c:
* * generic/tclInt.h: New internal routines TclFormatObj()dgp2005-09-091-1/+18
| | | | | | | | | | * generic/tclStringObj.c: and TclAppendFormattedObjs() to offer sprintf()-like means to append to Tcl_Obj. Work in progress toward [RFE 572392]. * generic/tclCmdAH.c: Compiler directive NEW_FORMAT when #define'd directs the [format] command to be implemented in terms of the new TclAppendFormattedObjs() routine.
* More whitespace cleansing and _ANSI_ARGS_ purgingdkf2005-08-261-185/+133
|
* oops; how did I reorder those fields? :-(dkf2005-07-171-2/+2
|
* Getting more systematic about styledkf2005-07-171-757/+784
|
* Fix bug in [format %hx] handling on selected platforms. [Bug 1154163]dkf2005-06-171-10/+17
|
* Add missing return in wrong#args casedkf2005-06-071-1/+2
|
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
|
* * generic/tclBasic.c: Added unsupported commanddgp2005-04-191-1/+40
| | | | | | | | * generic/tclCmdAH.c: [::tcl::unsupported::EncodingDirs] to permit * generic/tclInt.h: query/set of the encoding search path at * generic/tclInterp.c: the script level. Updated init.tcl to make * library/init.tcl: use of the new command. Also updated several coding practices in init.tcl ("eq" for [string equal], etc.)
* * generic/tclInt.h (TclGetEncodingFromObj): New function todgp2005-04-081-9/+6
| | | | | | | | | * generic/tclEncoding.c (TclGetEncodingFromObj): retrieve a Tcl_Encoding value, as well as cache it in the internal rep of a new "encoding" Tcl_ObjType. * generic/tclCmdAH.c (Tcl_EncodingObjCmd): Updated to call new function so that Tcl_Encoding's used by [encoding convert*] routines are not freed too quickly. [Bug 1077262]
* * generic/tclThread.c: Typo police. Fixed some nitsandreas_kupries2005-01-211-2/+2
| | | | | | * generic/tclCmdAH.c: in header comments of functions. * generic/tclBasic.c: (Missing --). * generic/tclFileName.c:
* TIP #221 IMPLEMENTATIONdgp2004-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: Define [::tcl::Bgerror] in new interps. * generic/tclEvent.c: Update Tcl_BackgroundError to make use of the registered [interp bgerror] command. * generic/tclInterp.c: New [interp bgerror] subcommand. * tests/interp.test: syntax tests updated. TIP #226 IMPLEMENTATION * generic/tcl.decls: Stubs for Tcl_(Save|Restore|Discard)InterpState * generic/tcl.h: New public opaque type, Tcl_InterpState. * generic/tclInt.h: Drop old private declarations. Add Tcl(Get|Set)BgErrorHandler * generic/tclResult.c: Tcl_*InterpState implementations. * generic/tclDictObj.c: Update callers. * generic/tclIOGT.c: * generic/tclTrace.c: TIP #227 IMPLEMENTATION * generic/tcl.decls: Stubs for Tcl_(Get|Set)ReturnOptions. * generic/tclInt.h: Drop old private declarations. * generic/tclResult.c: Tcl_*ReturnOptions implementations. * generic/tclCmdAH.c: Update callers. * generic/tclMain.c:
* * generic/tclCmdAH.c (Tcl_CatchObjCmd, Tcl_ErrorObjCmd):dgp2004-10-211-44/+15
| | | | | | | | | | | | | | | | | | | | | | Updated to call the new TclGet/SetReturnOptions routines to do much of their work. * generic/tclInt.h (TclGetReturnOptions,TclSetReturnOptions): * generic/tclResult.c (TclGetReturnOptions,TclSetReturnOptions): New utility routines to get/set the return options of an interp. Intent is that these routines will be converted to public routines after TIP approval. * generic/tclCmdMZ.c (TclProcessReturn,TclMergeReturnOptions): * generic/tclResult.c (TclProcessReturn,TclMergeReturnOptions): Move internal utility routines from tclCmdMZ.c to tclResult.c. * generic/tclBasic.c (Tcl_CreateInterp, Tcl_DeleteInterp): * generic/tclResult.c (TclTransferResult): Rework so that iPtr->returnOpts can be NULL when there are no special options. * generic/tclResult.c (TclRestoreInterpState): Plug potential memory leak.
* * generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp):dgp2004-10-181-22/+12
| | | | | | | | | | | | * generic/tclCmdAH.c (Tcl_CatchObjCmd): * generic/tclCmdMZ.c (TclMergeReturnOptions,TclProcessReturn): * generic/tclCompCmds.c (TclCompileReturnCmd): * generic/tclExecute.c (TclCompEvalObj): * generic/tclInt.h (Interp): * generic/tclProc.c (TclUpdateReturnInfo): Place primary storage of the -level and -code information in private fields of the Interp struct, rather than in a DictObj. This should significantly improve performance of TclUpdateReturnInfo.
* * generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp,dgp2004-10-151-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TclEvalObjvInternal,Tcl_LogCommandInfo,TclAddObjErrorInfo): * generic/tclCmdAH.c (Tcl_CatchObjCmd): * generic/tclEvent.c (BgError,ErrAssocData,Tcl_BackgroundError, HandleBgErrors,BgErrorDeleteProc): * generic/tclExecute.c (TclCreateExecEnv,TclDeleteExecEnv): * generic/tclIOUtil.c (comments only): * generic/tclInt.h (ExecEnv,Interp, ERR_IN_PROGRESS): * generic/tclInterp.c ([tclInit]): * generic/tclMain.c (comments only): * generic/tclNamesp.c (Tcl_CreateNamespace,Tcl_DeleteNamespace,TclTeardownNamespace): * generic/tclProc.c (TclUpdateReturnInfo): * generic/tclResult.c (Tcl_ResetResult,TclTransferResult): * generic/tclTrace.c (CallVarTraces): Reworked management of the "errorInfo" data of an interp. That information is now primarily stored in a new private (Tcl_Obj *) field of the Interp struct, rather than using a global variable ::errorInfo as the primary storage. The ERR_IN_PROGRESS flag bit value is no longer required to manage the value in its new location, and is removed. Variable traces are established to support compatibility for any code expecting the ::errorInfo variable to hold the information. ***POTENTIAL INCOMPATIBILITY*** Code that sets traces on the ::errorInfo variable may notice a difference in timing of the firing of those traces. Code that uses the value ERR_IN_PROGRESS.
* Minor formatting fixesdkf2004-10-061-95/+94
|
* * generic/tclBasic.c:dgp2004-10-061-49/+36
| | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: It is a poor practice to directly set or append to the value of the objResult of an interp, because that value might be shared, and in that circumstance a Tcl_Panic() will be the result. Searched for example of this practice and replaced with safer alternatives, often using the Tcl_AppendResult() routine that dkf just rehabilitated.
* * generic/tclBasic.c (Tcl_CreateInterp,Tcl_DeleteInterp,dgp2004-10-051-3/+2
| | | | | | | | | | | | | | | | | | | | TclEvalObjvInternal,Tcl_LogCommandInfo): * generic/tclCmdAH.c (Tcl_CatchObjCmd): * generic/tclEvent.c (BgError,Tcl_BackgroundError,HandleBgErrors): * generic/tclInt.h (Interp, ERROR_CODE_SET): * generic/tclNamesp.c (Tcl_CreateNamespace,Tcl_DeleteNamespace,TclTeardownNamespace): * generic/tclResult.c (Tcl_ResetResult,Tcl_SetObjErrorCode,TclTransferResult): * generic/tclTrace.c (CallVarTraces): Reworked management of the "errorCode" data of an interp. That information is now primarily stored in a new private (Tcl_Obj *) field of the Interp struct, rather than using a global variable ::errorCode as the primary storage. The ERROR_CODE_SET flag bit value is no longer required to manage the value in its new location, and is removed. Variable traces are established to support compatibility for any code expecting the ::errorCode variable to hold the information.
* * generic/tclBasic.c (Tcl_AddObjErrorInfo): More re-organizationdgp2004-09-301-2/+4
| | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c (Tcl_ErrorObjCmd): of the management of * generic/tclCmdMZ.c (TclProcessReturn): the errorCode value. * tests/error.test (error-6.4-9): * generic/tclNamespace.c (TclTeardownNamespace): Tcl_Obj-ified * tests/namespace.test (namespace-8.5,6): the save/restore of ::errorInfo and ::errorCode during global namespace teardown. Revised the comment to clarify why this is done, and added tests that will fail if this is not done. * generic/tclResult.c (TclTransferResult): Added safety checks so that unexpected undefined ::errorInfo or ::errorCode will not lead to a segfault. * generic/tclTrace.c (TclCallVarTraces): Save/restore the flag * tests/var.test (var-16.1): values that define part of the interpreter state during variable traces. [Bug 10381021].
* removed some workarounds for Bug 868489Kevin B Kenny2004-09-271-13/+2
|
* * generic/tclCmdAH.c (Tcl_ExprObjCmd): Simplified the TclObjCmdProcdgp2004-09-231-34/+5
| | | | of [expr] with a call to Tcl_ConcatObj.
* * generic/tclCmdAH.c: removed outdated comment [Bug 1029518].Miguel Sofer2004-09-191-7/+1
|
* * generic/tclBasic.c (Tcl_AddObjErrorInfo, Tcl_LogCommandInfo):dgp2004-09-171-13/+2
| | | | | | | | | | | | * generic/tclCmdAH.c ([catch], [error]): * generic/tclCmdMZ.c ([return]): * generic/tclProc.c (TclUpdateReturnInfo): * generic/tclResult.c (Tcl_SetErrorCodeVA, Tcl_SetObjErrorCode TclTransferResult): Refactored so that all errorCode setting flows through Tcl_SetObjErrorCode(). This greatly reduces the number of different places in the code that need to know details about an internal bitflag field of the Interp struct. Also places errorCode setting in one place for easier future mods.
* TIP#143 implementation; still needs docs and more tests...dkf2004-05-131-2/+13
|
* Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* Removed support for Mac OS Classic platform [Patch 918142]das2004-03-171-7/+4
|
* fixed typos in documentation and commentsvincentdarley2004-03-091-2/+3
|
* * generic/tclCmdAH.c (StoreStateData): Removed improper refcountdgp2004-02-041-2/+4
| | | | | decrement of the varName parameter. This error was causing segfaults following test cmdAH-28.7.
* filesystem optimisation -- Three main issues accomplished: (1) cleaned up ↵vincentdarley2004-01-211-80/+61
| | | | variable names in
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-3/+3
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* fix to file normalization with relative linksvincentdarley2003-12-171-3/+15
|
* file normalize ~nobody fixvincentdarley2003-12-121-1/+4
|
* fix to misleading error messagevincentdarley2003-11-101-8/+17
|
* Changed FILE_ to FCMD_ to prevent symbol/#def collisions. [Bug 822528]dkf2003-10-221-77/+66
|
* * generic/tclCmdAH.c: Corrected bug in TIP 90 implementationdgp2003-08-291-1/+8
| | | | | | * tests/cmdMZ.test: where the default -errorcode NONE value was not copied into the return options dictionary. This correction modified one test result.
* Stopped [format] from demoting wides to ints too easily. [Bug 699060]dkf2003-05-141-3/+14
|
* * generic/tclBasic.c: Implementation of TIP 90, whichdgp2003-05-051-7/+62
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: extends the [catch] and [return] * generic/tclCompCmds.c: commands to enable creation of a * generic/tclExecute.c: proc that is a replacement for * generic/tclInt.h: [return]. [Patch 531640] * generic/tclProc.c: * generic/tclResult.c: * tests/cmdAH.test: * tests/cmdMZ.test: * tests/error.test: * tests/proc-old.test: * library/tcltest/tcltest.tcl: The -returnCodes option to [test] failed to recognize the symbolic name "ok" for return code 0.
* * generic/tcl.h Made changes so that the "wideInt" Tcl_ObjTypedgp2003-04-161-13/+1
| | | | | | | | | | | | | | | | | | | | | | * generic/tclObj.c is defined on all platforms, even those where * generic/tclPort.h TCL_WIDE_INT_IS_LONG is defined. Also made the Tcl_Value struct have a wideValue field on all platforms. This is a ***POTENTIAL INCOMPATIBILITY*** for TCL_WIDE_INT_IS_LONG platforms because that struct changes size. This is the same TIP 72 incompatibility that was seen on other platforms at the 8.4.0 release, when this change should have happened as well. [Bug 713562] * generic/tclInt.h: New internal macros TclGetWide() and TclGetLongFromWide() to deal with both forms of the "wideInt" Tcl_ObjType, so that conditional TCL_WIDE_INT_IS_LONG code is confined to the header file. * generic/tclCmdAH.c: Replaced most coding that was conditional * generic/tclCmdIL.c: on TCL_WIDE_INT_IS_LONG with code that * generic/tclExecute.c: works across platforms, sometimes using * generic/tclTest.c: the new macros above to do it. * generic/tclUtil.c: * generic/tclVar.c:
* Use correct test for the empty string in Tcl_ErrorObjCmddkf2003-04-081-2/+2
|
* * generic/tclCmdAH.c (Tcl_FormatObjCmd): Only add the modifierdkf2003-03-141-149/+159
| | | | | | that indicates we've got a wide int when we're formatting in an integer style. Stops some libc's from going mad. [Bug #702622] Also tidied whitespace.
* * generic/tclCmdAH.c (Tcl_FileObjCmd): Fix the setting of a file's mtimedkf2003-03-071-7/+19
| | | | and atime on 64-bit platforms. [Bug #698146]
* clearer error msgs for file linkvincentdarley2002-07-021-2/+2
|
* tip99vincentdarley2002-06-211-5/+95
|
* vfs, winfs testsuitevincentdarley2002-06-131-2/+2
|
* generic/tclCmdAH.c (Tcl_FileObjCmd): added cast in FILE_SIZEhobbs2002-04-231-3/+4
|