Commit Briefs

aa9093ad3e Benjamin Linskey

Document repository history (main)


aae4f221b6 Benjamin Linskey

Add a fork version number to "v" command output (tags/btl-1.0)

Dubbing the initial fork release "btl-1.0".


693d76084f Benjamin Linskey

Update LICENSE


aa2a7fa4f7 Benjamin Linskey

Update readme


0d50ee063e Benjamin Linskey

Remove stdbool.h include

This is unneeded and deprecated in C23.


4c3fe7be9a Benjamin Linskey

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.)


d9589180d4 Benjamin Linskey

Replace strcpy() and strcat() with safer functions

Switched to strlcpy() and strlcat(). Fixes a compiler warning on OpenBSD.


885453e68b Benjamin Linskey

Define __printflike if needed

Added a macro copied from tmux.h in OpenBSD's tmux source code.


19ebcb21e1 Benjamin Linskey

Define lint macro

This excludes version-control-related macros that cause compilation errors on OpenBSD.


b9e99b8f55 Benjamin Linskey

Fix non-portable invocation of basename

POSIX basename (and OpenBSD's implementation) only accepts a single pathname argument, not a list.


Branches

Tags

btl-1.0

last-netbsd-trunk-commit

Tree

.editorconfigcommits | blame
.gitignorecommits | blame
CHANGEScommits | blame
LICENSEcommits | blame
Makefilecommits | blame
README.mdcommits | blame
USD.doc/
hit.ccommits | blame
init.ccommits | blame
inventory.ccommits | blame
level.ccommits | blame
machdep.ccommits | blame
main.ccommits | blame
message.ccommits | blame
monster.ccommits | blame
move.ccommits | blame
object.ccommits | blame
pack.ccommits | blame
pathnames.ccommits | blame
pathnames.hcommits | blame
play.ccommits | blame
random.ccommits | blame
ring.ccommits | blame
rogue.6commits | blame
rogue.hcommits | blame
room.ccommits | blame
save.ccommits | blame
score.ccommits | blame
spec_hit.ccommits | blame
throw.ccommits | blame
trap.ccommits | blame
use.ccommits | blame
zap.ccommits | blame

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