aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add a work-in-progress notice to readmeHEADmainBenjamin Linskey3 days1-0/+2
| | | | Add a note to reflect the fact that this isn't fully portable yet.
* Fix crash when viewing score fileBenjamin Linskey3 days1-17/+20
| | | | | | | Fixes a crash when running "rogue -s". This bug was introduced in 794d1c58ce6e7f1093a6fecb847aa913fad080bc, where I accidentally removed the conditional that ensured new scores were only added to the list if the global variable score_only was false.
* Replace strcpy() and strcat() with safer functionsBenjamin Linskey4 days2-3/+4
| | | | | Switched to strlcpy() and strlcat(). Fixes a compiler warning on OpenBSD.
* Define __printflike if neededBenjamin Linskey4 days1-0/+5
| | | | Added a macro copied from tmux.h in OpenBSD's tmux source code.
* Define lint macroBenjamin Linskey4 days1-1/+1
| | | | | This excludes version-control-related macros that cause compilation errors on OpenBSD.
* Fix non-portable invocation of basenameBenjamin Linskey4 days1-1/+1
| | | | | POSIX basename (and OpenBSD's implementation) only accepts a single pathname argument, not a list.
* Add readme and licenseBenjamin Linskey6 days3-0/+120
|
* Update makefile for USD documentBenjamin Linskey6 days2-6/+13
| | | | | This just builds a local copy of the document that can be viewed with "less -R".
* Update man pageBenjamin Linskey6 days1-3/+11
|
* Install man page with makefile install targetBenjamin Linskey6 days1-0/+3
|
* Properly extract char values from chtypesBenjamin Linskey6 days11-18/+29
| | | | This fixes warnings about implicit conversions from chtype to char.
* Remove an unused variableBenjamin Linskey6 days1-7/+0
|
* Improve makefile and compilation flagsBenjamin Linskey6 days1-22/+20
| | | | | | 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 modeBenjamin Linskey6 days1-4/+4
| | | | | Removed username column and changed header to reflect the fact that all scores come from a single user.
* Fix added space when reading score entryBenjamin Linskey6 days1-1/+13
| | | | | | | | | | | 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. This bug appears to be present in the upstream project; reproducing it there would require populating the score file with scores from at least two users.
* Allow multiple scores to be saved for one userBenjamin Linskey6 days1-48/+22
| | | | | The original multi-user design only permitted each user to occupy a single spot in the high-score table.
* Remove unneeded makefile macrosBenjamin Linskey6 days1-2/+0
|
* Store score file in home directoryBenjamin Linskey6 days6-47/+163
| | | | | | | | | | | 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.
* Add makefile install and uninstall targetsBenjamin Linskey7 days1-0/+11
|
* Add makefile "tags" targetBenjamin Linskey2026-05-302-1/+5
|
* Add "clean" target to makefileBenjamin Linskey2026-05-301-0/+4
|
* Fix crash during initializationBenjamin Linskey2026-05-301-1/+5
| | | | | | | | | 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 .editorconfigBenjamin Linskey2026-05-301-0/+7
| | | | | | 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.
* Tweak makefile for macOSBenjamin Linskey2026-05-301-3/+6
|
* Add .gitignoreBenjamin Linskey2026-05-301-0/+2
|
* Import code from NetBSDBenjamin Linskey2026-05-3030-0/+13768
Imported games/rogue from NetBSD src Git mirror trunk branch. HISTORY is the git log output for this directory; everything else is an unmodified copy of the NetBSD source.