Commit graph

465 commits

Author SHA1 Message Date
Eric S. Raymond
cb293f4aa4 Rename some macos for clarity. 2024-06-30 14:48:44 -04:00
Eric S. Raymond
bd499dc532 Fix GitLab issue #69: repeated knive caveat message 2024-06-25 16:42:14 -04:00
Eric S. Raymond
0175344caa 1TBS reflow, the bracening. 2024-01-29 12:14:56 -05:00
Eric S. Raymond
be429016af 1TBS reflow with clang-format. 2024-01-28 08:09:39 -05:00
Eric S. Raymond
c11938aed5 Place1TBS mandatory braces. 2024-01-28 07:14:46 -05:00
Eric S. Raymond
258b7703f2 Simplify SPDX copyright lines to the shortest canonical form...
...because if we leave them longer than 80 chars, reflow is going to
mess them up.
2024-01-28 07:14:46 -05:00
Eric S. Raymond
2db3bed3f1 Fix up copyright notices. SPDX wants only one per file. 2024-01-03 06:30:40 -05:00
Eric S. Raymond
75bc031b46 Reduce include complexity. 2024-01-03 05:55:57 -05:00
Torbjörn Andersson
b28eb66868 Spelling fixes. 2023-04-18 18:44:08 +02:00
Eric S. Raymond
869c53d1b1 Comment polishing. 2023-04-15 10:00:23 -04:00
Eric S. Raymond
5d3205e1e9 Add explanatory comments. 2023-04-15 06:29:59 -04:00
Eric S. Raymond
88feaab0c0 Remove a remnant line number. 2023-04-10 19:29:11 -04:00
Eric S. Raymond
1af01ff91f Confine use of STATE_NOTFOUND to macros. 2023-04-08 23:04:34 -04:00
Eric S. Raymond
191d3cb043 More nontrivial macro abstraction of state checks.
game.prop < 0 becomes an alternation of macros.
2023-04-08 20:32:04 -04:00
Eric S. Raymond
02987d0330 Encapsulate object-state state tests and setttings in macros.
This isn't a complete refwctoring, just the part than can be done with
transparetly correct capture of inlinre logic into macros.

No logic changes. Tests pass, 100% coverage.
2023-04-08 19:35:41 -04:00
Eric S. Raymond
9cd7c53d78 Refactor put() function and calls. 2023-04-07 13:19:51 -04:00
Eric S. Raymond
ab2779cd93 Remove unneeded use of put(). 2023-04-07 13:09:57 -04:00
Eric S. Raymond
8d4d64fafb Structurization of hints. 2023-04-07 10:52:16 -04:00
Eric S. Raymond
eebc87f889 Structurize object info. 2023-04-07 10:35:13 -04:00
Eric S. Raymond
8fe07c8bf3 Structurize locatiuon info. 2023-04-07 09:30:33 -04:00
Eric S. Raymond
ff9c73a37d Structurize the informaruin about dwarves. 2023-04-07 09:15:20 -04:00
Eric S. Raymond
195e6e149b Apply loc_t type. 2023-04-07 08:18:50 -04:00
Eric S. Raymond
829c13d1d5 Fix some screwy formatting of conditionals...
...probably by the original FOTRAN-to-C translator.
2023-04-06 21:29:39 -04:00
Eric S. Raymond
4b08b726f9 Simplify the signature of savefile(). 2023-04-06 19:26:04 -04:00
Eric S. Raymond
f5ff25f52a Magic-number elimination. 2023-04-06 10:03:24 -04:00
Eric S. Raymond
fe378b9e13 Improved behavior when magic words are said before they're seen.
Note: there is a tiny risk that this could break savefile
compatibility, as I swiped an unused int member in the game structure
and turned it into a bool. int and bool *should* be the same sixe...
2023-04-05 19:49:38 -04:00
Eric S. Raymond
4ce4de190e Magic number removal. 2023-04-05 18:02:47 -04:00
Eric S. Raymond
25230068fe Partial REUSE cmpliance. 2023-04-03 11:25:11 -04:00
Eric S. Raymond
77ac2f1570 Coverage exclusions for -d. 2023-03-29 18:16:43 -04:00
Eric S. Raymond
ff46cf7fac Add -d option 2023-03-29 16:04:36 -04:00
Eric S. Raymond
5f7ce87040 Change prompt generation to be more compatible with the advent430 branch. 2023-03-22 17:09:14 -04:00
Eric S. Raymond
1e05134b47 Minor fix to prompt generation. 2023-03-22 17:03:50 -04:00
Eric S. Raymond
1652df4540 Add ANSI prototype, 2023-03-11 10:40:01 -05:00
Eric S. Raymond
b125fe7b2a Fix interrupted-magic-words cosmetic bug.
C patch by Torbjörn Andersson.
2023-03-10 16:43:27 -05:00
Eric S. Raymond
f911e42453 Eliminate some forwards. 2023-03-06 23:41:07 -05:00
Rob Swindell (on Debian Linux)
dfff80faa8 Add optional auto-save/restore feature using -a <filename> option
To enable use with online Bulletin Board Systems (BBSes) where users
may be disconnected unexpectedly, but would naturally want to resume
playing their same game, added support for an optional save game
path/filename to be specified on the command-line (very similar to
"-r <filename>"), except this save/restore file is:
1. automatically loaded/restored if it exists
2. automatically created when starting a new game
3. automatically updated when exiting a game for any reason
4. cannot be changed to a different path/filename by the user

Since a BBS server program can be expected to send a SIGHUP or SIGTERM
to the game process upon user disconnection (or timeout), those
signals are caught and a graceful termination will occur which saves
the current game state.

Build with ADVENT_AUTOSAVE defined to enable this option.

BUG:
The 'info' command still reports the save/suspend/pause commands as
valid, though they are not when this build option is used (same is
true of ADVENT_NOSAVE, and that doesn't apparently bother anyone).
2023-03-02 19:44:47 -08:00
Eric S. Raymond
94e7cc6505 Address Gitlab isse #62: Comment typos. 2023-03-01 13:04:53 -05:00
Eric S. Raymond
89266b7c1a Documerntation and comment polishing. 2023-02-28 17:05:37 -05:00
Eric S. Raymond
67a887f432 Magic-number elimination. 2022-04-19 17:07:46 -04:00
Eric S. Raymond
9af3ab4ecd Improve comments. 2022-04-19 16:36:20 -04:00
Eric S. Raymond
d320212622 Indent cleanup. 2022-04-18 10:31:13 -04:00
Eric S. Raymond
f7d6884ded cppcheck cleanup. 2022-04-18 10:24:11 -04:00
Eric S. Raymond
4069bf210b cppcheck cleanup. 2022-04-13 20:55:57 -04:00
Eric S. Raymond
ad75cc1eb7 Mapping improvements. 2022-04-13 13:41:57 -04:00
Eric S. Raymond
865e10e6d0 Coverage fixups. 2022-04-12 11:27:07 -04:00
Eric S. Raymond
c5250b5f3f Clean up warning and deprecation issues. 2022-04-12 10:53:37 -04:00
Eric S. Raymond
bb2b8e0fca Support execution of command script arguments. 2022-04-05 14:33:29 -04:00
Eric S. Raymond
ae02eac051 Add a coverage exception. 2019-02-28 13:38:08 -05:00
Eric S. Raymond
81af59974b The FORTRAN-derived longs were semantically ints. Make it so.
Note. because we used fixed-length declrations in the right places, this
shouldn't break saves.

(Besides being right, this will someday make a port to Go a touch easier,
if we decide to do that.)
2019-02-28 05:58:16 -05:00
Aaron Traas
8c6593ad0c Commenting and cleanups 2018-12-10 10:56:35 -05:00