diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-18 16:18:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-18 16:18:00 (GMT) |
commit | ba192358693ff4446b9cbd8fda91fb0958ea07e5 (patch) | |
tree | 173f95a9f46cb222746c6be4ba10966ff261cfa1 /generic | |
parent | e0d3f5baa9f4c849cb603fedafdc55721417f145 (diff) | |
download | tcl-ba192358693ff4446b9cbd8fda91fb0958ea07e5.zip tcl-ba192358693ff4446b9cbd8fda91fb0958ea07e5.tar.gz tcl-ba192358693ff4446b9cbd8fda91fb0958ea07e5.tar.bz2 |
Review: use more "LL". Eliminate some (Tcl_WideInt) typecasts.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclClock.c | 8 | ||||
-rw-r--r-- | generic/tclClockFmt.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index c49b1b4..5b0e5b1 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -2403,7 +2403,7 @@ ConvertUTCToLocalUsingC( * Convert that value to seconds. */ - fields->localSeconds = (((fields->julianDay * (Tcl_WideInt) 24 + fields->localSeconds = (((fields->julianDay * 24LL + timeVal->tm_hour) * 60 + timeVal->tm_min) * 60 + timeVal->tm_sec) - JULIAN_SEC_POSIX_EPOCH; @@ -3178,7 +3178,7 @@ ClockClicksObjCmd( switch (index) { case CLICKS_MILLIS: Tcl_GetTime(&now); - clicks = (Tcl_WideInt)now.sec * 1000 + now.usec / 1000; + clicks = now.sec * 1000LL + now.usec / 1000; break; case CLICKS_NATIVE: #ifdef TCL_WIDE_CLICKS @@ -3787,8 +3787,8 @@ ClockScanCommit( if (info->flags & (CLF_ASSEMBLE_SECONDS)) { yydate.localSeconds = - -210866803200L - + ( SECONDS_PER_DAY * (Tcl_WideInt)yydate.julianDay ) + -210866803200LL + + ( SECONDS_PER_DAY * yydate.julianDay ) + ( yySecondOfDay % SECONDS_PER_DAY ); } diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index 66dbf6b..d2175e6 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -231,9 +231,9 @@ _witoaw( if (val >= 0) { /* check resp. recalculate width */ - if (val >= 10000000000L) { + if (val >= 10000000000LL) { Tcl_WideInt val2; - val2 = val / 10000000000L; + val2 = val / 10000000000LL; while (width <= 9 && val2 >= wrange[width]) { width++; } @@ -263,9 +263,9 @@ _witoaw( if (!width) width++; /* check resp. recalculate width (regarding sign) */ width--; - if (val <= -10000000000L) { + if (val <= -10000000000LL) { Tcl_WideInt val2; - val2 = val / 10000000000L; + val2 = val / 10000000000LL; while (width <= 9 && val2 <= -wrange[width]) { width++; } @@ -1663,7 +1663,7 @@ done: yydate.julianDay = intJD; yydate.seconds = - -210866803200L + -210866803200LL + ( SECONDS_PER_DAY * intJD ) + ( fractJD ); @@ -1823,7 +1823,7 @@ ClockScnToken_StarDate_Proc(TCL_UNUSED(ClockFmtScnCmdArgs *), GetJulianDayFromEraYearDay(&yydate, GREGORIAN_CHANGE_DATE); yydate.localSeconds = - -210866803200L + -210866803200LL + ( SECONDS_PER_DAY * yydate.julianDay ) + ( SECONDS_PER_DAY * fractDay / fractDayDiv ); |