History log of /openbsd-current/games/pom/pom.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.28 24-Dec-2017 cheloha

Consolidate printf(3) calls at the end of main().

Makes reading the classification algorithm easier.

ok tb@


# 1.27 24-Dec-2017 cheloha

Use more libm.

adj360() is a modulo operation: use fmod(3) to simplify things.

Adding 0.5 to the phase to steer implicit truncation is a hack:
use lround(3) to simplify things.

Product of a discussion with pjanzen@/jca@/tb@ regarding floating-point
rounding and the importance of correctly classifying a gibbous moon.

ok pjanzen@ jca@ tb@


# 1.26 23-Dec-2017 cheloha

As we only use the .tv_sec field, simplify gettimeofday(2) -> time(3).

ok tb@ jca@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.25 01-Dec-2016 fcambus

Remove useless #ifndef in atc(6) and pom(6).

M_PI is always defined, so we can drop those directives.

OK deraadt@, millert@


# 1.24 11-Sep-2016 tb

Callers of time(3) should #include <time.h>.

ok deraadt


# 1.23 27-Aug-2016 guenther

Pull in <sys/time.h> for struct timespec, gettimeofday(), clock_gettime(),
and setitimer()

ok deraadt@


Revision tags: OPENBSD_6_0_BASE
# 1.22 07-Mar-2016 mestre

- General changes:
- Remove -? from getopt(3) options, but still keep (or add) -h where applicable
- Replace hardcoded program strings by getprogname(3)

- Specific changes:
- atc(6): this used -? and -u for usage(), remove both from game and manpage
- bcd(6): use __progname instead of getprogname(3), no need to include stdlib.h
- hunt(6): replace fputs(3) by fprintf(3)

OK tb@ after his suggestions


Revision tags: OPENBSD_5_9_BASE
# 1.21 07-Jan-2016 tb

Some basic code maintenance in games/

- in main() replace exit with return
- drop some /* NOTREACHED */ lint comments along the way.
- make more use of standard CFLAGS, esp. -Wimplicit-function-declaration
- add and sort some headers when needed
- add straightforward pledges to some programs used at compile time

discussed with and ok mestre@


# 1.20 04-Jan-2016 mestre

More cleanup and sorting on header section

OK tb@ and he also pointed out that for consistency with rest of the tree we
should include termios.h instead of sys/ttydefaults.h, where applicable


# 1.19 26-Dec-2015 mestre

Set as __dead a few more functions, that don't return, on games/

With precious tip, help and also OK from tb@


# 1.18 24-Oct-2015 mmcc

Cast isdigit()'s argument to unsigned char.

ok guenther@


# 1.17 14-Oct-2015 doug

Pledge "stdio" for simple games.

ok semarie@


Revision tags: OPENBSD_5_8_BASE
# 1.16 17-Mar-2015 millert

Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@


# 1.15 15-Mar-2015 millert

tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time. This makes the
tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree. Actual removal of tzfile.h is pending
a ports build. Based on a diff from deraadt@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.14 31-Dec-2009 sobrado

remove superfluous bracket level from time representation.

ok jmc@


# 1.13 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.12 05-Nov-2005 jmc

- use macros for args
- better list -width
- epoch -> Epoch
- missing set of `[]' in usage()


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.11 10-Jul-2004 deraadt

more ansi; khalek@linuxgamers.net


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.10 10-Jul-2003 david

add missing includes
ok deraadt@ tedu@


# 1.9 03-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.8 31-May-2002 pjanzen

No dm -> no need to revoke setegid.


Revision tags: OPENBSD_3_1_BASE
# 1.7 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.6 06-Sep-1998 pjanzen

Use formulae from newer edition of Duffett-Smith's book (and acknowledge in
man page)
Allow command-line selection of dates other than now
Use M_PI
Fix bug occurring just before a new or full moon.


# 1.5 26-Jul-1998 pjanzen

Y2K fix; jsm28@cam.ac.uk


Revision tags: OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.4 22-Dec-1996 deraadt

proper gid revoke


# 1.3 19-Dec-1996 deraadt

setgid games, not setuid games. closes a neat set of holes


Revision tags: OPENBSD_2_0_BASE
# 1.2 17-Feb-1996 niklas

From netbsd:
Removed "extern int errno"; Added #include <errno.h> if not already present.


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision