-/* $NetBSD: pom.c,v 1.14 2004/01/27 20:30:30 jsm Exp $ */
+/* $NetBSD: pom.c,v 1.15 2007/01/12 22:43:05 hubertf Exp $ */
/*
* Copyright (c) 1989, 1993
#if 0
static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pom.c,v 1.14 2004/01/27 20:30:30 jsm Exp $");
+__RCSID("$NetBSD: pom.c,v 1.15 2007/01/12 22:43:05 hubertf Exp $");
#endif
#endif /* not lint */
void badformat(void) __attribute__((__noreturn__));
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
time_t tmpt, now;
double days, today, tomorrow;
today);
}
}
- exit(0);
+
+ return EXIT_SUCCESS;
}
/*
* return phase of the moon
*/
double
-potm(days)
- double days;
+potm(double days)
{
double N, Msol, Ec, LambdaSol, l, Mm, Ev, Ac, A3, Mmprime;
double A4, lprime, V, ldprime, D, Nm;
* convert degrees to radians
*/
double
-dtor(deg)
- double deg;
+dtor(double deg)
{
return(deg * PI / 180);
}
* adjust value so 0 <= deg <= 360
*/
void
-adj360(deg)
- double *deg;
+adj360(double *deg)
{
for (;;)
if (*deg < 0)
#define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2;
time_t
-parsetime(p)
- char *p;
+parsetime(char *p)
{
struct tm *lt;
int bigyear;
}
void
-badformat()
+badformat(void)
{
warnx("illegal time format");
(void)fprintf(stderr, "usage: pom [[[[[cc]yy]mm]dd]HH]\n");
- exit(1);
+ exit(EXIT_FAILURE);
}