summaryrefslogtreecommitdiffstats
path: root/games/pom
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-05-27 23:11:26 +0000
committerache <ache@FreeBSD.org>1996-05-27 23:11:26 +0000
commit8ee889e2bc3c9da6f79a9403dfdcd83e9928bc0d (patch)
treef0db842c434f97eec2a82014998f499e2c7f1872 /games/pom
parent71de83ff607433b00ff4268b69f93f978ddcf247 (diff)
downloadFreeBSD-src-8ee889e2bc3c9da6f79a9403dfdcd83e9928bc0d.zip
FreeBSD-src-8ee889e2bc3c9da6f79a9403dfdcd83e9928bc0d.tar.gz
-Wall cleanup
Remove unneded function
Diffstat (limited to 'games/pom')
-rw-r--r--games/pom/Makefile1
-rw-r--r--games/pom/pom.c29
2 files changed, 13 insertions, 17 deletions
diff --git a/games/pom/Makefile b/games/pom/Makefile
index 82b60b7..d204b2a 100644
--- a/games/pom/Makefile
+++ b/games/pom/Makefile
@@ -4,5 +4,6 @@ PROG= pom
MAN6= pom.6
DPADD= ${LIBM}
LDADD= -lm
+CFLAGS+=-Wall
.include <bsd.prog.mk>
diff --git a/games/pom/pom.c b/games/pom/pom.c
index e8ea17a..1de213c 100644
--- a/games/pom/pom.c
+++ b/games/pom/pom.c
@@ -34,13 +34,13 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
+static const char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
#endif /* not lint */
/*
@@ -53,7 +53,7 @@ static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
*
*/
-#include <sys/time.h>
+#include <time.h>
#include <stdio.h>
#include <math.h>
@@ -65,25 +65,20 @@ static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
#define lzero 18.251907 /* lunar mean long at EPOCH */
#define Pzero 192.917585 /* lunar mean long of perigee at EPOCH */
#define Nzero 55.204723 /* lunar mean long of node at EPOCH */
-#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
+#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
-double dtor(), potm(), adj360();
+double dtor(), potm();
+void adj360();
-main()
+void main()
{
- extern int errno;
- struct timeval tp;
- struct timezone tzp;
- struct tm *GMT, *gmtime();
+ time_t tt;
+ struct tm *GMT;
double days, today, tomorrow;
int cnt;
- char *strerror();
- if (gettimeofday(&tp,&tzp)) {
- (void)fprintf(stderr, "pom: %s\n", strerror(errno));
- exit(1);
- }
- GMT = gmtime(&tp.tv_sec);
+ (void) time(&tt);
+ GMT = gmtime(&tt);
days = (GMT->tm_yday + 1) + ((GMT->tm_hour +
(GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0);
for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt)
@@ -164,7 +159,7 @@ dtor(deg)
* adj360 --
* adjust value so 0 <= deg <= 360
*/
-double
+void
adj360(deg)
double *deg;
{
OpenPOWER on IntegriCloud