Functions added to implement a logging mechanism for calcurse daemon.
This commit is contained in:
14
src/utils.c
14
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user