[comp.sys.mac] microemacs 3.8M bug fix

earleh@dartvax.UUCP (06/03/87)

This is a patch to copies of microemacs 3.8M (Macintosh), dated
between Friday, May 15, 1987 and Tuesday, June 2, 1987, and released
by me.  It has to do with a bug in the creation of buffer names.  I
failed to take into account the fact that Mac users are, some of
them at least, fond of long file names.  Since I learned to program
in FORTRAN 77 on a Cyber, where NOTHING can have a name longer than
eight characters, I never noticed this.  This patch applies to the
copy I sent in to comp.binaries.mac recently, and which is bundled
in a PackIt file with the help and macro files.  It also applies to
copies I mailed to people before June 2.  All copies of the program
released by me after June 3 are free of this bug. 

Find:
     VIEWFILE (ASCII)
     Change the next six instances of FFF0 (hex) to FFB0 (hex).

Find:
     ADDLINE (ASCII)
     Change the next 007A (hex) to 00BA (hex).

Once this patch is applied, the function "find-file" will no longer
cause the program to crash the computer.  Buffer names longer than
16 characters may be displayed with funny characters in them,
however.  To be specific, characters 16 and 17 of long buffer names
may contain the WDRefNum of the associated file.  I can only admit
to extreme embarassment.  Copies of the program released after this
date will, of course, lack this feature.

Here is the source code fix, in "estruct.h"

#define NFILEN  80                      /* # of bytes, file name        */
#define NBUFN   16                      /* # of bytes, buffer name      */
                ^^ make this 80, too

Earle

-- 
*********************************************************************
*Earle R. Horton, H.B. 8000, Dartmouth College, Hanover, NH 03755   *
*********************************************************************