Remove sys_time in favour of directly calling time().
This commit is contained in:
parent
07113c069b
commit
57cb99ade1
|
@ -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__ */
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue