summaryrefslogtreecommitdiffstats
path: root/generic/tclPkg.c
Commit message (Collapse)AuthorAgeFilesLines
* [Patch 2997642] many type casts needed when using Tcl_Pkg* API. Remaining part.nijtmans2010-08-311-4/+4
| | | | | | Typo in rules.vc FossilOrigin-Name: ea7f85f0787c4b9b90454119cf4147a01074a7d1
* [Patch 2997642] many type casts needed when using Tcl_Pkg* API. Partly.nijtmans2010-08-301-7/+8
| | | FossilOrigin-Name: 108cf5bef2c2962152b44fd89103abcea7725e0e
* Unnecessary type casts, See Tcl [Patch #2997087]nijtmans2010-05-051-12/+12
| | | FossilOrigin-Name: 7f0a7f532c5c5fb0ec785e16c77459f658250ee7
* Fix gcc warning, using gcc-4.3.4 on cygwinnijtmans2009-12-111-2/+2
| | | | | | | warning: array subscript has type 'char' win/makefile.vc Revert to version 1.203 [Bug #2912773] FossilOrigin-Name: 574533920e342b96bb7273401972575c42fc638c
* Fix gcc warning, using gcc-4.3.4 on cygwinnijtmans2009-12-111-2/+2
| | | | | | | warning: array subscript has type 'char' win/makefile.vc Revert to version 1.203 [Bug #2912773] FossilOrigin-Name: 78b6d8b10a9820efb9c5c76a64057b01fe66a728
* - eliminate some unnessary type castsnijtmans2009-02-101-4/+5
| | | | | | | - some internal const decorations - spacing FossilOrigin-Name: 160bcb11525977fb1ee14ae1e09ba9cb60b29920
* Add "const" to many internalnijtmans2008-10-161-3/+3
| | | | | | | const tables. No functional or API change. FossilOrigin-Name: f03d2e2d83be42035c4aad3b01bbd09f5a967c1b
* fix [2021443] inconsistant "wrong # args" messagesnijtmans2008-07-191-3/+3
| | | FossilOrigin-Name: 1e5261316ed076ff5ff69f2a720e8eff30fcf66e
* more consistent wrong # arg messages: change all messages containing ↵nijtmans2008-07-131-2/+2
| | | | | ?options? to the form ?-option value ...? FossilOrigin-Name: 7dcec0e5e289de4aed4290b3ee93e1e425c765e0
* * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message.dgp2008-04-011-1/+3
| | | | | | * generic/tclPkg.c (Tcl_PkgInitStubsCheck): FossilOrigin-Name: 80180a983ea5a424466c7658ab3ba74f4b975539
* merge stable branch onto HEADdgp2007-12-131-1/+1
| | | FossilOrigin-Name: d1f7550cd9bf1343d8505fb99fc5141b58bb88bf
* A little more errorCode goodnessdkf2007-11-211-4/+10
| | | FossilOrigin-Name: b9874122269c67c0f048e21d7370369d6741a0ec
* More minor cleanupdkf2007-11-181-71/+77
| | | FossilOrigin-Name: 2746b844cadd89c74077393da3fe02624ac8b162
* formattingdgp2007-09-191-9/+5
| | | FossilOrigin-Name: b9346cfaafe41ebfe38b1ea981cac62a231bc0d2
* * generic/tcl.h: Revised Tcl_InitStubs() to restore Tcl 8.4dgp2007-09-171-1/+45
| | | | | | | | * generic/tclPkg.c: source compatibility with callers of * generic/tclStubLib.c: Tcl_InitStubs(interp, TCL_VERSION, 1). [Bug 1578344]. FossilOrigin-Name: 99a55f90cc74c5e61be1890fecd57fefc4dd2b7b
* * doc/package.n: Restored the functioning ofdgp2007-09-111-188/+57
| | | | | | | * generic/tclPkg.c: [package require -exact] to be compatible * tests/pkg.test: with Tcl 8.4. [Bug 1578344]. FossilOrigin-Name: cdec5768d283d39fe509700d65573f3f20a523d1
* * doc/package.n: Restored the document parallel syntax of thedgp2007-09-101-55/+35
| | | | | | | * generic/tclPkg.c: [package present] and [package require] * tests/pkg.test: commands. [Bug 1723675] FossilOrigin-Name: 0cb66c55eaa9d86625bbc44740dd6754b9327c88
* Replaced commas in varargs with string concatenation where possible [Patch ↵kennykb2007-04-201-4/+4
| | | | | 1515234] FossilOrigin-Name: d0d3c30f1a60ecb75cdca7e63593bb7d7a98f017
* * generic/tclPkg.c: When no requirements are supplied to adgp2006-12-051-1/+3
| | | | | | | | | | | | | | * tests/pkg.test: [package require $pkg] and [package unknown] is invoked to find a satisfying package, pass the requirement argument "0-" (which means all versions are acceptable). This permits a registered [package unknown] command to call [package vsatisfies $testVersion {*}$args] without any special handling of the empty $args case. This fixes/avoids a bug in [::tcl::tm::UnknownHandler] that was causing old TM versions to be provided in preference to newer TM versions. Thanks to Julian Noble for discovering the issue. FossilOrigin-Name: d0d079458eda92ea703288459a6087f9757a3e1e
* TIP#270 IMPLEMENTATIONdgp2006-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c: FossilOrigin-Name: c06db721ddaef087134ceb16494452e128734656
* Rewrite for style and clarity (esp. tclPkg.c)dkf2006-11-081-393/+513
| | | FossilOrigin-Name: 36e6a4022c2879b875b7b1594589b819f27dd336
* * generic/tclBasic.c: Further revised TclAppendPrintToObj() anddgp2006-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable * generic/tclCmdAH.c: to complete their formatting operations, rather * generic/tclCmdIL.c: than report an error message. This means an * generic/tclCmdMZ.c: interp argument for error message recording is * generic/tclDictObj.c: no longer needed, further simplifying the * generic/tclExecute.c: interface for callers. * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c: FossilOrigin-Name: 6ed730551a7e2593690d85e4d67299a630363e39
* * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of * generic/tclCmdIL.c: routines TclAppendPrintfToObj, * generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and * generic/tclDictObj.c: TclObjFormat, with the intent of making * generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj * generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via * generic/tclIOUtil.c: a revised TIP 270. * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c: FossilOrigin-Name: 65113c21ec5b011eb6d2df6a1b2552f2e410cf86
* * generic/tclPkg.c (ExactRequirement): Plugged memory leak. Alsodgp2006-10-161-4/+5
| | | | | | | changed Tcl_Alloc()/Tcl_Free() calls to ckalloc()/ckfree() for easier memory debugging in the future. [Bug 1568373] FossilOrigin-Name: ac929e49a1b957a65887502a5926fc1f3df8c448
* * generic/tclPkg.c (Tcl_PackageRequireEx): Corrected crashdgp2006-10-111-8/+12
| | | | | | when argument version=NULL passed in. FossilOrigin-Name: 8da4fb126fef079cd93c433addbcf39a5762af5c
* * generic/tclPkg.c (CompareVersions): Bugfix. Check string lengthsandreas_kupries2006-09-281-9/+17
| | | | | | | | | * tests/pkg.test: before comparison. The shorter string is the smaller number. Added testcases as well. Interestingly all existing test cases for vcompare compared numbers of the same length with each other. See [SF Tcl Bug 1563836]. FossilOrigin-Name: 84ce5a0a3512f0151555ef23ac922b04e927a56a
* * generic/tclPkg.c (CompareVersion): Flatten strcmp() results todgp2006-09-281-1/+2
| | | | | | {-1, 0, 1} to match expectations of CompareVersion() callers. FossilOrigin-Name: 7f4a2f231003257eab652cff6aaee1ac497b1fe2
* * tests/pkg.test: Added test for version comparison at the 32bitandreas_kupries2006-09-271-38/+89
| | | | | | | | | | | | | | | boundary. [SF Tcl Bug 1563836]. * generic/tclPkg.c: [SF Tcl Bug 1563836]. Rewrote CompareVersion to perform string comparison instead of numeric. This breaks through the 32bit limit on version numbers. See code for details (handling of leading zeros, signs, etc.). un-CONSTed some arguments of CompareVersions, RequirementSatisfied, and AllRequirementsSatisfied. The new compare modifies the string (temporary string terminators). All callers use heap-allocated ver-intreps, so we are good with that. FossilOrigin-Name: d0cad630042b2210d0c79d04ccd71992ac9e2d50
* TIP#268 IMPLEMENTATIONandreas_kupries2006-09-221-130/+857
| | | | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: Regenerated from tcl.decls. * generic/tclStubInit.c: * doc/PkgRequire.3: Documentation of extended API, * doc/package.n: extended testsuite. * tests/pkg.test: * generic/tcl.decls: Implementation. * generic/tclBasic.c: * generic/tclConfig.c: * generic/tclInt.h: * generic/tclPkg.c: * generic/tclTest.c: * generic/tclTomMathInterface.c: * library/init.tcl: * library/package.tcl: * library/tm.tcl: FossilOrigin-Name: 055195c6bce7cf3bc2a1dc2c88b333d9e9b4485c
* * generic/tclIOGT.c (ExecuteCallback):hobbs2006-08-301-3/+4
| | | | | | | * generic/tclPkg.c (Tcl_PkgRequireEx): replace Tcl_GlobalEval(Obj) with more efficient Tcl_Eval(Obj)Ex FossilOrigin-Name: adcd7cfba20c6238301627600eae9057b2d20bd9
* * generic/tclPkg.c: Corrected inconsistencies in the value returneddgp2005-11-081-14/+83
| | | | | | | | | * tests/pkg.test: by Tcl_PkgRequire(Ex) so that the returned values will always agree with what is stored in the package database. This way repeated calls to Tcl_PkgRequire(Ex) have the same results. Thanks to Hemang Lavana. [Bug 1162286]. FossilOrigin-Name: 2d05d9f40a62f0b7ccee07b32bb3f36629b60d64
* ANSIfydkf2005-11-021-103/+95
| | | FossilOrigin-Name: c8e360304c4d2d1f33cf1fb3a998e2fe3c548471
* Getting more systematic about styledkf2005-07-191-427/+409
| | | FossilOrigin-Name: f9332bdd5d0a4fbe98144f883523a472b455e076
* * generic/tclBasic.c:dgp2004-10-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclDictObj.c: * generic/tclEncoding.c: * generic/tclExecute.c: * generic/tclFCmd.c: * generic/tclHistory.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclResult.c: * generic/tclScan.c: * generic/tclTimer.c: * generic/tclTrace.c: * generic/tclUtil.c: * generic/tclVar.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. FossilOrigin-Name: 9883f6bfdbddaaa872bc699ef19f8458de716f73
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-2/+2
| | | | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264] FossilOrigin-Name: 524a53e3b36111f085cdb216a27da061773239ae
* * generic/tclInt.h:dgp2002-02-221-19/+63
| | | | | | | | | * generic/tclObj.c: renamed global variable emptyString -> tclEmptyString because it is no longer static. * generic/tclPkg.c: Fix for panic when library is loaded on a platform without backlinking without proper use of stubs. [Bug 476537] FossilOrigin-Name: d709125ee9ada20f55720c1066af19ffb34f192a
* * More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that weredgp2002-01-171-2/+2
| | | | | | | | | overlooked before. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes a source incompatibility in the tablePtr arguments of the Tcl_GetIndexFromObj* routines. FossilOrigin-Name: 28b6020550dd9e62f46b824e4c2ba2a6302657f6
* * [package forget] now forgets all of thedgp2001-08-061-2/+2
| | | | | | | package arguments it receives, not stopping when a package is not found. [Bug 415273] FossilOrigin-Name: bae87bd0068ae118d52a5412f8e5d9dd1839de79
* (TIP#27) Changed a number of Tcl API's to accept "CONST char*"kennykb2001-04-041-27/+30
| | | | | | in place of simple "char*". (kennykb) [Patch #404026] FossilOrigin-Name: bda1abaf857abf5feb7ebd78aeb1f6a60fcbb8c0
* 1999-09-16 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-09-211-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/timer.test: changed after delay in timer test 6.29 from 1 to 10. [Bug: 2796] * tests/pkg.test: * generic/tclPkg.c: fixed package version check to disallow 1.2..3 [Bug: 2539] * unix/Makefile.in: fixed gendate target - this never worked since RCS was intro'd. * generic/tclGetDate.y: updated to reflect previous changes to tclDate.c (leap year calc) and added CEST and UCT time zone recognition. Fixed 4 missing UCHAR() casts. [Bug: 2717, 954, 1245, 1249] * generic/tclCkalloc.c: changed Tcl_DumpActiveMemory to really dump to stderr and close it [Bug: 725] and changed Tcl_Ckrealloc and Tcl_Ckfree to not bomb when NULL was passed in [Bug: 1719] and changed Tcl_Alloc, et al to not panic when a alloc request for zero came through and NULL was returned (valid on AIX, Tru64) [Bug: 2795, etc] * tests/clock.test: * doc/clock.n: * generic/tclClock.c: added -milliseconds switch to clock clicks to guarantee that the return value of clicks is in the millisecs granularity [Bug: 2682, 1332] 1999-09-15 Jeff Hobbs <hobbs@scriptics.com> * generic/tclIOCmd.c: fixed potential core dump in conjunction with stacked channels with result obj manipulation in Tcl_ReadChars [Bug: 2623] * tests/format.test: * generic/tclCmdAH.c: fixed translation of %0#s in format [Bug: 2605] * doc/msgcat.n: fixed \\ bug in example [Bug: 2548] * unix/tcl.m4: * unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition [Bug: 2070] and fix for IRIX SHLIB_LB_LIBS. [Bug: 2610] * doc/array.n: * tests/var.test: * tests/set.test: * generic/tclVar.c: added an array unset operation, with docs and tests. Variation of [Bug: 1775]. Added fix in TclArraySet to check when trying to set in a non-existent namespace. [Bug: 2613] 1999-09-14 Jeff Hobbs <hobbs@scriptics.com> * tests/linsert.test: * doc/linsert.n: * generic/tclCmdIL.c: fixed end-int interpretation of linsert to correctly calculate value for end, added test and docs [Bug: 2693] * doc/regexp.n: * doc/regsub.n: * tests/regexp.test: * generic/tclCmdMZ.c: add -start switch to regexp and regsub with docs and tests * doc/switch.n: added proper use of comments to example. * generic/tclCmdMZ.c: changed switch to complain when an error occurs that seems to be due to a misplaced comment. * generic/tclCmdMZ.c: fixed illegal ref for \[0-9] substitutions in regsub [Bug: 2723] * generic/tclCmdMZ.c: changed [string equal] to return an Int type object (was a Boolean) FossilOrigin-Name: eb68adcdfd2b621fe83410354568df693c95a1fc
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-218/+258
| | | FossilOrigin-Name: f3b32fb71c9011ac220779bd9dbe5617c9dc87d9
* Merged stubs changes into mainline for 8.0stanton1999-03-101-6/+208
| | | FossilOrigin-Name: 19696933517612024e7dbcfee6e3c8d3b4e41772
* Replaced SCCS strings, fixed binary filescore-8-0-3stanton1998-09-141-1/+1
| | | FossilOrigin-Name: 196f92fd17305db5fec1acd59f6926de11e01624
* Initial revisionrjohnson1998-03-261-0/+734
FossilOrigin-Name: cacdd0f329872d67973970d74c6978730bc24baa