From: Ralph Corderoy Date: Wed, 15 Nov 2017 23:36:42 +0000 (+0000) Subject: datetime.c: Move interface to own file. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/95745f0e79fbd9347f88d56f06c0083f1c4ad1e0 datetime.c: Move interface to own file. --- diff --git a/Makefile.am b/Makefile.am index b9252d09..4efbe364 100644 --- a/Makefile.am +++ b/Makefile.am @@ -378,6 +378,7 @@ noinst_HEADERS = \ sbr/crawl_folders.h \ sbr/credentials.h \ sbr/ctype-checked.h \ + sbr/datetime.h \ sbr/discard.h \ sbr/dtime.h \ sbr/encode_rfc2047.h \ diff --git a/h/icalendar.h b/h/icalendar.h index 0bedfded..1f76921e 100644 --- a/h/icalendar.h +++ b/h/icalendar.h @@ -74,11 +74,6 @@ struct contentline *find_contentline (contentline *, const char *, const char *) PURE; void free_contentlines (contentline *); -typedef struct tzdesc *tzdesc_t; -tzdesc_t load_timezones (const contentline *); -void free_timezones (tzdesc_t); -char *format_datetime (tzdesc_t, const contentline *); - /* * The following provide access to, and by, the iCalendar parser. */ diff --git a/sbr/datetime.c b/sbr/datetime.c index 71a21f99..3cbd171b 100644 --- a/sbr/datetime.c +++ b/sbr/datetime.c @@ -9,6 +9,7 @@ #include "dtime.h" #include "error.h" #include "h/icalendar.h" +#include "datetime.h" #include "h/fmt_scan.h" #include "h/tws.h" #include "h/utils.h" diff --git a/sbr/datetime.h b/sbr/datetime.h new file mode 100644 index 00000000..b5254779 --- /dev/null +++ b/sbr/datetime.h @@ -0,0 +1,11 @@ +/* datetime.h -- functions for manipulating RFC 5545 date-time values + * + * This code is Copyright (c) 2017, by the authors of nmh. + * See the COPYRIGHT file in the root directory of the nmh + * distribution for complete copyright information. */ + +typedef struct tzdesc *tzdesc_t; + +tzdesc_t load_timezones(const contentline *); +void free_timezones(tzdesc_t); +char *format_datetime(tzdesc_t, const contentline *); diff --git a/uip/mhical.c b/uip/mhical.c index d0ebd137..9618b2b2 100644 --- a/uip/mhical.c +++ b/uip/mhical.c @@ -15,6 +15,7 @@ #include "sbr/print_help.h" #include "sbr/error.h" #include "h/icalendar.h" +#include "sbr/datetime.h" #include "sbr/icalparse.h" #include "h/fmt_scan.h" #include "h/addrsbr.h"