Home | History | Annotate | Download | only in robots
History log of /src/games/robots/main.c
RevisionDateAuthorComments
 1.34  27-Jun-2022  christos Enable FANCY mode for debugging purposes:
- To enable stand still mode (robot is not moving but waiting in place),
specify a scorefile on the command line called <directory>/stand_still
- To enable pattern roll mode (robot is changing which move to look first)
specify a scorefile on the command line called <directory>/pattern_roll
 1.33  26-Jul-2020  nia robots: Use arc4random_uniform for better uniform distribution
 1.32  12-Aug-2009  dholland sprinkle static
 1.31  05-Aug-2009  christos don't use char values for functions that can return -1; chars are not always
signed.
 1.30  05-Aug-2009  dholland Use getopt instead of hand-rolled options code. Document all the arguments
and options. Don't allow the previously undocumented method to change the
maximum number of scores kept per user to be used on the system-wide high
score file. Sort options list in the man page. Bump its date.
 1.29  20-Jul-2009  dholland Use random() instead of rand(), and seed with time instead of pid.
 1.28  20-Jul-2009  dholland Assorted minor cleanups, no functional change:
- u_int* -> uint*
- don't make private typedefs of system structures
- use curses TRUE and FALSE only with curses booleans, otherwise
true and false;
- includes cleanup
- group globals in extern.c by functionality

Object file diffs inspected.
 1.27  20-Jul-2009  dholland A bit more whitespace.
 1.26  20-Jul-2009  dholland Whitespace.
 1.25  20-Jul-2009  dholland ANSIfy. Use __dead. Object diffs checked.
 1.24  08-Aug-2008  drochner if initscr() fails, exit with a message rather than crash in the
next curses call
 1.23  20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
 1.22  15-Dec-2007  perry branches: 1.22.6;
convert __attribute__s to applicable cdefs.h macros
 1.21  05-Nov-2004  dsl branches: 1.21.16;
Add (unsigned char) cast to ctype functions
 1.20  27-Jan-2004  jsm Remove uses of __P.
 1.19  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22269, verified by myself.
 1.18  06-Dec-2001  blymn Change deprecated curses function to new equivalent.
 1.17  05-Feb-2001  christos fix nested externs
 1.16  08-May-2000  mycroft Use setgid(), not setregid().
 1.15  19-Jan-2000  jsm Ensure correct prompt asking about another game is given at the end of
each game.

Bug report and fix from Malcolm Parsons <malcolm@bits.bris.ac.uk>.
 1.14  19-Jan-2000  jsm Typo fix in unknown option message (from Malcolm Parsons
<malcolm@bits.bris.ac.uk>).
 1.13  19-Jan-2000  jsm Remove definition of __cputchar.
 1.12  04-Oct-1999  lukem update after change to return value of tputs() third argument
 1.11  12-Sep-1999  jsm branches: 1.11.2;
Security improvements for games (largely from or inspired by OpenBSD).

Games which run setgid from dm, but don't need to, should drop their
privileges at startup.

Games which have a scorefile should open it at startup, then drop all
privileges leaving just the open writable file descriptor. If the
game can invoke subprocesses, this should be made close-on-exec.

Games with scorefiles should make sure they do not get a file
descriptor < 3. (Otherwise, they could get confused and corrupt the
scorefile when using stdin, stdout or stderr.)

Some old setuid revokes from the days of setuid games change into gid
revokes.
 1.10  08-Sep-1999  jsm Add `__noreturn__' and `__unused__' attributes where appropriate to
the games.

This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Most noreturn attributes were previously added in bin/6144, with some
others that were missed then in bin/8082. Previous `unused'
attributes were covered in bin/6557, bin/8058 and other PRs (all these
PRs have already been handled and closed).
 1.9  08-Sep-1999  jsm Add use of `const' where appropriate to the games.

This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
 1.8  15-May-1999  christos Add -A for automatic playing mode.
Make the score file MI
 1.7  12-Oct-1997  lukem deprecate bzero, rindex, etc. use symbolic constants in open()
 1.6  12-Oct-1997  lukem WARNSify
 1.5  22-Apr-1995  cgd clean up import
 1.4  10-Aug-1993  mycroft Really fix exit code.
 1.3  10-Aug-1993  mycroft Rewrite grody exit code and eliminate use of _putchar().
 1.2  01-Aug-1993  mycroft Add RCS identifiers.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  22-Apr-1995  cgd src/games/robots from Lite
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.21.16.1  09-Jan-2008  matt sync with HEAD
 1.22.6.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.

RSS XML Feed