[commit: packages/time] format-widths, improve-leapseconds, master, posix-perf, tasty, wip/travis: detabify cbits (a4fbbed)

git at git.haskell.org git at git.haskell.org
Mon Feb 20 21:15:42 UTC 2017


Repository : ssh://git@git.haskell.org/time

On branches: format-widths,improve-leapseconds,master,posix-perf,tasty,wip/travis
Link       : http://git.haskell.org/packages/time.git/commitdiff/a4fbbedf1bb8190ed6ac57b0fc89750b581be31a

>---------------------------------------------------------------

commit a4fbbedf1bb8190ed6ac57b0fc89750b581be31a
Author: Ashley Yakeley <ashley at semantic.org>
Date:   Sun Jun 23 17:35:10 2013 -0700

    detabify cbits
    
    Ignore-this: bc6e127a254ec4e39b03ad5d601ee014
    
    darcs-hash:20130624003510-ac6dd-f1537ad91adc4bd50fc1b222d6af0311ccde7a06


>---------------------------------------------------------------

a4fbbedf1bb8190ed6ac57b0fc89750b581be31a
 cbits/HsTime.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/cbits/HsTime.c b/cbits/HsTime.c
index e8a1155..cfafb27 100644
--- a/cbits/HsTime.c
+++ b/cbits/HsTime.c
@@ -4,38 +4,38 @@
 long int get_current_timezone_seconds (time_t t,int* pdst,char const* * pname)
 {
 #if HAVE_LOCALTIME_R
-	struct tm tmd;
-        tzset();
-	struct tm* ptm = localtime_r(&t,&tmd);
+    struct tm tmd;
+    tzset();
+    struct tm* ptm = localtime_r(&t,&tmd);
 #else
-	struct tm* ptm = localtime(&t);
+    struct tm* ptm = localtime(&t);
 #endif
-	if (ptm)
-	{
-		int dst = ptm -> tm_isdst;
-		*pdst = dst;
+    if (ptm)
+    {
+        int dst = ptm -> tm_isdst;
+        *pdst = dst;
 #if HAVE_TM_ZONE
-		*pname = ptm -> tm_zone;
-		return ptm -> tm_gmtoff;
+        *pname = ptm -> tm_zone;
+        return ptm -> tm_gmtoff;
 #elif defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
-		// We don't have a better API to use on Windows, the logic to
-		// decide whether a given date/time falls within DST is
-		// implemented as part of localtime() in the CRT.  This is_dst
-		// flag is all we need here.
-		*pname = dst ? _tzname[1] : _tzname[0];
-		return - (dst ? _timezone - 3600 : _timezone);
+        // We don't have a better API to use on Windows, the logic to
+        // decide whether a given date/time falls within DST is
+        // implemented as part of localtime() in the CRT.  This is_dst
+        // flag is all we need here.
+        *pname = dst ? _tzname[1] : _tzname[0];
+        return - (dst ? _timezone - 3600 : _timezone);
 #else
 # if HAVE_TZNAME
-		*pname = *tzname;
+        *pname = *tzname;
 # else
 #  error "Don't know how to get timezone name on your OS"
 # endif
 # if HAVE_DECL_ALTZONE
-		return dst ? altzone : timezone;
+        return dst ? altzone : timezone;
 # else
-		return dst ? timezone - 3600 : timezone;
+        return dst ? timezone - 3600 : timezone;
 # endif
 #endif // HAVE_TM_ZONE
-	}
-	else return 0x80000000;
+    }
+    else return 0x80000000;
 }



More information about the ghc-commits mailing list