Eric S. Raymond [Fri, 9 Mar 2018 01:56:21 +0000 (20:56 -0500)]
SPDXify the code.
Eric S. Raymond [Thu, 8 Mar 2018 15:26:22 +0000 (10:26 -0500)]
History update.
Eric S. Raymond [Thu, 8 Mar 2018 13:38:27 +0000 (08:38 -0500)]
Address GitLab issue #42.
Eric S. Raymond [Thu, 8 Mar 2018 13:35:46 +0000 (08:35 -0500)]
Remove an unnecessary argument.
NHOrus [Thu, 8 Mar 2018 12:20:14 +0000 (15:20 +0300)]
Additional warnings
One of the two is fixed and GCC-exclusive, will cause more
warnings on Clang
NHOrus [Thu, 8 Mar 2018 12:18:32 +0000 (15:18 +0300)]
Fix CI pipeline
Eric S. Raymond [Sun, 17 Sep 2017 15:35:45 +0000 (11:35 -0400)]
Typo fix.
NHOrus [Wed, 13 Sep 2017 16:34:35 +0000 (19:34 +0300)]
Unlike objects, player doesn't go to -1 when destroyed.
Tighten bounds check.
NHOrus [Tue, 12 Sep 2017 05:18:17 +0000 (08:18 +0300)]
Type constants to prevent overflow
NHOrus [Mon, 11 Sep 2017 18:20:46 +0000 (21:20 +0300)]
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.
NHOrus [Sun, 10 Sep 2017 21:32:21 +0000 (00:32 +0300)]
Be consistent
NHOrus [Sun, 10 Sep 2017 21:13:55 +0000 (00:13 +0300)]
Put some of important parameters into fixed width signed integers
Massaged test files. Fixes issue #41
NHOrus [Tue, 5 Sep 2017 15:32:56 +0000 (18:32 +0300)]
Silenced fallthrough warning
NHOrus [Tue, 5 Sep 2017 15:20:21 +0000 (18:20 +0300)]
Prevent RNG overflow.
Pass save under validation by pointer, so we could mess with underlying
values a little. Only thing I feel we can safely and sanely modify.
NHOrus [Tue, 5 Sep 2017 14:46:38 +0000 (17:46 +0300)]
Removed old copy-paste error
Put numdie bounds check in croak to prevent OOB access on negative
numdie while preserving tests
NHOrus [Thu, 24 Aug 2017 11:48:02 +0000 (14:48 +0300)]
Prevent tampering with PRNG parameters in save
NHOrus [Thu, 24 Aug 2017 11:41:21 +0000 (14:41 +0300)]
Fixed copy-paste errors
NHOrus [Thu, 24 Aug 2017 11:24:13 +0000 (14:24 +0300)]
Prevent division by zero
NHOrus [Thu, 24 Aug 2017 10:47:57 +0000 (13:47 +0300)]
Verify bounds for linked lists
NHOrus [Thu, 24 Aug 2017 10:40:10 +0000 (13:40 +0300)]
Corrected limit for atloc, see init.c for filling double-linked list
NHOrus [Thu, 24 Aug 2017 10:02:51 +0000 (13:02 +0300)]
Fix value, add check for linked locations
NHOrus [Thu, 24 Aug 2017 08:21:10 +0000 (11:21 +0300)]
Bounds check for properties; it is not violated in normal game
NHOrus [Sun, 13 Aug 2017 14:58:35 +0000 (15:58 +0100)]
Syntax error
NHOrus [Sun, 13 Aug 2017 14:56:37 +0000 (15:56 +0100)]
Validate dwarves and tally
NHOrus [Sun, 13 Aug 2017 14:56:07 +0000 (15:56 +0100)]
Reindentation
NHOrus [Sun, 13 Aug 2017 14:16:09 +0000 (15:16 +0100)]
Verify sanity of location arrays
NHOrus [Sun, 13 Aug 2017 11:41:42 +0000 (12:41 +0100)]
Validating sanity of locations in restored game
NHOrus [Sun, 13 Aug 2017 11:14:09 +0000 (12:14 +0100)]
Remove extraneous listing of files
Eric S. Raymond [Tue, 8 Aug 2017 03:21:10 +0000 (23:21 -0400)]
Ready for 1.4 release.
Eric S. Raymond [Thu, 3 Aug 2017 19:51:39 +0000 (15:51 -0400)]
Remove duplicative phase code.
Jason S. Ninneman [Thu, 3 Aug 2017 19:41:35 +0000 (12:41 -0700)]
Use the '=' operator (not memcpy()) to shallow-copy structs.
Eric S. Raymond [Thu, 3 Aug 2017 19:02:41 +0000 (15:02 -0400)]
Canonicalize OV commands to VO form.
Allows us to get rid of some obscure logic that causes an unnecessary
word shift. One error message changes in a benign way.
Eric S. Raymond [Thu, 3 Aug 2017 18:48:44 +0000 (14:48 -0400)]
Massage "{oil|water} {plant|door} into equivalent pourcommand.
Bedfore this change the command was passed in OV form, which we want
to get rid of.
Eric S. Raymond [Thu, 3 Aug 2017 18:22:38 +0000 (14:22 -0400)]
Simplify overcomplicated code.
Eric S. Raymond [Thu, 3 Aug 2017 16:56:50 +0000 (12:56 -0400)]
More breadcrumb improvements.
Eric S. Raymond [Thu, 3 Aug 2017 16:25:56 +0000 (12:25 -0400)]
Improve debugging.
Jason S. Ninneman [Thu, 3 Aug 2017 15:29:46 +0000 (08:29 -0700)]
Typedefify command_t; simplify code accordingly.
Jason S. Ninneman [Thu, 3 Aug 2017 06:43:52 +0000 (23:43 -0700)]
Simplify command word handling.
Jason S. Ninneman [Thu, 3 Aug 2017 06:08:55 +0000 (23:08 -0700)]
Upgrade get_vocab_metadata() to use command_type_t.
Jason S. Ninneman [Thu, 3 Aug 2017 03:11:40 +0000 (20:11 -0700)]
Encapsulate command words into their own struct.
Jason S. Ninneman [Thu, 3 Aug 2017 02:26:29 +0000 (19:26 -0700)]
Add command_word_t, for command words.
Jason S. Ninneman [Thu, 3 Aug 2017 02:22:52 +0000 (19:22 -0700)]
Datatype definition for command word types.
Eric S. Raymond [Thu, 3 Aug 2017 14:49:22 +0000 (10:49 -0400)]
Cope with YAML idiosyncracy at unquoted "YES".
Eric S. Raymond [Thu, 3 Aug 2017 14:37:37 +0000 (10:37 -0400)]
Add breadcrumbs for grammar debugging.
Jason S. Ninneman [Wed, 2 Aug 2017 21:01:39 +0000 (14:01 -0700)]
Add INSTALL.adoc and templates/*.tpl to make recipes.
Fixes issues #38 and #39.
Eric S. Raymond [Wed, 2 Aug 2017 00:03:17 +0000 (20:03 -0400)]
Ready for 1.3 release.
Eric S. Raymond [Tue, 1 Aug 2017 23:55:34 +0000 (19:55 -0400)]
Exclude %V from coverage since we removed it from the test suite.
Eric S. Raymond [Tue, 1 Aug 2017 23:45:55 +0000 (19:45 -0400)]
Remove 'version test...
...it's too much of a PITA to edit the check file after every release bump.
Eric S. Raymond [Tue, 1 Aug 2017 23:40:28 +0000 (19:40 -0400)]
Add regression test for split commands.
Eric S. Raymond [Tue, 1 Aug 2017 23:26:29 +0000 (19:26 -0400)]
Remove unused phase codes.
Eric S. Raymond [Tue, 1 Aug 2017 22:35:02 +0000 (18:35 -0400)]
Address GitLab issue #36: "Get what?" prompt incorrectly handled
Eric S. Raymond [Mon, 31 Jul 2017 21:40:25 +0000 (17:40 -0400)]
Remove unnecessary clearing of command verb.
Eric S. Raymond [Mon, 31 Jul 2017 19:26:56 +0000 (15:26 -0400)]
Coverage repair.
Eric S. Raymond [Mon, 31 Jul 2017 18:59:58 +0000 (14:59 -0400)]
Fix a coverage gap.
Aaron Traas [Sun, 23 Jul 2017 16:07:10 +0000 (12:07 -0400)]
Moved dungeon.c and dungeon.h templates into external files.
Also refactored to use named vars in the templates, so it's easier to
refactor, as order when you call .format() isn't important.
Aaron Traas [Sat, 22 Jul 2017 18:41:23 +0000 (14:41 -0400)]
Address Gitlab issue #35
Aaron Traas [Fri, 21 Jul 2017 22:22:55 +0000 (18:22 -0400)]
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.
Aaron Traas [Fri, 21 Jul 2017 21:22:03 +0000 (17:22 -0400)]
Back up to 100% coverage.
Aaron Traas [Fri, 21 Jul 2017 21:15:23 +0000 (17:15 -0400)]
Specials excised from adventure.yaml
Aaron Traas [Fri, 21 Jul 2017 20:56:43 +0000 (16:56 -0400)]
All specials are now actions. Builds correct outputs, more needs deleting.
Eric S. Raymond [Fri, 21 Jul 2017 18:03:39 +0000 (14:03 -0400)]
Simplify seed and waste cpmands using %d in the YAML string.
Aaron Traas [Fri, 21 Jul 2017 13:52:19 +0000 (09:52 -0400)]
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
Eric S. Raymond [Fri, 21 Jul 2017 11:44:09 +0000 (07:44 -0400)]
More type hygiene.
Eric S. Raymond [Fri, 21 Jul 2017 11:38:09 +0000 (07:38 -0400)]
Comment cleanup, semantic types, information hiding.
Eric S. Raymond [Fri, 21 Jul 2017 02:53:15 +0000 (22:53 -0400)]
Fix a prototype.
Eric S. Raymond [Fri, 21 Jul 2017 02:04:01 +0000 (22:04 -0400)]
Address GitLab issue #34: static char* get_input() is not a prototype
Eric S. Raymond [Thu, 20 Jul 2017 22:49:08 +0000 (18:49 -0400)]
Abolish as many undifferentiated long variables as possible.
Simple counter become ints.
Eric S. Raymond [Thu, 20 Jul 2017 22:24:57 +0000 (18:24 -0400)]
Full comments for all game structure members.
Eric S. Raymond [Thu, 20 Jul 2017 21:42:31 +0000 (17:42 -0400)]
Comment and structure cleanup.
Eric S. Raymond [Thu, 20 Jul 2017 18:52:14 +0000 (14:52 -0400)]
More comment cleanup.
Eric S. Raymond [Thu, 20 Jul 2017 18:46:50 +0000 (14:46 -0400)]
Comment cleanup.
Aaron Traas [Thu, 20 Jul 2017 20:02:54 +0000 (16:02 -0400)]
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();
NHOrus [Thu, 20 Jul 2017 18:00:23 +0000 (21:00 +0300)]
Test for freshly fixed bugs
Also, removed redundant specials from illformed
Eric S. Raymond [Thu, 20 Jul 2017 17:46:42 +0000 (13:46 -0400)]
Remove unused enum.
Eric S. Raymond [Thu, 20 Jul 2017 17:37:26 +0000 (13:37 -0400)]
Restore full code coverage.
Eric S. Raymond [Thu, 20 Jul 2017 16:58:42 +0000 (12:58 -0400)]
Fix core dump in debug mode due to uninitialized allocated storage.
Eric S. Raymond [Thu, 20 Jul 2017 16:29:52 +0000 (12:29 -0400)]
Fix test breakage.
Eric S. Raymond [Thu, 20 Jul 2017 16:24:02 +0000 (12:24 -0400)]
Address GitLab issue #28: Advent hangs on some inputs
Eric S. Raymond [Thu, 20 Jul 2017 15:27:02 +0000 (11:27 -0400)]
Prevent OB1 error.
Eric S. Raymond [Thu, 20 Jul 2017 15:15:15 +0000 (11:15 -0400)]
Fix invalid variable reuse.
Eric S. Raymond [Thu, 20 Jul 2017 14:53:15 +0000 (10:53 -0400)]
Remove unused variables.
Eric S. Raymond [Thu, 20 Jul 2017 14:47:33 +0000 (10:47 -0400)]
Fix Gitlab issue #30: Say is broken.
Eric S. Raymond [Thu, 20 Jul 2017 14:38:59 +0000 (10:38 -0400)]
Some vocabulary lookup code can be hidden from main.c.
Eric S. Raymond [Thu, 20 Jul 2017 14:36:22 +0000 (10:36 -0400)]
Last remnants of packing removed.
As a bonus, a bug in %S pluralization became obvious and was fixed.
Eric S. Raymond [Thu, 20 Jul 2017 14:15:39 +0000 (10:15 -0400)]
No more packing in the parser.
As a side effect, ill-formed input consisting of "_\n" gives
a slighty better error message.
Eric S. Raymond [Thu, 20 Jul 2017 14:13:15 +0000 (10:13 -0400)]
Remove unneeded vocabulary lookup.
Eric S. Raymond [Thu, 20 Jul 2017 13:50:58 +0000 (09:50 -0400)]
Eliminate last logic guard on a packed value.
Eric S. Raymond [Thu, 20 Jul 2017 13:11:13 +0000 (09:11 -0400)]
Remove a packing call - word buffer is good enough.
Eric S. Raymond [Thu, 20 Jul 2017 13:08:10 +0000 (09:08 -0400)]
Remove special-case code that was inducing bugs.
Eric S. Raymond [Thu, 20 Jul 2017 11:40:19 +0000 (07:40 -0400)]
Improved word type checking.
Eric S. Raymond [Thu, 20 Jul 2017 11:09:20 +0000 (07:09 -0400)]
Eliminate some uses of wd2 - tests can be done on raw2 buffer instead.
Eric S. Raymond [Thu, 20 Jul 2017 11:02:35 +0000 (07:02 -0400)]
Add some word-type checking where it's needed.
Eric S. Raymond [Thu, 20 Jul 2017 09:54:55 +0000 (05:54 -0400)]
Make compparuson out to TOKLEN only explicit in vocab lookups.
Eric S. Raymond [Wed, 19 Jul 2017 19:38:31 +0000 (15:38 -0400)]
Get symbol coverage on LOC_SMALLPIT
Eric S. Raymond [Wed, 19 Jul 2017 18:00:12 +0000 (14:00 -0400)]
Remove a test pair that seems to be duplicative.
Jason S. Ninneman [Wed, 19 Jul 2017 16:47:20 +0000 (09:47 -0700)]
Tell the compiler not to warn about legitimate case fallthroughs.
Eric S. Raymond [Mon, 17 Jul 2017 20:30:41 +0000 (16:30 -0400)]
Typo fix.
Eric S. Raymond [Mon, 17 Jul 2017 20:22:09 +0000 (16:22 -0400)]
Cover short descriotion of LOC_SMALLPIT.
Eric S. Raymond [Mon, 17 Jul 2017 18:28:40 +0000 (14:28 -0400)]
Record 100% code coverage.
NHOrus [Mon, 17 Jul 2017 17:12:16 +0000 (20:12 +0300)]
Step with debug compiling with Clang, to contrast with GCC