aboutsummaryrefslogtreecommitdiffstats
path: root/src/recur.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-08-10 09:24:46 +0000
committerFrederic Culot <calcurse@culot.org>2008-08-10 09:24:46 +0000
commit1674800d5fb26decfa74cb7a1d94e2154b7c27a6 (patch)
tree1e7b15d77ed74c2c150c9a1dc05cd709bba3ac81 /src/recur.c
parentcc3b4303056d891c4782469be50be21ca50e2271 (diff)
downloadcalcurse-1674800d5fb26decfa74cb7a1d94e2154b7c27a6.tar.gz
calcurse-1674800d5fb26decfa74cb7a1d94e2154b7c27a6.zip
pcal export added
Diffstat (limited to 'src/recur.c')
-rwxr-xr-xsrc/recur.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/recur.c b/src/recur.c
index 3188678..c014025 100755
--- a/src/recur.c
+++ b/src/recur.c
@@ -1,4 +1,4 @@
-/* $calcurse: recur.c,v 1.36 2008/05/03 19:54:14 culot Exp $ */
+/* $calcurse: recur.c,v 1.37 2008/08/10 09:24:46 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -402,6 +402,24 @@ recur_save_data (FILE *f)
pthread_mutex_unlock (&(recur_alist_p->mutex));
}
+/* Given a day as long, check if this day belongs to the list of exceptions for
+ * the considered item.
+ */
+int
+recur_day_is_exc (long day, struct days_s *item_exc)
+{
+ const int NOT_EXC = 0;
+ const int EXC = 1;
+ struct days_s *exc;
+
+ for (exc = item_exc; exc != 0; exc = exc->next)
+ {
+ if (exc->st == day)
+ return EXC;
+ }
+ return NOT_EXC;
+}
+
/*
* Check if the recurrent item belongs to the selected day,
* and if yes, return the real start time.
@@ -939,3 +957,4 @@ recur_apoint_switch_notify (long date, int recur_nb)
stderr);
exit (EXIT_FAILURE);
}
+