From 2d43a5bda13127024795da1810c227fc35ac8155 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 30 Mar 2005 05:30:59 +0000 Subject: * win/tclWinTime.c (TclpGetDate): use time_t for 'time' --- ChangeLog | 20 ++++++++++++-------- win/tclWinTime.c | 15 ++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0735139..0eff810 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,20 @@ +2005-03-29 Jeff Hobbs + + * win/tclWinTime.c (TclpGetDate): use time_t for 'time' + 2005-03-18 Don Porter - * generic/tclCompCmds.c (TclCompileIncrCmd): Corrected checks - for immediate operand usage to permit leading space and sign - characters. Restores more efficient bytecode for [incr x -1] - that got lost in the CONST string reforms of Tcl 8.4. [Bug 1165671] + * generic/tclCompCmds.c (TclCompileIncrCmd): Corrected checks + for immediate operand usage to permit leading space and sign + characters. Restores more efficient bytecode for [incr x -1] + that got lost in the CONST string reforms of Tcl 8.4. [Bug 1165671] - * generic/tclBasic.c (Tcl_EvalEx,TclEvalTokensStandard): + * generic/tclBasic.c (Tcl_EvalEx,TclEvalTokensStandard): * generic/tclCmdMZ.c (Tcl_SubstObj): - * tests/basic.test (basic-46.4): Restored recursion limit - * tests/parse.test (parse-19.*): testing in nested command + * tests/basic.test (basic-46.4): Restored recursion limit + * tests/parse.test (parse-19.*): testing in nested command substitutions within direct script evaluation (Tcl_EvalEx) - that got lost in the parser reforms of Tcl 8.1. Added tests for + that got lost in the parser reforms of Tcl 8.1. Added tests for correct behavior. [Bug 1115904] 2005-03-15 Vince Darley diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 5696ffc..dbb6dbc 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.14.2.7 2005/03/15 16:29:55 kennykb Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.14.2.8 2005/03/30 05:31:13 hobbs Exp $ */ #include "tclWinInt.h" @@ -260,7 +260,6 @@ void Tcl_GetTime(timePtr) Tcl_Time *timePtr; /* Location to store time information. */ { - struct timeb t; int useFtime = 1; /* Flag == TRUE if we need to fall back @@ -379,7 +378,6 @@ Tcl_GetTime(timePtr) } if ( timeInfo.perfCounterAvailable ) { - /* * Query the performance counter and use it to calculate the * current time. @@ -417,7 +415,7 @@ Tcl_GetTime(timePtr) */ if ( curCounter.QuadPart - timeInfo.perfCounterLastCall.QuadPart < 11 * timeInfo.curCounterFreq.QuadPart / 10 ) { - + curFileTime = timeInfo.fileTimeLastCall.QuadPart + ( ( curCounter.QuadPart - timeInfo.perfCounterLastCall.QuadPart ) * 10000000 / timeInfo.curCounterFreq.QuadPart ); @@ -431,9 +429,8 @@ Tcl_GetTime(timePtr) LeaveCriticalSection( &timeInfo.cs ); } - + if ( useFtime ) { - /* High resolution timer is not available. Just use ftime */ ftime(&t); @@ -581,7 +578,7 @@ TclpGetDate(t, useGMT) { const time_t *tp = (const time_t *) t; struct tm *tmPtr; - long time; + time_t time; if (!useGMT) { tzset(); @@ -597,7 +594,7 @@ TclpGetDate(t, useGMT) } time = *tp - _timezone; - + /* * If we aren't near to overflowing the long, just add the bias and * use the normal calculation. Otherwise we will need to adjust @@ -623,7 +620,7 @@ TclpGetDate(t, useGMT) tmPtr->tm_sec += 60; time -= 60; } - + time = tmPtr->tm_min + time/60; tmPtr->tm_min = (int)(time % 60); if (tmPtr->tm_min < 0) { -- cgit v0.12