aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-07-23 18:33:20 +0000
committerFrederic Culot <calcurse@culot.org>2009-07-23 18:33:20 +0000
commitade0470197934fba87eb5113a7ecb2d542a6ed73 (patch)
tree3ec5a3f8b363c5ef84bdccbc761bb80edee57c9f /src/utils.c
parentb55cad85dad5bd4bb81c92f6acaef7394b23d9b5 (diff)
downloadcalcurse-ade0470197934fba87eb5113a7ecb2d542a6ed73.tar.gz
calcurse-ade0470197934fba87eb5113a7ecb2d542a6ed73.zip
Functions added to implement a logging mechanism for calcurse daemon.
Diffstat (limited to 'src/utils.c')
-rwxr-xr-xsrc/utils.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 34cb142..9e4da1d 100755
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $calcurse: utils.c,v 1.77 2009/07/20 19:45:27 culot Exp $ */
+/* $calcurse: utils.c,v 1.78 2009/07/23 18:33:21 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -764,6 +764,18 @@ now (void)
return (current_time);
}
+char *
+nowstr (void)
+{
+ static char buf[BUFSIZ];
+ time_t now;
+
+ (void)time (&now);
+ (void)strftime (buf, sizeof buf, "%a %b %d %T %Y", localtime (&now));
+
+ return buf;
+}
+
long
mystrtol (const char *str)
{