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.


ed15989c38 Benjamin Linskey

Add readme and license


39b0545a3e Benjamin Linskey

Update makefile for USD document

This just builds a local copy of the document that can be viewed with "less -R".


90ffe3465d Benjamin Linskey

Update man page


63def75d4e Benjamin Linskey

Install man page with makefile install target


e0f6b88f7a Benjamin Linskey

Properly extract char values from chtypes

This fixes warnings about implicit conversions from chtype to char.


96f9bec665 Benjamin Linskey

Remove an unused variable


a24f611703 Benjamin Linskey

Improve makefile and compilation flags

Reformatted makefile, removed unneeded macros, made makefile adhere to POSIX standard, and added compiler standard, optimization, and warning flags.


9456243a76 Benjamin Linskey

Reformat high score table for single-user mode

Removed username column and changed header to reflect the fact that all scores come from a single user.


4b1b7990cd Benjamin Linskey

Fix added space when reading score entry

An error in the score file parsing code caused a space to be prepended to the "death" string, which in turn caused each score record's death string to be indented by one additional space each time the file was written.


e823a2ec47 Benjamin Linskey

Allow multiple scores to be saved for one user

The original multi-user design only permitted each user to occupy a single spot in the high-score table.


ec400e87d2 Benjamin Linskey

Remove unneeded makefile macros


f66aede1cb Benjamin Linskey

Store score file in home directory

BSD games are traditionally designed for multiuser systems and thus write their data to /var/games, using setgid to prevent tampering. Switch to a single-user design, writing the score file to the user's home directory. $XDG_DATA_HOME/rogue will will be used if $XDG_DATA_HOME is defined. Otherwise, data will be written to a $HOME/.rogue directory. This also improves the makefile by making header files a dependency of objects.


cc8f9a99d8 Benjamin Linskey

Add various makefile targets


5e73ba99b5 Benjamin Linskey

Fix crash during initialization

Randomization code that swaps two string values using strlcpy(3) during initialization frequently selected the same string as both the source and the destination. This is supported on NetBSD but results in undefined behavior on other BSD-derived systems. As a result, the program usually crashed during startup during testing on macOS. Fix it by ensuring that the two random values differ.


2ba715c2c7 Benjamin Linskey

Add .editorconfig

A cursory look at rogue.h indicates that some parts of the file were composed with eight-character tabs and some were created with four-character tabs. Use eight in accordance with tradition.