summaryrefslogtreecommitdiffstats
path: root/cgram/cgram.c
Commit message (Collapse)AuthorAgeFilesLines
* cgram: fix undefined behavior when pressing function keysrillig2021-04-131-1/+1
| | | | | | The key codes for function keys are outside of the "range representable by an unsigned char". This resulted in parts of the screen being cleaned.
* cgram: adjust style to survive lint's strict bool moderillig2021-04-131-16/+17
| | | | | | | The biggest change is the return type of substitute(). Before, 0 meant success, now false means failure. No functional change.
* cgram: sort includesrillig2021-04-131-5/+6
|
* cgram: indentrillig2021-04-131-262/+286
| | | | | | | | | | | | | | With manual corrections afterwards: - indent removes empty lines between statement and declaration. This had been a syntax error in C90, since C99 this is common style and should be accepted by indent. - indent didn't format the first line of main for whatever reason, did that manually. - indent removed the empty line above the '/////' separators. It should have left these empty lines as-is.
* cgram: fix Home key for cursor navigationrillig2021-04-131-1/+1
| | | | Reported by liweitianux via GitHub.
* cgram(6): use standard cursor keys, use standard shuffle algorithmrillig2020-07-021-9/+13
| | | | | | | The previous shuffle algorithm asked for 100 random numbers, on average. The new algorithm asks exactly for 26 random numbers. Curses predefines numeric constants for keys, and there is no apparent reason not to use these standard keys for cursor movement.
* Add a curses gizmo for solving Sunday-paper-type cryptograms based ondholland2013-08-041-0/+344
substitution ciphers. It gets the cleartext from fortune. I wrote this some years ago for my own amusement; a couple people have suggested that I should import it. Approved only by groo, so I'm going to wait a couple days to hook it to the build in case anyone demands it be removed again...