Aaron Traas
236abc8cab
Test coverage - Almost all of score.c
2017-06-21 15:04:41 -04:00
Aaron Traas
3c8530663d
xstrdup() not called anywhere in source. Removed.
2017-06-21 13:50:13 -04:00
Jason S. Ninneman
79ffdb36f0
Switch to 0-indexing for hint handling code.
2017-06-21 10:26:23 -07:00
Jason S. Ninneman
c8f6ff3701
Abolish HNTMAX and HNTSIZ in favor of HINT_COUNT.
...
This change necessitated include guards on newdb.h.
2017-06-21 10:25:12 -07:00
Peje Nilsson
deb61e3dcd
Replace SETPRM/[PR]SPEAK with variadic [pr]speak
...
Rename/rewrite old speak to vspeak and take a va_list
Add new speak that takes variadic parameters
Remove SETPRM & PARMS[]
2017-06-21 13:14:53 -04:00
David James Sherman
82f162dc32
Resolve GitLab issue #3 . Applies MISRA and CERT guidelines.
...
MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case
MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a
literal suffix
CERT DCL16-C. - Use "L," not "l," to indicate a long value
CERT DCL16-CPP. - Use "L," not "l," to indicate a long value
CERT, DCL50-J. - Use visually distinct identifiers
2017-06-21 13:14:53 -04:00
Aaron Traas
67ed99b29c
Test Coverage -- lots of new pieces of actions.c
2017-06-21 12:14:24 -04:00
Eric S. Raymond
22613f06fa
Documentation polishing.
2017-06-21 11:58:58 -04:00
Eric S. Raymond
c3a71f6db6
Documentation and polishing.
2017-06-21 11:45:16 -04:00
Eric S. Raymond
ddb0df85b3
YAMLify section 11 (hints).
2017-06-21 11:22:18 -04:00
Eric S. Raymond
b37f9f4b2d
Document the YAML, remove some dead code, fix typos.
2017-06-21 07:39:10 -04:00
Eric S. Raymond
f6373dd32e
Section 10 (class thresholds) is now parsed entirely from YAML.
2017-06-21 06:17:20 -04:00
Eric S. Raymond
e798355e80
Further code simplification.
2017-06-20 20:44:21 -04:00
Eric S. Raymond
237f1a876f
Code simplification.
2017-06-20 20:39:45 -04:00
Eric S. Raymond
358fdd437b
Chage read handler argument to by-value.
...
This (sort of) documents the fact that, unlike say() and attack(),
read() never scribbles on the interpreter's command block.
What those other functions are doing is unclean - though less so than
fully exposed globals. I don't see a way to fix it that isn't pretty
intrusive, alas.
2017-06-20 20:24:30 -04:00
Eric S. Raymond
9437ccca36
WD* globals abolished. They're now members of the command block.
2017-06-20 20:06:32 -04:00
Jason S. Ninneman
9714c9fc2a
Fix another ob1 error.
2017-06-20 19:26:55 -04:00
Jason S. Ninneman
1e59d6b476
Clean out some disused variables.
2017-06-20 19:26:55 -04:00
Jason S. Ninneman
acc07e1287
Fix off-by-one error.
2017-06-20 19:26:55 -04:00
Jason S. Ninneman
d029b08ad1
Refactor how turn threshold penalties are accounted for.
2017-06-20 19:26:55 -04:00
Aaron Traas
89de4e4602
Test coverage -- more corner cases in actions.c
2017-06-20 18:43:19 -04:00
Eric S. Raymond
7a3f3ec7a6
Introduce command encapsulation structure.
2017-06-20 17:40:41 -04:00
Jason S. Ninneman
6c4f140333
Refactored dungeon generator.
2017-06-20 14:31:35 -07:00
Jason S. Ninneman
4f042d0ca4
Clean up adventure.yaml.
2017-06-20 14:30:56 -07:00
Jason S. Ninneman
9cda8ad2e2
Don't exit on EOF from get_input().
2017-06-20 13:43:46 -04:00
Aaron Traas
53fd6348b9
Test coverage - more corner cases in actions.c
2017-06-20 13:39:42 -04:00
Eric S. Raymond
e37f858b08
Comment polishing.
2017-06-20 13:38:11 -04:00
Eric S. Raymond
f50e984cec
Add test for "cage bird".
2017-06-20 09:32:35 -04:00
Eric S. Raymond
521033165b
Polish help text.
2017-06-20 08:41:06 -04:00
Eric S. Raymond
73f3831294
Add -l to coverage testing.
2017-06-20 08:34:01 -04:00
Eric S. Raymond
62ab37d3e9
Documentation update.
2017-06-20 08:20:34 -04:00
Eric S. Raymond
018ca9ae37
Fix off-by-one error that enabled the fuzzer to find a crash hole.
...
One has to allocate space for the trailing NUL, too.
2017-06-20 07:20:03 -04:00
Eric S. Raymond
d747d43429
Test logic for lamp dimming triggering battery replacement.
2017-06-20 06:52:52 -04:00
Peje Nilsson
4b93fb327a
Merge branch 'master' into magic-number
2017-06-20 00:06:49 +02:00
Jason S. Ninneman
6ecd001093
Fix typo and compiler warning.
2017-06-19 14:49:15 -07:00
Jason S. Ninneman
ba64c57eb0
Add token_to_packed() utility function.
2017-06-19 14:45:32 -07:00
Peje Nilsson
c84d370918
Merge branch 'master' into magic-number
2017-06-19 23:44:48 +02:00
Peje Nilsson
f9be57a9f9
Cleanup Arithmetic on message number
2017-06-19 23:44:03 +02:00
Aaron Traas
9c88649cd4
Test coverage More misuse of transitive verbs
2017-06-19 17:33:32 -04:00
Aaron Traas
7ae0782b25
Test coverage - failure to fill
2017-06-19 17:33:32 -04:00
Aaron Traas
08c0524ee3
Test coverage -- intransitive carry when one object is present
2017-06-19 17:33:32 -04:00
Aaron Traas
7753ad3134
Test coverage - drink with no valid object
2017-06-19 17:33:32 -04:00
Eric S. Raymond
a678b68b39
Mostly confine assumptions about what token_t is to misc.c
...
The token_t things like WD* are presently longs and will someday be
char[6]. By introducing some trivial functions - wordeq(),
wordempty(), and wordclear() - we mostly hide the difference.
All runtime knowledge about packing now lives only in misc.c and the
list of magic WORD_* defines in advent.h. Outside this, literals are
now accessed through #define names that could expand to either longs
or strings.
Still to be done: WD* values are sometiimes compated to zero in
ways implying they can be negative. Must figure out wat thus means.
2017-06-19 17:21:45 -04:00
Eric S. Raymond
87961483a2
Concentrate all magic-number values for packed-string constants in one place.
2017-06-19 16:53:55 -04:00
Eric S. Raymond
79f5701e07
More semantic typing - a step towards eliminating packing.
2017-06-19 14:20:45 -04:00
Aaron Traas
f4ac82b9f8
Really 100% test coverage for saveresume.c
2017-06-19 13:55:04 -04:00
Aaron Traas
43247f995b
Should have 100% coverage on saveresume.c now
2017-06-19 13:55:04 -04:00
Eric S. Raymond
ef100a3102
Publish more things on the website.
2017-06-19 13:21:15 -04:00
Eric S. Raymond
0eb85f233a
Boolify some logical variables.
2017-06-19 13:21:15 -04:00
NHOrus
e9aff2568f
Even less magic
2017-06-19 20:18:20 +03:00