summaryrefslogtreecommitdiffstats
path: root/generic/tclGet.c
Commit message (Collapse)AuthorAgeFilesLines
* 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/tclGet.c (Tcl_GetInt): Corrected error that did notdgp2005-04-201-2/+6
| | | | | | | | | | | | | | | | | | | | | * generic/tclObj.c (Tcl_GetIntFromObj): permit 0x80000000 to be recognized as an integer on TCL_WIDE_INT_IS_LONG systems [Bug 1090869]. FossilOrigin-Name: 3d004086cf2cbf508c758003c0add781fe0ae33c
| * | * generic/tclGet.c: Corrected out of date comments.dgp2008-07-081-7/+9
| | | | | | | | | FossilOrigin-Name: e4ee9a06593ab49d058c35197b79284dae3639a2
* | | * generic/tclGet.c: Corrected out of date comments and removeddgp2008-07-081-50/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: internal routine TclGetLong() that's no longer used. If an extension is using this from the internal stubs table, it can shift to the public routine Tcl_GetLongFromObj() or can request addition of a public Tcl_GetLong(). ***POTENTIAL INCOMPATIBILITY*** * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: FossilOrigin-Name: 006f71d8fb9cbcab88a2c05cbace6bb4cc6f075b
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-5/+5
|/ / | | | | FossilOrigin-Name: 2d205c22fbe5def21ccd36bc6f7b2d3831f6122d
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| | | | | | FossilOrigin-Name: d1f7550cd9bf1343d8505fb99fc5141b58bb88bf
* | * generic/tclGet.c (Tcl_Get, Tcl_GetInt): revert use of TclGet*hobbs2007-11-121-3/+3
| | | | | | | | | | | | macros due to compiler warning. These cases won't save time either. FossilOrigin-Name: 22bc9d9f9aa74737000565ca23e4d9dfeca2a018
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵msofer2007-11-111-3/+3
| | | | | | | | | | objTypes. FossilOrigin-Name: 11e8f3151249a669790af1ab8897b1451aa5b47b
* | ANSIfydkf2005-11-071-18/+17
| | | | | | FossilOrigin-Name: 611d25e47cc0ca4006b861534bc098fb11548f02
* | Getting more systematic about styledkf2005-07-241-37/+43
| | | | | | FossilOrigin-Name: 83d72c558cc66d1e10666e2fab0f6e87addb5c3d
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232kennykb2005-05-101-1/+1
| | | | | | FossilOrigin-Name: 1cc2336920c70c6b9f7825b88dec87fc223f2c4e
* | * doc/DString.3: Eliminated use of identifier "string" in Tcl'sdgp2005-05-031-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Environment.3: public C API to avoid conflict/confusion with * doc/Eval.3: the std::string of C++. * doc/ExprLong.3, doc/ExprLongObj.3, doc/GetInt.3, doc/GetOpnFl.3: * doc/ParseCmd.3, doc/RegExp.3, doc/SetResult.3, doc/StrMatch.3: * doc/Utf.3, generic/tcl.decls, generic/tclBasic.c, generic/tclEnv.c: * generic/tclGet.c, generic/tclParse.c, generic/tclParseExpr.c: * generic/tclRegexp.c, generic/tclResult.c, generic/tclUtf.c: * generic/tclUtil.c, unix/tclUnixChan.c: * generic/tclDecls.h: `make genstubs` FossilOrigin-Name: 83aa957ebe8d942b417ec080d6731e06e930ba73
* | The 2005-04-21 changes to Tcl_GetBooleanFromObj were done to bringdgp2005-04-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it into agreement with its docs. Further investigation reveals it was the docs that were incorrect. * doc/BoolObj.3: Corrections to the documentation of Tcl_GetBooleanFromObj to bring it into agreement with what this public interface has always done, including noting the difference in function between Tcl_GetBooleanFromObj and Tcl_GetBoolean. * generic/tclGet.c: Revised Tcl_GetBoolean to no longer be a wrapper around Tcl_GetBooleanFromObj (different function!). * generic/tclObj.c: Removed TclGetTruthValueFromObj routine that was added yesterday. Revisions so that only Tcl_GetBoolean-approved values get the "boolean" Tcl_ObjType. This retains the fix for [Bug 1187123]. * generic/tclInt.h: Revert most recent change. * generic/tclBasic.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * tests/obj.test: FossilOrigin-Name: 9cc02e7123c8bd490dcba2a367879cf75b198d25
* | * generic/tclGet.c: Radical code simplification. Converteddgp2005-04-211-63/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tcl_GetFoo() routines into wrappers around Tcl_GetFooFromObj(). Reduces code duplication, and the resulting potential for inconsistency. * generic/tclObj.c: Several changes: - Fixed Tcl_GetBooleanFromObj to agree with its documentation and with Tcl_GetBoolean, accepting only "0" and "1" and not other numeric strings. [Bug 1187123] - Added new private routine TclGetTruthValueFromObj to perform the more permissive conversion of numeric values to boolean that is needed by the [expr] machinery. * generic/tclInt.h (TclGetTruthValueFromObj): New routine. * generic/tclExecute.c: Updated callers to call new routine. * tests/obj.test: Corrected bad tests that actually expected values like "47" and "0xac" to be accepted as booleans. FossilOrigin-Name: c5a5c3f411996512fd101be94fa70877fc8e1e88
* | * doc/GetInt.3: Convert argument "string" to "str" to agree with code.dgp2005-04-211-157/+49
| | | | | | | | | | | | | | | | | | Also clarified a few details on int and double formats. * generic/tclGet.c: Radical code simplification. Converted most Tcl_GetFoo() routines into wrappers around Tcl_GetFooFromObj(). Reduces code duplication, and the resulting potential for inconsistency. FossilOrigin-Name: c2065c79f65ac41101a10f1d38df5c3eaceb237c
* | * generic/tclGet.c (Tcl_GetInt): Corrected error that did notdgp2005-04-201-2/+6
| | | | | | | | | | | | | | * generic/tclObj.c (Tcl_GetIntFromObj): permit 0x80000000 to be recognized as an integer on TCL_WIDE_INT_IS_LONG systems [Bug 1090869]. FossilOrigin-Name: 4e2a92f9008ca165936b2c9a348e50dea855521f
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-3/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | * 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): FossilOrigin-Name: 2e5b18c85c944b46540edfdd6580648e32645e2b
* * generic/tclUtil.c (SetEndOffsetFromAny): handle integer offsethobbs2002-11-191-9/+19
| | | | | | | | | | | | after the "end-" prefix. * generic/get.test: * generic/string.test: * generic/tclObj.c (SetIntFromAny, SetWideIntFromAny): * generic/tclGet.c (TclGetLong, Tcl_GetInt): simplify sign handling before calling strtoul(l). [Bug #634856] FossilOrigin-Name: 9ed60484106be0df1d59f7a63c433c7e7e957725
* * Updated APIs in generic/tclGet.cdgp2001-09-251-7/+9
| | | | | | according to the guidelines of TIP 27. [Patch 464674] FossilOrigin-Name: 7f1745dad6149cd3035dd4d802654d93c4b822a1
* * generic/tclGet.c (Tcl_GetDouble): Added additional conditions toericm2000-03-311-2/+3
| | | | | | | | | | | | | | | | | | | error test (previously only errno was checked, but the return value of strtod() should be checked as well). [Bug: 4118]. * tests/exec.test: Added test for proper conversion of UTF data when used with "<< $dataWithUTF" on exec's. * unix/tclUnixPipe.c (TclpCreateTempFile): Added Tcl_UtfToExternalDString call, so that if there is UTF content in the string it will be properly converted to the system encoding before being written [Bug: 4030]. (TclpCreateTempFile): Added a check on the return value of tmpnam; some systems (Linux, for example) will start to return NULL after tmpnam has been called TMP_MAX times; not checking for this can have bad results (overwriting temp files, core dumps, etc.) FossilOrigin-Name: 27f457dd13bd11383a15651c5e9c2bcbc947599b
* * tests/expr-old.test:hobbs1999-12-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/parseExpr.test: * tests/string.test: * generic/tclGet.c: * generic/tclInt.h: * generic/tclObj.c: * generic/tclParseExpr.c: * generic/tclUtil.c: * generic/tclExecute.c: added TclCheckBadOctal routine to enhance error message checking for when users use invalid octal numbers (like 08), as well as replumbed the Expr*Funcs with a new VerifyExprObjType to simplify type handling. * tests/expr.test: * generic/tclCompile.c: fixed 'bad code length' error for 'expr + {[incr]}' case, with new test case [Bug: 3736] and seg fault on 'expr + {[error]}' (different cause) that was caused by a correct optimization that didn't correctly track how it was modifying the source string in the opt. The optimization was removed, which means that: expr 1 + {[string length abc]} will be not be compiled inline as before, but this should be written: expr {1 + [string length abc]} which will be compiled inline for speed. This prevents expr 1 + {[mindless error]} from seg faulting, and only affects optimizations for degenerate cases [Bug: 3737] FossilOrigin-Name: bc2b85b9c25cb34899d95dc05eed84694149d3ba
* 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-08-191-5/+5
| | | | | | | | | | | | | | | | * doc/OpenFileChnl.3: * doc/file.n: * tests/cmdAH.test: * tclIO.c: * tclCmdAH.c: added "file channels ?pattern?" tcl command, with associated Tcl_GetChannelNames and Tcl_GetChannelNamesEx public C APIs (added to tcl.decls as well), with docs and tests. * generic/tclCompile.c: add TCL_TOKEN_VARIABLE to the part types that cause differed compilation for exprs, to correct the expr double-evaluation problem for vars. Added test cases. FossilOrigin-Name: fb64d24b32ff3d05e496d1eab420ef8b4f46b30b
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-34/+26
| | | FossilOrigin-Name: f3b32fb71c9011ac220779bd9dbe5617c9dc87d9
* Replaced SCCS strings, fixed binary filescore-8-0-3stanton1998-09-141-1/+1
| | | FossilOrigin-Name: 196f92fd17305db5fec1acd59f6926de11e01624
* Initial revisionrjohnson1998-03-261-0/+328
FossilOrigin-Name: cacdd0f329872d67973970d74c6978730bc24baa