summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
Commit message (Collapse)AuthorAgeFilesLines
* Tcl_GetWideIntFromObj() -> TclGetWideIntFromObj(), and minor other ↵jan.nijtmans2017-06-071-16/+13
| | | | simplifications/optimizations. No functional change.
* Compile [clock clicks], [clock microseconds], [clock milliseconds] and ↵Kevin B Kenny2017-03-151-12/+8
| | | | [clock seconds].
* Make 'clock' and 'encoding' into proper compilable ensemblesKevin B Kenny2017-03-141-0/+18
|
* Bugfix [da340d4f32]. clock-55.9 and clock-55.10 test failures.ashok2016-07-101-0/+12
|
* Fix [c9eb6b0ac01bb8ef96a616c71426a3db4a279bec|c9eb6b0ac0]: ↵jan.nijtmans2015-12-111-4/+5
|\ | | | | | | ConvertLocalToUTCUsingC fails the first time if TZ is not set
| * Fix [c9eb6b0ac01bb8ef96a616c71426a3db4a279bec|c9eb6b0ac0]: ↵jan.nijtmans2015-12-111-4/+5
| | | | | | | | ConvertLocalToUTCUsingC fails the first time if TZ is not set
* | [3757cdf808] More clock refactoring with spooky impact on [string match]dgp2014-07-301-10/+22
| | | | | | performance.
* | [3757cdf808] Refactoring seems to reduce (maybe somewhat kinda sorta) a dgp2014-07-291-22/+32
| | | | | | bizarre performance regression. Still not what it was. Damn Heisenbugs.
* | [f0f876c141] Improve consistency in error messages.dkf2014-06-171-3/+3
| |
* | [d19a30db57] Fixed segfault in [clock] internals. Includes test.dgp2014-04-161-15/+21
|\ \ | |/
| * Segmentation fault using some functions of tcl::clock, fixed, belong to ↵sebres2014-04-161-18/+21
| | | | | | | | ticket [d19a30db57]
* | Eliminate all usage of WIN32 and __WIN32__ macros: Some compilers (e.g. ↵jan.nijtmans2014-02-101-1/+1
| | | | | | | | | | Clang/LLVM) don't define it, and _WIN32 is much more portable anyway. See: [http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#WindowsCygwinnonPOSIXandMinGW]
* | more result generation conversiondkf2012-08-031-4/+4
| |
* | converting to using Tcl_Obj API for error message generation; part donedkf2012-08-031-2/+2
| |
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-4/+4
| | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | 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).
| * 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.
| | * 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.
| | * * generic/tclClock.c (FormatClock): Claimed additional space forKevin B Kenny2007-08-251-1/+4
| | | | | | | | | | | | | | | | | | the %c format code to avoid a buffer overrun when formatting (for example) a Friday in February in the Portuguese locale. [Bug 1751117]
| | * Restored Cygwin buildability [Bug 1387154]Kevin B Kenny2007-04-211-3/+3
| | |
| | * replaced 'long' times with wides, to cope with Win64Kevin B Kenny2005-03-151-13/+13
| | |
| | * 2004-05-14 Kevin B. Kenny <kennykb@acm.org> Kevin B Kenny2004-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: Promoted TclpLocaltime and TclpGmtime * generic/tclIntDecls.h: from Unix-specific stubs to the generic * generic/tclIntPlatDecls.h: internal Stubs table. Reran 'genstubs' * generic/tclStubInit.c: * unix/tclUnixPort.h: * generic/tclClock.c: Changed a buggy 'GMT' timezone specification to the correct 'GMT0'. [Bug #922848] * unix/tclUnixThrd.c: Moved TclpGmtime and TclpLocaltime to unix/tclUnixTime.c where they belong. * unix/tclUnixTime.c (TclpGmtime, TclpLocaltime, TclpGetTimeZone, ThreadSafeGMTime [removed], ThreadSafeLocalTime [removed], SetTZIfNecessary, CleanupMemory): Restructured to make sure that the same mutex protects all calls to localtime, gmtime, and tzset. Added a check in front of those calls to make sure that the TZ env var hasn't changed since the last call to tzset, and repeat tzset if necessary. [Bug #942078] Removed a buggy test of the Daylight Saving Time information in 'gettimeofday' in favor of applying 'localtime' to a known value. [Bug #922848] * tests/clock.test (clock-3.14): Added test to make sure that changes to $env(TZ) take effect immediately. * win/tclWinTime.c (TclpLocaltime, TclpGmtime): Added porting layer for 'localtime' and 'gmtime' calls.
| * | * generic/tclInt.decls: Backport of Kevin B. Kenny's work onandreas_kupries2010-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: the Tcl Head, with help from Jeff Hobbs. * generic/tclStrToD.c: * generic/tclTest.c: * generic/tclTomMath.decls: * generic/tclUtil.c: * tests/util.test: * unix/Makefile.in: * win/Makefile.in: * win/makefile.vc: Rewrite of Tcl_PrintDouble and TclDoubleDigits that (a) fixes a severe performance problem with floating point shimmering reported by Karl Lehenbauer, (b) allows TclDoubleDigits to generate the digit strings for 'e' and 'f' format, so that it can be used for tcl_precision != 0 (and possibly later for [format]), (c) fixes [Bug 3120139] by making TclPrintDouble inherently locale-independent, (d) adds test cases to util.test for correct rounding in difficult cases of TclDoubleDigits where fixed- precision results are requested. (e) adds test cases to util.test for the controversial aspects of [Bug 3105247]. As a side effect, two more modules from libtommath (bn_mp_set_int.c and bn_mp_init_set_int.c) are brought into the build, since the new code uses them. * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclTomMathDecls.h: Regenerated.
| * | * generic/tclClock.c (TclClockInit): Do not create [clock] supportdgp2009-11-121-1/+10
| | | | | | | | | | | | commands in safe interps.
| * | * generic/tclClock.c (ClockConvertlocaltoutcObjCmd): Removed leftandreas_kupries2008-06-171-2/+1
| | | | | | | | | | | | over debug output.
| * | 2006-06-17 Kevin Kenny <kennykb@acm.org>Kevin B Kenny2008-06-171-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclClock.c (ConvertLocalToUTC): * tests/clock.test (clock-63.1): Fixed a bug where the internal ConvertLocalToUTC command segfaulted if passed a dictionary without the 'localSeconds' key. To the best of my knowledge, the bug was not observable in the [clock] command itself.
* | | * generic/tclBasic.c, generic/tclClock.c, generic/tclEncoding.c,dkf2010-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEnv.c, generic/tclLoad.c, generic/tclNamesp.c, * generic/tclObj.c, generic/tclRegexp.c, generic/tclResolve.c, * generic/tclResult.c, generic/tclUtil.c, macosx/tclMacOSXFCmd.c: More purging of strcpy() from locations where we already know the length of the data being copied.
* | | Code Audit results:dkf2010-03-051-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-4/+4
| | |
* | | * generic/tclClock.c (TclClockInit): Do not create [clock] supportdgp2009-11-121-1/+10
| | | | | | | | | | | | commands in safe interps.
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-211/+198
| | |
* | | Add "const" to many internalnijtmans2008-10-161-4/+4
| | | | | | | | | | | | | | | const tables. No functional or API change.
* | | fix [2021443] inconsistant "wrong # args" messages (follow-up)nijtmans2008-07-211-38/+38
| | |
* | | more consistent wrong # arg messages: change all messages containing ↵nijtmans2008-07-131-2/+2
| | | | | | | | | | | | ?options? to the form ?-option value ...?
* | | * generic/tclClock.c (ClockConvertlocaltoutcObjCmd): Removed leftandreas_kupries2008-06-171-2/+1
| | | | | | | | | | | | over debug output.
* | | 2006-06-17 Kevin Kenny <kennykb@acm.org>Kevin B Kenny2008-06-171-7/+15
|/ / | | | | | | | | | | | | | | | | * generic/tclClock.c (ConvertLocalToUTC): * tests/clock.test (clock-63.1): Fixed a bug where the internal ConvertLocalToUTC command segfaulted if passed a dictionary without the 'localSeconds' key. To the best of my knowledge, the bug was not observable in the [clock] command itself.
* | * doc/clock.n: Corrected minor indentation gaffe in theKevin B Kenny2008-02-271-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | penultimate paragraph. [Bug 1898025] * generic/tclClock.c (ParseClockFormatArgs): Changed to check that the clock value is in the range of a 64-bit integer. [Bug 1862555] * library/clock.tcl (::tcl::clock::format, ::tcl::clock::scan, ::tcl::clock::add, ::tcl::clock::LocalizeFormat): Fixed bugs in caching of localized strings that caused weird results when localized date/time formats were used. [Bug 1902423] * tests/clock.test (clock-61.*, clock-62.1): Regression tests for [Bug 1862555] and [Bug 1902423].
* | fix warningdas2008-02-271-2/+2
| |
* | * generic/tclClock.c (ClockParseformatargsObjCmd):Kevin B Kenny2008-02-061-5/+135
| | | | | | | | | | | | | | | | | | | | * library/clock.tcl (::tcl::clock::format): * tests/clock.test (clock-1.0, clock-1.4): Performance enhancements in [clock format] (moving the analysis of $args into C code, holding on to Tcl_Objs with resolved command names, [lassign] in place of [foreach], avoiding [namespace which] for command resolution).
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-18/+18
| | | | | | | | objTypes.
* | Whitespace policing, replacing commas in varargs with constant string ↵Kevin B Kenny2007-04-201-2/+2
| | | | | | | | catenation, and fixed an oversight in the fix for NZA time zones.
* | Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-4/+3
| | | | | | | | efficient). After [Patch 1529526] (afredd)
* | simplification of previous commit, whitespace cleanupdas2006-08-281-13/+8
| |
* | Fixes for [Bug 1547662] and [Bug 1547681]Joe Mistachkin2006-08-281-5/+10
| |
* | * generic/tclClock.c (ClockClicksObjCmd): add support for Darwindas2006-08-211-2/+7
| | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_TimeObjCmd): nanosecond resolution timer * generic/tclInt.h: to [clock clicks] and [time] * unix/configure.in (Darwin): when TCL_WIDE_CLICKS defined. * unix/tclUnixTime.c (TclpGetWideClicks, TclpWideClicksToNanoseconds): * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* | D'oh! Fix silly mistakes.dkf2006-08-101-3/+3
| |
* | Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-104/+109
| |
* | typodas2006-08-021-2/+2
| |
* | Bug 1531530Kevin B Kenny2006-07-311-4/+5
| |