summaryrefslogtreecommitdiffstats
path: root/generic/tclPkg.c
Commit message (Collapse)AuthorAgeFilesLines
* Reduce use of Tcl_AppendElement, which is not (and can't be) a Tcl_Obj-aware ↵dkf2011-05-091-17/+28
| | | | | API. FossilOrigin-Name: dbab97cbba58a39c357af59d4ab96a4d419cc9d7
* More generation of error codes (namespace creation, path normalization,dkf2011-04-031-14/+30
| | | | | pipeline creation, package handling, procedures, [scan] formats) FossilOrigin-Name: a6c95ed9e060d601f5fecd29fdadf14567d377ff
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-6/+6
| | | | | rest of Tcl source code. No ABI change. API change *should* be harmless. FossilOrigin-Name: 5574bdd262b2672cde48771787370c12854cecf4
* Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ | | | | | | | | cause more harm than good. Purged them (except in zlib files). FossilOrigin-Name: c64f310d38b977e7ae26a48bcf8bb8c50e453af7
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ | | | | | | | | | | | | more harm than good. Purged them. FossilOrigin-Name: 79367df0f0e01a96f037f893e889e7cb9b807847
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | | | | | | | more harm than good. Purged them. FossilOrigin-Name: 90b4acd7bdab65433169a232124967885c18d972
| | * * generic/tclPkg.c: Backport fix for [1573844] to thedgp2007-09-191-802/+484
| | | | | | | | | | | | | | | | | | * tests/pkg.test: TCL_TIP268 sections. FossilOrigin-Name: 69225f179ab55eba6e40f459dc5f277860760dc0
| | * * generic/tclEvent.c (Tcl_CreateThread): Replaced some calls todgp2007-03-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclPkg.c (CheckVersion): Tcl_Alloc() with calls to * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better * win/tclAppInit.c (setargv): supports memory debugging. FossilOrigin-Name: 801b5dc41c0bffb2278f82825a7cda803f16faaf
| | * Backport to 8.4 (Don Porter's work).andreas_kupries2006-12-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When no requirements are supplied to a [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: fb9873f4571dec518c943740f9646b7d62faf02e
| | * * generic/tclPkg.c (Tcl_PkgRequireEx): Corrected crash whenandreas_kupries2006-10-111-8/+12
| | | | | | | | | | | | | | | | | | | | | argument version==NULL passed in. Backport of the fix for the same problem in 8.5. FossilOrigin-Name: 52ce4a8c3aef5bd7835b2c22787e7cdde919d956
| | * * generic/tclPkg.c (Tcl_PkgRequireEx): Changes handling of theandreas_kupries2006-09-221-2/+59
| | | | | | | | | | | | | | | | | | | | | | | | return information from 'Tcl_PkgRequireProc'. Keep the interpreter result empty. Backport of fix for problem found while testing #268 under 8.5. More details in the comments. FossilOrigin-Name: 1f5d22e0081b37097d63a8a10d6e5f8e5982eb0f
| | * * generic/tcl.decls: Implemented TIP #268, conditionally.andreas_kupries2006-09-221-86/+1288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: Define TCL_TIP268 to activate the new * generic/tclDecls.h: features. * generic/tclInt.h: * generic/tclPkg.c: * generic/tclStubInit.c: * generic/tclTest.c: * library/init.tcl * library/package.tcl: * tests/pkg.test: * tests/platform.test: * tests/safe.test: * doc/PkgRequire.3: FossilOrigin-Name: 78a272c42aaf7c6c9472f55bef7a82605b1cc2c6
| | * * generic/tclIOGT.c (ExecuteCallback):hobbs2006-08-301-4/+5
| | | | | | | | | | | | | | | | | | | | | * generic/tclPkg.c (Tcl_PkgRequireEx): replace Tcl_GlobalEval(Obj) with more efficient Tcl_Eval(Obj)Ex FossilOrigin-Name: 0ac1070d51a9d30e76bfc2993c3ff552ba4c3ad1
| | * * generic/tclPkg.c: Revised Bug 1162286 fix from 2005-11-08dgp2006-04-051-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | to be even more forgiving of package version mismatch errors in [package ifneeded] commands, not even logging any warning messages. This further reduces the ***POTENTIAL INCOMPATIBILITY*** noted for that change. FossilOrigin-Name: a37aac53e5604cc00ba7711c5ae48a2bf78c7eb3
| | * * generic/tclPkg.c: Revised Bug 1162286 fix from 2005-11-08dgp2005-11-181-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | * tests/pkg.test: to be more forgiving of package version mismatch errors in [package ifneeded] commands. This reduces the ***POTENTIAL INCOMPATIBILITY*** noted for that change. FossilOrigin-Name: 833824de408392cf86d1cc2a978b42a5b56ad6c7
| | * * generic/tclPkg.c: Corrected inconsistencies in the value returneddgp2005-11-081-14/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]. * tests/namespace.test (25.7,8): Backport test of knownBug. FossilOrigin-Name: dfc063650902e65f268e11a90c830db64c709c0c
| * | Various trivial fixes, discovered during CYGWIN porting attempt. All ↵nijtmans2010-01-061-2/+2
| | | | | | | | | | | | | | | backported from trunk. FossilOrigin-Name: 100e5d2f1262afde210c7844d866359a8409924c
| * | * generic/tclStubLib.c (Tcl_InitStubs): Added missing error message.dgp2008-04-011-1/+3
| | | | | | | | | | | | | | | | | | * generic/tclPkg.c (Tcl_PkgInitStubsCheck): FossilOrigin-Name: 114062b0f34f3a15c92db97e6c8233fec76b7724
* | | [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