Aaron Traas
ca5374edc3
Modified action() to take take a copy of command rather than a pointer.
...
It should be safer now that we're not scribbling all over command in
action(), as it's closer to pure. Also fixed a bug in say.
2017-07-21 18:27:02 -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
5f28f95244
All specials are now actions. Builds correct outputs, more needs deleting.
2017-07-21 16:56:43 -04:00
Eric S. Raymond
80b2b9b356
Simplify seed and waste cpmands using %d in the YAML string.
2017-07-21 14:03:39 -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
ef236aea3b
More type hygiene.
2017-07-21 07:44:09 -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
Eric S. Raymond
7c3f834bca
Full comments for all game structure members.
2017-07-20 18:24:57 -04:00
Eric S. Raymond
617f368673
Comment and structure cleanup.
2017-07-20 17:42:31 -04:00
Eric S. Raymond
51182c6bc9
More comment cleanup.
2017-07-20 17:25:03 -04:00
Eric S. Raymond
535d9e7964
Comment cleanup.
2017-07-20 17:25:03 -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
NHOrus
10d681ebeb
Test for freshly fixed bugs
...
Also, removed redundant specials from illformed
2017-07-20 21:00:23 +03:00
Eric S. Raymond
6fda3acbe6
Remove unused enum.
2017-07-20 13:46:42 -04:00
Eric S. Raymond
2c2640a4d8
Restore full code coverage.
2017-07-20 13:37:26 -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
2aa35a6d84
Fix test breakage.
2017-07-20 12:29:52 -04:00
Eric S. Raymond
342994376a
Address GitLab issue #28 : Advent hangs on some inputs
2017-07-20 12:24:02 -04:00
Eric S. Raymond
b7af7b9e87
Prevent OB1 error.
2017-07-20 11:27:02 -04:00
Eric S. Raymond
4da9742cd2
Fix invalid variable reuse.
2017-07-20 11:15:15 -04:00
Eric S. Raymond
5701a777c6
Remove unused variables.
2017-07-20 10:53:15 -04:00
Eric S. Raymond
08f260c4d5
Fix Gitlab issue #30 : Say is broken.
2017-07-20 10:47:33 -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
78ba0fac6a
Remove unneeded vocabulary lookup.
2017-07-20 10:13:15 -04:00
Eric S. Raymond
08c40bc999
Eliminate last logic guard on a packed value.
2017-07-20 09:50:58 -04:00
Eric S. Raymond
29b8f5b142
Remove a packing call - word buffer is good enough.
2017-07-20 09:11:13 -04:00
Eric S. Raymond
4e01669e06
Remove special-case code that was inducing bugs.
2017-07-20 09:08:10 -04:00
Eric S. Raymond
3f90f5bf38
Improved word type checking.
2017-07-20 07:40:19 -04:00
Eric S. Raymond
52723acb72
Eliminate some uses of wd2 - tests can be done on raw2 buffer instead.
2017-07-20 07:09:20 -04:00
Eric S. Raymond
360adc8bfb
Add some word-type checking where it's needed.
2017-07-20 07:02:35 -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
278e9c8240
Get symbol coverage on LOC_SMALLPIT
2017-07-19 15:38:31 -04:00
Eric S. Raymond
19854c9614
Remove a test pair that seems to be duplicative.
2017-07-19 14:00:12 -04:00
Jason S. Ninneman
8ac4a59a67
Tell the compiler not to warn about legitimate case fallthroughs.
2017-07-19 09:47:20 -07:00
Eric S. Raymond
cbf03c43a8
Typo fix.
2017-07-17 16:30:41 -04:00
Eric S. Raymond
97bb25d9c5
Cover short descriotion of LOC_SMALLPIT.
2017-07-17 16:22:09 -04:00
Eric S. Raymond
bbdaa07172
Record 100% code coverage.
2017-07-17 14:28:40 -04:00
NHOrus
faedb38a64
Step with debug compiling with Clang, to contrast with GCC
2017-07-17 13:56:52 -04:00
NHOrus
30822d0ba4
No magic, revert some experimental changes in pipeline
2017-07-17 13:56:52 -04:00
NHOrus
a680514d5f
Use OpenSUSE in CI pipeline, instead
2017-07-17 13:56:52 -04:00
Jason S. Ninneman
ee7bacc9ec
Use Fedora for the CI pipeline.
2017-07-17 13:56:52 -04:00
Jason S. Ninneman
f34df0b8a2
Use ASan and UBSan in debug builds.
2017-07-17 13:56:52 -04:00
Jason S. Ninneman
b736e3bc8e
Deploy maximum "fortified source" and stack protection.
2017-07-17 13:56:52 -04:00
Jason S. Ninneman
007db7a729
Ensure cheat is built with debug options when 'make debug' is given.
2017-07-17 13:56:52 -04:00