summaryrefslogtreecommitdiff
path: root/src/recur.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-03-15 10:23:05 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2011-03-15 10:23:41 +0100
commitd6e534734097b888fce80d103a1196f6c3963063 (patch)
tree180f5928d136cb3ecf0626928128bdcd5637b2bf /src/recur.c
parentb9fa5bdbb17f507ba756fe38a14d5993e522bb6c (diff)
downloadcalcurse-d6e534734097b888fce80d103a1196f6c3963063.zip
Use upper case for macro names.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/recur.c')
-rw-r--r--src/recur.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/recur.c b/src/recur.c
index 4bdb217..e9e5ac3 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -588,12 +588,12 @@ recur_save_data (FILE *f)
* diff_months and diff_years functions were provided by Lukas Fleischer to
* correct the wrong calculation of recurrent dates after a turn of year.
*/
-#define bc(start, end, bs) \
+#define BC(start, end, bs) \
(((end) - (start) + ((start) % bs) - ((end) % bs)) / bs \
+ ((((start) % bs) == 0) ? 1 : 0))
-#define leapcount(start, end) \
- (bc(start, end, 4) - bc(start, end, 100) + bc(start, end, 400))
+#define LEAPCOUNT(start, end) \
+ (BC(start, end, 4) - BC(start, end, 100) + BC(start, end, 400))
/* Calculate the difference in days between two dates. */
@@ -610,7 +610,7 @@ diff_days (struct tm lt_start, struct tm lt_end)
if (lt_end.tm_year > lt_start.tm_year)
{
diff += (lt_end.tm_year - lt_start.tm_year) * YEARINDAYS;
- diff += leapcount (lt_start.tm_year + TM_YEAR_BASE,
+ diff += LEAPCOUNT (lt_start.tm_year + TM_YEAR_BASE,
lt_end.tm_year + TM_YEAR_BASE - 1);
}