David Griffith [Wed, 5 Mar 2025 17:51:03 +0000 (09:51 -0800)]
Fixed potential out-of-bounds read in gen_blorb_init().
Thanks go to Petter Sjölund for pointing out that Address Sanitizer
flagged that line as problematic.
David Griffith [Thu, 27 Feb 2025 05:00:14 +0000 (21:00 -0800)]
Modified Makefile to use "which" if "command -v" isn't available.
NHOrus [Wed, 26 Feb 2025 08:55:00 +0000 (12:55 +0400)]
Replace `which` with POSIX-mandated portable `command -v`
One is a program that needs installing, other is part of the shell
See, eg. https://lwn.net/Articles/874049/
Stephen Kitt [Mon, 3 Feb 2025 06:31:37 +0000 (07:31 +0100)]
Fix "auxiliary" typo
Signed-off-by: Stephen Kitt <steve@sk2.org>
David Griffith [Tue, 11 Feb 2025 18:27:12 +0000 (10:27 -0800)]
Added blurb to ux_audio.h
David Griffith [Tue, 11 Feb 2025 18:05:41 +0000 (10:05 -0800)]
Fix odd indentation in snavig.pl.
David Griffith [Sun, 9 Feb 2025 18:43:24 +0000 (10:43 -0800)]
Fixed nonstandard pkgconf variable names.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1095250
David Griffith [Thu, 6 Feb 2025 20:25:56 +0000 (12:25 -0800)]
Implemented script-from-start for dumb interface.
This can be helpful when doing bugtesting runs. Simply doing
dfrotz < input.txt > output.txt
will not put anything the player types into output.txt. By using the
new -T flag, a transcript of the session is started immediately. Using
the new -n flag, the name of the transcript file can be set at the
command line.
David Griffith [Sat, 8 Feb 2025 03:09:03 +0000 (19:09 -0800)]
Removed useless $(DEFINES) in PHONY target.
David Griffith [Fri, 7 Feb 2025 03:16:11 +0000 (19:16 -0800)]
Fixed potential SDL interface build failure when using "make -j".
David Griffith [Fri, 7 Feb 2025 03:15:03 +0000 (19:15 -0800)]
Shifted to development and created a new release section in ChangeLog.
FeRD (Frank Dana) [Sat, 1 Feb 2025 22:36:37 +0000 (14:36 -0800)]
curses: Make ux_defines.h a prereq of object files
FeRD (Frank Dana) [Sat, 1 Feb 2025 22:25:20 +0000 (14:25 -0800)]
Add two missing includes, to fix builds on Fedora Rawhide (GCC 15.0.1)
David Griffith [Sat, 1 Feb 2025 21:56:41 +0000 (13:56 -0800)]
Quelled some warnings from Turbo C GUI compilation.
David Griffith [Sat, 1 Feb 2025 21:07:33 +0000 (13:07 -0800)]
Added Turbo C for 16-bit DOS fix for 64k boundary crossing.
The LOW_WORD() macro for TurboC can't handle a zword passed as the
address because that macro assumes the first parameter is a 16-bit
value. Maybe someday I'll find a clean way to rewrite that macro.
David Griffith [Sat, 1 Feb 2025 05:03:34 +0000 (21:03 -0800)]
Updated Makefiles for Turbo C and Open Watcom C.
David Griffith [Sat, 1 Feb 2025 04:08:21 +0000 (20:08 -0800)]
Updated ChangeLog and Makefile in preparation for new release.
David Griffith [Sat, 1 Feb 2025 04:01:21 +0000 (20:01 -0800)]
Updated dates in manpages again.
David Griffith [Mon, 27 Jan 2025 23:44:48 +0000 (15:44 -0800)]
Fatal error instead of segfault when writing a string that crosses the 64k mark.
Static and dynamic memory is restricted to below $0ffff (64k). Past
this mark is high memory. Frotz previously stored the address for
printing a string in a zword variable (unsigned short). An unsigned
short is two bytes and therefore loops back to zero after passing
0xffff. When decode_text() was given a string that straddles the 64k
boundary, the address variable looped back to zero, which then provoked
a segfault.
Per the Z-machine Standard, the proper action to take when crossing that
boundary is undefined. If the value in the address variable is copied
to a zlong variable (unsigned long) before proceeding, printing one of
these naughty strings will succeed without complaint. Allowing that to
happen is in direct opposition to why segfaults happen in the first
place: when a program starts writing outside your allocated memory,
that's a clear indication that the program has aquired a faulty picture
of what should be happening. Therefore I have Frotz throw a fatal error
when encountering such a print attempt.
FeRD (Frank Dana) [Thu, 23 Jan 2025 00:34:30 +0000 (19:34 -0500)]
Add src/sdl/sf_defines.h to gitignore
David Griffith [Fri, 10 Jan 2025 07:46:25 +0000 (23:46 -0800)]
Updated manpages.
David Griffith [Thu, 9 Jan 2025 06:55:18 +0000 (22:55 -0800)]
Updated ChangeLog with filename extension stuff.
David Griffith [Thu, 9 Jan 2025 06:48:23 +0000 (22:48 -0800)]
Reworked dumb interface to add appropriate filename extensions for all files.
This reworks
915e385.
David Griffith [Thu, 9 Jan 2025 06:05:56 +0000 (22:05 -0800)]
Reworked curses interface to add appropriate filename extensions for all files.
This reworks
25d5cfc.
David Griffith [Thu, 9 Jan 2025 05:41:46 +0000 (21:41 -0800)]
Reworked SDL interface to add appropriate filename extensions for all files.
This reworks
1e70ac9 and
40fc04b.
David Griffith [Tue, 7 Jan 2025 05:56:28 +0000 (21:56 -0800)]
For X11 interface, add appropriate filename extensions if not already there.
David Griffith [Sat, 4 Jan 2025 01:26:08 +0000 (17:26 -0800)]
For saving in dumb interface, append ".qzl" to filename if not already there.
David Griffith [Thu, 2 Jan 2025 06:21:03 +0000 (22:21 -0800)]
For saving in curses interface, append ".qzl" to filename if not already there.
David Griffith [Thu, 2 Jan 2025 04:51:36 +0000 (20:51 -0800)]
Fixed potential source of trouble when reading file names.
David Griffith [Wed, 1 Jan 2025 20:57:37 +0000 (12:57 -0800)]
For saving in SDL interface, append ".qzl" to filename if not already there.
David Griffith [Wed, 1 Jan 2025 06:48:20 +0000 (22:48 -0800)]
Updated ChangeLog.
David Griffith [Wed, 1 Jan 2025 06:33:44 +0000 (22:33 -0800)]
Ifdef'ed code to check if a short > 16 bits for only TOPS20.
There's reason to call s16() other than for compilation on a PDP10. It
was introduced originally by Andam Thornton to ensure that Frotz is
36-bit clean.
James Le Cuirot [Wed, 1 Jan 2025 04:57:24 +0000 (20:57 -0800)]
Fix stray $ that breaks the frotz filename when specifying LDFLAGS
David Griffith [Fri, 30 Aug 2024 19:21:31 +0000 (12:21 -0700)]
Fixed spurious complaint of missing graphics when Z-code is in the Blorb file.
For curses, dumb, sdl, x11, and dos interfaces.
Note: The code I removed from os_load_story() wasn't doing anything.
David Griffith [Fri, 30 Aug 2024 20:11:48 +0000 (13:11 -0700)]
Removed m_exitPause from SDL as it caused problems without being useful.
David Griffith [Sat, 8 Jun 2024 19:42:21 +0000 (12:42 -0700)]
Ensured complaint about missing graphics if blorb file is garbage.
David Griffith [Sat, 8 Jun 2024 17:21:42 +0000 (10:21 -0700)]
Moved X11 pkgconf calls to X11 Makefile and allow for no pkgconf present.
David Griffith [Mon, 3 Jun 2024 18:37:29 +0000 (11:37 -0700)]
Fixed X11 interface build calling pkg-config directly.
David Griffith [Mon, 3 Jun 2024 18:30:33 +0000 (11:30 -0700)]
Moved SDL pkgconf calls to SDL Makefile to avoid spurious complaints.
Otherwise the build process would throw warnings of SDL libraries not
being found when building some other interface on a machine without SDL
installed.
David Griffith [Sun, 2 Jun 2024 17:17:01 +0000 (10:17 -0700)]
Removed commented out stuff left over from sdl_nosound implementation.
David Griffith [Tue, 28 May 2024 07:16:46 +0000 (00:16 -0700)]
Implemented sdl_nosound build target.
David Griffith [Mon, 27 May 2024 20:29:41 +0000 (13:29 -0700)]
Reworked "make help" output.
David Griffith [Mon, 27 May 2024 07:45:56 +0000 (00:45 -0700)]
Redid declaration of "avail" to satisfy ANSI. Open Watcom C for DOS complained.
Previously Open Watcom C for DOS didn't have a problem with this.
David Griffith [Mon, 27 May 2024 07:41:36 +0000 (00:41 -0700)]
Added some commentary for the common defines.
David Griffith [Mon, 27 May 2024 06:53:20 +0000 (23:53 -0700)]
Moved ux_defines.h generation to src/curses/Makefile.
David Griffith [Mon, 20 May 2024 19:29:50 +0000 (12:29 -0700)]
Added dummy functions for no sound support.
David Griffith [Sat, 18 May 2024 03:20:51 +0000 (20:20 -0700)]
Saved the computed Blorb filename for later use.
This ensures that if a V6 game is started and we're using one of the
default Blorb filenames, a complaint about a missing Blorb file won't be
printed.
David Griffith [Thu, 16 May 2024 06:17:46 +0000 (23:17 -0700)]
Fixed potential NULL references in the curses interface.
David Griffith [Thu, 16 May 2024 06:08:52 +0000 (23:08 -0700)]
Fixed potential NULL references in the curses interface.
These are the same places that caused segfaults for the X11 interface.
Who knows why they didn't cause trouble for the curses interface.
David Griffith [Wed, 15 May 2024 19:50:10 +0000 (12:50 -0700)]
Fixed many NULL references when X11 interface loads V6 without resource.
These caused xfrotz to segfault instead of continue and complain if a V6
game is loaded but no Blorb file is provided.
curiousdannii [Sun, 12 May 2024 05:12:24 +0000 (05:12 +0000)]
Update Makefile to account for no pkgconf
Before this it would try to run libpng as a program, resulting in lots of "make: libpng: No such file or directory" messages
David Griffith [Sat, 11 May 2024 07:23:02 +0000 (00:23 -0700)]
Redid warnings for missing graphics.
The previous attempt wasn't very good. This time around, it's not as
kludgey and the warning will appear with all combinations of Infocom's
V6 games and Frotz interfaces.
David Griffith [Tue, 14 May 2024 04:21:16 +0000 (21:21 -0700)]
Removed superfluous include of execinfo.h.
David Griffith [Sat, 11 May 2024 04:36:23 +0000 (21:36 -0700)]
Added ifndef NO_EXECINFO_H around include of execinfo.h.
David Griffith [Sat, 11 May 2024 01:11:47 +0000 (18:11 -0700)]
Fixed $(EXTENSION) applied twice to executables.
David Griffith [Tue, 7 May 2024 23:47:22 +0000 (16:47 -0700)]
Added runtime warnings when sound or graphics are used but no Blorb is loaded.
David Griffith [Tue, 7 May 2024 06:11:34 +0000 (23:11 -0700)]
Directed players to the IF Archive to get graphics and sound for Infocom games.
David Griffith [Tue, 7 May 2024 05:17:50 +0000 (22:17 -0700)]
Fixed typo.
David Griffith [Fri, 1 Mar 2024 02:01:24 +0000 (18:01 -0800)]
Put my_strdup() and my_strndup() into separate ifdefs.
David Griffith [Fri, 1 Mar 2024 01:50:49 +0000 (17:50 -0800)]
Moved my_strrchr() to src/common/missing.c and made my_basename().
I'm not sure why I didn't implement my_basename() until now.
David Griffith [Thu, 29 Feb 2024 23:47:25 +0000 (15:47 -0800)]
Removed CC declaration in SDL interface Makefile.
David Griffith [Thu, 29 Feb 2024 22:26:13 +0000 (14:26 -0800)]
Ensured that either pkgconf or pkg-config can be used.
Lately pkgconf is functionally the same as pkg-config. The latter name
is deprecated. These changes ensure that pkgconf will be tried first,
then pkg-config. If neither are found, some defaults will be tried, the
build may or may not succeed.
David Griffith [Thu, 29 Feb 2024 19:32:30 +0000 (11:32 -0800)]
Simplified means of not including stdint.h for DOS targets.
David Griffith [Thu, 29 Feb 2024 19:05:56 +0000 (11:05 -0800)]
Finalized (for now) Randomization Test Suite.
David Griffith [Mon, 8 Jan 2024 05:44:22 +0000 (21:44 -0800)]
Reordered display_spread() to make a little more sense.
David Griffith [Fri, 5 Jan 2024 18:55:21 +0000 (10:55 -0800)]
Getting ChangeLog a bit more ready for release.
David Griffith [Fri, 5 Jan 2024 18:53:55 +0000 (10:53 -0800)]
Extended the name of the randomization test to randomization test SUITE.
David Griffith [Fri, 5 Jan 2024 01:36:38 +0000 (17:36 -0800)]
Laid foundation for spread test to automatically increase granularity.
David Griffith [Fri, 5 Jan 2024 00:47:35 +0000 (16:47 -0800)]
Removed useless parameters fed to _bellcurve() functions.
David Griffith [Fri, 5 Jan 2024 00:32:01 +0000 (16:32 -0800)]
Parked cursor out of the way for the spread test.
David Griffith [Fri, 5 Jan 2024 00:27:36 +0000 (16:27 -0800)]
Cleaned up printing of bar segments and removed @set_colour calls.
David Griffith [Fri, 5 Jan 2024 00:15:18 +0000 (16:15 -0800)]
Consolidated the two bin and count arrays into a single Count array.
Only one was in use at any time: one for one test and the other for the
other test.
David Griffith [Fri, 5 Jan 2024 00:11:08 +0000 (16:11 -0800)]
Spread test width is now the terminal width.
David Griffith [Thu, 4 Jan 2024 23:44:31 +0000 (15:44 -0800)]
Put back the Lanes variable as a Global.
David Griffith [Thu, 4 Jan 2024 23:34:02 +0000 (15:34 -0800)]
Added intro to spread test.
David Griffith [Wed, 3 Jan 2024 02:25:43 +0000 (18:25 -0800)]
Committed a new build of the (now named) Z-machine Randomization Test.
David Griffith [Wed, 3 Jan 2024 02:24:44 +0000 (18:24 -0800)]
Commented out Serial in random.inf since this is not yet ready for release.
David Griffith [Wed, 3 Jan 2024 02:23:11 +0000 (18:23 -0800)]
Added optimzations to random.inf. 6656 bytes reduced to 4096 bytes.
David Griffith [Wed, 3 Jan 2024 02:19:47 +0000 (18:19 -0800)]
Changed name of randomization test to Z-machine Randomization Test
Inform hasn't much to do with this program as it's intended to
test an interpreter's behavior.
David Griffith [Wed, 3 Jan 2024 02:04:40 +0000 (18:04 -0800)]
Eliminated LANES from the global variables in random.inf.
David Griffith [Wed, 3 Jan 2024 00:52:47 +0000 (16:52 -0800)]
Now setting Height and Width only in Main() in random.inf.
David Griffith [Tue, 2 Jan 2024 08:43:41 +0000 (00:43 -0800)]
Corrected pausing goofs for the bellcurve test in random.inf.
David Griffith [Mon, 1 Jan 2024 00:19:12 +0000 (16:19 -0800)]
Fixed problem with being unable to exit the spread test.
David Griffith [Mon, 1 Jan 2024 00:06:12 +0000 (16:06 -0800)]
Updated copyright and signon stuff and put random.inf in public domain.
David Griffith [Sun, 31 Dec 2023 22:14:56 +0000 (14:14 -0800)]
Moved printing of the last drop count in display_bellcurve() to before the loop.
David Griffith [Sun, 31 Dec 2023 21:30:20 +0000 (13:30 -0800)]
Added release and serial number display to random.inf.
David Griffith [Sun, 31 Dec 2023 21:17:54 +0000 (13:17 -0800)]
Set spread test to get height from $20 instead of $24.
Per the Z-machine Standard 1.0 and probably earlier as well, location
$24 in the Z-machine header contains the "screen hight in units" whereas
$20 contains "screen height in characters". Usually "units" is
equivalent to "characters", but might not always be true.
I also got rid of excessive blank lines in Main_spread() which was
probably left over from when I pulled in Andrew Hunter's code.
David Griffith [Sun, 31 Dec 2023 20:33:25 +0000 (12:33 -0800)]
Fixed mistake of "top == 0;" in bellcurve test.
David Griffith [Thu, 16 Nov 2023 01:53:56 +0000 (17:53 -0800)]
Mentioned failure to do all processing in src/misc/snavig.pl.
David Griffith [Tue, 14 Nov 2023 05:52:08 +0000 (21:52 -0800)]
Added mention of X11 (Xaw) for graphics support.
David Griffith [Thu, 9 Nov 2023 22:14:01 +0000 (14:14 -0800)]
Added the Frotz icon, renamed existing to a banner.
David Griffith [Mon, 25 Sep 2023 06:31:37 +0000 (23:31 -0700)]
Bumped "last updated" for webpage.
FeRD (Frank Dana) [Mon, 25 Sep 2023 04:00:03 +0000 (21:00 -0700)]
Update standard version in webpage
Originally submitted against
794a137dbfbd18e8369f6042f01c76c327583eb5
Reworked and committed again by David Griffith <dave@661.org>.
Bill Lash [Sun, 24 Sep 2023 17:54:55 +0000 (10:54 -0700)]
Only skip separators if the separator count is >0
Orginally submitted against
0c8af37b6a50cbad279e6ed9bc8aa1888574e73d.
Reworked and commited again by David Griffith <dave@661.org>.
FeRD (Frank Dana) [Sun, 24 Sep 2023 05:21:06 +0000 (05:21 +0000)]
Fix indentation in common/text.c
David Griffith [Fri, 8 Sep 2023 00:39:21 +0000 (17:39 -0700)]
os_fatal() needs to call dumb_show_screen() first otherwise print_string() etc won't print.
For some yet unknown reason, the dumb interface needs to have its screen refreshed by a
call to dumb_show_screen() prior to anything happening in os_fatal(). If not done,
anything that was supposed to be printed through print_string(), print_num(), or
new_line() won't get printed at all. os_warn() doesn't have this problem.
David Griffith [Thu, 7 Sep 2023 05:15:54 +0000 (22:15 -0700)]
Updated the fix for Beyond Zork's rotating mirror bug by now correctly
detecting attempts to address an invalid object.
Beyond Zork release 60 contains a bug wherein the dictionary entry for
the circlet is incorrectly treated as an object when blown. This turned
out to be object number 41460 (or similar). Its entry in the object
table would reside far outside the expanse of memory the Z-machine can
access. Infocom's interpreter simply returns zero when the zcode
checked what turns out to be an invalid object and the game continues
running as if nothing was wrong. Back when Zip was current, this bug
was worked around by checking if the game is Beyond Zork and the object
number was over an arbitrarily large number (2000) and if so just return
zero. I rewrote this code to check ALL accesses to the object table,
throw a fatal error if the access is invalid, and return zero if the
game happens to be Beyond Zork.
See these resources for more information:
https://ifarchive.org/if-archive/infocom/interpreters/zip/zip_bugs.txt
https://intfiction.org/t/beyond-zork-passing-invalid-values-to-get-prop-addr/48347
https://intfiction.org/t/z-machine-undefined-behavior/44990
https://intfiction.org/t/z-machine-standard-unclear-aspects-ambiguities/64128
David Griffith [Sun, 30 Jul 2023 07:18:54 +0000 (00:18 -0700)]
Added commentary about failing to properly internalize the substitutions.
David Griffith [Sun, 30 Jul 2023 06:55:27 +0000 (23:55 -0700)]
Made symbol shortening more versatile.
David Griffith [Sat, 29 Jul 2023 04:49:54 +0000 (21:49 -0700)]
Be a bit clearer about which version of sed is being used.