NetBSD/games
rillig 1646b19068 cgram: rewrite completely, fixing bugs and style
Fixed bugs:

Do not consider the puzzle solved if all letters in the visible area are
substituted correctly.  To be properly solved, the whole puzzle must be
solved, even those parts that are currently off-screen.

Never place the cursor at the very right edge of the screen since that
does not work well with some terminals.  The maximum valid x coordinate
is COLS - 1.

Add horizontal scrolling.  Make all coordinate handling symmetric in
regard to the horizontal and vertical axes.  Previously, lines longer
than 80 characters could not be seen on the screen.

Improvements:

Remove the arbitrary limit of 128 characters per line.  Even if
fortune(6) may never generate such long lines, the code is easy enough
to adapt to other sources.

Properly clean up the allocated memory.  Previously, only the string
arrays were freed but not the strings themselves.

Stylistic:

Add RCS ID.

Fix ctype functions in lint's strict bool mode.

Avoid excessive calls to strlen whenever the cursor moves.  Given that
the whole screen is redrawn every time a key is pressed, this is an
unnecessary optimization, but the code smelled nevertheless.
2021-02-21 20:33:42 +00:00
..
adventure
arithmetic
atc Report the users score _after_ the game has ended and the screen has 2019-03-19 00:11:34 +00:00
backgammon speed limit 80 2020-12-06 11:41:47 +00:00
banner
battlestar speed limit 80 2020-12-06 11:35:27 +00:00
bcd End sentence with a dot. 2019-09-02 08:26:00 +00:00
boggle Create a new bsd.hostinit.mk file and put the build definitions for all host 2018-05-01 19:59:42 +00:00
caesar
canfield
cgram cgram: rewrite completely, fixing bugs and style 2021-02-21 20:33:42 +00:00
ching
colorbars
countmail
cribbage - enlarge buffer to avoid snprintf() truncation 2019-02-03 10:48:46 +00:00
dab
dm
factor - remove duplicate comment 2020-10-12 13:54:51 +00:00
fish [fish] don't allow users to request cards they have made books for 2018-03-05 04:59:54 +00:00
fortune Restore the catman joke. 2020-11-09 03:23:14 +00:00
gomoku
hack games/hack: Suppress -Werror=stringop-truncation error. 2020-02-08 00:59:55 +00:00
hals_end
hangman Avoid messing up the display when too many letters are guessed at once. 2020-07-12 02:34:54 +00:00
hunt adjust a fallthru comment and add a missing break. 2019-10-13 07:42:57 +00:00
larn - add or adjust /* FALLTHROUGH */ where appropriate 2019-02-03 03:19:25 +00:00
mille s/saftey/safety/ 2019-12-27 09:17:59 +00:00
monop
morse Add _, from Eitan Adler in PR bin/52897 2018-01-16 06:20:24 +00:00
number
phantasia - add or adjust /* FALLTHROUGH */ where appropriate 2019-02-03 03:19:25 +00:00
pig
pom
ppt
primes PR/52976: Eitan Adler: handle larger primes 2018-02-03 15:40:29 +00:00
quiz s/opration/operation/ 2019-12-27 07:41:22 +00:00
rain rain(6): Make the default delay useful for modern terminals 2020-10-14 18:32:04 +00:00
random random(6): Use arc4random_uniform to simplify code 2020-07-26 15:24:00 +00:00
robots robots: Use arc4random_uniform for better uniform distribution 2020-07-26 15:38:22 +00:00
rogue introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
sail - enlarge buffer to avoid snprintf() truncation 2019-02-03 10:48:46 +00:00
snake Remove extra semicolon. 2020-05-14 08:34:17 +00:00
testpat - Don't allocate memory dynamically on the stack (for SSP) 2021-01-08 15:16:04 +00:00
tetris avoid uninit memory and use memmove vs strncpy for a will be 2020-09-07 00:31:11 +00:00
trek use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
wargames Permit Prof. Steven Falcon [sic] to play hals_end(6) (or, more 2017-05-21 16:47:26 +00:00
warp roundsleep(): Too many zeros; tv_nsec should be compared with 2020-11-21 09:24:02 +00:00
worm
worms worms(6): Use a reasonable default delay for non-1980s terminals. 2020-10-14 07:32:53 +00:00
wtf Try freebsd's pkg-info as well 2018-08-16 13:31:04 +00:00
wump
Makefile Add testpat(6) to games. 2021-01-02 03:21:39 +00:00
Makefile.inc