aboutsummaryrefslogtreecommitdiffstats
path: root/utils.h
diff options
context:
space:
mode:
authorEl-BG-1970 <elouangros@hotmail.com>2021-10-22 15:10:56 +0200
committerEl-BG-1970 <elouangros@hotmail.com>2021-11-01 22:02:36 +0100
commitbcdfd5d893818bba15f7f616e5f255e2fafed7ed (patch)
tree574e306555d5d0d10b83a06aba3572e87045fc6a /utils.h
parent5e4972c3fbb5b93df4ac4ed65a78af45086432dc (diff)
downloadorg-to-conky-bcdfd5d893818bba15f7f616e5f255e2fafed7ed.tar.gz
fixed issue where agenda entries could not have colons
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils.h b/utils.h
new file mode 100644
index 0000000..eaf4004
--- /dev/null
+++ b/utils.h
@@ -0,0 +1,8 @@
+#include <stddef.h>
+
+char *rstrchr(const char *s, char *start, char c) {
+ char *ret = start;
+ while ((ret > s) && (*ret != c)) ret--;
+ if ((s == ret) && (*s != c)) return NULL;
+ else return ret;
+}