Remove sys_time in favour of directly calling time().
authorDavid Given <dg@cowlark.com>
Wed, 9 Nov 2016 20:52:04 +0000 (21:52 +0100)
committerDavid Given <dg@cowlark.com>
Wed, 9 Nov 2016 20:52:04 +0000 (21:52 +0100)
lang/cem/cemcom.ansi/init.c
lang/cem/cpp.ansi/init.c
modules/src/system/system.3
modules/src/system/system.h
modules/src/system/time.c [deleted file]

index bb1fd55..3b3403a 100644 (file)
@@ -7,6 +7,7 @@
 
 #include       <stdlib.h>
 #include       <string.h>
+#include        <time.h>
 #include       "parameters.h"
 
 #ifndef NOPP
@@ -44,7 +45,7 @@ init_pp()
                "Jan", "Feb", "Mar", "Apr", "May", "Jun",
                "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
        };
-       long clock, sys_time();
+       time_t clock;
        static char dbuf[30];
        static char tbuf[30];
        struct tm  *tp;
@@ -70,7 +71,7 @@ init_pp()
        /*      Initialize __LINE__, __FILE__, __DATE__, __TIME__,
                and __STDC__ macro definitions.
        */
-       clock = sys_time();
+       clock = time(NULL);
        tp = localtime(&clock);
 
        /* __DATE__ */
index a9cba4d..3953609 100644 (file)
@@ -7,6 +7,7 @@
 
 #include    <stdlib.h>
 #include    <string.h>
+#include    <time.h>
 #include       "system.h"
 #include       "alloc.h"
 #include       "time.h"
@@ -42,7 +43,7 @@ init_pp()
                "Jan", "Feb", "Mar", "Apr", "May", "Jun",
                "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
        };
-       long clock, sys_time();
+       time_t clock;
        static char dbuf[30];
        static char tbuf[30];
        struct tm  *tp;
@@ -68,7 +69,7 @@ init_pp()
        /*      Initialize __LINE__, __FILE__, __DATE__, __TIME__,
                and __STDC__ macro definitions.
        */
-       clock = sys_time();
+       clock = time(NULL);
        tp = localtime(&clock);
 
        /* __DATE__ */
index 5855748..c58c168 100644 (file)
@@ -4,7 +4,7 @@
 sys_open, sys_close, sys_read, sys_write, sys_reset, sys_access,
 sys_modtime, sys_remove, sys_rename, sys_filesize, sys_chmode,
 sys_lock, sys_unlock,
-sys_break, sys_stop, sys_time \- system call interface
+sys_break, sys_stop \- system call interface
 .SH SYNOPSIS
 .nf
 .B #include <system.h>
@@ -67,8 +67,6 @@ sys_break, sys_stop, sys_time \- system call interface
 .B void sys_stop(how)
 .B int how;
 .PP
-.B long sys_time();
-.PP
 .B long sys_modtime(path)
 .B char *path;
 .fi
index 8f8bce4..8a58251 100644 (file)
@@ -50,7 +50,6 @@ _PROTOTYPE(int sys_unlock, (char *));
 #endif
 _PROTOTYPE(char *sys_break, (int));
 _PROTOTYPE(void sys_stop, (int));
-_PROTOTYPE(long sys_time, (void));
 _PROTOTYPE(long sys_modtime, (char *));
 
 /* standard file decsriptors */
diff --git a/modules/src/system/time.c b/modules/src/system/time.c
deleted file mode 100644 (file)
index e06a9fa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Id$ */
-
-#include "system.h"
-
-long time();
-
-long
-sys_time()
-{
-       return time((long *) 0);
-}