summaryrefslogtreecommitdiffstats
path: root/robots/main.c
Commit message (Collapse)AuthorAgeFilesLines
* robots: Use arc4random_uniform for better uniform distributionnia2020-07-261-3/+2
|
* sprinkle staticdholland2009-08-121-3/+5
|
* don't use char values for functions that can return -1; chars are not alwayschristos2009-08-051-4/+3
| | | signed.
* Use getopt instead of hand-rolled options code. Document all the argumentsdholland2009-08-051-61/+59
| | | | | 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.
* Use random() instead of rand(), and seed with time instead of pid.dholland2009-07-201-3/+4
|
* Assorted minor cleanups, no functional change:dholland2009-07-201-16/+24
| | | | | | | | | | - 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.
* A bit more whitespace.dholland2009-07-201-4/+4
|
* Whitespace.dholland2009-07-201-13/+13
|
* ANSIfy. Use __dead. Object diffs checked.dholland2009-07-201-10/+5
|
* if initscr() fails, exit with a message rather than crash in thedrochner2008-08-081-3/+4
| | | next curses call
* Remove the \n and tabs from the __COPYRIGHT() strings.lukem2008-07-201-4/+4
|
* convert __attribute__s to applicable cdefs.h macrosperry2007-12-151-3/+3
|
* Add (unsigned char) cast to ctype functionsdsl2004-11-051-3/+3
|
* Remove uses of __P.jsm2004-01-271-3/+3
|
* Move UCB-licensed code from 4-clause to 3-clause licence.agc2003-08-071-7/+3
| | | Patches provided by Joel Baker in PR 22269, verified by myself.
* Change deprecated curses function to new equivalent.blymn2001-12-061-3/+3
|
* fix nested externschristos2001-02-051-4/+5
|
* Use setgid(), not setregid().mycroft2000-05-081-3/+3
|
* Ensure correct prompt asking about another game is given at the end ofjsm2000-01-191-2/+3
| | | | | each game. Bug report and fix from Malcolm Parsons <malcolm@bits.bris.ac.uk>.
* Typo fix in unknown option message (from Malcolm Parsonsjsm2000-01-191-3/+3
| | | <malcolm@bits.bris.ac.uk>).
* Remove definition of __cputchar.jsm2000-01-191-9/+2
|
* update after change to return value of tputs() third argumentlukem1999-10-041-4/+4
|
* Security improvements for games (largely from or inspired by OpenBSD).jsm1999-09-121-5/+26
| | | | | | | | | | | | | | | 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.
* Add `__noreturn__' and `__unused__' attributes where appropriate tojsm1999-09-081-3/+3
| | | | | | | | | | | | 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).
* Add use of `const' where appropriate to the games.jsm1999-09-081-4/+4
| | | | | | | | | 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.
* Add -A for automatic playing mode.christos1999-05-151-11/+28
| | | Make the score file MI
* deprecate bzero, rindex, etc. use symbolic constants in open()lukem1997-10-121-3/+3
|
* WARNSifylukem1997-10-121-16/+20
|
* clean up importcgd1995-04-221-9/+19
|
* Really fix exit code.mycroft1993-08-101-4/+3
|
* Rewrite grody exit code and eliminate use of _putchar().mycroft1993-08-101-11/+4
|
* Add RCS identifiers.mycroft1993-08-011-1/+2
|
* initial import of 386bsd-0.1 sourcescgd1993-03-211-0/+196