From: Neal Andrew Crook Date: Sat, 18 Jun 2016 22:18:47 +0000 (+0100) Subject: Tweaks to allow library to build on 6809 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=8a9dce7c1a87d2d94616e6d16abca5fc3eb24ebc;p=FUZIX.git Tweaks to allow library to build on 6809 --- diff --git a/Library/include/termcap.h b/Library/include/termcap.h index 369c073a..7dd22381 100644 --- a/Library/include/termcap.h +++ b/Library/include/termcap.h @@ -14,7 +14,7 @@ extern int tgetflag(char *__id); extern int tgetnum(char *__id); extern char *tgetstr(char *__id, char **__area); -extern int tputs(const char *__str, int __affcnt, int (*__putc)(int))); +extern int tputs(const char *__str, int __affcnt, int (*__putc)(int ch)); extern char *tgoto(const char *__cap, int __col, int __row); #endif /* _TERMCAP_H */ diff --git a/Library/libs/tzset.c b/Library/libs/tzset.c index a323e1c0..f9b0e97d 100644 --- a/Library/libs/tzset.c +++ b/Library/libs/tzset.c @@ -1,29 +1,29 @@ -/*************************** TZSET ************************************/ - -#include -#include -#include - +/*************************** TZSET ************************************/ + +#include +#include +#include + char *tzname[2] = { "GMT", "\0\0\0" }; int daylight; long timezone; - -/* tzset expects fo find a environment string of the form TZ=... - * ??? need to correct! - */ -void tzset(VOID) + +/* tzset expects fo find a environment string of the form TZ=... + * ??? need to correct! + */ +void tzset(void) { - char *tz = getenv("TZ"); - - if (tz == NULL) { - memcpy(tzname[1], "GMT", 3); - timezone = 0 * 60 * 60L; /* London */ - } else { - int v; - - memcpy(tzname[1], tz, 3); - v = atoi(tz + 3); - timezone = -((v / 100) * 60 + (v % 100)) * 60L; - } -} + char *tz = getenv("TZ"); + + if (tz == NULL) { + memcpy(tzname[1], "GMT", 3); + timezone = 0 * 60 * 60L; /* London */ + } else { + int v; + + memcpy(tzname[1], tz, 3); + v = atoi(tz + 3); + timezone = -((v / 100) * 60 + (v % 100)) * 60L; + } +}