NetBSD/games
kre f71e70709c When worms default delay was changed from 0, to 20ms (Oct 2020)
it lost the ability to run flat out (no sleeps) - which while not
very useful for actually observing the behaviour of various Nematoda,
can be useful when 'worms' is being used to generate cpu heat - it
turns out to be a simple tool to make all of the app itself, the
xterm it runs in (when running under X) and the X server, all more
or less continuously busy - a trivial perpetual CPU load generator.

Changing that was not a simple matter of just allowing -d 0..1000
rather than -d 1..1000 which had always been the limits on -d, as
previously, simply by excluding 0, common error checking wasn't
essential.  -djunk would return 0 which was invalid, and so an error
- that it was invalid because 0 < 1, rather than because "junk" is not
a number wasn't material.

Now we need some slightly more elaborate error checking code for the
-d value, and if we're going to do that, may as well do the same for
the -l and -n options, which also take numeric values.  That is, it
will no longer be possible to say:
	worms -n "5 worms"
Just the number is allowed (but -d now allows a "ms" or "us" suffix).

While here, place a reasonable upper limit (depending upon the
screen size, and worm length) upon the number of worms, so they
have somewhere to go, rather than just on top of each other.

exit(1) from the errx() rather than 0, in the case that curses
initscr() fails (doesn't seem right that it should appear as a
successful run of worms, if it never managed to start).

A couple more minor 80 column violations are handled, without
further penalty, in this update (one simply vanishes, the other
is wrapped).

Note that this sounds like a lot, but it is really all just minor
internal bookkeeping updates - the only real advertised user visible
change is the ability to use -d0 which just restores that which was
the default (though it could never be set via the option) until Oct 2020
- so really all that's happening is replacing minor functionality lost
then, while leaving the change of the default delay that that change
made, untouched.

No man page update required (that never excluded -d0).
2023-04-15 15:21:56 +00:00
..
adventure
arithmetic
atc atc(6): simplify reallocation logic 2021-10-29 11:44:22 +00:00
backgammon fix various typos, mainly in comments. 2022-04-04 19:33:44 +00:00
banner
battlestar
bcd
boggle
caesar games/caesar: fix error handling for I/O 2021-11-16 20:42:47 +00:00
canfield
cgram cgram: allow cursor navigation with KEY_BEG as well 2022-06-12 14:59:44 +00:00
ching ching(6): Fix formatting. .Pp is not .br 2022-08-19 00:40:20 +00:00
colorbars
countmail
cribbage Define yes as extern veriable to fix build 2023-01-06 19:02:02 +00:00
dab dab: fix typo in comment 2021-12-05 09:53:15 +00:00
dm
factor
fish Flush input to EOL correctly in games/fish. 2021-07-25 02:00:42 +00:00
fortune -h doesn't sort numerically, pointed out by various 2022-10-25 19:33:00 +00:00
gomoku gomoku: remove redundant parentheses 2022-06-19 10:33:17 +00:00
hack
hals_end
hangman
hunt huntd(6): convert malloc(x * y) and realloc(x * y) to reallocarr 2021-10-29 11:40:23 +00:00
larn
mille s/totaled/totalled/ 2021-12-31 12:42:24 +00:00
monop
morse
number
phantasia fix various typos in comments. 2022-06-27 22:41:28 +00:00
pig
pom
ppt
primes
quiz quiz: fix wrong usage of the <ctype.h> functions 2023-01-22 17:19:11 +00:00
rain
random
robots Enable FANCY mode for debugging purposes: 2022-06-27 18:48:49 +00:00
rogue fix various typos in comments, messages and documentation. 2021-09-19 10:34:06 +00:00
sail sail(6): convert realloc(x * y) to reallocarr 2021-10-29 11:42:34 +00:00
snake
testpat Better display in monochrome. 2021-11-13 20:59:13 +00:00
tetris
trek fix references in manual pages to the reference documentation 2022-06-28 20:12:52 +00:00
wargames
warp fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
worm
worms When worms default delay was changed from 0, to 20ms (Oct 2020) 2023-04-15 15:21:56 +00:00
wtf
wump
Makefile
Makefile.inc