avr-libc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-commit] [2317] White-space only change:


From: Joerg Wunsch
Subject: [avr-libc-commit] [2317] White-space only change:
Date: Fri, 29 Mar 2013 21:29:35 +0000

Revision: 2317
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2317
Author:   joerg_wunsch
Date:     2013-03-29 21:29:35 +0000 (Fri, 29 Mar 2013)
Log Message:
-----------
White-space only change:

. remove trailing whitspace
. replace 4-column hard tabs by spaces

Modified Paths:
--------------
    trunk/avr-libc/include/util/eu_dst.h
    trunk/avr-libc/include/util/usa_dst.h

Modified: trunk/avr-libc/include/util/eu_dst.h
===================================================================
--- trunk/avr-libc/include/util/eu_dst.h        2013-03-29 21:25:27 UTC (rev 
2316)
+++ trunk/avr-libc/include/util/eu_dst.h        2013-03-29 21:29:35 UTC (rev 
2317)
@@ -29,24 +29,24 @@
 /* $Id$ */
 
 /**
-       Daylight Saving function for the European Union. To utilize this 
function, you must 
-       \code #include <util/eu_dst.h> \endcode
-       and 
-       \code set_dst(eu_dst); \endcode
-       
-       Given the time stamp and time zone parameters provided, the Daylight 
Saving function must
-       return a value appropriate for the tm structures' tm_isdst element. 
That is...
-       
-       0 : If Daylight Saving is not in effect.
-       
-       -1 : If it cannot be determined if Daylight Saving is in effect.
-       
-       A positive integer : Represents the number of seconds a clock is 
advanced for Daylight Saving.
-       This will typically be ONE_HOUR.
-       
-       Daylight Saving 'rules' are subject to frequent change. For production 
applications it is 
-       recommended to write your own DST function, which uses 'rules' obtained 
from, and modifiable by,
-       the end user ( perhaps stored in EEPROM ).      
+    Daylight Saving function for the European Union. To utilize this function, 
you must
+    \code #include <util/eu_dst.h> \endcode
+    and
+    \code set_dst(eu_dst); \endcode
+
+    Given the time stamp and time zone parameters provided, the Daylight 
Saving function must
+    return a value appropriate for the tm structures' tm_isdst element. That 
is...
+
+    0 : If Daylight Saving is not in effect.
+
+    -1 : If it cannot be determined if Daylight Saving is in effect.
+
+    A positive integer : Represents the number of seconds a clock is advanced 
for Daylight Saving.
+    This will typically be ONE_HOUR.
+
+    Daylight Saving 'rules' are subject to frequent change. For production 
applications it is
+    recommended to write your own DST function, which uses 'rules' obtained 
from, and modifiable by,
+    the end user ( perhaps stored in EEPROM ).
 */
 
 #ifndef EU_DST_H
@@ -59,55 +59,55 @@
 #include <time.h>
 #include <inttypes.h>
 
-       int             eu_dst(const time_t * timer, int32_t * z) {
-               struct tm       tmptr;
-               uint8_t         month, mday, hour, day_of_week, d;
-               int             n;
+    int             eu_dst(const time_t * timer, int32_t * z) {
+        struct tm       tmptr;
+        uint8_t         month, mday, hour, day_of_week, d;
+        int             n;
 
-               /* obtain the variables */
-                               gmtime_r(timer, &tmptr);
-                               month = tmptr.tm_mon;
-                               day_of_week = tmptr.tm_wday;
-                               mday = tmptr.tm_mday - 1;
-                               hour = tmptr.tm_hour;
+        /* obtain the variables */
+                        gmtime_r(timer, &tmptr);
+                        month = tmptr.tm_mon;
+                        day_of_week = tmptr.tm_wday;
+                        mday = tmptr.tm_mday - 1;
+                        hour = tmptr.tm_hour;
 
-               if              ((month > MARCH) && (month < OCTOBER))
-                                       return ONE_HOUR;
+        if              ((month > MARCH) && (month < OCTOBER))
+                            return ONE_HOUR;
 
-               if              (month < MARCH)
-                                       return 0;
-               if              (month > OCTOBER)
-                                       return 0;
+        if              (month < MARCH)
+                            return 0;
+        if              (month > OCTOBER)
+                            return 0;
 
-               /* determine mday of last Sunday */
-                               n = tmptr.tm_mday - 1;
-                               n -= day_of_week;
-                               n += 7;
-                               d = n % 7;      /* date of first Sunday */
+        /* determine mday of last Sunday */
+                        n = tmptr.tm_mday - 1;
+                        n -= day_of_week;
+                        n += 7;
+                        d = n % 7;  /* date of first Sunday */
 
-                               n = 31 - d;
-                               n /= 7; /* number of Sundays left in the month 
*/
+                        n = 31 - d;
+                        n /= 7; /* number of Sundays left in the month */
 
-                               d = d + 7 * n;  /* mday of final Sunday */
+                        d = d + 7 * n;  /* mday of final Sunday */
 
-               if              (month == MARCH) {
-                       if (d < mday)
-                               return 0;
-                       if (d > mday)
-                               return ONE_HOUR;
-                       if (hour < 1)
-                               return 0;
-                       return AN_HOUR;
-               }
-               if              (d < mday)
-                                       return ONE_HOUR;
-               if              (d > mday)
-                                       return 0;
-               if              (hour < 1)
-                                       return ONE_HOUR;
-                               return 0;
+        if              (month == MARCH) {
+            if (d < mday)
+                return 0;
+            if (d > mday)
+                return ONE_HOUR;
+            if (hour < 1)
+                return 0;
+            return AN_HOUR;
+        }
+        if              (d < mday)
+                            return ONE_HOUR;
+        if              (d > mday)
+                            return 0;
+        if              (hour < 1)
+                            return ONE_HOUR;
+                        return 0;
 
-       }
+    }
 
 #ifdef __cplusplus
 }

Modified: trunk/avr-libc/include/util/usa_dst.h
===================================================================
--- trunk/avr-libc/include/util/usa_dst.h       2013-03-29 21:25:27 UTC (rev 
2316)
+++ trunk/avr-libc/include/util/usa_dst.h       2013-03-29 21:29:35 UTC (rev 
2317)
@@ -29,25 +29,25 @@
 /* $Id$ */
 
 /**
-       Daylight Saving function for the USA. To utilize this function, you 
must 
-       \code #include <util/usa_dst.h> \endcode
-       and 
-       \code set_dst(usa_dst); \endcode
-       
-       Given the time stamp and time zone parameters provided, the Daylight 
Saving function must
-       return a value appropriate for the tm structures' tm_isdst element. 
That is...
-       
-       0 : If Daylight Saving is not in effect.
-       
-       -1 : If it cannot be determined if Daylight Saving is in effect.
-       
-       A positive integer : Represents the number of seconds a clock is 
advanced for Daylight Saving.
-       This will typically be ONE_HOUR.
-       
-       Daylight Saving 'rules' are subject to frequent change. For production 
applications it is 
-       recommended to write your own DST function, which uses 'rules' obtained 
from, and modifiable by,
-       the end user ( perhaps stored in EEPROM ).      
-       
+    Daylight Saving function for the USA. To utilize this function, you must
+    \code #include <util/usa_dst.h> \endcode
+    and
+    \code set_dst(usa_dst); \endcode
+
+    Given the time stamp and time zone parameters provided, the Daylight 
Saving function must
+    return a value appropriate for the tm structures' tm_isdst element. That 
is...
+
+    0 : If Daylight Saving is not in effect.
+
+    -1 : If it cannot be determined if Daylight Saving is in effect.
+
+    A positive integer : Represents the number of seconds a clock is advanced 
for Daylight Saving.
+    This will typically be ONE_HOUR.
+
+    Daylight Saving 'rules' are subject to frequent change. For production 
applications it is
+    recommended to write your own DST function, which uses 'rules' obtained 
from, and modifiable by,
+    the end user ( perhaps stored in EEPROM ).
+
 */
 
 #ifndef EU_DST_H
@@ -76,52 +76,52 @@
 #define DST_END_WEEK 1
 #endif
 
-       int             usa_dst(const time_t * timer, int32_t * z) {
-               time_t          t;
-               struct tm       tmptr;
-               uint8_t         month, week, hour, day_of_week, d;
-               int             n;
+    int             usa_dst(const time_t * timer, int32_t * z) {
+        time_t          t;
+        struct tm       tmptr;
+        uint8_t         month, week, hour, day_of_week, d;
+        int             n;
 
-               /* obtain the variables */
-                               t = *timer + *z;
-                               gmtime_r(&t, &tmptr);
-                               month = tmptr.tm_mon;
-                               day_of_week = tmptr.tm_wday;
-                               week = week_of_month(&tmptr, 0);
-                               hour = tmptr.tm_hour;
+        /* obtain the variables */
+                        t = *timer + *z;
+                        gmtime_r(&t, &tmptr);
+                        month = tmptr.tm_mon;
+                        day_of_week = tmptr.tm_wday;
+                        week = week_of_month(&tmptr, 0);
+                        hour = tmptr.tm_hour;
 
-               if              ((month > DST_START_MONTH) && (month < 
DST_END_MONTH))
-                                       return ONE_HOUR;
+        if              ((month > DST_START_MONTH) && (month < DST_END_MONTH))
+                            return ONE_HOUR;
 
-               if              (month < DST_START_MONTH)
-                                       return 0;
-               if              (month > DST_END_MONTH)
-                                       return 0;
+        if              (month < DST_START_MONTH)
+                            return 0;
+        if              (month > DST_END_MONTH)
+                            return 0;
 
-               if              (month == DST_START_MONTH) {
+        if              (month == DST_START_MONTH) {
 
-                       if (week < DST_START_WEEK)
-                               return 0;
-                       if (week > DST_START_WEEK)
-                               return ONE_HOUR;
+            if (week < DST_START_WEEK)
+                return 0;
+            if (week > DST_START_WEEK)
+                return ONE_HOUR;
 
-                       if (day_of_week > SUNDAY)
-                               return ONE_HOUR;
-                       if (hour >= 2)
-                               return ONE_HOUR;
-                       return 0;
-               }
-               if              (week > DST_END_WEEK)
-                                       return 0;
-               if              (week < DST_END_WEEK)
-                                       return ONE_HOUR;
-               if              (day_of_week > SUNDAY)
-                                       return 0;
-               if              (hour >= 1)
-                                       return 0;
-                               return ONE_HOUR;
+            if (day_of_week > SUNDAY)
+                return ONE_HOUR;
+            if (hour >= 2)
+                return ONE_HOUR;
+            return 0;
+        }
+        if              (week > DST_END_WEEK)
+                            return 0;
+        if              (week < DST_END_WEEK)
+                            return ONE_HOUR;
+        if              (day_of_week > SUNDAY)
+                            return 0;
+        if              (hour >= 1)
+                            return 0;
+                        return ONE_HOUR;
 
-       }
+    }
 
 #ifdef __cplusplus
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]