liskon_frotz.git
5 years agoConvert sf_fonts.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:37:32 +0000 (20:37 -0700)]
Convert sf_fonts.c to K&R style.

5 years agoConvert sf_font3.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:24:32 +0000 (20:24 -0700)]
Convert sf_font3.c to K&R style.

5 years agoConvert sf_aiffwav.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:18:30 +0000 (20:18 -0700)]
Convert sf_aiffwav.c to K&R style.

5 years agoConvert samplerate.h to K&R style.
David Griffith [Sun, 22 Sep 2019 03:16:03 +0000 (20:16 -0700)]
Convert samplerate.h to K&R style.

5 years agoConvert generic.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:11:44 +0000 (20:11 -0700)]
Convert generic.c to K&R style.

5 years agoConvert variable.c to K&R style.
David Griffith [Sun, 22 Sep 2019 03:06:36 +0000 (20:06 -0700)]
Convert variable.c to K&R style.

5 years agoConvert text.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:24:09 +0000 (19:24 -0700)]
Convert text.c to K&R style.

5 years agoConvert table.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:09:27 +0000 (19:09 -0700)]
Convert table.c to K&R style.

5 years agoConvert stream.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:06:36 +0000 (19:06 -0700)]
Convert stream.c to K&R style.

5 years agoConvert sound.c to K&R style.
David Griffith [Sun, 22 Sep 2019 02:02:30 +0000 (19:02 -0700)]
Convert sound.c to K&R style.

5 years agoConvert setup.h to K&R style.
David Griffith [Sun, 22 Sep 2019 01:57:54 +0000 (18:57 -0700)]
Convert setup.h to K&R style.

5 years agoConvert screen.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:54:53 +0000 (18:54 -0700)]
Convert screen.c to K&R style.

5 years agoConvert redirect.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:22:36 +0000 (18:22 -0700)]
Convert redirect.c to K&R style.

5 years agoConvert random.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:16:06 +0000 (18:16 -0700)]
Convert random.c to K&R style.

5 years agoConvert quetzal.c to K&R style.
David Griffith [Sun, 22 Sep 2019 01:12:52 +0000 (18:12 -0700)]
Convert quetzal.c to K&R style.

5 years agoConvert process.c to K&R style.
David Griffith [Sun, 22 Sep 2019 00:53:32 +0000 (17:53 -0700)]
Convert process.c to K&R style.

5 years agoConvert object.c to K&R style.
David Griffith [Sun, 22 Sep 2019 00:28:54 +0000 (17:28 -0700)]
Convert object.c to K&R style.

5 years agoConvert math.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:59:53 +0000 (16:59 -0700)]
Convert math.c to K&R style.

5 years agoConvert main.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:54:34 +0000 (16:54 -0700)]
Convert main.c to K&R style.

5 years agoConvert input.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:22:21 +0000 (16:22 -0700)]
Convert input.c to K&R style.

5 years agoConvert hotkey.c to K&R style.
David Griffith [Sat, 21 Sep 2019 23:02:57 +0000 (16:02 -0700)]
Convert hotkey.c to K&R style.

5 years agoConvert getopt.c to K&R style.
David Griffith [Sat, 21 Sep 2019 22:52:39 +0000 (15:52 -0700)]
Convert getopt.c to K&R style.

5 years agoConvert frotz.h to K&R style.
David Griffith [Sat, 21 Sep 2019 22:34:32 +0000 (15:34 -0700)]
Convert frotz.h to K&R style.

5 years agoConvert files.c to K&R style.
David Griffith [Sat, 21 Sep 2019 22:28:23 +0000 (15:28 -0700)]
Convert files.c to K&R style.

5 years agoConvert fastmem.c to K&R style.
David Griffith [Sat, 21 Sep 2019 02:22:55 +0000 (19:22 -0700)]
Convert fastmem.c to K&R style.

5 years agoConvert err.c to K&R style.
David Griffith [Sat, 21 Sep 2019 01:52:24 +0000 (18:52 -0700)]
Convert err.c to K&R style.

5 years agoConvert buffer.c to K&R style.
David Griffith [Sat, 21 Sep 2019 01:45:36 +0000 (18:45 -0700)]
Convert buffer.c to K&R style.

5 years agoConvert ux_text.c to K&R style.
David Griffith [Sat, 21 Sep 2019 01:31:57 +0000 (18:31 -0700)]
Convert ux_text.c to K&R style.

5 years agoConvert ux_setup.h to K&R style.
David Griffith [Fri, 20 Sep 2019 02:24:23 +0000 (19:24 -0700)]
Convert ux_setup.h to K&R style.

5 years agoConvert ux_sema.h to K&R style.
David Griffith [Fri, 20 Sep 2019 02:21:57 +0000 (19:21 -0700)]
Convert ux_sema.h to K&R style.

5 years agoConvert ux_screen.c to K&R style.
David Griffith [Fri, 20 Sep 2019 02:17:19 +0000 (19:17 -0700)]
Convert ux_screen.c to K&R style.

5 years agoConvert ux_resource.c to K&R style.
David Griffith [Fri, 20 Sep 2019 02:01:20 +0000 (19:01 -0700)]
Convert ux_resource.c to K&R style.

5 years agoConvert ux_pic.c to K&R style.
David Griffith [Fri, 20 Sep 2019 01:29:24 +0000 (18:29 -0700)]
Convert ux_pic.c to K&R style.

5 years agoConvert ux_input.c to K&R style.
David Griffith [Thu, 19 Sep 2019 23:10:08 +0000 (16:10 -0700)]
Convert ux_input.c to K&R style.

5 years agoConvert ux_init.c to K&R style.
David Griffith [Thu, 19 Sep 2019 22:10:12 +0000 (15:10 -0700)]
Convert ux_init.c to K&R style.

5 years agoConvert ux_blorb.h to K&R style.
David Griffith [Thu, 19 Sep 2019 06:09:40 +0000 (23:09 -0700)]
Convert ux_blorb.h to K&R style.

5 years agoConvert ux_blorb.c to K&R style.
David Griffith [Thu, 19 Sep 2019 06:08:19 +0000 (23:08 -0700)]
Convert ux_blorb.c to K&R style.

5 years agoConvert ux_audio_oss.c to K&R style.
David Griffith [Thu, 19 Sep 2019 06:01:14 +0000 (23:01 -0700)]
Convert ux_audio_oss.c to K&R style.

5 years agoConvert ux_audio_none.c to K&R style.
David Griffith [Thu, 19 Sep 2019 05:46:55 +0000 (22:46 -0700)]
Convert ux_audio_none.c to K&R style.

5 years agoConvert ux_audio.h to K&R style.
David Griffith [Thu, 19 Sep 2019 05:44:10 +0000 (22:44 -0700)]
Convert ux_audio.h to K&R style.

5 years agoConvert ux_audio.c to K&R style.
David Griffith [Thu, 19 Sep 2019 05:10:40 +0000 (22:10 -0700)]
Convert ux_audio.c to K&R style.

5 years agoConvert dumb_pic.c to K&R style.
David Griffith [Thu, 19 Sep 2019 04:37:18 +0000 (21:37 -0700)]
Convert dumb_pic.c to K&R style.

K&R style conversion for the dumb interface is now complete.

5 years agoConvert dumb_output.c to K&R style.
David Griffith [Wed, 18 Sep 2019 21:50:40 +0000 (14:50 -0700)]
Convert dumb_output.c to K&R style.

5 years agoConvert dumb_input.c to K&R style.
David Griffith [Wed, 18 Sep 2019 07:24:09 +0000 (00:24 -0700)]
Convert dumb_input.c to K&R style.

5 years agoConvert dumb_init.c to K&R style.
David Griffith [Wed, 18 Sep 2019 06:42:59 +0000 (23:42 -0700)]
Convert dumb_init.c to K&R style.

5 years agoConvert dumb_blorb.h to K&R style.
David Griffith [Wed, 18 Sep 2019 06:22:23 +0000 (23:22 -0700)]
Convert dumb_blorb.h to K&R style.

5 years agoConvert dumb_blorb.c to K&R style.
David Griffith [Wed, 18 Sep 2019 06:19:57 +0000 (23:19 -0700)]
Convert dumb_blorb.c to K&R style.

Here begins the process of converting the Frotz codebase to adhere to
the K&R coding style.  I'm doing one commit per file just in case
there's a problem later on.

5 years agoBuild common_defines and hash for DOS. No cross-compiling yet.
David Griffith [Wed, 18 Sep 2019 05:58:31 +0000 (22:58 -0700)]
Build common_defines and hash for DOS.  No cross-compiling yet.

What I'd like to do with this is to cross-compile for 16-bit DOS using
Watcom C executed under Unix.  That'll have to wait for another release.

5 years agoAdded -H option to sfrotz for showing extended options.
David Griffith [Wed, 18 Sep 2019 05:50:05 +0000 (22:50 -0700)]
Added -H option to sfrotz for showing extended options.

5 years agoHopefully partial rebuilds are finally fixed.
David Griffith [Wed, 18 Sep 2019 05:33:01 +0000 (22:33 -0700)]
Hopefully partial rebuilds are finally fixed.

5 years agoAdd some talk about color in curses.
David Griffith [Tue, 17 Sep 2019 22:17:14 +0000 (15:17 -0700)]
Add some talk about color in curses.

5 years agoFix problem with building on *BSD of mentions of blorblib when nothing to build.
David Griffith [Mon, 16 Sep 2019 02:00:41 +0000 (02:00 +0000)]
Fix problem with building on *BSD of mentions of blorblib when nothing to build.

5 years agoReword ncurses notes.
David Griffith [Mon, 16 Sep 2019 02:00:03 +0000 (19:00 -0700)]
Reword ncurses notes.

5 years agoMention the need for NetBSD users to install libao-sun.
David Griffith [Mon, 16 Sep 2019 01:46:12 +0000 (01:46 +0000)]
Mention the need for NetBSD users to install libao-sun.

5 years agoAdd some defines and ifndefs to omit headers missing from OpenBSD.
David Griffith [Fri, 13 Sep 2019 20:41:06 +0000 (13:41 -0700)]
Add some defines and ifndefs to omit headers missing from OpenBSD.

5 years agoDisable Immintrin (Intel Intrinsics Emulation) for OpenBSD
David Griffith [Fri, 13 Sep 2019 18:34:28 +0000 (11:34 -0700)]
Disable Immintrin (Intel Intrinsics Emulation) for OpenBSD

It's not like that will do much good for what Frotz does anyhow.

5 years agoAdding OS-specific section for OpenBSD.
David Griffith [Fri, 13 Sep 2019 18:18:23 +0000 (11:18 -0700)]
Adding OS-specific section for OpenBSD.

5 years agoTalk about locale for getting proper UTF-8 support in curses and dumb.
David Griffith [Sat, 14 Sep 2019 20:51:02 +0000 (13:51 -0700)]
Talk about locale for getting proper UTF-8 support in curses and dumb.

5 years agoUpdate INSTALL with curses discussion and OpenBSD library nomenclature.
David Griffith [Sat, 14 Sep 2019 20:50:28 +0000 (13:50 -0700)]
Update INSTALL with curses discussion and OpenBSD library nomenclature.

5 years agoDelete a.out when distcleaning.
David Griffith [Sat, 14 Sep 2019 00:48:37 +0000 (17:48 -0700)]
Delete a.out when distcleaning.

5 years agoMention Paul Gilbert in AUTHORS.
David Griffith [Fri, 13 Sep 2019 20:05:00 +0000 (13:05 -0700)]
Mention Paul Gilbert in AUTHORS.

5 years agoEdit colors on images with adaptive palettes.
Paul Gilbert [Fri, 13 Sep 2019 19:15:20 +0000 (12:15 -0700)]
Edit colors on images with adaptive palettes.

In Zork Zero and Arthur, some images have no palettes of their own.
These change their colors according to images plotted before.  Kevin
Bracy called these "adaptive palette pictures".  To deal with them, he
proposed an extension to the Blorb standard to add an "APal" chunk which
lists the images that have adaptive palettes.  The changes in this
commit make sfrotz read that chunk and then rewrite the palettes of
listed images when they are loaded.

This is described in much greater detail in
http://ifarchive.org/if-archive/programming/blorb/blorb-infocom-extension.txt

The work to correctly implement processing of adaptive palettes was done by Paul
Gilbert <dreammaster@scummvm.org>.  I, David Griffith, condensed what would have been
an irritatingly messy merge into a single commit and did general cleanup before
committing Paul's changes using his name.

5 years agoTypo zlip --> zlib
David Griffith [Fri, 13 Sep 2019 04:44:56 +0000 (04:44 +0000)]
Typo zlip --> zlib

5 years agoAdd a.out to .gitignore for NetBSD.
David Griffith [Fri, 13 Sep 2019 04:06:28 +0000 (04:06 +0000)]
Add a.out to .gitignore for NetBSD.

5 years agoKeep NetBSD from mistakenly using curses.h in /usr/pkg/include/ncurses?.
David Griffith [Fri, 13 Sep 2019 03:52:52 +0000 (03:52 +0000)]
Keep NetBSD from mistakenly using curses.h in /usr/pkg/include/ncurses?.

If /usr/pkg/include/ncurses and/or /usr/pkg/include/ncursesw are passed
as arguments to the -I flag, the build process gets confused and will
abort with complaints about acs_map being undefined.

5 years agoConditionally use -D_POSIX_C_SOURCE=200809L for Linux only for now.
David Griffith [Wed, 4 Sep 2019 21:42:38 +0000 (14:42 -0700)]
Conditionally use -D_POSIX_C_SOURCE=200809L for Linux only for now.

I don't know why this was causing problems for FreeBSD.

5 years agoRemove trailing spaces.
David Griffith [Wed, 4 Sep 2019 21:41:20 +0000 (14:41 -0700)]
Remove trailing spaces.

5 years agoCFLAGS don't belong in the final linking.
David Griffith [Wed, 4 Sep 2019 21:31:45 +0000 (14:31 -0700)]
CFLAGS don't belong in the final linking.

5 years agoFinish with SDL interface for FreeBSD.
David Griffith [Wed, 4 Sep 2019 20:55:27 +0000 (20:55 +0000)]
Finish with SDL interface for FreeBSD.

5 years agoMaybe this will prove helpful in getting Xterm to always do UTF-8.
David Griffith [Wed, 4 Sep 2019 09:17:48 +0000 (02:17 -0700)]
Maybe this will prove helpful in getting Xterm to always do UTF-8.

5 years agoUpdate manpages for dumb and curses frotz with Unicode info.
David Griffith [Wed, 4 Sep 2019 09:14:25 +0000 (02:14 -0700)]
Update manpages for dumb and curses frotz with Unicode info.

5 years agoRemove mention of -R (restricted read/write path) as it's not yet implemented for...
David Griffith [Wed, 4 Sep 2019 07:42:40 +0000 (00:42 -0700)]
Remove mention of -R (restricted read/write path) as it's not yet implemented for sfrotz.

5 years agoRemove mention of .frotzrc -- not used with sfrotz.
David Griffith [Wed, 4 Sep 2019 07:41:26 +0000 (00:41 -0700)]
Remove mention of .frotzrc -- not used with sfrotz.

5 years agoFix some awkward wording.
David Griffith [Wed, 4 Sep 2019 07:40:49 +0000 (00:40 -0700)]
Fix some awkward wording.

5 years agoBold instances of frotz and sfrotz in manpage.
David Griffith [Wed, 4 Sep 2019 07:39:42 +0000 (00:39 -0700)]
Bold instances of frotz and sfrotz in manpage.

5 years agoUpdate sfrotz manpage to talk about Unicode support.
David Griffith [Wed, 4 Sep 2019 07:30:11 +0000 (00:30 -0700)]
Update sfrotz manpage to talk about Unicode support.

5 years agoAdd some tweaks for FreeBSD; no sound curses interface.
David Griffith [Wed, 4 Sep 2019 06:56:52 +0000 (23:56 -0700)]
Add some tweaks for FreeBSD; no sound curses interface.

5 years agoRemove extraneous parentheses.
David Griffith [Wed, 4 Sep 2019 02:02:29 +0000 (02:02 +0000)]
Remove extraneous parentheses.

5 years agoMerge branch 'more-pkg-config' into 'master'
David Griffith [Tue, 3 Sep 2019 07:05:56 +0000 (07:05 +0000)]
Merge branch 'more-pkg-config' into 'master'

More pkg-config fixes for SDL and ncurses

See merge request DavidGriffith/frotz!123

5 years agoUse shell Makefile function to avoid repeatedly calling pkg-config
James Le Cuirot [Mon, 2 Sep 2019 21:51:52 +0000 (22:51 +0100)]
Use shell Makefile function to avoid repeatedly calling pkg-config

It was being called many times when using backticks.

5 years agoUse pkg-config to get ncurses(w) flags, falling back to static strings
James Le Cuirot [Mon, 2 Sep 2019 21:39:03 +0000 (22:39 +0100)]
Use pkg-config to get ncurses(w) flags, falling back to static strings

Using pkg-config ensures that -I/usr/include/ncursesw is added when
necessary. This picks up the correct ncurses.h when both the wide and
non-wide versions are installed.

It also ensures that -ltinfo(w) is added when necessary. Some
distributions such as Gentoo build it as a separate library.

5 years agoFix mess with defines.
David Griffith [Mon, 2 Sep 2019 01:29:53 +0000 (18:29 -0700)]
Fix mess with defines.

There was an ongoing problem with how I was handling defs.h et al
causing things to be entirely rebuilt or not rebuilt at all without
first doing a "make clean".  This fixes those problems that were last
addressed in 03e0c58b2363e5daecc29da44edf27fe4bc4beaa.

5 years agoMerge branch 'toolchain-paths' into 'master'
David Griffith [Mon, 2 Sep 2019 00:59:17 +0000 (00:59 +0000)]
Merge branch 'toolchain-paths' into 'master'

Don't add $(PREFIX)/include and $(PREFIX)/lib to toolchain paths

See merge request DavidGriffith/frotz!122

5 years agoMerge branch 'pkg-config' into 'master'
David Griffith [Sun, 1 Sep 2019 03:09:01 +0000 (03:09 +0000)]
Merge branch 'pkg-config' into 'master'

Allow building with a specific pkg-config given by PKG_CONFIG

See merge request DavidGriffith/frotz!121

5 years agoDon't add $(PREFIX)/include and $(PREFIX)/lib to toolchain paths
James Le Cuirot [Sat, 31 Aug 2019 13:54:11 +0000 (14:54 +0100)]
Don't add $(PREFIX)/include and $(PREFIX)/lib to toolchain paths

PREFIX is only applicable at install and runtime. The headers and
libraries we're building against may not be in the same location,
particularly if we're cross-compiling. Adding -I/usr/include when
cross-compiling will likely break the build.

It is generally not necessary to add these paths anyway as toolchains
are already configured to look in the appropriate places for system
headers and libraries. There may be exceptions but these can be dealt
with via CFLAGS and LDFLAGS. Perhaps this is necessary for MacPorts
but I'm not familiar with it.

5 years agoAllow building with a specific pkg-config given by PKG_CONFIG
James Le Cuirot [Sat, 31 Aug 2019 13:49:03 +0000 (14:49 +0100)]
Allow building with a specific pkg-config given by PKG_CONFIG

Sometimes wrappers around pkg-config are used for cross-compiling.

5 years agoRemove version.c and put build date back into git_hash.h.
David Griffith [Sat, 31 Aug 2019 00:45:56 +0000 (17:45 -0700)]
Remove version.c and put build date back into git_hash.h.

I was never quite satisfied with the way I did version.c.  I seem to
recall someone telling me it was improper to put the build date into
git_hash.h.  After a couple months of this, I looked again and realized
that I picked an irritating solution -- Frotz will always be rebuilt
when doing "make install".  The difference between when version.c is
created and when someone is done monkeying with the build process does
not seem to be of much consequence.

5 years agoMerge branch 'keydelay' into 'master'
David Griffith [Fri, 30 Aug 2019 22:57:55 +0000 (22:57 +0000)]
Merge branch 'keydelay' into 'master'

Swallow unexpected timeout keycode

See merge request DavidGriffith/frotz!120

5 years agoRemove R from getopt that isn't being used for anything yet.
David Griffith [Fri, 30 Aug 2019 22:48:26 +0000 (15:48 -0700)]
Remove R from getopt that isn't being used for anything yet.

I just noticed that the -R flag for restricting where sfrotz is allowed
to read and write is not implemented.  This feature isn't quite as useful
for the SDL interface as it is for the curses and dumb interfaces, so
I'll give this a 2.46 milestone.  If anyone reading this issue feels like
implementing this now, that's great and I'll merge it when you're done.

5 years agoFix improper way of checking for uninitialized string.
David Griffith [Fri, 30 Aug 2019 22:39:04 +0000 (15:39 -0700)]
Fix improper way of checking for uninitialized string.

5 years agoSwallow unexpected timeout keycode
Bill Lash [Fri, 30 Aug 2019 02:52:02 +0000 (21:52 -0500)]
Swallow unexpected timeout keycode

Insted of passing on an timeout event when there is no timeout set,
just skip it.

5 years agoMerge branch 'keydelay' into 'master'
David Griffith [Thu, 29 Aug 2019 03:30:13 +0000 (03:30 +0000)]
Merge branch 'keydelay' into 'master'

Check to see if a timeout is expected

Closes #136

See merge request DavidGriffith/frotz!119

5 years agoCheck to see if a timeout is expected
Bill Lash [Thu, 29 Aug 2019 02:10:16 +0000 (21:10 -0500)]
Check to see if a timeout is expected

When a timeout keycode is received, make sure that it is expected,
otherwise a non-existent timeout routine may be called.

5 years agoAdd mention of Unicode by way of UTF-8 in INSTALL.
David Griffith [Tue, 27 Aug 2019 22:30:07 +0000 (15:30 -0700)]
Add mention of Unicode by way of UTF-8 in INSTALL.

5 years agoSegfault with -r and no parameter. Add missing colon to zgetopt() call.
David Griffith [Mon, 26 Aug 2019 00:39:15 +0000 (17:39 -0700)]
Segfault with -r and no parameter.  Add missing colon to zgetopt() call.

5 years agoMove sf_searchfile() from sf_ftype.c to sf_fonts.c.
David Griffith [Sat, 24 Aug 2019 00:19:19 +0000 (17:19 -0700)]
Move sf_searchfile() from sf_ftype.c to sf_fonts.c.

5 years agoFix problem with fontdir option in .sfrotzrc not being honored for .bdf fonts.
David Griffith [Fri, 23 Aug 2019 23:44:57 +0000 (16:44 -0700)]
Fix problem with fontdir option in .sfrotzrc not being honored for .bdf fonts.

5 years agoRemoved dependency preprocessor stuff that never did anything useful.
David Griffith [Tue, 20 Aug 2019 06:19:23 +0000 (23:19 -0700)]
Removed dependency preprocessor stuff that never did anything useful.

These options had the side-effect of forcing the SDL library to be
completely recompiled all the time because build_timestamp in
src/common/version.c is rewritted every time the Makefile is run.

5 years agoAdd targets to .PHONY to re-allow partial rebuild.
David Griffith [Fri, 16 Aug 2019 04:58:46 +0000 (21:58 -0700)]
Add targets to .PHONY to re-allow partial rebuild.

Somehow when doing 2559eb24b6314939dde07d7bed5927cb37929dda, I neglected
to put $(COMMON_DEFINES) $(CURSES_DEFINES) $(COMMON_STRINGS) $(HASH)
into .PHONY.  This had the effect of requiring me to do "make clean ;
make" after altering one file.  Otherwise the build would simply report
that blorblib.a is up to date and exit.

5 years agoFix null trailer problem with Blorb file loading.
David Griffith [Wed, 14 Aug 2019 19:20:16 +0000 (12:20 -0700)]
Fix null trailer problem with Blorb file loading.