- Description:
- Single-user version of rogue forked from NetBSD
- Last Change:
- Clone URL:
ssh://anonymous@git.linskey.org/rogue
- ECDSA:
SHA256:NGp9Hbafw+cmfseVXcP9q9zBAU0tLvvzRYQEsJdAJDg
- ED25519:
SHA256:Wr25Bc8kREsGVjh7OY+yNRx6hUDD68qr2eKsvPc0y6w
- RSA:
SHA256:egEdHfpk8FWAExkycQm+RmqcfrTovy/joYsa2GDGDt4
Commit Briefs
Document repository history (main)
Add a fork version number to "v" command output (tags/btl-1.0)
Dubbing the initial fork release "btl-1.0".
Remove stdbool.h include
This is unneeded and deprecated in C23.
Switch to C23 and use [[noreturn]] attribute
The __dead attribute is not standard on FreeBSD (which uses __dead2 instead) or Linux. C23 provides the [[noreturn]] attribute, which accomplishes the same thing in a portable manner. (C11 provides _Noreturn/noreturn, but this is deprecated in C23.)
Replace strcpy() and strcat() with safer functions
Switched to strlcpy() and strlcat(). Fixes a compiler warning on OpenBSD.
Define __printflike if needed
Added a macro copied from tmux.h in OpenBSD's tmux source code.
Define lint macro
This excludes version-control-related macros that cause compilation errors on OpenBSD.
Fix non-portable invocation of basename
POSIX basename (and OpenBSD's implementation) only accepts a single pathname argument, not a list.
Branches
Tree
README.md
# Rogue This is a modified version of the classic Unix game *Rogue*, forked from the version distributed with NetBSD. It's designed for a single user and tracks all of that user's high scores, in contrast to the upstream program, which maintains a systemwide high-score table with one score per user. ## Requirements This program requires: - a C23 compiler; - a POSIX.1-2024-compatible implementation of `make`; - the `strlcpy()` and `strlcat()` functions; - an implementation of the `curses` library. The program is known to compile out of the box on OpenBSD 7.9 and FreeBSD 15.1. On macOS, you'll just need a more recent implementation of `make` than the 20-year-old version of GNU `make` that Apple ships. ## Installation Run `make` to compile the program and `make install` to install it. The program is installed under `/usr/local` by default and thus must be installed as the `root` user, but the installation prefix can be customized by editing the makefile. This repository also includes a copy of "A Guide to the Dungeons of Doom," part of the classic *UNIX User's Supplementary Documents*, in `USD.doc`. This requires `groff` or another `troff`-compatible program, specified in the makefile. Run `make` from the `USD.doc` directory to generate `rogue.txt` and `less -R rogue.txt` to read the document. The program will save its data in `$XDG_DATA_HOME/rogue` if the `XDG_DATA_HOME` environment variable is defined. If it's not defined, the program will flagrantly disregard the XDG Base Directory Specification and store its data in `$HOME/.rogue`. ## History and Source The original *Rogue* was created around the year 1980 by Glenn Wichman, Michael Toy, and Ken Arnold. The version distributed in this repository is derived from a clone created by Timothy Stoehr that is distributed with NetBSD. The source code was copied from the trunk branch of [the official NetBSD src Git mirror][1] in 2026 and used to develop this fork in a new repository. Later, the `games/rogue` directory was extracted from the NetBSD `src` repository mirror using [`git-filter-repo`][2], preserving the commit history. The changes from the original repository were rebased onto this extracted repository, with minor edits to commit history to remove the `HISTORY` file that held a copy of the commit history and a referene to that file in this readme. The branch `initial-version` contains an unmodified copy of the commit history from the initial standalone fork. ## License The original source files contain both a three-clause BSD license and an informal license statement that forbids commercial use. (The USD document describes the program as "public domain," but this is obviously inaccurate.) New code added in this repository is licensed under an ISC-style license. See the `LICENSE` file for details. [1]: https://github.com/NetBSD/src/tree/trunk [2]: https://github.com/newren/git-filter-repo
