diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/buildhash.c ispell-3.206/buildhash.c
--- ispell-3.26t/buildhash.c	Thu Jul 26 00:51:44 2001
+++ ispell-3.206/buildhash.c	Fri Aug 10 17:58:26 2001
@@ -164,9 +164,63 @@ int main (argc, argv)
     if (yyparse ())			/* Parse the language tables */
 	exit (1);
 
+#ifdef MSDOS
+    /*
+    ** Use Hfile as the base to derive the Cfile and Sfile names,
+    ** since Dfile doesn't include the med/lrg/xlg part in its
+    ** basename.  Using Dfile could cause a collision with Cfile
+    ** from another dictionary, which in turn will fail us due to
+    ** overflow of the hash table in `filltable'.
+    */
+    strncpy (Cfile, Hfile, strlen (Hfile) - strlen (HASHSUFFIX));
+    strcpy (Sfile, Cfile);
+    strcat (Cfile, COUNTSUFFIX);
+    strcat (Sfile, STATSUFFIX);
+    /*
+    ** MS-DOS doesn't allow more than one dot in the filename part.
+    ** If we have more than that, convert all the dots but the last into
+    ** underscores.  The OS will truncate excess characters beyond 8+3.
+    */
+	{
+	char *forwslash, *backslash, *base, *last_dot, *p;
+
+	/*
+	** Find the basename of [CS]file.  It begins after the
+	** rightmost slash, or after a colon of the drive letter,
+	** if there are no slashes in the pathname.
+	*/
+	base = Cfile[1] == ':' ? Cfile + 1 : Cfile;
+	/*
+	** Some environments might use mixed forward- and backslashes.
+	** We need the rightmost one of either gender.
+	*/
+	forwslash = strrchr (Cfile, '/');
+	backslash = strrchr (Cfile, '\\');
+	if (forwslash)
+	    base = forwslash;
+	if (backslash && backslash > base)
+	    base = backslash;
+	if (base != Cfile)
+	    base++;
+
+	/* Assume that COUNTSUFFIX and STATSUFFIX begin with a dot.  */
+	last_dot = Cfile + strlen (Cfile) - strlen (COUNTSUFFIX);
+	for (p = base; p < last_dot; p++)
+	    if (*p == '.')
+	        *p = '_';
+
+	last_dot = Sfile + strlen (Sfile) - strlen (STATSUFFIX);
+	for (p = Sfile + (base - Cfile); p < last_dot; p++)
+	    if (*p == '.')
+	        *p = '_';
+	}
+#else  /* not MSDOS */
+
     (void) sprintf (Cfile, "%s%s", Dfile, COUNTSUFFIX);
     (void) sprintf (Sfile, "%s%s", Dfile, STATSUFFIX);
 
+#endif /* MSDOS */
+
     if (stat (Dfile, &dstat) < 0)
 	{
 	(void) fprintf (stderr, BHASH_C_NO_DICT, Dfile);
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/config.x ispell-3.206/config.x
--- ispell-3.26t/config.x	Thu Jul 26 00:51:44 2001
+++ ispell-3.206/config.x	Sat Aug 11 11:24:48 2001
@@ -309,6 +309,10 @@
 ** one or the other of these.  If you select both, the setting of
 ** MASTERHASH will determine which becomes the language linked to
 ** DEFHASH (which will usually be named english.hash).
+**
+** On MSDOS systems you must use names which are consistent with the
+** 8+3 filename restrictions, or you will risk filename collision.  See
+** the file pc/local.djgpp for details.
 */
 #ifndef LANGUAGES
 #define LANGUAGES "{american,MASTERDICTS=american.med,HASHFILES=americanmed.hash,EXTRADICT=}"
@@ -370,6 +374,16 @@
 #endif
 
 /*
+** If your shell needs ": Use /bin/sh" at the first line of a shell
+** script, make the following variable the null string.  Otherwise
+** leave it as this sed script which will put a "#!/bin/sh" there.
+*/
+#ifndef MAKE_POUND_BANG
+#define MAKE_POUND_BANG "-e 1s,^:.*Use.*/bin/sh,#!/bin/sh,"
+#endif
+
+
+/*
 ** INSTALL program. Could be a copy program like cp or something fancier
 ** like /usr/ucb/install -c
 */
@@ -484,15 +498,51 @@
 ** Choose the proper type of regular-expression routines here.  BSD
 ** and public-domain systems have routines called re_comp and re_exec;
 ** System V uses regcmp and regex.
+**
+** REGCTYPE             is the type of a variable to hold the compiled regexp
+** REGCMP(re,str)	is the function which compiles a regexp in `str' into
+**		        a compiled regexp `re' declared as REGCTYPE and
+**			returns `re'.
+** REGEX(re,str,dummy)  is a function which matches `str' against a compiled
+**			regexp in `re' and returns a non-NULL pointer if it
+**			matches, NULL otherwise.
+** REGFREE(re)		is anything that should be done when the compiled
+**			regexp `re' is no longer needed.  It can be also used
+**			to allocate any structures required to compile a
+**			regexp, since it is called *before* compiling a new
+**			regexp (that's where we know that the old one will no
+**			longer be used).
+**
+** Here is one way of defining these if you have POSIX regexp functions:
+**
+**  #include <sys/types.h>
+**  #include <regex.h>
+**  #define REGCTYPE		regex_t *
+**  #define REGCMP(re,str)	(regcomp (re, str, 0), re)
+**  #define REGEX(re, str, dummy) \
+**    (re != 0 && regexec (re, str, 0, 0, 0) == 0 ? (char *)1 : NULL)
+**  #define REGFREE(re) \
+**    do { 							\
+**        if (re == 0)						\
+**          re = (regex_t *)calloc (1, sizeof (regex_t));	\
+**        else							\
+**          regfree(re);					\
+**    } while (0)
+**
 */
 #ifdef REGEX_LOOKUP
 #ifndef REGCMP
 #ifdef USG
-#define REGCMP(str)		regcmp (str, (char *) 0)
+#define REGCTYPE		char *
+#define REGCMP(re,str)		regcmp (str, (char *) 0)
 #define REGEX(re, str, dummy)	regex (re, str, dummy, dummy, dummy, dummy, \
 				    dummy, dummy, dummy, dummy, dummy, dummy)
+#define REGFREE(re)		do {if (re != NULL) free (re); re = NULL;} \
+				    while (0)
 #else /* USG */
-#define REGCMP(str)		re_comp (str)
+#define REGCTYPE		char *
+#define REGFREE(re)		(void)0
+#define REGCMP(re,str)		re_comp (str)
 #define REGEX(re, str, dummy)	re_exec (str)
 #endif /* USG */
 #endif /* REGCMP */
@@ -784,7 +834,7 @@
 #endif /* HTMLCHECK */
 
 /*
-** Variable used to override HTMLCHECKVAR
+** Variable used to override HTMLCHECK
 */
 #ifndef HTMLCHECKVAR
 #define HTMLCHECKVAR	"HTMLCHECK"
@@ -886,6 +936,19 @@
 #endif /* NO_STDLIB_H */
 
 /*
+** Not all systems have the same definitions for R_OK and W_OK
+** flags for calling `access'.  If the defaults below are not
+** good for your system, define different values on "local.h".
+** Usually, the system header <unistd.h> defines these.
+*/
+#ifndef R_OK
+#define R_OK 4
+#endif
+#ifndef W_OK
+#define W_OK 2
+#endif
+
+/*
 ** The following define is used by the ispell developer to help
 ** double-check the software.  Leave it undefined on other systems
 ** unless you are especially fond of warning messages, or are pursuing
@@ -902,7 +965,9 @@
 ** MS-DOS users should also define HAS_RENAME, above, if appropriate.
 **
 ** Define PIECEMEAL_HASH_WRITES if your system can't handle huge write
-** operations.  This is known to be a problem on some MS-DOS systems.
+** operations.  This is known to be a problem on MS-DOS systems when
+** a 16-bit compiler is used to compile Ispell (but not with DJGPP or
+** EMX).
 */
 #ifndef PIECEMEAL_HASH_WRITES
 #undef PIECEMEAL_HASH_WRITES
@@ -950,8 +1015,10 @@
 /*
 ** On MS-DOS systems, you can rename the following variables so that
 ** ispell's files have 3-character suffixes.  Note that, if you do
-** this, you will have to redefine any variable above that
-** incorporates one of the suffixes.
+** this, you will have to redefine any variable above that incorporates
+** one of the suffixes.  (Most MS-DOS environments will silently truncate
+** excess characters beyond the 8+3 limit, so you usually don't need to
+** change the suffixes just because they are longer than 3 characters.)
 */
 #ifndef HASHSUFFIX
 #define HASHSUFFIX	".hash"
@@ -962,3 +1029,11 @@
 #ifndef COUNTSUFFIX
 #define COUNTSUFFIX	".cnt"
 #endif /* COUNTSUFFIX */
+
+/*
+** MS-DOS and MS-Windows systems can use either '/' or '\\' for
+** a directory separator in file names.
+*/
+#ifndef IS_SLASH
+#define IS_SLASH(c)	((c) == '/')
+#endif
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/correct.c ispell-3.206/correct.c
--- ispell-3.26t/correct.c	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/correct.c	Sun Aug 12 14:16:38 2001
@@ -231,7 +231,7 @@ static void	save_root_cap P ((ichar_t * 
 		  struct flagent * sufent,
 		  ichar_t savearea[MAX_CAPS][INPUTWORDLEN + MAXAFFIXLEN],
 		  int * nsaved));
-static char *	getline P ((char * buf));
+static char *	getline P ((char * buf, int bufsize));
 void		askmode P ((void));
 void		copyout P ((unsigned char ** cc, int cnt));
 static void	lookharder P ((unsigned char * string));
@@ -255,35 +255,40 @@ void givehelp (interactive)
     else
 	helpout = stderr;
 
-    (void) fprintf (helpout, CORR_C_HELP_1);
-    (void) fprintf (helpout, CORR_C_HELP_2);
-    (void) fprintf (helpout, CORR_C_HELP_3);
-    (void) fprintf (helpout, CORR_C_HELP_4);
-    (void) fprintf (helpout, CORR_C_HELP_5);
-    (void) fprintf (helpout, CORR_C_HELP_6);
-    (void) fprintf (helpout, CORR_C_HELP_7);
-    (void) fprintf (helpout, CORR_C_HELP_8);
-    (void) fprintf (helpout, CORR_C_HELP_9);
-
-    (void) fprintf (helpout, CORR_C_HELP_COMMANDS);
-
-    (void) fprintf (helpout, CORR_C_HELP_R_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_BLANK);
-    (void) fprintf (helpout, CORR_C_HELP_A_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_I_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_U_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_0_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_L_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_X_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_Q_CMD);
-    (void) fprintf (helpout, CORR_C_HELP_BANG);
-    (void) fprintf (helpout, CORR_C_HELP_REDRAW);
-    (void) fprintf (helpout, CORR_C_HELP_SUSPEND);
-    (void) fprintf (helpout, CORR_C_HELP_HELP);
+    (void) fprintf (helpout, CORR_C_HELP_1, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_2, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_3, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_4, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_5, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_6, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_7, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_8, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_9, CORR_C_HELP_MAYBE_CR);
+
+    (void) fprintf (helpout, CORR_C_HELP_COMMANDS,
+		    CORR_C_HELP_MAYBE_CR, CORR_C_HELP_MAYBE_CR,
+		    CORR_C_HELP_MAYBE_CR);
+
+    (void) fprintf (helpout, CORR_C_HELP_R_CMD, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_BLANK, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_A_CMD, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_I_CMD, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_U_CMD, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_0_CMD, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_L_CMD, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_X_CMD,
+		    CORR_C_HELP_MAYBE_CR, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_Q_CMD,
+		    CORR_C_HELP_MAYBE_CR, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_BANG, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_REDRAW, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_SUSPEND, CORR_C_HELP_MAYBE_CR);
+    (void) fprintf (helpout, CORR_C_HELP_HELP, CORR_C_HELP_MAYBE_CR);
 
     if (interactive)
 	{
-	(void) fprintf (helpout, "\r\n\r\n");
+	(void) fprintf (helpout, "\r\n");
+	move (li - 1, 0);  /* bottom line, no matter what the screen size is */
 	(void) fprintf (helpout, CORR_C_HELP_TYPE_SPACE);
 	(void) fflush (helpout);
 #ifdef COMMANDFORSPACE
@@ -372,7 +377,8 @@ void checkfile ()
 	    {
 	    if (fread (contextbufs[0], 1, bufsize, sourcefile) != bufsize)
 		{
-		(void) fprintf (stderr, CORR_C_SHORT_SOURCE);
+		(void) fprintf (stderr, CORR_C_SHORT_SOURCE, MAYBE_CR);
+		(void) sleep ((unsigned) 2);
 		xflag = 0;		/* Preserve file backup */
 		break;
 		}
@@ -511,6 +517,8 @@ checkagain:
 		    {
 		    erase ();
 		    (void) fflush (stdout);
+		    if (tempfile[0] != '\0')
+			fclose (outfile); /* so `done' may unlink it safely */
 		    done (0);
 		    }
 		goto checkagain;
@@ -546,7 +554,7 @@ checkagain:
 
 		move (li - 1, 0);
 		(void) putchar ('!');
-		if (getline ((char *) buf) == NULL)
+		if (getline ((char *) buf, sizeof (buf)) == NULL)
 		    {
 		    (void) putchar (7);
 		    erase ();
@@ -571,7 +579,7 @@ checkagain:
 		    (void) printf ("%s ", CORR_C_READONLY);
 		    }
 		(void) printf (CORR_C_REPLACE_WITH);
-		if (getline ((char *) ctok) == NULL)
+		if (getline ((char *) ctok, ctokl) == NULL)
 		    {
 		    (void) putchar (7);
 		    /* Put it back */
@@ -639,7 +647,7 @@ checkagain:
 		unsigned char	buf[100];
 		move (li - 1, 0);
 		(void) printf (CORR_C_LOOKUP_PROMPT);
-		if (getline ((char *) buf) == NULL)
+		if (getline ((char *) buf, sizeof (buf)) == NULL)
 		    {
 		    (void) putchar (7);
 		    erase ();
@@ -1477,8 +1485,9 @@ static void save_root_cap (word, pattern
     return;
     }
 
-static char * getline (s)
+static char * getline (s, len)
     register char *	s;
+    register int	len;
     {
     register char *	p;
     register int	c;
@@ -1489,6 +1498,11 @@ static char * getline (s)
 	{
 	(void) fflush (stdout);
 	c = GETKEYSTROKE ();
+	/*
+	** Don't let them overflow the buffer.
+	*/
+	if (p >= s + len - 1)
+	    c = '\n';
 	if (c == '\\')
 	    {
 	    (void) putchar ('\\');
@@ -1548,7 +1562,7 @@ void askmode ()
 	{
 	if (freopen (askfilename, "w", stdout) == NULL)
 	    {
-	    (void) fprintf (stderr, CANT_CREATE, askfilename);
+	    (void) fprintf (stderr, CANT_CREATE, askfilename, "");
 	    exit (1);
 	    }
 	}
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/defmt.c ispell-3.206/defmt.c
--- ispell-3.26t/defmt.c	Thu Aug  2 01:17:08 2001
+++ ispell-3.206/defmt.c	Sat Aug 11 17:22:56 2001
@@ -417,7 +417,7 @@ static unsigned char * skiptoword (bufp)
 		    }
 		if (math_mode < 0)
 		    {
-		    (void) fprintf (stderr, DEFMT_C_TEX_MATH_ERROR);
+		    (void) fprintf (stderr, DEFMT_C_TEX_MATH_ERROR, MAYBE_CR);
 		    math_mode = 0;
 		    }
 		}
@@ -983,7 +983,7 @@ static int TeX_LR_check (begin_p, bufp)
 	    math_mode -= (math_mode & 127) * 128;
 	    if (math_mode < 0)
 		{
-		(void) fprintf (stderr, DEFMT_C_LR_MATH_ERROR);
+		(void) fprintf (stderr, DEFMT_C_LR_MATH_ERROR, MAYBE_CR);
 		math_mode = 1;
 		}
 	    }
@@ -1146,7 +1146,7 @@ static void TeX_skip_check (bufp)
  * header, but I doubt that it varies, and I don't want to change the
  * syntax of affix files right now.
  *
- * Incidentally, TeX_strncmp uses uneual signedness for its arguments
+ * Incidentally, TeX_strncmp uses unequal signedness for its arguments
  * because that's how it's always called, and it's easier to do one
  * typecast here than lots of casts in the calls.
  */
@@ -1236,7 +1236,7 @@ int init_keyword_table (rawtags, envvar,
     wlist = malloc (wsize);
     if (wlist == NULL)
 	{
-	(void) fprintf (stderr, DEFMT_C_NO_SPACE);
+	(void) fprintf (stderr, DEFMT_C_NO_SPACE, MAYBE_CR);
 	exit (1);
 	}
     wlist[0] = '\0';
@@ -1275,7 +1275,7 @@ int init_keyword_table (rawtags, envvar,
       (unsigned char **) malloc (keywords->numkw * sizeof keywords->kwlist[0]);
     if (keywords->kwlist == NULL)
 	{
-	fprintf (stderr, DEFMT_C_NO_SPACE);
+	fprintf (stderr, DEFMT_C_NO_SPACE, MAYBE_CR);
 	exit (1);
 	}
 
@@ -1318,7 +1318,7 @@ int init_keyword_table (rawtags, envvar,
 	  malloc ((maxkeywordlen + 1) * sizeof keywordbuf[0]);
 	if (keywordbuf == NULL)
 	    {
-	    fprintf (stderr, DEFMT_C_NO_SPACE);
+	    fprintf (stderr, DEFMT_C_NO_SPACE, MAYBE_CR);
 	    exit(1);
 	    }
 	}
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/deformatters/defmt-c.c ispell-3.206/deformatters/defmt-c.c
--- ispell-3.26t/deformatters/defmt-c.c	Thu Jul 26 00:51:48 2001
+++ ispell-3.206/deformatters/defmt-c.c	Sat Aug 11 19:00:06 2001
@@ -1,6 +1,6 @@
 #ifndef lint
 static char Rcs_Id[] =
-    "$Id: deformat-c.c,v 1.3 2001/07/25 21:51:48 geoff Exp $";
+    "$Id: defmt-c.c,v 1.3 2001/07/25 21:51:48 geoff Exp $";
 #endif
 
 /*
@@ -72,8 +72,19 @@ static char Rcs_Id[] =
  */
 
 #include <stdio.h>
+#ifndef NO_FCNTL_H
+#include <fcntl.h>
+#if defined(O_BINARY) && O_BINARY
+#include <io.h>
+#define SET_BINARY(fd) do {if(!isatty(fd)) setmode(fd, O_BINARY);} while(0)
+#else
+#define SET_BINARY(fd) (void)0
+#endif
+#endif
+
 
 int		main ();	/* Filter to select C/C++ comments */
+static int	igetchar ();	/* Read one character from stdin */
 static int	do_slashstar ();
 				/* Handle C-style comments */
 static int	do_slashslash ();
@@ -89,12 +100,21 @@ int main (argc, argv)
     {
     int		c;		/* Next character read from stdin */
 
-    while ((c = getchar ()) != EOF)
+    /*
+     * Since the deformatter needs to produce exactly one character
+     * of output for each character of input, we need to preserve
+     * the end-of-line format (Unix Newline or DOS CR-LF) of the
+     * input file.  This means we must do binary I/O.
+     */
+    SET_BINARY(fileno(stdin));
+    SET_BINARY(fileno(stdout));
+
+    while ((c = igetchar ()) != EOF)
 	{
 	if (c == '/')
 	    {
 	    putchar (' ');
-	    if ((c = getchar ()) == EOF)
+	    if ((c = igetchar ()) == EOF)
 		break;
 	    else if (c == '*')
 		{
@@ -119,8 +139,8 @@ int main (argc, argv)
 	    if (do_doublequote())
 		break;
 	    }
-	else if (c == '\n')
-	    putchar ('\n');
+	else if (c == '\n' || c == '\r')
+	    putchar (c);
 	else
 	    putchar (' ');
 	}
@@ -129,6 +149,19 @@ int main (argc, argv)
     }
 
 /*
+ * Like getchar, except on MSDOS, where it knows about ^Z.
+ */
+static int igetchar ()
+    {
+    int c = getchar ();
+#ifdef MSDOS
+    if (c == '\032')	/* ^Z is a kind of ``software EOF'' */
+	c = EOF;;
+#endif
+    return c;
+    }
+
+/*
  * Handle C-style comments, passing their contents through unchanged.
  */
 static int do_slashstar ()
@@ -137,13 +170,13 @@ static int do_slashstar ()
 
     putchar (' ');		/* Create blank to cover for the star */
 
-    while ((c = getchar ()) != EOF)
+    while ((c = igetchar ()) != EOF)
 	{
 	if (c != '*')
 	    putchar (c);
 	else
 	    {
-	    if ((c = getchar ()) == EOF)
+	    if ((c = igetchar ()) == EOF)
 		return 1;	/* EOF hit, caller must terminate loop */
 	    if (c == '/')
 		{
@@ -168,7 +201,7 @@ static int do_slashslash ()
 
     putchar (' ');		/* Create blank to cover for 2nd slash */
 
-    while ((c = getchar ()) != EOF)
+    while ((c = igetchar ()) != EOF)
 	{
 	putchar (c);
 	if (c == '\n')
@@ -188,14 +221,14 @@ static int do_singlequote ()
 
     putchar (' ');		/* Create blank to cover for the quote */
 
-    while ((c = getchar ()) != EOF)
+    while ((c = igetchar ()) != EOF)
 	{
 	putchar (' ');
 	if (c == '\'')
 	    return 0;		/* End of quotes, continue deformatting */
 	else if (c == '\\')
 	    {
-	    if ((c = getchar ()) == EOF)
+	    if ((c = igetchar ()) == EOF)
 		return 1;
 	    putchar (' ');
 	    }
@@ -213,7 +246,7 @@ static int do_doublequote ()
 
     putchar (' ');		/* Create blank to cover for the quote */
 
-    while ((c = getchar ()) != EOF)
+    while ((c = igetchar ()) != EOF)
 	{
 	if (c == '"')
 	    {
@@ -232,7 +265,7 @@ static int do_doublequote ()
 	     * your affix file.
 	     */
 	    putchar ('\\');
-	    if ((c = getchar ()) == EOF)
+	    if ((c = igetchar ()) == EOF)
 		return 1;
 	    putchar (c);
 	    }
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/deformatters/defmt-sh.c ispell-3.206/deformatters/defmt-sh.c
--- ispell-3.26t/deformatters/defmt-sh.c	Thu Jul 26 00:51:48 2001
+++ ispell-3.206/deformatters/defmt-sh.c	Sat Aug 11 19:00:22 2001
@@ -1,6 +1,6 @@
 #ifndef lint
 static char Rcs_Id[] =
-    "$Id: deformat-sh.c,v 1.4 2001/07/25 21:51:48 geoff Exp $";
+    "$Id: defmt-sh.c,v 1.4 2001/07/25 21:51:48 geoff Exp $";
 #endif
 
 /*
@@ -67,8 +67,18 @@ static char Rcs_Id[] =
  */
 
 #include <stdio.h>
+#ifndef NO_FCNTL_H
+#include <fcntl.h>
+#if defined(O_BINARY) && O_BINARY
+#include <io.h>
+#define SET_BINARY(fd) do {if(!isatty(fd)) setmode(fd, O_BINARY);} while(0)
+#else
+#define SET_BINARY(fd) (void)0
+#endif
+#endif
 
 int		main ();	/* Filter to select sh/bash comments */
+static int	igetchar ();	/* Read one character from stdin */
 static int	do_comment ();	/* Handle comments */
 static int	do_quote ();	/* Handle quoted strings */
 
@@ -78,15 +88,24 @@ int main (argc, argv)
     {
     int		c;		/* Next character read from stdin */
 
-    while ((c = getchar ()) != EOF)
+    /*
+     * Since the deformatter needs to produce exactly one character
+     * of output for each character of input, we need to preserve
+     * the end-of-line format (Unix Newline or DOS CR-LF) of the
+     * input file.  This means we must do binary I/O.
+     */
+    SET_BINARY(fileno(stdin));
+    SET_BINARY(fileno(stdout));
+
+    while ((c = igetchar ()) != EOF)
 	{
 	if (c == '\\')
 	    {
 	    putchar (' ');
-	    if ((c = getchar ()) == EOF)
+	    if ((c = igetchar ()) == EOF)
 		break;
-	    if (c == '\n')
-		putchar ('\n');
+	    if (c == '\n' || c == '\r')
+		putchar (c);
 	    else
 		putchar (' ');
 	    }
@@ -107,12 +126,12 @@ int main (argc, argv)
 	     * start.  So we skip the character immediately after the $.
 	     */
 	    putchar (' ');
-	    if ((c = getchar ()) == EOF)
+	    if ((c = igetchar ()) == EOF)
 		break;
 	    putchar (' ');
 	    }
-	else if (c == '\n')
-	    putchar ('\n');
+	else if (c == '\n' || c == '\r')
+	    putchar (c);
 	else
 	    putchar (' ');
 	}
@@ -121,6 +140,19 @@ int main (argc, argv)
     }
 
 /*
+ * Like getchar, except on MSDOS, where it knows about ^Z.
+ */
+static int igetchar ()
+    {
+    int c = getchar ();
+#ifdef MSDOS
+    if (c == '\032')	/* ^Z is a kind of ``software EOF'' */
+	c = EOF;;
+#endif
+    return c;
+    }
+
+/*
  * Handle shell comments, passing their contents through unchanged.
  */
 static int do_comment ()
@@ -129,7 +161,7 @@ static int do_comment ()
 
     putchar (' ');		/* Create blank to cover for pound sign */
 
-    while ((c = getchar ()) != EOF)
+    while ((c = igetchar ()) != EOF)
 	{
 	putchar (c);
 	if (c == '\n')
@@ -149,7 +181,7 @@ static int do_quote(qc)
 
     putchar (' ');		/* Create blank to cover for the quote */
 
-    while ((c = getchar ()) != EOF)
+    while ((c = igetchar ()) != EOF)
 	{
 	if (c == qc)
 	    {
@@ -168,7 +200,7 @@ static int do_quote(qc)
 	     * your affix file.
 	     */
 	    putchar ('\\');
-	    if ((c = getchar ()) == EOF)
+	    if ((c = igetchar ()) == EOF)
 		return 1;
 	    putchar (c);
 	    }
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/deformatters/Makefile ispell-3.206/deformatters/Makefile
--- ispell-3.26t/deformatters/Makefile	Thu Jul 26 00:51:48 2001
+++ ispell-3.206/deformatters/Makefile	Sat Aug 11 19:05:12 2001
@@ -60,10 +60,13 @@
 SHELL = /bin/sh
 MAKE = make
 
-PROGRAMS = deformat-c deformat-sh
+PROGRAMS = defmt-c defmt-sh
 
 all:	$(PROGRAMS)
 
+defmt-c: defmt-c.o
+defmt-sh: defmt-sh.o
+
 .c.o:
 	@. ../config.sh; \
 	  set -x; \
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/findaffix.x ispell-3.206/findaffis.x
--- ispell-3.26t/findaffix.x	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/findaffix.x	Sat Aug 11 10:24:54 2001
@@ -213,8 +213,8 @@ do
 	    ;;
     esac
 done
-trap "/bin/rm -f ${TMP}*; exit 1" 1 2 15
-trap "/bin/rm -f ${TMP}*; exit 0" 13
+trap "rm -f ${TMP}*; exit 1" 1 2 15
+trap "rm -f ${TMP}*; exit 0" 13
 #
 # We are ready to do the work.  First, we collect all input, translate it
 # to lowercase, sort it (dropping duplications), and save it for later.
@@ -304,4 +304,4 @@ join "-t$tabch" -o 1.2 2.2 2.3 ${TMP}a $
     else
 	exec cat
     fi
-/bin/rm -f ${TMP}?
+rm -f ${TMP}?
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/ispell.c ispell-3.206/ispell.c
--- ispell-3.26t/ispell.c	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/ispell.c	Sat Aug 11 17:13:56 2001
@@ -318,11 +318,39 @@ static void initckch (wchars)
 	}
     }
 
+/*
+** A trivial wrapper for rindex (file '/') on Unix, but
+** saves a lot of ifdef-ing on MS-DOS.
+*/
+char * last_slash (file)
+    char *file;
+    {
+    char *slash = rindex (file, '/');
+#ifdef MSDOS
+    /*
+    ** Can have a backslash or a colon; both mean the basename
+    ** begins right after them.
+    */
+    char *bs = rindex (file, '\\');
+
+    /*
+    ** We can have both forward- and backslashes; return the
+    ** place of rightmost one of either gender.
+    */
+    if (slash == NULL || (bs != NULL && bs > slash))
+	slash = bs;
+    if (slash == NULL && file[0] != '\0' && file[1] == ':')
+	slash = file + 1;
+#endif
+    return slash;
+    }
+
 int main (argc, argv)
     int		argc;
     char *	argv[];
     {
     char *	p;
+    char *	libvar = NULL;	/* stays NULL unless on MS-DOS */
     char *	cpd;
     char **	versionp;
     char *	wchars = NULL;
@@ -336,31 +364,110 @@ int main (argc, argv)
 
     Trynum = 0;
 
+#ifdef LIBRARYVAR
+    /*
+    ** Allow to give the dictionary directory through an
+    ** environment variable, in addition to the default LIBDIR.
+    */
+    libvar = getenv (LIBRARYVAR);
+    if (libvar != NULL)
+	(void) sprintf (hashname, "%s/%s", libvar, DEFHASH);
+#endif
+
     p = getenv ("DICTIONARY");
     if (p != NULL)
 	{
-	if (index (p, '/') != NULL)
+	if (last_slash (p) != NULL)
 	    (void) strcpy (hashname, p);
+	/*
+	** If LIBRARYVAR is defined, relative name means
+	** a file in that directory.
+	*/
+	else if (libvar != NULL)
+	    (void) sprintf (hashname, "%s/%s", libvar, p);
 	else
 	    (void) sprintf (hashname, "%s/%s", LIBDIR, p);
 	(void) strcpy (libdictname, p);
 	p = rindex (p, '.');
-	if (p == NULL  ||  strcmp (p, HASHSUFFIX) != 0)
+	if (p == NULL
+	    /*
+	    ** The dot to which p points might belong to a directory
+	    ** part of the dictionary's file name, in which case we
+	    ** always want to catenate .hash to hashname.
+	    */
+	  || last_slash (p) != NULL
+	  || strcmp (p, HASHSUFFIX) != 0)
 	    (void) strcat (hashname, HASHSUFFIX);
-	LibDict = rindex (libdictname, '/');
+	LibDict = last_slash (libdictname);
 	if (LibDict != NULL)
 	    LibDict++;
 	else
 	    LibDict = libdictname;
-	p = rindex (libdictname, '.');
+	p = rindex (LibDict, '.');
 	if (p != NULL)
 	    *p = '\0';
 	}
-    else
+    else if (libvar == NULL)	/* libvar might be non-NULL only on MS-DOS */
 	(void) sprintf (hashname, "%s/%s", LIBDIR, DEFHASH);
 
     cpd = NULL;
 
+#ifdef OPTIONVAR
+/*
+** 'OPTIONVAR' is an environment variable which holds default
+** options for ispell.  To allow for these options to be overridden
+** by the command-line arguments, we insert them in front of argv[].
+*/
+    if (getenv (OPTIONVAR))
+	{
+	register char *opt = getenv (OPTIONVAR);
+	char **newargv = NULL;
+	int maxargc = argc;
+	int newargc = 1;
+
+	while (*opt)
+	    {
+	    /*
+	    ** Allocate more space if needed.
+	    */
+	    if (newargc + argc >= maxargc)
+		{
+		char **new;
+
+		while (newargc + argc >= maxargc)
+		    maxargc += 100;
+		new = (char **) realloc (newargv, (maxargc+1)*sizeof(char *));
+		if (new == NULL)
+		    {
+		    (void) fprintf (stderr, ISPELL_C_NO_OPTIONS_SPACE);
+		    exit (-1);
+		    }
+		newargv = new;
+		}
+	    newargv[newargc++] = opt;
+	    /*
+	    ** FIXME: The following assumes that the options cannot
+	    ** include any whitespace.  Currently, no ispell option
+	    ** does, so this is OK.  For now.
+	    */
+	    while (*opt && !isspace (*opt))
+		opt++;
+	    if (*opt)
+		*opt++ = '\0';
+	    }
+
+	/*
+	** Copy the original command-line args after the default options.
+	*/
+	newargv[0] = *argv++;
+	while (--argc)
+	    newargv[newargc++] = *argv++;
+	newargv[newargc] = NULL;
+
+	argv = newargv;
+	argc = newargc;
+	}
+#endif /* OPTIONVAR */
     argv++;
     argc--;
     while (argc && **argv == '-')
@@ -457,6 +564,10 @@ int main (argc, argv)
 		    (void) printf ("\tLANGUAGES = \"%s\"\n", LANGUAGES);
 		    (void) printf ("\tLIBDIR = \"%s\"\n", LIBDIR);
 		    (void) printf ("\tLIBES = \"%s\"\n", LIBES);
+#ifdef LIBRARYVAR
+		    (void) printf ("\tENVIRONMENT VARIABLE NAME FOR\n");
+		    (void) printf ("\tLIBRARYVAR = \"%s\"\n", LIBRARYVAR);
+#endif /* LIBRARYVAR */
 		    (void) printf ("\tLINT = \"%s\"\n", LINT);
 		    (void) printf ("\tLINTFLAGS = \"%s\"\n", LINTFLAGS);
 #ifndef REGEX_LOOKUP
@@ -474,6 +585,12 @@ int main (argc, argv)
 		    (void) printf ("\tMASKTYPE_WIDTH = %d\n", MASKTYPE_WIDTH);
 		    (void) printf ("\tMASTERHASH = \"%s\"\n", MASTERHASH);
 		    (void) printf ("\tMAXAFFIXLEN = %d\n", MAXAFFIXLEN);
+#ifdef MAXBASENAMELEN
+		    (void) printf ("\tMAXBASENAMELEN = %d\n", MAXBASENAMELEN);
+#endif
+#ifdef MAXEXTLEN
+		    (void) printf ("\tMAXEXTLEN = %d\n", MAXEXTLEN);
+#endif
 		    (void) printf ("\tMAXCONTEXT = %d\n", MAXCONTEXT);
 		    (void) printf ("\tMAXINCLUDEFILES = %d\n",
 		      MAXINCLUDEFILES);
@@ -506,6 +623,10 @@ int main (argc, argv)
 		    (void) printf ("\tNRSPECIAL = \"%s\"\n", NRSPECIAL);
 		    (void) printf ("\tOLDPAFF = \"%s\"\n", OLDPAFF);
 		    (void) printf ("\tOLDPDICT = \"%s\"\n", OLDPDICT);
+#ifdef OPTIONVAR
+		    (void) printf ("\tENVIRONMENT VARIABLE NAME FOR\n");
+		    (void) printf ("\tOPTIONVAR = \"%s\"\n", OPTIONVAR);
+#endif /* OPTIONVAR */
 #ifdef PDICTHOME
 		    (void) printf ("\tPDICTHOME = \"%s\"\n", PDICTHOME);
 #else /* PDICTHOME */
@@ -774,8 +895,12 @@ int main (argc, argv)
 			usage ();
 		    p = *argv;
 		    }
-		if (index (p, '/') != NULL)
+		if (last_slash (p) != NULL)
 		    (void) strcpy (hashname, p);
+#ifdef LIBRARYVAR
+		else if (libvar != NULL)
+		    (void) sprintf (hashname, "%s/%s", libvar, p);
+#endif
 		else
 		    (void) sprintf (hashname, "%s/%s", LIBDIR, p);
 		if (cpd == NULL  &&  *p != '\0')
@@ -787,7 +912,7 @@ int main (argc, argv)
 		    (void) strcat (hashname, HASHSUFFIX);
 		if (LibDict != NULL)
 		    {
-		    p = rindex (LibDict, '/');
+		    p = last_slash (LibDict);
 		    if (p != NULL)
 			LibDict = p + 1;
 		    }
@@ -845,7 +970,7 @@ int main (argc, argv)
      */
     for (argno = 0;  argno < argc;  argno++)
 	{
-	if (access (argv[argno], 4) >= 0)
+	if (access (argv[argno], R_OK) >= 0)
 	    break;
 	}
     if (argno >= argc  &&  !lflag  &&  !aflag  &&  !eflag  &&  !dumpflag)
@@ -991,10 +1116,10 @@ static void dofile (filename)
 	return;
 	}
 
-    readonly = access (filename, 2) < 0;
+    readonly = access (filename, W_OK) < 0;
     if (readonly)
 	{
-	(void) fprintf (stderr, ISPELL_C_CANT_WRITE, filename);
+	(void) fprintf (stderr, ISPELL_C_CANT_WRITE, filename, MAYBE_CR);
 	(void) sleep ((unsigned) 2);
 	}
 
@@ -1006,7 +1131,28 @@ static void dofile (filename)
      * unfortunately isn't available anywhere).  In other words, don't
      * worry about the security of this hunk of code.
      */
-    (void) strcpy (tempfile, TEMPNAME);
+    if (last_slash (TEMPNAME) != NULL)
+	(void) strcpy (tempfile, TEMPNAME);
+    else
+	{
+	char *tmp = getenv ("TMPDIR");
+	int   lastchar;
+
+	if (tmp == NULL)
+	    tmp = getenv ("TEMP");
+	if (tmp == NULL)
+	    tmp = getenv ("TMP");
+	if (tmp == NULL)
+#ifdef P_tmpdir
+	    tmp = P_tmpdir;
+#else
+	    tmp = "/tmp";
+#endif
+	lastchar = tmp[strlen (tmp) - 1];
+	(void) sprintf (tempfile, "%s%s%s", tmp,
+			IS_SLASH (lastchar) ? "" : "/",
+			TEMPNAME);
+	}
 #ifdef NO_MKSTEMP
     if (mktemp (tempfile) == NULL  ||  tempfile[0] == '\0'
 #ifdef O_EXCL
@@ -1026,7 +1172,12 @@ static void dofile (filename)
 	(void) sleep ((unsigned) 2);
 	return;
 	}
+#ifndef MSDOS
+    /* This is usually a no-op on MS-DOS, but with file-sharing installed,
+       it was reported to produce empty spelled files!  Apparently, the
+       file-sharing module would close the file when `chmod' is called.  */
     (void) chmod (tempfile, statbuf.st_mode);
+#endif
 
     quit = 0;
     changes = 0;
@@ -1048,7 +1199,7 @@ static void dofile (filename)
  * Set up to externally deformat a file.
  *
  * If no deformatter is provided, we return either standard input (if
- * filename is NULL) or a the result of opening the specified file.
+ * filename is NULL) or the result of opening the specified file.
  *
  * If a deformatter is provided, but no filename is provided, we
  * assume that the input comes from stdin, and we set up the
@@ -1112,18 +1263,16 @@ static FILE * setupdefmt (filename)
 	if (sourcefile == NULL)
 	    return NULL;
 	savedstdin = dup (0);
-	close (0);
 	inputfd = open (filename, 0);
 	if (inputfd < 0)
 	    return NULL;		/* Failed to open the file */
-	else if (inputfd != 0)
+	else if (dup2 (inputfd, 0) != 0)
 	    {
 	    (void) fprintf (stderr, ISPELL_C_UNEXPECTED_FD, filename);
 	    exit (1);
 	    }
 	filteredfile = popen (defmtpgm, "r");
-	close (0);
-	if (dup (savedstdin) != 0)
+	if (dup2 (savedstdin, 0) != 0)
 	    {
 	    (void) fprintf (stderr, ISPELL_C_UNEXPECTED_FD, filename);
 	    exit (1);
@@ -1151,27 +1300,76 @@ static void update_file (filename, statb
 #ifdef TRUNCATEBAK
     (void) strncpy (bakfile, filename, sizeof bakfile - 1);
     bakfile[sizeof bakfile - 1] = '\0';
-    if (strcmp(BAKEXT, filename + strlen(filename) - sizeof BAKEXT - 1) != 0)
+    pathtail = last_slash (bakfile);
+    if (pathtail == NULL)
+	pathtail = bakfile;
+    else
+	pathtail++;
+    if (strcmp(BAKEXT, filename + strlen(filename) - sizeof (BAKEXT) + 1) != 0)
 	{
-	pathtail = rindex (bakfile, '/');
-	if (pathtail == NULL)
-	    pathtail = bakfile;
-	else
-	    pathtail++;
-	if (strlen (pathtail) > MAXNAMLEN - sizeof BAKEXT - 1)
-	    pathtail[MAXNAMLEN - sizeof BAKEXT -1] = '\0';
+	if (strlen (pathtail) > MAXNAMLEN - sizeof (BAKEXT) + 1)
+	    pathtail[MAXNAMLEN - sizeof (BAKEXT) + 1] = '\0';
 	(void) strcat (pathtail, BAKEXT);
 	}
 #else
     (void) sprintf (bakfile, "%.*s%s", (int) (sizeof bakfile - sizeof BAKEXT),
       filename, BAKEXT);
-#endif
-
-    pathtail = rindex (bakfile, '/');
+    pathtail = last_slash (bakfile);
     if (pathtail == NULL)
 	pathtail = bakfile;
     else
 	pathtail++;
+#endif
+
+
+#ifdef MSDOS
+    if (pathconf (filename, _PC_NAME_MAX) <= 12)
+	{
+	/*
+	** Excessive characters beyond 8+3 will be truncated by the
+	** OS.  Ensure the backup extension won't be truncated, and
+	** that we don't create an invalid filename (e.g., more than
+	** one dot).  Allow to use BAKEXT without a leading dot (such
+	** as "~").
+	*/
+	char *last_dot = rindex (pathtail, '.');
+
+	/*
+	** If no dot in backup filename, make BAKEXT be the extension.
+	** This ensures we don't truncate the name more than necessary.
+	*/
+	if (last_dot == NULL && strlen (pathtail) > MAXBASENAMELEN)
+	    {
+	    pathtail[MAXBASENAMELEN] = '.';
+	    /*
+	    ** BAKEXT cannot include a dot here (or we would have
+	    ** found it above, and last_dot would not be NULL).
+	    */
+	    strcpy (pathtail + MAXBASENAMELEN + 1, BAKEXT);
+	    }
+	else if (last_dot != NULL)
+	    {
+	    char *p = pathtail;
+	    size_t ext_len = strlen (last_dot);
+
+	    /* Convert all dots but the last to underscores. */
+	    while (p < last_dot && *p)
+		{
+		if (*p == '.')
+		    *p = '_';
+		p++;
+		}
+
+	    /* Make sure we preserve as much of BAKEXT as we can. */
+	    if (ext_len > MAXEXTLEN && ext_len > sizeof (BAKEXT) - 1)
+		strcpy (MAXEXTLEN <= sizeof (BAKEXT) - 1
+			? last_dot + 1
+			: last_dot + MAXEXTLEN - sizeof (BAKEXT) + 1,
+			BAKEXT);
+	    }
+	}
+#endif
+
     if (strncmp (filename, bakfile, pathtail - bakfile + MAXNAMLEN) != 0)
 	(void) unlink (bakfile);	/* unlink so we can write a new one. */
 #ifdef HAS_RENAME
@@ -1189,7 +1387,10 @@ static void update_file (filename, statb
 	return;
 	}
 
+#ifndef MSDOS
+    /* See the commentary where `chmod' is called above.  */
     (void) chmod (filename, statbuf->st_mode);
+#endif
 
     while ((c = getc (infile)) != EOF)
 	(void) putc (c, outfile);
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/languages/english/msgs.h ispell-3.206/languages/english/msgs.h
--- ispell-3.26t/languages/english/msgs.h	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/languages/english/msgs.h	Sat Aug 11 12:37:56 2001
@@ -128,13 +128,20 @@
  */
 
 /*
+ * Produce either a CR or an empty string, depending on whether
+ * stderr is a terminal device or not.  Used when the message
+ * could be printed to a redirected stream, to avoid the pesky ^M.
+ */
+#define MAYBE_CR	(isatty(fileno(stderr))?"\r":"")
+
+/*
  * The following strings are used in numerous places:
  */
-#define BAD_FLAG	"\r\nIllegal affix flag character '%c'\r\n"
-#define CANT_OPEN	"Can't open %s\r\n"
-#define CANT_CREATE	"Can't create %s\r\n"
-#define WORD_TOO_LONG(w) "\r\nWord '%s' too long at line %d of %s, truncated\r\n", \
-			  w, __LINE__, __FILE__
+#define BAD_FLAG	"%s\nIllegal affix flag character '%c'%s\n"
+#define CANT_OPEN	"Can't open %s%s\n"
+#define CANT_CREATE	"Can't create %s%s\n"
+#define WORD_TOO_LONG(w) "%s\nWord '%s' too long at line %d of %s, truncated%s\n", \
+			  MAYBE_CR, w, __LINE__, __FILE__, MAYBE_CR
 
 /*
  * The following strings are used in buildhash.c:
@@ -161,30 +168,31 @@
 /*
  * The following strings are used in correct.c:
  */
-#define CORR_C_HELP_1		"Whenever a word is found that is not in the dictionary,\r\n"
-#define CORR_C_HELP_2		"it is printed on the first line of the screen.  If the dictionary\r\n"
-#define CORR_C_HELP_3		"contains any similar words, they are listed with a number\r\n"
-#define CORR_C_HELP_4		"next to each one.  You have the option of replacing the word\r\n"
-#define CORR_C_HELP_5		"completely, or choosing one of the suggested words.\r\n"
+#define CORR_C_HELP_MAYBE_CR	(isatty(fileno(helpout))?"\r":"")
+#define CORR_C_HELP_1		"Whenever a word is found that is not in the dictionary,%s\n"
+#define CORR_C_HELP_2		"it is printed on the first line of the screen.  If the dictionary%s\n"
+#define CORR_C_HELP_3		"contains any similar words, they are listed with a number%s\n"
+#define CORR_C_HELP_4		"next to each one.  You have the option of replacing the word%s\n"
+#define CORR_C_HELP_5		"completely, or choosing one of the suggested words.%s\n"
     /* You may add HELP_6 through HELP_9 if your language needs more lines */
 #define CORR_C_HELP_6		""
 #define CORR_C_HELP_7		""
 #define CORR_C_HELP_8		""
 #define CORR_C_HELP_9		""
-#define CORR_C_HELP_COMMANDS	"\r\nCommands are:\r\n\r\n"
-#define CORR_C_HELP_R_CMD	"R       Replace the misspelled word completely.\r\n"
-#define CORR_C_HELP_BLANK	"Space   Accept the word this time only.\r\n"
-#define CORR_C_HELP_A_CMD	"A       Accept the word for the rest of this session.\r\n"
-#define CORR_C_HELP_I_CMD	"I       Accept the word, and put it in your private dictionary.\r\n"
-#define CORR_C_HELP_U_CMD	"U       Accept and add lowercase version to private dictionary.\r\n"
-#define CORR_C_HELP_0_CMD	"0-n     Replace with one of the suggested words.\r\n"
-#define CORR_C_HELP_L_CMD	"L       Look up words in system dictionary.\r\n"
-#define CORR_C_HELP_X_CMD	"X       Write the rest of this file, ignoring misspellings,\r\n        and start next file.\r\n"
-#define CORR_C_HELP_Q_CMD	"Q       Quit immediately.  Asks for confirmation.\r\n        Leaves file unchanged.\r\n"
-#define CORR_C_HELP_BANG	"!       Shell escape.\r\n"
-#define CORR_C_HELP_REDRAW	"^L      Redraw screen.\r\n"
-#define CORR_C_HELP_SUSPEND	"^Z      Suspend program.\r\n"
-#define CORR_C_HELP_HELP	"?       Show this help screen.\r\n"
+#define CORR_C_HELP_COMMANDS	"%s\nCommands are:%s\n%s\n"
+#define CORR_C_HELP_R_CMD	"R       Replace the misspelled word completely.%s\n"
+#define CORR_C_HELP_BLANK	"Space   Accept the word this time only.%s\n"
+#define CORR_C_HELP_A_CMD	"A       Accept the word for the rest of this session.%s\n"
+#define CORR_C_HELP_I_CMD	"I       Accept the word, and put it in your private dictionary.%s\n"
+#define CORR_C_HELP_U_CMD	"U       Accept and add lowercase version to private dictionary.%s\n"
+#define CORR_C_HELP_0_CMD	"0-n     Replace with one of the suggested words.%s\n"
+#define CORR_C_HELP_L_CMD	"L       Look up words in system dictionary.%s\n"
+#define CORR_C_HELP_X_CMD	"X       Write the rest of this file, ignoring misspellings,%s\n        and start next file.%s\n"
+#define CORR_C_HELP_Q_CMD	"Q       Quit immediately.  Asks for confirmation.%s\n        Leaves file unchanged.%s\n"
+#define CORR_C_HELP_BANG	"!       Shell escape.%s\n"
+#define CORR_C_HELP_REDRAW	"^L      Redraw screen.%s\n"
+#define CORR_C_HELP_SUSPEND	"^Z      Suspend program.%s\n"
+#define CORR_C_HELP_HELP	"?       Show this help screen.%s\n"
 #define CORR_C_HELP_TYPE_SPACE	"-- Type space to continue --"
 
 #define CORR_C_FILE_LABEL	"              File: %s"
@@ -196,14 +204,14 @@
 #define CORR_C_MORE_PROMPT	"-- more --"
 #define CORR_C_BLANK_MORE	"\r           \r"
 #define CORR_C_END_LOOK		"--end--"
-#define CORR_C_SHORT_SOURCE	"ispell:  unexpected EOF on unfiltered version of input\r\n"
+#define CORR_C_SHORT_SOURCE	"ispell:  unexpected EOF on unfiltered version of input%s\n"
 
 /*
  * The following strings are used in defmt.c:
  */
-#define DEFMT_C_TEX_MATH_ERROR	"***ERROR in parsing TeX math mode!\r\n"
-#define DEFMT_C_LR_MATH_ERROR	"***ERROR in LR to math-mode switch.\r\n"
-#define DEFMT_C_NO_SPACE	"Ran out of space building keyword list\r\n"
+#define DEFMT_C_TEX_MATH_ERROR	"***ERROR in parsing TeX math mode!%s\n"
+#define DEFMT_C_LR_MATH_ERROR	"***ERROR in LR to math-mode switch.%s\n"
+#define DEFMT_C_NO_SPACE	"Ran out of space building keyword list%s\n"
 
 /*
  * The following strings are used in icombine.c:
@@ -225,41 +233,42 @@
 #define ISPELL_C_USAGE5		"       %s [-dfile] [-wchars] -e[1-4]\n"
 #define ISPELL_C_USAGE6		"       %s [-dfile] [-wchars] -D\n"
 #define ISPELL_C_USAGE7		"       %s -v\n"
-#define ISPELL_C_TEMP_DISAPPEARED "temporary file disappeared (%s)\r\n"
+#define ISPELL_C_TEMP_DISAPPEARED "temporary file disappeared (%s)%s\n"
 #define ISPELL_C_BAD_TYPE	"ispell:  unrecognized formatter type '%s'\n"
 #define ISPELL_C_NO_FILE	"ispell:  specified file does not exist\n"
 #define ISPELL_C_NO_FILES	"ispell:  specified files do not exist\n"
-#define ISPELL_C_CANT_WRITE	"Warning:  Can't write to %s\r\n"
+#define ISPELL_C_CANT_WRITE	"Warning:  Can't write to %s%s\n"
 #define ISPELL_C_OPTIONS_ARE	"Compiled-in options:\n"
-#define ISPELL_C_UNEXPECTED_FD	"ispell:  unexpected fd while opening '%s'\r\n"
+#define ISPELL_C_UNEXPECTED_FD	"ispell:  unexpected fd while opening '%s'%s\n"
+#define ISPELL_C_NO_OPTIONS_SPACE "ispell: no memory to read default options\n"
 
 /*
  * The following strings are used in lookup.c:
  */
-#define LOOKUP_C_CANT_READ	"Trouble reading hash table %s\r\n"
-#define LOOKUP_C_NULL_HASH	"Null hash table %s\r\n"
+#define LOOKUP_C_CANT_READ	"Trouble reading hash table %s%s\n"
+#define LOOKUP_C_NULL_HASH	"Null hash table %s%s\n"
 #define LOOKUP_C_SHORT_HASH(name, gotten, wanted) \
-				"Truncated hash table %s:  got %d bytes, expected %d\r\n", \
+				"Truncated hash table %s:  got %d bytes, expected %d%s\n", \
 				  name, gotten, wanted
 #define LOOKUP_C_BAD_MAGIC(name, wanted, gotten) \
-				"Illegal format hash table %s - expected magic 0x%x, got 0x%x\r\n", \
+				"Illegal format hash table %s - expected magic 0x%x, got 0x%x%s\n", \
 				  name, wanted, gotten
 #define LOOKUP_C_BAD_MAGIC2(name, wanted, gotten) \
-				"Illegal format hash table %s - expected magic2 0x%x, got 0x%x\r\n", \
+				"Illegal format hash table %s - expected magic2 0x%x, got 0x%x%s\n", \
 				  name, wanted, gotten
 #define LOOKUP_C_BAD_OPTIONS(gotopts, gotchars, gotlen, wantedopts, wantedchars, wantedlen) \
-				"Hash table options don't agree with buildhash - 0x%x/%d/%d vs. 0x%x/%d/%d\r\n", \
+				"Hash table options don't agree with buildhash - 0x%x/%d/%d vs. 0x%x/%d/%d%s\n", \
 				  gotopts, gotchars, gotlen, \
 				  wantedopts, wantedchars, wantedlen
-#define LOOKUP_C_NO_HASH_SPACE	"Couldn't allocate space for hash table\r\n"
-#define LOOKUP_C_BAD_FORMAT	"Illegal format hash table\r\n"
-#define LOOKUP_C_NO_LANG_SPACE	"Couldn't allocate space for language tables\r\n"
+#define LOOKUP_C_NO_HASH_SPACE	"Couldn't allocate space for hash table%s\n"
+#define LOOKUP_C_BAD_FORMAT	"Illegal format hash table%s\n"
+#define LOOKUP_C_NO_LANG_SPACE	"Couldn't allocate space for language tables%s\n"
 
 /*
  * The following strings are used in makedent.c:
  */
-#define MAKEDENT_C_NO_WORD_SPACE "\r\nCouldn't allocate space for word '%s'\r\n"
-#define MAKEDENT_C_BAD_WORD_CHAR "\r\nWord '%s' contains illegal characters\r\n"
+#define MAKEDENT_C_NO_WORD_SPACE "%s\nCouldn't allocate space for word '%s'%s\n"
+#define MAKEDENT_C_BAD_WORD_CHAR "%s\nWord '%s' contains illegal characters%s\n"
 
 /*
  * The following strings are used in parse.y:
@@ -296,7 +305,7 @@
  */
 #define TERM_C_SMALL_SCREEN	"Screen too small:  need at least %d lines\n"
 #define TERM_C_NO_BATCH		"Can't deal with non-interactive use yet.\n"
-#define TERM_C_CANT_FORK	"Couldn't fork, try later.\r\n"
+#define TERM_C_CANT_FORK	"Couldn't fork, try later.%s\n"
 #define TERM_C_TYPE_SPACE	"\n-- Type space to continue --"
 
 /*
@@ -307,9 +316,9 @@
 /*
  * The following strings are used in tree.c:
  */
-#define TREE_C_CANT_UPDATE	"Warning: Cannot update personal dictionary (%s)\r\n"
-#define TREE_C_NO_SPACE		"Ran out of space for personal dictionary\r\n"
-#define TREE_C_TRY_ANYWAY	"Continuing anyway (with reduced performance).\r\n"
+#define TREE_C_CANT_UPDATE	"Warning: Cannot update personal dictionary (%s)%s\n"
+#define TREE_C_NO_SPACE		"Ran out of space for personal dictionary%s\n"
+#define TREE_C_TRY_ANYWAY	"Continuing anyway (with reduced performance).%s\n"
 
 /*
  * The following strings are used in unsq.c:
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/lookup.c ispell-3.206/lookup.c
--- ispell-3.26t/lookup.c	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/lookup.c	Sat Aug 11 17:28:30 2001
@@ -113,7 +113,7 @@ int linit ()
 
     if ((hashfd = open (hashname, 0 | MSDOS_BINARY_OPEN)) < 0)
 	{
-	(void) fprintf (stderr, CANT_OPEN, hashname);
+	(void) fprintf (stderr, CANT_OPEN, hashname, MAYBE_CR);
 	return (-1);
 	}
 
@@ -121,13 +121,13 @@ int linit ()
     if (hashsize < sizeof hashheader)
 	{
 	if (hashsize == (unsigned int) -1)
-	    (void) fprintf (stderr, LOOKUP_C_CANT_READ, hashname);
+	    (void) fprintf (stderr, LOOKUP_C_CANT_READ, hashname, MAYBE_CR);
 	else if (hashsize == 0)
-	    (void) fprintf (stderr, LOOKUP_C_NULL_HASH, hashname);
+	    (void) fprintf (stderr, LOOKUP_C_NULL_HASH, hashname, MAYBE_CR);
 	else
 	    (void) fprintf (stderr,
 	      LOOKUP_C_SHORT_HASH (hashname, hashsize,
-	        (int) sizeof hashheader));
+	        (int) sizeof hashheader), MAYBE_CR);
 	return (-1);
 	}
     else if (hashheader.magic != MAGIC)
@@ -141,7 +141,7 @@ int linit ()
 	{
 	(void) fprintf (stderr,
 	  LOOKUP_C_BAD_MAGIC2 (hashname, (unsigned int) MAGIC,
-	    (unsigned int) hashheader.magic2));
+	    (unsigned int) hashheader.magic2), MAYBE_CR);
 	return (-1);
 	}
     else if (hashheader.compileoptions != COMPILEOPTIONS
@@ -151,7 +151,8 @@ int linit ()
 	(void) fprintf (stderr,
 	  LOOKUP_C_BAD_OPTIONS ((unsigned int) hashheader.compileoptions,
 	    hashheader.maxstringchars, hashheader.maxstringcharlen,
-	    (unsigned int) COMPILEOPTIONS, MAXSTRINGCHARS, MAXSTRINGCHARLEN));
+	    (unsigned int) COMPILEOPTIONS, MAXSTRINGCHARS, MAXSTRINGCHARLEN),
+	    MAYBE_CR);
 	return (-1);
 	}
     if (nodictflag)
@@ -167,7 +168,7 @@ int linit ()
 	hashtbl = (struct dent *) calloc (1, sizeof (struct dent));
 	if (hashtbl == NULL)
 	    {
-	    (void) fprintf (stderr, LOOKUP_C_NO_HASH_SPACE);
+	    (void) fprintf (stderr, LOOKUP_C_NO_HASH_SPACE, MAYBE_CR);
 	    return (-1);
 	    }
 	hashtbl[0].word = NULL;
@@ -192,7 +193,7 @@ int linit ()
       malloc ((numsflags + numpflags) * sizeof (struct flagent));
     if (hashtbl == NULL  ||  hashstrings == NULL  ||  sflaglist == NULL)
 	{
-	(void) fprintf (stderr, LOOKUP_C_NO_HASH_SPACE);
+	(void) fprintf (stderr, LOOKUP_C_NO_HASH_SPACE, MAYBE_CR);
 	return (-1);
 	}
     pflaglist = sflaglist + numsflags;
@@ -207,7 +208,7 @@ int linit ()
 	if (read (hashfd, hashstrings, (unsigned) hashheader.lstringsize)
 	  != (int) hashheader.lstringsize)
 	    {
-	    (void) fprintf (stderr, LOOKUP_C_BAD_FORMAT);
+	    (void) fprintf (stderr, LOOKUP_C_BAD_FORMAT, MAYBE_CR);
 	    return (-1);
 	    }
 	(void) lseek (hashfd,
@@ -223,7 +224,7 @@ int linit ()
 	      (unsigned) hashheader.tblsize * sizeof (struct dent))
 	    != (int) (hashheader.tblsize * sizeof (struct dent)))
 	    {
-	    (void) fprintf (stderr, LOOKUP_C_BAD_FORMAT);
+	    (void) fprintf (stderr, LOOKUP_C_BAD_FORMAT, MAYBE_CR);
 	    return (-1);
 	    }
 	}
@@ -231,7 +232,7 @@ int linit ()
 	(unsigned) (numsflags + numpflags) * sizeof (struct flagent))
       != (numsflags + numpflags) * sizeof (struct flagent))
 	{
-	(void) fprintf (stderr, LOOKUP_C_BAD_FORMAT);
+	(void) fprintf (stderr, LOOKUP_C_BAD_FORMAT, MAYBE_CR);
 	return (-1);
 	}
     (void) close (hashfd);
@@ -319,7 +320,7 @@ int linit ()
 		  sizeof (struct flagptr));
 	    if (ind->pu.fp == NULL)
 		{
-		(void) fprintf (stderr, LOOKUP_C_NO_LANG_SPACE);
+		(void) fprintf (stderr, LOOKUP_C_NO_LANG_SPACE, MAYBE_CR);
 		return (-1);
 		}
 	    ind->numents = 0;
@@ -381,7 +382,7 @@ int linit ()
 	        sizeof (struct flagptr));
 	    if (ind->pu.fp == NULL)
 		{
-		(void) fprintf (stderr, LOOKUP_C_NO_LANG_SPACE);
+		(void) fprintf (stderr, LOOKUP_C_NO_LANG_SPACE, MAYBE_CR);
 		return (-1);
 		}
 	    ind->numents = 0;
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/makedent.c ispell-3.206/makedent.c
--- ispell-3.26t/makedent.c	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/makedent.c	Sat Aug 11 17:33:16 2001
@@ -199,7 +199,7 @@ int makedent (lbuf, lbuflen, d)
 	      ||  ip == ibuf  ||  ip[1] == 0)
 		{
 		(void) fprintf (stderr, MAKEDENT_C_BAD_WORD_CHAR,
-		  (char *) lbuf);
+		  MAYBE_CR, (char *) lbuf, MAYBE_CR);
 		return -1;
 		}
 	    }
@@ -220,7 +220,8 @@ int makedent (lbuf, lbuflen, d)
     d->word = mymalloc ((unsigned) len + 1);
     if (d->word == NULL)
 	{
-	(void) fprintf (stderr, MAKEDENT_C_NO_WORD_SPACE, (char *) lbuf);
+	(void) fprintf (stderr, MAKEDENT_C_NO_WORD_SPACE,
+			MAYBE_CR, (char *) lbuf, MAYBE_CR);
 	return -1;
 	}
 
@@ -237,7 +238,8 @@ int makedent (lbuf, lbuflen, d)
 	if (bit >= 0  &&  bit <= LARGESTFLAG)
 	    SETMASKBIT (d->mask, bit);
 	else if (!aflag)
-	    (void) fprintf (stderr, BAD_FLAG, (unsigned char) *p);
+	    (void) fprintf (stderr, BAD_FLAG,
+	      MAYBE_CR, (unsigned char) *p, MAYBE_CR);
 	p++;
 	if (*p == hashheader.flagmarker)
 	    p++;		/* Handle old-format dictionaries too */
@@ -313,7 +315,8 @@ int addvheader (dp)
     tdent = (struct dent *) mymalloc (sizeof (struct dent));
     if (tdent == NULL)
 	{
-	(void) fprintf (stderr, MAKEDENT_C_NO_WORD_SPACE, (char *) dp->word);
+	(void) fprintf (stderr, MAKEDENT_C_NO_WORD_SPACE,
+	  MAYBE_CR, (char *) dp->word, MAYBE_CR);
 	return -1;
 	}
     *tdent = *dp;
@@ -327,7 +330,7 @@ int addvheader (dp)
 	if (tdent->word == NULL)
 	    {
 	    (void) fprintf (stderr, MAKEDENT_C_NO_WORD_SPACE,
-	      (char *) dp->word);
+	      MAYBE_CR, (char *) dp->word, MAYBE_CR);
 	    myfree ((char *) tdent);
 	    return -1;
 	    }
@@ -446,7 +449,7 @@ int combinecaps (hdrp, newp)
 	if (tdent == NULL)
 	    {
 	    (void) fprintf (stderr, MAKEDENT_C_NO_WORD_SPACE,
-	      (char *) newp->word);
+	      MAYBE_CR, (char *) newp->word, MAYBE_CR);
 	    return -1;
 	    }
 	*tdent = *newp;
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/makefile ispell-3.206/makefile
--- ispell-3.26t/Makefile	Thu Jul 26 00:51:44 2001
+++ ispell-3.206/Makefile	Sun Aug 12 11:54:06 2001
@@ -208,14 +208,14 @@ MAKE = make
 SHELLDEBUG = +vx
 
 all:	config.sh
-all:	programs deformatter-programs showversion ispell.1
+all:	programs defmt-programs showversion ispell.1
 all:	all-languages
 
 programs: buildhash findaffix tryaffix ispell
 programs: icombine ijoin munchlist
 programs: subset zapdups
 
-deformatter-programs:
+defmt-programs:
 	cd deformatters; $(MAKE) all
 
 showversion:	ispell
@@ -230,9 +230,10 @@ showversion:	ispell
 	@. ./config.sh; \
 	  set -x; \
 	  $$YACC $<; \
-	  $$CC $$CFLAGS -c y.tab.c; \
-	  mv y.tab.o $@; \
-	  rm -f y.tab.c
+	  [ -f y_tab.c ] || mv y.tab.c y_tab.c; \
+	  $$CC $$CFLAGS -c y_tab.c; \
+	  mv y_tab.o $@; \
+	  rm -f y_tab.c
 
 all-languages:	munchable
 	$(MAKE) LANGUAGE_TARGET=all SHELLDEBUG=$(SHELLDEBUG) language-subdirs
@@ -405,7 +412,7 @@ config.sh:  config.X local.h
 	  LANGUAGES LIBDIR LIBES LINT LINTFLAGS \
 	  MAKE_SORTTMP MAN1DIR MAN1EXT MAN4DIR MAN4EXT MASTERHASH \
 	  MSGLANG REGLIB STATSUFFIX \
-	  TERMLIB YACC \
+	  TERMLIB YACC MAKE_POUND_BANG \
 	  ; do \
 	    cat config.X local.h \
 	      | sed -n -e "s/^#define[ 	]*$$var[ 	]*"'"'"/$$var=/p" \
@@ -423,6 +430,7 @@ doedit:
 	    -e "s@!!COUNTSUFFIX!!@$$COUNTSUFFIX@g" \
 	    -e "s@!!HASHSUFFIX!!@$$HASHSUFFIX@g" \
 	    -e "s@!!STATSUFFIX!!@$$STATSUFFIX@g" \
+	    $$MAKE_POUND_BANG \
 	    $$SORTTMP < $(EDITFILE) > $(OUTFILE)
 
 findaffix:	findaffix.X config.sh
@@ -520,10 +533,11 @@ lint:	config.sh config.h ispell.h proto.
 	  $$LINT $$LINTFLAGS ispell.c correct.c defmt.c dump.c good.c \
 	    hash.c lookup.c makedent.c tgood.c term.c tree.c xgets.c; \
 	  $$YACC parse.y; \
-	  $$LINT $$LINTFLAGS buildhash.c hash.c makedent.c y.tab.c; \
-	  $$LINT $$LINTFLAGS icombine.c makedent.c y.tab.c; \
+	  [ -f y_tab.c ] || mv y.tab.c y_tab.c; \
+	  $$LINT $$LINTFLAGS buildhash.c hash.c makedent.c y_tab.c; \
+	  $$LINT $$LINTFLAGS icombine.c makedent.c y_tab.c; \
 	  $$LINT $$LINTFLAGS ijoin.c fields.c
-	@rm -f y.tab.c
+	@rm -f y_tab.c
 
 clean:	config.sh clean-deformatters clean-languages
 	@. ./config.sh; \
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/munchlist.x ispell-3.206/munchlist.x
--- ispell-3.26t/munchlist.x	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/munchlist.x	Sat Aug 11 13:19:14 2001
@@ -153,15 +153,24 @@
 # Get rid of all old RCS log lines in preparation for the 3.1 release.
 #
 #
+TDIR1=${TMPDIR-/tmp}
 if [ "X$MUNCHMAIL" != X ]
 then
-    exec 2> /tmp/munchlist.mail
+    exec 2> ${TDIR1}/munchlist.mail
     echo "munchlist $*" 1>&2
     set -vx
 fi
 LIBDIR=!!LIBDIR!!
 TDIR=${TMPDIR-/usr/tmp}
 TMP=${TDIR}/munch$$
+if [ -z "$COMSPEC$ComSpec" ]
+then
+    EXE=""
+    BIN="/bin/"
+else
+    EXE=".exe"
+    BIN=""
+fi
 SORTTMP="-T ${TDIR}"			# !!SORTTMP!!
 
 #
@@ -182,39 +191,39 @@ case "$0" in
 	bindir='.'
 	;;
 esac
-if [ -r $bindir/buildhash ]
+if [ -r $bindir/buildhash$EXE ]
 then
-    BUILDHASH=$bindir/buildhash
-elif [ -r ./buildhash ]
+    BUILDHASH=$bindir/buildhash$EXE
+elif [ -r ./buildhash$EXE ]
 then
-    BUILDHASH=./buildhash
+    BUILDHASH=./buildhash$EXE
 else
     BUILDHASH=buildhash
 fi
-if [ -r $bindir/icombine ]
+if [ -r $bindir/icombine$EXE ]
 then
-    COMBINE=$bindir/icombine
-elif [ -r ./icombine ]
+    COMBINE=$bindir/icombine$EXE
+elif [ -r ./icombine$EXE ]
 then
-    COMBINE=./icombine
+    COMBINE=./icombine$EXE
 else
     COMBINE=icombine
 fi
-if [ -r $bindir/ijoin ]
+if [ -r $bindir/ijoin$EXE ]
 then
-    JOIN=$bindir/ijoin
-elif [ -r ./ijoin ]
+    JOIN=$bindir/ijoin$EXE
+elif [ -r ./ijoin$EXE ]
 then
-    JOIN=./ijoin
+    JOIN=./ijoin$EXE
 else
     JOIN=ijoin
 fi
-if [ -r $bindir/ispell ]
+if [ -r $bindir/ispell$EXE ]
 then
-    ISPELL=$bindir/ispell
-elif [ -r ./ispell ]
+    ISPELL=$bindir/ispell$EXE
+elif [ -r ./ispell$EXE ]
 then
-    ISPELL=./ispell
+    ISPELL=./ispell$EXE
 else
     ISPELL=ispell
 fi
@@ -318,7 +327,7 @@ then
     verbose=true
     debug=yes
 fi
-trap "/bin/rm -f ${TMP}*; exit 1" 1 2 13 15
+trap "${BIN}rm -f ${TMP}*; exit 1" 1 2 13 15
 #
 # Names of temporary files.  This is just to make the code a little easier
 # to read.
@@ -381,7 +390,7 @@ case "X$convtabs" in
 esac
 echo 'QQQQQQQQ' > $FAKEDICT
 $BUILDHASH -s $FAKEDICT $convtabs $FAKEHASH \
-  ||  (echo "Couldn't create fake hash file" 1>&2; /bin/rm -f ${TMP}*; exit 1) \
+  ||  (echo "Couldn't create fake hash file" 1>&2; ${BIN}rm -f ${TMP}*; exit 1) \
   ||  exit 1
 #
 # Figure out how 'sort' sorts signed fields, for arguments to ijoin.
@@ -435,11 +444,11 @@ case "$convtabs" in
     *)
 	$BUILDHASH -s $FAKEDICT $langtabs $FAKEHASH \
 	  ||  (echo "Couldn't create fake hash file" 1>&2; \
-		/bin/rm -f ${TMP}*; exit 1) \
+		${BIN}rm -f ${TMP}*; exit 1) \
 	  ||  exit 1
 	;;
 esac
-/bin/rm -f ${FAKEDICT}*
+${BIN}rm -f ${FAKEDICT}*
 #
 # If the -s (strip) option was specified, remove all
 # expanded words that are covered by the dictionary.  This produces
@@ -533,9 +542,9 @@ sort $SORTTMP -o $CRUNCHEDINPUT $CRUNCHE
 
 $verbose  &&  echo 'Creating list of legal roots/flags.' 1>&2
 comm -13 $JOINEDPAIRS $EXPANDEDPAIRS \
-  | (sed -e 's; .*$;;' ; /bin/rm -f $JOINEDPAIRS $EXPANDEDPAIRS) \
+  | (sed -e 's; .*$;;' ; ${BIN}rm -f $JOINEDPAIRS $EXPANDEDPAIRS) \
   | uniq \
-  | (comm -13 - $CRUNCHEDINPUT ; /bin/rm -f $CRUNCHEDINPUT) \
+  | (comm -13 - $CRUNCHEDINPUT ; ${BIN}rm -f $CRUNCHEDINPUT) \
   | sort $SORTTMP -u "-t$flagmarker" +0f -1 +0 \
   | $COMBINE $langtabs > $LEGALFLAGLIST
 
@@ -725,25 +734,25 @@ ENDOFAWKSCRIPT
 	awk "-F$flagmarker" -f $AWKSCRIPT $CROSSILLEGAL > $CROSSROOTS
 	if [ "$debug" = yes ]
 	then
-	    /bin/rm -f $CROSSEXPANDED $CROSSPAIRS $CROSSILLEGAL
+	    ${BIN}rm -f $CROSSEXPANDED $CROSSPAIRS $CROSSILLEGAL
 	fi
 	dbnum=`expr $dbnum + 1`
 	if [ $dbnum -gt 100 ]
 	then
 	    echo "Too many passes, aborting cross-product loop.  Munchlist failed." 1>&2
-	    /bin/rm -f ${TMP}*
+	    ${BIN}rm -f ${TMP}*
 	    if [ "X$MUNCHMAIL" != X ]
 	    then
 		(
 		ls -ld ${TDIR}/[A-Z]*
-		cat /tmp/munchlist.mail
+		cat ${TDIR1}/munchlist.mail
 		) | mail "$MUNCHMAIL"
-		/bin/rm -f /tmp/munchlist.mail
+		${BIN}rm -f ${TDIR1}/munchlist.mail
 	    fi
 	    exit 1
 	fi
     done
-    /bin/rm -f $CROSSEXPANDED $CROSSPAIRS $CROSSILLEGAL $AWKSCRIPT
+    ${BIN}rm -f $CROSSEXPANDED $CROSSPAIRS $CROSSILLEGAL $AWKSCRIPT
     #
     # Now we have, in ILLEGALCOMBOS, a list of root/flag combinations
     # that must be removed from LEGALFLAGLIST to get the final list
@@ -775,7 +784,7 @@ ENDOFAWKSCRIPT
 	fi
     fi
 fi
-/bin/rm -f $PRODUCTLIST $CROSSROOTS $ILLEGALCOMBOS $EXPANDEDINPUT
+${BIN}rm -f $PRODUCTLIST $CROSSROOTS $ILLEGALCOMBOS $EXPANDEDINPUT
 #
 
 # We now have (in LEGALFLAGLIST) a list of roots and flags which will
@@ -805,7 +814,7 @@ $ISPELL "$wchars" -e4 -d $FAKEHASH -p /d
   | sort $SORTTMP -um +1 -2 \
   | sed -e 's; .*$;;' \
   | sort $SORTTMP -u "-t$flagmarker" +0f -1 +0 > $MINIMALAFFIXES
-/bin/rm -f $LEGALFLAGLIST
+${BIN}rm -f $LEGALFLAGLIST
 #
 # Now we're almost done.  MINIMALAFFIXES covers some (with luck, most)
 # of the words in STRIPPEDINPUT.  Now we must create a list of the remaining
@@ -820,7 +829,7 @@ if [ -s $MINIMALAFFIXES ]
 then
     $BUILDHASH -s $MINIMALAFFIXES $langtabs $FAKEHASH > /dev/null \
       ||  (echo "Couldn't create intermediate hash file" 1>&2;
-	/bin/rm -f ${TMP}*;
+	${BIN}rm -f ${TMP}*;
 	exit 1) \
       ||  exit 1
     if [ "$debug" = yes ]
@@ -837,13 +846,13 @@ else
     # MINIMALAFFIXES is empty;  just produce a sorted version of STRIPPEDINPUT
     sort $SORTTMP "-t$flagmarker" -u +0f -1 +0 $STRIPPEDINPUT
 fi
-/bin/rm -f ${TMP}*
+${BIN}rm -f ${TMP}*
 if [ "X$MUNCHMAIL" != X ]
 then
     (
     ls -ld ${TDIR}/[A-Z]*
-    cat /tmp/munchlist.mail
+    cat ${TDIR1}/munchlist.mail
     ) | mail "$MUNCHMAIL"
-    /bin/rm -f /tmp/munchlist.mail
+    ${BIN}rm -f ${TDIR1}/munchlist.mail
 fi
 exit 0
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/README ispell-3.206/README
--- ispell-3.26t/README	Thu Jul 26 00:49:26 2001
+++ ispell-3.206/README	Sat Aug 11 14:02:16 2001
@@ -58,6 +58,8 @@ What's New in This Version?
     -	Ispell will no longer be distributed in shar form, and new
 	versions will be given as gzipped tar files rather than as
 	patches.
+    -	Ispell can now be built for MS-DOS, see the file pc/README for
+	details.
 
 Where Can I Get Ispell?
 
@@ -81,6 +83,9 @@ Where Can I Get Ispell?
 
 OK, How Do I Install It?
 
+    (For installation on MS-DOS, see the section about MS-DOS at the
+    end of this file.)
+
     Ispell is quite portable (thanks to many people).  If you speak
     American English and have a BSD-like system, you may be able to
     get away with simply typing "make all" to make ispell and a
@@ -382,13 +387,14 @@ Special Installation Notes for Certain M
 
 What About Ispell for MS-DOS?
 
-    Although ispell is not officially supported on MS-DOS, there are a
-    couple of #defines that you might find useful if you want to do
-    such a thing.  Check the end of config.X.  Several people have
-    reported success building DOS versions using emx/gcc.  Others have
-    used the djgpp package, with bison replacing yacc.  Some places to
-    look for a DOS ispell if you have an x86:
+    Ispell now supports MS-DOS officially.  You can build Ispell for
+    MS-DOS with either EMX/GCC or DJGPP.  See the file pc/README for
+    compilation instructions.
+
+    Some other places to look for a DOS ispell if you have an x86:
 
+	ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/isp*.zip
+	or
 	ftp.cdrom.com:pub/os2/unix/isp3009b.zip.
 	or
 	ftp-os2.cdrom.com:pub/os2/2_x/unix/
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/subset.x ispell-3.206/subset.x
--- ispell-3.26t/subset.x	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/subset.x	Sat Aug 11 14:03:58 2001
@@ -94,6 +94,12 @@
 LIBDIR=!!LIBDIR!!
 TDIR=${TMPDIR-/usr/tmp}
 TMP=${TDIR}/sset$$.
+if [ -z "$COMSPEC$ComSpec" ]
+then
+    BIN="/bin/"
+else
+    BIN=""
+fi
 SORTTMP="-T ${TDIR}"			# !!SORTTMP!!
 USAGE="Usage:  subset [-b base] [-l langfile] dict-0 dict-1 ..."
 
@@ -133,8 +139,8 @@ TEMPDICT=${TMP}c
 FAKEDICT=${TMP}d
 FAKEHASH=${TMP}e!!HASHSUFFIX!!
 
-trap "/bin/rm -f ${TMP}*; exit 1" 1 2 15
-trap "/bin/rm -f ${TMP}*; exit 0" 13
+trap "${BIN}rm -f ${TMP}*; exit 1" 1 2 15
+trap "${BIN}rm -f ${TMP}*; exit 0" 13
 
 #
 # Create a dummy dictionary to hold a compiled copy of the language
@@ -142,9 +148,9 @@ trap "/bin/rm -f ${TMP}*; exit 0" 13
 #
 echo 'QQQQQQQQ' > $FAKEDICT
 buildhash -s $FAKEDICT $langtabs $FAKEHASH \
-  ||  (echo "Couldn't create fake hash file" 1>&2; /bin/rm -f ${TMP}*; exit 1) \
+  ||  (echo "Couldn't create fake hash file" 1>&2; ${BIN}rm -f ${TMP}*; exit 1) \
   ||  exit 1
-/bin/rm -f ${FAKEDICT}*
+${BIN}rm -f ${FAKEDICT}*
 #
 # Figure out what the flag-marking character is.
 #
@@ -174,7 +180,7 @@ do
       | sort -u $SORTTMP > ${TEMPDICT}.$dictno
     dictno=`expr $dictno + 1`
 done
-/bin/rm -f $MUNCHOUTPUT
+${BIN}rm -f $MUNCHOUTPUT
 #
 #	(3) For each adjacent pair of dictionaries, use comm to find words
 #	    in the smaller that are missing from the larger, and add them
@@ -195,7 +201,7 @@ do
     lastdict="${TEMPDICT}.$dictno"
     dictno=`expr $dictno + 1`
 done
-/bin/rm -f $MISSINGWORDS.*
+${BIN}rm -f $MISSINGWORDS.*
 #
 #	(4) For each pair of dictionaries, use comm to eliminate words in
 #	    the smaller from the larger, and shrink the result with munchlist.
@@ -209,8 +215,8 @@ for dictfile
 do
     comm -13 $lastdict ${TEMPDICT}.$dictno \
       | munchlist -l $langtabs > $outbase.$dictno
-    /bin/rm -f $lastdict
+    ${BIN}rm -f $lastdict
     lastdict="${TEMPDICT}.$dictno"
     dictno=`expr $dictno + 1`
 done
-/bin/rm -f ${TMP}*
+${BIN}rm -f ${TMP}*
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/term.c ispell-3.206/term.c
--- ispell-3.26t/term.c	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/term.c	Sun Aug 12 19:01:30 2001
@@ -83,8 +83,10 @@ static char Rcs_Id[] =
 #ifdef USG
 #include <termio.h>
 #else
+#ifndef __DJGPP__
 #include <sgtty.h>
 #endif
+#endif
 #include <signal.h>
 
 void		erase P ((void));
@@ -92,7 +94,7 @@ void		move P ((int row, int col));
 void		inverse P ((void));
 void		normal P ((void));
 void		backup P ((void));
-static int	putch P ((int c));
+static int	iputch P ((int c));
 void		terminit P ((void));
 SIGNAL_TYPE	done P ((int signo));
 #ifdef SIGTSTP
@@ -104,18 +106,24 @@ int		shellescape P ((char * buf));
 void		shescape P ((char * buf));
 #endif /* USESH */
 
+static int	termchanged = 0;
+
+#ifdef __DJGPP__
+#include "pc/djterm.c"
+#endif
+
 void erase ()
     {
 
     if (cl)
-	tputs (cl, li, putch);
+	tputs (cl, li, iputch);
     else
 	{
 	if (ho)
-	    tputs (ho, 100, putch);
+	    tputs (ho, 100, iputch);
 	else if (cm)
-	    tputs (tgoto (cm, 0, 0), 100, putch);
-	tputs (cd, li, putch);
+	    tputs (tgoto (cm, 0, 0), 100, iputch);
+	tputs (cd, li, iputch);
 	}
     }
 
@@ -123,28 +131,28 @@ void move (row, col)
     int		row;
     int		col;
     {
-    tputs (tgoto (cm, col, row), 100, putch);
+    tputs (tgoto (cm, col, row), 100, iputch);
     }
 
 void inverse ()
     {
-    tputs (so, 10, putch);
+    tputs (so, 10, iputch);
     }
 
 void normal ()
     {
-    tputs (se, 10, putch);
+    tputs (se, 10, iputch);
     }
 
 void backup ()
     {
     if (BC)
-	tputs (BC, 1, putch);
+	tputs (BC, 1, iputch);
     else
 	(void) putchar ('\b');
     }
 
-static int putch (c)
+static int iputch (c)
     int			c;
     {
 
@@ -162,7 +170,6 @@ static struct ltchars	ltc;
 static struct ltchars	oltc;
 #endif
 #endif
-static int		termchanged = 0;
 static SIGNAL_TYPE	(*oldint) ();
 static SIGNAL_TYPE	(*oldterm) ();
 #ifdef SIGTSTP
@@ -346,7 +353,7 @@ retry:
 	(void) signal (SIGTSTP, onstop);
 #endif
     if (ti)
-	tputs (ti, 1, putch);
+	tputs (ti, 1, iputch);
     }
 
 /* ARGSUSED */
@@ -358,7 +365,7 @@ SIGNAL_TYPE done (signo)
     if (termchanged)
 	{
 	if (te)
-	    tputs (te, 1, putch);
+	    tputs (te, 1, iputch);
 #ifdef USG
 	(void) ioctl (0, TCSETAW, (char *) &osbuf);
 #else
@@ -401,31 +408,35 @@ static SIGNAL_TYPE onstop (signo)
     }
 #endif
 
+#ifndef USESH
+#define NEED_SHELLESCAPE
+#endif /* USESH */
+#ifndef REGEX_LOOKUP
+#define NEED_SHELLESCAPE
+#endif /* REGEX_LOOKUP */
 void stop ()
     {
 #ifdef SIGTSTP
     onstop (SIGTSTP);
 #else
-    /* for System V */
+    /* for System V and MSDOS */
     move (li - 1, 0);
     (void) fflush (stdout);
+#ifdef NEED_SHELLESCAPE
     if (getenv ("SHELL"))
 	(void) shellescape (getenv ("SHELL"));
     else
 	(void) shellescape ("sh");
-#endif
+#else
+    shescape ("");
+#endif /* NEED_SHELLESCAPE */
+#endif /* SIGTSTP */
     }
 
 /* Fork and exec a process.  Returns NZ if command found, regardless of
 ** command's return status.  Returns zero if command was not found.
 ** Doesn't use a shell.
 */
-#ifndef USESH
-#define NEED_SHELLESCAPE
-#endif /* USESH */
-#ifndef REGEX_LOOKUP
-#define NEED_SHELLESCAPE
-#endif /* REGEX_LOOKUP */
 #ifdef NEED_SHELLESCAPE
 int shellescape	(buf)
     char *	buf;
@@ -478,7 +489,7 @@ int shellescape	(buf)
 	}
     else
 	{
-	(void) printf (TERM_C_CANT_FORK);
+	(void) printf (TERM_C_CANT_FORK, MAYBE_CR);
 	termstat = -1;		/* Couldn't fork */
 	}
 
@@ -528,6 +539,9 @@ void shescape (buf)
 #ifdef COMMANDFORSPACE
     int		ch;
 #endif
+#ifdef __DJGPP__
+    char	curdir[MAXPATHLEN];
+#endif
 
 #ifdef USG
     (void) ioctl (0, TCSETAW, (char *) &osbuf);
@@ -537,6 +551,17 @@ void shescape (buf)
     (void) ioctl (0, TIOCSLTC, (char *) &oltc);
 #endif
 #endif
+#ifdef __DJGPP__
+    /* Don't erase the screen if they want to run a single command,
+     * otherwise they will be unable to see its output.
+     */
+    if (!*buf)
+	djgpp_restore_screen ();
+    /* Change and restore the current directory, because it's a global
+     * notion on MS-DOS/MS-Windows.
+     */
+    getcwd (curdir, MAXPATHLEN);
+#endif
     (void) signal (SIGINT, oldint);
     (void) signal (SIGTERM, oldterm);
 #ifdef SIGTSTP
@@ -560,6 +585,11 @@ void shescape (buf)
     if (oldtstp != SIG_IGN)
 	(void) signal (SIGTSTP, onstop);
 #endif
+#ifdef __DJGPP__
+    if (!*buf)
+	djgpp_ispell_screen ();
+    chdir (curdir);
+#endif
 
 #ifdef USG
     (void) ioctl (0, TCSETAW, (char *) &sbuf);
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/tree.c ispell-3.206/tree.c
--- ispell-3.26t/tree.c	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/tree.c	Sat Aug 11 17:03:02 2001
@@ -235,6 +235,15 @@ void treeinit (p, LibDict)
 	*/
 	abspath = (*p == '/'  ||  strncmp (p, "./", 2) == 0
 	  ||  strncmp (p, "../", 3) == 0);
+#ifdef MSDOS
+	/*
+	** DTRT with drive-letter braindamage and with backslashes.
+	*/
+	if (!abspath)
+	    abspath = (*p == '\\' || strncmp (p, ".\\", 2) == 0
+		       || strncmp (p, "..\\", 3) == 0
+		       || (p[0] && p[1] == ':'));
+#endif
 	if (abspath)
 	    {
 	    (void) strcpy (personaldict, p);
@@ -276,7 +285,7 @@ void treeinit (p, LibDict)
 	     */
 	    if (dictf == NULL)
 		{
-		(void) fprintf (stderr, CANT_OPEN, p);
+		(void) fprintf (stderr, CANT_OPEN, p, MAYBE_CR);
 		perror ("");
 		return;
 		}
@@ -284,9 +293,9 @@ void treeinit (p, LibDict)
 	}
 
     if (!lflag  &&  !aflag
-      &&  access (personaldict, 2) < 0  &&  errno != ENOENT)
+      &&  access (personaldict, W_OK) < 0  &&  errno != ENOENT)
 	{
-	(void) fprintf (stderr, TREE_C_CANT_UPDATE, personaldict);
+	(void) fprintf (stderr, TREE_C_CANT_UPDATE, personaldict, MAYBE_CR);
 	(void) sleep ((unsigned) 2);
 	}
     }
@@ -359,7 +368,7 @@ void treeinsert (word, wordlen, keep)
 	  (struct dent *) calloc ((unsigned) pershsize, sizeof (struct dent));
 	if (pershtab == NULL)
 	    {
-	    (void) fprintf (stderr, TREE_C_NO_SPACE);
+	    (void) fprintf (stderr, TREE_C_NO_SPACE, MAYBE_CR);
 	    /*
 	     * Try to continue anyway, since our overflow
 	     * algorithm can handle an overfull (100%+) table,
@@ -369,7 +378,7 @@ void treeinsert (word, wordlen, keep)
 	     */
 	    if (oldhtab == NULL)
 		exit (1);		/* No old table, can't go on */
-	    (void) fprintf (stderr, TREE_C_TRY_ANYWAY);
+	    (void) fprintf (stderr, TREE_C_TRY_ANYWAY, MAYBE_CR);
 	    cantexpand = 1;		/* Suppress further messages */
 	    pershsize = oldhsize;	/* Put things back */
 	    pershtab = oldhtab;		/* ... */
@@ -471,7 +480,7 @@ static struct dent * tinsert (proto)
 	hp = (struct dent *) calloc (1, sizeof (struct dent));
 	if (hp == NULL)
 	    {
-	    (void) fprintf (stderr, TREE_C_NO_SPACE);
+	    (void) fprintf (stderr, TREE_C_NO_SPACE, MAYBE_CR);
 	    exit (1);
 	    }
 	}
@@ -540,7 +549,7 @@ void treeoutput ()
 
     if ((dictf = fopen (personaldict, "w")) == NULL)
 	{
-	(void) fprintf (stderr, CANT_CREATE, personaldict);
+	(void) fprintf (stderr, CANT_CREATE, personaldict, MAYBE_CR);
 	return;
 	}
 
@@ -690,7 +699,7 @@ char * do_regex_lookup (expr, whence)
     static int		    curindex;
     static struct dent *    curpersent;
     static int		    curpersindex;
-    static char *	    cmp_expr;
+    static REGCTYPE	    cmp_expr = (REGCTYPE)0;
     char		    dummy[INPUTWORDLEN + MAXAFFIXLEN];
     ichar_t *		    is;
 
@@ -699,7 +708,8 @@ char * do_regex_lookup (expr, whence)
 	is = strtosichar (expr, 0);
 	upcase (is);
 	expr = ichartosstr (is, 1);
-        cmp_expr = REGCMP (expr);
+	REGFREE (cmp_expr);	/* free previous compiled pattern, if any */
+        cmp_expr = REGCMP (cmp_expr, expr);
         curent = hashtbl;
         curindex = 0;
         curpersent = pershtab;
diff -up -r -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/zapdups.x ispell-3.206/zapdups.x
--- ispell-3.26t/zapdups.x	Thu Jul 26 00:51:46 2001
+++ ispell-3.206/zapdups.x	Sat Aug 11 17:08:10 2001
@@ -122,7 +122,7 @@ then
     exit 1
 fi
 
-FAKEHASH=$TMP.a!!HASHSUFFIX!!
+FAKEHASH=${TMP}!!HASHSUFFIX!!
 FAKEDICT=$TMP.b
 SEEN=$TMP.c
 LATEST=$TMP.d
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/cfglang.sed ispell-3.206/pc/cfglang.sed
--- ispell-3.26t/pc/cfglang.sed	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/cfglang.sed	Fri Aug 10 14:45:04 2001
@@ -0,0 +1,21 @@
+#!/bin/sed -f
+#
+# Fix up file names which are either invalid on MSDOS, or clash with each
+# other in the restricted 8+3 file-name space
+#
+s/americansml/amersml/g
+s/americanmed/amermed/g
+s/americanlrg/amerlrg/g
+s/americanxlg/amerxlg/g
+s/altamersml/altasml/g
+s/altamermed/altamed/g
+s/altamerlrg/altalrg/g
+s/altamerxlg/altaxlg/g
+s/britishsml/britsml/g
+s/britishmed/britmed/g
+s/britishlrg/britlrg/g
+s/britishxlg/britxlg/g
+s/\(..*\)-alt\./alt\1./g
+s/+\.hash/x.hash/g
+s/\([^.]\)\.\([^.+][^.+]*\)+/\1x.\2/g
+s/americanx/americax/g
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/cfgmain.sed ispell-3.206/pc/cfgmain.sed
--- ispell-3.26t/pc/cfgmain.sed	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/cfgmain.sed	Fri Aug 10 15:10:06 2001
@@ -0,0 +1,14 @@
+/^	  *\$\$SORTTMP/i\
+	    -e 's@/munch\\$$\\$$@/mu$$$$@g' \\\
+	    -e 's@/faff\\$$\\$$@/fa$$$$@g' \\\
+	    -e 's@/sset\\$$\\$$\\.@/se$$$$@g' \\
+/^	  *while \[ "X\$\$LANGUAGES" != X \]/i\
+	    [ -r languages/english/Makefile.orig ] \\\
+	      || (cd languages/english; mv -f Makefile Makefile.orig; \\\
+	          ../../pc/cfglang.sed Makefile.orig > Makefile); \\
+/^		cd languages\/$$dir; \\/a\
+		[ -r Makefile.orig ] \\\
+		   || (mv -f Makefile Makefile.orig; \\\
+		       ../../pc/cfglang.sed Makefile.orig > Makefile); \\
+/^ijoin.o:/i\
+term.o: pc/djterm.c
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/configdj.bat ispell-3.206/pc/configdj.bat
--- ispell-3.26t/pc/configdj.bat	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/configdj.bat	Sun Aug 12 11:04:16 2001
@@ -0,0 +1,11 @@
+@echo off
+echo Configuring Ispell for DJGPP...
+update pc/local.djgpp local.h
+if not exist Makefile.orig ren Makefile Makefile.orig
+sed -f pc/cfgmain.sed Makefile.orig > Makefile
+if "%TMPDIR%"=="" set TMPDIR=.
+set PATH_SEPARATOR=:
+set TEST_FINDS_EXE=y
+rem if not exist %SYSROOT%\tmp\nul md %SYSROOT%\tmp
+echo You are now ready to run Make
+:End
--- ispell-3.26t/pc/djterm.c	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/djterm.c	Sun Aug 12 18:43:18 2001
@@ -0,0 +1,418 @@
+#ifndef lint
+static char DJGPP_Rcs_Id[] =
+    "$Id";
+#endif
+
+/*
+ * djterm.c - DJGPP-specific terminal driver for Ispell
+ *
+ * Eli Zaretskii <eliz@is.elta.co.il>, 1996, 2001
+ *
+ * Copyright 1996, Geoff Kuenning, Granada Hills, CA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All modifications to the source code must be clearly marked as
+ *    such.  Binary redistributions based on modified source code
+ *    must be clearly marked as modified versions in the documentation
+ *    and/or other materials provided with the distribution.
+ * 4. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgment:
+ *      This product includes software developed by Geoff Kuenning and
+ *      other unpaid contributors.
+ * 5. The name of Geoff Kuenning may not be used to endorse or promote
+ *    products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * $Log$
+ */
+
+/*
+** DJGPP currently doesn't support Unixy ioctl directly, so we
+** have to define minimal support here via the filesystem extensions.
+*/
+
+#include <errno.h>
+#include <unistd.h>
+#include <limits.h>
+#include <sys/ioctl.h>
+#include <conio.h>
+#include <sys/fsext.h>
+
+static struct text_info txinfo;
+static unsigned char *saved_screen;
+static unsigned char ispell_norm_attr, ispell_sout_attr;
+
+/* These declarations are on <sys/ioctl.h>, but as of DJGPP v2.03 they
+   are ifdefed away.  To accomodate for both old and new versions,
+   where some of the TIOC* commands might be supported, we override
+   any possible definitions of those commands, but provide
+   declarations of structures they use only if they are not provided
+   by the library.  */
+#ifdef TIOCGWINSZ
+#undef TIOCGWINSZ
+#else
+struct winsize {
+	unsigned short	ws_row;
+	unsigned short	ws_col;
+	unsigned short	ws_xpixel;
+	unsigned short	ws_ypixel;
+};
+#endif
+
+#ifdef TIOCGETP
+#undef TIOCGETP
+#else
+struct sgttyb {
+	char	sg_ispeed;
+	char	sg_ospeed;
+	char	sg_erase;
+	char	sg_kill;
+	short	sg_flags;
+};
+#endif
+
+#undef IOCPARM_MASK
+#undef IOC_OUT
+#undef IOC_IN
+#undef IOC_INOUT
+
+#define IOCPARM_MASK    0x7f
+#define IOC_OUT         0x40000000
+#define IOC_IN          0x80000000
+#define IOC_INOUT       (IOC_IN|IOC_OUT)
+
+#undef _IOR
+#undef _IOW
+#undef _IOWR
+
+#define _IOR(x,y,t)     (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+#define _IOW(x,y,t)     (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+#define _IOWR(x,y,t)    (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+
+#undef TIOCGPGRP
+#undef TIOCSETP
+#undef CBREAK
+#undef ECHO
+
+/* These are the only ones we support here.  */
+#define TIOCGWINSZ  _IOR('t', 104, struct winsize)
+#define TIOCGPGRP   _IOR('t', 119, int)
+#define TIOCGETP    _IOR('t', 8, struct sgttyb)
+#define TIOCSETP    _IOW('t', 9, struct sgttyb)
+#define CBREAK      0x00000002
+#define ECHO        0x00000008
+
+/* This will be called by low-level I/O functions.  */
+static int djgpp_term (__FSEXT_Fnumber func, int *retval, va_list rest_args)
+    {
+    int fhandle = va_arg (rest_args, int);
+
+    /*
+    ** We only support ioctl on STDIN and write on STDOUT/STDERR.
+    */
+    if (func == __FSEXT_ioctl
+	     && fhandle == fileno (stdin)
+	     && isatty (fhandle))
+	{
+	int cmd = va_arg (rest_args, int);
+	switch (cmd)
+	  {
+	  case TIOCGWINSZ:
+		{
+		struct winsize *winfo = va_arg (rest_args, struct winsize *);
+		winfo->ws_row = ScreenRows ();
+		winfo->ws_col = ScreenCols ();
+		winfo->ws_xpixel = 1;
+		winfo->ws_ypixel = 1;
+		*retval = 0;
+		break;
+		}
+	  case TIOCGPGRP:
+		*retval = 0;
+		break;
+	  case TIOCGETP:
+		{
+		struct sgttyb * gtty = va_arg (rest_args, struct sgttyb *);
+		gtty->sg_ispeed = gtty->sg_ospeed = 0; /* unused */
+		gtty->sg_erase = K_BackSpace;
+		gtty->sg_kill  = K_Control_U;
+		gtty->sg_flags = 0; /* unused */
+		*retval = 0;
+		break;
+		}
+	  case TIOCSETP:
+		*retval = 0;
+		break;
+	  default:
+		*retval = -1;
+		break;
+	  }
+	return 1;
+	}
+    else if (func == __FSEXT_write
+	     && (fhandle == fileno (stdout) || fhandle == fileno (stderr))
+	     && isatty (fhandle)
+	     && termchanged)
+	{
+	/*
+	** Cannot write the output as is, because it might include
+	** TABS.  We need to expand them into suitable number of spaces.
+	*/
+	int col, dummy;
+	char *buf = va_arg (rest_args, char *);
+	size_t buflen = va_arg (rest_args, size_t);
+	char *local_buf, *s, *d;
+	if (!buf)
+	    {
+	    errno = EINVAL;
+	    *retval = -1;
+	    return 1;
+	    }
+	*retval = buflen;	/* `_write' expects number of bytes written */
+	local_buf = (char *)alloca (buflen+8+1); /* 8 for TAB, 1 for '\0' */
+	ScreenGetCursor (&dummy, &col);
+	for (s = buf, d = local_buf; buflen--; s++)
+	    {
+	    if (*s == '\0')	/* `cputs' treats '\0' as end of string */
+		{
+		*d = *s;
+		cputs (local_buf);
+		putch (*s);
+		d = local_buf;
+		col++;
+		}
+	    else if (*s == '\t')
+		{
+		*d++ = ' ';
+		col++;
+		while (col % 8)
+		    {
+		    *d++ = ' ';
+		    col++;
+		    }
+		*d = '\0';
+		cputs (local_buf);
+		d = local_buf;
+		}
+	    else
+	        {
+		*d++ = *s;
+		if (*s == '\r')
+		    col = 0;
+		else if (*s != '\n')
+		    col++;
+		}
+	    }
+	if (d > local_buf)
+	    {
+	    *d = '\0';
+	    cputs (local_buf);
+	    }
+
+	return 1;
+	}
+    else
+        return 0;
+    }
+
+
+/* This is called before `main' to install our terminal handler. */
+static void __attribute__((constructor))
+djgpp_ispell_startup (void)
+{
+  __FSEXT_set_function (fileno (stdin), djgpp_term);
+  __FSEXT_set_function (fileno (stdout), djgpp_term);
+  __FSEXT_set_function (fileno (stderr), djgpp_term);
+}
+
+/* DJGPP-specific screen initialization and deinitialization.  */
+static void djgpp_init_terminal (void)
+    {
+    if (li == 0)
+	{
+	/*
+	** On MSDOS/DJGPP platforms, colors are used for normal and
+	** inverse-video displays.  The colors and screen size seen
+	** at program startup are saved, to be restored before exit.
+	** The screen contents are also saved and restored.
+	*/
+	char *ispell_colors;
+
+	gettextinfo (&txinfo);
+	saved_screen = (unsigned char *)
+		       malloc (txinfo.screenwidth * txinfo.screenheight * 2);
+	if (saved_screen)
+	    ScreenRetrieve (saved_screen);
+
+	/*
+	** Let the user specify their favorite colors for normal
+	** and standout text, like so:
+	**
+	**         set ISPELL_COLORS=0x1e.0x74
+	**                            se   so
+	*/
+	ispell_colors = getenv ("ISPELL_COLORS");
+	if (ispell_colors != (char *)0)
+	    {
+	    char *next;
+	    unsigned long coldesc = strtoul (ispell_colors, &next, 0);
+
+	    if (next == ispell_colors || coldesc > UCHAR_MAX)
+	        ispell_colors = (char *)0;
+	    else
+		{
+		char *endp;
+		ispell_norm_attr = (unsigned char)coldesc;
+		coldesc = strtoul (next + 1, &endp, 0);
+		if (endp == next + 1 || coldesc > UCHAR_MAX)
+		    ispell_colors = (char *)0;
+		else
+		    ispell_sout_attr = (unsigned char)coldesc;
+		}
+	    }
+	if (ispell_colors == (char *)0)
+	    {  /* Use dull B&W color scheme */
+	    ispell_norm_attr = LIGHTGRAY + (BLACK << 4);
+	    ispell_sout_attr  = BLACK + (LIGHTGRAY << 4);
+	    }
+	}
+    }
+
+static void djgpp_restore_screen (void)
+    {
+    if (li != txinfo.screenheight)
+        _set_screen_lines (txinfo.screenheight);
+    textmode (txinfo.currmode);
+    textattr (txinfo.attribute);
+    gotoxy (1, txinfo.screenheight);
+    clreol ();
+    }
+
+static void djgpp_deinit_term (void)
+    {
+    termchanged = 0;	/* so output uses stdio again */
+    printf ("\n");	/* in case some garbage is pending */
+    fflush (stdout);
+    if (saved_screen)
+	{
+	ScreenUpdate (saved_screen);
+	gotoxy (txinfo.curx, txinfo.cury);
+	}
+    }
+
+static void djgpp_ispell_screen ()
+    {
+    fflush (stdout);
+    if (li != txinfo.screenheight)
+	_set_screen_lines (li);
+    textattr (ispell_norm_attr);
+    }
+
+static int djgpp_column, djgpp_row;
+
+char *tgoto (char *cmd, int col, int row)
+    {
+    djgpp_column = col;
+    djgpp_row = row;
+    return "\2";
+    }
+
+char *tputs (const char *cmd, int cnt, int (*func)(int))
+    {
+    fflush (stdout);
+    if (!cmd)
+	abort ();
+    switch (*cmd)
+	{
+	case '\1':		/* erase */
+	    clrscr ();
+	    break;
+	case '\2':		/* move */
+	    gotoxy (djgpp_column + 1, djgpp_row + 1);
+	    break;
+	case '\3':		/* stand-out */
+	    textattr (ispell_sout_attr);
+	    break;
+	case '\4':		/* end stand-out */
+	    textattr (ispell_norm_attr);
+	    break;
+	case '\5':		/* backup */
+	    gotoxy (wherex () - cnt, wherey ());
+	    break;
+	case '\6':		/* terminal init */
+	    djgpp_ispell_screen ();
+	    clrscr ();
+	    break;
+	case '\7':		/* terminal termination */
+	    djgpp_restore_screen ();
+	    djgpp_deinit_term ();
+	    break;
+	default:
+	    abort ();
+	}
+    }
+
+int tgetent (char *buf, const char *term_name)
+    {
+    djgpp_init_terminal ();
+    }
+
+char *tgetstr (const char *cmd, char **buf)
+    {
+    static struct emulated_cmd
+	{
+	char *external_name;
+	char *internal_code;
+	}
+    commands[] =
+        {
+	    { "cl", "\1" },
+	    { "cm", "\2" },
+	    { "so", "\3" },
+	    { "se", "\4" },
+	    { "bc", "\5" },
+	    { "ti", "\6" },
+	    { "te", "\7" },
+	};
+    int i;
+
+    for (i = 0; i < sizeof (commands) / sizeof (commands[0]); i++)
+	{
+	if (strcmp (cmd, commands[i].external_name) == 0)
+	    return commands[i].internal_code;
+	}
+
+    return NULL;
+    }
+
+int tgetnum (const char *cmd)
+    {
+    if (cmd && strcmp (cmd, "co") == 0)
+	return 80;
+    else if (cmd && strcmp (cmd, "li") == 0)
+	return 24;
+    return -1;
+    }
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/local.djgpp ispell-3.206/pc/local.djgpp
--- ispell-3.26t/pc/local.djgpp	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/local.djgpp	Sun Aug 12 10:54:10 2001
@@ -0,0 +1,368 @@
+/*
+ * Written by Eli Zaretskii <eliz@is.elta.co.il>
+ *
+ * This is local.h file suitable for compiling Ispell on MS-DOS systems
+ * with version 2.x of DJGPP port of GNU C/C++ compiler.
+ *
+ * $Id$
+ *
+ * $Log$
+ */
+
+/*
+ * WARNING WARNING WARNING
+ *
+ * This file is *NOT* a normal C header file!  Although it uses C
+ * syntax and is included in C programs, it is also processed by shell
+ * scripts that are very stupid about format.
+ *
+ * Do not try to use #if constructs to configure this file for more
+ * than one configuration.  Do not place whitespace after the "#" in
+ * "#define".  Do not attempt to disable lines by commenting them out.
+ * Do not use backslashes to reduce the length of long lines.
+ * None of these things will work the way you expect them to.
+ *
+ * WARNING WARNING WARNING
+ */
+
+/*
+** Things that normally go in a Makefile.  Define these just like you
+** might in the Makefile, except you should use #define instead of
+** make's assignment syntax.  Everything must be double-quoted, and
+** (unlike make) you can't use any sort of $-syntax to pick up the
+** values of other definitions.
+*/
+
+#define CC      "gcc"
+#define CFLAGS  "-O2 -g"
+#define YACC    "bison -y"
+
+/*
+** TERMLIB - DJGPP doesn't have one, it uses direct screen writes.
+*/
+#define TERMLIB ""
+
+/*
+** Where to install various components of ispell.  BINDIR contains
+** binaries.  LIBDIR contains hash tables and affix files.  MAN1DIR
+** and MAN4DIR will hold the chapter-1 and chapter-4 manual pages,
+** respectively.
+**
+** If you intend to use multiple dictionary files, I would suggest
+** LIBDIR be a directory which will contain nothing else, so sensible
+** names can be constructed for the -d option without conflict.
+**
+** The magic string "/dev/env/FOO" expands at run time into the value
+** of the environment variable FOO.  DJDIR is defined by the startup
+** code of every DJGPP program to point to the root of the DJGPP
+** installation tree.
+*/
+#define BINDIR      "/dev/env/DJDIR/bin"
+#define LIBDIR      "/dev/env/DJDIR/lib"
+#define MAN1DIR     "/dev/env/DJDIR/man/man1"
+#define MAN4DIR     "/dev/env/DJDIR/man/man4"
+
+/*
+** List of all hash files (languages) which will be supported by ispell.
+**
+** This variable has a complex format so that many options can be
+** specified.  The format is as follows:
+**
+**	<language>[,<make-options>...] [<language> [,<make-options> ...] ...]
+**
+** where
+**
+**	language	is the name of a subdirectory of the
+**			"languages" directory
+**	make-options	are options that are to be passed to "make" in
+**			the specified directory.  The make-options
+**			should not, in general, specify a target, as
+**			this will be provided by the make process.
+**
+** For example, if LANGUAGES is:
+**
+**	"{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=/usr/dict/words /usr/dict/web2} {deutsch,DICTALWAYS=deutsch.sml,DICTOPTIONS=}"
+**
+** then the American-English and Deutsch (German) languages will be supported,
+** and the following variable settings will be passed to the two Makefiles:
+**
+**	American:
+**
+**	    MASTERDICTS='american.med+'
+**	    HASHFILES='americanmed+.hash'
+**	    EXTRADICT='/usr/dict/words /usr/dict/web2'
+**
+**	Deutsch:
+**
+**	    DICTALWAYS='deutsch.sml'
+**	    DICTOPTIONS=''
+**
+** Notes on the syntax: The makefile is not very robust.  If you have
+** make problems, or if make seems to to fail in the language-subdirs
+** dependency, check your syntax.  The makefile adds single quotes to
+** the individual variables in the LANGUAGES specification, so don't
+** use quotes of any kind.
+**
+** In the future, the first language listed in this variable will
+** become the default, and the DEFHASH, DEFLANG, and DEFPAFF,
+** variables will all become obsolete.  So be sure to put your default
+** language first, to make later conversion easier!
+**
+** Notes on options for the various languages will be found in the
+** Makefiles for those languages.  Some of those languages may require
+** you to also change various limits limits like MASKBITS or the
+** length parameters.
+**
+** A special note on the English language: because the British and
+** American dialects use different spelling, you should usually select
+** one or the other of these.  If you select both, the setting of
+** MASTERHASH will determine which becomes the language linked to
+** DEFHASH (which will usually be named english.hash).
+**
+** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+** !!! Note the pathname for the `words' file: it might be different !!!
+** !!! If you don't have this file, make EXTRADICT empty             !!!
+** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+*/
+
+#define LANGUAGES "{american,MASTERDICTS=american.med,HASHFILES=amermed.hash,EXTRADICT=}"
+
+
+
+/*
+** If you have acces to a /usr/dict/words file, and wish to check
+** British spelling in addition to American, you may wish to use this:
+**
+*/
+/*
+** #define LANGUAGES "{american,MASTERDICTS=americax.med americax.lrg american.xlg,HASHFILES=amermedx.hash amerlrgx.hash amerxlg.hash,EXTRADICT=c:/usr/lib/words} {british,MASTERDICTS=british.med british.lrg british.xlg,HASHFILES=britmed.hash britlrg.hash britxlg.hash}"
+**
+**
+*/
+
+/*
+** Master hash file for DEFHASH.  This is the name of a hash file
+** built by a language Makefile.  It should be the most-popular hash
+** file on your system, because it is the one that will be used by
+** default.  It must be listed in LANGUAGES, above.
+*/
+#define MASTERHASH	"amermedx.hash"
+
+/*
+** Default native-language hash file.  This is the name given to the
+** hash table that will be used if no language is specified to
+** ispell.  It is a link to MASTERHASH, above.
+**
+** If you uncommented the alternative definition of LANGUAGES above,
+** use "amermedx.hash" and "englishx.hash", respectively, for
+** MASTERHASH and DEFHASH.
+*/
+#define DEFHASH "englishx.hash"
+
+/*
+** If your sort command accepts the -T switch to set temp file
+** locations (try it out; on some systems it exists but is
+** undocumented), make the following variable the null string.
+** Otherwise leave it as the sed script.
+**
+** With DJGPP, you will probably use GNU Sort which accepts -T, so:
+*/
+#define SORTTMP ""
+
+/*
+** If your system has the rename(2) system call, define HAS_RENAME and
+** ispell will use that call to rename backup files.  Otherwise, it
+** will use link/unlink.  There is no harm in this except on MS-DOS,
+** which might not support link/unlink (DJGPP does, but also has rename).
+*/
+#define HAS_RENAME 1
+
+/* environment variable for user's word list */
+#ifndef PDICTVAR
+#define PDICTVAR "WORDLIST"
+#endif
+
+/*
+** Prefix part of default private dictionary.  Under MS-DOS 8.3
+** filename limitation, we are in trouble...
+*/
+#define DEFPDICT "_isp_"
+
+/* old place to look for default word list */
+#define OLDPDICT   "_isp_"
+
+/*
+** mktemp template for temporary file - MUST contain 6 consecutive X's.
+**
+** If this is a relative name, Ispell will try to determine the directory
+** by checking the environment variables TMPDIR, TEMP, and TMP (in that
+** order).
+*/
+#define TEMPNAME "isXXXXXX"
+
+/*
+** If REGEX_LOOKUP is NOT defined, the lookup command (L) will use the look(1)
+** command (if available) or the egrep command.  If REGEX_LOOKUP is defined,
+** the lookup command will use the internal dictionary and the
+** regular-expression library (which you must supply separately.
+** DJGPP v2 has POSIX regexp functions.
+*/
+#define REGEX_LOOKUP    1
+
+/*
+** Choose the proper type of regular-expression routines here.  BSD
+** and public-domain systems have routines called re_comp and re_exec;
+** System V uses regcmp and regex.
+*/
+#include <sys/types.h>
+#include <regex.h>
+#define REGCTYPE		regex_t *
+#define REGCMP(re,str)		(regcomp (re, str, 0), re)
+#define REGEX(re, str, dummy) \
+  (re != 0 && regexec (re, str, 0, 0, 0) == 0 ? (char *)1 : NULL)
+#define REGFREE(re) \
+  do { 							\
+      if (re == 0)					\
+        re = (regex_t *)calloc (1, sizeof (regex_t));	\
+      else						\
+	regfree(re);					\
+  } while (0)
+
+/*
+**
+** The 2 following definitions are only meaningfull if you don't use
+** any regex library.
+*/
+/* path to egrep (use speeded up version if available);
+   defined without explicit path, since there are no
+   standard places for programs on MS-DOS.  */
+#define  EGREPCMD "egrep -i"
+
+/* path to wordlist for Lookup command (typically /usr/dict/{words|web2}) */
+/* note that /usr/dict/web2 is usually a bad idea due to obscure words */
+#undef WORDS
+
+/*
+** FIXME: The filename truncation below is not flexible enough for DJGPP
+**	  which can support long filenames on some platforms, since we
+**	  will only know if the support is available at runtime.
+*/
+
+/* max file name length (will truncate to fit BAKEXT) if not in sys/param.h */
+#ifdef NAME_MAX
+#define MAXNAMLEN NAME_MAX
+#else
+#define MAXNAMLEN 12
+#endif
+
+#define MAXEXTLEN        4    /* max. extension length including '.'   */
+#define MAXBASENAMELEN   8    /* max. base filename length without ext */
+
+/* define if you want .bak file names truncated to MAXNAMLEN characters */
+/* On MS-DOS, we really have no choice... */
+#define TRUNCATEBAK 1
+
+/*
+** This is the extension that will be added to backup files.
+** On MS-DOS, it makes sense to use the shortest possible extension.
+*/
+#define	BAKEXT	"~"
+
+/*
+** Define this if you want to use the shell for interpretation of commands
+** issued via the "L" command, "^Z" under System V, and "!".  If this is
+** not defined then a direct spawnvp() will be used in place of the
+** normal system().  This may speed up these operations if the SHELL
+** environment variable points to a Unix-like shell (such as `sh' or `bash').
+**
+** However, if you undefine USESH, commands which use pipes, redirection
+** and shell wildcards won't work, and you will need support for the SIGTSTP
+** signal, for the above commands to work at all.
+*/
+
+#define USESH	1
+
+/*
+** Define this if you want to be able to type any command at a "type space
+** to continue" prompt.
+*/
+#define COMMANDFORSPACE 1
+
+/*
+** The next three variables are used to provide a variable-size context
+** display at the bottom of the screen.  Normally, the user will see
+** a number of lines equal to CONTEXTPCT of his screen, rounded down
+** (thus, with CONTEXTPCT == 10, a 24-line screen will produce two lines
+** of context).  The context will never be greater than MAXCONTEXT or
+** less than MINCONTEXT.  To disable this feature entirely, set MAXCONTEXT
+** and MINCONTEXT to the same value.  To round context percentages up,
+** define CONTEXTROUNDUP.
+**
+** Warning: don't set MAXCONTEXT ridiculously large.  There is a
+** static buffer of size MAXCONTEXT*BUFSIZ; since BUFSIZ is frequently
+** 1K or larger, this can create a remarkably large executable.
+*/
+#define CONTEXTPCT	20	/* Use 20% of the screen for context */
+#define MINCONTEXT	2	/* Always show at least 2 lines of context */
+#define MAXCONTEXT	10	/* Never show more than 10 lines of context */
+#define CONTEXTROUNDUP	1       /* Round context up */
+
+/*
+** Define this if you want the "mini-menu," which gives the most important
+** options at the bottom of the screen, to be the default (in any case, it
+** can be controlled with the "-M" switch).
+*/
+#define MINIMENU
+
+/*
+** Redefine GETKEYSTROKE() to whatever appropriate on some MS-DOS systems
+** where getchar() doesn't operate properly in raw mode.
+*/
+#ifdef __DJGPP__
+#include <pc.h>
+#include <keys.h>
+#define GETKEYSTROKE()	getxkey()
+#else
+#define GETKEYSTROKE()	getch()
+#endif
+
+/*
+** We include <fcntl.h> to have the definition of O_BINARY.  The
+** configuration script will notice this and define MSDOS_BINARY_OPEN.
+*/
+#include <fcntl.h>
+
+/*
+** We include <unistd.h> to get the definitions of R_OK and W_OK.
+*/
+#include <unistd.h>
+
+/*
+** Environment variable to use to locate the home directory.  On DOS
+** systems we set this to ISPELL_HOME to avoid conflicts with
+** other programs that look for a HOME environment variable.
+*/
+#define HOME              "ISPELL_HOME"
+#define PDICTHOME         "c:"
+#define OPTIONVAR         "ISPELL_OPTIONS"
+#define LIBRARYVAR        "ISPELL_DICTDIR"
+
+/*
+** On MS-DOS systems, we define the following variables so that
+** ispell's files have legal suffixes.  Note that these suffixes
+** must agree with the way you've defined dictionary files which
+** incorporate these suffixes.
+**
+** Actually, it is not recommended at all to change the suffixes,
+** since they are hardwired in the Makefile's under languages/
+** subdirectory, and MS-DOS will silently truncate excess letters anyway.
+*/
+#define HASHSUFFIX	".hash"
+#define STATSUFFIX	".stat"
+#define COUNTSUFFIX	".cnt"
+
+/*
+** MS-DOS and MS-Windows systems can use either '/' or '\\' for
+** a directory separator in file names.
+*/
+#define IS_SLASH(c)	((c) == '/' || (c) == '\\')
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/local.emx ispell-3.206/pc/local.emx
--- ispell-3.26t/pc/local.emx	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/local.emx	Sat Nov 16 21:01:28 1996
@@ -0,0 +1,83 @@
+/*
+ *         Local.h for MSDOS emx
+*/
+
+#define CC       "gcc"
+
+#define MSDOS
+
+#define BINDIR  "c:/ispell/bin"
+#define LIBDIR  "c:/ispell/lib"
+#define ELISPDIR "c:/ispell/lib/emacs/site-el"
+#define TEXINFODIR "c:/ispell/info"
+#define MAN1DIR "c:/ispell/man"
+#define MAN4DIR "c:/ispell/man"
+
+#define LANGUAGES "{american,MASTERDICTS=american.med+,HASHFILES=amerimed+.has,EXTRADICT=c:/ispell/dict/words} {deutsch,DICTALWAYS=deutsch.sml,DICTOPTIONS=}"
+#define MASTERHASH      "amermed+.has"
+/* above only for Makefiles not for ispell! */
+
+#define DEFHASH "english.has"
+
+#define SORTTMP "-e '/!!SORTTMP!!/s/=.*$/=/'"
+#define MAKE_SORTTMP ""
+
+
+#include <fcntl.h>
+#include <conio.h>
+#include <regexp.h>
+
+#undef NO8BIT
+
+#define HAS_RENAME
+
+#define REGLIB   "-lregexp"
+
+#define DEFPDICT "_"
+#define DEFPAFF "words"
+#define OLDPDICT "_"
+#define OLDPAFF "words"
+#define TEMPNAME  "isXXXXXX"
+#define REGEX_LOOKUP
+#define REGCTYPE		char *
+#define REGCMP(re,str)          regcomp (str,(char *) 0)
+#define REGEX(re, str, dummy)   regexec (re, str, dummy, dummy, dummy, dummy, \
+                                    dummy, dummy, dummy, dummy, dummy, dummy)
+#define REGFREE(re)             (void)0
+#define EGREPCMD "grep386 -E"
+
+#define WORDS   "c:/ispell/dict/words"
+#define MAXNAMLEN       12    /* basename + "." + extension            */
+
+#ifdef MSDOS
+#define MAXEXTLEN        4    /* max. extension length including '.'   */
+#define MAXBASENAMELEN   8    /* max. base filename length without ext */
+#define MAXARGS        100    /* max. number of arguments passed to
+                               * ispell by OPTIONVAR
+                               */
+#endif  /* MSDOS */
+
+#define TRUNCATEBAK
+
+#define INPUTWORDLEN    100  /* word accepted from a file + 1;     dflt: 100 */
+#define MAXAFFIXLEN      20  /* amount a word might be extended;   dflt: 20  */
+#define MASKBITS         32  /* # of affix flags;                  dflt: 32  */
+#define MAXSTRINGCHARS  100  /* # of "string" chars in affix file; dflt: 100 */
+#define MAXSTRINGCHARLEN 10  /* max. length of a "string" char;    dflt: 10  */
+
+#define USESH
+#define DEFTEXFLAG      1
+#define MINIMENU
+#define PIECEMEAL_HASH_WRITES
+#define GETKEYSTROKE()  getch ()
+
+#define HOME              "ISPELL_HOME"
+#define OPTIONVAR         "ISPELL_OPTIONS"
+#define LIBRARYVAR        "ISPELL_DICTDIR"
+#define PDICTHOME         "c:"
+#define HASHSUFFIX        ".has"
+#define STATSUFFIX        ".stt"
+#define COUNTSUFFIX       ".cnt"
+
+#define MASKTYPE_STRING "long"
+#define SIGNAL_TYPE_STRING "void"
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/make-dj.bat ispell-3.206/pc/make-dj.bat
--- ispell-3.26t/pc/make-dj.bat	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/make-dj.bat	Mon Aug 13 10:22:38 2001
@@ -0,0 +1,47 @@
+@Rem Do not turn echo off so they will see what is going on
+copy language\english\msgs.h msgs.h > nul
+copy pc\local.djgpp local.h > nul
+copy config.X config.h > nul
+echo /* AUTOMATICALLY-GENERATED SYMBOLS */ >> config.h
+echo #define SIGNAL_TYPE_STRING "void" >> config.h
+echo #define MASKTYPE_STRING "long" >> config.h
+@Rem
+@Rem Use the following Goto when you only change a few source
+@Rem files and do not want to recompile all of them
+:: goto build
+gcc -c -O2 -g buildhash.c
+gcc -c -O2 -g correct.c
+gcc -c -O2 -g defmt.c
+gcc -c -O2 -g dump.c
+gcc -c -O2 -g fields.c
+gcc -c -O2 -g good.c
+gcc -c -O2 -g hash.c
+gcc -c -O2 -g icombine.c
+gcc -c -O2 -g ijoin.c
+gcc -c -O2 -g ispell.c
+gcc -c -O2 -g lookup.c
+gcc -c -O2 -g makedent.c
+gcc -c -O2 -g term.c
+gcc -c -O2 -g tgood.c
+gcc -c -O2 -g tree.c
+gcc -c -O2 -g xgets.c
+bison -y parse.y
+if exist y.tab.c ren y.tab.c y_tab.c
+gcc -c -O2 -g y_tab.c -o parse.o
+if exist y_tab.c del y_tab.c
+gcc -o -g buildhash buildhash.o hash.o makedent.o parse.o
+gcc -o -g icombine icombine.o makedent.o parse.o
+gcc -o -g ijoin ijoin.o fields.o
+:build
+@echo ispell.o term.o correct.o defmt.o dump.o good.o > link.lst
+@echo lookup.o hash.o makedent.o tgood.o tree.o xgets.o >> link.lst
+gcc -o -g ispell @link.lst
+@del link.lst
+@Rem
+@Rem Strip the .exe but leave the COFF output with debug info
+strip *.exe
+cd deformatters
+gcc -O2 -g -o defmt-c defmt-c.c
+gcc -O2 -g -o defmt-sh defmt-sh.c
+strip *.exe
+cd ..
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/makeemx.bat ispell-3.206/pc/makeemx.bat
--- ispell-3.26t/pc/makeemx.bat	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/makeemx.bat	Sat Aug 11 13:22:12 2001
@@ -0,0 +1,56 @@
+set CC=gcc
+set CFLAGS=-O
+set REGLIB=-lregexp
+set TERMLIB=-ltermcap
+set YACC=yacc
+
+copy language\english\msgs.h
+copy pc\local.emx local.h
+copy config.x config.h
+:: goto build
+gcc -O -c buildhas.c
+gcc -O -c correct.c
+gcc -O -c defmt.c
+gcc -O -c dump.c
+gcc -O -c fields.c
+gcc -O -c good.c
+gcc -O -c hash.c
+gcc -O -c icombine.c
+gcc -O -c ijoin.c
+gcc -O -c ispell.c
+gcc -O -c lookup.c
+gcc -O -c makedent.c
+gcc -O -DUSG -c term.c
+gcc -O -c tgood.c
+gcc -O -c tree.c
+gcc -O -c xgets.c
+
+yacc parse.y
+gcc -O -c y_tab.c
+move y_tab.o parse.o
+del y_tab.c
+
+gcc -O -o buildhash buildhash.o hash.o makedent.o parse.o %LIBES%
+emxbind -b buildhash
+emxbind -s buildhas.exe
+
+gcc -O -o icombine icombine.o makedent.o parse.o %LIBES%
+emxbind -b icombine
+emxbind -s icombine.exe
+
+gcc -O -o ijoin ijoin.o fields.o %LIBES%
+emxbind -b ijoin
+emxbind -s ijoin.exe
+
+:build
+ar -q ispell.a term.o ispell.o correct.o defmt.o dump.o good.o lookup.o hash.o makedent.o tgood.o tree.o xgets.o
+gcc -O -o ispell ispell.a %TERMLIB% %REGLIB% %LIBES%
+:: strip ispell
+emxbind -b -s ispell
+:: because of use of system()
+emxbind -a ispell -p
+:: goto end
+
+
+:end
+del ispell.a
diff -up -r -P -I*~ -I*~[0-9] -I*.exe -I*.o ispell-3.26t/pc/README ispell-3.206/pc/README
--- ispell-3.26t/pc/README	Thu Jan  1 02:00:00 1970
+++ ispell-3.206/pc/README	Mon Aug 13 17:25:52 2001
@@ -0,0 +1,322 @@
+                How to build Ispell on MS-DOS
+		-----------------------------
+
+This directory includes files necessary to build Ispell on MS-DOS and
+MS-Windows systems.  Two environments are supported: EMX/GCC and
+DJGPP; they both generate 32-bit protected-mode programs and therefore
+aren't afflicted by most of the MS-DOS memory-related limitations.
+The EMX setup does not currently support building the dictionaries, so
+you will need to either build the dictionaries with DJGPP tools or get
+them elsewhere.  The DJGPP executables will also run on all versions
+of MS-Windows (3.x, 9x, ME, W2K, and NT4) as DOS console applications.
+
+
+1.  Building Ispell with EMX/GCC
+    ----------------------------
+
+    You will only need the basic EMX development tools to compile
+    Ispell.  After unzipping the source archive, invoke the
+    MAKEEMX.BAT batch file, like so:
+
+	   pc\makeemx
+
+    This generates ispell.exe and the following auxiliary programs:
+
+	   buildhas.exe icombine.exe ijoin.exe
+
+    Install the programs anywhere along your PATH.  See the section
+    named "Environment Variables" for information on environment
+    variables used by the MS-DOS port of Ispell.
+
+
+2.  Building Ispell (no dictionaries) with DJGPP
+    --------------------------------------------
+
+    If you only need to compile Ispell without building the
+    dictionaries, use the MAKE-DJ.BAT batch file:
+
+	   pc\make-dj
+
+    You will need the standard DJGPP development environment
+    (djdevNNN.zip, gccNNNNb.zip, bnuNNNb.zip) and the DJGPP port of
+    GNU Bison (bsnNNNb.zip) for the above to work.  After the build is
+    finished, read the section below about environment variables and
+    install the executables and the dictionaries as you see fit.
+
+
+3.  Building Ispell and the dictionaries with DJGPP
+    -----------------------------------------------
+
+    In addition to the standard development environment, you will need
+    these tools to build Ispell and the dictionaries:
+
+    a. A port of Unix-like shell.  The only shell that was used
+       successfully to build Ispell on MS-DOS is the port of Bash
+       which should be available from DJGPP archives:
+
+	ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bshNNNb.zip
+
+       If you are thinking about using Stewartson's `ms_sh', don't:
+       its method of passing long command lines is incompatible with
+       DJGPP, and it will crash and burn on complex shell scripts.
+
+    b. A DJGPP port of GNU Make 3.75 or later.
+       This is available from DJGPP archives at the following URL:
+
+	ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/makNNNb.zip
+
+       Note that ports of GNU Make prior to 3.75 didn't support a
+       Unix-like shell, so you won't be able to build Ispell with them.
+
+    c. A DJGPP port of GNU Fileutils, GNU Textutils and GNU Sh-utils,
+       also available from DJGPP archives:
+
+	ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/filNNNb.zip
+	ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/txtNNNb.zip
+	ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/shlNNNb.zip
+
+       In all of these URLs, NNN is a version number.  If there is
+       more than one ported version, get the latest one.
+
+       The build process doesn't need *all* of the programs from these
+       packages, so if you are short on disk space, you should be able
+       to get away with these programs (I hope I didn't forget some):
+
+	 Fileutils: rm, mv, chmod, install, mkdir, ln, cp, touch, ls
+	 Textutils: cat, head, tail, sort, comm, wc, join, uniq
+	 Sh-utils:  echo, expr, false, true
+
+    d. GNU Sed (sedNNNb.zip from the DJGPP archives).
+
+    e. GNU Awk (or any other port of Awk).  Gawk is available from the
+       DJGPP site above (v2gnu/gwkNNNb.zip).
+
+    f. GNU Bison (bsnNNNb.zip from the DJGPP site).
+
+    g. GNU Grep (grepNNb.zip from the DJGPP site).
+
+    h. ctags and etags (for the `TAGS' and `tags' targets of the
+       Makefile).  These are available from the Emacs distribution,
+       also on the DJGPP archive site above (v2gnu/emNNNNb.zip).
+
+    While you probably can find quite a few different ports of the
+    above utilities, I would generally advise against using anything
+    but the DJGPP ports, since the Makefiles and the shell scripts
+    depend on long command lines and will most probably break
+    otherwise.  DJGPP ports are a coherent set of tools which will
+    work together well and ensure that the Makefiles and the scripts
+    work as advertised.
+
+    Here is what you should do to build Ispell:
+
+    1) Install the above utilities anywhere along your PATH.  Make
+       sure that you don't have any other executable called `sh'
+       neither in /bin (if you have such a directory) nor anywhere
+       along your PATH *prior* to the directory where you installed
+       the bash port.  When Make runs, it will invoke the first
+       program named `sh' that it finds in /bin or along the PATH, and
+       you need to ensure that the right program is called.
+
+    2) Review the options set on pc/local.djgpp and change them as you
+       see fit.  Some things that you might consider changing are the
+       pathnames of the standard directories, the dictionaries that
+       will be built (see below), the backup extension ("~" by
+       default), and the dictionaries you want to build.
+
+    3) By default, the American medium dictionary is built.  I
+       recommend to build the ``plus'' version, but it requires an
+       extra dictionary which is copyrighted.  However, you should be
+       able to find it on any Unix box, usually in the file
+       /usr/dict/words.  If you do decide to build a ``plus'' version
+       of the dictionary, be sure to put its full path in EXTRADICTS
+       variable in the file local.djgpp (default: "c:/usr/lib/words".
+
+    4) Set TMPDIR environment variable to point to a place which has
+       at least 20MB of free space, for the temporary files produced
+       by the dictionary build process.  This is especially important
+       to those who point TMPDIR to a RAM drive, since these tend to
+       be much smaller than 20MB.
+
+    5) Type these commands:
+
+	    pc\configdj
+	    make
+
+       This will run for some time, depending on the dictionaries that
+       you've chosen to build.  The default setup builds a non-plus
+       version of a medium-sized american dictionary, and should take
+       about 2 minutes on an average P166.  Note that on MS-DOS the
+       build time does not depend so much on the dictionary size as it
+       is on Unix: it takes only about 7 minutes to build the
+       extra-large plus version with /usr/dict/words file.  I believe
+       the reason for this is that the build process is much more I/O
+       bound on MS-DOS than it is on Unix, since MS-DOS pipes are
+       simulated with disk files.
+
+       If pc/configdj.bat complains that it runs out of environment
+       space, enlarge the environment available to COMMAND.COM (or
+       whatever your interactive command processor is).
+
+       When the dictionaries are built, you might see error messages,
+       about ``Improper links'', like so:
+
+         c:/djgpp/bin/ln: cannot create symbolic link `./english.0' \
+		to `../english/english.0': Improper link (EXDEV)
+
+       You can safely disregard these messages: they are due to the
+       fact that MS-DOS doesn't support symbolic links. The Makefile
+       already has a provision for alternative methods which are
+       automatically used in case of failures and which do work on
+       MS-DOS.
+
+       Another error message that you might see is something like
+       this:
+
+         Word 'U.S.A' contains illegal characters
+
+       This means that some of the words in the EXTRADICT dictionary
+       are incompatible with Ispell, and Ispell is ignoring them when
+       it builds hashed dictionary.  (The file `/usr/dict/words' from
+       Solaris machines is known to have this problem.)  The rest of
+       the words are OK and will be used by Ispell, so here, too, you
+       don't have to do anything about the error message.
+
+    6) After Make finishes, install the programs and the dictionaries
+       as you see fit.  The dictionary files you need to install are
+       the files with a .hash extension in the subdirectories of
+       languages/ directory (e.g. languages/american/amermedx.hash),
+       the file languages/english/english.aff, and the documentation
+       files ispell.1, ispell.4, fields.3, and english.4l.  If you say
+       "make install", Make should do this automatically.
+
+    7) If you need to use some of the shell scripts (such as iwhich,
+       Makekit and splitdict), you will need to edit them to replace
+       the first line which says:
+
+	   : Use /bin/sh
+
+       to say this instead:
+
+	   #!/bin/sh
+
+
+4.  Dictionary names
+    ----------------
+
+    The filenames used for the dictionaries on Unix are too long for
+    MS-DOS, and will cause filename clashes or failed programs.
+    Therefore, the MS-DOS configuration script for DJGPP edits the
+    Makefiles to change these names as follows:
+
+         americansml   -> amersml
+	 americanmed   -> amermed
+	 americanlrg   -> amerlrg
+	 americanxlg   -> amerxlg
+	 altamersml    -> altasml
+	 altamermed    -> altamed
+	 altamerlrg    -> altalrg
+	 altamerxlg    -> altaxlg
+	 britishsml    -> britsml
+	 britishmed    -> britmed
+	 britishlrg    -> britlrg
+	 britishxlg    -> britxlg
+
+    In addition, the `+' character (which is invalid in MS-DOS
+    filenames) is converted into an `x', and if the `+' is at the end
+    of the extension, it is moved into the first 8 characters of the
+    basename.  Thus, americanlrg+.hash is converted into amerlrgx.hash
+    and american.sml+ into americax.sml:
+
+	 american.sml+ -> americax.sml
+	 american.med+ -> americax.med
+	 american.lrg+ -> americax.lrg
+	 american.xlg+ -> americax.xlg
+	 british.sml+  -> britishx.sml
+	 british.med+  -> britishx.med
+	 british.lrg+  -> britishx.lrg
+	 british.xlg+  -> britishx.xlg
+
+    These DOSified filenames are the ones that you should use if you
+    decide to change the dictionaries generated by the build process.
+    The easiest way to know what are the DOS names of the different
+    dictionaries is to look at the edited Makefiles in languages/
+    subdirectories after you build Ispell once for the default
+    dictionaries.
+
+
+5.  Environment variables
+    ---------------------
+
+    Ispell uses environment variables to make it easier to support
+    different installations.  Most of these variables tell Ispell
+    where to look for its hashed and private dictionaries.  These
+    variables are documented on the ispell.1 man page and in the Info
+    docs for Ispell.  Below is the list of DOS-specific environment
+    variables which are not covered by the Ispell docs:
+
+	ISPELL_OPTIONS - the default options to pass to Ispell.  These
+			 are passed to Ispell as if they were typed by
+			 you before all the options you actually
+			 mentioned on the Ispell command line.  Since
+			 Ispell parses options left to right,
+			 options from the command line may override
+			 those in `ISPELL_OPTIONS' variable.
+
+	ISPELL_DICTDIR - the directory where Ispell will look for the
+			 alternate hashed dictionary file.  The
+			 default dictionary pathname is built into
+			 Ispell when it is compiled (see the
+			 definition of LIBDIR and DEFHASH on local.h
+			 file, local.djgpp or local.emx), but you can
+			 set this variable which will allow you to
+			 name alternate dictionaries relative to the
+			 directory named by it, avoiding a long
+			 pathname.
+
+	ISPELL_HOME    - replaces HOME on Unix systems.  This is where
+			 Ispell looks for a personal dictionary if it
+			 is given as a relative pathname.
+
+	ISPELL_COLORS -  the colors which will be used by Ispell for
+			 the normal and "standout" text.  By default,
+			 these are the normal and inverse video
+			 colors, but you may set them to any colors
+			 you like.  The color descriptor is a pair of
+			 numbers separated by a dot; the first number
+			 is the color text attribute which will be set
+			 for the normal text, and the second is the
+			 attribute for the "standout" text (the
+			 misspelled words).  The text color attributes
+			 are the usual PC background/foreground
+			 definitions.  My favorite setting is this:
+
+			    set ISPELL_COLORS=0x1e.0x74
+
+			 which sets the normal colors to yellow on
+			 blue and the "standout" colors to red on
+			 white.  The color descriptor is parsed by a
+			 call to `strtoul' library function, so you
+			 can use octal and hex numbers as well as
+			 decimal ones.
+
+			 This color feature is only supported by the
+			 DJGPP port of Ispell.
+
+	LINES	      -  the size of the screen to be used by Ispell.
+			 Although this is not a DOS-specific variable,
+			 it does have a DOS-specific effect on the
+			 DJGPP port of Ispell: if the value of this
+			 variable is different from the current screen
+			 size, Ispell will set the screen size to the
+			 size given by LINES (and restore the original
+			 size when it exits or shells out to DOS).
+			 The following sizes are supported by the
+			 DJGPP port on a standard VGA display: 25, 28,
+			 35, 40, 43 and 50 lines.  If you want to run
+			 Ispell in some other non-standard screen
+			 size, set the display to that size before
+			 running Ispell and set LINES to that size.
+
+
+Enjoy,
+                                   Eli Zaretskii <eliz@is.elta.co.il>
