Released frotz-2.42.tar.gz
authorDavid Griffith <dave@661.org>
Mon, 11 Mar 2002 07:59:28 +0000 (23:59 -0800)
committerDavid Griffith <dave@661.org>
Mon, 11 Mar 2002 07:59:28 +0000 (23:59 -0800)
15 files changed:
BUGS
ChangeLog
HOW_TO_PLAY
INSTALL
Makefile
NOTES [new file with mode: 0644]
README
TODO
bugtest/README
findsound.sh
frotz.6
frotz.lsm
ux_init.c
ux_input.c
ux_pic.c

diff --git a/BUGS b/BUGS
index 7ded2567dacfc8372b874ff82bab0ccd397fdfb4..d5dc3b0b0d20abe176d47543e2b777a17b604ed6 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -40,8 +40,8 @@ OSS sound on non-Linux machines ||
 The only machines using the OSS drivers I can test sound on are Linux/x86,
 NetBSD/x86, and Sparcs running NetBSD.  The sound from the NetBSD machines
 sounds horrrible (twice as slow, full of static).  I'm not sure what the
-problem is.  So far, I haven't heard of anyone trying sound on machines
-other than Linux/x86.
+problem is.  So far, I haven't heard of anyone getting sound to work on
+machines other than Linux/x86.
 
 
 =====================
index c38c5b6cee722f3924b6193ee7cddd3ff25eb0f7..d5cfebebc9142569e9f526fbddd680dbda112aea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+Summary of changes between Unix Frotz 2.41 and Unix Frotz 2.42:
+===============================================================
+
+Unix Frotz 2.42 was released on Monday March 11, 2002.
+
+NEW FEATURES
+
+- Makefile updated to play nicer with Mac OS X.
+
+
+BUG FIXES
+
+- Al Petrofsky sent a fix to prevent Frotz from aborting when Ctrl-Space
+  is entered (in ux_input.c).  Actually it was sent to Debian's bug list
+  several months ago, but not to me.  He also submitted a patch which
+  prevents picture dimensions from being rounded down to zero (ux_pic.c).
+  Sidebars in Arthur are now visible.
+
+- Steven Frank was mistakenly identified as the submitter of the fix to
+  allow Unix Frotz to display properly on screens narrower than 80
+  columns.  The true submitter was Justin Wesley.  The machine used was
+  an Agenda PDA running Linux.
+
+
+
 Summary of changes between Unix Frotz 2.40 and Unix Frotz 2.41:
 ===============================================================
 
@@ -115,5 +140,3 @@ NEW FEATURES
 
 - History searchs has been added.  Type the beginning of a past command
   and hit the up or down arrow key.
-
-
index c363ae56378817cc3b2237d9ce5d00182d462751..badfbd5318536b04ec27061f11e6a56c1f65fd6c 100644 (file)
@@ -149,7 +149,7 @@ position before quitting, you must use the "SAVE" command.
 
 RESTORE - This restores a previously saved position.
 
-RESTART - This stops the store and restarts it from the beginning.
+RESTART - This stops the game and restarts it from the beginning.
 
 SAVE - This saves a "snapshot" of your current position.  You can return
 to a saved position in the future by using the "RESTORE" command.
diff --git a/INSTALL b/INSTALL
index f63c3a9f16f5ff36a94e3e051668f54ec0a55ec3..d7c28197673415523820e58970051cff87420ec3 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -2,10 +2,10 @@
    READ THIS FILE ALL THE WAY THROUGH BEFORE ATTEMPTING TO INSTALL FROTZ
 ---------------------------------------------------------------------------
 
-The Unix port of Frotz was written mainly with Linux in mind. Fortunately,
-the source is rather generic C code and runs well on pretty much all
-current Unices.  These are the only two things needed to compile and run
-Frotz:
+The Unix port of Frotz was written mainly with Linux in mind.
+Fortunately, the source is rather generic C code and runs well on pretty
+much all current Unixen.  These are the only two things needed to compile
+and run Frotz:
 
        * Some variant of Unix with an ANSI C compiler (gcc works fine)
        * A reasonably good SYSV derived curses library (ncurses is best)
@@ -23,6 +23,25 @@ machines and some *BSD machines).  Support for other drivers is in the
 works.
 
 
+====================
+Precompiled Frotz ||
+====================
+
+NetBSD:  It's in the pkgsrc tree!
+
+FreeBSD:  It's in the ports tree!
+
+MacOS X:  It's at
+http://www.ifarchive.org/indexes/if-archiveXinfocomXinterpretersXfrotz.html
+
+Debian:  Debian isn't so good at keeping an up-to-date version of Frotz
+around, so check http://packages.debian.org/testing/games/frotz.html to
+make sure before you use apt-get or whatever.
+
+See http://www.cs.csubak.edu/~dgriffi/proj/frotz/prepackaged.html for
+up-to-date information on precompiled Frotz packages
+
+
 =======================
 Editing the Makefile ||
 =======================
@@ -40,10 +59,12 @@ ports, RPM, DEB, or whatever packaging scheme suits you.
 Compiling and installing Frotz ||
 =================================
 
-Type "make" to compile Frotz.  If you get any showstopping complaints,
-it's most likely because you didn't tell make where your curses library
-is, where the curses header is, if you're using plain old curses or
-ncurses, or you're trying to use sound on an unsupported platform.
+Make sure you're in the directory that was created when you untarred the
+Frotz tarball.  Type "make" to compile Frotz.  If you get any showstopping
+complaints, it's most likely because you didn't tell make where your
+curses library is, where the curses header is, if you're using plain old
+curses or ncurses, or you're trying to use sound on an unsupported
+platform.
 
 Under Linux, the header file "soundcard.h" is usually found in
 <sys/soundcard.h>.  *BSD has this file in <soundcard.h>.  The Makefile and
@@ -61,6 +82,7 @@ to write where you want Frotz installed, then type "make install".
 
 To uninstall Frotz, type "make uninstall".
 
+
 ========================================
 Installing and playing games on Frotz ||
 ========================================
@@ -143,22 +165,24 @@ versions of ncurses supplied on SGI's freeware CDs and in SGI's freeware
 archive.  You MUST compile and install at least ncurses 5.0 from source.
 Versions of ncurses older than 5.0 are also broken on Irix.
 
-MacOS X:  According to Steven Frank <stevenf@mail.panic.com>, Frotz
-compiles fine on MacOS X if you change "gcc" to "cc" in the Makefile.
-The compiler is actually GCC, but is named "cc" for some strange reason.
-You will need to install ncurses, which will compile cleanly, but runs
-into trouble during installation.  You'll have to baby it along until a
-new version of ncurses comes out to address the install trouble.
+MacOS X:  You must use "cc" instead of "gcc" even though it's really GCC.
+This is a quirk of the Mac OS X Developer Tools.  MAN_PREFIX in the
+Makefile should be set to "/usr/local/share".
+
+Installing ncurses on MacOS X used to be troublesome because of some
+nonstandard places for things, but it seems that thse problems have been
+solved with ncurses 5.2.  A precompiled version of ncurses for MacOS X is
+available at http://gnu-darwin.sourceforge.net/.
 
 Solaris:  Some versions of curses on Solaris have trouble with color
 support.  At least the one in Solaris 2.6 works okay.  If compiled with
 the -02 option on an UltraSPARC using gcc 2.8.1, you may get lots of weird
 segfaults. The problem seems UltraSPARC related and it's not clear if this
 problem crosses flavor boundaries (ie, if UltraLinux or NetBSD on
-UltraSparc have this problem too).  Since version 2.8.x of gcc had lots of
-strange problems, gcc might be to blame.  I don't have sufficient access
-to test this theory, so if you're able to enlighten me on this, please do
-so.
+UltraSparc have this problem too).  Because version 2.8.x of gcc had lots
+of strange problems, gcc might be to blame.  I don't have sufficient
+access to test this theory, so if you're able to enlighten me on this,
+please do so.
 
 SunOS:  Uncomment the "MEMMOVE_DEF..." line in the Makefile before
 compiling.  Since I don't have access to a SunOS machine or an install CD
index 83a6b702e331efbbee0e070be7d26b1e81c1a932..26a22fc78c211f94b89509e73a230396f25e3499 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,37 +1,50 @@
-#Define your C compiler.  I recommend gcc if you have it.
+# Define your C compiler.  I recommend gcc if you have it.
+# MacOS users should use "cc" even though it's really "gcc".
+#
 CC = gcc
 #CC = cc
 
 # Define your optimization flags.  Most compilers understand -O and -O2,
 # Standard (note: Solaris on UltraSparc using gcc 2.8.x might not like this.)
+#
 OPTS = -O2
 # Pentium with gcc 2.7.0 or better
 #OPTS = -O2 -fomit-frame-pointer -malign-functions=2 -malign-loops=2 \
 #-malign-jumps=2
 
 # Define where you want Frotz to be installed.  Usually this is /usr/local
+#
 PREFIX = /usr/local
 #PREFIX =
 
+#Define where manpages should go.
+#
+MAN_PREFIX = $(PREFIX)
+#MAN_PREFIX = /usr/local/share/
+
 # Define where you want Frotz to look for frotz.conf.
+#
 CONFIG_DIR = /usr/local/etc
 #CONFIG_DIR = /etc
 #CONFIG_DIR = /usr/pkg/etc
 #CONFIG_DIR =
 
 # Uncomment this if you want color support.  Usually this requires ncurses.
+#
 COLOR_DEFS = -DCOLOR_SUPPORT
 
 # Uncomment this if you have an OSS soundcard driver and want classical
 # Infocom sound support.  Currently this works only for Linux.
-# SOUND_DEFS = -DOSS_SOUND
+#
+#SOUND_DEFS = -DOSS_SOUND
 
-# Uncomment the type of sound driver you want to use.
-# OSS
+# Also uncomment this if you want sound through the OSS driver.
+#
 #SOUND_LIB = -lossaudio
 
 # This should point to the location of your curses.h or ncurses.h include
 # file if your compiler doesn't know about it.
+#
 INCL = -I/usr/local/include
 #INCL = -I/usr/pkg/include
 #INCL = -I/usr/freeware/include
@@ -41,6 +54,7 @@ INCL = -I/usr/local/include
 # This should define the location and name of whatever curses library you're
 # linking with.  Usually, this isn't necessary if /etc/ld.so.conf is set
 # up correctly.
+#
 LIB = -L/usr/local/lib
 #LIB = -L/usr/pkg/lib
 #LIB = -L/usr/freeware/lib
@@ -48,19 +62,23 @@ LIB = -L/usr/local/lib
 #LIB =
 
 # One of these must be uncommented, use ncurses if you have it.
+#
 CURSES = -lncurses     # Linux always uses ncurses.
 #CURSES = -lcurses
 
-# Comment this out if you're not using ncurses.
+# Comment this out if you're using plain old curses.
+#
 CURSES_DEF = -DUSE_NCURSES_H
 
 # Uncomment this if you're compiling Unix Frotz on a machine that lacks
 # the memmove(3) system call.  If you don't know what this means, leave it
 # alone.
+#
 #MEMMOVE_DEF = -DNO_MEMMOVE
 
 # Uncomment this if for some wacky reason you want to compile Unix Frotz
 # under Cygwin under Windoze.  This sort of thing is not reccomended.
+#
 #EXTENSION = .exe
 
 
@@ -68,11 +86,15 @@ CURSES_DEF = -DUSE_NCURSES_H
 # Nothing under this line should need to be changed.
 #####################################################
 
-VERSION = 2.41
+VERSION = 2.42
 
 BINNAME = frotz
 
+DISTFILES = bugtest
+
 DISTNAME = $(BINNAME)-$(VERSION)
+distdir = $(DISTNAME)
+
 
 OBJECTS = buffer.o err.o fastmem.o files.o hotkey.o input.o main.o \
        math.o object.o process.o quetzal.o random.o redirect.o \
@@ -80,7 +102,9 @@ OBJECTS = buffer.o err.o fastmem.o files.o hotkey.o input.o main.o \
        ux_input.o ux_pic.o ux_screen.o ux_text.o variable.o \
        ux_audio_none.o ux_audio_oss.o
 
-OPT_DEFS = -DCONFIG_DIR="\"$(CONFIG_DIR)\"" $(CURSES_DEF)
+OPT_DEFS = -DCONFIG_DIR="\"$(CONFIG_DIR)\"" $(CURSES_DEF) \
+       -DVERSION="\"$(VERSION)\""
+
 
 COMP_DEFS = $(OPT_DEFS) $(COLOR_DEFS) $(SOUND_DEFS) $(SOUNDCARD) \
        $(MEMMOVE_DEF)
@@ -98,14 +122,14 @@ soundcard.h:
 
 install: $(BINNAME)
        install -d $(PREFIX)/bin
-       install -d $(PREFIX)/man/man6
-       strip $(BINNAME)
+       install -d $(MAN_PREFIX)/man/man6
+       strip $(BINNAME)$(EXTENSION)
        install -c -m 755 $(BINNAME)$(EXTENSION) $(PREFIX)/bin
-       install -c -m 644 $(BINNAME).6 $(PREFIX)/man/man6
+       install -c -m 644 $(BINNAME).6 $(MAN_PREFIX)/man/man6
 
 uninstall:
        rm -f $(PREFIX)/bin/$(BINNAME)$(EXTENSION)
-       rm -f $(PREFIX)/man/man6/$(BINNAME).6
+       rm -f $(MAN_PREFIX)/man/man6/$(BINNAME).6
 
 deinstall: uninstall
 
@@ -115,13 +139,28 @@ clean:
 distro: dist
 
 dist: distclean
-       cd .. ; tar cf $(DISTNAME).tar $(DISTNAME) ; gzip -f $(DISTNAME).tar
+
+       mkdir $(distdir)
+
+       @for file in `ls`; do \
+               if test $$file != $(distdir); then \
+                       cp -rp $$file $(distdir)/$$file; \
+               fi; \
+       done
+
+       tar chof $(distdir).tar $(distdir)
+       gzip -f --best $(distdir).tar
+       rm -rf $(distdir)
+
+       @echo
+       @echo "$(distdir).tar.gz created"
        @echo
-       @echo "$(DISTNAME).tar.gz created"
 
 distclean: clean
        rm -f soundcard.h
        rm -f $(BINNAME)$(EXTENSION)
+       -rm -rf $(distdir)
+       -rm -f $(distdir).tar $(distdir).tar.gz
 
 realclean: distclean
 
diff --git a/NOTES b/NOTES
new file mode 100644 (file)
index 0000000..d778619
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,25 @@
+Hi David,
+
+This is the KDE port guy again.
+
+I want to be able to close one story file and open a new one, all without
+exiting the main program.
+
+For this to work, I had to modify the last line in interpret() in
+process.c from
+
+finished--;
+
+to
+
+finished = 0;
+
+Otherwise the static variable 'finished' ends up as 9998 when starting the
+second story, instead of the correct value of 0.
+
+Perhaps useful to include in the reference implementation?
+
+Cheers,
+
+Peter
+
diff --git a/README b/README
index a2180738af9ae7920cb48c4af91d906f9cb2990a..cb3fab050b9cc4fea7a996ea673198361cc4f69f 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-FROTZ V2.41 - An interpreter for all Infocom games and other Z-machine  games.
+FROTZ V2.42 - An interpreter for all Infocom games and other Z-machine games.
 Complies with standard 1.0 of Graham Nelson's specification.
 
 Originally written by Stefan Jokisch in 1995-1997.
@@ -21,9 +21,15 @@ Unix port currently maintained by David Griffith.
 The latest information on Unix Frotz is available at the Unix Frotz
 homepage at http://www.cs.csubak.edu/~dgriffi/frotz/.
 
-The latest release of Unix Frotz is available for FTP download at
-ftp://ftp.gmd.de/if-archive/infocom/interpreters/frotz/frotz-<version>.tar.gz
-or any reliable mirror such as http://www.ifarchive.org.
+The latest release of Unix Frotz is available for FTP download at:
+ftp://ftp.ifarchive.org/if-archive/infocom/interpreters/frotz/frotz-<version>.tar.gz
+
+and on the World Wide Web at:
+
+http://www.ifarchive.org/if-archive/infocom/interpreters/frotz/frotz-<version>.tar.gz
+
+http://www.ifarchive.org also lists several mirrors which may be better
+choices depending on where you live.
 
 For installation information, see the file "INSTALL".
 
@@ -46,7 +52,7 @@ like a .deb, .rpm, Slackware package, the NetBSD pkgsrc tree, FreeBSD's
 ports tree, or anything like that so I can note that on the Unix Frotz
 webpage at http://www.cs.csubak.edu/~dgriffi.  _PLEASE_ don't try to do
 anything like have auto-install scripts grab files from that page.  Use
-ftp.gmd.de or one of its mirrors for that.
+ifarchive.org or one of its mirrors for that.
 
 
 ====================
diff --git a/TODO b/TODO
index 33fa53ab707725a94beb24632554770ae7747b7d..cedad63cb947affa1b13d3954480ecdeecb74eb4 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
-========================================================
-Stuff to do for a minor update in no particular order ||
-========================================================
+=====================================
+Stuff to do that's probably simple ||
+=====================================
 
 Frotz has so far, been completely configurable throught the command-line.
 When I added the config file support, I noticed the need to add overrides
@@ -17,6 +17,12 @@ hotkey menu instead
 
 Hotkey menu needs work.
 
+For the hotkey thing, I think a good way to approach this would be to
+add a META-M hotkey.  This would bring up a menu from which one can alter
+and save any of the settings for Frotz.
+
+Blink the screen instead of ringing the bell when in quiet mode.
+
 Add zlib support to allow Frotz to read gzipped story files.
 
 Add support for debug verbs (teleport, pilfer, bamf, (frotz|futz|lumen),
@@ -28,17 +34,20 @@ Add an option to define the type of machine the Z-Machine is running on
 games might cause trouble and this is a rather frivilous option, so I'll
 let it go for now.
 
+Fix bugs!  (see file BUGS)
+
+
+=========================================================
+Stuff to do that'll probably require major overhauling ||
+=========================================================
+
 Add support for more sound drivers, not just OSS.
 
 Reorganize the source code into a "src" directory, documentation into a
 "doc" directory, and so on.
 
-Fix bugs!  (see file BUGS)
-
-
-===================================================
-Stuff to do for the next major release (ie 2.50) ||
-===================================================
+Add support for speech output.  When there is new output, the new output
+would be piped to a speech synthesis program.
 
 Modify os_display_string() so that it behaves like printf() with character
 conversions and all that nifty stuff.
@@ -47,17 +56,20 @@ More sensible handling of saves, transcripts, and game files.  This might
 be best handled by doing a complete rewrite of the Unix-specific code,
 which probably ought to be done anyhow.
 
-Curses menu to select desired game.  Current working code heavily borrows
+Curses menu to select desired game.  Current working code heavily borrowed
 from Alan Shutko's <ats@hubert.wustl.edu> "int-fiction" frontend program.
 
 Blorb gamefile support.
 
 Blorb sound support on all platforms.
 
-Implement Glk support.
+Implement Glk support.  As of release 2.42, Glk support development has
+been abandoned.
 
 An X11 graphical interface using GTK widgets (thus allowing V6 full support).
 
+Cocoa support for OSX.
+
 =========================================
 Stuff that would be really really nice ||
 =========================================
index a98074d8a2e03d34317b651c6758d740a1c2292c..67bdc0cb665e4cfe4ea3350720f89e0735cb559c 100644 (file)
@@ -1,7 +1,7 @@
 These programs are intended to excercise the interpreter that it is
 functioning according to spec.  As far as I can determine, the programs
 are in the public domain or made freely available with no restrictions.
-Copyrights are retained by the original authors.
+Copyrights are retained by the original authors where noted.
 
 
 crashme.inf    Self-modifying reproducing Z-code.  Generates random junk
@@ -9,6 +9,7 @@ crashme.inf     Self-modifying reproducing Z-code.  Generates random junk
                shouldn't die except on fatal errors.
                Written by Evin Robertson in 1999.
 
+
 crashme.z5     Above code compiled to a Version 5 Z-machine binary.
 
 
@@ -16,6 +17,7 @@ etude/                TerpEtude (etude.z5).  Excercises the Z-machine for proper
                behavior.  Does not test error-handling.
                Written by Andrew Plotkin in 1997
 
+
 gntests.inf    Assorted tests for checking proper handling of fonts,
                accents, input codes, colors, header, and timed input.
                Conforms to the Z-Spec 0.99 by Graham Nelson.  Something
@@ -32,4 +34,5 @@ strictz.inf   Another error-checking program intended specifically to
                all possible non-fatal errors.
                Written by Torbjorn Andersson in 1998.
 
+
 strictz.z5     Above code compiled to a Version 5 Z-machine binary.
index 7fabb6914aadde660f2743f1b48c70820c360523..c200a31f3570400d17df8c3172bf65311774199f 100755 (executable)
@@ -21,7 +21,7 @@ fi
 cat << EOF > $OUTFILE
 /*
  * This file automatically generated by findsound.sh which run by the
- * Makefile found in the Unix Frotz 2.41 source distribution.
+ * Makefile found in the Unix Frotz 2.42 source distribution.
  * Copying this nasty hack to find headers which may be in any of several
  * places is not recommended.  I didn't want to use autoconf just yet
  * for this project.
diff --git a/frotz.6 b/frotz.6
index 97acacb8f1b524e5afb36b63ae4541a2d0b12702..b8ce03ddff394ce0ba40e9bfcaa4354736582e5c 100644 (file)
--- a/frotz.6
+++ b/frotz.6
@@ -1,5 +1,5 @@
 .\" -*- nroff -*-
-.TH FROTZ 6 2.41
+.TH FROTZ 6 2.42
 .SH NAME
 frotz \- interpreter for Infocom and other Z-Machine games
 
index 724b77e6ae33cd5aa6f15b5b48876e446f894edc..fef1e10e801ca216a41e9c2bc4a5f7b515695cbe 100644 (file)
--- a/frotz.lsm
+++ b/frotz.lsm
@@ -1,14 +1,14 @@
 Begin4
 Title:                 Unix Frotz
-Version:               2.41
-Entered-date:          2001-05-20
+Version:               2.42
+Entered-date:          [unreleased 2001-05-20]
 Description:           An interpreter for all Infocom games and other
                        Z-machine games.  Compiles with standard 1.0 of
                        Graham Nelson's specification.
 Keywords:              infocom, frotz, text-adventure, zork
 Author:                        dgriffi@cs.csubak.edu (David Griffith)
 Maintained-by:         dgriffi@cs.csubak.edu (David Griffith)
-Primary-site:          ftp://ftp.gmd.de/if-archive/infocom/interpreters/frotz/frotz-2.41.tar.gz
+Primary-site:          ftp://ftp.gmd.de/if-archive/infocom/interpreters/frotz/frotz-2.42.tar.gz
 Alternate-site:                http://www.cs.csubak.edu/~dgriffi/frotz.html
 Original-site:
 Platforms:             All reasonably POSIX-compliant flavors of Unix.
index dfad1f9c7aad69e6d438b95a26d5ab759bfca06e..2b55d4bfe3172be74658cf10494e402330bc6ccc 100644 (file)
--- a/ux_init.c
+++ b/ux_init.c
@@ -49,8 +49,7 @@
 #include "ux_frotz.h"
 
 #define INFORMATION "\
-\n\
-FROTZ V2.41 - An interpreter for all Infocom and other Z-Machine games.\n\
+ - An interpreter for all Infocom and other Z-Machine games.\n\
 Complies with standard 1.0 of Graham Nelson's specification.\n\
 \n\
 Syntax: frotz [options] story-file\n\
@@ -252,6 +251,7 @@ void os_process_arguments (int argc, char *argv[])
     } while (c != EOF);
 
     if (optind != argc - 1) {
+       printf("FROTZ V%s", VERSION);
        puts (INFORMATION);
        printf ("\t-Z # error checking mode (default = %d)\n"
            "\t     %d = don't report errors   %d = report first error\n"
index e5b091aad5b6758e0242c58fa92557d107c88525..967a7c0683858c11a85718beb31d4042702a992c 100644 (file)
@@ -146,6 +146,14 @@ static int unix_read_char(int extkeys)
                return ZC_TIME_OUT;
            else
                continue;
+       case 0:
+               /* Zero is the character code returned by curses when the
+                  user types Ctrl-@ (or Ctrl-Space).  It is also
+                  ZC_TIME_OUT.  If the user accidentally hits Ctrl-@, we
+                  must not return a bogus timeout to the program.
+               */
+               continue;
+
        /* Screen decluttering. */
        case MOD_CTRL ^ 'L': case MOD_CTRL ^ 'R':
            clearok( curscr, 1); refresh(); clearok( curscr, 0);
index f8d766b57da9be601b57fcfb563bb8603bd3c154..256e9989d2d7290df77b9246ad60987510663ed9 100644 (file)
--- a/ux_pic.c
+++ b/ux_pic.c
@@ -136,6 +136,12 @@ bool unix_init_pictures (void)
                h_screen_rows, y_scale);
       pict_info[i].width = round_div(pict_info[i].orig_width *
                h_screen_cols, x_scale);
+
+      /* Don't let dimensions get rounded to nothing. */
+      if (pict_info[i].orig_height && !pict_info[i].height)
+         pict_info[1].height = 1;
+      if (pict_info[i].orig_width && !pict_info[i].width)
+         pict_info[i].width = 1;
     }
     success = TRUE;
   } while (0);