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
Aaron Traas
2a5dac3d8c
Abstracted a chuck of do_command() into seperate function do_move(), moved that call to main loop, so as to narrow the focus of do_command() to getting and processing commands.
2018-12-07 10:35:36 -05:00
Aaron Traas
5f4df123b4
Refactored; added state property to command struct to notate where in the lifecycle of command processing that the command is.
2018-12-05 15:05:55 -05:00
Aaron Traas
9475552be4
Major cleanups. Pre-process loop back in main loop, pre-processing abstracted into a function that makes sense.
2018-12-04 11:03:17 -05:00
Eric S. Raymond
6667ffd1f1
Address GitLab issue #45 : OSX Compile issue
2018-11-30 09:50:25 -05:00
NHOrus
524f035e76
Reindentation, typo fix
2018-11-23 20:41:31 +03:00
Eric S. Raymond
f1d3b75561
Remove comments that are obsolete now that the code is goto-less.
2018-11-20 07:05:23 -05:00
Aaron Traas
a437136543
We are now goto free!
2018-11-19 17:01:31 -05:00
Aaron Traas
16545a5765
Eliminated "Lookup" label
2018-11-19 14:52:13 -05:00
Eric S. Raymond
08f77c692a
Attempting voodoo change to banish GitLab error.
...
This shouldn't be necessary.
2018-11-18 12:39:04 -05:00
Eric S. Raymond
deb489cd8c
Eliminate a label.
2018-11-16 08:30:26 -05:00
Eric S. Raymond
9a32aab879
Explicit preserve logic is no longer needed...
...
...now that we're not heedlessly nuking the command state.
2018-11-16 07:38:49 -05:00
Eric S. Raymond
42a42c49ac
Extend coverage.
2018-11-16 07:20:58 -05:00
Eric S. Raymond
5fb6e2e1bc
Magic-number elimination.
2018-11-16 05:19:31 -05:00
Eric S. Raymond
7991d007ac
Choose a less obscure label name.
2018-11-15 14:03:20 -05:00
Eric S. Raymond
17e6078122
Remove some dead symbols revealed by coverage analysis.
2018-11-15 14:00:37 -05:00
Eric S. Raymond
31d561b470
Coverage improvement. Also, it's rude to die silently.
2018-11-15 13:55:10 -05:00
Eric S. Raymond
3ca9613bcd
More coverage tweaks.
2018-11-15 13:33:16 -05:00
Eric S. Raymond
0590c080ee
Remove unneeded code.
2018-11-14 19:08:55 -05:00
Eric S. Raymond
a4c87aa0b3
Fix for GitLab issue #37 : prompt incorrectly handled.
2018-11-14 13:01:39 -05:00
Eric S. Raymond
d5d6a3e02d
Handle a bare numeric token on the command line a bit more gracefully.
2018-11-11 09:05:03 -05:00
Eric S. Raymond
f01b3267c8
An attempt to fix GitLab issue #37 failed, but...
...
...update the condioned-out code to at least make sense with the
current versions of the data structures.
2018-03-11 23:47:43 -04:00
Eric S. Raymond
782c5c3f29
SPDXify the code.
2018-03-08 20:56:21 -05:00