summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-03-30 05:30:59 (GMT)
committerhobbs <hobbs>2005-03-30 05:30:59 (GMT)
commitb39b3b72cd4898667fe49e7f3620f786b1233087 (patch)
tree3305868b25ae6ab097d24feec54dcf6350658911
parent53f060e88ded7c62161650d8252b22e4f2d8456b (diff)
downloadtcl-b39b3b72cd4898667fe49e7f3620f786b1233087.zip
tcl-b39b3b72cd4898667fe49e7f3620f786b1233087.tar.gz
tcl-b39b3b72cd4898667fe49e7f3620f786b1233087.tar.bz2
* win/tclWinTime.c (TclpGetDate): use time_t for 'time'
-rw-r--r--ChangeLog20
-rw-r--r--win/tclWinTime.c15
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 <jeffh@ActiveState.com>
+
+ * win/tclWinTime.c (TclpGetDate): use time_t for 'time'
+
2005-03-18 Don Porter <dgp@users.sourceforge.net>
- * 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 <vincentdarley@users.sourceforge.net>
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) {