Commit Graph

18 Commits

Author SHA1 Message Date
kre 8552e825c7 Add a little optional colour, optionally distinguish worm heads,
and optionally randomise worm lengths.   Just exit instead of
continuing with a nonsense display if the window shrinks (and
for consistency if it grows).

Most of the ideas and code from RVP.   Bugs and man page mangling
from me.
2023-04-26 22:58:09 +00:00
kre e92b04bbd5 Correct some unfortunate behaviour in extreme cases pointed out by RVP.
(Very long worms in a smallish window could result in the max number of
worms being 0...)

While here (also suggested by RVP) seed the random number generator,
also add a -S option to set the seed (note: while this is documented
in the updated man page, it does not appear in the usage message in
case of an error ... not likely to be used often enough to include there).

Also some minor improvements suggested by RVP:
	delete the prototype for main()
	exit curses mode before abort() (which should not happen, but...)
	no need to return (->exit) after abort() as modern abort() can
		never return.

In addition, check for extraneous (ignored) (non-option) args.
Check for absurdly small or big screens (the worm placement algorithm
doesn't work well for lines of columns < 3, and the abort() mentioned
above actually happens if one of those is == 1).

More flavours of worms added.

Some minor man page wording improvements.
2023-04-18 15:02:22 +00:00
nia 7aac251b81 worms(6): Use a reasonable default delay for non-1980s terminals.
This is still fast, but not unreasonably fast.
2020-10-14 07:32:53 +00:00
wiz fb9125d78a - improve wording
- sort option list
- add argument names in option list and descriptions and adjust table width
- improve punctuation
- bump date

From Bug Hunting.
2012-08-12 17:30:03 +00:00
joerg aee82d7c52 Fix preamble 2009-03-11 13:06:10 +00:00
agc e5aeb4ea46 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
2003-08-07 09:36:50 +00:00
wiz 0d22e30cd0 New sentences begin on new lines.
Patch from Richard Elz, slightly improved by yours truly.
2002-09-26 16:12:39 +00:00
wiz 834bb1b3ab Whitespace and/or punctuation fixes. 2001-04-02 22:42:37 +00:00
hubertf a71d955669 This patch converts worms(6) to use curses, thereby
simplifying the code and improving its portability.  It also adds a
delay option from OpenBSD, to allow reasonable speed display on fast
terminals, adds use of const, and fixes signal handling and use of
errx() where appropriate.

Patch supplied in PR 6661 by Joseph Myers <jsm28@cam.ac.uk>.
1999-07-30 02:23:27 +00:00
erh 55f3a4b91b Fix .Bl/.El imbalance. 1999-03-10 09:29:08 +00:00
fair dc026e0515 Change occurrences of "UNIX" to .Ux or .At as appropriate. 1998-04-28 06:00:51 +00:00
lukem e9954a7422 WARNSify 1997-10-12 02:12:45 +00:00
cgd 5725dd8581 un-munge import; it apparently didn't import properly. 1995-04-22 08:07:59 +00:00
cgd ff134ba07f rough cleanup of import. RCS Ids 1995-04-22 08:00:54 +00:00
jtc 2536b9a62f Make man page and usage message agree with the code.
Fix from Hubert Feyrer.
1995-01-31 15:54:01 +00:00
jtc defa0d9f09 Update to use new -mandoc macros. 1993-08-05 01:46:15 +00:00
mycroft b1bd4afedc Add RCS indentifiers. 1993-08-01 07:42:49 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00