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
569a39aa7c
Drop an attempt to pacify cppcheck that's no longer needed.
2023-03-11 10:58:38 -05:00
Eric S. Raymond
b7bf85904d
Fix a formal-type glitch.
2023-03-11 09:44:51 -05:00
Eric S. Raymond
71f05c4567
Bugfix: bird starts caged in endgame.
...
Turns out the code of put() had been modified ibcorrectly, but
the bug was masked in all but a few cases, noe of which would be
encountered in normal gameplay.
A test to ensure this bug does noit recur has been added.
2023-03-11 09:35:26 -05:00
Eric S. Raymond
8d409c6b3b
Add a comment to the code that fixes the inventory-count bug.
2023-03-07 08:12:36 -05:00
Eric S. Raymond
17782cab67
Another comment typo fix.
2023-03-01 13:52:54 -05:00
Eric S. Raymond
94e7cc6505
Address Gitlab isse #62 : Comment typos.
2023-03-01 13:04:53 -05:00
Eric S. Raymond
b8c7a6d5ea
cppcheck cleanup.
2023-02-28 18:55:12 -05:00
Eric S. Raymond
00c2182d9b
Code cleanup.
2022-04-19 16:36:20 -04:00
Eric S. Raymond
9af3ab4ecd
Improve comments.
2022-04-19 16:36:20 -04:00
Eric S. Raymond
732b581031
Remove an issue about dropping the vase, the drop code doesn't change state.
2022-04-18 13:57:29 -04:00
Eric S. Raymond
3afaabead3
NEWS update.
...
After re-reading the code, I have concluded that the objective of making it
more typeful can be abandoned. The tyings typefulness could give us are
largely achieved.
2022-04-18 12:01:35 -04:00
Eric S. Raymond
4069bf210b
cppcheck cleanup.
2022-04-13 20:55:57 -04:00
Eric S. Raymond
bb2b8e0fca
Support execution of command script arguments.
2022-04-05 14:33:29 -04: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
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
a4c87aa0b3
Fix for GitLab issue #37 : prompt incorrectly handled.
2018-11-14 13:01:39 -05:00
Eric S. Raymond
6de0149f9e
Fix for GitLab issue #40 : Inconsistant inventory space
2018-03-10 17:58:46 -05:00
Eric S. Raymond
782c5c3f29
SPDXify the code.
2018-03-08 20:56:21 -05:00
NHOrus
076bb8908b
If divident negative, then remainder is negative too.
...
RNG values need to be always positive.
Solution: Transposing positively by divisor. In all the two places it may happen.
2017-09-11 21:27:57 +03:00
NHOrus
9e2cb3c191
Put some of important parameters into fixed width signed integers
...
Massaged test files. Fixes issue #41
2017-09-11 00:58:13 +03:00
NHOrus
0fbd79b608
Reindentation
2017-08-13 15:56:07 +01:00
Jason S. Ninneman
24d102781c
Typedefify command_t; simplify code accordingly.
2017-08-03 08:29:46 -07:00
Jason S. Ninneman
23ae7edb10
Upgrade get_vocab_metadata() to use command_type_t.
2017-08-03 08:24:18 -07:00
Jason S. Ninneman
5c91ea3739
Encapsulate command words into their own struct.
2017-08-03 08:24:18 -07:00
Jason S. Ninneman
0d3393ebee
Datatype definition for command word types.
2017-08-03 08:16:19 -07:00
Eric S. Raymond
06c8c97738
Exclude %V from coverage since we removed it from the test suite.
2017-08-01 19:55:34 -04:00
Aaron Traas
8765f49fdc
Address Gitlab issue #35
2017-07-22 14:41:23 -04:00
Aaron Traas
30f13c6c25
Back up to 100% coverage.
2017-07-21 17:22:03 -04:00
Aaron Traas
e8a627f964
Specials excised from adventure.yaml
2017-07-21 17:15:23 -04:00
Aaron Traas
5337e00725
Fix to Gitlab issue #32 . Now SEED and WASTE are in adventure.yaml
...
NOTE: the tests are all updated because now, like every other action,
SEED and WASTE have a \n before their output, as they correctly use
SPEAK
2017-07-21 10:23:02 -04:00
Eric S. Raymond
a3c159660b
Comment cleanup, semantic types, information hiding.
2017-07-21 07:38:09 -04:00
Eric S. Raymond
b27f767cc6
Fix a prototype.
2017-07-20 22:53:15 -04:00
Eric S. Raymond
6718c57d49
Address GitLab issue #34 : static char* get_input() is not a prototype
2017-07-20 22:04:01 -04:00
Eric S. Raymond
609159ad6d
Abolish as many undifferentiated long variables as possible.
...
Simple counter become ints.
2017-07-20 18:49:08 -04:00
Aaron Traas
a167945e19
Information hiding - moved all of command input parsing to misc.c
...
get_command_input() is effectively an I/O function that takes raw input
and makes it into a command_t. With other I/O functions, it belongs in
misc.c.
This alos allowed me to make 4 other functions static, as they were only
called by get_command_input();
2017-07-20 16:02:54 -04:00
Eric S. Raymond
243d05b4f8
Fix core dump in debug mode due to uninitialized allocated storage.
2017-07-20 12:58:42 -04:00
Eric S. Raymond
b7af7b9e87
Prevent OB1 error.
2017-07-20 11:27:02 -04:00
Eric S. Raymond
aa5870a92e
Some vocabulary lookup code can be hidden from main.c.
2017-07-20 10:38:59 -04:00
Eric S. Raymond
8bd947b54d
Last remnants of packing removed.
...
As a bonus, a bug in %S pluralization became obvious and was fixed.
2017-07-20 10:36:22 -04:00
Eric S. Raymond
2fa530340d
No more packing in the parser.
...
As a side effect, ill-formed input consisting of "_\n" gives
a slighty better error message.
2017-07-20 10:17:56 -04:00
Eric S. Raymond
d998965faf
Make compparuson out to TOKLEN only explicit in vocab lookups.
2017-07-20 05:54:55 -04:00
Eric S. Raymond
2fca59d9fd
Information hiding.
2017-07-16 15:23:03 -04:00
Eric S. Raymond
d1e29319fa
Code cleanup.
2017-07-14 13:10:13 -04:00