Aaron Traas
1e643da216
Remove unused code
2017-06-27 16:13:49 -04:00
Jason S. Ninneman
2fac8d1aef
object_descriptions[] is now objects[].
2017-06-26 09:43:11 -07:00
Eric S. Raymond
59243cf8bc
Take FORTRANish upper-case function names to C-style lowercase...
...
...except for a few we're planning to get rid of. This will avoid some
upcoming collisions with macros defined from YAML.
2017-06-26 10:19:33 -04:00
Eric S. Raymond
3a93b2b5f0
Elimination of OBJSND.
2017-06-24 09:08:48 -04:00
Jason S. Ninneman
97241e87d7
Quick-fix the 'pillo bug'.
...
Once parsing no longer depends on text being broken up into
5-char tokens, the ugly hack to adventure.yaml must go away.
2017-06-21 22:43:16 -07:00
Aaron Traas
3c8530663d
xstrdup() not called anywhere in source. Removed.
2017-06-21 13:50:13 -04: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
Jason S. Ninneman
9cda8ad2e2
Don't exit on EOF from get_input().
2017-06-20 13:43:46 -04:00
Eric S. Raymond
e37f858b08
Comment polishing.
2017-06-20 13:38:11 -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
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
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
NHOrus
e9aff2568f
Even less magic
2017-06-19 20:18:20 +03:00
Jason S. Ninneman
624ba16aad
Change YES() to take const char* arguments.
2017-06-18 19:51:59 -07:00
Eric S. Raymond
83ff9d0c0e
Attempt to deconfuse the coverage analyzer.
2017-06-18 20:33:36 -04:00
Eric S. Raymond
fd02259c7f
Reindent and cleanup.
2017-06-18 20:24:37 -04:00
Bob Little
04eca720d9
magic numbers, show usage, fixed linty warnings
...
Show usage when using bad parameter with ./advent
Converted magic numbers to enums for BUG(). Also bug now shows
stringify'ed version of bug enumeration (not just a number).
2017-06-18 19:33:21 -04:00
Jason S. Ninneman
65e2e472dd
Fix bug that made YES() case-sensitive.
...
Also fix a related memory leak.
2017-06-18 14:14:13 -07:00
Jason S. Ninneman
550734fd3f
Gut and rebuild YES() with cleaner approach that doesn't rely on packing.
...
The new support functions get_input() and echo_input() (and others not made yet) will eventually replace GETIN() and MAPLIN().
2017-06-18 13:39:59 -07:00
Eric S. Raymond
ba5c7dacb5
Remove unused code.
2017-06-18 13:20:04 -04:00
Jason S. Ninneman
672ef17d4c
Rename newspeak() to speak().
2017-06-18 10:06:14 -07:00
Eric S. Raymond
b3057f038b
Re-format to consistent indent style with "make indent".
2017-06-18 06:18:51 -04:00
Bob Little
d844c2a391
Added 'linty' target for make
...
"make linty" does lots of error checking while compiling.
Simplified the standard make's CFLAGS.
Cleaned up code to eliminate resulting warnings generated by "make linty".
2017-06-17 22:28:40 -04:00
Eric S. Raymond
d97574d35c
Magic-number elimination.
2017-06-16 08:55:53 -04:00
Eric S. Raymond
1329da1087
Remove total-ordering assumption.
2017-06-16 08:39:01 -04:00
Eric S. Raymond
a57d93ce35
Magic-number elimination.
2017-06-16 07:00:57 -04:00
Eric S. Raymond
eaee02aa09
Squasgh -Wextra warnings.
2017-06-15 19:39:43 -04:00
NHOrus
f1f7cfd4e9
Localizing variables
2017-06-15 16:16:21 +03:00
Eric S. Raymond
a141f021d5
Meaningful shortnames for RSPEAK messages.
2017-06-15 07:35:03 -04:00
Eric S. Raymond
fef9657e3e
Move from random message numbers to ARB_* symbols generate from YAML.
2017-06-14 17:36:30 -04:00
NHOrus
46bb20deb3
Lowering the scope And cleaning up some warnings from static analysis
2017-06-14 15:17:02 -04:00
Eric S. Raymond
4993be4c08
Include LCG state in game saves.
2017-06-14 13:00:28 -04:00
Eric S. Raymond
dc6a5751ed
Magic-number elimination.
2017-06-13 18:54:53 -04:00
Jason S. Ninneman
bfa06be62d
Fix all the simple compiler warnings.
2017-06-13 11:19:58 -07:00
Eric S. Raymond
34db08ce06
Typo fixes.
2017-06-13 12:25:19 -04:00
Eric S. Raymond
fa74e8054b
Explain the prompting logic more fully.
2017-06-13 12:18:46 -04:00
Eric S. Raymond
9a2618963f
Fix a minor bug in -l operation. Explain the input logic.
2017-06-13 11:59:49 -04:00
Eric S. Raymond
760e2e3282
Remove more unused code.
2017-06-13 09:42:18 -04:00
Eric S. Raymond
fb93f9d67e
Remove now-unused code.
2017-06-13 09:35:39 -04:00
Eric S. Raymond
6a6d9ca14e
Address GitLab issue #10 : Spurious '>' characters appearing in console output
...
The prompt logic has become unpleasantly complicated.
2017-06-13 08:03:27 -04:00
Jason S. Ninneman
90b9b84797
Clean up function argument.
2017-06-12 21:36:06 +00:00
Jason S. Ninneman
ca0e042952
Use strdup() instead of strncpy().
2017-06-12 21:36:06 +00:00
Eric S. Raymond
a044f10411
Turn MOD from function to macro.
...
I experimented with expanding it to ((N % M) everywhere, but in context
the MOD(N, M) notation seems easier to read.
2017-06-12 17:33:21 -04:00
Eric S. Raymond
66c22301ed
Add -s option.
...
Re-enables pasting multiline sequences to the > prompt (for making checkfiles).
2017-06-12 16:51:35 -04:00
Eric S. Raymond
32b04f190e
Clean up compiler warnings.
2017-06-11 18:57:07 -04:00
Jason S. Ninneman
bcfecca1a1
Fix broken unpacking algorithm.
...
Also trim trailing whitespace.
2017-06-11 15:42:25 -07:00
Jason S. Ninneman
a2e0c55fb4
Abolish SPEAK().
2017-06-11 15:42:25 -07:00
Jason S. Ninneman
25d98f6dab
Working first draft of newspeak().
2017-06-11 15:42:25 -07:00
Jason S. Ninneman
f715091db6
Get plural replacement working.
2017-06-11 15:42:25 -07:00