David Griffith [Tue, 12 Feb 2019 11:46:19 +0000 (03:46 -0800)]
Fix two strcpy() calls in curses and needed to redefine os_read_file_name().
The os_read_file_name() function has been a source of odd looks for a
long time. The biggest of the reasons to look at it funny was how it
passed a string back to the caller by reference without clearly stating
how big of a buffer was being written to. It was always FILENAME_MAX,
but still, it looked like a specialized strcpy().
David Griffith [Tue, 12 Feb 2019 09:01:09 +0000 (01:01 -0800)]
Reorder build recipes to make a bit more sense.
David Griffith [Mon, 4 Feb 2019 12:26:44 +0000 (04:26 -0800)]
Update and clean up INSTALL and Makefile.
David Griffith [Sun, 3 Feb 2019 13:49:20 +0000 (05:49 -0800)]
Fixed one instance of strcpy(). The rest are proving tricky.
David Griffith [Sun, 3 Feb 2019 13:24:55 +0000 (05:24 -0800)]
Rewrite last strcpy() call in ux_init.c and remove a FILENAME_MAX instance.
David Griffith [Sun, 3 Feb 2019 12:55:25 +0000 (04:55 -0800)]
Rewrite remaining strcat() calls in curses interface.
David Griffith [Sun, 3 Feb 2019 12:52:04 +0000 (04:52 -0800)]
Put Makefile back to using the OS's version of strdup().
David Griffith [Sat, 2 Feb 2019 09:00:38 +0000 (01:00 -0800)]
Rewrite remaining strcpy() calls in core.
I need to remember to free all members of the f_setup and u_setup
structures. It seems like the place to do this is in reset_memory() for
the core and os_quit() for curses. I should add os_quit() for the other
interfaces.
David Griffith [Sat, 2 Feb 2019 08:50:53 +0000 (00:50 -0800)]
Rewrite two remaining strcpy() calls in src/common/fastmem.c
David Griffith [Sat, 2 Feb 2019 07:47:16 +0000 (23:47 -0800)]
Fix filename in webpage.
David Griffith [Sat, 2 Feb 2019 07:39:02 +0000 (23:39 -0800)]
Adding homepage to be hosted at Gitlab.
David Griffith [Sat, 2 Feb 2019 07:35:40 +0000 (23:35 -0800)]
Adding a .gitattributes file to avoid packaging certain files.
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.
David Griffith [Thu, 31 Jan 2019 17:12:26 +0000 (09:12 -0800)]
Moved local strdup() and strndup() implementations to from dumb to core.
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.
David Griffith [Thu, 31 Jan 2019 15:37:15 +0000 (07:37 -0800)]
Call my_strdup() instead of strdup().
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.
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
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
David Griffith [Wed, 30 Jan 2019 15:21:50 +0000 (07:21 -0800)]
Remove unused string buffer from re-added os_path_open().
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
David Griffith [Wed, 30 Jan 2019 13:30:08 +0000 (05:30 -0800)]
Clean up comments for os_process_arguments()
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.
David Griffith [Wed, 30 Jan 2019 12:52:26 +0000 (04:52 -0800)]
f_setup.interpreter_number is now for the curses interface too.
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.
David Griffith [Wed, 30 Jan 2019 12:31:29 +0000 (04:31 -0800)]
Merge branch 'welash/frotz-path_crap'
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.
Michael Lazar [Wed, 30 Jan 2019 10:47:41 +0000 (02:47 -0800)]
Update documentation to refer to correct commands for dumb frotz.
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.
Bill Lash [Mon, 21 Jan 2019 20:36:39 +0000 (14:36 -0600)]
Fix for finding files on path
David Griffith [Mon, 21 Jan 2019 16:41:54 +0000 (08:41 -0800)]
Update the INSTALL file a bit to talk about sfrotz.
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
William Lash [Mon, 21 Jan 2019 15:40:46 +0000 (15:40 +0000)]
Remove nested functions
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
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
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
Bill Lash [Tue, 15 Jan 2019 03:45:04 +0000 (21:45 -0600)]
Merge branch 'master' of gitlab.com:DavidGriffith/frotz
David Griffith [Thu, 10 Jan 2019 13:27:08 +0000 (05:27 -0800)]
Update mirror list.
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
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.
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
David Griffith [Mon, 10 Sep 2018 12:01:14 +0000 (05:01 -0700)]
Move some externs of os_ functions into frotz.h.
David Griffith [Mon, 10 Sep 2018 11:49:14 +0000 (04:49 -0700)]
Fix stupid oversight in install_sfrotz and uninstall_sfrotz targets.
David Griffith [Mon, 10 Sep 2018 10:45:51 +0000 (03:45 -0700)]
Delete duplicate define of bb_ID_FORM.
David Griffith [Mon, 10 Sep 2018 03:00:48 +0000 (20:00 -0700)]
Added ignores for Quetzal files, scripts, and command recordings.
David Griffith [Mon, 10 Sep 2018 02:59:21 +0000 (19:59 -0700)]
Added useful Blorb-handling changes.
David Griffith [Tue, 4 Sep 2018 09:32:20 +0000 (02:32 -0700)]
Fix #47: Prompt for overwrite.
David Griffith [Tue, 4 Sep 2018 08:33:43 +0000 (01:33 -0700)]
Get rid of convoluted code for stripping filename extensions.
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.
David Griffith [Tue, 4 Sep 2018 08:15:38 +0000 (01:15 -0700)]
Apply same default filename fix from #92 for Dumb interface.
David Griffith [Tue, 4 Sep 2018 08:01:45 +0000 (01:01 -0700)]
Apply same default filename fix from #92 for Curses interface.
David Griffith [Tue, 4 Sep 2018 07:56:30 +0000 (00:56 -0700)]
Fix string termination problems that caused #92.
David Griffith [Tue, 4 Sep 2018 07:00:06 +0000 (00:00 -0700)]
Clean up and fix restricted mode for Dumb interface.
David Griffith [Tue, 4 Sep 2018 06:46:31 +0000 (23:46 -0700)]
Clean up and fix restricted mode for Curses interface.
David Griffith [Tue, 4 Sep 2018 05:50:17 +0000 (22:50 -0700)]
Minor newline cleanup in os_read_file_name().
David Griffith [Tue, 4 Sep 2018 05:19:48 +0000 (22:19 -0700)]
Add compile-time option to disable Blorb for the Dumb interface.
David Griffith [Tue, 4 Sep 2018 05:11:10 +0000 (22:11 -0700)]
Comment cleanup for some headers.
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.
David Griffith [Tue, 4 Sep 2018 03:57:13 +0000 (20:57 -0700)]
Change ZC_FKEY* usage in SDL interface to avoid math.
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.
David Griffith [Sun, 26 Aug 2018 19:25:48 +0000 (12:25 -0700)]
Added install_all and uninstall_all make targets.
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.
David Griffith [Sun, 26 Aug 2018 19:23:28 +0000 (12:23 -0700)]
Add manpage for SDL Frotz. Not done yet.
David Griffith [Sun, 26 Aug 2018 19:22:38 +0000 (12:22 -0700)]
Add list of hotkeys in frotz.6 manpage.
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
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.
David Griffith [Tue, 21 Aug 2018 02:09:14 +0000 (19:09 -0700)]
Fix several old references to Github.
David Griffith [Mon, 20 Aug 2018 16:01:07 +0000 (09:01 -0700)]
Give function keys their own ZC_* defines to avoid offending Clang.
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.
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.
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).
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.
David Griffith [Wed, 1 Aug 2018 04:54:55 +0000 (21:54 -0700)]
Ignore generated defines files.
David Griffith [Wed, 1 Aug 2018 04:53:24 +0000 (21:53 -0700)]
Add unmentioned build targets of "curses" and ncurses".
David Griffith [Wed, 1 Aug 2018 04:47:40 +0000 (21:47 -0700)]
Add blurb when a library or target is finished.
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.
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.
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.
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.
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.
David Griffith [Tue, 31 Jul 2018 18:37:28 +0000 (11:37 -0700)]
Add "Curses interface" to curses interface regular info display.
David Griffith [Tue, 31 Jul 2018 10:33:53 +0000 (03:33 -0700)]
Add version info command line option to SDL interface.
David Griffith [Tue, 31 Jul 2018 10:33:23 +0000 (03:33 -0700)]
Fix ARFLAGS omission.
David Griffith [Tue, 31 Jul 2018 10:15:13 +0000 (03:15 -0700)]
Add mention of curses interface in 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.
David Griffith [Tue, 31 Jul 2018 10:09:46 +0000 (03:09 -0700)]
Add build timestamp to dumb interface version info.
David Griffith [Tue, 31 Jul 2018 10:03:20 +0000 (03:03 -0700)]
Ignore a dist subdirectory.
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.
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".
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".
David Griffith [Tue, 31 Jul 2018 09:07:43 +0000 (02:07 -0700)]
Ignores for *.swp, *.tar, and *.gz.
David Griffith [Tue, 31 Jul 2018 09:06:31 +0000 (02:06 -0700)]
Fix broken use of "git archive".
David Griffith [Tue, 31 Jul 2018 08:03:45 +0000 (01:03 -0700)]
Add MAKEFLAGS option to keep output of parallel builds readable.
David Griffith [Tue, 31 Jul 2018 08:03:01 +0000 (01:03 -0700)]
Prettifying the "Generating" stuff.
David Griffith [Tue, 31 Jul 2018 07:47:01 +0000 (00:47 -0700)]
Forgot these $(RANLIB) substitutions.
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().
David Griffith [Tue, 31 Jul 2018 06:56:55 +0000 (23:56 -0700)]
Fix NO_STRRCHR for consistency.
David Griffith [Tue, 31 Jul 2018 06:53:42 +0000 (23:53 -0700)]
Delete useless exports.
David Griffith [Tue, 31 Jul 2018 06:21:44 +0000 (23:21 -0700)]
Fix typo in targets for uninstalling curses frotz.
David Griffith [Tue, 31 Jul 2018 06:20:44 +0000 (23:20 -0700)]
Remove phonies for version.c to avoid repeated recompilation.