Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > c6d8198fd3a861c932152544cde921fd > files > 16

vile-9.5r-1mdv2008.0.src.rpm

# vile 9.5m - patch 2006/12/13 - Thomas Dickey <dickey@invisible-island.net>
# ------------------------------------------------------------------------------
# CHANGES            |   39 +
# MANIFEST           |    2 
# aclocal.m4         |   37 -
# bind.c             |   93 +-
# buffer.c           |   36 -
# chgdfunc.h         |    6 
# cmdtbl             |   10 
# configure          | 1740 +++++++++++++++++++++++++--------------------------
# display.c          |   26 
# doc/macros.doc     |   21 
# doc/ncu-indent     |   36 -
# edef.h             |   19 
# estruct.h          |   70 +-
# eval.c             |   36 -
# exec.c             |    4 
# filec.c            |    6 
# filters/xres.key   |   76 ++
# filters/xresfilt.l |    3 
# input.c            |  203 +++++
# insert.c           |    4 
# line.c             |  128 ++-
# macros/manpage.rc  |   64 +
# macros/modes.rc    |   49 +
# macros/vileinit.rc |    6 
# main.c             |  102 ++
# makefile.in        |    4 
# map.c              |   11 
# modes.c            |  135 +++
# modetbl            |   25 
# msgs.c             |   20 
# patchlev.h         |    2 
# path.c             |    4 
# proto.h            |  122 +--
# regexp.c           | 1174 +++++++++++++---------------------
# revlist            |   86 +-
# search.c           |    4 
# statevar.c         |   80 +-
# tags.c             |    4 
# trace.c            |    6 
# undo.c             |   27 
# vile-9.5.spec      |   11 
# vile.hlp           |  116 ++-
# vl_ctype.h         |   24 
# 43 files changed, 2609 insertions(+), 2062 deletions(-)
# ------------------------------------------------------------------------------
Index: CHANGES
--- vile-9.5l+/CHANGES	2006-11-08 00:22:05.000000000 +0000
+++ vile-9.5m/CHANGES	2006-12-13 01:31:20.000000000 +0000
@@ -1,5 +1,44 @@
 Changes for vile 9.6 (released ??? ??? ?? ????)
 
+ 20061212 (m)
+	> Tom Dickey:
+	+ add showvariables mode, for testing expressions used in [Variables].
+	+ correct comparisons used for handling bounds in regular expressions,
+	  e.g., the "2" in "\(this\|[l-m]\)\{2\}".
+	+ change behavior of regular expression OR'd alternatives - only the
+	  first match was used rather than the longest one.
+	+ fix configure script macros which omitted X_EXTRA_LIBS in one case,
+	  and repeated libs in another.
+	+ fill in complete list of event names for xres.key from Xt/TMParse.c
+	+ make ShowFormatted macro more configurable by allowing environment
+	  variables $VILE_NROFF_FILT and $VILE_TABLE_FILT to override the
+	  choice of programs therein.
+	+ disallow source'ing from the current directory if the source'd file
+	  might be writable by other users.
+	+ improve fences in vbs- and vbmode.
+	+ fix xresfilt.l; X resource files do not have embedded comments.
+	+ minor improvements/fixes to &default, to allow it to assume that
+	  '$' is implied for modes.
+	+ modify locale initialization to work with koi8rxterm.
+	+ add character classes [:ident:], [:octal:] and [:path:], and change
+	  the association of \w and \W to [:ident:], making [:alnum:] no longer
+	  include "_".
+	+ add cursor-tokens mode to control whether vile uses regular
+	  expressions, character classes or a combination to obtain tokens
+	  from the screen.
+	+ add $buf-fname-expr to show the combined bufname-expr, pathname-expr
+	  used to interpret ^X-e.
+	+ add bufname-expr, identifier-expr and pathname-expr buffer modes to
+	  provide regular expression parsing of $bufname, $identifier and
+	  $pathname in the show-variables command as well as for the related
+	  expansion of tokens from the cursor position.  If the expressions are
+	  empty, the code falls through to use the corresponding older
+	  character-class parsing.  Default values are provided for each *-expr
+	  mode.
+	+ fix a case where set-window might remove the only window before
+	  attempting to put a file in it.
+	+ quote "$HOME" in CF_SUBDIR_PATH, for cygwin users.
+
  20061107 (l)
 	> Tom Dickey:
 	+ modify ":describe-bindings" to show whether the command accepts a
Index: MANIFEST
--- vile-9.5l+/MANIFEST	2006-11-08 01:46:34.000000000 +0000
+++ vile-9.5m/MANIFEST	2006-12-14 01:05:53.000000000 +0000
@@ -1,4 +1,4 @@
-MANIFEST for vile, version v9_5l
+MANIFEST for vile, version v9_5m
 --------------------------------------------------------------------------------
 MANIFEST                        this file
 CHANGES                         Change-log for VILE
Index: aclocal.m4
Prereq:  1.165 
--- vile-9.5l+/aclocal.m4	2006-10-28 19:16:46.000000000 +0000
+++ vile-9.5m/aclocal.m4	2006-12-01 20:45:29.000000000 +0000
@@ -1,6 +1,6 @@
 dnl vile's local definitions for autoconf.
 dnl
-dnl $Header: /usr/build/vile/vile/RCS/aclocal.m4,v 1.165 2006/10/28 19:16:46 tom Exp $
+dnl $Header: /usr/build/vile/vile/RCS/aclocal.m4,v 1.167 2006/12/01 20:45:29 tom Exp $
 dnl
 dnl ---------------------------------------------------------------------------
 dnl ---------------------------------------------------------------------------
@@ -505,10 +505,11 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_CONFIG version: 1 updated: 2006/10/28 13:50:41
+dnl CF_CURSES_CONFIG version: 2 updated: 2006/10/29 11:06:27
 dnl ----------------
-dnl Tie together the configure-script macros for curses.
-dnl It might be ncurses - check for that as well.
+dnl Tie together the configure-script macros for curses.  It may be ncurses,
+dnl but unless asked, we do not make a special search for ncurses.  However,
+dnl still check for the ncurses version number, for use in other macros.
 AC_DEFUN([CF_CURSES_CONFIG],
 [
 CF_CURSES_CPPFLAGS
@@ -2596,7 +2597,7 @@
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SUBDIR_PATH version: 3 updated: 2002/12/29 18:30:46
+dnl CF_SUBDIR_PATH version: 4 updated: 2006/11/18 17:13:19
 dnl --------------
 dnl Construct a search-list for a nonstandard header/lib-file
 dnl	$1 = the variable to return as result
@@ -2605,19 +2606,19 @@
 AC_DEFUN([CF_SUBDIR_PATH],
 [$1=""
 
-test -d [$]HOME && {
+test -d "[$]HOME" && {
 	test -n "$verbose" && echo "	... testing $3-directories under [$]HOME"
-	test -d [$]HOME/$3 &&          $1="[$]$1 [$]HOME/$3"
-	test -d [$]HOME/$3/$2 &&       $1="[$]$1 [$]HOME/$3/$2"
-	test -d [$]HOME/$3/$2/$3 &&    $1="[$]$1 [$]HOME/$3/$2/$3"
+	test -d "[$]HOME/$3" &&          $1="[$]$1 [$]HOME/$3"
+	test -d "[$]HOME/$3/$2" &&       $1="[$]$1 [$]HOME/$3/$2"
+	test -d "[$]HOME/$3/$2/$3" &&    $1="[$]$1 [$]HOME/$3/$2/$3"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/$2 to the actual package location:
-test -d [$]HOME/$2 && {
+test -d "[$]HOME/$2" && {
 	test -n "$verbose" && echo "	... testing $3-directories under [$]HOME/$2"
-	test -d [$]HOME/$2/$3 &&       $1="[$]$1 [$]HOME/$2/$3"
-	test -d [$]HOME/$2/$3/$2 &&    $1="[$]$1 [$]HOME/$2/$3/$2"
+	test -d "[$]HOME/$2/$3" &&       $1="[$]$1 [$]HOME/$2/$3"
+	test -d "[$]HOME/$2/$3/$2" &&    $1="[$]$1 [$]HOME/$2/$3/$2"
 }
 
 test "$prefix" != /usr/local && \
@@ -3343,7 +3344,7 @@
 fi
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_X_ATHENA_LIBS version: 3 updated: 2003/02/16 15:24:54
+dnl CF_X_ATHENA_LIBS version: 6 updated: 2006/11/30 17:57:11
 dnl ----------------
 dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
 dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
@@ -3373,19 +3374,15 @@
 				LIBS="$cf_lib $LIBS"
 				AC_MSG_CHECKING(for $cf_test in $cf_lib)
 			fi
-			cf_SAVE="$LIBS"
-			LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
 			AC_TRY_LINK([],[$cf_test()],
 				[cf_result=yes],
 				[cf_result=no])
 			AC_MSG_RESULT($cf_result)
 			if test "$cf_result" = yes ; then
 				cf_x_athena_lib="$cf_lib"
-				LIBS="$cf_SAVE"
 				break
-			else
-				LIBS="$cf_save"
 			fi
+			LIBS="$cf_save"
 		fi
 	done
 done
@@ -3436,7 +3433,7 @@
 [Unable to successfully link OpenLook library (-lXol) with test program])) dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_X_TOOLKIT version: 10 updated: 2004/04/25 15:37:17
+dnl CF_X_TOOLKIT version: 11 updated: 2006/11/29 19:05:14
 dnl ------------
 dnl Check for X Toolkit libraries
 dnl
@@ -3461,7 +3458,7 @@
 AC_CHECK_LIB(Xt, XtAppInitialize,
 	[AC_DEFINE(HAVE_LIBXT)
 	 cf_have_X_LIBS=Xt
-	 LIBS="-lXt $X_PRE_LIBS $LIBS"],,
+	 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"],,
 	[$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])])
 
 if test $cf_have_X_LIBS = no ; then
Index: bind.c
Prereq:  1.300 
--- vile-9.5l+/bind.c	2006-11-08 00:32:20.000000000 +0000
+++ vile-9.5m/bind.c	2006-12-14 00:00:58.000000000 +0000
@@ -3,7 +3,7 @@
  *
  *	written 11-feb-86 by Daniel Lawrence
  *
- * $Header: /usr/build/vile/vile/RCS/bind.c,v 1.300 2006/11/08 00:32:20 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/bind.c,v 1.303 2006/12/14 00:00:58 tom Exp $
  *
  */
 
@@ -1442,6 +1442,28 @@
 #endif
 #endif /* OPT_PATHLOOKUP */
 
+#if SYS_UNIX
+/*
+ * Only source a startup file on Unix if it (and the directory in which it
+ * resides) happens to be in a directory owned by the current user, and neither
+ * is writable by other users.
+ */
+static int
+is_our_file(char *fname)
+{
+    int status = FALSE;
+    struct stat sb;
+
+    if (stat(fname, &sb) == 0) {
+	if ((sb.st_mode & 0022) == 0
+	    && sb.st_uid == getuid()) {
+	    status = TRUE;
+	}
+    }
+    return status;
+}
+#endif
+
 /* config files that vile is interested in may live in various places,
  * and which may be constrained to various r/w/x modes.  the files may
  * be
@@ -1468,7 +1490,20 @@
     /* look in the current directory */
     if (which & FL_CDIR) {
 	if (ffaccess(fname, mode)) {
-	    return (fname);
+#if SYS_UNIX
+	    int success = FALSE;
+	    char *dname = malloc(NFILEN + strlen(fname) + 10);
+	    if (dname != 0) {
+		sprintf(dname, "%s%c..", fname, vl_pathsep);
+		lengthen_path(dname);
+		if (is_our_file(dname) && is_our_file(fname)) {
+		    success = TRUE;
+		}
+		free(dname);
+	    }
+	    if (success)
+#endif
+		return (fname);
 	}
     }
 
@@ -1998,6 +2033,7 @@
  * since it is treated the same as
  *	^X-#-a
  */
+#if OPT_EVAL || OPT_REBIND
 static const char *
 decode_prefix(const char *kk, UINT * prefix)
 {
@@ -2049,7 +2085,6 @@
 }
 
 /* prc2kcod: translate printable code to 10 bit keycode */
-#if OPT_EVAL || OPT_REBIND
 static int
 prc2kcod(const char *kk)
 {
@@ -2181,12 +2216,13 @@
 }
 
 /* put a character to the keyboard-prompt */
-void
+int
 kbd_putc(int c)
 {
     BUFFER *savebp;
     WINDOW *savewp;
     MARK savemk;
+    int status;
 
     beginDisplay();
     savebp = curbp;
@@ -2196,12 +2232,12 @@
     savemk = MK;
     MK = DOT;
     if ((kbd_expand <= 0) && isreturn(c)) {
-	kbd_erase_to_end(0);
+	status = kbd_erase_to_end(0);
     } else {
 	if ((kbd_expand < 0) && (c == '\t')) {
-	    (void) linsert(1, ' ');
+	    status = linsert(1, ' ');
 	} else {
-	    (void) linsert(1, c);
+	    status = linsert(1, c);
 	}
 #ifdef VILE_DEBUG
 	TRACE(("mini:%2d:%s\n", llength(DOT.l), lp_visible(DOT.l)));
@@ -2211,6 +2247,8 @@
     curwp = savewp;
     MK = savemk;
     endofDisplay();
+
+    return status;
 }
 
 /* put a string to the keyboard-prompt */
@@ -2252,33 +2290,34 @@
     endofDisplay();
 }
 
-void
+int
 kbd_erase_to_end(int column)
 {
     BUFFER *savebp;
     WINDOW *savewp;
     MARK savemk;
 
-    if (!vl_echo || clhide)
-	return;
-
-    beginDisplay();
-    savebp = curbp;
-    savewp = curwp;
-    curbp = bminip;
-    curwp = wminip;
-    savemk = MK;
-    MK = DOT;
-    if (llength(DOT.l) > 0) {
-	DOT.o = column;
-	if (llength(DOT.l) > DOT.o)
-	    ldelete(llength(DOT.l) - DOT.o, FALSE);
-	TRACE(("NULL:%2d:%s\n", llength(DOT.l), lp_visible(DOT.l)));
+    if (vl_echo && !clhide) {
+	beginDisplay();
+	savebp = curbp;
+	savewp = curwp;
+	curbp = bminip;
+	curwp = wminip;
+	savemk = MK;
+	MK = DOT;
+	if (llength(DOT.l) > 0) {
+	    DOT.o = column;
+	    if (llength(DOT.l) > DOT.o)
+		ldelete(llength(DOT.l) - DOT.o, FALSE);
+	    TRACE(("NULL:%2d:%s\n", llength(DOT.l), lp_visible(DOT.l)));
+	}
+	curbp = savebp;
+	curwp = savewp;
+	MK = savemk;
+	endofDisplay();
     }
-    curbp = savebp;
-    curwp = savewp;
-    MK = savemk;
-    endofDisplay();
+
+    return TRUE;
 }
 
 #if OPT_CASELESS
Index: buffer.c
Prereq:  1.307 
--- vile-9.5l+/buffer.c	2006-11-02 21:01:24.000000000 +0000
+++ vile-9.5m/buffer.c	2006-12-03 16:48:16.000000000 +0000
@@ -5,7 +5,7 @@
  * keys. Like everyone else, they set hints
  * for the display system.
  *
- * $Header: /usr/build/vile/vile/RCS/buffer.c,v 1.307 2006/11/02 21:01:24 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/buffer.c,v 1.312 2006/12/03 16:48:16 tom Exp $
  *
  */
 
@@ -792,6 +792,7 @@
 {
     int status;
 
+    TRACE((T_CALLED "ask_for_bname\n"));
     if (clexec || isnamedcmd) {
 #if OPT_BNAME_CMPL
 	status = kbd_string(prompt, bufn, len,
@@ -799,11 +800,11 @@
 #else
 	status = mlreply(prompt, bufn, len);
 #endif
-    } else if ((status = screen_string(bufn, len, SCREEN_STRING)) != TRUE) {
+    } else if ((status = screen_to_bname(bufn, len)) != TRUE) {
 	mlforce("[Nothing selected]");
     }
 
-    return status;
+    returnCode(status);
 }
 
 /*
@@ -1204,7 +1205,7 @@
 int
 swbuffer_lfl(BUFFER *bp, int lockfl, int this_window)
 {
-    int s = TRUE;
+    int status = TRUE;
     WINDOW *wp;
 
     TRACE((T_CALLED "swbuffer_lfl(bp=%p, lockfl=%d, this_window=%d)\n",
@@ -1223,7 +1224,7 @@
 
 	if (!b_is_reading(bp) &&
 	    !bp->b_active)	/* on second thought, yes there is */
-	    s = suckitin(bp, TRUE, lockfl);
+	    status = suckitin(bp, TRUE, lockfl);
     } else {
 #if !WINMARK
 	/* Whatever else we do, make sure MK isn't bogus when we leave */
@@ -1234,7 +1235,10 @@
 	    /* if we'll have to take over this window, and it's the last */
 	    if ((this_window || bp->b_nwnd == 0)
 		&& curbp->b_nwnd != 0 && --(curbp->b_nwnd) == 0) {
-		undispbuff(curbp, curwp);
+#if !SMALLER
+		if (!this_window)
+#endif
+		    undispbuff(curbp, curwp);
 	    } else if (DOT.l != 0 && (this_window || bp->b_nwnd == 0)) {
 		/* Window is still getting taken over so make a
 		   copy of the traits for a possible future
@@ -1259,16 +1263,17 @@
 	    LINE *lp;
 	    int trait_matches;
 
-	    if (curwp == 0)
+	    if (curwp == 0 || curwp->w_bufp == 0)
 		returnCode(FALSE);
 	    else if (curwp->w_bufp == bp)
 		returnCode(TRUE);
 
-	    if (curwp->w_bufp->b_nwnd == 0)
+	    if (curwp->w_bufp->b_nwnd == 0) {
 		undispbuff(curwp->w_bufp, curwp);
-	    else
+	    } else {
 		copy_traits(&(curwp->w_bufp->b_wtraits),
 			    &(curwp->w_traits));
+	    }
 
 	    /* Initialize the window using the saved buffer traits if possible. 
 	     * If they don't pass a sanity check, simply initialize the newest
@@ -1305,7 +1310,7 @@
 		clone_window(curwp, wp);
 
 	    curwp->w_bufp = bp;
-	    s = suckitin(bp, (bp->b_nwnd++ == 0), lockfl);
+	    status = suckitin(bp, (bp->b_nwnd++ == 0), lockfl);
 	} else
 #endif /* !SMALLER */
 	    /* get it already on the screen if possible */
@@ -1322,19 +1327,19 @@
 		updatelistbuffers();
 #endif
 	    run_buffer_hook();
-	    s = (find_bp(bp) != 0);
+	    status = (find_bp(bp) != 0);
 	} else if (curwp == 0) {
-	    s = FALSE;		/* we haven't started displaying yet */
+	    status = FALSE;	/* we haven't started displaying yet */
 	} else {
 	    /* oh well, suck it into this window */
 	    curwp->w_bufp = bp;
-	    s = suckitin(bp, (bp->b_nwnd++ == 0), lockfl);
+	    status = suckitin(bp, (bp->b_nwnd++ == 0), lockfl);
 	}
     }
 #if OPT_TITLE
     set_editor_title();
 #endif
-    returnCode(s);
+    returnCode(status);
 }
 
 #if VILE_NEEDED
@@ -2469,6 +2474,9 @@
 	    bp->b_lastdot = nullmark;
 #if OPT_VIDEO_ATTRS
 #endif
+#if OPT_CURTOKENS
+	    set_buf_fname_expr(bp);
+#endif
 	    bp->b_flag = bflag;
 	    bp->b_acount = (short) b_val(bp, VAL_ASAVECNT);
 	    bp->b_fname = NULL;
Index: chgdfunc.h
Prereq:  1.19 
--- vile-9.5l+/chgdfunc.h	2006-10-16 21:37:35.000000000 +0000
+++ vile-9.5m/chgdfunc.h	2006-12-02 12:48:20.000000000 +0000
@@ -2,7 +2,7 @@
  * Prototypes for functions in the mode-tables (must be declared before the
  * point at which proto.h is included).
  *
- * $Header: /usr/build/vile/vile/RCS/chgdfunc.h,v 1.19 2006/10/16 21:37:35 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/chgdfunc.h,v 1.20 2006/12/02 12:48:20 tom Exp $
  */
 extern int chgd_autobuf  (CHGD_ARGS);
 extern int chgd_buffer   (CHGD_ARGS);
@@ -30,6 +30,10 @@
 extern int chgd_scheme   (CHGD_ARGS);
 #endif
 
+#if OPT_CURTOKENS   
+extern int chgd_curtokens(CHGD_ARGS);
+#endif
+
 #if OPT_MAJORMODE
 extern int chgd_mm_order (CHGD_ARGS);
 extern int chgd_filter   (CHGD_ARGS);
Index: cmdtbl
Prereq:  1.244 
--- vile-9.5l+/cmdtbl	2006-11-07 22:44:52.000000000 +0000
+++ vile-9.5m/cmdtbl	2006-12-01 21:23:01.000000000 +0000
@@ -97,7 +97,7 @@
 #		in '!' listed, then the flag does nothing, and should be
 #		viewed simply as documentation.
 #
-# $Header: /usr/build/vile/vile/RCS/cmdtbl,v 1.244 2006/11/07 22:44:52 tom Exp $
+# $Header: /usr/build/vile/vile/RCS/cmdtbl,v 1.245 2006/12/01 21:23:01 tom Exp $
 #
 #
 
@@ -717,7 +717,7 @@
 	"search-forward"		!FEWNAMES
 	'/'
 	'FN-f'				KEY_Find
-	<search forward for CNT'th occurrence of fresh pattern>
+	<search forward for CNT'th occurrence of fresh $identifier pattern>
 matchfence	ABSM|MOTION		OPT_CFENCE
 	"goto-matching-fence"		!FEWNAMES
 	'%'
@@ -1439,15 +1439,15 @@
 scrforwsearch	ABSM|MOTION
 	"screen-search-forward"		!FEWNAMES
 	'^X-/'
-	<search forward for pattern (word) under cursor>
+	<search forward for $identifier pattern under cursor>
 scrbacksearch	ABSM|MOTION
 	"screen-search-reverse"		!FEWNAMES
 	'^X-?'
-	<search backwards for pattern (word) under cursor>
+	<search backwards for $identifier pattern under cursor>
 scrsearchpat	NONE
 	"screen-search-pattern-grab"	!FEWNAMES
 	'^A-/'
-	<set search pattern to word under cursor>
+	<set search pattern to $identifier pattern under cursor>
 set_charclass	NONE			OPT_SHOW_CTYPE
 	"set-char-class"
 	<add characters to class, given keyword and regular expression>
Index: configure
--- vile-9.5l+/configure	2006-10-28 19:14:59.000000000 +0000
+++ vile-9.5m/configure	2006-12-01 21:34:27.000000000 +0000
@@ -8562,7 +8562,7 @@
 EOF
 
 	 cf_have_X_LIBS=Xt
-	 LIBS="-lXt $X_PRE_LIBS $LIBS"
+	 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
 fi
 
 fi
@@ -9979,10 +9979,8 @@
 				echo "$as_me:9979: checking for $cf_test in $cf_lib" >&5
 echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
 			fi
-			cf_SAVE="$LIBS"
-			LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
 			cat >conftest.$ac_ext <<_ACEOF
-#line 9985 "configure"
+#line 9983 "configure"
 #include "confdefs.h"
 
 int
@@ -9994,16 +9992,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9997: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9995: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10000: \$? = $ac_status" >&5
+  echo "$as_me:9998: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10003: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10001: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10006: \$? = $ac_status" >&5
+  echo "$as_me:10004: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -10012,21 +10010,19 @@
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-			echo "$as_me:10015: result: $cf_result" >&5
+			echo "$as_me:10013: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 			if test "$cf_result" = yes ; then
 				cf_x_athena_lib="$cf_lib"
-				LIBS="$cf_SAVE"
 				break
-			else
-				LIBS="$cf_save"
 			fi
+			LIBS="$cf_save"
 		fi
 	done
 done
 
 if test -z "$cf_x_athena_lib" ; then
-	{ { echo "$as_me:10029: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
+	{ { echo "$as_me:10025: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -10062,7 +10058,7 @@
 #define DISP_CURSES 1
 EOF
 
-echo "$as_me:10065: checking for extra include directories" >&5
+echo "$as_me:10061: checking for extra include directories" >&5
 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
 if test "${cf_cv_curses_incdir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10082,11 +10078,11 @@
 esac
 
 fi
-echo "$as_me:10085: result: $cf_cv_curses_incdir" >&5
+echo "$as_me:10081: result: $cf_cv_curses_incdir" >&5
 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
 
-echo "$as_me:10089: checking if we have identified curses headers" >&5
+echo "$as_me:10085: checking if we have identified curses headers" >&5
 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
 if test "${cf_cv_ncurses_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10100,7 +10096,7 @@
 	ncurses/ncurses.h
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 10103 "configure"
+#line 10099 "configure"
 #include "confdefs.h"
 #include <${cf_header}>
 int
@@ -10112,16 +10108,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10115: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10111: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10118: \$? = $ac_status" >&5
+  echo "$as_me:10114: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10121: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10117: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10124: \$? = $ac_status" >&5
+  echo "$as_me:10120: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_header=$cf_header; break
 else
@@ -10132,11 +10128,11 @@
 done
 
 fi
-echo "$as_me:10135: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:10131: result: $cf_cv_ncurses_header" >&5
 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
 
 if test "$cf_cv_ncurses_header" = none ; then
-	{ { echo "$as_me:10139: error: No curses header-files found" >&5
+	{ { echo "$as_me:10135: error: No curses header-files found" >&5
 echo "$as_me: error: No curses header-files found" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -10146,23 +10142,23 @@
 for ac_header in $cf_cv_ncurses_header
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:10149: checking for $ac_header" >&5
+echo "$as_me:10145: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10155 "configure"
+#line 10151 "configure"
 #include "confdefs.h"
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:10159: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10155: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:10165: \$? = $ac_status" >&5
+  echo "$as_me:10161: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -10181,7 +10177,7 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:10184: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:10180: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -10191,7 +10187,7 @@
 fi
 done
 
-echo "$as_me:10194: checking for terminfo header" >&5
+echo "$as_me:10190: checking for terminfo header" >&5
 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10209,7 +10205,7 @@
 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 10212 "configure"
+#line 10208 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -10224,16 +10220,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10227: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10223: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:10230: \$? = $ac_status" >&5
+  echo "$as_me:10226: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:10233: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10229: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10236: \$? = $ac_status" >&5
+  echo "$as_me:10232: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_term_header="$cf_test"
@@ -10249,7 +10245,7 @@
 done
 
 fi
-echo "$as_me:10252: result: $cf_cv_term_header" >&5
+echo "$as_me:10248: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 # Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -10278,7 +10274,7 @@
 	;;
 esac
 
-echo "$as_me:10281: checking for ncurses version" >&5
+echo "$as_me:10277: checking for ncurses version" >&5
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
 if test "${cf_cv_ncurses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10304,10 +10300,10 @@
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo "$as_me:10307: \"$cf_try\"") >&5
+	{ (eval echo "$as_me:10303: \"$cf_try\"") >&5
   (eval $cf_try) 2>&5
   ac_status=$?
-  echo "$as_me:10310: \$? = $ac_status" >&5
+  echo "$as_me:10306: \$? = $ac_status" >&5
   (exit $ac_status); }
 	if test -f conftest.out ; then
 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -10317,7 +10313,7 @@
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10320 "configure"
+#line 10316 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -10342,15 +10338,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:10345: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10341: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10348: \$? = $ac_status" >&5
+  echo "$as_me:10344: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:10350: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10346: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10353: \$? = $ac_status" >&5
+  echo "$as_me:10349: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -10364,16 +10360,16 @@
 	rm -f $cf_tempfile
 
 fi
-echo "$as_me:10367: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:10363: result: $cf_cv_ncurses_version" >&5
 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
 #define NCURSES 1
 EOF
 
-echo "$as_me:10373: checking if we have identified curses libraries" >&5
+echo "$as_me:10369: checking if we have identified curses libraries" >&5
 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
-#line 10376 "configure"
+#line 10372 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -10385,16 +10381,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10388: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10384: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10391: \$? = $ac_status" >&5
+  echo "$as_me:10387: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10394: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10390: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10397: \$? = $ac_status" >&5
+  echo "$as_me:10393: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -10403,13 +10399,13 @@
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:10406: result: $cf_result" >&5
+echo "$as_me:10402: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 
 if test "$cf_result" = no ; then
 case $host_os in #(vi
 freebsd*) #(vi
-	echo "$as_me:10412: checking for tgoto in -lmytinfo" >&5
+	echo "$as_me:10408: checking for tgoto in -lmytinfo" >&5
 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10417,7 +10413,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmytinfo  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 10420 "configure"
+#line 10416 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -10436,16 +10432,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10439: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10435: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10442: \$? = $ac_status" >&5
+  echo "$as_me:10438: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10445: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10441: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10448: \$? = $ac_status" >&5
+  echo "$as_me:10444: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_mytinfo_tgoto=yes
 else
@@ -10456,7 +10452,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:10459: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:10455: result: $ac_cv_lib_mytinfo_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
 if test $ac_cv_lib_mytinfo_tgoto = yes; then
   LIBS="-lmytinfo $LIBS"
@@ -10464,7 +10460,7 @@
 
 	;;
 hpux10.*) #(vi
-	echo "$as_me:10467: checking for initscr in -lcur_colr" >&5
+	echo "$as_me:10463: checking for initscr in -lcur_colr" >&5
 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10472,7 +10468,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcur_colr  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 10475 "configure"
+#line 10471 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -10491,16 +10487,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10494: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10490: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10497: \$? = $ac_status" >&5
+  echo "$as_me:10493: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10500: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10496: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10503: \$? = $ac_status" >&5
+  echo "$as_me:10499: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_cur_colr_initscr=yes
 else
@@ -10511,7 +10507,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:10514: result: $ac_cv_lib_cur_colr_initscr" >&5
+echo "$as_me:10510: result: $ac_cv_lib_cur_colr_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
 if test $ac_cv_lib_cur_colr_initscr = yes; then
 
@@ -10520,7 +10516,7 @@
 
 else
 
-	echo "$as_me:10523: checking for initscr in -lHcurses" >&5
+	echo "$as_me:10519: checking for initscr in -lHcurses" >&5
 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10528,7 +10524,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lHcurses  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 10531 "configure"
+#line 10527 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -10547,16 +10543,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10550: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10546: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10553: \$? = $ac_status" >&5
+  echo "$as_me:10549: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10556: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10552: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10559: \$? = $ac_status" >&5
+  echo "$as_me:10555: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_Hcurses_initscr=yes
 else
@@ -10567,7 +10563,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:10570: result: $ac_cv_lib_Hcurses_initscr" >&5
+echo "$as_me:10566: result: $ac_cv_lib_Hcurses_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
 if test $ac_cv_lib_Hcurses_initscr = yes; then
 
@@ -10605,13 +10601,13 @@
 
 	# Check for library containing tgoto.  Do this before curses library
 	# because it may be needed to link the test-case for initscr.
-	echo "$as_me:10608: checking for tgoto" >&5
+	echo "$as_me:10604: checking for tgoto" >&5
 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
 if test "${ac_cv_func_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 10614 "configure"
+#line 10610 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char tgoto (); below.  */
@@ -10642,16 +10638,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10645: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10641: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10648: \$? = $ac_status" >&5
+  echo "$as_me:10644: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10651: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10647: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10654: \$? = $ac_status" >&5
+  echo "$as_me:10650: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_tgoto=yes
 else
@@ -10661,7 +10657,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:10664: result: $ac_cv_func_tgoto" >&5
+echo "$as_me:10660: result: $ac_cv_func_tgoto" >&5
 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
 if test $ac_cv_func_tgoto = yes; then
   cf_term_lib=predefined
@@ -10670,7 +10666,7 @@
 		for cf_term_lib in $cf_check_list termcap termlib unknown
 		do
 			as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
-echo "$as_me:10673: checking for tgoto in -l$cf_term_lib" >&5
+echo "$as_me:10669: checking for tgoto in -l$cf_term_lib" >&5
 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10678,7 +10674,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$cf_term_lib  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 10681 "configure"
+#line 10677 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -10697,16 +10693,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10700: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10696: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10703: \$? = $ac_status" >&5
+  echo "$as_me:10699: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10706: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10702: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10709: \$? = $ac_status" >&5
+  echo "$as_me:10705: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Lib=yes"
 else
@@ -10717,7 +10713,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:10720: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:10716: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   break
@@ -10732,7 +10728,7 @@
 	for cf_curs_lib in $cf_check_list xcurses jcurses unknown
 	do
 		as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
-echo "$as_me:10735: checking for initscr in -l$cf_curs_lib" >&5
+echo "$as_me:10731: checking for initscr in -l$cf_curs_lib" >&5
 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10740,7 +10736,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$cf_curs_lib  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 10743 "configure"
+#line 10739 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -10759,16 +10755,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10762: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10758: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10765: \$? = $ac_status" >&5
+  echo "$as_me:10761: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10768: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10764: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10771: \$? = $ac_status" >&5
+  echo "$as_me:10767: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_Lib=yes"
 else
@@ -10779,23 +10775,23 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:10782: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:10778: result: `eval echo '${'$as_ac_Lib'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
   break
 fi
 
 	done
-	test $cf_curs_lib = unknown && { { echo "$as_me:10789: error: no curses library found" >&5
+	test $cf_curs_lib = unknown && { { echo "$as_me:10785: error: no curses library found" >&5
 echo "$as_me: error: no curses library found" >&2;}
    { (exit 1); exit 1; }; }
 
 	LIBS="-l$cf_curs_lib $cf_save_LIBS"
 	if test "$cf_term_lib" = unknown ; then
-		echo "$as_me:10795: checking if we can link with $cf_curs_lib library" >&5
+		echo "$as_me:10791: checking if we can link with $cf_curs_lib library" >&5
 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
 		cat >conftest.$ac_ext <<_ACEOF
-#line 10798 "configure"
+#line 10794 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -10807,16 +10803,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10810: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10806: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10813: \$? = $ac_status" >&5
+  echo "$as_me:10809: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10816: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10812: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10819: \$? = $ac_status" >&5
+  echo "$as_me:10815: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -10825,18 +10821,18 @@
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-		echo "$as_me:10828: result: $cf_result" >&5
+		echo "$as_me:10824: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
-		test $cf_result = no && { { echo "$as_me:10830: error: Cannot link curses library" >&5
+		test $cf_result = no && { { echo "$as_me:10826: error: Cannot link curses library" >&5
 echo "$as_me: error: Cannot link curses library" >&2;}
    { (exit 1); exit 1; }; }
 	elif test "$cf_curs_lib" = "$cf_term_lib" ; then
 		:
 	elif test "$cf_term_lib" != predefined ; then
-		echo "$as_me:10836: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
+		echo "$as_me:10832: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
 		cat >conftest.$ac_ext <<_ACEOF
-#line 10839 "configure"
+#line 10835 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -10848,16 +10844,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10851: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10847: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10854: \$? = $ac_status" >&5
+  echo "$as_me:10850: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10857: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10853: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10860: \$? = $ac_status" >&5
+  echo "$as_me:10856: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=no
 else
@@ -10866,7 +10862,7 @@
 
 			LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
 			cat >conftest.$ac_ext <<_ACEOF
-#line 10869 "configure"
+#line 10865 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -10878,16 +10874,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10881: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10877: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:10884: \$? = $ac_status" >&5
+  echo "$as_me:10880: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:10887: \"$ac_try\"") >&5
+  { (eval echo "$as_me:10883: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:10890: \$? = $ac_status" >&5
+  echo "$as_me:10886: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -10899,7 +10895,7 @@
 
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-		echo "$as_me:10902: result: $cf_result" >&5
+		echo "$as_me:10898: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 	fi
 fi
@@ -10942,7 +10938,7 @@
   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
   ;;
 *)
-  { { echo "$as_me:10945: error: expected a pathname, not \"$withval\"" >&5
+  { { echo "$as_me:10941: error: expected a pathname, not \"$withval\"" >&5
 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    { (exit 1); exit 1; }; }
   ;;
@@ -10960,7 +10956,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:10963: checking for $ac_word" >&5
+echo "$as_me:10959: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10977,7 +10973,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
-   echo "$as_me:10980: found $ac_dir/$ac_word" >&5
+   echo "$as_me:10976: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -10988,10 +10984,10 @@
 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
 
 if test -n "$NCURSES_CONFIG"; then
-  echo "$as_me:10991: result: $NCURSES_CONFIG" >&5
+  echo "$as_me:10987: result: $NCURSES_CONFIG" >&5
 echo "${ECHO_T}$NCURSES_CONFIG" >&6
 else
-  echo "$as_me:10994: result: no" >&5
+  echo "$as_me:10990: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -11026,7 +11022,7 @@
 test "$cf_cv_curses_dir" != "no" && \
 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
 
-echo "$as_me:11029: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:11025: checking for $cf_ncuhdr_root header in include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11038,7 +11034,7 @@
 	do
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11041 "configure"
+#line 11037 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -11062,16 +11058,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11065: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11061: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11068: \$? = $ac_status" >&5
+  echo "$as_me:11064: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11071: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11067: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11074: \$? = $ac_status" >&5
+  echo "$as_me:11070: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h=$cf_header
 
@@ -11086,14 +11082,14 @@
 	done
 
 fi
-echo "$as_me:11089: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:11085: result: $cf_cv_ncurses_h" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
 
 if test "$cf_cv_ncurses_h" != no ; then
 	cf_cv_ncurses_header=$cf_cv_ncurses_h
 else
 
-echo "$as_me:11096: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:11092: checking for $cf_ncuhdr_root include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h2+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11102,19 +11098,19 @@
 	test -n "$verbose" && echo
 	cf_search=""
 
-test -d $HOME && {
+test -d "$HOME" && {
 	test -n "$verbose" && echo "	... testing include-directories under $HOME"
-	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
-	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
-	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
+	test -d "$HOME/include" &&          cf_search="$cf_search $HOME/include"
+	test -d "$HOME/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
+	test -d "$HOME/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
-test -d $HOME/$cf_ncuhdr_root && {
+test -d "$HOME/$cf_ncuhdr_root" && {
 	test -n "$verbose" && echo "	... testing include-directories under $HOME/$cf_ncuhdr_root"
-	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
-	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+	test -d "$HOME/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
+	test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
 }
 
 test "$prefix" != /usr/local && \
@@ -11188,7 +11184,7 @@
 				cf_save_CPPFLAGS="$CPPFLAGS"
 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 11191 "configure"
+#line 11187 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -11200,16 +11196,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11203: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11199: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11206: \$? = $ac_status" >&5
+  echo "$as_me:11202: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11209: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11205: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11212: \$? = $ac_status" >&5
+  echo "$as_me:11208: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -11236,7 +11232,7 @@
 		do
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11239 "configure"
+#line 11235 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -11260,16 +11256,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11263: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11259: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11266: \$? = $ac_status" >&5
+  echo "$as_me:11262: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11269: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11265: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11272: \$? = $ac_status" >&5
+  echo "$as_me:11268: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h2=$cf_header
 
@@ -11290,12 +11286,12 @@
 		CPPFLAGS="$cf_save2_CPPFLAGS"
 		test "$cf_cv_ncurses_h2" != no && break
 	done
-	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11293: error: not found" >&5
+	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11289: error: not found" >&5
 echo "$as_me: error: not found" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:11298: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:11294: result: $cf_cv_ncurses_h2" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
 
 	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -11317,7 +11313,7 @@
 				cf_save_CPPFLAGS="$CPPFLAGS"
 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 11320 "configure"
+#line 11316 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -11329,16 +11325,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11332: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11328: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11335: \$? = $ac_status" >&5
+  echo "$as_me:11331: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11338: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11334: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11341: \$? = $ac_status" >&5
+  echo "$as_me:11337: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -11387,7 +11383,7 @@
 	;;
 esac
 
-echo "$as_me:11390: checking for terminfo header" >&5
+echo "$as_me:11386: checking for terminfo header" >&5
 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11405,7 +11401,7 @@
 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 11408 "configure"
+#line 11404 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -11420,16 +11416,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11423: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11419: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:11426: \$? = $ac_status" >&5
+  echo "$as_me:11422: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:11429: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11425: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11432: \$? = $ac_status" >&5
+  echo "$as_me:11428: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_term_header="$cf_test"
@@ -11445,7 +11441,7 @@
 done
 
 fi
-echo "$as_me:11448: result: $cf_cv_term_header" >&5
+echo "$as_me:11444: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 # Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -11479,7 +11475,7 @@
 #define NCURSES 1
 EOF
 
-echo "$as_me:11482: checking for ncurses version" >&5
+echo "$as_me:11478: checking for ncurses version" >&5
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
 if test "${cf_cv_ncurses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11505,10 +11501,10 @@
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo "$as_me:11508: \"$cf_try\"") >&5
+	{ (eval echo "$as_me:11504: \"$cf_try\"") >&5
   (eval $cf_try) 2>&5
   ac_status=$?
-  echo "$as_me:11511: \$? = $ac_status" >&5
+  echo "$as_me:11507: \$? = $ac_status" >&5
   (exit $ac_status); }
 	if test -f conftest.out ; then
 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -11518,7 +11514,7 @@
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11521 "configure"
+#line 11517 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -11543,15 +11539,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11546: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11542: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11549: \$? = $ac_status" >&5
+  echo "$as_me:11545: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:11551: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11547: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11554: \$? = $ac_status" >&5
+  echo "$as_me:11550: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -11565,7 +11561,7 @@
 	rm -f $cf_tempfile
 
 fi
-echo "$as_me:11568: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:11564: result: $cf_cv_ncurses_version" >&5
 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
 #define NCURSES 1
@@ -11577,7 +11573,7 @@
 	# to link gpm.
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
-echo "$as_me:11580: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:11576: checking for Gpm_Open in -lgpm" >&5
 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11585,7 +11581,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 11588 "configure"
+#line 11584 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -11604,16 +11600,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11607: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11603: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11610: \$? = $ac_status" >&5
+  echo "$as_me:11606: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11613: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11609: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11616: \$? = $ac_status" >&5
+  echo "$as_me:11612: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_Gpm_Open=yes
 else
@@ -11624,10 +11620,10 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:11627: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:11623: result: $ac_cv_lib_gpm_Gpm_Open" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
-  echo "$as_me:11630: checking for initscr in -lgpm" >&5
+  echo "$as_me:11626: checking for initscr in -lgpm" >&5
 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11635,7 +11631,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 11638 "configure"
+#line 11634 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -11654,16 +11650,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11657: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11653: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11660: \$? = $ac_status" >&5
+  echo "$as_me:11656: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11663: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11659: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11666: \$? = $ac_status" >&5
+  echo "$as_me:11662: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_initscr=yes
 else
@@ -11674,7 +11670,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:11677: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:11673: result: $ac_cv_lib_gpm_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
 if test $ac_cv_lib_gpm_initscr = yes; then
   LIBS="$cf_ncurses_SAVE"
@@ -11689,7 +11685,7 @@
 	# This is only necessary if you are linking against an obsolete
 	# version of ncurses (but it should do no harm, since it's static).
 	if test "$cf_nculib_root" = ncurses ; then
-		echo "$as_me:11692: checking for tgoto in -lmytinfo" >&5
+		echo "$as_me:11688: checking for tgoto in -lmytinfo" >&5
 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11697,7 +11693,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmytinfo  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 11700 "configure"
+#line 11696 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -11716,16 +11712,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11719: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11715: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11722: \$? = $ac_status" >&5
+  echo "$as_me:11718: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11725: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11721: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11728: \$? = $ac_status" >&5
+  echo "$as_me:11724: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_mytinfo_tgoto=yes
 else
@@ -11736,7 +11732,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:11739: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:11735: result: $ac_cv_lib_mytinfo_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
 if test $ac_cv_lib_mytinfo_tgoto = yes; then
   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -11755,13 +11751,13 @@
 
 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
 	cf_libdir=""
-	echo "$as_me:11758: checking for initscr" >&5
+	echo "$as_me:11754: checking for initscr" >&5
 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
 if test "${ac_cv_func_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 11764 "configure"
+#line 11760 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr (); below.  */
@@ -11792,16 +11788,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11795: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11791: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11798: \$? = $ac_status" >&5
+  echo "$as_me:11794: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11801: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11797: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11804: \$? = $ac_status" >&5
+  echo "$as_me:11800: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_initscr=yes
 else
@@ -11811,18 +11807,18 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:11814: result: $ac_cv_func_initscr" >&5
+echo "$as_me:11810: result: $ac_cv_func_initscr" >&5
 echo "${ECHO_T}$ac_cv_func_initscr" >&6
 if test $ac_cv_func_initscr = yes; then
   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 else
 
 		cf_save_LIBS="$LIBS"
-		echo "$as_me:11821: checking for initscr in -l$cf_nculib_root" >&5
+		echo "$as_me:11817: checking for initscr in -l$cf_nculib_root" >&5
 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
 		LIBS="-l$cf_nculib_root $LIBS"
 		cat >conftest.$ac_ext <<_ACEOF
-#line 11825 "configure"
+#line 11821 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -11834,41 +11830,41 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11837: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11833: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11840: \$? = $ac_status" >&5
+  echo "$as_me:11836: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11843: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11839: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11846: \$? = $ac_status" >&5
+  echo "$as_me:11842: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:11848: result: yes" >&5
+  echo "$as_me:11844: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:11855: result: no" >&5
+echo "$as_me:11851: result: no" >&5
 echo "${ECHO_T}no" >&6
 			cf_search=""
 
-test -d $HOME && {
+test -d "$HOME" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME"
-	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
-	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
-	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
+	test -d "$HOME/lib" &&          cf_search="$cf_search $HOME/lib"
+	test -d "$HOME/lib/$cf_nculib_root" &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
+	test -d "$HOME/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
-test -d $HOME/$cf_nculib_root && {
+test -d "$HOME/$cf_nculib_root" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME/$cf_nculib_root"
-	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
-	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
+	test -d "$HOME/$cf_nculib_root/lib" &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
+	test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
 }
 
 test "$prefix" != /usr/local && \
@@ -11912,11 +11908,11 @@
 
 			for cf_libdir in $cf_search
 			do
-				echo "$as_me:11915: checking for -l$cf_nculib_root in $cf_libdir" >&5
+				echo "$as_me:11911: checking for -l$cf_nculib_root in $cf_libdir" >&5
 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 11919 "configure"
+#line 11915 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -11928,25 +11924,25 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11931: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11927: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11934: \$? = $ac_status" >&5
+  echo "$as_me:11930: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:11937: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11933: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:11940: \$? = $ac_status" >&5
+  echo "$as_me:11936: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:11942: result: yes" >&5
+  echo "$as_me:11938: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 					 break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:11949: result: no" >&5
+echo "$as_me:11945: result: no" >&5
 echo "${ECHO_T}no" >&6
 					 LIBS="$cf_save_LIBS"
 fi
@@ -11961,7 +11957,7 @@
 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
 
 if test $cf_found_library = no ; then
-	{ { echo "$as_me:11964: error: Cannot link $cf_nculib_root library" >&5
+	{ { echo "$as_me:11960: error: Cannot link $cf_nculib_root library" >&5
 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -11969,7 +11965,7 @@
 fi
 
 if test -n "$cf_ncurses_LIBS" ; then
-	echo "$as_me:11972: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+	echo "$as_me:11968: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
 	cf_ncurses_SAVE="$LIBS"
 	for p in $cf_ncurses_LIBS ; do
@@ -11979,7 +11975,7 @@
 		fi
 	done
 	cat >conftest.$ac_ext <<_ACEOF
-#line 11982 "configure"
+#line 11978 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -11991,23 +11987,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11994: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11990: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:11997: \$? = $ac_status" >&5
+  echo "$as_me:11993: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12000: \"$ac_try\"") >&5
+  { (eval echo "$as_me:11996: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12003: \$? = $ac_status" >&5
+  echo "$as_me:11999: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:12005: result: yes" >&5
+  echo "$as_me:12001: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:12010: result: no" >&5
+echo "$as_me:12006: result: no" >&5
 echo "${ECHO_T}no" >&6
 		 LIBS="$cf_ncurses_SAVE"
 fi
@@ -12037,7 +12033,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:12040: checking for $ac_word" >&5
+echo "$as_me:12036: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12054,7 +12050,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
-   echo "$as_me:12057: found $ac_dir/$ac_word" >&5
+   echo "$as_me:12053: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -12065,10 +12061,10 @@
 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
 
 if test -n "$NCURSES_CONFIG"; then
-  echo "$as_me:12068: result: $NCURSES_CONFIG" >&5
+  echo "$as_me:12064: result: $NCURSES_CONFIG" >&5
 echo "${ECHO_T}$NCURSES_CONFIG" >&6
 else
-  echo "$as_me:12071: result: no" >&5
+  echo "$as_me:12067: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -12103,7 +12099,7 @@
 test "$cf_cv_curses_dir" != "no" && \
 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
 
-echo "$as_me:12106: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:12102: checking for $cf_ncuhdr_root header in include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12115,7 +12111,7 @@
 	do
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12118 "configure"
+#line 12114 "configure"
 #include "confdefs.h"
 
 #define _XOPEN_SOURCE_EXTENDED
@@ -12147,16 +12143,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12150: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12146: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12153: \$? = $ac_status" >&5
+  echo "$as_me:12149: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12156: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12152: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12159: \$? = $ac_status" >&5
+  echo "$as_me:12155: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h=$cf_header
 
@@ -12171,14 +12167,14 @@
 	done
 
 fi
-echo "$as_me:12174: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:12170: result: $cf_cv_ncurses_h" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
 
 if test "$cf_cv_ncurses_h" != no ; then
 	cf_cv_ncurses_header=$cf_cv_ncurses_h
 else
 
-echo "$as_me:12181: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:12177: checking for $cf_ncuhdr_root include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h2+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12187,19 +12183,19 @@
 	test -n "$verbose" && echo
 	cf_search=""
 
-test -d $HOME && {
+test -d "$HOME" && {
 	test -n "$verbose" && echo "	... testing include-directories under $HOME"
-	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
-	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
-	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
+	test -d "$HOME/include" &&          cf_search="$cf_search $HOME/include"
+	test -d "$HOME/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
+	test -d "$HOME/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
-test -d $HOME/$cf_ncuhdr_root && {
+test -d "$HOME/$cf_ncuhdr_root" && {
 	test -n "$verbose" && echo "	... testing include-directories under $HOME/$cf_ncuhdr_root"
-	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
-	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+	test -d "$HOME/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
+	test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
 }
 
 test "$prefix" != /usr/local && \
@@ -12273,7 +12269,7 @@
 				cf_save_CPPFLAGS="$CPPFLAGS"
 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 12276 "configure"
+#line 12272 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -12285,16 +12281,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12288: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12284: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12291: \$? = $ac_status" >&5
+  echo "$as_me:12287: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12294: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12290: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12297: \$? = $ac_status" >&5
+  echo "$as_me:12293: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -12321,7 +12317,7 @@
 		do
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 12324 "configure"
+#line 12320 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -12345,16 +12341,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12348: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12344: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12351: \$? = $ac_status" >&5
+  echo "$as_me:12347: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12354: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12350: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12357: \$? = $ac_status" >&5
+  echo "$as_me:12353: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h2=$cf_header
 
@@ -12375,12 +12371,12 @@
 		CPPFLAGS="$cf_save2_CPPFLAGS"
 		test "$cf_cv_ncurses_h2" != no && break
 	done
-	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:12378: error: not found" >&5
+	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:12374: error: not found" >&5
 echo "$as_me: error: not found" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:12383: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:12379: result: $cf_cv_ncurses_h2" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
 
 	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -12402,7 +12398,7 @@
 				cf_save_CPPFLAGS="$CPPFLAGS"
 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 12405 "configure"
+#line 12401 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -12414,16 +12410,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12417: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12413: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12420: \$? = $ac_status" >&5
+  echo "$as_me:12416: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12423: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12419: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12426: \$? = $ac_status" >&5
+  echo "$as_me:12422: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -12472,7 +12468,7 @@
 	;;
 esac
 
-echo "$as_me:12475: checking for terminfo header" >&5
+echo "$as_me:12471: checking for terminfo header" >&5
 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12490,7 +12486,7 @@
 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 12493 "configure"
+#line 12489 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -12505,16 +12501,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12508: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12504: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:12511: \$? = $ac_status" >&5
+  echo "$as_me:12507: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:12514: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12510: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12517: \$? = $ac_status" >&5
+  echo "$as_me:12513: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_term_header="$cf_test"
@@ -12530,7 +12526,7 @@
 done
 
 fi
-echo "$as_me:12533: result: $cf_cv_term_header" >&5
+echo "$as_me:12529: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 # Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -12564,7 +12560,7 @@
 #define NCURSES 1
 EOF
 
-echo "$as_me:12567: checking for ncurses version" >&5
+echo "$as_me:12563: checking for ncurses version" >&5
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
 if test "${cf_cv_ncurses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12590,10 +12586,10 @@
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo "$as_me:12593: \"$cf_try\"") >&5
+	{ (eval echo "$as_me:12589: \"$cf_try\"") >&5
   (eval $cf_try) 2>&5
   ac_status=$?
-  echo "$as_me:12596: \$? = $ac_status" >&5
+  echo "$as_me:12592: \$? = $ac_status" >&5
   (exit $ac_status); }
 	if test -f conftest.out ; then
 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -12603,7 +12599,7 @@
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 12606 "configure"
+#line 12602 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -12628,15 +12624,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12631: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12627: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12634: \$? = $ac_status" >&5
+  echo "$as_me:12630: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:12636: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12632: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12639: \$? = $ac_status" >&5
+  echo "$as_me:12635: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -12650,7 +12646,7 @@
 	rm -f $cf_tempfile
 
 fi
-echo "$as_me:12653: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:12649: result: $cf_cv_ncurses_version" >&5
 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
 #define NCURSES 1
@@ -12662,7 +12658,7 @@
 	# to link gpm.
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
-echo "$as_me:12665: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:12661: checking for Gpm_Open in -lgpm" >&5
 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12670,7 +12666,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12673 "configure"
+#line 12669 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -12689,16 +12685,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12692: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12688: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12695: \$? = $ac_status" >&5
+  echo "$as_me:12691: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12698: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12694: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12701: \$? = $ac_status" >&5
+  echo "$as_me:12697: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_Gpm_Open=yes
 else
@@ -12709,10 +12705,10 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:12712: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:12708: result: $ac_cv_lib_gpm_Gpm_Open" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
-  echo "$as_me:12715: checking for initscr in -lgpm" >&5
+  echo "$as_me:12711: checking for initscr in -lgpm" >&5
 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12720,7 +12716,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12723 "configure"
+#line 12719 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -12739,16 +12735,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12742: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12738: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12745: \$? = $ac_status" >&5
+  echo "$as_me:12741: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12748: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12744: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12751: \$? = $ac_status" >&5
+  echo "$as_me:12747: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_initscr=yes
 else
@@ -12759,7 +12755,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:12762: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:12758: result: $ac_cv_lib_gpm_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
 if test $ac_cv_lib_gpm_initscr = yes; then
   LIBS="$cf_ncurses_SAVE"
@@ -12774,7 +12770,7 @@
 	# This is only necessary if you are linking against an obsolete
 	# version of ncurses (but it should do no harm, since it's static).
 	if test "$cf_nculib_root" = ncurses ; then
-		echo "$as_me:12777: checking for tgoto in -lmytinfo" >&5
+		echo "$as_me:12773: checking for tgoto in -lmytinfo" >&5
 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12782,7 +12778,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmytinfo  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 12785 "configure"
+#line 12781 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -12801,16 +12797,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12804: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12800: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12807: \$? = $ac_status" >&5
+  echo "$as_me:12803: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12810: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12806: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12813: \$? = $ac_status" >&5
+  echo "$as_me:12809: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_mytinfo_tgoto=yes
 else
@@ -12821,7 +12817,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:12824: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:12820: result: $ac_cv_lib_mytinfo_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
 if test $ac_cv_lib_mytinfo_tgoto = yes; then
   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -12840,13 +12836,13 @@
 
 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
 	cf_libdir=""
-	echo "$as_me:12843: checking for initscr" >&5
+	echo "$as_me:12839: checking for initscr" >&5
 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
 if test "${ac_cv_func_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 12849 "configure"
+#line 12845 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr (); below.  */
@@ -12877,16 +12873,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12880: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12876: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12883: \$? = $ac_status" >&5
+  echo "$as_me:12879: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12886: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12882: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12889: \$? = $ac_status" >&5
+  echo "$as_me:12885: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_initscr=yes
 else
@@ -12896,18 +12892,18 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:12899: result: $ac_cv_func_initscr" >&5
+echo "$as_me:12895: result: $ac_cv_func_initscr" >&5
 echo "${ECHO_T}$ac_cv_func_initscr" >&6
 if test $ac_cv_func_initscr = yes; then
   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 else
 
 		cf_save_LIBS="$LIBS"
-		echo "$as_me:12906: checking for initscr in -l$cf_nculib_root" >&5
+		echo "$as_me:12902: checking for initscr in -l$cf_nculib_root" >&5
 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
 		LIBS="-l$cf_nculib_root $LIBS"
 		cat >conftest.$ac_ext <<_ACEOF
-#line 12910 "configure"
+#line 12906 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -12919,41 +12915,41 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12922: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:12925: \$? = $ac_status" >&5
+  echo "$as_me:12921: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:12928: \"$ac_try\"") >&5
+  { (eval echo "$as_me:12924: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:12931: \$? = $ac_status" >&5
+  echo "$as_me:12927: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:12933: result: yes" >&5
+  echo "$as_me:12929: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:12940: result: no" >&5
+echo "$as_me:12936: result: no" >&5
 echo "${ECHO_T}no" >&6
 			cf_search=""
 
-test -d $HOME && {
+test -d "$HOME" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME"
-	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
-	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
-	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
+	test -d "$HOME/lib" &&          cf_search="$cf_search $HOME/lib"
+	test -d "$HOME/lib/$cf_nculib_root" &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
+	test -d "$HOME/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
-test -d $HOME/$cf_nculib_root && {
+test -d "$HOME/$cf_nculib_root" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME/$cf_nculib_root"
-	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
-	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
+	test -d "$HOME/$cf_nculib_root/lib" &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
+	test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
 }
 
 test "$prefix" != /usr/local && \
@@ -12997,11 +12993,11 @@
 
 			for cf_libdir in $cf_search
 			do
-				echo "$as_me:13000: checking for -l$cf_nculib_root in $cf_libdir" >&5
+				echo "$as_me:12996: checking for -l$cf_nculib_root in $cf_libdir" >&5
 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 13004 "configure"
+#line 13000 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -13013,25 +13009,25 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13016: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13012: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13019: \$? = $ac_status" >&5
+  echo "$as_me:13015: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13022: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13018: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13025: \$? = $ac_status" >&5
+  echo "$as_me:13021: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:13027: result: yes" >&5
+  echo "$as_me:13023: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 					 break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:13034: result: no" >&5
+echo "$as_me:13030: result: no" >&5
 echo "${ECHO_T}no" >&6
 					 LIBS="$cf_save_LIBS"
 fi
@@ -13046,7 +13042,7 @@
 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
 
 if test $cf_found_library = no ; then
-	{ { echo "$as_me:13049: error: Cannot link $cf_nculib_root library" >&5
+	{ { echo "$as_me:13045: error: Cannot link $cf_nculib_root library" >&5
 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -13054,7 +13050,7 @@
 fi
 
 if test -n "$cf_ncurses_LIBS" ; then
-	echo "$as_me:13057: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+	echo "$as_me:13053: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
 	cf_ncurses_SAVE="$LIBS"
 	for p in $cf_ncurses_LIBS ; do
@@ -13064,7 +13060,7 @@
 		fi
 	done
 	cat >conftest.$ac_ext <<_ACEOF
-#line 13067 "configure"
+#line 13063 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -13076,23 +13072,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13079: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13075: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13082: \$? = $ac_status" >&5
+  echo "$as_me:13078: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13085: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13081: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13088: \$? = $ac_status" >&5
+  echo "$as_me:13084: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:13090: result: yes" >&5
+  echo "$as_me:13086: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:13095: result: no" >&5
+echo "$as_me:13091: result: no" >&5
 echo "${ECHO_T}no" >&6
 		 LIBS="$cf_ncurses_SAVE"
 fi
@@ -13115,7 +13111,7 @@
 #define DISP_TERMCAP 1
 EOF
 
-		echo "$as_me:13118: checking if you want to use ncurses" >&5
+		echo "$as_me:13114: checking if you want to use ncurses" >&5
 echo $ECHO_N "checking if you want to use ncurses... $ECHO_C" >&6
 
 # Check whether --with-ncurses or --without-ncurses was given.
@@ -13125,7 +13121,7 @@
 else
   withval=no
 fi;
-		echo "$as_me:13128: result: $withval" >&5
+		echo "$as_me:13124: result: $withval" >&5
 echo "${ECHO_T}$withval" >&6
 
 if test "${cf_cv_termlib+set}" = set; then
@@ -13134,7 +13130,7 @@
 
 cf_cv_termlib=none
 cat >conftest.$ac_ext <<_ACEOF
-#line 13137 "configure"
+#line 13133 "configure"
 #include "confdefs.h"
 
 int
@@ -13146,19 +13142,19 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13149: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13145: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13152: \$? = $ac_status" >&5
+  echo "$as_me:13148: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13155: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13151: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13158: \$? = $ac_status" >&5
+  echo "$as_me:13154: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cat >conftest.$ac_ext <<_ACEOF
-#line 13161 "configure"
+#line 13157 "configure"
 #include "confdefs.h"
 
 int
@@ -13170,16 +13166,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13173: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13169: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13176: \$? = $ac_status" >&5
+  echo "$as_me:13172: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13179: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13175: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13182: \$? = $ac_status" >&5
+  echo "$as_me:13178: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_termlib=terminfo
 else
@@ -13204,7 +13200,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:13207: checking for $ac_word" >&5
+echo "$as_me:13203: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13221,7 +13217,7 @@
   test -z "$ac_dir" && ac_dir=.
   if $as_executable_p "$ac_dir/$ac_word"; then
    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
-   echo "$as_me:13224: found $ac_dir/$ac_word" >&5
+   echo "$as_me:13220: found $ac_dir/$ac_word" >&5
    break
 fi
 done
@@ -13232,10 +13228,10 @@
 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
 
 if test -n "$NCURSES_CONFIG"; then
-  echo "$as_me:13235: result: $NCURSES_CONFIG" >&5
+  echo "$as_me:13231: result: $NCURSES_CONFIG" >&5
 echo "${ECHO_T}$NCURSES_CONFIG" >&6
 else
-  echo "$as_me:13238: result: no" >&5
+  echo "$as_me:13234: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -13270,7 +13266,7 @@
 test "$cf_cv_curses_dir" != "no" && \
 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
 
-echo "$as_me:13273: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:13269: checking for $cf_ncuhdr_root header in include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13282,7 +13278,7 @@
 	do
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 13285 "configure"
+#line 13281 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -13306,16 +13302,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13309: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13305: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13312: \$? = $ac_status" >&5
+  echo "$as_me:13308: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13315: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13311: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13318: \$? = $ac_status" >&5
+  echo "$as_me:13314: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h=$cf_header
 
@@ -13330,14 +13326,14 @@
 	done
 
 fi
-echo "$as_me:13333: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:13329: result: $cf_cv_ncurses_h" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
 
 if test "$cf_cv_ncurses_h" != no ; then
 	cf_cv_ncurses_header=$cf_cv_ncurses_h
 else
 
-echo "$as_me:13340: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:13336: checking for $cf_ncuhdr_root include-path" >&5
 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
 if test "${cf_cv_ncurses_h2+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13346,19 +13342,19 @@
 	test -n "$verbose" && echo
 	cf_search=""
 
-test -d $HOME && {
+test -d "$HOME" && {
 	test -n "$verbose" && echo "	... testing include-directories under $HOME"
-	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
-	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
-	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
+	test -d "$HOME/include" &&          cf_search="$cf_search $HOME/include"
+	test -d "$HOME/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
+	test -d "$HOME/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
-test -d $HOME/$cf_ncuhdr_root && {
+test -d "$HOME/$cf_ncuhdr_root" && {
 	test -n "$verbose" && echo "	... testing include-directories under $HOME/$cf_ncuhdr_root"
-	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
-	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+	test -d "$HOME/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
+	test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
 }
 
 test "$prefix" != /usr/local && \
@@ -13432,7 +13428,7 @@
 				cf_save_CPPFLAGS="$CPPFLAGS"
 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 13435 "configure"
+#line 13431 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -13444,16 +13440,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13447: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13443: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13450: \$? = $ac_status" >&5
+  echo "$as_me:13446: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13453: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13449: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13456: \$? = $ac_status" >&5
+  echo "$as_me:13452: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -13480,7 +13476,7 @@
 		do
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 13483 "configure"
+#line 13479 "configure"
 #include "confdefs.h"
 
 #include <$cf_header>
@@ -13504,16 +13500,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13507: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13503: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13510: \$? = $ac_status" >&5
+  echo "$as_me:13506: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13513: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13509: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13516: \$? = $ac_status" >&5
+  echo "$as_me:13512: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ncurses_h2=$cf_header
 
@@ -13534,12 +13530,12 @@
 		CPPFLAGS="$cf_save2_CPPFLAGS"
 		test "$cf_cv_ncurses_h2" != no && break
 	done
-	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:13537: error: not found" >&5
+	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:13533: error: not found" >&5
 echo "$as_me: error: not found" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:13542: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:13538: result: $cf_cv_ncurses_h2" >&5
 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
 
 	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -13561,7 +13557,7 @@
 				cf_save_CPPFLAGS="$CPPFLAGS"
 				CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 13564 "configure"
+#line 13560 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -13573,16 +13569,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13576: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13572: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13579: \$? = $ac_status" >&5
+  echo "$as_me:13575: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13582: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13578: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13585: \$? = $ac_status" >&5
+  echo "$as_me:13581: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   :
 else
@@ -13631,7 +13627,7 @@
 	;;
 esac
 
-echo "$as_me:13634: checking for terminfo header" >&5
+echo "$as_me:13630: checking for terminfo header" >&5
 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13649,7 +13645,7 @@
 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
 do
 cat >conftest.$ac_ext <<_ACEOF
-#line 13652 "configure"
+#line 13648 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -13664,16 +13660,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13667: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13663: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:13670: \$? = $ac_status" >&5
+  echo "$as_me:13666: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:13673: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13669: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13676: \$? = $ac_status" >&5
+  echo "$as_me:13672: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_term_header="$cf_test"
@@ -13689,7 +13685,7 @@
 done
 
 fi
-echo "$as_me:13692: result: $cf_cv_term_header" >&5
+echo "$as_me:13688: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 # Set definitions to allow ifdef'ing to accommodate subdirectories
@@ -13723,7 +13719,7 @@
 #define NCURSES 1
 EOF
 
-echo "$as_me:13726: checking for ncurses version" >&5
+echo "$as_me:13722: checking for ncurses version" >&5
 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
 if test "${cf_cv_ncurses_version+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13749,10 +13745,10 @@
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo "$as_me:13752: \"$cf_try\"") >&5
+	{ (eval echo "$as_me:13748: \"$cf_try\"") >&5
   (eval $cf_try) 2>&5
   ac_status=$?
-  echo "$as_me:13755: \$? = $ac_status" >&5
+  echo "$as_me:13751: \$? = $ac_status" >&5
   (exit $ac_status); }
 	if test -f conftest.out ; then
 		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -13762,7 +13758,7 @@
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 13765 "configure"
+#line 13761 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -13787,15 +13783,15 @@
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13790: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13786: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13793: \$? = $ac_status" >&5
+  echo "$as_me:13789: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:13795: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13791: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13798: \$? = $ac_status" >&5
+  echo "$as_me:13794: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -13809,7 +13805,7 @@
 	rm -f $cf_tempfile
 
 fi
-echo "$as_me:13812: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:13808: result: $cf_cv_ncurses_version" >&5
 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
 #define NCURSES 1
@@ -13821,7 +13817,7 @@
 	# to link gpm.
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
-echo "$as_me:13824: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:13820: checking for Gpm_Open in -lgpm" >&5
 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13829,7 +13825,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 13832 "configure"
+#line 13828 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -13848,16 +13844,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13851: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13847: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13854: \$? = $ac_status" >&5
+  echo "$as_me:13850: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13857: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13853: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13860: \$? = $ac_status" >&5
+  echo "$as_me:13856: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_Gpm_Open=yes
 else
@@ -13868,10 +13864,10 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:13871: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:13867: result: $ac_cv_lib_gpm_Gpm_Open" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
-  echo "$as_me:13874: checking for initscr in -lgpm" >&5
+  echo "$as_me:13870: checking for initscr in -lgpm" >&5
 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13879,7 +13875,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lgpm  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 13882 "configure"
+#line 13878 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -13898,16 +13894,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13901: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13897: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13904: \$? = $ac_status" >&5
+  echo "$as_me:13900: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13907: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13903: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13910: \$? = $ac_status" >&5
+  echo "$as_me:13906: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_gpm_initscr=yes
 else
@@ -13918,7 +13914,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:13921: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:13917: result: $ac_cv_lib_gpm_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
 if test $ac_cv_lib_gpm_initscr = yes; then
   LIBS="$cf_ncurses_SAVE"
@@ -13933,7 +13929,7 @@
 	# This is only necessary if you are linking against an obsolete
 	# version of ncurses (but it should do no harm, since it's static).
 	if test "$cf_nculib_root" = ncurses ; then
-		echo "$as_me:13936: checking for tgoto in -lmytinfo" >&5
+		echo "$as_me:13932: checking for tgoto in -lmytinfo" >&5
 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13941,7 +13937,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmytinfo  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 13944 "configure"
+#line 13940 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -13960,16 +13956,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13963: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13959: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:13966: \$? = $ac_status" >&5
+  echo "$as_me:13962: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:13969: \"$ac_try\"") >&5
+  { (eval echo "$as_me:13965: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:13972: \$? = $ac_status" >&5
+  echo "$as_me:13968: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_mytinfo_tgoto=yes
 else
@@ -13980,7 +13976,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:13983: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:13979: result: $ac_cv_lib_mytinfo_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
 if test $ac_cv_lib_mytinfo_tgoto = yes; then
   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -13999,13 +13995,13 @@
 
 	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
 	cf_libdir=""
-	echo "$as_me:14002: checking for initscr" >&5
+	echo "$as_me:13998: checking for initscr" >&5
 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
 if test "${ac_cv_func_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 14008 "configure"
+#line 14004 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr (); below.  */
@@ -14036,16 +14032,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14039: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14035: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14042: \$? = $ac_status" >&5
+  echo "$as_me:14038: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14045: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14041: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14048: \$? = $ac_status" >&5
+  echo "$as_me:14044: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_initscr=yes
 else
@@ -14055,18 +14051,18 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:14058: result: $ac_cv_func_initscr" >&5
+echo "$as_me:14054: result: $ac_cv_func_initscr" >&5
 echo "${ECHO_T}$ac_cv_func_initscr" >&6
 if test $ac_cv_func_initscr = yes; then
   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 else
 
 		cf_save_LIBS="$LIBS"
-		echo "$as_me:14065: checking for initscr in -l$cf_nculib_root" >&5
+		echo "$as_me:14061: checking for initscr in -l$cf_nculib_root" >&5
 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
 		LIBS="-l$cf_nculib_root $LIBS"
 		cat >conftest.$ac_ext <<_ACEOF
-#line 14069 "configure"
+#line 14065 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -14078,41 +14074,41 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14081: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14077: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14084: \$? = $ac_status" >&5
+  echo "$as_me:14080: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14087: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14083: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14090: \$? = $ac_status" >&5
+  echo "$as_me:14086: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:14092: result: yes" >&5
+  echo "$as_me:14088: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:14099: result: no" >&5
+echo "$as_me:14095: result: no" >&5
 echo "${ECHO_T}no" >&6
 			cf_search=""
 
-test -d $HOME && {
+test -d "$HOME" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME"
-	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
-	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
-	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
+	test -d "$HOME/lib" &&          cf_search="$cf_search $HOME/lib"
+	test -d "$HOME/lib/$cf_nculib_root" &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
+	test -d "$HOME/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
-test -d $HOME/$cf_nculib_root && {
+test -d "$HOME/$cf_nculib_root" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME/$cf_nculib_root"
-	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
-	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
+	test -d "$HOME/$cf_nculib_root/lib" &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
+	test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
 }
 
 test "$prefix" != /usr/local && \
@@ -14156,11 +14152,11 @@
 
 			for cf_libdir in $cf_search
 			do
-				echo "$as_me:14159: checking for -l$cf_nculib_root in $cf_libdir" >&5
+				echo "$as_me:14155: checking for -l$cf_nculib_root in $cf_libdir" >&5
 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
 				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 14163 "configure"
+#line 14159 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -14172,25 +14168,25 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14175: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14171: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14178: \$? = $ac_status" >&5
+  echo "$as_me:14174: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14181: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14177: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14184: \$? = $ac_status" >&5
+  echo "$as_me:14180: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:14186: result: yes" >&5
+  echo "$as_me:14182: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
 					 break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:14193: result: no" >&5
+echo "$as_me:14189: result: no" >&5
 echo "${ECHO_T}no" >&6
 					 LIBS="$cf_save_LIBS"
 fi
@@ -14205,7 +14201,7 @@
 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
 
 if test $cf_found_library = no ; then
-	{ { echo "$as_me:14208: error: Cannot link $cf_nculib_root library" >&5
+	{ { echo "$as_me:14204: error: Cannot link $cf_nculib_root library" >&5
 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -14213,7 +14209,7 @@
 fi
 
 if test -n "$cf_ncurses_LIBS" ; then
-	echo "$as_me:14216: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+	echo "$as_me:14212: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
 	cf_ncurses_SAVE="$LIBS"
 	for p in $cf_ncurses_LIBS ; do
@@ -14223,7 +14219,7 @@
 		fi
 	done
 	cat >conftest.$ac_ext <<_ACEOF
-#line 14226 "configure"
+#line 14222 "configure"
 #include "confdefs.h"
 #include <${cf_cv_ncurses_header-curses.h}>
 int
@@ -14235,23 +14231,23 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14238: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14234: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14241: \$? = $ac_status" >&5
+  echo "$as_me:14237: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14244: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14240: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14247: \$? = $ac_status" >&5
+  echo "$as_me:14243: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:14249: result: yes" >&5
+  echo "$as_me:14245: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:14254: result: no" >&5
+echo "$as_me:14250: result: no" >&5
 echo "${ECHO_T}no" >&6
 		 LIBS="$cf_ncurses_SAVE"
 fi
@@ -14279,10 +14275,10 @@
 	LIBS="-l$cf_lib $cf_save_LIBS"
 	for cf_func in tigetstr tgetstr
 	do
-		echo "$as_me:14282: checking for $cf_func in -l$cf_lib" >&5
+		echo "$as_me:14278: checking for $cf_func in -l$cf_lib" >&5
 echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
 		cat >conftest.$ac_ext <<_ACEOF
-#line 14285 "configure"
+#line 14281 "configure"
 #include "confdefs.h"
 
 int
@@ -14294,16 +14290,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14297: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14293: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14300: \$? = $ac_status" >&5
+  echo "$as_me:14296: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14303: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14299: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14306: \$? = $ac_status" >&5
+  echo "$as_me:14302: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14312,7 +14308,7 @@
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-		echo "$as_me:14315: result: $cf_result" >&5
+		echo "$as_me:14311: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 		if test "$cf_result" = yes ; then
 			if test "$cf_func" = tigetstr ; then
@@ -14329,7 +14325,7 @@
 fi
 if test "$cf_cv_termlib" = none; then
 	# allow curses library for broken AIX system.
-	echo "$as_me:14332: checking for initscr in -lcurses" >&5
+	echo "$as_me:14328: checking for initscr in -lcurses" >&5
 echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
 if test "${ac_cv_lib_curses_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14337,7 +14333,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcurses  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 14340 "configure"
+#line 14336 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -14356,16 +14352,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14359: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14355: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14362: \$? = $ac_status" >&5
+  echo "$as_me:14358: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14365: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14361: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14368: \$? = $ac_status" >&5
+  echo "$as_me:14364: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_curses_initscr=yes
 else
@@ -14376,13 +14372,13 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:14379: result: $ac_cv_lib_curses_initscr" >&5
+echo "$as_me:14375: result: $ac_cv_lib_curses_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
 if test $ac_cv_lib_curses_initscr = yes; then
   LIBS="$LIBS -lcurses" cf_cv_termlib=termcap
 fi
 
-	echo "$as_me:14385: checking for tgoto in -ltermcap" >&5
+	echo "$as_me:14381: checking for tgoto in -ltermcap" >&5
 echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
 if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14390,7 +14386,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ltermcap  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 14393 "configure"
+#line 14389 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -14409,16 +14405,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14412: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14408: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14415: \$? = $ac_status" >&5
+  echo "$as_me:14411: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14418: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14414: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14421: \$? = $ac_status" >&5
+  echo "$as_me:14417: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_termcap_tgoto=yes
 else
@@ -14429,7 +14425,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:14432: result: $ac_cv_lib_termcap_tgoto" >&5
+echo "$as_me:14428: result: $ac_cv_lib_termcap_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
 if test $ac_cv_lib_termcap_tgoto = yes; then
   LIBS="$LIBS -ltermcap" cf_cv_termlib=termcap
@@ -14440,7 +14436,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 if test "$cf_cv_termlib" = none; then
-	{ echo "$as_me:14443: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
+	{ echo "$as_me:14439: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
 echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
 fi
 
@@ -14470,7 +14466,7 @@
 
 cf_cv_termlib=none
 cat >conftest.$ac_ext <<_ACEOF
-#line 14473 "configure"
+#line 14469 "configure"
 #include "confdefs.h"
 
 int
@@ -14482,19 +14478,19 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14485: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14481: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14488: \$? = $ac_status" >&5
+  echo "$as_me:14484: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14491: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14487: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14494: \$? = $ac_status" >&5
+  echo "$as_me:14490: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cat >conftest.$ac_ext <<_ACEOF
-#line 14497 "configure"
+#line 14493 "configure"
 #include "confdefs.h"
 
 int
@@ -14506,16 +14502,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14509: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14505: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14512: \$? = $ac_status" >&5
+  echo "$as_me:14508: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14515: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14511: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14518: \$? = $ac_status" >&5
+  echo "$as_me:14514: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_termlib=terminfo
 else
@@ -14539,10 +14535,10 @@
 	LIBS="-l$cf_lib $cf_save_LIBS"
 	for cf_func in tigetstr tgetstr
 	do
-		echo "$as_me:14542: checking for $cf_func in -l$cf_lib" >&5
+		echo "$as_me:14538: checking for $cf_func in -l$cf_lib" >&5
 echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
 		cat >conftest.$ac_ext <<_ACEOF
-#line 14545 "configure"
+#line 14541 "configure"
 #include "confdefs.h"
 
 int
@@ -14554,16 +14550,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14557: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14553: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14560: \$? = $ac_status" >&5
+  echo "$as_me:14556: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14563: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14559: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14566: \$? = $ac_status" >&5
+  echo "$as_me:14562: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -14572,7 +14568,7 @@
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-		echo "$as_me:14575: result: $cf_result" >&5
+		echo "$as_me:14571: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 		if test "$cf_result" = yes ; then
 			if test "$cf_func" = tigetstr ; then
@@ -14589,7 +14585,7 @@
 fi
 if test "$cf_cv_termlib" = none; then
 	# allow curses library for broken AIX system.
-	echo "$as_me:14592: checking for initscr in -lcurses" >&5
+	echo "$as_me:14588: checking for initscr in -lcurses" >&5
 echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
 if test "${ac_cv_lib_curses_initscr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14597,7 +14593,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcurses  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 14600 "configure"
+#line 14596 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -14616,16 +14612,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14619: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14615: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14622: \$? = $ac_status" >&5
+  echo "$as_me:14618: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14625: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14621: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14628: \$? = $ac_status" >&5
+  echo "$as_me:14624: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_curses_initscr=yes
 else
@@ -14636,13 +14632,13 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:14639: result: $ac_cv_lib_curses_initscr" >&5
+echo "$as_me:14635: result: $ac_cv_lib_curses_initscr" >&5
 echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
 if test $ac_cv_lib_curses_initscr = yes; then
   LIBS="$LIBS -lcurses" cf_cv_termlib=termcap
 fi
 
-	echo "$as_me:14645: checking for tgoto in -ltermcap" >&5
+	echo "$as_me:14641: checking for tgoto in -ltermcap" >&5
 echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
 if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14650,7 +14646,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ltermcap  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 14653 "configure"
+#line 14649 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -14669,16 +14665,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14672: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14668: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14675: \$? = $ac_status" >&5
+  echo "$as_me:14671: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14678: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14674: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14681: \$? = $ac_status" >&5
+  echo "$as_me:14677: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_termcap_tgoto=yes
 else
@@ -14689,7 +14685,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:14692: result: $ac_cv_lib_termcap_tgoto" >&5
+echo "$as_me:14688: result: $ac_cv_lib_termcap_tgoto" >&5
 echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
 if test $ac_cv_lib_termcap_tgoto = yes; then
   LIBS="$LIBS -ltermcap" cf_cv_termlib=termcap
@@ -14700,7 +14696,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 if test "$cf_cv_termlib" = none; then
-	{ echo "$as_me:14703: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
+	{ echo "$as_me:14699: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
 echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
 fi
 
@@ -14722,7 +14718,7 @@
 elif test ".$cf_cv_termlib" = .termcap ; then
 	# BSD 'tputs()' may need 'PC' to be set.
 	cat >conftest.$ac_ext <<_ACEOF
-#line 14725 "configure"
+#line 14721 "configure"
 #include "confdefs.h"
 
 int
@@ -14734,16 +14730,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14737: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14733: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14740: \$? = $ac_status" >&5
+  echo "$as_me:14736: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14743: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14739: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14746: \$? = $ac_status" >&5
+  echo "$as_me:14742: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cat >>confdefs.h <<\EOF
 #define HAVE_EXTERN_TCAP_PC 1
@@ -14762,14 +14758,14 @@
 
 LIBS="$LIBS $X_EXTRA_LIBS"
 
-echo "$as_me:14765: checking for /dev/tty" >&5
+echo "$as_me:14761: checking for /dev/tty" >&5
 echo $ECHO_N "checking for /dev/tty... $ECHO_C" >&6
 if test -c /dev/tty ; then
 	cf_result=yes
 else
 	cf_result=no
 fi
-echo "$as_me:14772: result: $cf_result" >&5
+echo "$as_me:14768: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 if test "$cf_result" = yes ; then
 	cf_result=`echo /dev/tty | sed -e s%/%_%g`
@@ -14782,7 +14778,7 @@
 
 fi
 
-echo "$as_me:14785: checking for crypt function" >&5
+echo "$as_me:14781: checking for crypt function" >&5
 echo $ECHO_N "checking for crypt function... $ECHO_C" >&6
 if test "${cf_cv_crypt_func+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14790,7 +14786,7 @@
 
 cf_cv_crypt_func=
 cat >conftest.$ac_ext <<_ACEOF
-#line 14793 "configure"
+#line 14789 "configure"
 #include "confdefs.h"
 
 int
@@ -14802,16 +14798,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14805: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14801: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14808: \$? = $ac_status" >&5
+  echo "$as_me:14804: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14811: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14807: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14814: \$? = $ac_status" >&5
+  echo "$as_me:14810: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_crypt_func=yes
@@ -14822,7 +14818,7 @@
 	cf_save_LIBS="$LIBS"
 	LIBS="-lcrypt $LIBS"
 	cat >conftest.$ac_ext <<_ACEOF
-#line 14825 "configure"
+#line 14821 "configure"
 #include "confdefs.h"
 
 int
@@ -14834,16 +14830,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14837: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14833: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14840: \$? = $ac_status" >&5
+  echo "$as_me:14836: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:14843: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14839: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14846: \$? = $ac_status" >&5
+  echo "$as_me:14842: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 		cf_cv_crypt_func="-lcrypt"
@@ -14860,12 +14856,12 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 fi
-echo "$as_me:14863: result: $cf_cv_crypt_func" >&5
+echo "$as_me:14859: result: $cf_cv_crypt_func" >&5
 echo "${ECHO_T}$cf_cv_crypt_func" >&6
 if test "$cf_cv_crypt_func" != no ; then
 	cf_save_LIBS="$LIBS"
 	test "$cf_cv_crypt_func" != yes && LIBS="$cf_cv_crypt_func $LIBS"
-echo "$as_me:14868: checking if crypt works" >&5
+echo "$as_me:14864: checking if crypt works" >&5
 echo $ECHO_N "checking if crypt works... $ECHO_C" >&6
 if test "${cf_cv_crypt_works+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14876,7 +14872,7 @@
 	cf_cv_crypt_works=unknown
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 14879 "configure"
+#line 14875 "configure"
 #include "confdefs.h"
 
 #include <string.h>
@@ -14888,15 +14884,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14891: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14887: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:14894: \$? = $ac_status" >&5
+  echo "$as_me:14890: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:14896: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14892: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14899: \$? = $ac_status" >&5
+  echo "$as_me:14895: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 	cf_cv_crypt_works=yes
@@ -14911,7 +14907,7 @@
 fi
 	LIBS="$cf_save_LIBS"
 fi
-echo "$as_me:14914: result: $cf_cv_crypt_works" >&5
+echo "$as_me:14910: result: $cf_cv_crypt_works" >&5
 echo "${ECHO_T}$cf_cv_crypt_works" >&6
 	if test "$cf_cv_crypt_works" != no ; then
 		cat >>confdefs.h <<\EOF
@@ -14924,14 +14920,14 @@
 	fi
 fi
 
-echo "$as_me:14927: checking for declaration of fd_set" >&5
+echo "$as_me:14923: checking for declaration of fd_set" >&5
 echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
 if test "${cf_cv_type_fd_set+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   echo "trying sys/types alone" 1>&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 14934 "configure"
+#line 14930 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -14944,16 +14940,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14947: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14943: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14950: \$? = $ac_status" >&5
+  echo "$as_me:14946: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14953: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14949: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14956: \$? = $ac_status" >&5
+  echo "$as_me:14952: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_fd_set=sys/types.h
 else
@@ -14961,7 +14957,7 @@
 cat conftest.$ac_ext >&5
 echo "trying X11/Xpoll.h" 1>&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 14964 "configure"
+#line 14960 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_X11_XPOLL_H
@@ -14976,16 +14972,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14979: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14975: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:14982: \$? = $ac_status" >&5
+  echo "$as_me:14978: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:14985: \"$ac_try\"") >&5
+  { (eval echo "$as_me:14981: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:14988: \$? = $ac_status" >&5
+  echo "$as_me:14984: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_fd_set=X11/Xpoll.h
 else
@@ -14993,7 +14989,7 @@
 cat conftest.$ac_ext >&5
 echo "trying sys/select.h" 1>&5
 cat >conftest.$ac_ext <<_ACEOF
-#line 14996 "configure"
+#line 14992 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -15007,16 +15003,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15010: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15006: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15013: \$? = $ac_status" >&5
+  echo "$as_me:15009: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15016: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15012: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15019: \$? = $ac_status" >&5
+  echo "$as_me:15015: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_fd_set=sys/select.h
 else
@@ -15030,7 +15026,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:15033: result: $cf_cv_type_fd_set" >&5
+echo "$as_me:15029: result: $cf_cv_type_fd_set" >&5
 echo "${ECHO_T}$cf_cv_type_fd_set" >&6
 if test $cf_cv_type_fd_set = sys/select.h ; then
 	cat >>confdefs.h <<\EOF
@@ -15039,14 +15035,14 @@
 
 fi
 
-echo "$as_me:15042: checking for fd_set macros" >&5
+echo "$as_me:15038: checking for fd_set macros" >&5
 echo $ECHO_N "checking for fd_set macros... $ECHO_C" >&6
 if test "${cf_cv_macros_fd_set+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 15049 "configure"
+#line 15045 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -15075,16 +15071,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15078: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15074: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15081: \$? = $ac_status" >&5
+  echo "$as_me:15077: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15084: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15080: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15087: \$? = $ac_status" >&5
+  echo "$as_me:15083: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_macros_fd_set=yes
 else
@@ -15094,7 +15090,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:15097: result: $cf_cv_macros_fd_set" >&5
+echo "$as_me:15093: result: $cf_cv_macros_fd_set" >&5
 echo "${ECHO_T}$cf_cv_macros_fd_set" >&6
 test $cf_cv_macros_fd_set = yes && cat >>confdefs.h <<\EOF
 #define HAVE_TYPE_FD_SET 1
@@ -15141,13 +15137,13 @@
 
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:15144: checking for $ac_func" >&5
+echo "$as_me:15140: checking for $ac_func" >&5
 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
 if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 15150 "configure"
+#line 15146 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func (); below.  */
@@ -15178,16 +15174,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15181: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15177: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15184: \$? = $ac_status" >&5
+  echo "$as_me:15180: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:15187: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15183: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15190: \$? = $ac_status" >&5
+  echo "$as_me:15186: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval "$as_ac_var=yes"
 else
@@ -15197,7 +15193,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:15200: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:15196: result: `eval echo '${'$as_ac_var'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
 if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<EOF
@@ -15207,14 +15203,14 @@
 fi
 done
 
-echo "$as_me:15210: checking for standard qsort" >&5
+echo "$as_me:15206: checking for standard qsort" >&5
 echo $ECHO_N "checking for standard qsort... $ECHO_C" >&6
 if test "${cf_cv_ansi_qsort+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 15217 "configure"
+#line 15213 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_STDLIB_H
@@ -15232,16 +15228,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15235: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15231: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15238: \$? = $ac_status" >&5
+  echo "$as_me:15234: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15241: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15237: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15244: \$? = $ac_status" >&5
+  echo "$as_me:15240: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_ansi_qsort=yes
 else
@@ -15252,7 +15248,7 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:15255: result: $cf_cv_ansi_qsort" >&5
+echo "$as_me:15251: result: $cf_cv_ansi_qsort" >&5
 echo "${ECHO_T}$cf_cv_ansi_qsort" >&6
 
 if test $cf_cv_ansi_qsort = yes; then
@@ -15267,7 +15263,7 @@
 
 fi
 
-echo "$as_me:15270: checking for working mkstemp" >&5
+echo "$as_me:15266: checking for working mkstemp" >&5
 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
 if test "${cf_cv_func_mkstemp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15275,13 +15271,13 @@
 
 rm -f conftest*
 if test "$cross_compiling" = yes; then
-  echo "$as_me:15278: checking for mkstemp" >&5
+  echo "$as_me:15274: checking for mkstemp" >&5
 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
 if test "${ac_cv_func_mkstemp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 15284 "configure"
+#line 15280 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mkstemp (); below.  */
@@ -15312,16 +15308,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15315: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15311: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15318: \$? = $ac_status" >&5
+  echo "$as_me:15314: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:15321: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15317: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15324: \$? = $ac_status" >&5
+  echo "$as_me:15320: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_mkstemp=yes
 else
@@ -15331,12 +15327,12 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:15334: result: $ac_cv_func_mkstemp" >&5
+echo "$as_me:15330: result: $ac_cv_func_mkstemp" >&5
 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 15339 "configure"
+#line 15335 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -15374,15 +15370,15 @@
 
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:15377: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15373: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15380: \$? = $ac_status" >&5
+  echo "$as_me:15376: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:15382: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15378: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15385: \$? = $ac_status" >&5
+  echo "$as_me:15381: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_func_mkstemp=yes
 
@@ -15397,7 +15393,7 @@
 fi
 
 fi
-echo "$as_me:15400: result: $cf_cv_func_mkstemp" >&5
+echo "$as_me:15396: result: $cf_cv_func_mkstemp" >&5
 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
 if test "$cf_cv_func_mkstemp" = yes ; then
 	cat >>confdefs.h <<\EOF
@@ -15415,7 +15411,7 @@
 cf_save_cppflags="${CPPFLAGS}"
 cf_save_ldflags="${LDFLAGS}"
 
-echo "$as_me:15418: checking if you want to use the Xpm library for colored icon" >&5
+echo "$as_me:15414: checking if you want to use the Xpm library for colored icon" >&5
 echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
 
 # Check whether --with-xpm or --without-xpm was given.
@@ -15425,7 +15421,7 @@
 else
   cf_Xpm_library=no
 fi;
-echo "$as_me:15428: result: $cf_Xpm_library" >&5
+echo "$as_me:15424: result: $cf_Xpm_library" >&5
 echo "${ECHO_T}$cf_Xpm_library" >&6
 
 if test "$cf_Xpm_library" != no ; then
@@ -15433,23 +15429,23 @@
 	CPPFLAGS="$CPPFLAGS -I$withval/include"
 	LDFLAGS="$LDFLAGS -L$withval/lib"
     fi
-    echo "$as_me:15436: checking for X11/xpm.h" >&5
+    echo "$as_me:15432: checking for X11/xpm.h" >&5
 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 15442 "configure"
+#line 15438 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
 _ACEOF
-if { (eval echo "$as_me:15446: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:15442: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:15452: \$? = $ac_status" >&5
+  echo "$as_me:15448: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -15468,11 +15464,11 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:15471: result: $ac_cv_header_X11_xpm_h" >&5
+echo "$as_me:15467: result: $ac_cv_header_X11_xpm_h" >&5
 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
 if test $ac_cv_header_X11_xpm_h = yes; then
 
-	echo "$as_me:15475: checking for XpmCreatePixmapFromData in -lXpm" >&5
+	echo "$as_me:15471: checking for XpmCreatePixmapFromData in -lXpm" >&5
 echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
 if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15480,7 +15476,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lXpm -lX11 $X_LIBS $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 15483 "configure"
+#line 15479 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -15499,16 +15495,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15502: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15498: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15505: \$? = $ac_status" >&5
+  echo "$as_me:15501: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:15508: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15504: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15511: \$? = $ac_status" >&5
+  echo "$as_me:15507: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
 else
@@ -15519,7 +15515,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:15522: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
+echo "$as_me:15518: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
 echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
 if test $ac_cv_lib_Xpm_XpmCreatePixmapFromData = yes; then
 
@@ -15540,7 +15536,7 @@
 fi
 
 if test -n "$cf_x_athena" ; then
-    echo "$as_me:15543: checking if you want to use Xaw scrollbars rather than our own" >&5
+    echo "$as_me:15539: checking if you want to use Xaw scrollbars rather than our own" >&5
 echo $ECHO_N "checking if you want to use Xaw scrollbars rather than our own... $ECHO_C" >&6
 
 # Check whether --with-Xaw-scrollbars or --without-Xaw-scrollbars was given.
@@ -15550,7 +15546,7 @@
 else
   cf_Xaw_scrollbars=no
 fi;
-    echo "$as_me:15553: result: $cf_Xaw_scrollbars" >&5
+    echo "$as_me:15549: result: $cf_Xaw_scrollbars" >&5
 echo "${ECHO_T}$cf_Xaw_scrollbars" >&6
 
     if test "$cf_Xaw_scrollbars" = no ; then
@@ -15567,7 +15563,7 @@
 #define OPT_XAW_SCROLLBARS 1
 EOF
 
-	echo "$as_me:15570: checking if you want to use the drag/scrolling extension with Xaw" >&5
+	echo "$as_me:15566: checking if you want to use the drag/scrolling extension with Xaw" >&5
 echo $ECHO_N "checking if you want to use the drag/scrolling extension with Xaw... $ECHO_C" >&6
 
 # Check whether --with-drag-extension or --without-drag-extension was given.
@@ -15577,7 +15573,7 @@
 else
   cf_drag_extension=no
 fi;
-	echo "$as_me:15580: result: $cf_drag_extension" >&5
+	echo "$as_me:15576: result: $cf_drag_extension" >&5
 echo "${ECHO_T}$cf_drag_extension" >&6
 	if test "$cf_drag_extension" != "no" ; then
 	    cat >>confdefs.h <<\EOF
@@ -15590,7 +15586,7 @@
 
 fi
 
-echo "$as_me:15593: checking if you want to change the number of exec-macros" >&5
+echo "$as_me:15589: checking if you want to change the number of exec-macros" >&5
 echo $ECHO_N "checking if you want to change the number of exec-macros... $ECHO_C" >&6
 
 # Check whether --with-exec-macros or --without-exec-macros was given.
@@ -15600,7 +15596,7 @@
 else
   cf_exec_macros=no
 fi;
-echo "$as_me:15603: result: $cf_exec_macros" >&5
+echo "$as_me:15599: result: $cf_exec_macros" >&5
 echo "${ECHO_T}$cf_exec_macros" >&6
 test "$cf_exec_macros" != no && cat >>confdefs.h <<EOF
 #define OPT_EXEC_MACROS $cf_exec_macros
@@ -15613,7 +15609,7 @@
 fi;
 if test "$enable_largefile" != no; then
 
-  echo "$as_me:15616: checking for special C compiler options needed for large files" >&5
+  echo "$as_me:15612: checking for special C compiler options needed for large files" >&5
 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
 if test "${ac_cv_sys_largefile_CC+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15625,7 +15621,7 @@
      	 # IRIX 6.2 and later do not support large files by default,
      	 # so use the C compiler's -n32 option if that helps.
          cat >conftest.$ac_ext <<_ACEOF
-#line 15628 "configure"
+#line 15624 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -15645,16 +15641,16 @@
 }
 _ACEOF
      	 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15648: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15644: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15651: \$? = $ac_status" >&5
+  echo "$as_me:15647: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15654: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15650: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15657: \$? = $ac_status" >&5
+  echo "$as_me:15653: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -15664,16 +15660,16 @@
 rm -f conftest.$ac_objext
      	 CC="$CC -n32"
      	 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15667: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15663: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15670: \$? = $ac_status" >&5
+  echo "$as_me:15666: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15673: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15669: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15676: \$? = $ac_status" >&5
+  echo "$as_me:15672: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sys_largefile_CC=' -n32'; break
 else
@@ -15687,13 +15683,13 @@
        rm -f conftest.$ac_ext
     fi
 fi
-echo "$as_me:15690: result: $ac_cv_sys_largefile_CC" >&5
+echo "$as_me:15686: result: $ac_cv_sys_largefile_CC" >&5
 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
   if test "$ac_cv_sys_largefile_CC" != no; then
     CC=$CC$ac_cv_sys_largefile_CC
   fi
 
-  echo "$as_me:15696: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+  echo "$as_me:15692: checking for _FILE_OFFSET_BITS value needed for large files" >&5
 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15701,7 +15697,7 @@
   while :; do
   ac_cv_sys_file_offset_bits=no
   cat >conftest.$ac_ext <<_ACEOF
-#line 15704 "configure"
+#line 15700 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -15721,16 +15717,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15724: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15720: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15727: \$? = $ac_status" >&5
+  echo "$as_me:15723: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15730: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15726: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15733: \$? = $ac_status" >&5
+  echo "$as_me:15729: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -15739,7 +15735,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 15742 "configure"
+#line 15738 "configure"
 #include "confdefs.h"
 #define _FILE_OFFSET_BITS 64
 #include <sys/types.h>
@@ -15760,16 +15756,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15763: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15759: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15766: \$? = $ac_status" >&5
+  echo "$as_me:15762: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15769: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15765: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15772: \$? = $ac_status" >&5
+  echo "$as_me:15768: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sys_file_offset_bits=64; break
 else
@@ -15780,7 +15776,7 @@
   break
 done
 fi
-echo "$as_me:15783: result: $ac_cv_sys_file_offset_bits" >&5
+echo "$as_me:15779: result: $ac_cv_sys_file_offset_bits" >&5
 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
 if test "$ac_cv_sys_file_offset_bits" != no; then
 
@@ -15790,7 +15786,7 @@
 
 fi
 rm -f conftest*
-  echo "$as_me:15793: checking for _LARGE_FILES value needed for large files" >&5
+  echo "$as_me:15789: checking for _LARGE_FILES value needed for large files" >&5
 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
 if test "${ac_cv_sys_large_files+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15798,7 +15794,7 @@
   while :; do
   ac_cv_sys_large_files=no
   cat >conftest.$ac_ext <<_ACEOF
-#line 15801 "configure"
+#line 15797 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -15818,16 +15814,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15821: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15817: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15824: \$? = $ac_status" >&5
+  echo "$as_me:15820: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15827: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15823: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15830: \$? = $ac_status" >&5
+  echo "$as_me:15826: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -15836,7 +15832,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 15839 "configure"
+#line 15835 "configure"
 #include "confdefs.h"
 #define _LARGE_FILES 1
 #include <sys/types.h>
@@ -15857,16 +15853,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15860: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15856: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15863: \$? = $ac_status" >&5
+  echo "$as_me:15859: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15866: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15862: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15869: \$? = $ac_status" >&5
+  echo "$as_me:15865: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sys_large_files=1; break
 else
@@ -15877,7 +15873,7 @@
   break
 done
 fi
-echo "$as_me:15880: result: $ac_cv_sys_large_files" >&5
+echo "$as_me:15876: result: $ac_cv_sys_large_files" >&5
 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
 if test "$ac_cv_sys_large_files" != no; then
 
@@ -15890,7 +15886,7 @@
 fi
 
     if test "$enable_largefile" != no ; then
-	echo "$as_me:15893: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+	echo "$as_me:15889: checking for _LARGEFILE_SOURCE value needed for large files" >&5
 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
 if test "${ac_cv_sys_largefile_source+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15898,7 +15894,7 @@
   while :; do
   ac_cv_sys_largefile_source=no
   cat >conftest.$ac_ext <<_ACEOF
-#line 15901 "configure"
+#line 15897 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -15910,16 +15906,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15913: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15909: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15916: \$? = $ac_status" >&5
+  echo "$as_me:15912: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15919: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15915: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15922: \$? = $ac_status" >&5
+  echo "$as_me:15918: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   break
 else
@@ -15928,7 +15924,7 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
-#line 15931 "configure"
+#line 15927 "configure"
 #include "confdefs.h"
 #define _LARGEFILE_SOURCE 1
 #include <stdio.h>
@@ -15941,16 +15937,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15944: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15940: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:15947: \$? = $ac_status" >&5
+  echo "$as_me:15943: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:15950: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15946: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:15953: \$? = $ac_status" >&5
+  echo "$as_me:15949: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sys_largefile_source=1; break
 else
@@ -15961,7 +15957,7 @@
   break
 done
 fi
-echo "$as_me:15964: result: $ac_cv_sys_largefile_source" >&5
+echo "$as_me:15960: result: $ac_cv_sys_largefile_source" >&5
 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
 if test "$ac_cv_sys_largefile_source" != no; then
 
@@ -15975,13 +15971,13 @@
 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
 # in glibc 2.1.3, but that breaks too many other things.
 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
-echo "$as_me:15978: checking for fseeko" >&5
+echo "$as_me:15974: checking for fseeko" >&5
 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
 if test "${ac_cv_func_fseeko+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 15984 "configure"
+#line 15980 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -15993,16 +15989,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15996: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15992: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:15999: \$? = $ac_status" >&5
+  echo "$as_me:15995: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:16002: \"$ac_try\"") >&5
+  { (eval echo "$as_me:15998: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16005: \$? = $ac_status" >&5
+  echo "$as_me:16001: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_fseeko=yes
 else
@@ -16012,7 +16008,7 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:16015: result: $ac_cv_func_fseeko" >&5
+echo "$as_me:16011: result: $ac_cv_func_fseeko" >&5
 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
 if test $ac_cv_func_fseeko = yes; then
 
@@ -16032,14 +16028,14 @@
 	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
 	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
 
-	echo "$as_me:16035: checking whether to use struct dirent64" >&5
+	echo "$as_me:16031: checking whether to use struct dirent64" >&5
 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
 if test "${cf_cv_struct_dirent64+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 		cat >conftest.$ac_ext <<_ACEOF
-#line 16042 "configure"
+#line 16038 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -16060,16 +16056,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:16063: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16059: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:16066: \$? = $ac_status" >&5
+  echo "$as_me:16062: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:16069: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16065: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16072: \$? = $ac_status" >&5
+  echo "$as_me:16068: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_struct_dirent64=yes
 else
@@ -16080,7 +16076,7 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:16083: result: $cf_cv_struct_dirent64" >&5
+echo "$as_me:16079: result: $cf_cv_struct_dirent64" >&5
 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
 	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
 #define HAVE_STRUCT_DIRENT64 1
@@ -16091,14 +16087,14 @@
 # I don't know of a reliable test for working locale, but we can at least check
 # that it is available before offering it as an option.
 
-echo "$as_me:16094: checking for setlocale()" >&5
+echo "$as_me:16090: checking for setlocale()" >&5
 echo $ECHO_N "checking for setlocale()... $ECHO_C" >&6
 if test "${cf_cv_locale+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 16101 "configure"
+#line 16097 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int
@@ -16110,16 +16106,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:16113: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16109: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:16116: \$? = $ac_status" >&5
+  echo "$as_me:16112: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:16119: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16115: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16122: \$? = $ac_status" >&5
+  echo "$as_me:16118: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_locale=yes
 else
@@ -16131,7 +16127,7 @@
 
 fi
 
-echo "$as_me:16134: result: $cf_cv_locale" >&5
+echo "$as_me:16130: result: $cf_cv_locale" >&5
 echo "${ECHO_T}$cf_cv_locale" >&6
 test $cf_cv_locale = yes && { cat >>confdefs.h <<\EOF
 #define LOCALE 1
@@ -16139,7 +16135,7 @@
  }
 
 if test $cf_cv_locale = yes ; then
-echo "$as_me:16142: checking if you want to use i18n locale support" >&5
+echo "$as_me:16138: checking if you want to use i18n locale support" >&5
 echo $ECHO_N "checking if you want to use i18n locale support... $ECHO_C" >&6
 
 # Check whether --with-locale or --without-locale was given.
@@ -16149,7 +16145,7 @@
 else
   cf_locale=yes
 fi;
-echo "$as_me:16152: result: $cf_locale" >&5
+echo "$as_me:16148: result: $cf_locale" >&5
 echo "${ECHO_T}$cf_locale" >&6
 if test "$cf_locale" != no ; then
 	cat >>confdefs.h <<\EOF
@@ -16158,13 +16154,13 @@
 
 	eval 'cf_cv_have_lib_'iconv'=no'
 	cf_libdir=""
-	echo "$as_me:16161: checking for iconv" >&5
+	echo "$as_me:16157: checking for iconv" >&5
 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
 if test "${ac_cv_func_iconv+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 16167 "configure"
+#line 16163 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char iconv (); below.  */
@@ -16195,16 +16191,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:16198: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16194: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:16201: \$? = $ac_status" >&5
+  echo "$as_me:16197: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:16204: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16200: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16207: \$? = $ac_status" >&5
+  echo "$as_me:16203: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_iconv=yes
 else
@@ -16214,18 +16210,18 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:16217: result: $ac_cv_func_iconv" >&5
+echo "$as_me:16213: result: $ac_cv_func_iconv" >&5
 echo "${ECHO_T}$ac_cv_func_iconv" >&6
 if test $ac_cv_func_iconv = yes; then
   eval 'cf_cv_have_lib_'iconv'=yes'
 else
 
 		cf_save_LIBS="$LIBS"
-		echo "$as_me:16224: checking for iconv in -liconv" >&5
+		echo "$as_me:16220: checking for iconv in -liconv" >&5
 echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
 		LIBS="-liconv $LIBS"
 		cat >conftest.$ac_ext <<_ACEOF
-#line 16228 "configure"
+#line 16224 "configure"
 #include "confdefs.h"
 #include <iconv.h>
 int
@@ -16237,41 +16233,41 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:16240: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16236: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:16243: \$? = $ac_status" >&5
+  echo "$as_me:16239: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:16246: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16242: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16249: \$? = $ac_status" >&5
+  echo "$as_me:16245: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:16251: result: yes" >&5
+  echo "$as_me:16247: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 eval 'cf_cv_have_lib_'iconv'=yes'
 
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:16258: result: no" >&5
+echo "$as_me:16254: result: no" >&5
 echo "${ECHO_T}no" >&6
 			cf_search=""
 
-test -d $HOME && {
+test -d "$HOME" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME"
-	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
-	test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
-	test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
+	test -d "$HOME/lib" &&          cf_search="$cf_search $HOME/lib"
+	test -d "$HOME/lib/iconv" &&       cf_search="$cf_search $HOME/lib/iconv"
+	test -d "$HOME/lib/iconv/lib" &&    cf_search="$cf_search $HOME/lib/iconv/lib"
 }
 
 # For other stuff under the home directory, it should be sufficient to put
 # a symbolic link for $HOME/iconv to the actual package location:
-test -d $HOME/iconv && {
+test -d "$HOME/iconv" && {
 	test -n "$verbose" && echo "	... testing lib-directories under $HOME/iconv"
-	test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
-	test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
+	test -d "$HOME/iconv/lib" &&       cf_search="$cf_search $HOME/iconv/lib"
+	test -d "$HOME/iconv/lib/iconv" &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
 }
 
 test "$prefix" != /usr/local && \
@@ -16315,11 +16311,11 @@
 
 			for cf_libdir in $cf_search
 			do
-				echo "$as_me:16318: checking for -liconv in $cf_libdir" >&5
+				echo "$as_me:16314: checking for -liconv in $cf_libdir" >&5
 echo $ECHO_N "checking for -liconv in $cf_libdir... $ECHO_C" >&6
 				LIBS="-L$cf_libdir -liconv $cf_save_LIBS"
 				cat >conftest.$ac_ext <<_ACEOF
-#line 16322 "configure"
+#line 16318 "configure"
 #include "confdefs.h"
 #include <iconv.h>
 int
@@ -16331,25 +16327,25 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:16334: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16330: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:16337: \$? = $ac_status" >&5
+  echo "$as_me:16333: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:16340: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16336: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16343: \$? = $ac_status" >&5
+  echo "$as_me:16339: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:16345: result: yes" >&5
+  echo "$as_me:16341: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 			 		 eval 'cf_cv_have_lib_'iconv'=yes'
 					 break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-echo "$as_me:16352: result: no" >&5
+echo "$as_me:16348: result: no" >&5
 echo "${ECHO_T}no" >&6
 					 LIBS="$cf_save_LIBS"
 fi
@@ -16363,7 +16359,7 @@
 
 eval 'cf_found_library=$cf_cv_have_lib_'iconv
 
-echo "$as_me:16366: checking for iconv function library" >&5
+echo "$as_me:16362: checking for iconv function library" >&5
 echo $ECHO_N "checking for iconv function library... $ECHO_C" >&6
 if test "${cf_cv_func_iconv+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -16376,11 +16372,11 @@
 	fi
 
 fi
-echo "$as_me:16379: result: $cf_cv_func_iconv" >&5
+echo "$as_me:16375: result: $cf_cv_func_iconv" >&5
 echo "${ECHO_T}$cf_cv_func_iconv" >&6
 
 if test "$cf_cv_func_iconv" != no ; then
-echo "$as_me:16383: checking if you want to use iconv() for locale support" >&5
+echo "$as_me:16379: checking if you want to use iconv() for locale support" >&5
 echo $ECHO_N "checking if you want to use iconv() for locale support... $ECHO_C" >&6
 
 # Check whether --with-iconv or --without-iconv was given.
@@ -16390,7 +16386,7 @@
 else
   cf_func_iconv=yes
 fi;
-echo "$as_me:16393: result: $cf_func_iconv" >&5
+echo "$as_me:16389: result: $cf_func_iconv" >&5
 echo "${ECHO_T}$cf_func_iconv" >&6
 if test "$cf_func_iconv" = yes ; then
 	cat >>confdefs.h <<\EOF
@@ -16405,7 +16401,7 @@
 
 ###	Debugging/development options
 
-echo "$as_me:16408: checking if you want to link with dbmalloc for testing" >&5
+echo "$as_me:16404: checking if you want to link with dbmalloc for testing" >&5
 echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dbmalloc or --without-dbmalloc was given.
@@ -16415,26 +16411,26 @@
 else
   with_dbmalloc=no
 fi;
-echo "$as_me:16418: result: $with_dbmalloc" >&5
+echo "$as_me:16414: result: $with_dbmalloc" >&5
 echo "${ECHO_T}$with_dbmalloc" >&6
 if test "$with_dbmalloc" = yes ; then
-	echo "$as_me:16421: checking for dbmalloc.h" >&5
+	echo "$as_me:16417: checking for dbmalloc.h" >&5
 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 16427 "configure"
+#line 16423 "configure"
 #include "confdefs.h"
 #include <dbmalloc.h>
 _ACEOF
-if { (eval echo "$as_me:16431: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:16427: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:16437: \$? = $ac_status" >&5
+  echo "$as_me:16433: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -16453,11 +16449,11 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:16456: result: $ac_cv_header_dbmalloc_h" >&5
+echo "$as_me:16452: result: $ac_cv_header_dbmalloc_h" >&5
 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
 if test $ac_cv_header_dbmalloc_h = yes; then
 
-echo "$as_me:16460: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:16456: checking for debug_malloc in -ldbmalloc" >&5
 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -16465,7 +16461,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldbmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 16468 "configure"
+#line 16464 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -16484,16 +16480,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:16487: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16483: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:16490: \$? = $ac_status" >&5
+  echo "$as_me:16486: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:16493: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16489: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16496: \$? = $ac_status" >&5
+  echo "$as_me:16492: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dbmalloc_debug_malloc=yes
 else
@@ -16504,7 +16500,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:16507: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:16503: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
   cat >>confdefs.h <<EOF
@@ -16519,7 +16515,7 @@
 
 fi
 
-echo "$as_me:16522: checking if you want to link with dmalloc for testing" >&5
+echo "$as_me:16518: checking if you want to link with dmalloc for testing" >&5
 echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dmalloc or --without-dmalloc was given.
@@ -16529,26 +16525,26 @@
 else
   with_dmalloc=no
 fi;
-echo "$as_me:16532: result: $with_dmalloc" >&5
+echo "$as_me:16528: result: $with_dmalloc" >&5
 echo "${ECHO_T}$with_dmalloc" >&6
 if test "$with_dmalloc" = yes ; then
-	echo "$as_me:16535: checking for dmalloc.h" >&5
+	echo "$as_me:16531: checking for dmalloc.h" >&5
 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
 if test "${ac_cv_header_dmalloc_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 16541 "configure"
+#line 16537 "configure"
 #include "confdefs.h"
 #include <dmalloc.h>
 _ACEOF
-if { (eval echo "$as_me:16545: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:16541: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
   egrep -v '^ *\+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:16551: \$? = $ac_status" >&5
+  echo "$as_me:16547: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -16567,11 +16563,11 @@
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:16570: result: $ac_cv_header_dmalloc_h" >&5
+echo "$as_me:16566: result: $ac_cv_header_dmalloc_h" >&5
 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
 if test $ac_cv_header_dmalloc_h = yes; then
 
-echo "$as_me:16574: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:16570: checking for dmalloc_debug in -ldmalloc" >&5
 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -16579,7 +16575,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 16582 "configure"
+#line 16578 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -16598,16 +16594,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:16601: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16597: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:16604: \$? = $ac_status" >&5
+  echo "$as_me:16600: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:16607: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16603: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16610: \$? = $ac_status" >&5
+  echo "$as_me:16606: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dmalloc_dmalloc_debug=yes
 else
@@ -16618,7 +16614,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:16621: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:16617: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
   cat >>confdefs.h <<EOF
@@ -16692,17 +16688,17 @@
 
 GCC_VERSION=none
 if test "$GCC" = yes ; then
-	echo "$as_me:16695: checking version of $CC" >&5
+	echo "$as_me:16691: checking version of $CC" >&5
 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
 	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
 	test -z "$GCC_VERSION" && GCC_VERSION=unknown
-	echo "$as_me:16699: result: $GCC_VERSION" >&5
+	echo "$as_me:16695: result: $GCC_VERSION" >&5
 echo "${ECHO_T}$GCC_VERSION" >&6
 fi
 
 if ( test "$GCC" = yes || test "$GXX" = yes )
 then
-echo "$as_me:16705: checking if you want to check for gcc warnings" >&5
+echo "$as_me:16701: checking if you want to check for gcc warnings" >&5
 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
 
 # Check whether --with-warnings or --without-warnings was given.
@@ -16712,7 +16708,7 @@
 else
   cf_opt_with_warnings=no
 fi;
-echo "$as_me:16715: result: $cf_opt_with_warnings" >&5
+echo "$as_me:16711: result: $cf_opt_with_warnings" >&5
 echo "${ECHO_T}$cf_opt_with_warnings" >&6
 if test "$cf_opt_with_warnings" != no ; then
 
@@ -16734,10 +16730,10 @@
 EOF
 if test "$GCC" = yes
 then
-	{ echo "$as_me:16737: checking for $CC __attribute__ directives..." >&5
+	{ echo "$as_me:16733: checking for $CC __attribute__ directives..." >&5
 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
 cat > conftest.$ac_ext <<EOF
-#line 16740 "configure"
+#line 16736 "configure"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -16775,12 +16771,12 @@
 EOF
 			;;
 		esac
-		if { (eval echo "$as_me:16778: \"$ac_compile\"") >&5
+		if { (eval echo "$as_me:16774: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:16781: \$? = $ac_status" >&5
+  echo "$as_me:16777: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-			test -n "$verbose" && echo "$as_me:16783: result: ... $cf_attribute" >&5
+			test -n "$verbose" && echo "$as_me:16779: result: ... $cf_attribute" >&5
 echo "${ECHO_T}... $cf_attribute" >&6
 			cat conftest.h >>confdefs.h
 		fi
@@ -16796,12 +16792,12 @@
 if test "$GCC" = yes ; then
 	case $host_os in
 	linux*|gnu*)
-		echo "$as_me:16799: checking if this is really Intel C compiler" >&5
+		echo "$as_me:16795: checking if this is really Intel C compiler" >&5
 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
 		cf_save_CFLAGS="$CFLAGS"
 		CFLAGS="$CFLAGS -no-gcc"
 		cat >conftest.$ac_ext <<_ACEOF
-#line 16804 "configure"
+#line 16800 "configure"
 #include "confdefs.h"
 
 int
@@ -16818,16 +16814,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:16821: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16817: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:16824: \$? = $ac_status" >&5
+  echo "$as_me:16820: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:16827: \"$ac_try\"") >&5
+  { (eval echo "$as_me:16823: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:16830: \$? = $ac_status" >&5
+  echo "$as_me:16826: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   INTEL_COMPILER=yes
 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
@@ -16838,14 +16834,14 @@
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 		CFLAGS="$cf_save_CFLAGS"
-		echo "$as_me:16841: result: $INTEL_COMPILER" >&5
+		echo "$as_me:16837: result: $INTEL_COMPILER" >&5
 echo "${ECHO_T}$INTEL_COMPILER" >&6
 		;;
 	esac
 fi
 
 cat > conftest.$ac_ext <<EOF
-#line 16848 "configure"
+#line 16844 "configure"
 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
 
@@ -16863,7 +16859,7 @@
 # remark #981: operands are evaluated in unspecified order
 # warning #269: invalid format string conversion
 
-	{ echo "$as_me:16866: checking for $CC warning options..." >&5
+	{ echo "$as_me:16862: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
 	cf_save_CFLAGS="$CFLAGS"
 	EXTRA_CFLAGS="-Wall"
@@ -16880,12 +16876,12 @@
 		wd981
 	do
 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-		if { (eval echo "$as_me:16883: \"$ac_compile\"") >&5
+		if { (eval echo "$as_me:16879: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:16886: \$? = $ac_status" >&5
+  echo "$as_me:16882: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-			test -n "$verbose" && echo "$as_me:16888: result: ... -$cf_opt" >&5
+			test -n "$verbose" && echo "$as_me:16884: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
 		fi
@@ -16894,7 +16890,7 @@
 
 elif test "$GCC" = yes
 then
-	{ echo "$as_me:16897: checking for $CC warning options..." >&5
+	{ echo "$as_me:16893: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
 	cf_save_CFLAGS="$CFLAGS"
 	EXTRA_CFLAGS="-W -Wall"
@@ -16914,12 +16910,12 @@
 		Wundef $cf_warn_CONST
 	do
 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-		if { (eval echo "$as_me:16917: \"$ac_compile\"") >&5
+		if { (eval echo "$as_me:16913: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:16920: \$? = $ac_status" >&5
+  echo "$as_me:16916: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-			test -n "$verbose" && echo "$as_me:16922: result: ... -$cf_opt" >&5
+			test -n "$verbose" && echo "$as_me:16918: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
 			case $cf_opt in #(vi
 			Wcast-qual) #(vi
@@ -16969,7 +16965,7 @@
 
 ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 
-echo "$as_me:16972: checking for missing \"${ac_func}\" extern" >&5
+echo "$as_me:16968: checking for missing \"${ac_func}\" extern" >&5
 echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
 if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -16978,7 +16974,7 @@
 cf_save_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $CHECK_DECL_FLAG"
 cat >conftest.$ac_ext <<_ACEOF
-#line 16981 "configure"
+#line 16977 "configure"
 #include "confdefs.h"
 
 $CHECK_DECL_HDRS
@@ -17000,16 +16996,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17003: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16999: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17006: \$? = $ac_status" >&5
+  echo "$as_me:17002: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17009: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17005: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17012: \$? = $ac_status" >&5
+  echo "$as_me:17008: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval 'cf_cv_func_'${ac_func}'=yes'
 else
@@ -17023,7 +17019,7 @@
 fi
 
 eval 'cf_result=$cf_cv_func_'${ac_func}
-echo "$as_me:17026: result: $cf_result" >&5
+echo "$as_me:17022: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 test $cf_result = yes && cat >>confdefs.h <<EOF
 #define MISSING_EXTERN_${ac_tr_func} 1
@@ -17037,7 +17033,7 @@
 #include <tcap.h>
 "
 
-echo "$as_me:17040: checking for term.h" >&5
+echo "$as_me:17036: checking for term.h" >&5
 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
 if test "${cf_cv_term_header+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17050,7 +17046,7 @@
 	term.h
 do
 	cat >conftest.$ac_ext <<_ACEOF
-#line 17053 "configure"
+#line 17049 "configure"
 #include "confdefs.h"
 
 #include <${cf_cv_ncurses_header-curses.h}>
@@ -17064,16 +17060,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:17067: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17063: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:17070: \$? = $ac_status" >&5
+  echo "$as_me:17066: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:17073: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17069: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17076: \$? = $ac_status" >&5
+  echo "$as_me:17072: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_term_header=$cf_header
 	 break
@@ -17086,7 +17082,7 @@
 done
 
 fi
-echo "$as_me:17089: result: $cf_cv_term_header" >&5
+echo "$as_me:17085: result: $cf_cv_term_header" >&5
 echo "${ECHO_T}$cf_cv_term_header" >&6
 
 case $cf_cv_term_header in #(vi
@@ -17110,7 +17106,7 @@
 	;;
 esac
 
-echo "$as_me:17113: checking if we should include curses.h or termcap.h" >&5
+echo "$as_me:17109: checking if we should include curses.h or termcap.h" >&5
 echo $ECHO_N "checking if we should include curses.h or termcap.h... $ECHO_C" >&6
 if test "${cf_cv_need_curses_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17129,7 +17125,7 @@
     test -n "$cf_t_opts" && CPPFLAGS="$CPPFLAGS -D$cf_t_opts"
 
     cat >conftest.$ac_ext <<_ACEOF
-#line 17132 "configure"
+#line 17128 "configure"
 #include "confdefs.h"
 /* $cf_c_opts $cf_t_opts */
 $CHECK_DECL_HDRS
@@ -17142,16 +17138,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17145: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17141: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17148: \$? = $ac_status" >&5
+  echo "$as_me:17144: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17151: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17147: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17154: \$? = $ac_status" >&5
+  echo "$as_me:17150: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   test "$cf_cv_need_curses_h" = no && {
 	     cf_cv_need_curses_h=maybe
@@ -17163,7 +17159,7 @@
 cat conftest.$ac_ext >&5
 echo "Recompiling with corrected call (C:$cf_c_opts, T:$cf_t_opts)" >&5
 	cat >conftest.$ac_ext <<_ACEOF
-#line 17166 "configure"
+#line 17162 "configure"
 #include "confdefs.h"
 
 $CHECK_DECL_HDRS
@@ -17176,16 +17172,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17179: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17175: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17182: \$? = $ac_status" >&5
+  echo "$as_me:17178: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17185: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17181: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17188: \$? = $ac_status" >&5
+  echo "$as_me:17184: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_need_curses_h=yes
 	 cf_ok_c_opts=$cf_c_opts
@@ -17222,7 +17218,7 @@
 fi
 
 fi
-echo "$as_me:17225: result: $cf_cv_need_curses_h" >&5
+echo "$as_me:17221: result: $cf_cv_need_curses_h" >&5
 echo "${ECHO_T}$cf_cv_need_curses_h" >&6
 
 case $cf_cv_need_curses_h in
@@ -17256,7 +17252,7 @@
 	;;
 esac
 
-echo "$as_me:17259: checking declaration of tputs 3rd param" >&5
+echo "$as_me:17255: checking declaration of tputs 3rd param" >&5
 echo $ECHO_N "checking declaration of tputs 3rd param... $ECHO_C" >&6
 if test "${cf_cv_type_outchar+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17272,10 +17268,10 @@
 for R in int char; do
 for S in "" const; do
 
-echo "(line 17275) testing loop variables P:$P, Q:$Q, R:$R, S:$S ..." 1>&5
+echo "(line 17271) testing loop variables P:$P, Q:$Q, R:$R, S:$S ..." 1>&5
 
 	cat >conftest.$ac_ext <<_ACEOF
-#line 17278 "configure"
+#line 17274 "configure"
 #include "confdefs.h"
 $CHECK_DECL_HDRS
 int
@@ -17289,16 +17285,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:17292: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17288: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:17295: \$? = $ac_status" >&5
+  echo "$as_me:17291: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:17298: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17294: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17301: \$? = $ac_status" >&5
+  echo "$as_me:17297: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_cv_type_outchar="$Q OutChar($R)"
 	 cf_cv_found=yes
@@ -17317,7 +17313,7 @@
 done
 
 fi
-echo "$as_me:17320: result: $cf_cv_type_outchar" >&5
+echo "$as_me:17316: result: $cf_cv_type_outchar" >&5
 echo "${ECHO_T}$cf_cv_type_outchar" >&6
 
 case $cf_cv_type_outchar in
@@ -17349,7 +17345,7 @@
 
 ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 
-echo "$as_me:17352: checking for missing \"${ac_func}\" extern" >&5
+echo "$as_me:17348: checking for missing \"${ac_func}\" extern" >&5
 echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
 if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17358,7 +17354,7 @@
 cf_save_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $CHECK_DECL_FLAG"
 cat >conftest.$ac_ext <<_ACEOF
-#line 17361 "configure"
+#line 17357 "configure"
 #include "confdefs.h"
 
 $CHECK_DECL_HDRS
@@ -17380,16 +17376,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17383: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17379: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17386: \$? = $ac_status" >&5
+  echo "$as_me:17382: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17389: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17385: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17392: \$? = $ac_status" >&5
+  echo "$as_me:17388: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval 'cf_cv_func_'${ac_func}'=yes'
 else
@@ -17403,7 +17399,7 @@
 fi
 
 eval 'cf_result=$cf_cv_func_'${ac_func}
-echo "$as_me:17406: result: $cf_result" >&5
+echo "$as_me:17402: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 test $cf_result = yes && cat >>confdefs.h <<EOF
 #define MISSING_EXTERN_${ac_tr_func} 1
@@ -17479,7 +17475,7 @@
 
 ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 
-echo "$as_me:17482: checking for missing \"${ac_func}\" extern" >&5
+echo "$as_me:17478: checking for missing \"${ac_func}\" extern" >&5
 echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
 if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17488,7 +17484,7 @@
 cf_save_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $CHECK_DECL_FLAG"
 cat >conftest.$ac_ext <<_ACEOF
-#line 17491 "configure"
+#line 17487 "configure"
 #include "confdefs.h"
 
 $CHECK_DECL_HDRS
@@ -17510,16 +17506,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17513: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17509: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17516: \$? = $ac_status" >&5
+  echo "$as_me:17512: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17519: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17515: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17522: \$? = $ac_status" >&5
+  echo "$as_me:17518: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval 'cf_cv_func_'${ac_func}'=yes'
 else
@@ -17533,7 +17529,7 @@
 fi
 
 eval 'cf_result=$cf_cv_func_'${ac_func}
-echo "$as_me:17536: result: $cf_result" >&5
+echo "$as_me:17532: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 test $cf_result = yes && cat >>confdefs.h <<EOF
 #define MISSING_EXTERN_${ac_tr_func} 1
@@ -17553,7 +17549,7 @@
 
 ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 
-echo "$as_me:17556: checking for missing \"${ac_func}\" extern" >&5
+echo "$as_me:17552: checking for missing \"${ac_func}\" extern" >&5
 echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
 if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17562,7 +17558,7 @@
 cf_save_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $CHECK_DECL_FLAG"
 cat >conftest.$ac_ext <<_ACEOF
-#line 17565 "configure"
+#line 17561 "configure"
 #include "confdefs.h"
 
 $CHECK_DECL_HDRS
@@ -17584,16 +17580,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17587: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17583: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17590: \$? = $ac_status" >&5
+  echo "$as_me:17586: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17593: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17589: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17596: \$? = $ac_status" >&5
+  echo "$as_me:17592: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   eval 'cf_cv_func_'${ac_func}'=yes'
 else
@@ -17607,7 +17603,7 @@
 fi
 
 eval 'cf_result=$cf_cv_func_'${ac_func}
-echo "$as_me:17610: result: $cf_result" >&5
+echo "$as_me:17606: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 test $cf_result = yes && cat >>confdefs.h <<EOF
 #define MISSING_EXTERN_${ac_tr_func} 1
@@ -17664,13 +17660,13 @@
 if test "$cf_need_libdl" = yes ; then
 
 cf_have_dlsym=no
-echo "$as_me:17667: checking for dlsym" >&5
+echo "$as_me:17663: checking for dlsym" >&5
 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
 if test "${ac_cv_func_dlsym+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 17673 "configure"
+#line 17669 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlsym (); below.  */
@@ -17701,16 +17697,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17704: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17700: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17707: \$? = $ac_status" >&5
+  echo "$as_me:17703: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17710: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17706: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17713: \$? = $ac_status" >&5
+  echo "$as_me:17709: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_func_dlsym=yes
 else
@@ -17720,14 +17716,14 @@
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:17723: result: $ac_cv_func_dlsym" >&5
+echo "$as_me:17719: result: $ac_cv_func_dlsym" >&5
 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
 if test $ac_cv_func_dlsym = yes; then
   cf_have_dlsym=yes
 else
 
 cf_have_libdl=no
-echo "$as_me:17730: checking for dlsym in -ldl" >&5
+echo "$as_me:17726: checking for dlsym in -ldl" >&5
 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17735,7 +17731,7 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 17738 "configure"
+#line 17734 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -17754,16 +17750,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17757: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17753: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17760: \$? = $ac_status" >&5
+  echo "$as_me:17756: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17763: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17759: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17766: \$? = $ac_status" >&5
+  echo "$as_me:17762: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dl_dlsym=yes
 else
@@ -17774,7 +17770,7 @@
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:17777: result: $ac_cv_lib_dl_dlsym" >&5
+echo "$as_me:17773: result: $ac_cv_lib_dl_dlsym" >&5
 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
 if test $ac_cv_lib_dl_dlsym = yes; then
 
@@ -17787,10 +17783,10 @@
 if test "$cf_have_dlsym" = yes ; then
 	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
 
-	echo "$as_me:17790: checking whether able to link to dl*() functions" >&5
+	echo "$as_me:17786: checking whether able to link to dl*() functions" >&5
 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
 	cat >conftest.$ac_ext <<_ACEOF
-#line 17793 "configure"
+#line 17789 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 int
@@ -17808,16 +17804,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17811: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17807: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17814: \$? = $ac_status" >&5
+  echo "$as_me:17810: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17817: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17813: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17820: \$? = $ac_status" >&5
+  echo "$as_me:17816: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 		cat >>confdefs.h <<\EOF
@@ -17828,15 +17824,15 @@
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 
-		{ { echo "$as_me:17831: error: Cannot link test program for libdl" >&5
+		{ { echo "$as_me:17827: error: Cannot link test program for libdl" >&5
 echo "$as_me: error: Cannot link test program for libdl" >&2;}
    { (exit 1); exit 1; }; }
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-	echo "$as_me:17836: result: ok" >&5
+	echo "$as_me:17832: result: ok" >&5
 echo "${ECHO_T}ok" >&6
 else
-	{ { echo "$as_me:17839: error: Cannot find dlsym function" >&5
+	{ { echo "$as_me:17835: error: Cannot find dlsym function" >&5
 echo "$as_me: error: Cannot find dlsym function" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -17851,10 +17847,10 @@
 		cf_opt_rdynamic=no
 		cf_save_CFLAGS="$CFLAGS"
 		CFLAGS="-Wall -rdynamic $CFLAGS"
-		echo "$as_me:17854: checking if gcc has -rdynamic option" >&5
+		echo "$as_me:17850: checking if gcc has -rdynamic option" >&5
 echo $ECHO_N "checking if gcc has -rdynamic option... $ECHO_C" >&6
 		cat >conftest.$ac_ext <<_ACEOF
-#line 17857 "configure"
+#line 17853 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -17866,16 +17862,16 @@
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17869: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17865: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17872: \$? = $ac_status" >&5
+  echo "$as_me:17868: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17875: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17871: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17878: \$? = $ac_status" >&5
+  echo "$as_me:17874: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_opt_rdynamic=yes
 else
@@ -17884,7 +17880,7 @@
 cf_opt_rdynamic=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-		echo "$as_me:17887: result: $cf_opt_rdynamic" >&5
+		echo "$as_me:17883: result: $cf_opt_rdynamic" >&5
 echo "${ECHO_T}$cf_opt_rdynamic" >&6
 		test "$cf_opt_rdynamic" = no && CFLAGS="$cf_save_CFLAGS"
 
@@ -17901,7 +17897,7 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:17904: checking for $ac_word" >&5
+echo "$as_me:17900: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_prog_SPELL_PROG+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -17916,7 +17912,7 @@
   test -z "$ac_dir" && ac_dir=.
   $as_executable_p "$ac_dir/$ac_word" || continue
 ac_cv_prog_SPELL_PROG="$ac_prog"
-echo "$as_me:17919: found $ac_dir/$ac_word" >&5
+echo "$as_me:17915: found $ac_dir/$ac_word" >&5
 break
 done
 
@@ -17924,10 +17920,10 @@
 fi
 SPELL_PROG=$ac_cv_prog_SPELL_PROG
 if test -n "$SPELL_PROG"; then
-  echo "$as_me:17927: result: $SPELL_PROG" >&5
+  echo "$as_me:17923: result: $SPELL_PROG" >&5
 echo "${ECHO_T}$SPELL_PROG" >&6
 else
-  echo "$as_me:17930: result: no" >&5
+  echo "$as_me:17926: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
@@ -18039,7 +18035,7 @@
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:18042: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:18038: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -18215,7 +18211,7 @@
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:18218: error: ambiguous option: $1
+    { { echo "$as_me:18214: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -18234,7 +18230,7 @@
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:18237: error: unrecognized option: $1
+  -*) { { echo "$as_me:18233: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -18292,7 +18288,7 @@
   "filters/makefile.tmp" ) CONFIG_FILES="$CONFIG_FILES filters/makefile.tmp:filters/makefile.2nd" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config_h.in" ;;
-  *) { { echo "$as_me:18295: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:18291: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -18562,7 +18558,7 @@
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:18565: creating $ac_file" >&5
+    { echo "$as_me:18561: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -18580,7 +18576,7 @@
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:18583: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:18579: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -18593,7 +18589,7 @@
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:18596: error: cannot find input file: $f" >&5
+           { { echo "$as_me:18592: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -18659,7 +18655,7 @@
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:18662: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:18658: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -18670,7 +18666,7 @@
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:18673: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:18669: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -18683,7 +18679,7 @@
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:18686: error: cannot find input file: $f" >&5
+           { { echo "$as_me:18682: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -18741,7 +18737,7 @@
   rm -f $tmp/in
   if test x"$ac_file" != x-; then
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
-      { echo "$as_me:18744: $ac_file is unchanged" >&5
+      { echo "$as_me:18740: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Index: display.c
Prereq:  1.421 
--- vile-9.5l+/display.c	2006-11-04 11:48:01.000000000 +0000
+++ vile-9.5m/display.c	2006-12-13 01:34:10.000000000 +0000
@@ -5,7 +5,7 @@
  * functions use hints that are left in the windows by the commands.
  *
  *
- * $Header: /usr/build/vile/vile/RCS/display.c,v 1.421 2006/11/04 11:48:01 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/display.c,v 1.423 2006/12/13 01:34:10 tom Exp $
  *
  */
 
@@ -70,7 +70,7 @@
 
 /******************************************************************************/
 
-typedef void (*OutFunc) (int c);
+typedef int (*OutFunc) (int c);
 
 static OutFunc dfoutfn;
 
@@ -3392,6 +3392,12 @@
 	    wp->w_traits.w_left_dot = nullmark;
 #endif
     }
+#ifdef WMDSHOWVARS
+    if (curwp != 0
+	&& w_val(curwp, WMDSHOWVARS)) {
+	updatelistvariables();
+    }
+#endif
 
     /* look for scratch-buffers that should be recomputed.  */
 #if OPT_UPBUFF
@@ -3602,10 +3608,11 @@
     }
 }
 
-void
+int
 mlsavec(int c)
 {
     tb_append(&mlsave, c);
+    return TRUE;
 }
 
 /*
@@ -3843,10 +3850,11 @@
 
 static char *lsp;
 
-static void
+static int
 lspputc(int c)
 {
     *lsp++ = (char) c;
+    return TRUE;
 }
 
 /* VARARGS1 */
@@ -3881,13 +3889,17 @@
  * Buffer printf -- like regular printf, but puts characters
  *	into the BUFFER.
  */
-void
+int
 bputc(int c)
 {
+    int status;
+
     if (c == '\n')
-	(void) lnewline();
+	status = lnewline();
     else
-	(void) linsert(1, c);
+	status = linsert(1, c);
+
+    return status;
 }
 
 void
Index: doc/macros.doc
Prereq:  1.97 
--- vile-9.5l+/doc/macros.doc	2006-11-01 21:23:26.000000000 +0000
+++ vile-9.5m/doc/macros.doc	2006-12-02 12:40:20.000000000 +0000
@@ -411,8 +411,15 @@
 	$brightness	RGB levels for gray, normal, bright in the 0-255 range
 			(winvile version only).
 
+	$buf-fname-expr	[READ ONLY] Combines bufname-expr and pathname-expr
+			modes for the current buffer.
+
 	$buffer-hook    Name of procedure to run when switching to a buffer.
 
+	$bufname        current buffer-name under the cursor.
+			This is computed from the bufname-expr and
+			pathname-expr patterns.
+
 	$bwindows       [READ ONLY] Number of windows open on current buffer.
 
 	$cbufname       The current buffer's "buffername".  (As opposed
@@ -550,6 +557,8 @@
 	$iconname       With xvile, contains current icon name.
 
 	$identifier     The current "identifier-like" word under the cursor.
+			This is computed from the identifier-expr pattern.
+			Also see the "tagword" mode.
 
 	$kbd-macro      [READ ONLY]  This is the contents of the keyboard
 			macro buffer.
@@ -619,8 +628,10 @@
 
 	$pathlist-separator separates directory names in lists such as $PATH.
 
-	$pathname       [READ ONLY] current "path-like" word, under the
-			cursor.
+	$pathname       current "path-like" word, under the cursor.
+			This is computed from the pathname-expr pattern.
+			If the current buffer is a directory, use the
+			entire line, overriding the regular expression.
 
 	$pathname-separator separates levels of directory names in a path.
 			Usually this is '/', for Unix.
@@ -633,7 +644,7 @@
 	$position-format Format of ^G command.  See "Mode line customization"
 			in the vile help file.
 
-	$progname       [READ ONLY] The string "vile" "xvile", or "winvile"
+	$progname       [READ ONLY] The string "vile", "xvile", or "winvile"
 			as appropriate.
 
 	$prompt         The string ": ", used in command-line prompts.
@@ -697,7 +708,7 @@
 
 	$wlines         Height of current window.
 
-	$word           [READ ONLY] The "word" at the cursor location.
+	$word           The "word" at the cursor location.
 
 	$write-hook     Name of procedure to run before a file is written
 
@@ -1501,6 +1512,6 @@
 	========================= end vile.rc =======================
 
 -----------------------------------
-  $Header: /usr/build/vile/vile/doc/RCS/macros.doc,v 1.97 2006/11/01 21:23:26 tom Exp $
+  $Header: /usr/build/vile/vile/doc/RCS/macros.doc,v 1.100 2006/12/02 12:40:20 tom Exp $
 -----------------------------------
 
Index: doc/ncu-indent
Prereq:  1.12 
--- vile-9.5l+/doc/ncu-indent	2004-11-23 00:45:48.000000000 +0000
+++ vile-9.5m/doc/ncu-indent	2006-02-18 17:02:22.000000000 +0000
@@ -1,5 +1,32 @@
 #!/bin/sh
-# $Id: ncu-indent,v 1.12 2004/11/23 00:45:48 tom Exp $
+#****************************************************************************
+#* Copyright (c) 2001-2005,2006 Thomas E. Dickey                            *
+#*                                                                          *
+#* Permission is hereby granted, free of charge, to any person obtaining a  *
+#* copy of this software and associated documentation files (the            *
+#* "Software"), to deal in the Software without restriction, including      *
+#* without limitation the rights to use, copy, modify, merge, publish,      *
+#* distribute, distribute with modifications, sublicense, and/or sell       *
+#* copies of the Software, and to permit persons to whom the Software is    *
+#* furnished to do so, subject to the following conditions:                 *
+#*                                                                          *
+#* The above copyright notice and this permission notice shall be included  *
+#* in all copies or substantial portions of the Software.                   *
+#*                                                                          *
+#* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+#* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+#* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+#* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+#* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+#* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+#* THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+#*                                                                          *
+#* Except as contained in this notice, the name(s) of the above copyright   *
+#* holders shall not be used in advertising or otherwise to promote the     *
+#* sale, use or other dealings in this Software without prior written       *
+#* authorization.                                                           *
+#****************************************************************************/
+# $Id: ncu-indent,v 1.16 2006/02/18 17:02:22 tom Exp $
 NOOP=no
 OPTS='
 --blank-lines-after-procedures
@@ -18,6 +45,7 @@
 --tab-size8
 
 -T NCURSES_EXPORT_VAR
+-T NCURSES_INLINE
 -T SCREEN
 -T TERMTYPE
 -T attr_t
@@ -53,7 +81,7 @@
 	-*)
 		OPTS="$OPTS $name"
 		;;
-	*.[ch])
+	*.[ch]|*.cc|*.cpp)
 		save="${name}".a$$
 		test="${name}".b$$
 		rm -f "$save" "$test"
@@ -61,6 +89,8 @@
 		sed \
 			-e '/MODULE_ID(/s/)$/);/' \
 			-e 's,\<GCC_NORETURN;,;//GCC_NORETURN;,' \
+			-e 's,\<GCC_PRINTFLIKE(,;//GCC_PRINTFLIKE(,' \
+			-e 's,\<GCC_SCANFLIKE(,;//GCC_SCANFLIKE(,' \
 			-e 's,\(\<NCURSES_EXPORT_VAR\>\),//\1,' \
 			"$save" >"$test"
 		cp "$test" "$name"
@@ -70,6 +100,8 @@
 		sed \
 			-e '/MODULE_ID(/s/);$/)/' \
 			-e 's,;[ 	]*//GCC_NORETURN;, GCC_NORETURN;,' \
+			-e 's,;[ 	]*//GCC_PRINTFLIKE(, GCC_PRINTFLIKE(,' \
+			-e 's,;[ 	]*//GCC_SCANFLIKE(, GCC_SCANFLIKE(,' \
 			-e 's,//\(\<NCURSES_EXPORT_VAR\>\),\1,' \
 			"$name" >"$test"
 		mv "$test" "$name"
Index: edef.h
Prereq:  1.326 
--- vile-9.5l+/edef.h	2006-11-04 15:40:39.000000000 +0000
+++ vile-9.5m/edef.h	2006-12-03 15:32:29.000000000 +0000
@@ -6,7 +6,7 @@
  */
 
 /*
- * $Header: /usr/build/vile/vile/RCS/edef.h,v 1.326 2006/11/04 15:40:39 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/edef.h,v 1.327 2006/12/03 15:32:29 tom Exp $
  */
 
 #ifndef VILE_EDEF_H
@@ -186,6 +186,10 @@
 decl_uninit( B_VALUES global_b_values );
 decl_uninit( W_VALUES global_w_values );
 
+#if OPT_CURTOKENS
+decl_uninit( struct VAL buf_fname_expr );
+#endif
+
 decl_init( int sgarbf, TRUE );		/* TRUE if screen is garbage	*/
 decl_init( int need_update, TRUE );	/* TRUE if screen is not updated*/
 decl_uninit( int clexec );		/* command line execution flag	*/
@@ -282,6 +286,13 @@
 decl_init( int tracemacros, FALSE );	/* macro tracing flag		*/
 #endif
 
+#if OPT_FINDERR
+decl_init( TBUFF *filename_expr, 0 );
+decl_init( TBUFF *error_expr, 0 );
+decl_init( TBUFF *error_match, 0 );
+decl_init( int error_tabstop, 8 );
+#endif
+
 #if OPT_MODELINE
 decl_init( int in_modeline, FALSE );	/* set during vi-style modeline */
 #endif
@@ -409,10 +420,6 @@
 decl_init_const( char TRACE_BufName[],		"[Trace]" );
 #endif
 #if OPT_FINDERR
-decl_init( TBUFF *filename_expr, 0 );
-decl_init( TBUFF *error_expr, 0 );
-decl_init( TBUFF *error_match, 0 );
-decl_init( int error_tabstop, 8 );
 decl_init_const( char ERRORS_BufName[],		"[Error Expressions]" );
 decl_init_const( char ERR_REGEX_BufName[],	"[Error Patterns]" );
 #endif
@@ -462,6 +469,8 @@
 decl_init_const( char FLTMSGS_BufName[],	"[Filter Messages]" );
 #endif
 
+/*--------------------------------------------------------------------------*/
+
 /* defined in nebind.h and nename.h */
 extern const NTAB nametbl[];
 extern const CMDFUNC *asciitbl[];
Index: estruct.h
Prereq:  1.598 
--- vile-9.5l+/estruct.h	2006-10-16 00:19:14.000000000 +0000
+++ vile-9.5m/estruct.h	2006-12-13 22:30:55.000000000 +0000
@@ -12,7 +12,7 @@
 */
 
 /*
- * $Header: /usr/build/vile/vile/RCS/estruct.h,v 1.598 2006/10/16 00:19:14 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/estruct.h,v 1.604 2006/12/13 22:30:55 tom Exp $
  */
 
 #ifndef _estruct_h
@@ -604,6 +604,7 @@
 /* individual features that are (normally) controlled by SMALLER */
 #define OPT_BNAME_CMPL  !SMALLER		/* name-completion for buffers */
 #define OPT_B_LIMITS    !SMALLER		/* left-margin */
+#define OPT_CURTOKENS   !SMALLER		/* cursor-tokens mode */
 #define OPT_ENUM_MODES  !SMALLER		/* fixed-string modes */
 #define OPT_EVAL        !SMALLER		/* expression-evaluation */
 #define OPT_FILEBACK    (!SMALLER && !SYS_VMS)	/* file backup style */
@@ -710,6 +711,7 @@
 #define OPT_BOOL_CHOICES	 !SMALLER
 #define OPT_CHARCLASS_CHOICES	 OPT_SHOW_CTYPE
 #define OPT_COLOR_CHOICES	 (OPT_ENUM_MODES && OPT_COLOR)
+#define OPT_CURTOKENS_CHOICES    OPT_CURTOKENS
 #define OPT_DIRECTIVE_CHOICES    !SMALLER
 #define OPT_FORBUFFERS_CHOICES   !SMALLER
 #define OPT_HILITE_CHOICES	 (OPT_ENUM_MODES && OPT_HILITEMATCH)
@@ -1121,6 +1123,12 @@
 	const FSM_CHOICES * choices;
 };
 
+typedef enum {
+	CT_BOTH = 0
+	, CT_CCLASS
+	, CT_REGEX
+} CURTOKENS;
+
 /*	Directive definitions	*/
 
 typedef	enum {
@@ -1347,6 +1355,8 @@
 #define R_PAREN ')'
 #define L_BLOCK '['
 #define R_BLOCK ']'
+#define L_ANGLE '<'
+#define R_ANGLE '>'
 
 /* these are the characters that are used in the expand-chars mode */
 #define EXPC_THIS  '%'
@@ -1412,14 +1422,13 @@
 #include <vl_regex.h>
 #endif
 
+			/* see screen_to_bname() */
 #if OPT_WIDE_CTYPES
-#define	SCREEN_STRING (vl_pathn|vl_scrtch|vl_shpipe)
+#define	SCREEN_STRING (vl_pathn | vl_wild | vl_scrtch | vl_shpipe)
 #else
-#define	SCREEN_STRING (vl_pathn)
+#define	SCREEN_STRING (vl_pathn | vl_wild)
 #endif
 
-#define screen_to_bname(buf) screen_string(buf,sizeof(buf),(CHARTYPE)SCREEN_STRING)
-
 #define KEY_Space	' '
 #define KEY_Tab		'\t'
 
@@ -1884,15 +1893,17 @@
 #endif
 } W_TRAITS;
 
-#define global_w_val(which) global_w_values.wv[which].v.i
-#define set_global_w_val(which,val) global_w_val(which) = val
-#define global_w_val_ptr(which) global_w_values.wv[which].v.p
+#define global_w_val(which)             global_w_values.wv[which].v.i
+#define global_w_val_ptr(which)         global_w_values.wv[which].v.p
+
+#define set_global_w_val(which,val)     global_w_val(which) = val
 #define set_global_w_val_ptr(which,val) global_w_val_ptr(which) = val
 
-#define w_val(wp,val) (wp->w_values.wv[val].vp->i)
-#define set_w_val(wp,which,val) w_val(wp,which) = val
-#define w_val_ptr(wp,val) (wp->w_values.wv[val].vp->p)
-#define set_w_val_ptr(wp,which,val) w_val_ptr(wp,which) = val
+#define w_val(wp,val)                   (wp->w_values.wv[val].vp->i)
+#define w_val_ptr(wp,val)               (wp->w_values.wv[val].vp->p)
+
+#define set_w_val(wp,which,val)         w_val(wp,which) = val
+#define set_w_val_ptr(wp,which,val)     w_val_ptr(wp,which) = val
 
 #define make_local_w_val(wp,which)  \
 	make_local_val(wp->w_values.wv, which)
@@ -2011,7 +2022,10 @@
 	char	*b_fname;		/* File name			*/
 	int	b_fnlen;		/* length of filename		*/
 	char	b_bname[NBUFN];		/* Buffer name			*/
-#if	OPT_ENCRYPT
+#if OPT_CURTOKENS
+	struct VAL buf_fname_expr;	/* $buf-fname-expr		*/
+#endif
+#if OPT_ENCRYPT
 	char	b_cryptkey[NKEYLEN];	/* encryption key		*/
 #endif
 #if SYS_UNIX
@@ -2070,19 +2084,25 @@
  */
 #define	for_each_buffer(bp) for (bp = bheadp; bp; bp = bp->b_bufp)
 
-#define global_b_val(which) global_b_values.bv[which].v.i
-#define set_global_b_val(which,val) global_b_val(which) = val
-#define global_b_val_ptr(which) global_b_values.bv[which].v.p
-#define set_global_b_val_ptr(which,val) global_b_val_ptr(which) = val
-#define global_b_val_rexp(which) global_b_values.bv[which].v.r
+#define gbl_b_val(which)                 global_b_values.bv[which]
+
+#define global_b_val(which)              gbl_b_val(which).v.i
+#define global_b_val_ptr(which)          gbl_b_val(which).v.p
+#define global_b_val_rexp(which)         gbl_b_val(which).v.r
+
+#define set_global_b_val(which,val)      global_b_val(which) = val
+#define set_global_b_val_ptr(which,val)  global_b_val_ptr(which) = val
 #define set_global_b_val_rexp(which,val) global_b_val_rexp(which) = val
 
-#define b_val(bp,val) (bp->b_values.bv[val].vp->i)
-#define set_b_val(bp,which,val) b_val(bp,which) = val
-#define b_val_ptr(bp,val) (bp->b_values.bv[val].vp->p)
-#define set_b_val_ptr(bp,which,val) b_val_ptr(bp,which) = val
-#define b_val_rexp(bp,val) (bp->b_values.bv[val].vp->r)
-#define set_b_val_rexp(bp,which,val) b_val_rexp(bp,which) = val
+#define any_b_val(bp,which)              (bp)->b_values.bv[which]
+
+#define b_val(bp,which)                  (any_b_val(bp,which).vp->i)
+#define b_val_ptr(bp,which)              (any_b_val(bp,which).vp->p)
+#define b_val_rexp(bp,which)             (any_b_val(bp,which).vp->r)
+
+#define set_b_val(bp,which,val)          b_val(bp,which) = val
+#define set_b_val_ptr(bp,which,val)      b_val_ptr(bp,which) = val
+#define set_b_val_rexp(bp,which,val)     b_val_rexp(bp,which) = val
 
 #define window_b_val(wp,val) \
 	((wp != 0 && wp->w_bufp != 0) \
@@ -2687,6 +2707,8 @@
 #include <rms.h>	/* required to compile nefsms.h */
 #define stricmp(a,b)	strcasecmp(a,b)
 #define strnicmp(a,b,n)	strncasecmp(a,b,n)
+#elif OPT_VMS_PATH
+#define strnicmp(a,b,n)	strncasecmp(a,b,n)
 #endif
 
 #ifdef HAVE_STDDEF_H
Index: eval.c
Prereq:  1.354 
--- vile-9.5l+/eval.c	2006-11-04 11:41:25.000000000 +0000
+++ vile-9.5m/eval.c	2006-11-24 20:13:47.000000000 +0000
@@ -2,7 +2,7 @@
  *	eval.c -- function and variable evaluation
  *	original by Daniel Lawrence
  *
- * $Header: /usr/build/vile/vile/RCS/eval.c,v 1.354 2006/11/04 11:41:25 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/eval.c,v 1.356 2006/11/24 20:13:47 tom Exp $
  *
  */
 
@@ -661,6 +661,7 @@
 	tb_scopy(result, init_state_value(vd.v_num));
 	break;
     case VW_MODE:
+	memset(&args, 0, sizeof(args));
 	for (mode_class = UNI_MODE; mode_class <= WIN_MODE; mode_class++) {
 	    switch (mode_class) {
 	    default:
@@ -675,7 +676,9 @@
 		break;
 	    }
 	    if ((mode_name = lookup_valnames(name, args.names)) >= 0) {
+		memset(&mode, 0, sizeof(mode));
 		init_mode_value(&mode, (MODECLASS) mode_class, mode_name);
+		args.names += mode_name;
 		args.global = &mode;
 		args.local = args.global;
 		tb_scopy(result, string_mode_val(&args));
@@ -1338,6 +1341,22 @@
     return result;
 }
 
+static void
+FindModeVar(char *var, VWRAP * vd)
+{
+    vd->v_num = lookup_statevar(var);
+    if (vd->v_num != ILLEGAL_NUM)
+	vd->v_type = VW_STATEVAR;
+#if !SMALLER
+    else {
+	VALARGS args;
+	if (is_mode_name(var, TRUE, &args) == TRUE) {
+	    vd->v_type = VW_MODE;
+	}
+    }
+#endif
+}
+
 /*
  * Find a variable's type and name
  */
@@ -1357,17 +1376,7 @@
 
     switch (var[0]) {
     case '$':			/* check for legal state var */
-	vd->v_num = lookup_statevar(var + 1);
-	if (vd->v_num != ILLEGAL_NUM)
-	    vd->v_type = VW_STATEVAR;
-#if !SMALLER
-	else {
-	    VALARGS args;
-	    if (is_mode_name(&var[1], TRUE, &args) == TRUE) {
-		vd->v_type = VW_MODE;
-	    }
-	}
-#endif
+	FindModeVar(var + 1, vd);
 	break;
 
     case '%':			/* check for legal temp variable */
@@ -1399,6 +1408,9 @@
 	    tb_free(&tok);
 	}
 	break;
+    default:
+	FindModeVar(var, vd);
+	break;
     }
 }
 
Index: exec.c
Prereq:  1.307 
--- vile-9.5l+/exec.c	2006-11-06 00:45:22.000000000 +0000
+++ vile-9.5m/exec.c	2006-11-23 14:37:10.000000000 +0000
@@ -4,7 +4,7 @@
  *	original by Daniel Lawrence, but
  *	much modified since then.  assign no blame to him.  -pgf
  *
- * $Header: /usr/build/vile/vile/RCS/exec.c,v 1.307 2006/11/06 00:45:22 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/exec.c,v 1.308 2006/11/23 14:37:10 tom Exp $
  *
  */
 
@@ -428,7 +428,7 @@
 	result = FALSE;
     } else if (isSpecial(c) || isCntrl(c)) {
 	result = TRUE;
-    } else if (islinespecchar(c)
+    } else if (islinespec(c)
 	       || (c == ':' && (cpos == 0 || buffer[cpos - 1] == c))
 	       || making_mark(buffer, cpos, c, eolchar)
 	       || making_pattern(buffer, cpos, c, eolchar)) {
Index: filec.c
Prereq:  1.124 
--- vile-9.5l+/filec.c	2006-05-21 10:58:58.000000000 +0000
+++ vile-9.5m/filec.c	2006-11-23 17:21:19.000000000 +0000
@@ -5,7 +5,7 @@
  * Written by T.E.Dickey for vile (march 1993).
  *
  *
- * $Header: /usr/build/vile/vile/RCS/filec.c,v 1.124 2006/05/21 10:58:58 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/filec.c,v 1.125 2006/11/23 17:21:19 tom Exp $
  *
  */
 
@@ -1263,7 +1263,7 @@
 	if (status != TRUE)
 	    return status;
 #endif
-    } else if (!screen_to_bname(Reply)) {
+    } else if (!screen_to_bname(Reply, sizeof(Reply))) {
 	return FALSE;
     }
     if (flag >= FILEC_UNKNOWN && is_appendname(Reply) != 0) {
@@ -1345,7 +1345,7 @@
 	if (status != TRUE)
 	    return status;
 
-    } else if (!screen_to_bname(Reply)) {
+    } else if (!screen_to_bname(Reply, sizeof(Reply))) {
 	return FALSE;
     }
 
Index: filters/xres.key
Prereq:  1.2 
--- vile-9.5l+/filters/xres.key	2001-09-18 20:22:23.000000000 +0000
+++ vile-9.5m/filters/xres.key	2006-11-28 23:56:24.000000000 +0000
@@ -1,20 +1,94 @@
-: $Id: xres.key,v 1.2 2001/09/18 20:22:23 tom Exp $
+: $Id: xres.key,v 1.3 2006/11/28 23:56:24 tom Exp $
 : keywords are matched case-independent
 <btn1down>
+<btn1motion>
 <btn1up>
 <btn2down>
+<btn2motion>
 <btn2up>
 <btn3down>
+<btn3motion>
 <btn3up>
 <btn4down>
+<btn4motion>
 <btn4up>
 <btn5down>
+<btn5motion>
 <btn5up>
 <btndown>
+<btnmotion>
 <btnup>
+<buttonpress>
+<buttonrelease>
+<circ>
+<circreq>
+<circulatenotify>
+<circulaterequest>
+<clientmessage>
+<clrmap>
+<colormapnotify>
+<configure>
+<configurenotify>
+<configurereq>
+<configurerequest>
+<create>
+<createnotify>
+<ctrl>
+<destroy>
+<destroynotify>
+<enter>
+<enternotify>
 <enterwindow>
+<eventtimer>
+<expose>
+<focusin>
+<focusout>
+<graphicsexpose>
+<grav>
+<gravitynotify>
+<grexp>
 <key>
+<keydown>
+<keymap>
+<keymapnotify>
+<keypress>
+<keyrelease>
+<keyup>
+<leave>
+<leavenotify>
 <leavewindow>
+<map>
+<mapnotify>
+<mapping>
+<mappingnotify>
+<mapreq>
+<maprequest>
+<message>
+<meta>
+<motion>
+<motionnotify>
+<mousemoved>
+<noexp>
+<noexpose>
+<prop>
+<propertynotify>
+<ptrmoved>
+<reparent>
+<reparentnotify>
+<resizerequest>
+<resreq>
+<selclr>
+<select>
+<selectionclear>
+<selectionnotify>
+<selectionrequest>
+<selreq>
+<shift>
+<timer>
+<unmap>
+<unmapnotify>
+<visibilitynotify>
+<visible>
 false
 true
 : C preprocessor keywords (the first token after the '#').
Index: filters/xresfilt.l
Prereq:  1.18 
--- vile-9.5l+/filters/xresfilt.l	2006-05-21 19:50:48.000000000 +0000
+++ vile-9.5m/filters/xresfilt.l	2006-11-24 21:17:29.000000000 +0000
@@ -3,7 +3,7 @@
 %{
 
 /*
- * $Header: /usr/build/vile/vile/filters/RCS/xresfilt.l,v 1.18 2006/05/21 19:50:48 tom Exp $
+ * $Header: /usr/build/vile/vile/filters/RCS/xresfilt.l,v 1.19 2006/11/24 21:17:29 tom Exp $
  *
  * Filter to add vile "attribution" sequences to an X resource file.
  */
@@ -53,7 +53,6 @@
 
 <RESVALUE>{NUMBER}	{ flt_bfr_embed(yytext, yyleng, Number_attr); }
 <RESVALUE>{KEYWORD}	{ quoted_name(yytext, yyleng); }
-<RESVALUE>![^\\\r\n]*	{ flt_bfr_embed(yytext, yyleng, Comment_attr); }
 <RESVALUE>\\\n		{ flt_bfr_append(yytext, yyleng); }
 <RESVALUE>({ESCAPED}|.)	{ flt_bfr_append(yytext, yyleng); }
 <RESVALUE>\n		{ flt_bfr_finish(); ECHO; BEGIN(NORMAL); }
Index: input.c
Prereq:  1.289 
--- vile-9.5l+/input.c	2006-05-21 22:32:27.000000000 +0000
+++ vile-9.5m/input.c	2006-12-11 01:29:54.000000000 +0000
@@ -44,7 +44,7 @@
  *	tgetc_avail()     true if a key is avail from tgetc() or below.
  *	keystroke_avail() true if a key is avail from keystroke() or below.
  *
- * $Header: /usr/build/vile/vile/RCS/input.c,v 1.289 2006/05/21 22:32:27 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/input.c,v 1.304 2006/12/11 01:29:54 tom Exp $
  *
  */
 
@@ -619,49 +619,160 @@
     return kbd_seq();
 }
 
-/* get a string consisting of inclchartype characters from the current
-	position.  if inclchartype is 0, return everything to eol */
+/*
+ * Check for special cases which override character-classes when getting
+ * data from the screen.
+ */
 int
-screen_string(char *buf, size_t bufn, CHARTYPE inclchartype)
+adjust_chartype(CHARTYPE *mask)
+{
+    int whole_line = FALSE;
+
+    /* if from gototag(), grab from the beginning of the string */
+    if (b_val(curbp, MDTAGWORD)
+	&& *mask == vl_ident) {
+	whole_line = TRUE;
+    } else if (b_is_directory(curbp)
+	       && *mask == SCREEN_STRING) {
+	whole_line = TRUE;
+	*mask = (CHARTYPE) ~0;
+    }
+    return whole_line;
+}
+
+/*
+ * Get a string consisting of inclchartype characters starting from the current
+ * position.  If inclchartype is 0, return everything to end of line.  If
+ * whole_line is true, allow the string to start before the current position.
+ */
+static int
+read_by_ctype(char *buf, size_t bufn, CHARTYPE inclchartype, int whole_line)
 {
     static TBUFF *temp;
     int rc;
     size_t len;
 
-    if ((rc = screen2tbuff(&temp, inclchartype)) == TRUE) {
+#if OPT_CURTOKENS
+    if (b_val(curbp, VAL_CURSOR_TOKENS) == CT_REGEX) {
+	return FALSE;
+    }
+#endif
+
+    TRACE((T_CALLED "read_by_ctype(incl=%#lx)\n", (ULONG) inclchartype));
+    if ((rc = vl_ctype2tbuff(&temp, inclchartype, whole_line)) == TRUE) {
 	if ((len = tb_length(temp)) >= bufn)
 	    len = bufn - 1;
 	strncpy0(buf, tb_values(temp), len + 1);
     } else {
 	*buf = EOS;
     }
-    return rc;
+    TRACE(("result %s\n", buf));
+    returnCode(rc);
+}
+
+#if OPT_CURTOKENS
+static int
+read_by_regex(char *buf, size_t bufn, REGEXVAL * rexp, int whole_line)
+{
+    static TBUFF *temp;
+    int rc = FALSE;
+    size_t len;
+
+    if (b_val(curbp, VAL_CURSOR_TOKENS) != CT_CCLASS) {
+	TRACE((T_CALLED "read_by_regex(incl=%s)\n", rexp->pat));
+	*buf = EOS;
+
+	if (*rexp->pat != EOS && rexp->reg != 0) {
+	    if ((rc = vl_regex2tbuff(&temp, rexp, whole_line)) == TRUE) {
+		if ((len = tb_length(temp)) >= bufn)
+		    len = bufn - 1;
+		strncpy0(buf, tb_values(temp), len + 1);
+	    }
+	}
+	TRACE(("result %s\n", buf));
+    }
+    returnCode(rc);
+}
+#else
+#define read_by_regex(buf, bufn, rexp, whole_line) FALSE
+#endif
+
+/*
+ * Obtain a buffer (or file) name from the screen.
+ * It may contain wildcards that we can glob-expand.
+ */
+int
+screen_to_bname(char *buf, size_t bufn)
+{
+    int rc;
+    CHARTYPE mask = SCREEN_STRING;
+    int whole_line = adjust_chartype(&mask);
+
+    TRACE((T_CALLED "screen_to_bname\n"));
+    rc = read_by_regex(buf, bufn, curbp->buf_fname_expr.vp->r, whole_line);
+    if (rc == FALSE)
+	rc = read_by_ctype(buf, bufn, mask, whole_line);
+    returnCode(rc);
+}
+
+/*
+ * Obtain $pathname from the screen.
+ */
+int
+screen_to_fname(char *buf, size_t bufn)
+{
+    int rc = FALSE;
+    CHARTYPE mask = vl_pathn;
+    int whole_line = adjust_chartype(&mask);
+
+    TRACE((T_CALLED "screen_to_fname\n"));
+    rc = read_by_regex(buf, bufn, b_val_rexp(curbp, VAL_PATHNAME_EXPR), whole_line);
+    if (rc == FALSE)
+	rc = read_by_ctype(buf, bufn, mask, whole_line);
+
+    returnCode(rc);
 }
 
-/* get a string consisting of inclchartype characters from the current
-	position.  if inclchartype is 0, return everything to eol */
+/*
+ * Obtain $identifier from the screen.
+ */
 int
-screen2tbuff(TBUFF **result, CHARTYPE inclchartype)
+screen_to_ident(char *buf, size_t bufn)
+{
+    int rc = FALSE;
+    CHARTYPE mask = vl_ident;
+    int whole_line = adjust_chartype(&mask);
+
+    TRACE((T_CALLED "screen_to_ident\n"));
+    rc = read_by_regex(buf, bufn, b_val_rexp(curbp, VAL_IDENTIFIER_EXPR), whole_line);
+    if (rc == FALSE)
+	rc = read_by_ctype(buf, bufn, mask, whole_line);
+    returnCode(rc);
+}
+
+/*
+ * Get a string consisting of inclchartype characters starting from the current
+ * position.  If inclchartype is 0, return everything to end of line.  If
+ * whole_line is true, allow the string to start before the current position.
+ */
+int
+vl_ctype2tbuff(TBUFF **result, CHARTYPE inclchartype, int whole_line)
 {
     int i = 0;
     MARK save_dot;
     int first = -1;
     int last = -1;
-    int whole_line = 0;
+
+    TRACE((T_CALLED "vl_ctype2tbuff(incl=%#lx)\n", (ULONG) inclchartype));
 
     save_dot = DOT;
 
     tb_init(result, EOS);
-    /* if from gototag(), grab from the beginning of the string */
-    if (b_val(curbp, MDTAGWORD)
-	&& inclchartype == vl_ident) {
-	whole_line = 1;
-    } else if (b_is_directory(curbp)
-	       && inclchartype == SCREEN_STRING) {
-	whole_line = 1;
-	inclchartype = (CHARTYPE) ~0;
-    }
 
+    /*
+     * If we're processing the whole line, find the beginning of the token
+     * by searching to the left.
+     */
     if (whole_line
 	&& DOT.o > 0
 	&& istype(inclchartype, char_at(DOT))) {
@@ -673,6 +784,10 @@
 	    }
 	}
     }
+
+    /*
+     * Search for the start of the token, and then the end of the token.
+     */
     while (!is_at_end_of_line(DOT)) {
 	last = CharOf(char_at(DOT));
 	if (first < 0)
@@ -732,8 +847,54 @@
 
     DOT = save_dot;
 
-    return tb_length(*result) != 0;
+    returnCode(tb_length(*result) != 0);
+}
+
+/*
+ * Get a string matching the given expression, which includes the current
+ * position.  If the "whole_line" parameter is true, allow the string to
+ * start before the current position.
+ */
+#if OPT_CURTOKENS
+int
+vl_regex2tbuff(TBUFF **result, REGEXVAL * rexp, int whole_line)
+{
+    C_NUM given = DOT.o;
+    C_NUM length;
+    C_NUM offset;
+    C_NUM match_off = -1;
+    C_NUM match_len = -1;
+
+    TRACE((T_CALLED "vl_regex2tbuff\n"));
+
+    tb_init(result, EOS);
+
+    if (rexp != 0 && rexp->pat != 0 && rexp->pat[0] && rexp->reg) {
+	regexp *exp = rexp->reg;
+	char *line_text = DOT.l->l_text;
+
+	while (given >= 0) {
+	    if (lregexec(exp, DOT.l, given, llength(DOT.l))) {
+		offset = exp->startp[0] - line_text;
+		length = exp->endp[0] - exp->startp[0];
+		if ((length > match_len) && (offset + length >= DOT.o)) {
+		    match_off = offset;
+		    match_len = length;
+		}
+	    }
+	    if (!whole_line)
+		break;
+	    --given;
+	}
+	if (match_len > 0) {
+	    tb_bappend(result, line_text + match_off, match_len);
+	    tb_append(result, EOS);
+	}
+    }
+
+    returnCode(tb_length(*result) != 0);
 }
+#endif /* OPT_CURTOKENS */
 
 /*
  * Returns the character that ended the last call on 'kbd_string()'
@@ -978,7 +1139,7 @@
 	if (!expand)
 	    return FALSE;
 
-	if (screen_string(str, sizeof(str), vl_pathn))
+	if (screen_to_fname(str, sizeof(str)))
 	    cp = str;
 	else
 	    cp = NULL;
Index: insert.c
Prereq:  1.147 
--- vile-9.5l+/insert.c	2006-11-06 21:26:32.000000000 +0000
+++ vile-9.5m/insert.c	2006-12-14 00:01:57.000000000 +0000
@@ -7,7 +7,7 @@
  * Most code probably by Dan Lawrence or Dave Conroy for MicroEMACS
  * Extensions for vile by Paul Fox
  *
- * $Header: /usr/build/vile/vile/RCS/insert.c,v 1.147 2006/11/06 21:26:32 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/insert.c,v 1.148 2006/12/14 00:01:57 tom Exp $
  *
  */
 
@@ -163,6 +163,7 @@
 /*
  * Implements the nvi/vim ex "i!" command.
  */
+#if !SMALLER
 int
 openup_i(int f, int n)
 {
@@ -189,6 +190,7 @@
     allow_aindent = oallow;
     return s;
 }
+#endif /* !SMALLER */
 
 /*
  * as above, but override all autoindenting and cmode-ing
Index: line.c
Prereq:  1.172 
--- vile-9.5l+/line.c	2006-11-02 01:44:56.000000000 +0000
+++ vile-9.5m/line.c	2006-11-24 01:21:35.000000000 +0000
@@ -10,7 +10,7 @@
  * editing must be being displayed, which means that "b_nwnd" is non zero,
  * which means that the dot and mark values in the buffer headers are nonsense.
  *
- * $Header: /usr/build/vile/vile/RCS/line.c,v 1.172 2006/11/02 01:44:56 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/line.c,v 1.177 2006/11/24 01:21:35 tom Exp $
  *
  */
 
@@ -734,63 +734,103 @@
     return (status);
 }
 
-/* returns pointer to static copy of text from current pos, consisting
- * of chars of type "type"
- */
 #if OPT_EVAL
-void
-lgrabtext(TBUFF **rp, CHARTYPE type)
+/*
+ * replace (part of) the current line with the passed in text, according to
+ * chartype.
+ *
+ * np -	new text for the current line
+ */
+int
+lrepl_ctype(CHARTYPE type, const char *np, int length)
 {
-    (void) screen2tbuff(rp, type);
-}
-#endif
+    int status;
+    int c;
+    int n;
 
-#if OPT_EVAL
+    TRACE((T_CALLED "lrepl_ctype:%s%lx:%.*s\n",
+	   type ? "word" : "line",
+	   (ULONG) type, length, NONNULL(np)));
+
+    if ((status = check_editable(curbp)) == TRUE) {
+
+	mayneedundo();
+
+	if (type != 0) {	/* it's an exact region */
+	    regionshape = EXACT;
+	    while (DOT.o < llength(DOT.l)
+		   && istype(type, char_at(DOT))) {
+		if ((status = forwdelchar(FALSE, 1)) != TRUE)
+		    break;
+	    }
+	} else {		/* it's the full line */
+	    regionshape = FULLLINE;
+	    DOT.o = w_left_margin(curwp);
+	    if ((status = deltoeol(TRUE, 1)) == TRUE)
+		DOT.o = w_left_margin(curwp);
+	}
+
+	if (status == TRUE) {
+	    /* insert passed in chars */
+	    for (n = 0; n < length; ++n) {
+		c = np[n];
+		if ((status = bputc(c)) != TRUE) {
+		    break;
+		}
+	    }
+	    if (type == 0) {
+		status = lnewline();
+		(void) backline(TRUE, 1);
+	    }
+	}
+    }
+    returnCode(status);
+}
 
 /*
- * replace the current line with the passed in text
+ * replace (part of) the current line with the passed in text, according to
+ * regular expression.
  *
  * np -	new text for the current line
  */
 int
-lrepltext(CHARTYPE type, const char *np, int length)
+lrepl_regex(REGEXVAL * rexp, const char *np, int length)
 {
-    int status = TRUE;
+    int status;
     int c;
     int n;
 
-    TRACE((T_CALLED "lrepltext:%s%lx:%.*s\n", type ? "word" : "line",
-	   (ULONG) type, length, np));
-
-    if (b_val(curbp, MDVIEW))
-	returnCode(rdonly());
-
-    mayneedundo();
+    TRACE((T_CALLED "lrepl_regex:%s{%.*s}\n",
+	   rexp ? NONNULL(rexp->pat) : "",
+	   length, np));
+
+    if (rexp == 0 || rexp->reg == 0) {
+	status = FALSE;
+
+    } else if ((status = check_editable(curbp)) == TRUE) {
+	regexp *exp = rexp->reg;
+
+	mayneedundo();
+
+	if (lregexec(exp, DOT.l, DOT.o, llength(DOT.l))) {
+	    int old = exp->endp[0] - exp->startp[0];
+	    if (old > 0) {
+		regionshape = EXACT;
+		status = forwdelchar(TRUE, old);
+	    }
+	} else {
+	    status = FALSE;
+	}
 
-    if (type != 0) {		/* it's an exact region */
-	regionshape = EXACT;
-	while (DOT.o < llength(DOT.l)
-	       && istype(type, char_at(DOT))) {
-	    if ((status = forwdelchar(FALSE, 1)) != TRUE)
-		returnCode(status);
-	}
-    } else {			/* it's the full line */
-	regionshape = FULLLINE;
-	DOT.o = w_left_margin(curwp);
-	if ((status = deltoeol(TRUE, 1)) != TRUE)
-	    returnCode(status);
-	DOT.o = w_left_margin(curwp);
-    }
-
-    /* insert passed in chars */
-    for (n = 0; n < length; ++n) {
-	c = np[n];
-	if (((c == '\n') ? lnewline() : linsert(1, c)) != TRUE)
-	    returnCode(FALSE);
-    }
-    if (type == 0) {
-	status = lnewline();
-	(void) backline(TRUE, 1);
+	if (status == TRUE) {
+	    /* insert passed in chars */
+	    for (n = 0; n < length; ++n) {
+		c = np[n];
+		if ((status = bputc(c)) != TRUE) {
+		    break;
+		}
+	    }
+	}
     }
     returnCode(status);
 }
Index: macros/manpage.rc
Prereq:  1.21 
--- vile-9.5l+/macros/manpage.rc	2005-06-17 20:30:44.000000000 +0000
+++ vile-9.5m/macros/manpage.rc	2006-11-25 00:30:15.000000000 +0000
@@ -3,7 +3,7 @@
 ;;
 ;; Author: Kevin Buettner
 ;;
-;; $Header: /usr/build/vile/vile/macros/RCS/manpage.rc,v 1.21 2005/06/17 20:30:44 tom Exp $
+;; $Header: /usr/build/vile/vile/macros/RCS/manpage.rc,v 1.22 2006/11/25 00:30:15 tom Exp $
 ;;
 
 store-procedure ShowManpage "Prompt for, and display a manual-page"
@@ -43,12 +43,14 @@
 bind-key ShowManpage ^X-m
 
 store-procedure ShowFormatted "Render the current buffer with nroff -man or -ms"
-	~local %type %macros %filter %manpagesrc %manpagebuf $error-buffer
+	~local %type %macros %table %nroff %filter %manpagesrc %manpagebuf $error-buffer
+
 	set-variable %filter &lookup e+l+p &cat vile-manfilt $exec-suffix
 	~if &seq %filter ""
 		write-message "[Cannot find manpage-filter]"
 		~return
 	~endif
+
 	~if &sin $cbufname "<"
 		set-variable %manpagebuf $cbufname
 		set-variable %manpagesrc &mid $cbufname 2 &sub &len $cbufname 2
@@ -60,17 +62,46 @@
 	~else
 		set-variable %manpagebuf &cat "<" &cat $cbufname ">"
 	~endif
+
+	setv %table &env 'VILE_TABLE_FILT'
+	~if &seq %table ''
+		~if &seq $pathlist-separator ":"
+			setv %table 'tbl'
+		~endif
+	~endif
+
+	setv %nroff &env 'VILE_NROFF_FILT'
+	~if &seq %nroff ''
+		~if &seq $pathlist-separator ":"
+			setv %nroff 'nroff'
+		~else
+			setv %nroff 'cawf'
+		~endif
+	~endif
+
 	set terse
 	~force kill-buffer %manpagebuf
 	setv %type &path end $cfilname
 	~if &or &seq $majormode "html" \
 		&seq $majormode "xml"
-		edit-file &cat "!lynx -force_html -with_backspaces -dump -width=" &cat $pagewid &cat " " &cat &pquote $cfilname &cat " | " %filter
+		edit-file &cat "!lynx -force_html -with_backspaces -dump -width=" \
+			&cat $pagewid \
+			&cat " " \
+			&cat &pquote $cfilname \
+			&cat " | " %filter
 	~elseif &seq $majormode "perl"
-		~if &seq $pathlist-separator ":"
-			edit-file &cat "!pod2man " &cat &pquote $cfilname &cat " | tbl | nroff -man | " %filter
+		~if &seq %table ''
+			edit-file &cat "!pod2text " \
+				&cat &pquote $cfilname \
+				&cat " | " %filter
 		~else
-			edit-file &cat "!pod2text " &cat &pquote $cfilname &cat " | " %filter
+			edit-file &cat "!pod2man " \
+				&cat &pquote $cfilname \
+				&cat " | " \
+				&cat &table \
+				&cat " | " \
+				&cat &nroff \
+				&cat " -man | " %filter
 		~endif
 	~else
 		~if &seq %type ".ms"
@@ -80,12 +111,27 @@
 		~else
 			setv %macros="-man"
 		~endif
-		~if &seq $pathlist-separator ":"
-			edit-file &cat "!tbl " &cat &pquote $cfilname &cat " | nroff " &cat %macros &cat " | " %filter
+		~if &seq %table ''
+			edit-file &cat "!" \
+				&cat %nroff \
+				&cat " " \
+				&cat %macros \
+				&cat " " \
+				&cat &pquote $cfilname \
+				&cat " | " %filter
 		~else
-			edit-file &cat "!cawf " &cat %macros &cat " " &cat &pquote $cfilname &cat " | " %filter
+			edit-file &cat "!" \
+				&cat %table \
+				&cat " " \
+				&cat &pquote $cfilname \
+				&cat " | " \
+				&cat %nroff \
+				&cat " " \
+				&cat %macros \
+				&cat " | " %filter
 		~endif
 	~endif
+
 	~if &isa Majormode txt
 		setl txtmode
 	~endif
Index: macros/modes.rc
Prereq:  1.49 
--- vile-9.5l+/macros/modes.rc	2006-10-28 15:52:29.000000000 +0000
+++ vile-9.5m/macros/modes.rc	2006-11-25 20:41:56.000000000 +0000
@@ -1,4 +1,4 @@
-; $Id: modes.rc,v 1.49 2006/10/28 15:52:29 tom Exp $
+; $Id: modes.rc,v 1.51 2006/11/25 20:41:56 tom Exp $
 ; majormodes in this file are ordered alphabetically for convenience - the
 ; precedence used by vile is strictly alphabetic, counting case.  Use the
 ; before and after qualifiers to override the precedence.
@@ -742,11 +742,12 @@
 	comments	'^\s*[:#]\s*$'
 ~endwith
 
+; DCE uses Tcl - http://www.opengroup.org/tech/rfc/rfc68.2.html
 define-mode tcl
 ~with define-submode tcl
 	before "sh"
-	suffixes	'\.\(tcl\|exp\)$'
-	pre '^#!\s*\/.*\(wish\|wishx\|tclsh\|tcl\|expectk\)[0-9.]*\>\(\s*-[\a]\+\)*\s*$'
+	suffixes	'\.\(tcl\|exp\|psm\)$'
+	pre '^#!\s*\/.*\(dcecp\|wish\|wishx\|tclsh\|tcl\|expectk\)[0-9.]*\>\(\s*-[\a]\+\)*\s*$'
 	comment-prefix	'^\s*[:#]'
 	comments	'^\s*[:#]\s*$'
 ~endwith
@@ -781,6 +782,9 @@
 	comments	'^\s*--\s*$'
 ~endwith
 
+~local %vb-access
+setv %vb-access '^\(\(Public\|Private\|Protected\|Friend\)\s\+\)*'
+
 define-mode vb
 ~with define-submode vb
 	before		"basic"
@@ -798,10 +802,7 @@
 	fence-elif	'^\s*elseif\>'
 	fence-else	'^\s*else\>'
 	fence-fi	'^\s*end\s\+if\>'
-	sections '^\(\(Public\|Private\)\>\)\?\s*\(Sub\|Function\|Property\)'
-~elsewith define-submode vb group 'attrs'
-	fence-if	'^\s*begin\>'
-	fence-fi	'^\s*end\>\s*$'
+	sections	&cat %vb-access '\(Sub\|Function\|Property\)'
 ~elsewith define-submode vb group 'for-loop'
 	fence-if	'^\s*for\>'
 	fence-fi	'^\s*next\>'
@@ -809,17 +810,20 @@
 	fence-if	'^\s*while\>'
 	fence-fi	'^\s*wend\>'
 ~elsewith define-submode vb group 'sub'
-	fence-if	'^\s*\(\(Public\|Private\)\s\+\)\?sub\>'
+	fence-if	&cat %vb-access 'sub\>'
 	fence-fi	'^\s*end\s\+sub\>'
 ~elsewith define-submode vb group 'function'
-	fence-if	'^\s*\(\(Public\|Private\)\s\+\)\?function\>'
+	fence-if	&cat %vb-access 'function\>'
 	fence-fi	'^\s*end\s\+function\>'
 ~elsewith define-submode vb group 'property'
-	fence-if	'^\s*\(\(Public\|Private\)\s\+\)\?property\>'
+	fence-if	&cat %vb-access 'property\>'
 	fence-fi	'^\s*end\s\+property\>'
+~elsewith define-submode vb group 'region'
+	fence-if	'^\s*#region\>'
+	fence-fi	'^\s*#end region\>'
 ~endwith
 
-; FIXME this should be the same as vbmode except for the preamble
+; FIXME this should be the same as vbmode except for the preamble and keywords
 define-mode vbs
 ~with define-submode vbs
 	before		"basic"
@@ -831,6 +835,29 @@
 	notabinsert
 	tabstop=4
 	shiftwidth=4
+	fence-if	'^\s*if\>'
+	fence-elif	'^\s*elseif\>'
+	fence-else	'^\s*else\>'
+	fence-fi	'^\s*end\s\+if\>'
+	sections	&cat %vb-access '\(Sub\|Function\|Property\)'
+~elsewith define-submode vbs group 'for-loop'
+	fence-if	'^\s*for\>'
+	fence-fi	'^\s*next\>'
+~elsewith define-submode vbs group 'while-loop'
+	fence-if	'^\s*while\>'
+	fence-fi	'^\s*wend\>'
+~elsewith define-submode vbs group 'sub'
+	fence-if	&cat %vb-access 'sub\>'
+	fence-fi	'^\s*end\s\+sub\>'
+~elsewith define-submode vbs group 'function'
+	fence-if	&cat %vb-access 'function\>'
+	fence-fi	'^\s*end\s\+function\>'
+;~elsewith define-submode vbs group 'property'
+;	fence-if	&cat %vb-access 'property\>'
+;	fence-fi	'^\s*end\s\+property\>'
+~elsewith define-submode vbs group 'region'
+	fence-if	'^\s*#region\>'
+	fence-fi	'^\s*#end region\>'
 ~endwith
 
 define-mode vlog
Index: macros/vileinit.rc
Prereq:  1.33 
--- vile-9.5l+/macros/vileinit.rc	2006-03-06 06:04:52.000000000 +0000
+++ vile-9.5m/macros/vileinit.rc	2006-11-23 13:59:05.000000000 +0000
@@ -1,4 +1,4 @@
-; $Header: /usr/build/vile/vile/macros/RCS/vileinit.rc,v 1.33 2006/03/06 06:04:52 tom Exp $
+; $Header: /usr/build/vile/vile/macros/RCS/vileinit.rc,v 1.34 2006/11/23 13:59:05 tom Exp $
 ; This is a sample which may be installed as .vilerc (or vile.rc for non-Unix
 ; systems), or source'd as-is to provide quick initialization of some useful
 ; macros and settings.
@@ -151,14 +151,14 @@
 map #7 :format-til
 
 ; take the identifier under the cursor, wrap it in '<', '>' and search for it.
-store-procedure next-cur-identifier "Find next occurrence of current token"
+store-procedure next-cur-identifier "Find next occurrence of current $identifier"
 	~force search-forward &cat '\<' &cat $identifier '\>'
 ~endm
 bind-key next-cur-identifier ^X-,
 
 ; Take the identifier under the cursor, wrap it in '<', '>' and search for it.
 ; in the alternate buffer.
-store-procedure next-alt-identifier "Find current token in alternate buffer"
+store-procedure next-alt-identifier "Find current $identifier in alternate buffer"
 	~local %osearch
 	set-variable %osearch $identifier
 	alternate-buffer
Index: main.c
Prereq:  1.568 
--- vile-9.5l+/main.c	2006-11-06 20:52:12.000000000 +0000
+++ vile-9.5m/main.c	2006-12-13 01:29:48.000000000 +0000
@@ -22,7 +22,7 @@
  */
 
 /*
- * $Header: /usr/build/vile/vile/RCS/main.c,v 1.568 2006/11/06 20:52:12 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/main.c,v 1.586 2006/12/13 01:29:48 tom Exp $
  */
 
 #define realdef			/* Make global definitions not external */
@@ -245,7 +245,6 @@
 	 * can be found by stripping the "UTF-8" string, and also that both
 	 * locales are installed.
 	 */
-#define nonnull(s) ((s) ? (s) : "<null>")
 #if DISP_TERMCAP || DISP_X11
 	if (((env = getenv("LC_ALL")) != 0 && *env != 0) ||
 	    ((env = getenv("LC_CTYPE")) != 0 && *env != 0) ||
@@ -264,8 +263,6 @@
 		tcap_setup_locale(env, tmp);
 #endif
 		env = tmp;
-	    } else {
-		env = "";
 	    }
 	} else {
 	    env = "";
@@ -273,6 +270,7 @@
 #endif
 	/* set locale according to environment vars */
 	vl_locale = setlocale(LC_ALL, env);
+	TRACE(("setlocale(%s) -> %s\n", NONNULL(env), NONNULL(vl_locale)));
 
 #ifdef HAVE_LANGINFO_CODESET
 	/*
@@ -281,6 +279,8 @@
 	 * corresponding encoding.
 	 */
 	vl_encoding = nl_langinfo(CODESET);
+	TRACE(("nl_langinfo(CODESET) -> %s\n", NONNULL(vl_encoding)));
+
 	if (vl_locale == 0
 	    || vl_encoding == 0
 	    || (strstr(vl_encoding, "ASCII") == 0
@@ -289,7 +289,8 @@
 		&& strncmp(vl_encoding, "ISO 8859", 8) != 0
 		&& strncmp(vl_encoding, "ISO_8859", 8) != 0
 		&& strncmp(vl_encoding, "ISO8859", 8) != 0
-		&& strncmp(vl_encoding, "8859", 4) != 0)) {
+		&& strncmp(vl_encoding, "8859", 4) != 0
+		&& strncmp(vl_encoding, "KOI8-R", 6) != 0)) {
 	    vl_locale = setlocale(LC_ALL, "C");
 	    vl_encoding = nl_langinfo(CODESET);
 	}
@@ -740,8 +741,11 @@
 		startstat = run_startup_commands(init_bp);
 		if (!startstat)
 		    goto begin;
+	    } else {
+		zotbuf(init_bp);
 	    }
 	} else {		/* find and run .vilerc */
+	    zotbuf(init_bp);
 	    if (do_source(startup_file, 1, TRUE) != TRUE) {
 		startstat = FALSE;
 		goto begin;
@@ -1074,6 +1078,28 @@
 #define DFT_FENCE_ELSE  "^\\s*#\\s*else\\>"
 #define DFT_FENCE_FI    "^\\s*#\\s*endif\\>"
 
+#define DFT_BUFNAME_EXPR "\\(\\[\\([!]\\?[[:print:]]\\+\\)\\]\\)\\|\\([[:ident:].-]\\+\\)"
+	/*
+	 * The $filename-expr expression is used with a trailing '*' to repeat
+	 * the last field.  Otherwise it is complete.
+	 *
+	 * Limitations - the expressions are used in the error finder, which
+	 * has to choose the first pattern which matches a filename embedded
+	 * in other text.  UNIX-style pathnames could have embedded blanks,
+	 * but it's not common.  It is common on win32, but is not often a
+	 * problem with grep, etc., since the full pathname of the file is not
+	 * usually given.
+	 */
+#if OPT_MSDOS_PATH
+#define DFT_FILENAME_EXPR "\\(\\([[:alpha:]]:\\)\\|\\([\\\\/]\\{2\\}\\)[[:ident:]]\\+\\)\\?[[:file:]]"
+#elif OPT_VMS_PATH
+#define DFT_FILENAME_EXPR "[-/\\w.;\\[\\]<>$:]"
+#else /* UNIX-style */
+#define DFT_FILENAME_EXPR "[[:file:]]"
+#endif
+
+#define DFT_IDENTIFIER_EXPR    "\\w\\+"
+
 			/* where do paragraphs start? */
 #define DFT_PARAGRAPHS  "^\\.[ILPQ]P\\>\\|^\\.P\\>\\|\
 ^\\.LI\\>\\|^\\.[plinb]p\\>\\|^\\.\\?\\s*$"
@@ -1118,6 +1144,16 @@
 #define DFT_FENCE_CHARS "{}()[]"
 #define DFT_CINDENT_CHARS ":#" DFT_FENCE_CHARS
 
+#if SYS_VMS
+#define DFT_WILDCARD "*.c,*.h,*.com,*.mms"
+#endif
+#if SYS_UNIX
+#define DFT_WILDCARD "*.[chly] *.def *.cc *.cpp *.xs"
+#endif
+#ifndef DFT_WILDCARD
+#define DFT_WILDCARD "*.c *.h *.def *.cc *.cpp *.cs *.xs"
+#endif
+
 /*
  * For the given class/mode, initialize the VAL struct to the default value
  * for that mode.
@@ -1126,7 +1162,13 @@
 init_mode_value(struct VAL *d, MODECLASS v_class, int v_which)
 {
     static const char expand_chars[] =
-    {EXPC_THIS, EXPC_THAT, EXPC_SHELL, EXPC_TOKEN, EXPC_RPAT, 0};
+    {
+	EXPC_THIS,
+	EXPC_THAT,
+	EXPC_SHELL,
+	EXPC_TOKEN,
+	EXPC_RPAT,
+	0};
 
     switch (v_class) {
     case UNI_MODE:
@@ -1320,6 +1362,12 @@
 	    setTXT(VAL_CINDENT_CHARS, DFT_CINDENT_CHARS);	/* C-style indent flags */
 	    setTXT(VAL_FENCES, "{}()[]");	/* fences */
 	    setTXT(VAL_TAGS, "tags");	/* tags filename */
+#if OPT_CURTOKENS
+	    setINT(VAL_CURSOR_TOKENS, CT_REGEX);
+	    setPAT(VAL_BUFNAME_EXPR, DFT_BUFNAME_EXPR);
+	    setPAT(VAL_IDENTIFIER_EXPR, DFT_IDENTIFIER_EXPR);
+	    setPAT(VAL_PATHNAME_EXPR, DFT_FILENAME_EXPR "\\+");
+#endif
 #ifdef MDCHK_MODTIME
 	    setINT(MDCHK_MODTIME, FALSE);	/* modtime-check */
 #endif
@@ -1381,6 +1429,16 @@
 	    setIntValue(d, 0);
 	    break;
 	}
+#if OPT_CURTOKENS
+	switch (v_which) {
+	case VAL_BUFNAME_EXPR:
+	case VAL_PATHNAME_EXPR:
+	    set_buf_fname_expr((d == &global_b_values.bv[v_which])
+			       ? curbp
+			       : 0);
+	    break;
+	}
+#endif
 	break;
     case WIN_MODE:
 	switch (v_which) {
@@ -1391,6 +1449,9 @@
 #ifdef WMDLINEWRAP
 	    setINT(WMDLINEWRAP, FALSE);		/* line-wrap */
 #endif
+#ifdef WMDSHOWVARS
+	    setINT(WMDSHOWVARS, FALSE);		/* showvariables */
+#endif
 #ifdef WMDTERSELECT
 	    setINT(WMDTERSELECT, TRUE);		/* terse selections */
 #endif
@@ -1405,27 +1466,6 @@
     }
 }
 
-	/*
-	 * The $filename-expr expression is used with a trailing '*' to repeat
-	 * the last field.  Otherwise it is complete.
-	 *
-	 * Limitations - the expressions are used in the error finder, which
-	 * has to choose the first pattern which matches a filename embedded
-	 * in other text.  UNIX-style pathnames could have embedded blanks,
-	 * but it's not common.  It is common on win32, but is not often a
-	 * problem with grep, etc., since the full pathname of the file is not
-	 * usually given.
-	 */
-#if OPT_MSDOS_PATH
-#define DFT_FILENAME_EXPR "\\([a-zA-Z]:\\)\\?[^ \t\":*?<>|]"
-#else
-#if OPT_VMS_PATH
-#define DFT_FILENAME_EXPR "[-/\\w.;\\[\\]<>$:]"
-#else /* UNIX-style */
-#define DFT_FILENAME_EXPR "[-/\\w.~]"
-#endif
-#endif
-
 #define DFT_HELP_FILE "vile.hlp"
 
 #define DFT_MENU_FILE ".vilemenu"
@@ -1670,7 +1710,10 @@
     set_submode_txt("c", VAL_CINDENT_CHARS, DFT_CINDENT_CHARS);		/* C-style indent flags */
 
     set_majormode_rexp("c", MVAL_MODE_SUFFIXES, DFT_CSUFFIX);
+#ifdef MVAL_MODE_WILDCARD
+    set_majormode_rexp("c", MVAL_MODE_WILDCARD, DFT_WILDCARD);
 #endif
+#endif /* OPT_MAJORMODE */
 
 #if OPT_EVAL
     /*
@@ -2462,7 +2505,6 @@
     vlCTYPE('_') |= vl_pathn;
     vlCTYPE('~') |= vl_pathn;
     vlCTYPE('-') |= vl_pathn;
-    vlCTYPE('*') |= vl_pathn;
     vlCTYPE('/') |= vl_pathn;
 
     /* legal in "identifiers" */
@@ -2532,8 +2574,10 @@
     vlCTYPE(R_BLOCK) |= vl_fence;
 
 #if OPT_VMS_PATH
-    vlCTYPE(L_BLOCK) |= vl_pathn;	/* actually, "<", ">" too */
+    vlCTYPE(L_BLOCK) |= vl_pathn;
     vlCTYPE(R_BLOCK) |= vl_pathn;
+    vlCTYPE(L_ANGLE) |= vl_pathn;
+    vlCTYPE(R_ANGLE) |= vl_pathn;
     vlCTYPE('$') |= vl_pathn;
     vlCTYPE(':') |= vl_pathn;
     vlCTYPE(';') |= vl_pathn;
Index: makefile.in
Prereq:  1.203 
--- vile-9.5l+/makefile.in	2006-11-04 11:56:07.000000000 +0000
+++ vile-9.5m/makefile.in	2006-11-24 01:42:28.000000000 +0000
@@ -20,7 +20,7 @@
 #
 # gnu autoconf support by kevin buettner, 5/94
 #
-# $Header: /usr/build/vile/vile/RCS/makefile.in,v 1.203 2006/11/04 11:56:07 tom Exp $
+# $Header: /usr/build/vile/vile/RCS/makefile.in,v 1.204 2006/11/24 01:42:28 tom Exp $
 
 SHELL		= /bin/sh
 
@@ -617,7 +617,7 @@
 		-typemap ptypemap \
 		$(srcdir)/perl.xs > $@
 
-$(OBJ): estruct.h edef.h $(BUILTHDRS)
+$(OBJ): estruct.h proto.h edef.h $(BUILTHDRS)
 
 api$o :		api.h
 bind$o :	btree.h
Index: map.c
Prereq:  1.110 
--- vile-9.5l+/map.c	2006-11-04 01:28:05.000000000 +0000
+++ vile-9.5m/map.c	2006-11-23 17:01:16.000000000 +0000
@@ -3,7 +3,7 @@
  *	Original interface by Otto Lind, 6/3/93
  *	Additional map and map! support by Kevin Buettner, 9/17/94
  *
- * $Header: /usr/build/vile/vile/RCS/map.c,v 1.110 2006/11/04 01:28:05 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/map.c,v 1.111 2006/11/23 17:01:16 tom Exp $
  *
  */
 
@@ -820,8 +820,13 @@
 void
 map_drain(void)
 {
-    while (mapped_ungotc_avail())
-	mapgetc();
+    int ch;
+
+    while (mapped_ungotc_avail()) {
+	ch = mapgetc();
+	TRACE(("map_drain...\n"));
+	(void) ch;
+    }
 }
 
 static int
Index: modes.c
Prereq:  1.320 
--- vile-9.5l+/modes.c	2006-10-19 21:34:04.000000000 +0000
+++ vile-9.5m/modes.c	2006-12-06 23:42:43.000000000 +0000
@@ -7,7 +7,7 @@
  * Major extensions for vile by Paul Fox, 1991
  * Majormode extensions for vile by T.E.Dickey, 1997
  *
- * $Header: /usr/build/vile/vile/RCS/modes.c,v 1.320 2006/10/19 21:34:04 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/modes.c,v 1.326 2006/12/06 23:42:43 tom Exp $
  *
  */
 
@@ -273,30 +273,35 @@
 {
     const struct VALNAMES *names = args->names;
     struct VAL *values = args->local;
+    union V *actual = values->vp ? values->vp : &(values->v);
     static TBUFF *result;
-    switch (names->type) {
+
+    if (values != 0) {
+	switch (names->type) {
 #if OPT_MAJORMODE
-    case VALTYPE_MAJOR:
+	case VALTYPE_MAJOR:
 #endif
-    case VALTYPE_BOOL:
-	return values->vp->i ? "TRUE" : "FALSE";
-    case VALTYPE_ENUM:
+	case VALTYPE_BOOL:
+	    return actual->i ? "TRUE" : "FALSE";
+	case VALTYPE_ENUM:
 #if OPT_ENUM_MODES
-	{
-	    static char temp[20];	/* FIXME: const workaround */
-	    (void) strcpy(temp,
-			  choice_to_name(valname_to_choices(names), values->vp->i));
-	    return temp;
-	}
+	    {
+		static TBUFF *temp = 0;		/* const workaround */
+		(void) tb_scopy(&temp,
+				choice_to_name(valname_to_choices(names),
+					       actual->i));
+		return tb_values(temp);
+	    }
 #endif /* else, fall-thru to use int-code */
-    case VALTYPE_INT:
-	return render_int(&result, values->vp->i);
-    case VALTYPE_STRING:
-	return NonNull(values->vp->p);
-    case VALTYPE_REGEX:
-	if (values->vp->r == 0)
-	    break;
-	return NonNull(values->vp->r->pat);
+	case VALTYPE_INT:
+	    return render_int(&result, actual->i);
+	case VALTYPE_STRING:
+	    return NonNull(actual->p);
+	case VALTYPE_REGEX:
+	    if (actual->r == 0)
+		break;
+	    return NonNull(actual->r->pat);
+	}
     }
     return error_val;
 }
@@ -841,6 +846,9 @@
     {s_bcolor, fsm_color_choices},
     {s_ccolor, fsm_color_choices},
 #endif
+#if OPT_CURTOKENS_CHOICES
+    {"cursor-tokens", fsm_curtokens_choices},
+#endif
 #if OPT_POPUP_CHOICES
     {"popup-choices", fsm_popup_choices},
 #endif
@@ -1699,7 +1707,7 @@
     }
     returnVoid();
 }
-#endif /* OPT_EVAL */
+#endif /* OPT_ENUM_MODES || OPT_COLOR_SCHEMES */
 
 static int
 is_white(int n)
@@ -2004,6 +2012,91 @@
     return TRUE;
 }
 
+#if OPT_CURTOKENS
+static int
+have_b_val_rexp(BUFFER *bp, int mode)
+{
+    return (bp != 0
+	    && bp->b_values.bv[mode].vp != 0
+	    && bp->b_values.bv[mode].vp->r != 0
+	    && bp->b_values.bv[mode].vp->r->pat != 0);
+}
+
+static int
+update_regexval(struct VAL *val, const char *pattern, int magic)
+{
+    int result = TRUE;
+    union V *vp = val->vp;
+
+    vp->r = free_regexval(vp->r);
+    vp->r = new_regexval(pattern, magic);
+    if (vp->r == 0) {
+	vp->r = new_regexval("", TRUE);
+	result = FALSE;
+    }
+    return result;
+}
+
+/*
+ * Maintain the $buf-fname-expr variable, which is the combination of the
+ * bufname-expr and pathname-expr modes.
+ *
+ * Yes, we could add another mode - but since the value is readonly and
+ * derived, it does not really fit as a mode.  It is stored in BUFFER as a
+ * struct VAL so we can treat the value as a local/global mode.
+ */
+void
+set_buf_fname_expr(BUFFER *bp)
+{
+    TBUFF *combined = 0;
+
+    if ((bp == 0 || b_val(bp, VAL_CURSOR_TOKENS) != CT_CCLASS)
+	&& have_b_val_rexp(bp, VAL_BUFNAME_EXPR)
+	&& have_b_val_rexp(bp, VAL_PATHNAME_EXPR)
+	&& tb_sappend(&combined, "\\(")
+	&& tb_sappend(&combined, b_val_rexp(bp, VAL_BUFNAME_EXPR)->pat)
+	&& tb_sappend(&combined, "\\|")
+	&& tb_sappend(&combined, b_val_rexp(bp, VAL_PATHNAME_EXPR)->pat)
+	&& tb_sappend(&combined, "\\)")
+	&& tb_append(&combined, EOS)) {
+	char *pattern = tb_values(combined);
+	struct VAL *global_expr = &buf_fname_expr;
+	struct VAL *local_expr;
+	int local = FALSE;
+
+	TRACE(("set_buf_fname_expr(%s)\n", pattern));
+	if (bp != 0) {
+	    local_expr = &(bp->buf_fname_expr);
+
+	    if (is_local_b_val(bp, VAL_BUFNAME_EXPR)
+		|| is_local_b_val(bp, VAL_PATHNAME_EXPR)) {
+		local = TRUE;
+		local_expr->vp = &(local_expr->v);
+		update_regexval(local_expr, pattern, TRUE);
+	    } else {
+		local_expr->vp = &(global_expr->v);
+	    }
+	}
+	if (!local) {
+	    global_expr->vp = &(global_expr->v);
+	    update_regexval(global_expr, pattern, TRUE);
+	}
+    }
+    tb_free(&combined);
+}
+
+int
+chgd_curtokens(BUFFER *bp,
+	       VALARGS * args GCC_UNUSED,
+	       int glob_vals GCC_UNUSED,
+	       int testing)
+{
+    if (!testing)
+	set_buf_fname_expr(bp);
+    return TRUE;
+}
+#endif
+
 #if OPT_TITLE
 	/* Changed swap-title */
 int
Index: modetbl
Prereq:  1.240 
--- vile-9.5l+/modetbl	2006-10-16 21:45:37.000000000 +0000
+++ vile-9.5m/modetbl	2006-12-13 01:15:11.000000000 +0000
@@ -11,7 +11,7 @@
 #
 # The modes are table entries in the BUFFER and WINDOW structures.
 #
-# $Header: /usr/build/vile/vile/RCS/modetbl,v 1.240 2006/10/16 21:45:37 tom Exp $
+# $Header: /usr/build/vile/vile/RCS/modetbl,v 1.250 2006/12/13 01:15:11 tom Exp $
 #
 #
 # Mode-table entries.  Capitalized letters are used for abbreviations.
@@ -131,6 +131,7 @@
 	"WrapWords"	WRAP		0		# word wrap
 	"YankMotion"	YANKMOTION	0		# honor vi-style motion after yanking text
 enum
+	"cursor-tokens"	CURSOR_TOKENS	0		OPT_CURTOKENS # specify whether to use regex/cclass for cursor tokens
 	"record-format" RECORD_FORMAT	0		SYS_VMS	# specify record-format to use
 	"record-attrs"	RECORD_ATTRS	0		SYS_VMS	# specify record-attributes to use
 	"RecordSeparator" RECORD_SEP	chgd_rs		# record-separator affects dos/unix modes
@@ -158,6 +159,7 @@
 	"locker"	LOCKER		chgd_disabled	OPT_LCKFILES  # Name of locker
 	"tags"		TAGS		0		# list of tags files
 regex							# VAL_ prefix
+	"bufname-expr"	BUFNAME_EXPR	chgd_curtokens	OPT_CURTOKENS # $bufname
 	"comments"	COMMENTS	0		# matches leading comment for comment reformatting
 	"comment-prefix" CMT_PREFIX	0		# prefix to ignore/preserve when formatting comment
 	"fence-begin"	FENCE_BEGIN	0		# begin a simple (character, non-nestable) fence
@@ -166,6 +168,8 @@
 	"fence-elif"	FENCE_ELIF	0		# next complex fence
 	"fence-else"	FENCE_ELSE	0		# final complex fence
 	"fence-fi"	FENCE_FI	0		# end a complex fence
+	"identifier-expr" IDENTIFIER_EXPR 0		OPT_CURTOKENS # $identifier
+	"pathname-expr" PATHNAME_EXPR	chgd_curtokens	OPT_CURTOKENS # $pathname
 	"paragraphs"	PARAGRAPHS	0		# delimits a paragraph
 	"sections"	SECTIONS	0		# delimits a section
 	"sentences"	SENTENCES	0		# delimits a sentence
@@ -178,7 +182,8 @@
 	"HorizScroll"	HORSCROLL	0		# scroll whole screen
 	"LineWrap"	LINEWRAP	chgd_window	OPT_LINEWRAP # wrap lines wider than screen
 	"ruler"		RULER		chgd_status	!SMALLER # display line+col in modeline
-	"ShowChar"	SHOWCHAR	chgd_status	!SMALLER # display line+col in modeline
+	"ShowChar"	SHOWCHAR	chgd_status	!SMALLER # display $char in modeline
+	"ShowVariables"	SHOWVARS	0		!SMALLER # update [Variables] with cursor-movement
 	"Unprintable-as-Octal" NONPRINTOCTAL  chgd_window # print non-printing chars in octal
 	"Terse-SELections" TERSELECT	0		OPT_SELECTIONS # don't display extent of selections on message line
 int							# VAL_ prefix
@@ -200,6 +205,7 @@
 string
 	"before"	BEFORE		chgd_mm_order	# check mode before given
 	"after"		AFTER		chgd_mm_order	# check mode after given
+#	"mode-wildcard" MODE_WILDCARD	0		# e.g., "*.c"
 
 .qualifier
 string
@@ -217,7 +223,9 @@
 "bflags"	BFLAGS			# status flags for current buffer
 "blines"	BLINES			# lines in current buffer
 "brightness"	BRIGHTNESS	DISP_NTWIN	# intensity of normal, bold
+"buf-fname-expr" BUF_FNAME_EXPR	OPT_CURTOKENS	# buffer+fname expression
 "buffer-hook"	BUFHOOK		OPT_HOOKS	# procedure to run when entering buf
+"bufname"	BUFNAME		OPT_CURTOKENS	# buffer name under cursor
 "bwindows"	BWINDOWS		# windows open on current buffer
 "cbufname"	CBUFNAME		# current buffer name
 "cd-hook"	CDHOOK		OPT_HOOKS	# procedure to run when cd'ing
@@ -255,8 +263,8 @@
 "forward-search" FWD_SEARCH		# search-direction (true if forward)
 "goal-column"	GOAL_COLUMN	OPT_TRACE	# goal-column (debug-only)
 "helpfile"	HELPFILE		# helpfile (vile.hlp)
-"iconname"	ICONNAM		DISP_X11	# current font
-"identifier"	IDENTIF			# current identifier
+"iconname"	ICONNAME	DISP_X11	# current font
+"identifier"	IDENTIFIER	OPT_CURTOKENS	# identifier under cursor
 "kbd-macro"	KBDMACRO		# keyboard-macro buffer (read only)
 "kill"		KILL			# kill buffer (read only)
 "lastkey"	LASTKEY			# last keyboard char struck
@@ -281,14 +289,14 @@
 "palette"	PALETTE			# current palette string
 "patchlevel"	PATCHLEVEL		# current patch-level of vile (empty for release)
 "pathlist-separator" PATHCHR		# separator for lists of pathnames
-"pathname"	PATHNAME		# current path-like word
+"pathname"	PATHNAME	OPT_CURTOKENS	# path-like word under cursor
 "pathname-separator" PATHSEP		# separator for levels of pathnames
 "pending"	PENDING			# type ahead pending flag
 "pid"		PROCESSID		# vile's process-id
 "position-format" POSFORMAT	OPT_POSFORMAT # position format string
 "progname"	PROGNAME		# returns current prog name - "vile"
 "prompt"	PROMPT			# command-prompt string - ": "
-"qidentifier"	QIDENTIF		# current qualified identifier
+"qidentifier"	QIDENTIFIER		# current qualified identifier
 "read-hook"	RDHOOK		OPT_HOOKS	# procedure to run when reading
 "replace"	REPLACE			# replacement pattern
 "return"	RETURN		OPT_EVAL	# function's return-result (internal)
@@ -446,6 +454,11 @@
 "brightcyan"	14		OPT_16_COLOR
 "white"		15		OPT_16_COLOR
 
+.table curtokens		OPT_CURTOKENS
+"both"		CT_BOTH
+"cclass"	CT_CCLASS
+"regex"		CT_REGEX
+
 .table directive		!SMALLER
 "if"		D_IF
 "elseif"	D_ELSEIF
Index: msgs.c
Prereq:  1.26 
--- vile-9.5l+/msgs.c	2004-12-06 01:13:12.000000000 +0000
+++ vile-9.5m/msgs.c	2006-12-01 23:02:41.000000000 +0000
@@ -4,7 +4,7 @@
  * Support functions for "popup-msgs" mode.
  * Written by T.E.Dickey for vile (august 1994).
  *
- * $Header: /usr/build/vile/vile/RCS/msgs.c,v 1.26 2004/12/06 01:13:12 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/msgs.c,v 1.28 2006/12/01 23:02:41 tom Exp $
  */
 #include "estruct.h"
 
@@ -18,11 +18,15 @@
 static BUFFER *
 create_msgs(void)
 {
-    BUFFER *bp = bfind(MESSAGES_BufName, BFINVS);
+    BUFFER *bp = 0;
 
-    if (valid_buffer(bp)) {
-	b_set_invisible(bp);
-	bp->b_active = TRUE;
+    if (wheadp != 0) {		/* we need windows before creating buffers */
+	bp = bfind(MESSAGES_BufName, BFINVS);
+
+	if (valid_buffer(bp)) {
+	    b_set_invisible(bp);
+	    bp->b_active = TRUE;
+	}
     }
     return bp;
 }
@@ -33,7 +37,7 @@
  * visible, it is automatically popped up when a new message line is begun.
  * Since it's a scratch buffer, popping it down destroys it.
  */
-void
+int
 msg_putc(int c)
 {
     BUFFER *savebp = curbp;
@@ -45,7 +49,7 @@
     register WINDOW *wp;
 
     if ((bp = create_msgs()) == 0)
-	return;
+	return TRUE;
 
     savemk = DOT;
     beginDisplay();
@@ -104,6 +108,8 @@
 	}
     }
     endofDisplay();
+
+    return TRUE;
 }
 
 void
Index: patchlev.h
--- vile-9.5l+/patchlev.h	2006-10-02 23:18:18.000000000 +0000
+++ vile-9.5m/patchlev.h	2006-11-23 14:25:11.000000000 +0000
@@ -1,3 +1,3 @@
 #define VILE_VERSION "9.5"
 /* set to "" for no patches */
-#define VILE_PATCHLEVEL "l"
+#define VILE_PATCHLEVEL "m"
Index: path.c
Prereq:  1.151 
--- vile-9.5l+/path.c	2006-04-20 00:03:55.000000000 +0000
+++ vile-9.5m/path.c	2006-12-13 22:31:30.000000000 +0000
@@ -2,7 +2,7 @@
  *		The routines in this file handle the conversion of pathname
  *		strings.
  *
- * $Header: /usr/build/vile/vile/RCS/path.c,v 1.151 2006/04/20 00:03:55 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/path.c,v 1.152 2006/12/13 22:31:30 tom Exp $
  *
  *
  */
@@ -2056,7 +2056,7 @@
 char *
 version_of(char *fname)
 {
-    char *s;
+    char *s = 0;
     if (fname != 0) {
 	s = strchr(fname, ';');
 	if (s == 0) {
Index: proto.h
Prereq:  1.574 
--- vile-9.5l+/proto.h	2006-11-05 23:47:00.000000000 +0000
+++ vile-9.5m/proto.h	2006-12-02 14:34:07.000000000 +0000
@@ -4,7 +4,7 @@
  *
  *   Created: Thu May 14 15:44:40 1992
  *
- * $Header: /usr/build/vile/vile/RCS/proto.h,v 1.574 2006/11/05 23:47:00 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/proto.h,v 1.584 2006/12/02 14:34:07 tom Exp $
  *
  */
 
@@ -124,7 +124,6 @@
 #endif
 
 /* bind.c */
-extern int ourstrstr (const char *haystack, const char *needle, int anchor);
 extern char *cfg_locate (char *fname, UINT hflag);
 extern char *kbd_engl (const char *prompt, char *buffer);
 extern char *kcod2prc (int c, char *seq);
@@ -136,13 +135,14 @@
 extern int fnc2kins (const CMDFUNC *);
 extern int kbd_complete (DONE_ARGS, const char *table, size_t size_entry);
 extern int kbd_engl_stat (const char *prompt, char *buffer, int stated);
+extern int kbd_erase_to_end (int column);
 extern int kbd_length (void);
+extern int kbd_putc (int c);
 extern int kcod2escape_seq (int c, char *ptr, size_t limit);
 extern int no_such_function (const char *fname);
+extern int ourstrstr (const char *haystack, const char *needle, int anchor);
 extern void kbd_erase (void);
-extern void kbd_erase_to_end (int column);
 extern void kbd_init (void);
-extern void kbd_putc (int c);
 extern void kbd_unquery (void);
 extern void popdown_completions (void);
 
@@ -238,13 +238,15 @@
 /* csrch.c */
 
 /* display.c */
-extern LINE *b2printf(BUFFER *bp, const char *fmt, ...) VILE_PRINTF(2,3);
-extern LINE *b2vprintf(BUFFER *bp, const char *fmt, va_list ap);
+extern LINE *b2printf (BUFFER *bp, const char *fmt, ...) VILE_PRINTF(2,3);
+extern LINE *b2vprintf (BUFFER *bp, const char *fmt, va_list ap);
 extern char *lsprintf (char *buf, const char *fmt, ...) VILE_PRINTF(2,3);
+extern int bputc (int c);
 extern int col_limit (WINDOW *wp);
-extern int format_int(char *buf, UINT number, UINT radix);
+extern int format_int (char *buf, UINT number, UINT radix);
 extern int im_waiting (int flag);
 extern int mk_to_vcol (MARK mark, int expanded, BUFFER *bp, int col, int adjust);
+extern int mlsavec (int c);
 extern int nu_width (WINDOW *wp);
 extern int offs2col (WINDOW *wp, LINE *lp, C_NUM offset);
 extern int update (int force);
@@ -253,17 +255,15 @@
 extern void bottomleft (void);
 extern void bpadc (int c, int count);
 extern void bprintf (/*@observer@*/ const char *fmt, ...) VILE_PRINTF(1,2);
-extern void bputc (int c);
 extern void dbgwrite (const char *fmt, ...) VILE_PRINTF(1,2);
 extern void hilite (int row, int colfrom, int colto, int on);
 extern void kbd_flush (void);
 extern void kbd_openup (void);
-extern void kbd_overlay(const char *s);
+extern void kbd_overlay (const char *s);
 extern void mlerase (void);
 extern void mlerror (const char *s);
 extern void mlforce (const char *fmt, ...) VILE_PRINTF(1,2);
 extern void mlprompt (const char *fmt, ...) VILE_PRINTF(1,2);
-extern void mlsavec (int c);
 extern void mlwarn (const char *fmt, ...) VILE_PRINTF(1,2);
 extern void mlwrite (const char *fmt, ...) VILE_PRINTF(1,2);
 extern void movecursor (int row, int col);
@@ -570,14 +570,15 @@
 #endif
 
 /* input.c */
-extern char *add_backslashes2(char *text, char *find);
-extern char *add_backslashes(char *text);
-extern char *user_reply(const char *prompt, const char *dftval);
+extern char *add_backslashes (char *text);
+extern char *add_backslashes2 (char *text, char *find);
+extern char *user_reply (const char *prompt, const char *dftval);
+extern int adjust_chartype (CHARTYPE *mask);
 extern int dotcmdbegin (void);
 extern int dotcmdfinish (void);
 extern int end_string (void);
-extern int eol_null(EOL_ARGS);
-extern int eol_history(EOL_ARGS);
+extern int eol_history (EOL_ARGS);
+extern int eol_null (EOL_ARGS);
 extern int get_recorded_char (int eatit);
 extern int is_edit_char (int c);
 extern int kbd_delimiter (void);
@@ -605,20 +606,23 @@
 extern int mlreply_reg_count (int state, int *retp, int *next);
 extern int mlyesno (const char *prompt);
 extern int no_completion (DONE_ARGS);
-extern int read_quoted(int count, int verbose);
-extern int screen2tbuff (TBUFF **buf, CHARTYPE inclchartype);
-extern int screen_string (char *buf, size_t bufn, CHARTYPE inclchartype);
+extern int read_quoted (int count, int verbose);
+extern int screen_to_bname (char *buf, size_t bufn);
+extern int screen_to_fname (char *buf, size_t bufn);
+extern int screen_to_ident (char *buf, size_t bufn);
 extern int start_kbm (int n, int macnum, ITBUFF *ptr);
 extern int tgetc (int quoted);
 extern int tgetc_avail (void);
+extern int vl_ctype2tbuff (TBUFF **buf, CHARTYPE inclchartype, int whole_line);
+extern int vl_regex2tbuff (TBUFF **buf, REGEXVAL *expr, int whole_line);
 extern void dotcmdstop (void);
-extern void get_kbd_macro(TBUFF **rp);
+extern void get_kbd_macro (TBUFF **rp);
 extern void incr_dot_kregnum (void);
 extern void kbd_kill_response (TBUFF *buf, size_t *position, int c);
-extern void kbd_mac_check(void);
+extern void kbd_mac_check (void);
 extern void kbd_pushback (TBUFF *buf, int skip);
 extern void set_end_string (int c);
-extern void tungetc(int c);
+extern void tungetc (int c);
 extern void unkeystroke (int c);
 
 #if COMPLETE_FILES
@@ -704,8 +708,8 @@
 extern void ltextfree (LINE *lp, BUFFER *bp);
 
 #if OPT_EVAL
-extern int lrepltext (CHARTYPE type, const char *iline, int ilen);
-extern void lgrabtext (TBUFF **rp, CHARTYPE type);
+extern int lrepl_ctype (CHARTYPE type, const char *iline, int ilen);
+extern int lrepl_regex (REGEXVAL *expr, const char *iline, int ilen);
 #endif
 
 #if SMALLER	/* cancel neproto.h */
@@ -741,7 +745,7 @@
 
 /* msgs.c */
 #if OPT_POPUP_MSGS
-void msg_putc (int c);
+int msg_putc (int c);
 void popup_msgs (void);
 void purge_msgs (void);
 #endif
@@ -765,19 +769,20 @@
 extern int string_to_number (const char *from, int *np);
 extern void copy_mvals (int maximum, struct VAL *dst, struct VAL *src);
 extern void free_local_vals (const struct VALNAMES *names, struct VAL *gbl, struct VAL *val);
+extern void set_buf_fname_expr (BUFFER *bp);
 extern void set_record_sep (BUFFER *bp, RECORD_SEP value);
 extern void set_winflags (int glob_vals, USHORT flags);
 
 #if OPT_COLOR_SCHEMES
-extern void init_scheme(void);
+extern void init_scheme (void);
 #endif
 
 #if OPT_ENUM_MODES
-extern int fsm_complete(DONE_ARGS);
+extern int fsm_complete (DONE_ARGS);
 #endif
 
 #if OPT_EVAL || OPT_COLOR
-extern int set_colors(int ncolors);
+extern int set_colors (int ncolors);
 #endif
 
 #if OPT_EVAL || OPT_MAJORMODE
@@ -788,7 +793,7 @@
 #if OPT_MAJORMODE
 extern char * get_submode_name (BUFFER *bp, int n);
 extern int alloc_mode (const char *name, int predef);
-extern int major_complete(DONE_ARGS);
+extern int major_complete (DONE_ARGS);
 extern struct VAL * get_submode_vals (BUFFER *bp, int n);
 extern struct VAL * get_submode_valx (BUFFER *bp, int n, int *m);
 extern void infer_majormode (BUFFER *bp);
@@ -802,8 +807,8 @@
 #endif
 
 #if OPT_SHOW_COLORS
-extern int is_color_code(int n);
-extern const char *get_color_name(int n);
+extern int is_color_code (int n);
+extern const char *get_color_name (int n);
 #endif
 
 #if OPT_UPBUFF
@@ -811,17 +816,17 @@
 #endif
 
 #if SYS_VMS
-extern const char *vms_record_format(int code);
-extern const char *vms_record_attrs(int code);
+extern const char *vms_record_format (int code);
+extern const char *vms_record_attrs (int code);
 #endif
 
 /* npopen.c and other files :-) */
 #if SYS_UNIX || SYS_MSDOS || SYS_OS2 || SYS_WINNT
-extern int  inout_popen(FILE **fr, FILE **fw, char *cmd);
-extern FILE *npopen(char *cmd, const char *type);
-extern void npclose(FILE *fp);
-extern void npflush(void);
-extern int  softfork(void);
+extern int  inout_popen (FILE **fr, FILE **fw, char *cmd);
+extern FILE *npopen (char *cmd, const char *type);
+extern void npclose (FILE *fp);
+extern void npflush (void);
+extern int  softfork (void);
 #endif
 
 #if SYS_UNIX || SYS_OS2 || SYS_WINNT
@@ -834,7 +839,7 @@
 
 /* ntconio.c */
 #if DISP_NTCONS
-extern void ntcons_reopen(void);
+extern void ntcons_reopen (void);
 #endif
 
 /* oneliner.c */
@@ -850,7 +855,7 @@
 extern int vile_op (int f, int n, OpsFunc fn, const char *str);
 
 /* path.c */
-extern void append_libdir_to_path(void);
+extern void append_libdir_to_path (void);
 extern char * home_dir (void);
 extern char * is_appendname (char *fn);
 extern char * last_slash (char *fn);
@@ -859,7 +864,7 @@
 extern char * pathleaf (char *path);
 extern char * shorten_path (char *path, int keep_cwd);
 extern const char *parse_pathlist (const char *list, char *result);
-extern int find_in_path_list(const char *path_list, char *path);
+extern int find_in_path_list (const char *path_list, char *path);
 extern int is_directory (char *path);
 extern int is_file (char *path);
 extern int is_internalname (const char *fn);
@@ -867,9 +872,9 @@
 extern int is_pathname (char *path);
 extern int is_scratchname (const char *fn);
 extern int maybe_pathname (char *fn);
-extern void append_to_path_list(char **path_list, char *path);
-extern void prepend_to_path_list(char **path_list, char *path);
-extern char *path_trunc(char *path,
+extern void append_to_path_list (char **path_list, char *path);
+extern void prepend_to_path_list (char **path_list, char *path);
+extern char *path_trunc (char *path,
                         int  max_path_len,
                         char *trunc_buf,
                         int  trunc_buf_len);
@@ -916,7 +921,7 @@
 extern int liststuff (const char *name, int appendit, void (*)(LIST_ARGS), int iarg, void *vargp);
 extern int need_a_count (int f, int n, int need);
 extern int need_at_least (int f, int n, int need);
-extern int restore_dot(MARK saved_dot);
+extern int restore_dot (MARK saved_dot);
 extern int set_directory (const char *dir);
 extern long vl_atol (char *str, int base, int *failed);
 extern void autocolor (void);
@@ -925,13 +930,13 @@
 extern void set_rdonly (BUFFER *bp, const char *name, int mode);
 
 #ifdef HAVE_STRTOUL
-extern ULONG vl_atoul(char *str, int base, int *failed);
+extern ULONG vl_atoul (char *str, int base, int *failed);
 #else
 #define vl_atoul(str, base, failed) (ULONG)vl_atol(str, base, failed)
 #endif
 
 #ifndef vl_stricmp
-extern int vl_stricmp(const char *a, const char *b);
+extern int vl_stricmp (const char *a, const char *b);
 #endif
 
 #if OPT_EVAL
@@ -978,7 +983,7 @@
 /* region.c */
 typedef int (*DORGNLINES)(int (*)(REGN_ARGS), void *, int);
 
-extern DORGNLINES get_do_lines_rgn(void);
+extern DORGNLINES get_do_lines_rgn (void);
 extern int        blank_region (void);
 extern int        detab_region (void);
 extern int        detabline (void *flagp, int l, int r);
@@ -987,7 +992,7 @@
 extern int        flipregion (void);
 extern int        get_fl_region (REGION *rp);
 extern int        getregion (REGION *rp);
-extern int        kill_line(void *flagp, int l, int r);
+extern int        kill_line (void *flagp, int l, int r);
 extern int        killregion (void);
 extern int        killregionmaybesave (int save);
 extern int        l_detab_region (void);
@@ -1003,7 +1008,7 @@
 extern int        yankregion (void);
 
 #if OPT_SELECTIONS
-extern TBUFF * encode_attributes(LINE *lp, BUFFER *bp, REGION * top_region);
+extern TBUFF * encode_attributes (LINE *lp, BUFFER *bp, REGION * top_region);
 #endif
 
 /* search.c */
@@ -1015,7 +1020,7 @@
 extern void scanboundry (int wrapok, MARK dot, int dir);
 
 #if OPT_HILITEMATCH
-void clobber_save_curbp(BUFFER *bp);
+void clobber_save_curbp (BUFFER *bp);
 #endif
 
 /* select.c */
@@ -1024,15 +1029,15 @@
 extern	LINE *setup_region    (void);
 extern	int	apply_attribute	(void);
 extern	int	assign_attr_id	(void);
-extern	int	attribute_cntl_a_seqs_in_region(REGION *rp, REGIONSHAPE shape);
+extern	int	attribute_cntl_a_seqs_in_region (REGION *rp, REGIONSHAPE shape);
 extern	int	attributeregion (void);
-extern	int	attributeregion_in_region(REGION *rp, REGIONSHAPE shape,
+extern	int	attributeregion_in_region (REGION *rp, REGIONSHAPE shape,
 					    VIDEO_ATTR vattr, char *hc);
 extern	int	decode_attribute (char *text, size_t length, size_t offset, int *countp);
 extern	int	sel_begin	(void);
 extern	int	sel_extend	(int wiping, int include_dot);
-extern	int	sel_get_leftmark(MARK *result);
-extern	int	sel_get_rightmark(MARK *result);
+extern	int	sel_get_leftmark (MARK *result);
+extern	int	sel_get_rightmark (MARK *result);
 extern	int	sel_setshape	(REGIONSHAPE shape);
 extern	void	do_sweep	(int flag);
 extern	void	find_release_attr (BUFFER *bp, REGION *rp);
@@ -1049,7 +1054,7 @@
 #endif
 
 #if OPT_PERL || OPT_TCL || SYS_WINNT
-extern	BUFFER *get_selection_buffer_and_region(AREGION *arp);
+extern	BUFFER *get_selection_buffer_and_region (AREGION *arp);
 #endif /* OPT_PERL || OPT_TCL */
 
 #if OPT_SEL_YANK
@@ -1174,15 +1179,16 @@
 #endif	/* OPT_ENCRYPT */
 
 /* undo.c */
+extern int  check_editable (BUFFER *bp);
 extern int  copy_for_undo (LINE *lp);
+extern int  redo_ok(void);
+extern int  tag_for_undo (LINE *lp);
+extern int  undo_ok(void);
 extern void dumpuline (LINE *lp);
 extern void freeundostacks (BUFFER *bp, int both);
 extern void mayneedundo (void);
 extern void nounmodifiable (BUFFER *bp);
-extern int  redo_ok(void);
-extern int  tag_for_undo (LINE *lp);
 extern void toss_to_undo (LINE *lp);
-extern int  undo_ok(void);
 
 /* version.c */
 extern const char * getversion (void);
Index: regexp.c
Prereq:  1.118 
--- vile-9.5l+/regexp.c	2006-04-20 00:01:45.000000000 +0000
+++ vile-9.5m/regexp.c	2006-12-13 00:25:51.000000000 +0000
@@ -1,7 +1,7 @@
 /*
- * $Header: /usr/build/vile/vile/RCS/regexp.c,v 1.118 2006/04/20 00:01:45 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/regexp.c,v 1.136 2006/12/13 00:25:51 tom Exp $
  *
- * Copyright 2005, Thomas E. Dickey and Paul G. Fox
+ * Copyright 2005,2006 Thomas E. Dickey and Paul G. Fox
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the
@@ -137,6 +137,14 @@
 #define TRACE(p)		/* nothing */
 #endif
 
+#ifndef T_CALLED
+#define T_CALLED ""
+#endif
+
+#ifndef returnCode
+#define returnCode(n) return n
+#endif
+
 #ifdef DEBUG_REGEXP
 
 /* #define OPT_TRACE 1 */
@@ -155,8 +163,10 @@
 
 #ifdef REGDEBUG
 #define REGTRACE(p) TRACE(p)
+#define returnReg(n) returnCode(n)
 #else
-#define REGTRACE(p)		/*nothing */
+#define REGTRACE(p)		/* nothing */
+#define returnReg(n) return n
 #endif
 
 #undef PLUS			/* vile conflict */
@@ -173,9 +183,9 @@
 static char *regnext(char *p);
 static char *regnode(int op);
 static char *regpiece(int *flagp, int at_bop);
-static int regmatch(char *prog, int found);
+static int regmatch(char *prog, int plevel);
 static int regrepeat(const char *p);
-static int regtry(regexp * prog, char *string, char *stringend);
+static int regtry(regexp * prog, char *string, char *stringend, int plevel);
 static void regc(int b);
 static void regninsert(int n, char *opnd);
 static void regopinsert(int op, char *opnd);
@@ -249,30 +259,37 @@
     ,BEGWORD			/* node Match "" between nonword and word. */
     ,ENDWORD			/* node Match "" between word and nonword. */
 
-    ,ALNUM			/* node Match any alphanumeric, include _ */
+    ,ALNUM			/* node Match any alphanumeric */
     ,ALPHA			/* node Match any alphabetic */
     ,BLANK			/* node Match any space char */
     ,CNTRL			/* node Match any control char */
     ,DIGIT			/* node Match any digit */
     ,GRAPH			/* node Match any graphic char (no whitesp) */
+    ,IDENT			/* node Match any alphanumeric, include _ */
     ,LOWER			/* node Match any lowercase char */
-    ,NALNUM			/* node Match any non-identifier char */
+    ,OCTAL			/* node Match any octal digit */
+    ,PATHN			/* node Match any file pathname char */
+    ,PRINT			/* node Match any printable char (including whitesp) */
+    ,PUNCT			/* node Match any punctuation char */
+    ,SPACE			/* node Match single whitespace, excluding BOL and EOL */
+    ,UPPER			/* node Match any uppercase char */
+    ,XDIGIT			/* node Match any hex digit */
+
+    ,NALNUM			/* node Match any non-alphanumeric char */
     ,NALPHA			/* node Match any alphabetic */
     ,NBLANK			/* node Match any non-space char */
     ,NCNTRL			/* node Match any non-control char */
     ,NDIGIT			/* node Match any non-digit */
     ,NGRAPH			/* node Match any non-graphic char */
+    ,NIDENT			/* node Match any non-identifier char */
     ,NLOWER			/* node Match any non-lowercase char */
+    ,NOCTAL			/* node Match any non-octal digit */
+    ,NPATHN			/* node Match any non-file pathname char */
     ,NPRINT			/* node Match any non-printable char */
     ,NPUNCT			/* node Match any non-punctuation char  */
     ,NSPACE			/* node Match single nonwhitespace, excluding BOL and EOL */
     ,NUPPER			/* node Match any non-uppercase char */
     ,NXDIGIT			/* node Match any non-hex digit */
-    ,PRINT			/* node Match any printable char (including whitesp) */
-    ,PUNCT			/* node Match any punctuation char */
-    ,SPACE			/* node Match single whitespace, excluding BOL and EOL */
-    ,UPPER			/* node Match any uppercase char */
-    ,XDIGIT			/* node Match any hex digit */
 
     ,NEVER			/* no   No match */
     ,OPEN			/* no   Mark this point in input as start of #n. */
@@ -281,16 +298,100 @@
     ,CLOSE1, CLOSE2, CLOSE3, CLOSE4, CLOSE5, CLOSE6, CLOSE7, CLOSE8, CLOSE9
 } REGEXP_OP;
 
+/* FIXME: should be OPEN1? */
+#define is_OPENn(n) ((n) >= OPEN && (n) <= OPEN9)
+
+#define OPENn  OPEN1: \
+	  case OPEN2: \
+	  case OPEN3: \
+	  case OPEN4: \
+	  case OPEN5: \
+	  case OPEN6: \
+	  case OPEN7: \
+	  case OPEN8: \
+	  case OPEN9
+
+#define is_CLOSEn(n) ((n) >= CLOSE && (n) <= CLOSE9)
+
+#define CLOSEn CLOSE1: \
+	  case CLOSE2: \
+	  case CLOSE3: \
+	  case CLOSE4: \
+	  case CLOSE5: \
+	  case CLOSE6: \
+	  case CLOSE7: \
+	  case CLOSE8: \
+	  case CLOSE9
+
+/*
+ * Characters used in escapes to correspond with character classes
+ */
+typedef enum {
+    CHR_ALNUM = 'i',
+    CHR_ALPHA = 'a',
+    CHR_BLANK = 'b',
+    CHR_CNTRL = 'c',
+    CHR_DIGIT = 'd',
+    CHR_GRAPH = 'g',
+    CHR_IDENT = 'w',
+    CHR_LOWER = 'l',
+    CHR_OCTAL = 'o',
+    CHR_PATHN = 'f',
+    CHR_PRINT = 'p',
+    CHR_PUNCT = 'q',
+    CHR_SPACE = 's',
+    CHR_UPPER = 'u',
+    CHR_XDIGIT = 'x',
+
+    CHR_NALNUM = 'I',
+    CHR_NALPHA = 'A',
+    CHR_NBLANK = 'B',
+    CHR_NCNTRL = 'C',
+    CHR_NDIGIT = 'D',
+    CHR_NGRAPH = 'G',
+    CHR_NIDENT = 'W',
+    CHR_NLOWER = 'L',
+    CHR_NOCTAL = 'O',
+    CHR_NPATHN = 'F',
+    CHR_NPRINT = 'P',
+    CHR_NPUNCT = 'Q',
+    CHR_NSPACE = 'S',
+    CHR_NUPPER = 'U',
+    CHR_NXDIGIT = 'X',
+} REGEXP_CHR;
+
+#define chr_CLASS(name) CHR_ ## name
+
+#define expand_case_CLASSES() \
+	case_CLASSES(ALNUM, NALNUM); \
+	case_CLASSES(ALPHA, NALPHA); \
+	case_CLASSES(BLANK, NBLANK); \
+	case_CLASSES(CNTRL, NCNTRL); \
+	case_CLASSES(DIGIT, NDIGIT); \
+	case_CLASSES(GRAPH, NGRAPH); \
+	case_CLASSES(IDENT, NIDENT); \
+	case_CLASSES(LOWER, NLOWER); \
+	case_CLASSES(OCTAL, NOCTAL); \
+	case_CLASSES(PATHN, NPATHN); \
+	case_CLASSES(PRINT, NPRINT); \
+	case_CLASSES(PUNCT, NPUNCT); \
+	case_CLASSES(SPACE, NSPACE); \
+	case_CLASSES(UPPER, NUPPER); \
+	case_CLASSES(XDIGIT, NXDIGIT)
+
 /*
  * Macros to ensure consistent use of character classes:
  */
 #define is_ALPHA(c) isAlpha(c)
-#define is_ALNUM(c) isident(c)
+#define is_ALNUM(c) isAlnum(c)
 #define is_BLANK(c) (isSpace(c) && !isreturn(c))
 #define is_CNTRL(c) isCntrl(c)
 #define is_DIGIT(c) isDigit(c)
 #define is_GRAPH(c) isGraph(c)
+#define is_IDENT(c) isident(c)
 #define is_LOWER(c) isLower(c)
+#define is_OCTAL(c) ((c) >= '0' && (c) <= '7')
+#define is_PATHN(c) ispath(c)
 #define is_PRINT(c) (isPrint(c) || (isSpace(c) && !isCntrl(c)))
 #define is_PUNCT(c) isPunct(c)
 #define is_SPACE(c) isSpace(c)
@@ -302,6 +403,8 @@
 #define is_XDIGIT(c) (isDigit(c) || (isLower(c) && (c) - 'a' < 6) || (isUpper(c) && (c) - 'A' < 6))
 #endif
 
+#define is_CLASS(name) is_ ## name
+
 /*
  * Opcode notes:
  *
@@ -381,7 +484,10 @@
 #define	ISMULT(c)	((c) == '*' || (c) == '+' || (c) == '?' || (c) == L_CURL)
 #define	META		"^$.[()|?+*\\<>{}"
 
-#define ANY_ESC "aAbBcCdDgGlLpPqQsSuUwWxX"
+/*
+ * see REGEXP_CHR - this lists all of its values.
+ */
+#define ANY_ESC "aAbBcCdDfFgGiIlLoOpPqQsSuUwWxX"
 
 /*
  * Flags to be passed up and down.
@@ -953,18 +1059,21 @@
 	const char *name;
 	char escape;
     } char_classes[] = {
-	{ "[:alnum:]", 'w' },
-	{ "[:alpha:]", 'a' },
-	{ "[:blank:]", 'b' },
-	{ "[:cntrl:]", 'c' },
-	{ "[:digit:]", 'd' },
-	{ "[:graph:]", 'g' },
-	{ "[:lower:]", 'l' },
-	{ "[:print:]", 'p' },
-	{ "[:punct:]", 'q' },
-	{ "[:space:]", 's' },
-	{ "[:upper:]", 'u' },
-	{ "[:xdigit:]", 'x' },
+	{ "[:alnum:]",	CHR_ALNUM },
+	{ "[:alpha:]",	CHR_ALPHA },
+	{ "[:blank:]",	CHR_BLANK },
+	{ "[:cntrl:]",	CHR_CNTRL },
+	{ "[:digit:]",	CHR_DIGIT },
+	{ "[:file:]",	CHR_PATHN },
+	{ "[:graph:]",	CHR_GRAPH },
+	{ "[:ident:]",	CHR_IDENT },
+	{ "[:lower:]",	CHR_LOWER },
+	{ "[:octal:]",	CHR_OCTAL },
+	{ "[:print:]",	CHR_PRINT },
+	{ "[:punct:]",	CHR_PUNCT },
+	{ "[:space:]",	CHR_SPACE },
+	{ "[:upper:]",	CHR_UPPER },
+	{ "[:xdigit:]", CHR_XDIGIT },
     };
     /* *INDENT-ON* */
 
@@ -1144,103 +1253,24 @@
 #endif
 	    return ret;
 	}
+#define simple_node(name) \
+	    ret = regnode(name); \
+	    *flagp |= HASWIDTH | SIMPLE
+
+#define case_CLASSES(with,without) \
+	    case chr_CLASS(with): \
+		simple_node(with); \
+		break; \
+	    case chr_CLASS(without): \
+		simple_node(without); \
+		break
+
 	switch (*regparse) {
-	case 'a':
-	    ret = regnode(ALPHA);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'A':
-	    ret = regnode(NALPHA);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'b':
-	    ret = regnode(BLANK);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'B':
-	    ret = regnode(NBLANK);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'c':
-	    ret = regnode(CNTRL);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'C':
-	    ret = regnode(NCNTRL);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'd':
-	    ret = regnode(DIGIT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'D':
-	    ret = regnode(NDIGIT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'g':
-	    ret = regnode(GRAPH);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'G':
-	    ret = regnode(NGRAPH);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'l':
-	    ret = regnode(LOWER);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'L':
-	    ret = regnode(NLOWER);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'p':
-	    ret = regnode(PRINT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'P':
-	    ret = regnode(NPRINT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'q':
-	    ret = regnode(PUNCT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'Q':
-	    ret = regnode(NPUNCT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 's':
-	    ret = regnode(SPACE);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'S':
-	    ret = regnode(NSPACE);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'u':
-	    ret = regnode(UPPER);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'U':
-	    ret = regnode(NUPPER);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'w':
-	    ret = regnode(ALNUM);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'W':
-	    ret = regnode(NALNUM);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'x':
-	    ret = regnode(XDIGIT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
-	case 'X':
-	    ret = regnode(NXDIGIT);
-	    *flagp |= HASWIDTH | SIMPLE;
-	    break;
+
+	    expand_case_CLASSES();
+
+#undef case_CLASSES
+
 	default:
 	    ret = regnode(EXACTLY);
 	    regc(*regparse);
@@ -1456,6 +1486,7 @@
 static char *regbol;		/* Beginning of input, for ^ check. */
 static char **regstartp;	/* Pointer to startp array. */
 static char **regendp;		/* Ditto for endp. */
+static int reg_cnts[NSUBEXP];	/* count closure of \(...\) groups */
 
 /* this very special copy of strncmp allows for caseless operation,
  * and also for non-null terminated strings:
@@ -1512,78 +1543,18 @@
 	    default:
 		matched = (CharOf(c) == CharOf(*s));
 		break;
-	    case 'a':
-		matched = is_ALPHA(c);
-		break;
-	    case 'A':
-		matched = !is_ALPHA(c);
-		break;
-	    case 'b':
-		matched = is_BLANK(c);
-		break;
-	    case 'B':
-		matched = !is_BLANK(c);
-		break;
-	    case 'c':
-		matched = is_CNTRL(c);
-		break;
-	    case 'C':
-		matched = !is_CNTRL(c);
-		break;
-	    case 'd':
-		matched = is_DIGIT(c);
-		break;
-	    case 'D':
-		matched = !is_DIGIT(c);
-		break;
-	    case 'g':
-		matched = is_GRAPH(c);
-		break;
-	    case 'G':
-		matched = !is_GRAPH(c);
-		break;
-	    case 'l':
-		matched = is_LOWER(c);
-		break;
-	    case 'L':
-		matched = !is_LOWER(c);
-		break;
-	    case 'p':
-		matched = is_PRINT(c);
-		break;
-	    case 'P':
-		matched = !is_PRINT(c);
-		break;
-	    case 'q':
-		matched = is_PUNCT(c);
-		break;
-	    case 'Q':
-		matched = !is_PUNCT(c);
-		break;
-	    case 's':
-		matched = is_SPACE(c);
-		break;
-	    case 'S':
-		matched = !is_SPACE(c);
-		break;
-	    case 'u':
-		matched = is_UPPER(c);
-		break;
-	    case 'U':
-		matched = !is_UPPER(c);
-		break;
-	    case 'w':
-		matched = is_ALNUM(c);
-		break;
-	    case 'W':
-		matched = !is_ALNUM(c);
-		break;
-	    case 'x':
-		matched = is_XDIGIT(c);
-		break;
-	    case 'X':
-		matched = !is_XDIGIT(c);
-		break;
+
+#define case_CLASSES(with,without) \
+	    case chr_CLASS(with): \
+		matched = is_CLASS(with)(c); \
+		break; \
+	    case chr_CLASS(without): \
+		matched = !is_CLASS(with)(c); \
+		break
+
+		expand_case_CLASSES();
+
+#undef case_CLASSES
 	    }
 	} else {
 	    matched = SAME(*s, c);
@@ -1659,7 +1630,7 @@
 
     /* Simplest case:  anchored match need be tried only once. */
     if (startoff == 0 && prog->reganch)
-	return (regtry(prog, string, stringend));
+	return (regtry(prog, string, stringend, 0));
 
     /* Messy cases:  unanchored match. */
     s = &string[startoff];
@@ -1667,14 +1638,14 @@
 	/* We know what char it must start with. */
 	while ((s = regstrchr(s, prog->regstart, stringend)) != NULL &&
 	       s < endsrch) {
-	    if (regtry(prog, s, stringend))
+	    if (regtry(prog, s, stringend, 0))
 		return (1);
 	    s++;
 	}
     } else {
 	/* We don't -- general case. */
 	do {
-	    if (regtry(prog, s, stringend))
+	    if (regtry(prog, s, stringend, 0))
 		return (1);
 	} while (s++ != stringend && s < endsrch);
     }
@@ -1690,7 +1661,8 @@
 regtry(
 	  regexp * prog,
 	  char *string,
-	  char *stringend)
+	  char *stringend,
+	  int plevel)
 {
     int i;
     char **sp;
@@ -1703,6 +1675,7 @@
 #ifdef REGDEBUG
     reg_program = prog->program;
 #endif
+    memset(reg_cnts, 0, sizeof(reg_cnts));
 
     sp = prog->startp;
     ep = prog->endp;
@@ -1710,7 +1683,7 @@
 	*sp++ = NULL;
 	*ep++ = NULL;
     }
-    if (regmatch(prog->program + 1, 0)) {
+    if (regmatch(prog->program + 1, plevel)) {
 	prog->startp[0] = string;
 	prog->endp[0] = reginput;
 	prog->mlen = reginput - string;
@@ -1722,6 +1695,74 @@
 }
 
 /*
+ */
+#define decl_state() \
+		char *save_input
+
+#define save_state() \
+		save_input = reginput
+
+#define restore_state() \
+		reginput = save_input
+
+/*
+ * Use this to save/restore once.
+ */
+#define decl_state1() \
+	decl_state(); \
+		int save_cnts[NSUBEXP]; \
+		char *save_1stp[NSUBEXP]; \
+		char *save_endp[NSUBEXP]
+
+#define save_state1() \
+	save_state(); \
+		memcpy(save_1stp, regstartp, sizeof(save_1stp)); \
+		memcpy(save_endp, regendp,   sizeof(save_endp)); \
+		memcpy(save_cnts, reg_cnts,  sizeof(save_cnts))
+
+#define restore_state1() \
+	restore_state(); \
+		memcpy(regstartp, save_1stp, sizeof(save_1stp)); \
+		memcpy(regendp,   save_endp, sizeof(save_endp)); \
+		memcpy(reg_cnts,  save_cnts, sizeof(save_cnts))
+
+/*
+ * Use this to save/restore several times, to find the best.
+ */
+#define decl_state2() \
+	decl_state1(); \
+		int greedy = -1; \
+		int best_cnts[NSUBEXP]; \
+		char *best_1stp[NSUBEXP]; \
+		char *best_endp[NSUBEXP]
+
+#define save_state2() \
+	save_state1(); \
+		memcpy(best_1stp, regstartp, sizeof(save_1stp)); \
+		memcpy(best_endp, regendp,   sizeof(save_endp)); \
+		memcpy(best_cnts, reg_cnts,  sizeof(save_cnts))
+
+#define restore_state2() \
+	restore_state1()
+
+#define update_greedy() \
+		int diff = (reginput - save_input); \
+		if (greedy < diff) { \
+		    REGTRACE(("update_greedy:%d\n", diff)); \
+		    greedy = diff; \
+		    memcpy(best_1stp, regstartp, sizeof(save_1stp)); \
+		    memcpy(best_endp, regendp,   sizeof(save_endp)); \
+		    memcpy(best_cnts, reg_cnts,  sizeof(save_cnts)); \
+		}
+
+#define use_greediest() \
+		REGTRACE(("use_greediest:%d\n", greedy)); \
+		reginput = (save_input + greedy); \
+		memcpy(regstartp, best_1stp, sizeof(save_1stp)); \
+		memcpy(regendp,   best_endp, sizeof(save_endp)); \
+		memcpy(reg_cnts,  best_cnts, sizeof(save_cnts))
+
+/*
  - regmatch - main matching routine
  *
  * Conceptually the strategy is simple:  check to see whether the current
@@ -1732,11 +1773,12 @@
  * by recursion.
  */
 static int			/* 0 failure, 1 success */
-regmatch(char *prog, int found)
+regmatch(char *prog, int plevel)
 {
     char *scan;			/* Current node. */
     char *next;			/* Next node. */
 
+    REGTRACE((T_CALLED "regmatch(%d) plevel %d\n", reginput - regbol, plevel));
     if ((scan = prog) != NULL) {
 #ifdef REGDEBUG
 	if (scan != NULL && regnarrate) {
@@ -1763,11 +1805,11 @@
 	switch (OP(scan)) {
 	case BOL:
 	    if (reginput != regbol)
-		return (0);
+		returnReg(0);
 	    break;
 	case EOL:
 	    if (reginput != regnomore)
-		return (0);
+		returnReg(0);
 	    break;
 	case BEGWORD:
 	    /* Match if current char isident
@@ -1775,7 +1817,7 @@
 	    if ((reginput == regnomore || !isident(*reginput))
 		|| (reginput != regbol
 		    && isident(reginput[-1])))
-		return (0);
+		returnReg(0);
 	    break;
 	case ENDWORD:
 	    /* Match if previous char isident
@@ -1783,131 +1825,28 @@
 	    if ((reginput != regnomore && isident(*reginput))
 		|| reginput == regbol
 		|| !isident(reginput[-1]))
-		return (0);
-	    break;
-	case ALPHA:
-	    if (reginput == regnomore || !is_ALPHA(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NALPHA:
-	    if (reginput == regnomore || is_ALPHA(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case ALNUM:		/* includes _ */
-	    if (reginput == regnomore || !is_ALNUM(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NALNUM:
-	    if (reginput == regnomore || is_ALNUM(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case BLANK:
-	    if (reginput == regnomore || !is_BLANK(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NBLANK:
-	    if (reginput == regnomore || is_BLANK(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case CNTRL:
-	    if (reginput == regnomore || !is_CNTRL(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NCNTRL:
-	    if (reginput == regnomore || is_CNTRL(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case DIGIT:
-	    if (reginput == regnomore || !is_DIGIT(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NDIGIT:
-	    if (reginput == regnomore || is_DIGIT(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case GRAPH:
-	    if (reginput == regnomore || !is_GRAPH(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NGRAPH:
-	    if (reginput == regnomore || is_GRAPH(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case LOWER:
-	    if (reginput == regnomore || !is_LOWER(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NLOWER:
-	    if (reginput == regnomore || is_LOWER(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case PRINT:
-	    if (reginput == regnomore || !is_PRINT(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NPRINT:
-	    if (reginput == regnomore || is_PRINT(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case PUNCT:
-	    if (reginput == regnomore || !is_PUNCT(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NPUNCT:
-	    if (reginput == regnomore || is_PUNCT(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case SPACE:
-	    if (reginput == regnomore || !is_SPACE(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NSPACE:
-	    if (reginput == regnomore || is_SPACE(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case UPPER:
-	    if (reginput == regnomore || !is_UPPER(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NUPPER:
-	    if (reginput == regnomore || is_UPPER(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case XDIGIT:
-	    if (reginput == regnomore || !is_XDIGIT(*reginput))
-		return 0;
-	    reginput++;
-	    break;
-	case NXDIGIT:
-	    if (reginput == regnomore || is_XDIGIT(*reginput))
-		return 0;
-	    reginput++;
+		returnReg(0);
 	    break;
+
+#define case_CLASSES(with,without) \
+	case with: \
+	    if (reginput == regnomore || !is_CLASS(with)(*reginput)) \
+		returnReg(0); \
+	    reginput++; \
+	    break; \
+	case without: \
+	    if (reginput == regnomore || is_CLASS(with)(*reginput)) \
+		returnReg(0); \
+	    reginput++; \
+	    break
+
+	    expand_case_CLASSES();
+
+#undef case_CLASSES
+
 	case ANY:
 	    if (reginput == regnomore)
-		return (0);
+		returnReg(0);
 	    reginput++;
 	    break;
 	case EXACTLY:{
@@ -1915,30 +1854,30 @@
 		char *opnd;
 
 		if (reginput == regnomore)
-		    return (0);
+		    returnReg(0);
 
 		opnd = OPERAND(scan);
 		/* Inline the first character, for speed. */
 		if (!SAME(*opnd, *reginput)) {
-		    return (0);
+		    returnReg(0);
 		}
 		len = OPSIZE(scan);
 		if (len > 1
 		    && regstrncmp(reginput, opnd, len, regnomore) != 0)
-		    return (0);
+		    returnReg(0);
 		reginput += len;
 	    }
 	    break;
 	case ANYOF:
 	    if (reginput == regnomore
 		|| RegStrChr2(OPERAND(scan), OPSIZE(scan), *reginput) == 0)
-		return (0);
+		returnReg(0);
 	    reginput++;
 	    break;
 	case ANYBUT:
 	    if (reginput == regnomore
 		|| RegStrChr2(OPERAND(scan), OPSIZE(scan), *reginput) != 0)
-		return (0);
+		returnReg(0);
 	    reginput++;
 	    break;
 	case NEVER:
@@ -1947,61 +1886,57 @@
 	    break;
 	case BACK:
 	    break;
-	case OPEN1:
-	case OPEN2:
-	case OPEN3:
-	case OPEN4:
-	case OPEN5:
-	case OPEN6:
-	case OPEN7:
-	case OPEN8:
-	case OPEN9:{
+	case OPENn:{
 		int no;
-		char *save;
+		decl_state1();
 
 		no = OP(scan) - OPEN;
-		save = reginput;
+		save_state1();
 
-		if (regmatch(next, found)) {
-		    /*
-		     * Don't set startp if some later
-		     * invocation of the same parentheses
-		     * already has.
-		     */
-		    if (regstartp[no] == NULL)
-			regstartp[no] = save;
-		    return (1);
-		} else
-		    return (0);
+		/*
+		 * Don't set startp if some earlier
+		 * invocation of the same parentheses
+		 * already has.
+		 */
+		if (regstartp[no] == NULL) {
+		    regstartp[no] = save_input;
+		    REGTRACE(("match atom%d:\n", no));
+		}
+		if (regmatch(next, plevel + 1)) {
+		    returnReg(1);
+		} else {
+		    restore_state1();
+		    returnReg(0);
+		}
 	    }
 	    /* NOTREACHED */
 
-	case CLOSE1:
-	case CLOSE2:
-	case CLOSE3:
-	case CLOSE4:
-	case CLOSE5:
-	case CLOSE6:
-	case CLOSE7:
-	case CLOSE8:
-	case CLOSE9:{
+	case CLOSEn:{
 		int no;
-		char *save;
+		decl_state();
 
 		no = OP(scan) - CLOSE;
-		save = reginput;
+		save_state();
 
-		if (regmatch(next, found)) {
+		reg_cnts[plevel] += 1;
+		if ((plevel + 1) < NSUBEXP)
+		    reg_cnts[plevel + 1] = 0;
+		if (regmatch(next, plevel - 1)) {
 		    /*
-		     * Don't set endp if some later
+		     * Don't set endp if some earlier
 		     * invocation of the same parentheses
 		     * already has.
 		     */
-		    if (regendp[no] == NULL)
-			regendp[no] = save;
-		    return (1);
-		} else
-		    return (0);
+		    if (regendp[no] == NULL) {
+			regendp[no] = save_input;
+			REGTRACE(("close atom%d:%p\n", no, save_input));
+		    }
+		    returnReg(1);
+		} else {
+		    restore_state();
+		    regendp[no] = NULL;
+		    returnReg(0);
+		}
 	    }
 	    /* NOTREACHED */
 
@@ -2009,43 +1944,78 @@
 	    if (OP(next) != BRANCH) {	/* No choice. */
 		next = OPERAND(scan);	/* Avoid recursion. */
 		break;
-	    }
+	    } else if (OP(OPERAND(scan)) != RCOMPLX) {
+		decl_state2();
 
-	    /*
-	     * Do looping (BACK, RCOMPLX) via recursion.
-	     */
-	    do {
-		char *save = reginput;
-
-		next = OPERAND(scan);
-		if (OP(next) == RCOMPLX) {
-		    int max = get_RR_MAX(next);
-		    int min = get_RR_MIN(next);
-
-		    if ((max == 0
-			 || found + 1 < max)
-			&& regmatch(next, found + 1)) {
-			found = min;
+		save_state2();
+		do {
+		    if (regmatch(OPERAND(scan), plevel)) {
+			update_greedy();
 		    }
+		    restore_state2();
+		    scan = regnext(scan);
+		} while (scan != NULL && OP(scan) == BRANCH);
+
+		if (greedy >= 0) {
+		    use_greediest();
+		    returnReg(1);
+		}
+
+		returnReg(0);
+	    } else {
+		decl_state2();
+		int first = 1;
+		int firstok = 0;
+
+		save_state2();
+		do {
+		    int success = 0;
+
+		    next = OPERAND(scan);
+		    if (OP(next) == RCOMPLX) {
+			int max = get_RR_MAX(next);
+			int min = get_RR_MIN(next);
+
+			if ((max == 0
+			     || reg_cnts[plevel + 1] < max)) {
+			    success = regmatch(next, plevel);
+			} else {
+			    success = 1;
+			}
+
+			REGTRACE(("compare %d vs \\{%d,%d\\}\n",
+				  reg_cnts[plevel + 1], min, max));
 
-		    if (min == 0
-			|| found >= min)
-			return (1);
-		    return (0);
-
-		} else if (OP(next) >= OPEN) {
-		    if (regmatch(next, 0)) {
-			return (1);
+			success = ((min == 0
+				    || reg_cnts[plevel + 1] >= min)
+				   && (max == 0
+				       || reg_cnts[plevel + 1] <= max));
+
+		    } else if (is_CLOSEn(OP(next))) {
+			if ((plevel + 1) < NSUBEXP)
+			    reg_cnts[plevel + 1] = 0;
+			success = regmatch(next, plevel);
+		    } else {
+			success = regmatch(next, plevel);
 		    }
-		} else {
-		    if (regmatch(next, found)) {
-			return (1);
+		    if (first) {
+			firstok = success;
+			first = 0;
+		    }
+		    if (success) {
+			update_greedy();
 		    }
+		    restore_state2();
+		    scan = regnext(scan);
+		} while (scan != NULL && OP(scan) == BRANCH);
+
+		if (greedy >= 0) {
+		    use_greediest();
+		    returnReg(firstok);
 		}
-		reginput = save;
-		scan = regnext(scan);
-	    } while (scan != NULL && OP(scan) == BRANCH);
-	    return (0);
+
+		returnReg(0);
+	    }
 
 	case RCOMPLX:
 	    break;
@@ -2056,10 +2026,10 @@
 	    {
 		int nxtch;
 		int no;
-		char *save;
 		int min;
 		int max;
 		char *rpt;
+		decl_state();
 
 		/*
 		 * Lookahead to avoid useless match attempts
@@ -2087,35 +2057,38 @@
 		    break;
 		}
 
-		save = reginput;
+		save_state();
 		no = regrepeat(rpt);
 
 		if (max > 0 && no > max) {
 		    no = max;
-		    reginput = save + no;
+		    reginput = save_input + no;
 		}
 
 		while (no >= min) {
 		    /* If it could work, try it. */
 		    if ((nxtch == -1
 			 || reginput >= regnomore
-			 || SAME(*reginput, nxtch))
-			&& regmatch(next, found))
-			return (1);
+			 || SAME(*reginput, nxtch))) {
+			if (regmatch(next, plevel)) {
+			    returnReg(1);
+			}
+		    }
 
 		    /* Couldn't or didn't -- back up. */
 		    no--;
-		    reginput = save + no;
+		    reginput = save_input + no;
 		}
-		return (0);
+		restore_state();
+		returnReg(0);
 	    }
 	    /* NOTREACHED */
 
 	case END:
-	    return (1);		/* Success! */
+	    returnReg(1);	/* Success! */
 	default:
 	    regerror("memory corruption");
-	    return (0);
+	    returnReg(0);
 	}
 
 	scan = next;
@@ -2126,7 +2099,7 @@
      * the terminating point.
      */
     regerror("corrupted pointers");
-    return (0);
+    returnReg(0);
 }
 
 /*
@@ -2165,150 +2138,25 @@
 	    scan++;
 	}
 	break;
-    case ALPHA:
-	while (scan < regnomore && is_ALPHA(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NALPHA:
-	while (scan < regnomore && !is_ALPHA(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case ALNUM:
-	while (scan < regnomore && is_ALNUM(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NALNUM:
-	while (scan < regnomore && !is_ALNUM(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case BLANK:
-	while (scan < regnomore && is_BLANK(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NBLANK:
-	while (scan < regnomore && !is_BLANK(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case CNTRL:
-	while (scan < regnomore && is_CNTRL(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NCNTRL:
-	while (scan < regnomore && !is_CNTRL(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case DIGIT:
-	while (scan < regnomore && is_DIGIT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NDIGIT:
-	while (scan < regnomore && !is_DIGIT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case GRAPH:
-	while (scan < regnomore && is_GRAPH(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NGRAPH:
-	while (scan < regnomore && !is_GRAPH(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case LOWER:
-	while (scan < regnomore && is_LOWER(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NLOWER:
-	while (scan < regnomore && !is_LOWER(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case PRINT:
-	while (scan < regnomore && is_PRINT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NPRINT:
-	while (scan < regnomore && !is_PRINT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case PUNCT:
-	while (scan < regnomore && is_PUNCT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NPUNCT:
-	while (scan < regnomore && !is_PUNCT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case SPACE:
-	while (scan < regnomore && is_SPACE(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NSPACE:
-	while (scan < regnomore && !is_SPACE(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case UPPER:
-	while (scan < regnomore && is_UPPER(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NUPPER:
-	while (scan < regnomore && !is_UPPER(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case XDIGIT:
-	while (scan < regnomore && is_XDIGIT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
-    case NXDIGIT:
-	while (scan < regnomore && !is_XDIGIT(*scan)) {
-	    count++;
-	    scan++;
-	}
-	break;
+
+#define case_CLASSES(with,without) \
+    case with: \
+	while (scan < regnomore && is_CLASS(with)(*scan)) { \
+	    count++; \
+	    scan++; \
+	} \
+	break; \
+    case without: \
+	while (scan < regnomore && !is_CLASS(with)(*scan)) { \
+	    count++; \
+	    scan++; \
+	} \
+	break
+
+	expand_case_CLASSES();
+
+#undef case_CLASSES
+
     default:			/* Oh dear.  Called inappropriately. */
 	regerror("internal foulup");
 	count = 0;		/* Best compromise. */
@@ -2426,148 +2274,39 @@
 
     (void) strcpy(buf, ":");
 
+#define case_PROP(name) case name: p = #name; break
+#define case_CLASSES(with,without) case_PROP(with); case_PROP(without)
+
     switch (OP(op)) {
-    case BOL:
-	p = "BOL";
-	break;
-    case EOL:
-	p = "EOL";
-	break;
-    case ANY:
-	p = "ANY";
-	break;
-    case ANYOF:
-	p = "ANYOF";
-	break;
-    case ANYBUT:
-	p = "ANYBUT";
-	break;
-    case BRANCH:
-	p = "BRANCH";
-	break;
-    case EXACTLY:
-	p = "EXACTLY";
-	break;
-    case NEVER:
-	p = "NEVER";
-	break;
-    case NOTHING:
-	p = "NOTHING";
-	break;
-    case BACK:
-	p = "BACK";
-	break;
-    case END:
-	p = "END";
-	break;
-    case BEGWORD:
-	p = "BEGWORD";
-	break;
-    case ENDWORD:
-	p = "ENDWORD";
-	break;
-    case ALPHA:
-	p = "ALPHA";
-	break;
-    case NALPHA:
-	p = "NALPHA";
-	break;
-    case ALNUM:
-	p = "ALNUM";
-	break;
-    case NALNUM:
-	p = "NALNUM";
-	break;
-    case BLANK:
-	p = "BLANK";
-	break;
-    case NBLANK:
-	p = "NBLANK";
-	break;
-    case CNTRL:
-	p = "CNTRL";
-	break;
-    case NCNTRL:
-	p = "NCNTRL";
-	break;
-    case DIGIT:
-	p = "DIGIT";
-	break;
-    case NDIGIT:
-	p = "NDIGIT";
-	break;
-    case GRAPH:
-	p = "GRAPH";
-	break;
-    case NGRAPH:
-	p = "NGRAPH";
-	break;
-    case LOWER:
-	p = "LOWER";
-	break;
-    case NLOWER:
-	p = "NLOWER";
-	break;
-    case PRINT:
-	p = "PRINT";
-	break;
-    case NPRINT:
-	p = "NPRINT";
-	break;
-    case PUNCT:
-	p = "PUNCT";
-	break;
-    case NPUNCT:
-	p = "NPUNCT";
-	break;
-    case SPACE:
-	p = "SPACE";
-	break;
-    case NSPACE:
-	p = "NSPACE";
-	break;
-    case UPPER:
-	p = "UPPER";
-	break;
-    case NUPPER:
-	p = "NUPPER";
-	break;
-    case XDIGIT:
-	p = "XDIGIT";
-	break;
-    case NXDIGIT:
-	p = "NXDIGIT";
-	break;
-    case OPEN1:
-    case OPEN2:
-    case OPEN3:
-    case OPEN4:
-    case OPEN5:
-    case OPEN6:
-    case OPEN7:
-    case OPEN8:
-    case OPEN9:
+	case_PROP(BOL);
+	case_PROP(EOL);
+	case_PROP(ANY);
+	case_PROP(ANYOF);
+	case_PROP(ANYBUT);
+	case_PROP(BRANCH);
+	case_PROP(EXACTLY);
+	case_PROP(NEVER);
+	case_PROP(NOTHING);
+	case_PROP(BACK);
+	case_PROP(END);
+	case_PROP(BEGWORD);
+	case_PROP(ENDWORD);
+
+	expand_case_CLASSES();
+
+    case OPENn:
 	(void) sprintf(STRSKIP(buf), "OPEN%d", OP(op) - OPEN);
 	p = NULL;
 	break;
-    case CLOSE1:
-    case CLOSE2:
-    case CLOSE3:
-    case CLOSE4:
-    case CLOSE5:
-    case CLOSE6:
-    case CLOSE7:
-    case CLOSE8:
-    case CLOSE9:
+
+    case CLOSEn:
 	(void) sprintf(STRSKIP(buf), "CLOSE%d", OP(op) - CLOSE);
 	p = NULL;
 	break;
-    case STAR:
-	p = "STAR";
-	break;
-    case PLUS:
-	p = "PLUS";
-	break;
+
+	case_PROP(STAR);
+	case_PROP(PLUS);
+
     case RSIMPLE:		/* FALLTHROUGH */
     case RCOMPLX:
 	(void) sprintf(STRSKIP(buf), "%s%c", OP(op) == RSIMPLE
@@ -2581,6 +2320,7 @@
 	(void) sprintf(STRSKIP(buf), "%c", R_CURL);
 	p = NULL;
 	break;
+
     default:
 	regerror("corrupted opcode");
 	break;
@@ -2589,6 +2329,8 @@
 	(void) strcat(buf, p);
     return (buf);
 }
+#undef case_PROP
+#undef case_CLASSES
 #endif
 
 #if defined(llength) && defined(lforw) && defined(lback)
@@ -2602,30 +2344,35 @@
 	    int startoff,
 	    int endoff)
 {
+    int s;
+
     if (endoff < startoff)
 	return 0;
 
+    REGTRACE((T_CALLED "lregexec %d..%d\n", startoff, endoff));
     if (lp->l_text) {
-	return regexec(prog, lp->l_text, &(lp->l_text[llength(lp)]),
-		       startoff, endoff);
+	s = regexec(prog, lp->l_text, &(lp->l_text[llength(lp)]),
+		    startoff, endoff);
     } else {
 	/* the prog might be ^$, or something legal on a null string */
 
 	char *nullstr = "";
-	int s;
 
-	if (startoff > 0)
-	    return 0;
-	s = regexec(prog, nullstr, nullstr, 0, 0);
+	if (startoff > 0) {
+	    s = 0;
+	} else {
+	    s = regexec(prog, nullstr, nullstr, 0, 0);
+	}
 	if (s) {
 	    if (prog->mlen > 0) {
 		mlforce("BUG: non-zero match on null string");
-		return 0;
+		s = 0;
+	    } else {
+		prog->startp[0] = prog->endp[0] = NULL;
 	    }
-	    prog->startp[0] = prog->endp[0] = NULL;
 	}
-	return s;
     }
+    returnReg(s);
 }
 #endif /* VILE LINE */
 
@@ -2890,20 +2637,21 @@
 
 #if 0
     for (n = 0; n < 256; ++n) {
-	printf("%3d [%2X] %c%c%c%c%c%c%c%c%c%c%c%c\n",
+	printf("%3d [%2X] %c%c%c%c%c%c%c%c%c%c%c%c%c\n",
 	       n, n,
-	       is_ALPHA(n) ? 'A' : '-',
-	       is_ALNUM(n) ? 'a' : '-',
-	       is_BLANK(n) ? 'B' : '-',
-	       is_CNTRL(n) ? 'C' : '-',
-	       is_DIGIT(n) ? 'D' : '-',
-	       is_GRAPH(n) ? 'G' : '-',
-	       is_LOWER(n) ? 'L' : '-',
-	       is_PRINT(n) ? 'P' : '-',
-	       is_PUNCT(n) ? 'p' : '-',
-	       is_SPACE(n) ? 'S' : '-',
-	       is_UPPER(n) ? 'U' : '-',
-	       is_XDIGIT(n) ? 'X' : '-');
+	       is_ALPHA(n) ? CHR_ALPHA : '-',
+	       is_ALNUM(n) ? CHR_ALNUM : '-',
+	       is_BLANK(n) ? CHR_BLANK : '-',
+	       is_CNTRL(n) ? CHR_CNTRL : '-',
+	       is_DIGIT(n) ? CHR_DIGIT : '-',
+	       is_GRAPH(n) ? CHR_GRAPH : '-',
+	       is_IDENT(n) ? CHR_IDENT : '-',
+	       is_LOWER(n) ? CHR_LOWER : '-',
+	       is_PRINT(n) ? CHR_PRINT : '-',
+	       is_PUNCT(n) ? CHR_PUNCT : '-',
+	       is_SPACE(n) ? CHR_SPACE : '-',
+	       is_UPPER(n) ? CHR_UPPER : '-',
+	       is_XDIGIT(n) ? CHR_XDIGIT : '-');
     }
 #endif
 
Index: revlist
--- vile-9.5l+/revlist	2006-11-08 01:45:56.000000000 +0000
+++ vile-9.5m/revlist	2006-12-14 01:05:19.000000000 +0000
@@ -1,6 +1,6 @@
-revlist for vile, version v9_5l
+revlist for vile, version v9_5m
 --------------------------------------------------------------------------------
-CHANGES	1.951
+CHANGES	1.967
 CHANGES.R3	1.1
 CHANGES.R4	1.1
 CHANGES.R5	1.1
@@ -13,67 +13,67 @@
 README	1.96
 README.PC	1.33
 README.VMS	1.5
-aclocal.m4	1.165
+aclocal.m4	1.167
 ansi.c	1.48
 api.c	1.38
 api.h	1.13
 basic.c	1.126
-bind.c	1.300
+bind.c	1.303
 borland.c	1.36
 btree.c	1.23
 btree.h	1.5
-buffer.c	1.307
+buffer.c	1.312
 buglist	1.405
 builtflt.c	1.47
-chgdfunc.h	1.19
-cmdtbl	1.244
+chgdfunc.h	1.20
+cmdtbl	1.245
 config.guess	1.5
 config.sub	1.6
 config_h.in	1.2
-configure	1.8
+configure	1.9
 configure.in	1.225
 csrch.c	1.34
 curses.c	1.27
 descrip.mms	1.48
 dirstuff.h	1.30
-display.c	1.421
+display.c	1.423
 djhandl.c	1.6
 dumbterm.c	1.21
-edef.h	1.326
-estruct.h	1.598
-eval.c	1.354
-exec.c	1.307
+edef.h	1.327
+estruct.h	1.604
+eval.c	1.356
+exec.c	1.308
 externs.c	1.10
 fences.c	1.84
 file.c	1.396
-filec.c	1.124
+filec.c	1.125
 fileio.c	1.181
 finderr.c	1.130
 glob.c	1.89
 globals.c	1.49
 gppconio.c	1.2
 history.c	1.85
-input.c	1.289
-insert.c	1.147
+input.c	1.304
+insert.c	1.148
 install.sh	1.7
 isearch.c	1.60
 itbuff.c	1.25
 lckfiles.c	1.11
-line.c	1.172
-main.c	1.568
+line.c	1.177
+main.c	1.586
 makefile.blc	1.20
 makefile.djg	1.35
 makefile.icc	1.16
-makefile.in	1.203
+makefile.in	1.204
 makefile.wnt	1.91
-map.c	1.110
+map.c	1.111
 menu.c	1.49
 mkdirs.sh	1.6
 mkprlenv.wnt	1.9
 mktbls.c	1.136
-modes.c	1.320
-modetbl	1.240
-msgs.c	1.26
+modes.c	1.326
+modetbl	1.250
+msgs.c	1.28
 npopen.c	1.94
 ntconio.c	1.87
 ntwinio.c	1.160
@@ -83,40 +83,40 @@
 os2keys.h	1.2
 os2pipe.c	1.5
 os2vio.c	1.35
-patchlev.h	1.348
-path.c	1.151
+patchlev.h	1.349
+path.c	1.152
 perl.xs	1.104
 plugin.c	1.1
 plugin.h	1.1
-proto.h	1.574
+proto.h	1.584
 pscreen.h	1.2
 ptypemap	1.7
 random.c	1.297
-regexp.c	1.118
+regexp.c	1.136
 region.c	1.133
-revlist	v9_5l
-search.c	1.142
+revlist	v9_5m
+search.c	1.143
 select.c	1.162
 sinstall.sh	1.1
 spawn.c	1.191
-statevar.c	1.98
-tags.c	1.134
+statevar.c	1.110
+tags.c	1.135
 tbuff.c	1.66
 tcap.c	1.170
 tcap.h	1.11
 termio.c	1.211
 test_io.c	1.2
-trace.c	1.54
+trace.c	1.55
 trace.h	1.24
 ucrypt.c	1.15
-undo.c	1.90
+undo.c	1.91
 version.c	1.61
-vile-9.5.spec	1.13
+vile-9.5.spec	1.14
 vile.1	1.36
-vile.hlp	1.616
+vile.hlp	1.626
 vile.wmconfig	1.1
 vl_alloc.h	1.1
-vl_ctype.h	1.4
+vl_ctype.h	1.7
 vl_regex.h	1.4
 vms2unix.c	1.42
 vmsbuild.com	1.46
@@ -151,10 +151,10 @@
 doc/config.doc	1.14
 doc/dir.doc	1.3
 doc/filters.doc	1.35
-doc/macros.doc	1.97
+doc/macros.doc	1.100
 doc/menus.doc	1.7
 doc/modes.doc	1.16
-doc/ncu-indent	1.12
+doc/ncu-indent	1.16
 doc/oleauto.doc	1.8
 doc/perl.doc	1.2
 doc/visvile.doc	1.9
@@ -325,8 +325,8 @@
 filters/wbt.key	1.3
 filters/xml-filt.l	1.15
 filters/xml.key	1.1
-filters/xres.key	1.2
-filters/xresfilt.l	1.18
+filters/xres.key	1.3
+filters/xresfilt.l	1.19
 filters/xs-filt.l	1.12
 filters/xs.key	1.1
 filters/yacc.key	1.5
@@ -346,15 +346,15 @@
 macros/digraphs.rc	1.2
 macros/gnugpg.rc	1.3
 macros/loaderrs.rc	1.1
-macros/manpage.rc	1.21
-macros/modes.rc	1.49
+macros/manpage.rc	1.22
+macros/modes.rc	1.51
 macros/palettes.rc	1.7
 macros/pictmode.rc	1.4
 macros/search.rc	1.3
 macros/shifts.rc	1.4
 macros/showeach.rc	1.5
 macros/vile-pager	1.5
-macros/vileinit.rc	1.33
+macros/vileinit.rc	1.34
 macros/vilemenu.rc	1.3
 macros/vileperl.rc	1.7
 macros/which.rc	1.15
Index: search.c
Prereq:  1.142 
--- vile-9.5l+/search.c	2006-11-02 21:01:24.000000000 +0000
+++ vile-9.5m/search.c	2006-11-23 19:35:49.000000000 +0000
@@ -3,7 +3,7 @@
  * and backward directions.
  *  heavily modified by Paul Fox, 1990
  *
- * $Header: /usr/build/vile/vile/RCS/search.c,v 1.142 2006/11/02 21:01:24 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/search.c,v 1.143 2006/11/23 19:35:49 tom Exp $
  *
  * original written Aug. 1986 by John M. Gamble, but I (pgf) have since
  * replaced his regex stuff with Henry Spencer's regexp package.
@@ -740,7 +740,7 @@
 	   fromscreen));
 
     if (fromscreen) {
-	if ((status = screen_string(temp, sizeof(temp), vl_ident)) == TRUE) {
+	if ((status = screen_to_ident(temp, sizeof(temp))) == TRUE) {
 	    if (tb_init(apat, EOS) == 0
 		|| tb_bappend(apat, temp, strlen(temp)) == 0) {
 		status = FALSE;
Index: statevar.c
Prereq:  1.98 
--- vile-9.5l+/statevar.c	2006-04-19 23:51:34.000000000 +0000
+++ vile-9.5m/statevar.c	2006-12-03 14:21:53.000000000 +0000
@@ -3,7 +3,7 @@
  *	for getting and setting the values of the vile state variables,
  *	plus helper utility functions.
  *
- * $Header: /usr/build/vile/vile/RCS/statevar.c,v 1.98 2006/04/19 23:51:34 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/statevar.c,v 1.110 2006/12/03 14:21:53 tom Exp $
  */
 
 #include	"estruct.h"
@@ -210,18 +210,35 @@
 }
 
 static int
-any_REPL(TBUFF **rp, const char *vp, CHARTYPE type)
+any_CTYPE_MATCH(TBUFF **rp, const char *vp, CHARTYPE type)
 {
+    int whole_line = adjust_chartype(&type);
+
     if (rp) {
-	lgrabtext(rp, type);
+	(void) vl_ctype2tbuff(rp, type, whole_line);
 	return TRUE;
     } else if (vp && valid_buffer(curbp)) {
-	return lrepltext(type, vp, (int) strlen(vp));
+	return lrepl_ctype(type, vp, (int) strlen(vp));
     } else {
 	return FALSE;
     }
 }
 
+#if OPT_CURTOKENS
+static int
+any_REGEX_MATCH(TBUFF **rp, const char *vp, REGEXVAL * rexp)
+{
+    if (rp) {
+	(void) vl_regex2tbuff(rp, rexp, FALSE);
+	return TRUE;
+    } else if (vp && valid_buffer(curbp)) {
+	return lrepl_regex(rexp, vp, (int) strlen(vp));
+    } else {
+	return FALSE;
+    }
+}
+#endif
+
 #if OPT_HOOKS
 static int
 any_HOOK(TBUFF **rp, const char *vp, HOOK * hook)
@@ -526,6 +543,20 @@
 }
 #endif
 
+#if OPT_CURTOKENS
+int
+var_BUF_FNAME_EXPR(TBUFF **rp, const char *vp)
+{
+    return any_ro_STR(rp, vp, curbp->buf_fname_expr.vp->r->pat);
+}
+
+int
+var_BUFNAME(TBUFF **rp, const char *vp)
+{
+    return any_REGEX_MATCH(rp, vp, b_val_rexp(curbp, VAL_BUFNAME_EXPR));
+}
+#endif
+
 int
 var_CBUFNAME(TBUFF **rp, const char *vp)
 {
@@ -587,6 +618,8 @@
 int
 var_CHAR(TBUFF **rp, const char *vp)
 {
+    int status = FALSE;
+
     if (rp) {
 	if (valid_buffer(curbp) && !is_empty_buf(curbp)) {
 	    if (is_at_end_of_line(DOT))
@@ -596,25 +629,18 @@
 	} else {
 	    tb_scopy(rp, error_val);
 	}
-	return TRUE;
+	status = TRUE;
     } else if (vp) {
-	if (valid_buffer(curbp) && !b_val(curbp, MDVIEW)) {
-	    int s, c;
+	if ((status = check_editable(curbp)) == TRUE) {
+	    int c;
 	    mayneedundo();
 	    (void) ldelete(1L, FALSE);	/* delete 1 char */
 	    c = scan_int(vp);
-	    if (c == '\n')
-		s = lnewline();
-	    else
-		s = linsert(1, c);
-	    (void) backchar(FALSE, 1);
-	    return s;
-	} else {
-	    return rdonly();
+	    if ((status = bputc(c)) == TRUE)
+		(void) backchar(FALSE, 1);
 	}
-    } else {
-	return FALSE;
     }
+    return status;
 }
 
 #if OPT_ENCRYPT
@@ -933,7 +959,7 @@
 
 #if DISP_X11
 int
-var_ICONNAM(TBUFF **rp, const char *vp)
+var_ICONNAME(TBUFF **rp, const char *vp)
 {
     if (rp) {
 	tb_scopy(rp, x_get_icon_name());
@@ -947,11 +973,13 @@
 }
 #endif
 
+#if OPT_CURTOKENS
 int
-var_IDENTIF(TBUFF **rp, const char *vp)
+var_IDENTIFIER(TBUFF **rp, const char *vp)
 {
-    return any_REPL(rp, vp, vl_ident);
+    return any_REGEX_MATCH(rp, vp, b_val_rexp(curbp, VAL_IDENTIFIER_EXPR));
 }
+#endif
 
 int
 var_KBDMACRO(TBUFF **rp, const char *vp)
@@ -1019,7 +1047,7 @@
 int
 var_LINE(TBUFF **rp, const char *vp)
 {
-    return any_REPL(rp, vp, (CHARTYPE) 0);
+    return any_CTYPE_MATCH(rp, vp, (CHARTYPE) 0);
 }
 
 int
@@ -1261,11 +1289,13 @@
     return any_ro_STR(rp, vp, VILE_PATCHLEVEL);
 }
 
+#if OPT_CURTOKENS
 int
 var_PATHNAME(TBUFF **rp, const char *vp)
 {
-    return any_REPL(rp, vp, vl_pathn);
+    return any_REGEX_MATCH(rp, vp, b_val_rexp(curbp, VAL_PATHNAME_EXPR));
 }
+#endif
 
 int
 var_PENDING(TBUFF **rp, const char *vp)
@@ -1309,9 +1339,9 @@
 }
 
 int
-var_QIDENTIF(TBUFF **rp, const char *vp)
+var_QIDENTIFIER(TBUFF **rp, const char *vp)
 {
-    return any_REPL(rp, vp, vl_qident);
+    return any_CTYPE_MATCH(rp, vp, vl_qident);
 }
 
 #if OPT_HOOKS
@@ -1515,7 +1545,7 @@
 int
 var_WORD(TBUFF **rp, const char *vp)
 {
-    return any_REPL(rp, vp, vl_nonspace);
+    return any_CTYPE_MATCH(rp, vp, vl_nonspace);
 }
 
 #if OPT_HOOKS
Index: tags.c
Prereq:  1.134 
--- vile-9.5l+/tags.c	2006-11-06 21:00:51.000000000 +0000
+++ vile-9.5m/tags.c	2006-11-23 19:35:37.000000000 +0000
@@ -5,7 +5,7 @@
  *	the cursor.
  *	written for vile.  Copyright (c) 1990, 1995-2003 by Paul Fox
  *
- * $Header: /usr/build/vile/vile/RCS/tags.c,v 1.134 2006/11/06 21:00:51 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/tags.c,v 1.135 2006/11/23 19:35:37 tom Exp $
  *
  */
 #include "estruct.h"
@@ -875,7 +875,7 @@
 	    return (s);
 	taglen = b_val(curbp, VAL_TAGLEN);
     } else {
-	s = screen_string(tagname, sizeof(tagname), vl_ident);
+	s = screen_to_ident(tagname, sizeof(tagname));
 	taglen = 0;
     }
 
Index: trace.c
Prereq:  1.54 
--- vile-9.5l+/trace.c	2006-05-23 00:51:35.000000000 +0000
+++ vile-9.5m/trace.c	2006-11-23 16:06:58.000000000 +0000
@@ -1,7 +1,7 @@
 /*
  * debugging support -- tom dickey.
  *
- * $Header: /usr/build/vile/vile/RCS/trace.c,v 1.54 2006/05/23 00:51:35 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/trace.c,v 1.55 2006/11/23 16:06:58 tom Exp $
  *
  */
 
@@ -503,8 +503,8 @@
 	if (newp != 0) {
 	    unsigned limit = (amount > area[j].size) ? area[j].size : amount;
 	    TRACE(("memcpy %p .. %p to %p .. %p (%ld -> %d)\n",
-		   oldp, oldp + area[j].size - 1,
-		   newp, newp + area[j].size - 1,
+		   oldp, (char *) oldp + area[j].size - 1,
+		   newp, (char *) newp + area[j].size - 1,
 		   area[j].size, amount));
 	    memcpy(newp, oldp, limit);
 	    free(oldp);
Index: undo.c
Prereq:  1.90 
--- vile-9.5l+/undo.c	2006-11-06 21:00:51.000000000 +0000
+++ vile-9.5m/undo.c	2006-11-24 01:09:08.000000000 +0000
@@ -3,7 +3,7 @@
  *
  * written for vile.  Copyright (c) 1990, 1995-2001 by Paul Fox
  *
- * $Header: /usr/build/vile/vile/RCS/undo.c,v 1.90 2006/11/06 21:00:51 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/undo.c,v 1.91 2006/11/24 01:09:08 tom Exp $
  *
  */
 
@@ -329,6 +329,15 @@
     }
 }
 
+int
+check_editable(BUFFER *bp)
+{
+    int status = TRUE;
+    if (valid_buffer(bp) && b_val(bp, MDVIEW))
+	status = rdonly();
+    return status;
+}
+
 /* ARGSUSED */
 int
 undo(int f GCC_UNUSED, int n GCC_UNUSED)
@@ -338,9 +347,7 @@
 
     TRACE((T_CALLED "undo(%d,%d)\n", f, n));
 
-    if (b_val(curbp, MDVIEW)) {
-	status = rdonly();
-    } else {
+    if ((status = check_editable(curbp)) == TRUE) {
 	before = vl_line_count(curbp);
 	if ((status = undoworker(curbp->b_udstkindx)) == TRUE) {
 	    if (!line_report(before)) {
@@ -364,9 +371,7 @@
 
     n = need_at_least(f, n, 1);
 
-    if (b_val(curbp, MDVIEW)) {
-	status = rdonly();
-    } else {
+    if ((status = check_editable(curbp)) == TRUE) {
 	curbp->b_udstkindx ^= 1;	/* flip to other stack */
 	while ((status == TRUE) && n--) {
 	    if ((status = undoworker(curbp->b_udstkindx)) == TRUE) {
@@ -391,9 +396,7 @@
 
     n = need_at_least(f, n, 1);
 
-    if (b_val(curbp, MDVIEW)) {
-	status = rdonly();
-    } else {
+    if ((status = check_editable(curbp)) == TRUE) {
 	while ((status == TRUE) && n--) {
 	    status = undoworker(BACK);
 	    if (status) {
@@ -417,9 +420,7 @@
 
     n = need_at_least(f, n, 1);
 
-    if (b_val(curbp, MDVIEW)) {
-	status = rdonly();
-    } else {
+    if ((status = check_editable(curbp)) == TRUE) {
 	while ((status == TRUE) && n--) {
 	    status = undoworker(FORW);
 	    if (status) {
Index: vile-9.5.spec
Prereq:  1.13 
--- vile-9.5l+/vile-9.5.spec	2006-10-02 23:18:55.000000000 +0000
+++ vile-9.5m/vile-9.5.spec	2006-11-23 14:25:04.000000000 +0000
@@ -1,7 +1,7 @@
 Summary: VILE VI Like Emacs editor
-# $Header: /usr/build/vile/vile-9.5k2/RCS/vile-9.5.spec,v 1.13 2006/10/02 23:18:55 tom Exp $
+# $Header: /usr/build/vile/vile/RCS/vile-9.5.spec,v 1.14 2006/11/23 14:25:04 tom Exp $
 Name: vile
-Version: 9.5l
+Version: 9.5m
 # each patch should update the version
 Release: 1
 Copyright: GPL
@@ -20,6 +20,7 @@
 Patch10: vile-9.5j.patch.gz
 Patch11: vile-9.5k.patch.gz
 Patch12: vile-9.5l.patch.gz
+Patch13: vile-9.5m.patch.gz
 # each patch should add itself to this list
 Packager: Thomas Dickey <dickey@invisible-island.net>
 BuildRoot: %{_tmppath}/%{name}-root
@@ -44,6 +45,7 @@
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 # each patch should add itself to this list
 
 %build
@@ -96,8 +98,11 @@
 %changelog
 # each patch should add its ChangeLog entries here
 
+* Thu Nov 23 2006 Thomas Dickey
+- added patch for 9.5m
+
 * Mon Oct 02 2006 Thomas Dickey
-- added patch for 9.5k
+- added patch for 9.5l
 
 * Sun Aug 13 2006 Thomas Dickey
 - added patch for 9.5k
Index: vile.hlp
Prereq:  1.616 
--- vile-9.5l+/vile.hlp	2006-11-01 21:21:16.000000000 +0000
+++ vile-9.5m/vile.hlp	2006-12-13 01:33:06.000000000 +0000
@@ -1303,6 +1303,11 @@
 		or via .Xdefaults.  See notes about the color palette down
 		below, under DOS specifics.  (U)
 
+	bufname-expr Regular expression used for parsing of $bufname, subject
+		to the cursor-tokens mode.  If the expression is inactive, use
+		character-class based internal function which combines buffer-
+		and filename-classes.  This is a buffer mode.  (B)
+
 	ccolor	On systems supporting this, will set the cursor color.
 		On most systems, the choice of colors is fixed, although the
 		X11 version (xvile) can be given customized colors at startup
@@ -1377,6 +1382,16 @@
 		reachable with the '}' and '{' motions.  A pattern that
 		consists of an empty comment line usually works well.  (B)
 
+	cursor-tokens Controls whether vile uses regular expressions or
+		character classes for parsing tokens from the screen for
+		various commands.  This uses an enumeration:  both, cclass and
+		regex.  If "both", vile tries matching first with the regular
+		expresion, e.g., bufname-expr for $bufname, and if that does
+		not match anything, uses the character-classes.  The main
+		reason for providing the "both" option is that the older
+		character-class based parsing for buffer name does not
+		correspond exactly to a regular expression.  (B)
+
 	dirc	Causes vile to check each name when scanning directories for
 		filename completion.  This is slower, but provides additional
 		information allowing you to distinguish between directory and
@@ -1517,6 +1532,14 @@
 		visible.  If not set, then only the current line will shift,
 		which may be desirable on slower displays. (W)
 
+	identifier-expr Regular expression used for parsing of $identifier,
+		which also corresponds to the pattern under the cursor used in
+		tags and "screen-search-pattern-grab", etc., subject to the
+		cursor-tokens mode.  If the expression is inactive, use
+		character-class, e.g., the equivalent of
+			\<[[:ident:]]\+\>
+		This is a buffer mode.  (B)
+
 	ignorecase (ic) Text searches normally match the pattern exactly.
 		With this set, searches are case-insensitive. (B)
 
@@ -1647,6 +1670,13 @@
 	paragraphs A regular expression defining where the "next-paragraph"
 		('}') and "previous-paragraph" ('{') commands will go. (B)
 
+	pathname-expr Regular expression used for parsing of $pathname, which
+		is expanded by ":" (or "&") in the minibuffer, subject to the
+		cursor-tokens mode.  If the expression is inactive, use
+		character-class, e.g., the equivalent of
+			\<[[:file:]]\+\>
+		This is a buffer mode.  (B)
+
 	percent-crlf Percentage of total lines which must end with CR/LF for
 		vile to automatically convert buffer's recordseparator to
 		crlf.  (B)
@@ -1807,6 +1837,10 @@
 	showram (sr) Displays the amount of ram currently allocated at the
 		end of the message line. (not in all versions) (U)
 
+	showvariables (sv) If set, causes the [Variables] buffer which is
+		created by the "show-variables" command to be updated each
+		time the screen is updated.  (W)
+
 	sideways  Will prompt for a new value for the sideways scroll offset,
 		which allow display of a section of code normally off the
 		screen to the right.  Also affected by the ^X-^R and ^X-^L
@@ -2176,21 +2210,21 @@
 	columns) are
 
 		arg	ex-style line range: 1,$ or 13,15 or % etc.
-		ctl	control character
+		ctl	[:cntrl:] control character
 		del	delete/backspace
 		fn	fence character, e.g., "{" or "}"
-		id	normal identifier, used for word boundaries
-		lwr	lowercase, e.g., "a"
-		nsp	nonspace
-		num	digit, e.g., "0"
-		path	file/path name
-		prn	printable
-		pun	punctuation
+		id	[:ident:] normal identifier, used for word boundaries
+		lwr	[:lower:] lowercase, e.g., "a"
+		nsp	[:graph:] nonspace
+		num	[:digit:] digit, e.g., "0"
+		path	[:file:] file/path name
+		prn	[:print:] printable
+		pun	[:punct:] punctuation
 		qid	qualified identifiers, used in tags parsing
 		sh	may appear in shell/pipe
-		sp	space
+		sp	[:blank:] space
 		tmp	legal in scratch-buffer names
-		upr	uppercase, e.g., "A"
+		upr	[:upper:] uppercase, e.g., "A"
 		wld	shell wildcard, e.g., "*"
 
 	You can also reset the table to its initial state using
@@ -2759,7 +2793,9 @@
 	$blines		number of lines in current buffer	(read only)
 	$brightness	RGB levels for gray, normal, bright in the 0-255 range
 			(winvile version only)
+	$buf-fname-expr	combined buffer+fname expression (read only)
 	$buffer-hook	name of procedure to run when switching to a buffer
+	$bufname        current buffer-name under the cursor.
 	$bwindows	number of windows open on current buffer(read only)
 	$cbufname	current buffer name
 	$cdpath		editor's copy of the $CDPATH env var (read/write)
@@ -2814,7 +2850,7 @@
 	$forward-search	search direction, true=forward
 	$helpfile	$VILE_HELP_FILE env var or "vile.hlp"   (read/write)
 	$iconname	current icon name (X11 version only)
-	$identifier	current punctuated word
+	$identifier     current "identifier-like" word under the cursor.
 	$kbd-macro	the keyboard macro, see ^X-( ^X-)	(read only)
 	$kill		some of the kill register		(read only)
 	$lastkey	last keyboard char struck
@@ -2842,7 +2878,7 @@
 	$palette	current palette string
 	$patchlevel	current patch-level (empty for release)	(read only)
 	$pathlist-separator separator for lists of pathnames, e.g., $PATH
-	$pathname	current path-like word
+	$pathname       current "path-like" word, under the cursor.
 	$pathname-separator separator for levels of pathnames, e.g., '/'
 	$pending	typeahead pending flag			(read only)
 	$pid		returns vile's process-id		(read only)
@@ -3337,20 +3373,23 @@
 	other significance (matching that character)."
 
  \< \>	In addition, vile atoms may be: \< and \>, which match the
- \s \S	beginning and end of a "word".
+      	beginning and end of a "word".
 
-	Vile recognizes the X/Open regular expression character
-	classes, as well as shorthand expressions for them.  You can use
-	the shorthand expressions in a range or as an atom.  Each shorthand
-	expression has a complement, e.g., \w and \W.
+	Vile recognizes the X/Open regular expression character classes (and
+	additional character classes), as well as shorthand expressions for
+	them.  You can use the shorthand expressions in a range or as an atom. 
+	Each shorthand expression has a complement, e.g., \w and \W.
 
- \w \W	[:alnum:], alphanumeric (plus '_')
+ \i \I	[:alnum:]
  \a \A	[:alpha:]
  \b \B	[:blank:]
  \c \C	[:cntrl:]
  \d \D	[:digit:]
+ \f \F	[:file:]
  \g \G	[:graph:]
+ \w \W	[:ident:], alphanumeric (plus '_')
  \l \L	[:lower:]
+ \o \O	[:octal:]
  \p \P	[:print:], printable (note that space is printable)
  \q \Q	[:punct:]
  \s \S	[:space:]
@@ -3494,17 +3533,39 @@
 	VILE_HELP_FILE
 		override the name of the help file, normally "vile.hlp".
 		This sets the $helpfile variable.
+
 	VILE_LIBDIR_PATH
 		override the search path for filter programs, normally the
 		library-directory on UNIX systems.  This sets the
 		$libdir-path variable, which is appended to your $PATH
 		variable when running filter commands on UNIX and Win32.
+
 	VILE_PWD
 		if set, assume invoking shell's "$PWD" variable is valid,
 		and use that rather than an initial getcwd() call.
+
+	VILE_NROFF_FILT
+		if set, overrides the choice between "nroff" and "cawf"
+		(depending on platform) in the ShowFormatted macro (^X-n).  You
+		may want to set this to "groff" if your system has groff
+		installed, for instance, but relies on an antique version of
+		nroff for manpages.
+
+	VILE_SPELL_FILT
+		if set, overrides the compiled-in program name and options
+		for the spell-filter.  Normally that is a string such as
+			"spell -l"
+
+	VILE_TABLE_FILT
+		if set, indicates that "tbl" is available.
+		Set this to "cat" if you do not want to use "tbl",
+		but do want to use "nroff", etc (see VILE_NROFF_FILT).
+		It is used in the ShowFormatted macro (^X-n).
+
 	VILE_STARTUP_FILE
 		override the name of the startup file, normally ".vilerc"
 		(or "vile.rc" for non-UNIX systems).
+
 	VILE_STARTUP_PATH
 		override the search path for the startup and help files.
 		This sets the $startup-path variable.
@@ -3520,16 +3581,19 @@
 
 	Command line options
 	--------------------
-	The command line options are fairly straightforward.  vile does not
-	support running just _any_ command after a '+', as does vi, but
-	does support the commonly used '+400' to go to line 400 and '+/foo'
-	to search for foo.  Command files can be explicitly executed on
-	startup by prefixing them with the '@' character, as in "vile
-	@mycmds file.c".  This will suppress the operation of VILEINIT and
-	the .vilerc files.
+	The command line options are fairly straightforward.  vile supports
+	running just _any_ command after a '+', as does vi.  It also has some
+	shortcut options to support the commonly used '+400' to go to line 400
+	and '+/foo' to search for foo.  Command files can be explicitly
+	executed on startup by prefixing them with the '@' character, as in
+	"vile @mycmds file.c".  This will suppress the operation of VILEINIT
+	and the .vilerc files.
 
 	Use "vile -?" to get the usage message.
 
+	-c command will execute the given command after loading the first
+		file.
+
 	+NNN and -gNNN  vile will begin the session on the first file
 		at the specified line number.
 
@@ -6262,4 +6326,4 @@
 
 Copyright 1995-2005,2006 by Paul Fox, Thomas Dickey, and Kevin Buettner
 --------------------------------------------------------------------
- $Header: /usr/build/vile/vile/RCS/vile.hlp,v 1.616 2006/11/01 21:21:16 tom Exp $
+ $Header: /usr/build/vile/vile/RCS/vile.hlp,v 1.626 2006/12/13 01:33:06 tom Exp $
Index: vl_ctype.h
Prereq:  1.4 
--- vile-9.5l+/vl_ctype.h	2005-11-30 00:31:04.000000000 +0000
+++ vile-9.5m/vl_ctype.h	2006-11-24 13:54:07.000000000 +0000
@@ -1,9 +1,9 @@
 /*
- * $Header: /usr/build/vile/vile/RCS/vl_ctype.h,v 1.4 2005/11/30 00:31:04 tom Exp $
+ * $Header: /usr/build/vile/vile/RCS/vl_ctype.h,v 1.7 2006/11/24 13:54:07 tom Exp $
  *
  * Character-type tests, like <ctype.h> for vile (vi-like-emacs).
  *
- * Copyright 2005, Thomas E. Dickey
+ * Copyright 2005,2006 Thomas E. Dickey
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the
@@ -139,8 +139,8 @@
 #define vlCTYPE(c)	vl_chartypes_[CharOf(c)]
 #define istype(m,c)	((vlCTYPE(c) & (m)) != 0)
 
-#define isAlnum(c)	istype(vl_lower|vl_upper|vl_digit, c)
-#define isAlpha(c)	istype(vl_lower|vl_upper, c)
+#define isAlnum(c)	istype(vl_lower | vl_upper | vl_digit, c)
+#define isAlpha(c)	istype(vl_lower | vl_upper, c)
 #define isCntrl(c)	istype(vl_cntrl, c)
 #define isDigit(c)	istype(vl_digit, c)
 #define isLower(c)	istype(vl_lower, c)
@@ -153,7 +153,7 @@
 #define isfence(c)	istype(vl_fence, c)
 #define isident(c)	istype(vl_ident, c)
 #define isqident(c)	istype(vl_qident, c)
-#define islinespecchar(c)	istype(vl_linespec, c)
+#define islinespec(c)	istype(vl_linespec, c)
 #define ispath(c)	istype(vl_pathn, c)
 #define iswild(c)	istype(vl_wild, c)
 
@@ -162,15 +162,15 @@
 
 #define	isGraph(c)	(!isSpecial(c) && !isSpace(c) && isPrint(c))
 
-/* DIFCASE represents the difference between upper
-   and lower case letters, DIFCNTRL the difference between upper case and
-   control characters.	They are xor-able values.  */
+/* DIFCASE represents the difference between upper and lower case letters,
+   DIFCNTRL the difference between upper case and control characters.
+   They are xor-able values.  */
 #define	DIFCASE		0x20
 #define	DIFCNTRL	0x40
 #define toUpper(c)	vl_uppercase[CharOf(c)]
 #define toLower(c)	vl_lowercase[CharOf(c)]
-#define tocntrl(c)	(((unsigned)(c))^DIFCNTRL)
-#define toalpha(c)	(((unsigned)(c))^DIFCNTRL)
+#define tocntrl(c)	(((unsigned)(c)) ^ DIFCNTRL)
+#define toalpha(c)	(((unsigned)(c)) ^ DIFCNTRL)
 
 #else
 
@@ -188,9 +188,11 @@
 # define isUpper(c)	isupper(c)
 # define toUpper(c)	toupper(c)
 # define toLower(c)	tolower(c)
-# define isident(c)     isalnum(c)
 # define isXDigit(c)	isxdigit(c)
 
+# define isident(c)     (isalnum(c) || (c) == '_')
+# define ispath(c)      (isalnum(c) || (c) == '/' || (c) == '\\' || (c) == '~')
+
 #endif
 
 /* macro for cases where return & newline are equivalent */