]> diplodocus.org Git - nmh/commitdiff
dtime.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 18:40:21 +0000 (18:40 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 16 Nov 2017 00:03:50 +0000 (00:03 +0000)
18 files changed:
Makefile.am
h/tws.h
sbr/datetime.c
sbr/dtime.c
sbr/dtime.h [new file with mode: 0644]
sbr/dtimep.l
sbr/fmt_scan.c
uip/annosbr.c
uip/dropsbr.c
uip/forwsbr.c
uip/inc.c
uip/msgchk.c
uip/picksbr.c
uip/post.c
uip/scan.c
uip/scansbr.c
uip/slocal.c
uip/sortm.c

index 42e75a5..fbce3f5 100644 (file)
@@ -382,6 +382,7 @@ noinst_HEADERS = \
     sbr/credentials.h \
     sbr/ctype-checked.h \
     sbr/discard.h \
     sbr/credentials.h \
     sbr/ctype-checked.h \
     sbr/discard.h \
+    sbr/dtime.h \
     sbr/encode_rfc2047.h \
     sbr/error.h \
     sbr/escape_addresses.h \
     sbr/encode_rfc2047.h \
     sbr/error.h \
     sbr/escape_addresses.h \
diff --git a/h/tws.h b/h/tws.h
index 17a01a2..495343f 100644 (file)
--- a/h/tws.h
+++ b/h/tws.h
@@ -36,23 +36,7 @@ struct tws {
 
 #define        dtwszone(tw) dtimezone (tw->tw_zone, tw->tw_flags)
 
 
 #define        dtwszone(tw) dtimezone (tw->tw_zone, tw->tw_flags)
 
-extern char *tw_dotw[];
-extern char *tw_ldotw[];
-extern char *tw_moty[];
-
 /*
  * prototypes
  */
 /*
  * prototypes
  */
-char *dtime (time_t *, int);
-char *dtimenow (int);
-char *dctime (struct tws *);
-struct tws *dlocaltimenow (void);
-struct tws *dlocaltime (time_t *);
-struct tws *dgmtime (time_t *);
-char *dasctime (struct tws *, int);
-char *dtimezone (int, int);
-int twsort (struct tws *, struct tws *);
-time_t dmktime (struct tws *);
-void set_dotw (struct tws *);
-
 struct tws *dparsetime (char *);
 struct tws *dparsetime (char *);
index e4d2d14..71a21f9 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "dtime.h"
 #include "error.h"
 #include "h/icalendar.h"
 #include "h/fmt_scan.h"
 #include "error.h"
 #include "h/icalendar.h"
 #include "h/fmt_scan.h"
index 3f8f763..a8b8432 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "dtime.h"
 #include "h/nmh.h"
 #include "h/utils.h"
 #include "h/tws.h"
 #include "h/nmh.h"
 #include "h/utils.h"
 #include "h/tws.h"
diff --git a/sbr/dtime.h b/sbr/dtime.h
new file mode 100644 (file)
index 0000000..8accd9e
--- /dev/null
@@ -0,0 +1,21 @@
+/* dtime.h -- time/date routines
+ *
+ * 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. */
+
+extern char *tw_moty[];
+extern char *tw_dotw[];
+extern char *tw_ldotw[];
+
+struct tws *dlocaltimenow(void);
+struct tws *dlocaltime(time_t *);
+struct tws *dgmtime(time_t *);
+char *dctime(struct tws *);
+char *dtimenow(int);
+char *dtime(time_t *, int);
+char *dasctime(struct tws *, int);
+char *dtimezone(int, int);
+time_t dmktime(struct tws *);
+void set_dotw(struct tws *);
+int twsort(struct tws *, struct tws *);
index 68f0ea7..699e90e 100644 (file)
@@ -12,6 +12,7 @@
 %{
 #include "h/nmh.h"
 #include "h/mh.h"
 %{
 #include "h/nmh.h"
 #include "h/mh.h"
+#include "dtime.h"
 #include "h/utils.h"
 #include "h/tws.h"
 
 #include "h/utils.h"
 #include "h/tws.h"
 
index c5dc4f7..869a278 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "dtime.h"
 #include "strindex.h"
 #include "fmt_rfc2047.h"
 #include "uprf.h"
 #include "strindex.h"
 #include "fmt_rfc2047.h"
 #include "uprf.h"
index e9b64dc..fcb5e09 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "annosbr.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/cpydata.h"
 #include "annosbr.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/cpydata.h"
index 733e6e6..0029f07 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "h/nmh.h"
 #include "h/mh.h"
 
 #include "h/nmh.h"
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "sbr/strindex.h"
 #include "sbr/error.h"
 #include "h/utils.h"
 #include "sbr/strindex.h"
 #include "sbr/error.h"
 #include "h/utils.h"
index 07ea3ae..005bc9c 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getcpy.h"
 #include "sbr/error.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getcpy.h"
 #include "sbr/error.h"
index 70dddbd..bceea53 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -31,6 +31,7 @@
 #endif
 
 #include "h/mh.h"
 #endif
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
index 411686e..24dc25f 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
 #include "sbr/getarguments.h"
 #include "sbr/smatch.h"
 #include "sbr/ambigsw.h"
index bee22f2..a2a8a79 100644 (file)
@@ -6,6 +6,8 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
+#include "sbr/dtime.h"
 #include "sbr/m_getfld.h"
 #include "sbr/smatch.h"
 #include "sbr/fmt_rfc2047.h"
 #include "sbr/m_getfld.h"
 #include "sbr/smatch.h"
 #include "sbr/fmt_rfc2047.h"
index 1dd794d..09c6615 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"
 #include "sbr/concat.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"
 #include "sbr/concat.h"
index b74b360..8a2e8dc 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/getarguments.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/getarguments.h"
index 81abc7d..38b2ca4 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
 #include "scansbr.h"
 #include "sbr/m_name.h"
 #include "sbr/m_gmprot.h"
index 66685b4..f0f8dc5 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"
 #include "sbr/m_gmprot.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"
index e2b6185..347ea17 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "sbr/dtime.h"
 #include "sbr/m_name.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"
 #include "sbr/m_name.h"
 #include "sbr/m_getfld.h"
 #include "sbr/getarguments.h"