X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c129bec59a25b62b25763798d4a269a7a2fabe54..ff168106b44fdfbaed7d7cf08c54a72ee1fe2c0a:/sbr/dtime.c diff --git a/sbr/dtime.c b/sbr/dtime.c index f661ed14..a8b8432c 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -5,10 +5,11 @@ * complete copyright information. */ -#include /* for snprintf() */ -#include -#include -#include +#include "h/mh.h" +#include "dtime.h" +#include "h/nmh.h" +#include "h/utils.h" +#include "h/tws.h" #include #if !defined(HAVE_STRUCT_TM_TM_GMTOFF) @@ -285,7 +286,8 @@ dasctime (struct tws *tw, int flags) * return the string representation of the numeric offset. */ -char *dtimezone(int offset, int flags) +char * +dtimezone(int offset, int flags) { static char buffer[sizeof "+3579139459"]; /* 2,147,483,648 / 60 = 35,791,394 */ bool pos; @@ -355,7 +357,7 @@ dmktime (struct tws *tw) if (tw->tw_flags & TW_DST) result -= 60 * 60; /* One hour. */ - return (tw->tw_clock = result); + return tw->tw_clock = result; } @@ -408,6 +410,6 @@ twsort (struct tws *tw1, struct tws *tw2) if (tw2->tw_clock == 0) dmktime (tw2); - return ((c1 = tw1->tw_clock) > (c2 = tw2->tw_clock) ? 1 - : c1 == c2 ? 0 : -1); + return (c1 = tw1->tw_clock) > (c2 = tw2->tw_clock) ? 1 + : c1 == c2 ? 0 : -1; }