diff options
Diffstat (limited to 'unix/tclUnixTime.c')
-rw-r--r-- | unix/tclUnixTime.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index cf730a2..7739079 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -62,7 +62,7 @@ Tcl_ScaleTimeProc *tclScaleTimeProcPtr = NativeScaleTime; ClientData tclTimeClientData = NULL; /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpGetSeconds -- * @@ -75,7 +75,7 @@ ClientData tclTimeClientData = NULL; * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ unsigned long @@ -85,7 +85,7 @@ TclpGetSeconds(void) } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpGetClicks -- * @@ -100,7 +100,7 @@ TclpGetSeconds(void) * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ unsigned long @@ -112,7 +112,7 @@ TclpGetClicks(void) if (tclGetTimeProcPtr != NativeGetTime) { Tcl_Time time; - (*tclGetTimeProcPtr) (&time, tclTimeClientData); + tclGetTimeProcPtr(&time, tclTimeClientData); now = time.sec*1000000 + time.usec; } else { /* @@ -125,7 +125,7 @@ TclpGetClicks(void) #else Tcl_Time time; - (*tclGetTimeProcPtr) (&time, tclTimeClientData); + tclGetTimeProcPtr(&time, tclTimeClientData); now = time.sec*1000000 + time.usec; #endif @@ -134,7 +134,7 @@ TclpGetClicks(void) #ifdef TCL_WIDE_CLICKS /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpGetWideClicks -- * @@ -149,7 +149,7 @@ TclpGetClicks(void) * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ Tcl_WideInt @@ -160,7 +160,7 @@ TclpGetWideClicks(void) if (tclGetTimeProcPtr != NativeGetTime) { Tcl_Time time; - (*tclGetTimeProcPtr) (&time, tclTimeClientData); + tclGetTimeProcPtr(&time, tclTimeClientData); now = (Tcl_WideInt) (time.sec*1000000 + time.usec); } else { #ifdef MAC_OSX_TCL @@ -174,7 +174,7 @@ TclpGetWideClicks(void) } /* - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- * * TclpWideClicksToNanoseconds -- * @@ -187,7 +187,7 @@ TclpGetWideClicks(void) * Side effects: * None. * - *----------------------------------------------------------------------------- + *---------------------------------------------------------------------- */ double @@ -361,7 +361,7 @@ void Tcl_GetTime( Tcl_Time *timePtr) /* Location to store time information. */ { - (*tclGetTimeProcPtr) (timePtr, tclTimeClientData); + tclGetTimeProcPtr(timePtr, tclTimeClientData); } /* @@ -384,7 +384,7 @@ Tcl_GetTime( struct tm * TclpGetDate( - CONST time_t *time, + const time_t *time, int useGMT) { if (useGMT) { @@ -412,7 +412,7 @@ TclpGetDate( struct tm * TclpGmtime( - CONST time_t *timePtr) /* Pointer to the number of seconds since the + const time_t *timePtr) /* Pointer to the number of seconds since the * local system's epoch */ { /* @@ -422,14 +422,14 @@ TclpGmtime( ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tmKey); #ifdef HAVE_GMTIME_R - gmtime_r(timePtr, &(tsdPtr->gmtime_buf)); + gmtime_r(timePtr, &tsdPtr->gmtime_buf); #else Tcl_MutexLock(&tmMutex); - memcpy(&(tsdPtr->gmtime_buf), gmtime(timePtr), sizeof(struct tm)); + memcpy(&tsdPtr->gmtime_buf, gmtime(timePtr), sizeof(struct tm)); Tcl_MutexUnlock(&tmMutex); #endif - return &(tsdPtr->gmtime_buf); + return &tsdPtr->gmtime_buf; } /* @@ -438,7 +438,7 @@ TclpGmtime( struct tm * TclpGmtime_unix( - CONST time_t *timePtr) + const time_t *timePtr) { return TclpGmtime(timePtr); } @@ -462,7 +462,7 @@ TclpGmtime_unix( struct tm * TclpLocaltime( - CONST time_t *timePtr) /* Pointer to the number of seconds since the + const time_t *timePtr) /* Pointer to the number of seconds since the * local system's epoch */ { /* @@ -473,21 +473,21 @@ TclpLocaltime( SetTZIfNecessary(); #ifdef HAVE_LOCALTIME_R - localtime_r(timePtr, &(tsdPtr->localtime_buf)); + localtime_r(timePtr, &tsdPtr->localtime_buf); #else Tcl_MutexLock(&tmMutex); - memcpy(&(tsdPtr->localtime_buf), localtime(timePtr), sizeof(struct tm)); + memcpy(&tsdPtr->localtime_buf, localtime(timePtr), sizeof(struct tm)); Tcl_MutexUnlock(&tmMutex); #endif - return &(tsdPtr->localtime_buf); + return &tsdPtr->localtime_buf; } /* * Forwarder for obsolete item in Stubs */ struct tm* TclpLocaltime_unix( - CONST time_t *timePtr) + const time_t *timePtr) { return TclpLocaltime(timePtr); } @@ -628,7 +628,7 @@ NativeGetTime( static void SetTZIfNecessary(void) { - CONST char *newTZ = getenv("TZ"); + const char *newTZ = getenv("TZ"); Tcl_MutexLock(&tmMutex); if (newTZ == NULL) { @@ -637,7 +637,7 @@ SetTZIfNecessary(void) if (lastTZ == NULL || strcmp(lastTZ, newTZ)) { tzset(); if (lastTZ == NULL) { - Tcl_CreateExitHandler(CleanupMemory, (ClientData) NULL); + Tcl_CreateExitHandler(CleanupMemory, NULL); } else { Tcl_Free(lastTZ); } |