X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/462fca95471224f85b85be911e72faee16cd1597..0336b6e38552aca20a3fce24786b1474437d7ec0:/pom/pom.c diff --git a/pom/pom.c b/pom/pom.c index 3d5c1389..3ef68819 100644 --- a/pom/pom.c +++ b/pom/pom.c @@ -1,6 +1,8 @@ +/* $NetBSD: pom.c,v 1.6 1996/02/06 22:47:29 jtc Exp $ */ + /* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software posted to USENET. * @@ -34,14 +36,17 @@ */ #ifndef lint -char copyright[] = -"@(#) Copyright (c) 1989 The Regents of the University of California.\n\ - All rights reserved.\n"; +static 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[] = "from: @(#)pom.c 5.3 (Berkeley) 2/28/91";*/ -static char rcsid[] = "$Id: pom.c,v 1.2 1993/08/01 18:53:16 mycroft Exp $"; +#if 0 +static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93"; +#else +static char rcsid[] = "$NetBSD: pom.c,v 1.6 1996/02/06 22:47:29 jtc Exp $"; +#endif #endif /* not lint */ /* @@ -56,8 +61,10 @@ static char rcsid[] = "$Id: pom.c,v 1.2 1993/08/01 18:53:16 mycroft Exp $"; #include #include +#include #include #include +#include #define PI 3.141592654 #define EPOCH 85 @@ -72,19 +79,19 @@ double dtor(), potm(), adj360(); main() { - extern int errno; struct timeval tp; struct timezone tzp; struct tm *GMT, *gmtime(); + time_t tmpt; 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); + tmpt = tp.tv_sec; + GMT = gmtime(&tmpt); 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) @@ -111,6 +118,7 @@ main() today); } } + exit(0); } /*