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.
Update makefile for USD document
This just builds a local copy of the document that can be viewed with "less -R".
Properly extract char values from chtypes
This fixes warnings about implicit conversions from chtype to char.
Improve makefile and compilation flags
Reformatted makefile, removed unneeded macros, made makefile adhere to POSIX standard, and added compiler standard, optimization, and warning flags.
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.
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.
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.
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.
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.
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.
