summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cgram: allow providing an input file instead of the random fortunewiz2021-04-282-19/+44
|
* Simplify syncing with upstreamCameron Katri2021-04-132-1/+16
|
* Fix warp compilationCameron Katri2021-04-131-4/+0
|
* avoid duplicating symbols in libterminfo.mrg2021-04-131-0/+4
|
* no longer need -Wno-error=implicit-fallthrough. don't provide common symbols ↵mrg2021-04-131-2/+6
| | | | that are in libterminfo now days.
* properly terminate after using strncpy().mrg2021-04-131-4/+5
|
* avoid leaving off the trailing nul in a literal string.mrg2021-04-131-3/+3
|
* cgram: don't beep if the window is resizedrillig2021-04-131-2/+4
|
* cgram: place the 'solved' marker nearer to the textrillig2021-04-131-4/+8
| | | | | | This way, it cannot be overlooked as easily as before. It also doesn't change the position of the keyboard help text anymore. Only if there is not enough space, the 'solved' marker is put into the bottom line.
* cgram: make the 'solved' stand out morerillig2021-04-131-4/+8
| | | | | | Suggested by Weitian LI via [1]. [1] https://github.com/NetBSD/src/commit/efec6410b2b5a736
* cgram: fix assertion when substituting at the end of the longest linerillig2021-04-131-39/+30
| | | | | | | | | | | | | | | | | | | Reported by Weitian LI via GitHub. Contrary to the patch suggested in [1], still allow the cursor to be placed to the very right of the text in a line since that is the usual behavior of text editors. Split the function substitute() into two parts: one that handles the curses-specific part of checking whether a substitution is possible at the current cursor position, and one that performs the actual substitution. Only the latter is kept in the code section for the string manipulation functions, the other is moved to the section for curses code. Having all the curses code in one place reduces the places that call beep(). Previously, as well as now, there is a single beep per invalid key before, but that was not obvious from the previous code. [1]: https://github.com/DragonFlyBSD/DragonFlyBSD/commit/18d09f18cf4c
* cgram: add advanced cursor movement with tab, shift+tab, returnrillig2021-04-131-49/+117
|
* cgram: properly handle input errorsrillig2021-04-131-3/+4
| | | | | | | | | On both NetBSD and Cygwin, a missing /usr/bin/fortune would previously continue since popen does not return an error (as /bin/sh is found and can be executed), so the next chance to catch an error is pclose. At that point, the shell has already printed an informative error message about what happened (or what didn't happen), so that cgram does not need to print an error by itself.
* cgram: allow navigation with KEY_PPAGE and KEY_NPAGErillig2021-04-131-8/+12
|
* cgram: rewrite completely, fixing bugs and stylerillig2021-04-131-179/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* cgram: WARNS=6, use int for all coordinatesrillig2021-04-131-47/+44
| | | | | | | Eliminate some frequently occurring subexpressions during substitution. No functional change, assuming that fortune(6) always spits out less than 2 gigacharacters of text.
* cgram: consistently use char for charactersrillig2021-04-131-12/+41
| | | | | | | | Having to convert back and forth between char, unsigned char and int is confusing. Just stay with char, until the support for wide characters is added. No functional change.
* 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.
* Fix circle depCameron Katri2021-04-091-1/+1
|
* Fix darwin-amd64Cameron Katri2021-04-061-0/+1
|
* Use PREFIX nowCameron Katri2021-03-2887-222/+281
|
* Get all the games compiling for iOSCameron Katri2021-02-22152-107873/+237505
|
* - Don't allocate memory dynamically on the stack (for SSP)christos2021-01-081-44/+57
| | | | - Don't return errno as exit code - Fold long lines
* set the cursor to invisiblejmcneill2021-01-021-1/+2
|
* trailing whitespacejmcneill2021-01-021-17/+17
|
* Markup/typo fixes.wiz2021-01-021-4/+3
|
* Add testpat(6) to games.nat2021-01-024-2/+519
| | | Testpat displays a test pattern in curses(3).
* speed limit 80dholland2020-12-061-3/+8
|
* speed limit 80dholland2020-12-061-9/+24
|
* roundsleep(): Too many zeros; tv_nsec should be compared withrin2020-11-211-1/+1
| | | 500 msec, not 5000. Raised by clang for ILP32 archs.
* Avoid common symbols. Use __dead.joerg2020-11-125-7/+9
|
* Comment out debugging build (it still randomly crashes though) pointed outchristos2020-11-111-2/+2
| | | by wiz
* use strchr, strrchr, random, more lint removal, savefile in /var/games/warpchristos2020-11-1111-93/+36
| | | not /usr/share/games/warp...
* no need for -lcompatchristos2020-11-111-16/+4
|
* - use termioschristos2020-11-117-41/+45
| | | | - enable setgid games - enable savedir
* Fix the old leftover license notekamil2020-11-111-11/+27
| | | Larry Wall: "I outgrew commercial-free licensing about 30 years ago."
* remove error(1) commentschristos2020-11-101-2/+0
|
* Antivaxer support.christos2020-11-101-6/+0
|
* can't have config.h and config.H in case-preserving but case-folding ↵christos2020-11-101-92/+0
| | | | file-systems.
* don't segv if the terminal is too big.christos2020-11-101-0/+2
|
* pray-tell where are you trying to write?christos2020-11-101-1/+1
|
* Time warp forward 34 years so that it compiles (but not work)christos2020-11-1034-973/+708
|
* Remove the smap.* fileskamil2020-11-108-3186/+0
| | | They are generated during the build.
* Integrate Warp Kit into the NetBSD buildkamil2020-11-1016-80/+135
| | | Fix the build and make it install and run with minimal required changes.
* Reset CVS keywordskamil2020-11-1033-643/+66
|
* Add Warp Kit, Version 7.0 by Larry Wallkamil2020-11-0961-0/+12785
| | | | | | | | | | | | | | | | Warp is a real-time space war game that doesn't get boring very quickly. Read warp.doc and the manual page for more information. games/warp originally distributed with 4.3BSD-Reno, is back to the BSD world via NetBSD. Its remnants were still mentioned in games/Makefile. Larry Wall, the original author and the copyright holder, generously donated the game and copyright to The NetBSD Foundation, Inc. Import the game sources as-is from 4.3BSD-Reno, with the cession of the copyright and license to BSD-2-clause NetBSD-style. Signed-off-by: Larry Wall <larry@wall.org> Signed-off-by: Kamil Rytarowski <kamil@netbsd.org>