Tweaks to allow library to build on 6809
authorNeal Andrew Crook <neal@pippaluk.org.uk>
Sat, 18 Jun 2016 22:18:47 +0000 (23:18 +0100)
committerNeal Andrew Crook <neal@pippaluk.org.uk>
Sat, 18 Jun 2016 22:18:47 +0000 (23:18 +0100)
Library/include/termcap.h
Library/libs/tzset.c

index 369c073..7dd2238 100644 (file)
@@ -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 */
index a323e1c..f9b0e97 100644 (file)
@@ -1,29 +1,29 @@
-/*************************** TZSET ************************************/  \r
-    \r
-#include <time.h>\r
-#include <string.h>\r
-#include <stdlib.h>\r
-\r
+/*************************** TZSET ************************************/
+
+#include <time.h>
+#include <string.h>
+#include <stdlib.h>
+
 char *tzname[2] = { "GMT", "\0\0\0" };
 
 int daylight;
 long timezone;
\r
-/* tzset expects fo find a environment string of the form TZ=...\r
- * ??? need to correct!\r
- */ \r
-void tzset(VOID)
+
+/* tzset expects fo find a environment string of the form TZ=...
+ * ??? need to correct!
+ */
+void tzset(void)
 {
-       char *tz = getenv("TZ");
-\r
-       if (tz == NULL) {
-               memcpy(tzname[1], "GMT", 3);
-               timezone = 0 * 60 * 60L;        /* London */
-       } else {
-               int v;
-               \r
-               memcpy(tzname[1], tz, 3);
-               v = atoi(tz + 3);
-               timezone = -((v / 100) * 60 + (v % 100)) * 60L;
-       }\r
-} \r
+        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;
+        }
+}