[net.sources.bugs] "Features/bugs" in latest ispell enhancements

ries@trwrb.UUCP (01/29/87)

[Fellow Netters]

I experienced several problems with the newest version  of  ispell
enhancements posted by bobm@rtech.UUCP (Bob Mcqueer).  Our system
is a Pyramid 98X running OSx V3.1.

The problem manifested itself under the BSD  universe  by  having
ispell  just  sit  there  doing  nothing  after  doing an "ispell
filename".

Compilation under the  ATT  universe  worked  (after  fixing  two
items,   see  below).   Term.c  was  the  culprit.   Anyway,  the
following mods seems  to  allow  ispell  to  work  OK  in  either
universe,  your  mileage  may very.  Hey, I even ran this through
ispell 8-{)!

  TERM.C - change tpgrp from short to int (this bug was posted to
            the  net,  but  apparently backed out by the latest
            posting)
  MAKEFILE - Added TERMLIB variable so that if you have SYSV set,
            set TERMLIB to "-lcurses".  Use "-ltermlib" for BSD.
  BUILDHASH.C - Add  "exit(0)"  after  output().  (this  "pyramid
            feature"  was  posted  to  the  net,  but apparently
            backed out by the latest posting)
  CONFIG.H - Surround LIBDIR with ifndef to avoid  "defined  more
            than once" messages.  Add an index->strchr conversion
            if SYSV defined.
	    - Marc Ries (trwrb!ries)
#=========================================
#======== THIS IS NOT A SHAR FILE ========
#=========================================
*** oterm.c	Wed Jan 28 12:49:39 1987
--- term.c	Wed Jan 28 12:50:04 1987
***************
*** 70,76
  terminit ()
  {
  	int done();
! 	short tpgrp;
  	int onstop();
  	extern short ospeed;
  

--- 70,76 -----
  terminit ()
  {
  	int done();
! 	int tpgrp;
  	int onstop();
  	extern short ospeed;
  
*** oMakefile	Wed Jan 28 12:33:54 1987
--- Makefile	Wed Jan 28 12:41:26 1987
***************
*** 12,18
  #
  #   buildhash <infile> <outfile>
  
! CFLAGS = -O -DSYSV
  BINDIR = /staff1/ries/bin
  LIBDIR = /staff1/ries/lib
  DEFHASH = ispell.hash

--- 12,18 -----
  #
  #   buildhash <infile> <outfile>
  
! CFLAGS = -O
  BINDIR = /staff1/ries/bin
  LIBDIR = /staff1/ries/lib
  DEFHASH = ispell.hash
***************
*** 17,22
  LIBDIR = /staff1/ries/lib
  DEFHASH = ispell.hash
  DEFDICT = dict.191
  
  all: buildhash ispell $(DEFHASH)
  

--- 17,24 -----
  LIBDIR = /staff1/ries/lib
  DEFHASH = ispell.hash
  DEFDICT = dict.191
+ # TERMLIB = -lcurses
+ TERMLIB = -ltermlib
  
  all: buildhash ispell $(DEFHASH)
  
***************
*** 33,39
  
  ispell: ispell.o term.o good.o lookup.o hash.o tree.o
  	cc $(CFLAGS) -o ispell ispell.o term.o good.o lookup.o \
! 		hash.o tree.o -ltermlib
  
  clean:
  	rm -f *.o buildhash ispell core a.out mon.out hash.out \

--- 35,41 -----
  
  ispell: ispell.o term.o good.o lookup.o hash.o tree.o
  	cc $(CFLAGS) -o ispell ispell.o term.o good.o lookup.o \
! 		hash.o tree.o $(TERMLIB)
  
  clean:
  	rm -f *.o buildhash ispell core a.out mon.out hash.out \
*** obuildhash.c  Wed Jan 28 11:52:48 1987
--- buildhash.c	  Wed Jan 28 12:46:19 1987
***************
*** 103,108
  	filltable ();
  
  	output ();
  }
  
  output ()

--- 103,109 -----
  	filltable ();
  
  	output ();
+ 	exit(0);
  }
  
  output ()
*** oconfig.h	Wed Jan 28 13:05:55 1987
--- config.h	Wed Jan 28 12:31:44 1987
***************
*** 4,9
  ** LIBDIR be a directory which will contain nothing else, so sensible
  ** names can be constructed for the -d option without conflict.
  */
  #define LIBDIR "/usr/local/lib"
  #define DEFHASH "ispell.hash"
  

--- 4,10 -----
  ** LIBDIR be a directory which will contain nothing else, so sensible
  ** names can be constructed for the -d option without conflict.
  */
+ #ifndef   LIBDIR
  #define LIBDIR "/usr/local/lib"
  #endif /* LIBDIR */
  #define DEFHASH "ispell.hash"
***************
*** 5,10
  ** names can be constructed for the -d option without conflict.
  */
  #define LIBDIR "/usr/local/lib"
  #define DEFHASH "ispell.hash"
  
  /* environment variable for user's word list */

--- 6,12 -----
  */
  #ifndef   LIBDIR
  #define LIBDIR "/usr/local/lib"
+ #endif /* LIBDIR */
  #define DEFHASH "ispell.hash"
  
  #ifdef SYSV
***************
*** 6,11
  */
  #define LIBDIR "/usr/local/lib"
  #define DEFHASH "ispell.hash"
  
  /* environment variable for user's word list */
  #define PDICTVAR "WORDLIST"

--- 8,17 -----
  #define LIBDIR "/usr/local/lib"
  #endif /* LIBDIR */
  #define DEFHASH "ispell.hash"
+ 
+ #ifdef SYSV
+ #define index strchr
+ #endif
  
  /* environment variable for user's word list */
  #define PDICTVAR "WORDLIST"

bobm@rtech.UUCP (01/31/87)

in article <1561@trwrb.UUCP>, ries@trwrb.UUCP (Marc Ries) says:

> 
> The problem manifested itself under the BSD  universe  by  having
> ispell  just  sit  there  doing  nothing  after  doing an "ispell
> filename".
> 

....

>   TERM.C - change tpgrp from short to int (this bug was posted to
>             the  net,  but  apparently backed out by the latest
>             posting)

Actually, that was the change I was POSTING - you read the diff backwards.
Otherwise I didn't touch term.c.  If you experienced this problem after
applying the diffs as automated scripts, I would suggest making sure you
didn't read the OTHER diffs backwards.  I am doing this as a followup
posting on the chance that the posted changes will compile with ALL the
diffs read backwards, since I limited diffs as opposed to new files to
minor changes.   I rather suspect this might be the cause of a doubledef
of LIBDIR also - I pulled that line out into config.h from an old source
file.

The makefile, buildhash exit(0) changes look like good things to do.
Sorry I missed the exit(0) fix.
-- 

Bob McQueer
{amdahl, sun, mtxinu, hoptoad, cpsc6a}!rtech!bobm