From: David Given Date: Wed, 9 Nov 2016 20:52:04 +0000 (+0100) Subject: Remove sys_time in favour of directly calling time(). X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=57cb99ade1ada6dd5cf77162b335f8f750d075ff;p=ack.git Remove sys_time in favour of directly calling time(). --- diff --git a/lang/cem/cemcom.ansi/init.c b/lang/cem/cemcom.ansi/init.c index bb1fd5559..3b3403aa4 100644 --- a/lang/cem/cemcom.ansi/init.c +++ b/lang/cem/cemcom.ansi/init.c @@ -7,6 +7,7 @@ #include #include +#include #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__ */ diff --git a/lang/cem/cpp.ansi/init.c b/lang/cem/cpp.ansi/init.c index a9cba4dba..3953609b5 100644 --- a/lang/cem/cpp.ansi/init.c +++ b/lang/cem/cpp.ansi/init.c @@ -7,6 +7,7 @@ #include #include +#include #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__ */ diff --git a/modules/src/system/system.3 b/modules/src/system/system.3 index 58557489c..c58c168bb 100644 --- a/modules/src/system/system.3 +++ b/modules/src/system/system.3 @@ -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 @@ -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 diff --git a/modules/src/system/system.h b/modules/src/system/system.h index 8f8bce45c..8a5825173 100644 --- a/modules/src/system/system.h +++ b/modules/src/system/system.h @@ -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 index e06a9fa00..000000000 --- a/modules/src/system/time.c +++ /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); -}