summaryrefslogtreecommitdiffstats
path: root/generic/tclScan.c
Commit message (Collapse)AuthorAgeFilesLines
* Minor tinkering with style.dkf2011-04-041-3/+7
| | | FossilOrigin-Name: ad00613d3e95471baaf89f418d02473bd3231a1a
* Better error-message in case of errors related to setting a variablejan.nijtmans2011-04-041-4/+4
| | | FossilOrigin-Name: 0b4ce29050f3a92481c073d03bae5e44ec4bf790
* More generation of error codes (namespace creation, path normalization,dkf2011-04-031-0/+11
| | | | | pipeline creation, package handling, procedures, [scan] formats) FossilOrigin-Name: a6c95ed9e060d601f5fecd29fdadf14567d377ff
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-7/+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/tclBasic.c:msofer2005-10-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclLink.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclScan.c: * generic/tclTest.c: * generic/tclVar.c: * mac/tclMacInit.c: * unix/tclUnixInit.c: * win/tclWinInit.c: Insure that the core never calls TclPtrSetVar, Tcl_SetVar2Ex, Tcl_ObjSetVar2 or Tcl_SetObjErrorCode with a 0-ref new value. It is not possible to handle error returns correctly in that case [Bug 1334947], one has the choice of leaking the object in some cases, or else risk crashing in some others. FossilOrigin-Name: 8761ab798f625b66cadb3eaf8fafdedce6553a02
| | * Ensure that the %ld conversion works correctly on 64-bit platforms. [Bug ↵dkf2004-08-191-10/+5
| | | | | | | | | | | | | | | 1011860] FossilOrigin-Name: 052cf18b79660d7e59d891a3951d7bd4f1bde426
| * | * generic/tclCmdIL.c: Removed unused variables.dgp2009-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c: * generic/tclVar.c: * unix/tclUnixChan.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200] FossilOrigin-Name: 936f6911bda9859212bab127d1a62b6586977504
* | | Code Audit results:dkf2010-03-051-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations FossilOrigin-Name: 4d8a4f639d28df5b5dfabd407be8efbb44454601
* | | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-5/+5
| | | | | | | | | FossilOrigin-Name: 511d94dd873e4ace6252b896eeb821f03023f00f
* | | * generic/tclExecute.c: fix potential uninitialized variable use anddas2009-09-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclFCmd.c: null dereference flagged by clang static * generic/tclProc.c: analyzer. * generic/tclTimer.c: * generic/tclUtf.c: * generic/tclExecute.c: silence false positives from clang static * generic/tclIO.c: analyzer about potential null dereference. * generic/tclScan.c: * generic/tclCompExpr.c: FossilOrigin-Name: e93f957325ed49415f01559c8162a31df1ee28cf
* | | * generic/tclBinary.c: Removed unused variables.dgp2009-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclHash.c: * generic/tclIOUtil.c: * generic/tclVar.c: * generic/tclBasic.c: Silence compiler warnings about ClientData. * generic/tclProc.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200] FossilOrigin-Name: b0e94fe52cf1bae5acfd5a9ed00d80e25c680b3c
* | | - eliminate some unnessary type castsnijtmans2009-02-101-10/+10
| | | | | | | | | | | | | | | | | | | | | - some internal const decorations - spacing FossilOrigin-Name: a45c7b126b9137976cd91960cb3e2ecb5201d222
* | | TIP #343 IMPLEMENTATION - A Binary Specifier for [format/scan]ferrieux2008-12-101-1/+6
| | | | | | | | | FossilOrigin-Name: 197d47d29dbefa3bfa64f975ed2dbbed6fcf8271
* | | fix [2021443] inconsistant "wrong # args" messagesnijtmans2008-07-191-3/+3
| | | | | | | | | FossilOrigin-Name: 1e5261316ed076ff5ff69f2a720e8eff30fcf66e
* | | 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
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵msofer2007-11-111-4/+4
| | | | | | | | | | objTypes. FossilOrigin-Name: 11e8f3151249a669790af1ab8897b1451aa5b47b
* | * generic/tclCmdIL.c: More conversions to use TclStackAlloc.dgp2007-06-221-25/+8
| | | | | | | | | | | | * generic/tclScan.c: FossilOrigin-Name: ebf25c463a94c4cfa9e0a63d2204cd0d023284e6
* | * doc/DoubleObj.3: More doc updates for TIP 237.dgp2006-04-251-1/+2
| | | | | | | | | | | | | | | | | | | | * doc/scan.n: * generic/tclScan.c: [scan $s %u] is documented to accept only * tests/scan.test: decimal formatted integers. Fixed code to match. FossilOrigin-Name: d0317c20badd1d6208c5eeff7def892a4c09ffac
* | 2005-12-19 Don Porter <dgp@users.sourceforge.net>dgp2005-12-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c: Modified [string is double] to use * tests/string.test: TclParseNumber() to parse trailing whitespace. Ensures consistency, and makes it easier to cleanup after invalid internal reps left behind by parsing [Bugs 1360432 1382287]. * generic/tclParseExpr.c: Added TCL_PARSE_NO_WHITESPACE to * generic/tclScan.c: TclParseNumber() calls since [scan] and * tests/scan.test: [expr] parsing don't want spaces in parsed numbers. * generic/tclInt.h: Added TCL_PARSE_NO_WHITESPACE flag to the * generic/tclStrToD.c: TclParseNumber() interface. FossilOrigin-Name: 7245b18069391be3d914995ab419daeede7ced6e
* | * generic/tclInt.h: Revised TclParseNumber interface to enabledgp2005-11-121-21/+29
| | | | | | | | | | | | | | | | * generic/tclScan.c: revision to the [scan] command implementation * generic/tclStrToD.c: to permit tests scan-4.44,55 to pass again. [Bug 1348067]. FossilOrigin-Name: 5b3d7732b515626e4abf24a6ef26014415d8b894
* | ANSIfy (though only partially - function decls only - for tclExecute.c)dkf2005-11-021-43/+49
| | | | | | FossilOrigin-Name: 127ec44748df44619eec67983935eab15927be59
* | * generic/tclClock.c: Removed some dead code.dgp2005-10-191-202/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclLiteral.c: * generic/tclParseExpr.c: * generic/tclScan.c: * generic/tclUtil.c: * generic/tclVar.c: FossilOrigin-Name: 3fd9c620f4973fc4eafe3c1907447ebb011e26ee
* | TIP#237 IMPLEMENTATIONdgp2005-10-081-107/+127
| | | | | | | | | | | | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code. FossilOrigin-Name: 83fdb360a9aec952bc3ad040afe39106bf9e5ec3
* | Systematizing the formattingdkf2005-07-211-478/+493
| | | | | | FossilOrigin-Name: ac613e6b948e9387516ecc1f16a35824c93ab347
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232kennykb2005-05-101-2/+2
| | | | | | FossilOrigin-Name: 1cc2336920c70c6b9f7825b88dec87fc223f2c4e
* | * generic/tclBasic.c:dgp2004-10-061-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Ensure that the %ld conversion works correctly on 64-bit platforms. [Bug ↵dkf2004-08-191-10/+5
| | | | | | | | | | 1011860] FossilOrigin-Name: 142ba4167bd308cc16fc0b7c91dc37d398d6074c
* | Made compiling with -Wstrict-prototypes -Wmissing-prototypes much cleaner.dkf2004-05-271-13/+13
| | | | | | | | | | | | Also added support for [FRQ 951168] but left that switched off by default. FossilOrigin-Name: 3c862df4ab341834a0bf1d1cb26934d12ae2e837
* | Patch 922727 committed. Implements three changes:dgp2004-04-061-5/+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): FossilOrigin-Name: 2e5b18c85c944b46540edfdd6580648e32645e2b
* Added clarification comment.dkf2002-02-251-1/+4
| | | FossilOrigin-Name: 29313c063dad9ad30af5c32ed51014b1867773c5
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-24/+99
| | | | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode. FossilOrigin-Name: 8d82de1905ada4c5d06f5fb967721e8b681b7c82
* * generic/tclScan.c (Tcl_ScanObjCmd): prevented ckfree beinghobbs2002-02-081-2/+4
| | | | | | called on a pointer to NULL. FossilOrigin-Name: a394db9b1f630eacb0a3bdf11dc39f003400d5e6
* * tests/scan.test:hobbs2002-02-071-1/+8
| | | | | | | | * generic/tclScan.c (Tcl_ScanObjCmd): corrected scan 0x... %x handling that didn't accept the 0x as a prelude to a base 16 number. [Bug #495213] FossilOrigin-Name: 003ecd26bac43398fa149d53840683b81f043807
* * generic/tclCmdAH.c (Tcl_FormatObjCmd):hobbs2001-09-201-6/+11
| | | | | | | * generic/tclScan.c (Tcl_ScanObjCmd): corrected handling of format and scan on 64-bit machines. [Bug #412696] (rmax) FossilOrigin-Name: faf16960975465b15abcf102bd1aa3ce3c1d5c92
* * docs/scan.n:hobbs2000-12-101-3/+3
| | | | | | | | | * tests/scan.test: * generic/tclScan.c (Tcl_ScanObjCmd): changed %o and %x to use strtoul instead of strtol to correctly preserve scan<>format conversion of large integers. [Patch #102663, Bug #124600] FossilOrigin-Name: c628433a43ea646a30778a09baa2dcc12aee00a9
* * tests/scan.test:hobbs1999-11-301-1/+7
| | | | | | | * generic/tclScan.c: fixed scan where %[..] didn't match anything and added test case [Bug: 3700] FossilOrigin-Name: 27ebd6ad86e7098995c815fc6832a0517ddfc46b
* * generic/tclProc.c: corrected error reporting for default casehobbs1999-11-191-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at the global level for uplevel command. * generic/tclIOSock.c: changed int to size_t type for len in TclSockMinimumBuffers. * generic/tclCkalloc.c: fixed Tcl_DbCkfree to return a value on NULL input. [Bug: 3400] * generic/tclStringObj.c: fixed support for passing in negative length to Tcl_SetUnicodeObj, et al handling routines. [Bug: 3380] * doc/scan.n: * tests/scan.test: * generic/tclScan.c: finished support for inline scan by supporting XPG identifiers. * doc/http.n: * library/http2.1/http.tcl: added register and unregister commands to http:: package (better support for tls/SSL), as well as -type argument to http::geturl. [RFE: 2617] * generic/tclBasic.c: removed extra decr of numLevels in Tcl_EvalObjEx that could cause seg fault. (mjansen@wendt.de) * generic/tclEvent.c: fixed possible lack of MutexUnlock in Tcl_DeleteExitHandler [Bug: 3545] FossilOrigin-Name: 907f606957a5b4abeaf4a1331ba2e63f73b0a4ea
* removed // comments (IBM's AIX compiler complained)hobbs1999-10-291-4/+1
| | | FossilOrigin-Name: 31e3344b893730c3b4f3a3a6088b26e30b040f84
* * generic/tclStringObj.c: fixed Tcl_AppendResultVA so it onlyhobbs1999-10-291-28/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | iterates once over the va_list (avoiding a memcpy of it, which is not portable). * generic/tclEnv.c: fixed possible ABR error in environ array * tests/scan.test: * generic/tclScan.c: added support for use of inline scan, XPG3 currently not included * tests/incr.test: * tests/set.test: * generic/tclCompCmds.c: fixed improper bytecode handling of 'eval {set array($unknownvar) 5}' (also for incr) * win/tclWinTest.c: added testvolumetype command, as atime is completely ignored for Windows FAT file systems * win/tclWinPort.h: added sys/utime.h to includes * unix/tclUnixPort.h: added utime.h to includes * doc/file.n: * tests/cmdAH.test: * generic/tclCmdAH.c: added time arguments to atime and mtime file command methods (support 'touch' functionality) FossilOrigin-Name: 2c17586d2ad8c1b9d303ea5d8ab2568a9ce5542e
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-0/+1032
FossilOrigin-Name: f3b32fb71c9011ac220779bd9dbe5617c9dc87d9