liskon_frotz.git
6 years agoAdding a .gitattributes file to avoid packaging certain files.
David Griffith [Sat, 2 Feb 2019 07:35:40 +0000 (23:35 -0800)]
Adding a .gitattributes file to avoid packaging certain files.

6 years agoFixed problem with garbage .aux filenames.
David Griffith [Fri, 1 Feb 2019 21:28:24 +0000 (13:28 -0800)]
Fixed problem with garbage .aux filenames.

Applied patch found at
https://www.intfiction.org/forum/viewtopic.php?f=38&t=19767
I happened across it by chance, looking for proper responses to handling
.aux files.

6 years agoMoved local strdup() and strndup() implementations to from dumb to core.
David Griffith [Thu, 31 Jan 2019 17:12:26 +0000 (09:12 -0800)]
Moved local strdup() and strndup() implementations to from dumb to core.

6 years agoFixed some problems with unsafe strcpy() calls writing out of bounds.
David Griffith [Thu, 31 Jan 2019 16:07:08 +0000 (08:07 -0800)]
Fixed some problems with unsafe strcpy() calls writing out of bounds.

This manifested in sfrotz crashing with a
"double free or corruption (!prev)" or "munmap_chunk(): invalid pointer"
when saving or restoring using a graphical dialog.  The dialog would
cause os_read_file_name() to return a complete path for the save file.
If done with the -T option, then this information would be obtained in
the text window and only what was typed would be returned.  That's how
the curses and dumb interfaces work too.  That's why the problem wasn't
seen until tinkering with the SDL interface.

There are five other instances of strcpy() left in the core, six in the
curses interface, three in the dumb interface, and a whopping thirty in
the SDL interface.  These will be fixed later.

6 years agoCall my_strdup() instead of strdup().
David Griffith [Thu, 31 Jan 2019 15:37:15 +0000 (07:37 -0800)]
Call my_strdup() instead of strdup().

6 years agoUse f_setup.story_name instead of now-useless stripped_story_name.
David Griffith [Thu, 31 Jan 2019 12:27:25 +0000 (04:27 -0800)]
Use f_setup.story_name instead of now-useless stripped_story_name.

6 years agoMerge branch 'more_mac' into 'master'
David Griffith [Thu, 31 Jan 2019 04:10:04 +0000 (04:10 +0000)]
Merge branch 'more_mac' into 'master'

Add CFLAGS for compiling on OS/X

See merge request DavidGriffith/frotz!86

6 years agoAdd CFLAGS for compiling on OS/X
Bill Lash [Wed, 30 Jan 2019 23:20:37 +0000 (17:20 -0600)]
Add CFLAGS for compiling on OS/X

Added (commented out_ CFLAGS to enable compilation on MAC OSX.  Also
added a short paragraph to the INSTALL with a pointer to the Makefile

6 years agoRemove unused string buffer from re-added os_path_open().
David Griffith [Wed, 30 Jan 2019 15:21:50 +0000 (07:21 -0800)]
Remove unused string buffer from re-added os_path_open().

6 years agoWhere strncat() is called with a fixed string source, increase the size by one.
David Griffith [Wed, 30 Jan 2019 15:17:51 +0000 (07:17 -0800)]
Where strncat() is called with a fixed string source, increase the size by one.

GCC version 8 introduced some new warnings on strncat() usage in an
effort to warn about unsafe usage.  When the source string is a constant
literal and there will always be enough space in the destination, then
you could safely use strcat().  But lots of error-checking processes
will balk at ANY usage of strcat().  Given all this, putting a size of
something greater than the source will cause no harm.

See https://github.com/gcc-mirror/gcc/commit/d8aad7864e5b4c654dcea86b98085baf36d8db76

6 years agoClean up comments for os_process_arguments()
David Griffith [Wed, 30 Jan 2019 13:30:08 +0000 (05:30 -0800)]
Clean up comments for os_process_arguments()

6 years agoClean up remaining f_setup.interpreter_number mess from dumb and curses.
David Griffith [Wed, 30 Jan 2019 13:15:41 +0000 (05:15 -0800)]
Clean up remaining f_setup.interpreter_number mess from dumb and curses.

6 years agof_setup.interpreter_number is now for the curses interface too.
David Griffith [Wed, 30 Jan 2019 12:52:26 +0000 (04:52 -0800)]
f_setup.interpreter_number is now for the curses interface too.

6 years agoFix problem with not using f_setup.interpreter_number all the way.
David Griffith [Wed, 30 Jan 2019 12:48:04 +0000 (04:48 -0800)]
Fix problem with not using f_setup.interpreter_number all the way.

6 years agoMerge branch 'welash/frotz-path_crap'
David Griffith [Wed, 30 Jan 2019 12:31:29 +0000 (04:31 -0800)]
Merge branch 'welash/frotz-path_crap'

6 years agoRemove incomplete and wrong code preventing blorbs from loading.
David Griffith [Wed, 30 Jan 2019 12:30:51 +0000 (04:30 -0800)]
Remove incomplete and wrong code preventing blorbs from loading.

This was the remains of an attempt to determine if there is an executable
chunk in the blorb file and if so, what kind.

6 years agoUpdate documentation to refer to correct commands for dumb frotz.
Michael Lazar [Wed, 30 Jan 2019 10:47:41 +0000 (02:47 -0800)]
Update documentation to refer to correct commands for dumb frotz.

6 years agoRemove the last bits of old-style save format. All Quetzal all the time now.
David Griffith [Wed, 30 Jan 2019 10:37:56 +0000 (02:37 -0800)]
Remove the last bits of old-style save format.  All Quetzal all the time now.

6 years agoFix for finding files on path
Bill Lash [Mon, 21 Jan 2019 20:36:39 +0000 (14:36 -0600)]
Fix for finding files on path

6 years agoUpdate the INSTALL file a bit to talk about sfrotz.
David Griffith [Mon, 21 Jan 2019 16:41:54 +0000 (08:41 -0800)]
Update the INSTALL file a bit to talk about sfrotz.

6 years agoMerge branch 'nested' into 'master'
David Griffith [Mon, 21 Jan 2019 15:40:46 +0000 (15:40 +0000)]
Merge branch 'nested' into 'master'

Remove nested functions

See merge request DavidGriffith/frotz!83

6 years agoRemove nested functions
William Lash [Mon, 21 Jan 2019 15:40:46 +0000 (15:40 +0000)]
Remove nested functions

6 years agoMerge branch 'dashL' into 'master'
David Griffith [Mon, 21 Jan 2019 15:34:11 +0000 (15:34 +0000)]
Merge branch 'dashL' into 'master'

Fix -L option in curses port

See merge request DavidGriffith/frotz!82

6 years agoMerge branch 'segfault' into 'master'
David Griffith [Mon, 21 Jan 2019 15:30:15 +0000 (15:30 +0000)]
Merge branch 'segfault' into 'master'

Segfault fix for issue 95

Closes #95

See merge request DavidGriffith/frotz!81

6 years agoMerge branch 'master' into 'master'
David Griffith [Mon, 21 Jan 2019 15:05:04 +0000 (15:05 +0000)]
Merge branch 'master' into 'master'

Add my_strndup() api

See merge request DavidGriffith/frotz!79

6 years agoMerge branch 'master' of gitlab.com:DavidGriffith/frotz
Bill Lash [Tue, 15 Jan 2019 03:45:04 +0000 (21:45 -0600)]
Merge branch 'master' of gitlab.com:DavidGriffith/frotz

6 years agoUpdate mirror list.
David Griffith [Thu, 10 Jan 2019 13:27:08 +0000 (05:27 -0800)]
Update mirror list.

6 years agoFix -L option in curses port
Bill Lash [Thu, 20 Dec 2018 00:38:44 +0000 (18:38 -0600)]
Fix -L option in curses port

When the -R option of curses frotz was renamed -L the L was left out
of the options string passed to getopt.  This caused the -L option
to not be recognized

6 years agoCheck for NULL pointer when stripping extension
Bill Lash [Tue, 18 Dec 2018 01:52:42 +0000 (19:52 -0600)]
Check for NULL pointer when stripping extension

When stripping the story file extension, verify that the strrchr()
found the ".".  This ensures that if the file had no extension, ther
will be no SEGFAULT.

6 years agoAdd my_strndup() api
Bill Lash [Thu, 27 Sep 2018 00:55:45 +0000 (19:55 -0500)]
Add my_strndup() api

Provide an implementation of strndup that only requires malloc

6 years agoMove some externs of os_ functions into frotz.h.
David Griffith [Mon, 10 Sep 2018 12:01:14 +0000 (05:01 -0700)]
Move some externs of os_ functions into frotz.h.

6 years agoFix stupid oversight in install_sfrotz and uninstall_sfrotz targets.
David Griffith [Mon, 10 Sep 2018 11:49:14 +0000 (04:49 -0700)]
Fix stupid oversight in install_sfrotz and uninstall_sfrotz targets.

6 years agoDelete duplicate define of bb_ID_FORM.
David Griffith [Mon, 10 Sep 2018 10:45:51 +0000 (03:45 -0700)]
Delete duplicate define of bb_ID_FORM.

6 years agoAdded ignores for Quetzal files, scripts, and command recordings.
David Griffith [Mon, 10 Sep 2018 03:00:48 +0000 (20:00 -0700)]
Added ignores for Quetzal files, scripts, and command recordings.

6 years agoAdded useful Blorb-handling changes.
David Griffith [Mon, 10 Sep 2018 02:59:21 +0000 (19:59 -0700)]
Added useful Blorb-handling changes.

6 years agoFix #47: Prompt for overwrite.
David Griffith [Tue, 4 Sep 2018 09:32:20 +0000 (02:32 -0700)]
Fix #47: Prompt for overwrite.

6 years agoGet rid of convoluted code for stripping filename extensions.
David Griffith [Tue, 4 Sep 2018 08:33:43 +0000 (01:33 -0700)]
Get rid of convoluted code for stripping filename extensions.

6 years agoMake this part of Dumb look a bit more like the corresponding Curses one.
David Griffith [Tue, 4 Sep 2018 08:29:08 +0000 (01:29 -0700)]
Make this part of Dumb look a bit more like the corresponding Curses one.

6 years agoApply same default filename fix from #92 for Dumb interface.
David Griffith [Tue, 4 Sep 2018 08:15:38 +0000 (01:15 -0700)]
Apply same default filename fix from #92 for Dumb interface.

6 years agoApply same default filename fix from #92 for Curses interface.
David Griffith [Tue, 4 Sep 2018 08:01:45 +0000 (01:01 -0700)]
Apply same default filename fix from #92 for Curses interface.

6 years agoFix string termination problems that caused #92.
David Griffith [Tue, 4 Sep 2018 07:56:30 +0000 (00:56 -0700)]
Fix string termination problems that caused #92.

6 years agoClean up and fix restricted mode for Dumb interface.
David Griffith [Tue, 4 Sep 2018 07:00:06 +0000 (00:00 -0700)]
Clean up and fix restricted mode for Dumb interface.

6 years agoClean up and fix restricted mode for Curses interface.
David Griffith [Tue, 4 Sep 2018 06:46:31 +0000 (23:46 -0700)]
Clean up and fix restricted mode for Curses interface.

6 years agoMinor newline cleanup in os_read_file_name().
David Griffith [Tue, 4 Sep 2018 05:50:17 +0000 (22:50 -0700)]
Minor newline cleanup in os_read_file_name().

6 years agoAdd compile-time option to disable Blorb for the Dumb interface.
David Griffith [Tue, 4 Sep 2018 05:19:48 +0000 (22:19 -0700)]
Add compile-time option to disable Blorb for the Dumb interface.

6 years agoComment cleanup for some headers.
David Griffith [Tue, 4 Sep 2018 05:11:10 +0000 (22:11 -0700)]
Comment cleanup for some headers.

6 years agoAdd discrete ZC_NUMPAD_? defines to replace define-math in SDL interface.
David Griffith [Tue, 4 Sep 2018 04:00:19 +0000 (21:00 -0700)]
Add discrete ZC_NUMPAD_? defines to replace define-math in SDL interface.

6 years agoChange ZC_FKEY* usage in SDL interface to avoid math.
David Griffith [Tue, 4 Sep 2018 03:57:13 +0000 (20:57 -0700)]
Change ZC_FKEY* usage in SDL interface to avoid math.

6 years agoAdd mention of how to get Xterm to honor the Alt key.
David Griffith [Mon, 27 Aug 2018 01:32:42 +0000 (18:32 -0700)]
Add mention of how to get Xterm to honor the Alt key.

6 years agoAdded install_all and uninstall_all make targets.
David Griffith [Sun, 26 Aug 2018 19:25:48 +0000 (12:25 -0700)]
Added install_all and uninstall_all make targets.

6 years agoAdd mention of sfrotz(6) in Dumb Frotz's manpage. Also did this with frotz.6.
David Griffith [Sun, 26 Aug 2018 19:24:22 +0000 (12:24 -0700)]
Add mention of sfrotz(6) in Dumb Frotz's manpage.  Also did this with frotz.6.

6 years agoAdd manpage for SDL Frotz. Not done yet.
David Griffith [Sun, 26 Aug 2018 19:23:28 +0000 (12:23 -0700)]
Add manpage for SDL Frotz.  Not done yet.

6 years agoAdd list of hotkeys in frotz.6 manpage.
David Griffith [Sun, 26 Aug 2018 19:22:38 +0000 (12:22 -0700)]
Add list of hotkeys in frotz.6 manpage.

6 years agoChange piracy opcode option in sfrotz from -p to -P to match the other ports
David Griffith [Sun, 26 Aug 2018 18:55:28 +0000 (11:55 -0700)]
Change piracy opcode option in sfrotz from -p to -P to match the other ports

6 years agoChanged most instances of memcpy() to memmove().
David Griffith [Sat, 25 Aug 2018 22:12:04 +0000 (15:12 -0700)]
Changed most instances of memcpy() to memmove().

The sole remainder is one of _fmemcpy() in the DOS interface code.

6 years agoFix several old references to Github.
David Griffith [Tue, 21 Aug 2018 02:09:14 +0000 (19:09 -0700)]
Fix several old references to Github.

6 years agoGive function keys their own ZC_* defines to avoid offending Clang.
David Griffith [Mon, 20 Aug 2018 16:01:07 +0000 (09:01 -0700)]
Give function keys their own ZC_* defines to avoid offending Clang.

6 years agoExpand a ternary operation in a printf() to mollify a Clang complaint.
David Griffith [Mon, 20 Aug 2018 15:37:32 +0000 (08:37 -0700)]
Expand a ternary operation in a printf() to mollify a Clang complaint.

6 years agoFix for #84: Missing newline can lead to dropped lines.
David Griffith [Mon, 20 Aug 2018 01:29:44 +0000 (18:29 -0700)]
Fix for #84: Missing newline can lead to dropped lines.

If the last zchar printed in a program is not ZC_RETURN, the Frotz core
exits without flushing the buffer, thereby leading to dropped lines.
This fix calls new_line() when the program finished, which emits a
ZC_RETURN to the output stream and flushes the buffer.

6 years agoThe dist target doesn't need hash or clean as prerequisites.
David Griffith [Wed, 1 Aug 2018 05:15:06 +0000 (22:15 -0700)]
The dist target doesn't need hash or clean as prerequisites.

The "git archive" command pulls files directly from the repository in
.git/objects rather than the visible files.  Therefore neither hash nor
clean are required.  The notion of having the hash prerequisite came
from an earlier idea about making a file with hashes and copying that
into the tarball.  Thinking it over, I decided it was better to just put the
Git stuff into the Makefile by way of sed(1).

6 years agoChange dumb frotz over to SDL's style of error checking message.
David Griffith [Wed, 1 Aug 2018 05:10:33 +0000 (22:10 -0700)]
Change dumb frotz over to SDL's style of error checking message.

6 years agoIgnore generated defines files.
David Griffith [Wed, 1 Aug 2018 04:54:55 +0000 (21:54 -0700)]
Ignore generated defines files.

6 years agoAdd unmentioned build targets of "curses" and ncurses".
David Griffith [Wed, 1 Aug 2018 04:53:24 +0000 (21:53 -0700)]
Add unmentioned build targets of "curses" and ncurses".

6 years agoAdd blurb when a library or target is finished.
David Griffith [Wed, 1 Aug 2018 04:47:40 +0000 (21:47 -0700)]
Add blurb when a library or target is finished.

6 years agoAdd -I flag to SDL Frotz to allow for setting the interpreter number.
David Griffith [Wed, 1 Aug 2018 04:21:59 +0000 (21:21 -0700)]
Add -I flag to SDL Frotz to allow for setting the interpreter number.

6 years agoUpdate manpages for frotz and dfrotz with -I (interpreter number) stuff.
David Griffith [Tue, 31 Jul 2018 20:18:05 +0000 (13:18 -0700)]
Update manpages for frotz and dfrotz with -I (interpreter number) stuff.

More stuff in the manpages needs to be done, particularly addressing old URLs.

6 years agoAdd mention of the -I flag (set interpreter number) to dumb and curse manpages.
David Griffith [Tue, 31 Jul 2018 20:10:21 +0000 (13:10 -0700)]
Add mention of the -I flag (set interpreter number) to dumb and curse manpages.

6 years agoAdd -I flag to curses Frotz to allow for setting the interpreter number.
David Griffith [Tue, 31 Jul 2018 20:09:54 +0000 (13:09 -0700)]
Add -I flag to curses Frotz to allow for setting the interpreter number.

6 years agoMake regular info display for sfrotz look similar to frotz and dfrotz.
David Griffith [Tue, 31 Jul 2018 18:50:39 +0000 (11:50 -0700)]
Make regular info display for sfrotz look similar to frotz and dfrotz.

6 years agoAdd "Curses interface" to curses interface regular info display.
David Griffith [Tue, 31 Jul 2018 18:37:28 +0000 (11:37 -0700)]
Add "Curses interface" to curses interface regular info display.

6 years agoAdd version info command line option to SDL interface.
David Griffith [Tue, 31 Jul 2018 10:33:53 +0000 (03:33 -0700)]
Add version info command line option to SDL interface.

6 years agoFix ARFLAGS omission.
David Griffith [Tue, 31 Jul 2018 10:33:23 +0000 (03:33 -0700)]
Fix ARFLAGS omission.

6 years agoAdd mention of curses interface in curses interface version info.
David Griffith [Tue, 31 Jul 2018 10:15:13 +0000 (03:15 -0700)]
Add mention of curses interface in curses interface version info.

6 years agoDelete short commit hash from curses interface version info.
David Griffith [Tue, 31 Jul 2018 10:13:46 +0000 (03:13 -0700)]
Delete short commit hash from curses interface version info.

6 years agoAdd build timestamp to dumb interface version info.
David Griffith [Tue, 31 Jul 2018 10:09:46 +0000 (03:09 -0700)]
Add build timestamp to dumb interface version info.

6 years agoIgnore a dist subdirectory.
David Griffith [Tue, 31 Jul 2018 10:03:20 +0000 (03:03 -0700)]
Ignore a dist subdirectory.

6 years agoGet version string from Git instead of the Makefile.
David Griffith [Tue, 31 Jul 2018 09:58:38 +0000 (02:58 -0700)]
Get version string from Git instead of the Makefile.

If I need access to the major or minor portion of the version/tag
string, I'll just add some C code where appropriate when the time comes.

6 years agoPut Git branch, hash, short hash, and tag into Makefile when doing "make dist".
David Griffith [Tue, 31 Jul 2018 09:37:17 +0000 (02:37 -0700)]
Put Git branch, hash, short hash, and tag into Makefile when doing "make dist".

6 years agoFixup the Git stuff in preparation for editing Makefile when doing "make dist".
David Griffith [Tue, 31 Jul 2018 09:30:46 +0000 (02:30 -0700)]
Fixup the Git stuff in preparation for editing Makefile when doing "make dist".

6 years agoIgnores for *.swp, *.tar, and *.gz.
David Griffith [Tue, 31 Jul 2018 09:07:43 +0000 (02:07 -0700)]
Ignores for *.swp, *.tar, and *.gz.

6 years agoFix broken use of "git archive".
David Griffith [Tue, 31 Jul 2018 09:06:31 +0000 (02:06 -0700)]
Fix broken use of "git archive".

6 years agoAdd MAKEFLAGS option to keep output of parallel builds readable.
David Griffith [Tue, 31 Jul 2018 08:03:45 +0000 (01:03 -0700)]
Add MAKEFLAGS option to keep output of parallel builds readable.

6 years agoPrettifying the "Generating" stuff.
David Griffith [Tue, 31 Jul 2018 08:03:01 +0000 (01:03 -0700)]
Prettifying the "Generating" stuff.

6 years agoForgot these $(RANLIB) substitutions.
David Griffith [Tue, 31 Jul 2018 07:47:01 +0000 (00:47 -0700)]
Forgot these $(RANLIB) substitutions.

6 years agoChange strrchr() to my_strrchr() to allow for use when there IS a strrchr().
David Griffith [Tue, 31 Jul 2018 07:26:56 +0000 (00:26 -0700)]
Change strrchr() to my_strrchr() to allow for use when there IS a strrchr().

6 years agoFix NO_STRRCHR for consistency.
David Griffith [Tue, 31 Jul 2018 06:56:55 +0000 (23:56 -0700)]
Fix NO_STRRCHR for consistency.

6 years agoDelete useless exports.
David Griffith [Tue, 31 Jul 2018 06:53:42 +0000 (23:53 -0700)]
Delete useless exports.

6 years agoFix typo in targets for uninstalling curses frotz.
David Griffith [Tue, 31 Jul 2018 06:21:44 +0000 (23:21 -0700)]
Fix typo in targets for uninstalling curses frotz.

6 years agoRemove phonies for version.c to avoid repeated recompilation.
David Griffith [Tue, 31 Jul 2018 06:20:44 +0000 (23:20 -0700)]
Remove phonies for version.c to avoid repeated recompilation.

6 years agoDelete unused library compilation targets.
David Griffith [Tue, 31 Jul 2018 06:08:27 +0000 (23:08 -0700)]
Delete unused library compilation targets.

6 years agoClean up the clean target.
David Griffith [Tue, 31 Jul 2018 06:02:57 +0000 (23:02 -0700)]
Clean up the clean target.

6 years agoPut back building of src/common/version.c
David Griffith [Tue, 31 Jul 2018 05:59:56 +0000 (22:59 -0700)]
Put back building of src/common/version.c

6 years agoComment out some extern declarations for variables only used locally.
David Griffith [Tue, 31 Jul 2018 05:30:28 +0000 (22:30 -0700)]
Comment out some extern declarations for variables only used locally.

6 years agoClean up Makefiles re exported variables.
David Griffith [Mon, 30 Jul 2018 11:22:57 +0000 (04:22 -0700)]
Clean up Makefiles re exported variables.

6 years agoMoved stuff that shouldn't be edited to past the end of editable stuff.
David Griffith [Mon, 30 Jul 2018 11:04:33 +0000 (04:04 -0700)]
Moved stuff that shouldn't be edited to past the end of editable stuff.

6 years agoTweak wording of Frotz homepage mention.
David Griffith [Mon, 30 Jul 2018 10:54:16 +0000 (03:54 -0700)]
Tweak wording of Frotz homepage mention.

6 years agoAdd mention of the default make target being "all".
David Griffith [Sat, 28 Jul 2018 04:00:31 +0000 (21:00 -0700)]
Add mention of the default make target being "all".

6 years agoClean up build targets and build help.
David Griffith [Sat, 28 Jul 2018 03:57:50 +0000 (20:57 -0700)]
Clean up build targets and build help.

6 years agoAdded distclean build target.
David Griffith [Sat, 28 Jul 2018 03:37:38 +0000 (20:37 -0700)]
Added distclean build target.

6 years agoFixed problem with sfrotz needlessly recompiling.
David Griffith [Sat, 28 Jul 2018 03:30:38 +0000 (20:30 -0700)]
Fixed problem with sfrotz needlessly recompiling.

Something about a header file names "defines.h" causes it to never
be up-to-date?  So I changed it to "defs.h".