diff -cN 7.2.6-a1/glob.c 7.2.6-a2/glob.c
*** 7.2.6-a1/glob.c	Sun Jul  9 12:52:43 1995
--- 7.2.6-a2/glob.c	Sun Jul  9 12:37:19 1995
***************
*** 191,196 ****
--- 191,198 ----
      return catv(s1, v1, s2, v2);
  }
  
+ #endif /* TEST */
+ 
  /*
   * Speedier vector append when sizes are known
   */
***************
*** 279,286 ****
      return strcmp(*p1, *p2);
  }
  
- #endif /* TEST */
- 
  /*
   * Remove duplicate entries in a sorted array, usually the result of qsort.
   * Returns the number of unique entries, or -1 on error.
--- 281,286 ----
***************
*** 472,489 ****
  static int
  xglob(buf, b, pat1, pat2, exp)
  char *buf, *b;
! const char *pat1, *pat2;
  char ***exp;
  {
      while (*pat1) {
  	if (index(FMETA, *pat1))
  	    return 0;
! 	else if (*pat1 == QNXT && pat1[1])
  	    pat1++;
  	*b++ = *pat1++;
      }
      if (pat2) {
! 	*b++ = SLASH;
  	while (*pat2) {
  	    if (index(FMETA, *pat2))
  		return 0;
--- 472,489 ----
  static int
  xglob(buf, b, pat1, pat2, exp)
  char *buf, *b;
! char *pat1, *pat2;
  char ***exp;
  {
      while (*pat1) {
  	if (index(FMETA, *pat1))
  	    return 0;
! 	else if (*pat1 == '\\' && pat1[1])
  	    pat1++;
  	*b++ = *pat1++;
      }
      if (pat2) {
! 	*b++ = '/';
  	while (*pat2) {
  	    if (index(FMETA, *pat2))
  		return 0;
***************
*** 526,532 ****
      }
      skip = b - buf; /* We know this much matches, don't glob it again */
      while (ret >= 0 && (dp = readdir(dirp))) {
- 	/* XXX casting away const */
  	if (fglob(dp->d_name, pat1)) {
  	    hits++;
  	    if (pat2) {
--- 526,531 ----
diff -cN 7.2.6-a1/hdrs.c 7.2.6-a2/hdrs.c
*** 7.2.6-a1/hdrs.c	Sun Jul  9 12:52:43 1995
--- 7.2.6-a2/hdrs.c	Sun Jul  9 12:42:17 1995
***************
*** 51,63 ****
   * so get them all and "cat" them together into the static buffer
   * "buf" and return its address.
   */
  char *
  real_header_field(n, str)
  char *str;
  {
-     static char    buf[HDRSIZ];
      char 	   tmp[HDRSIZ];
!     register char  *p, *p2, *b = buf;
      int contd_hdr;  /* true if next line is a continuation of the hdr we want */
  
      /* use msg_get as a test for fseek() -- don't let it fgets() (pass 0) */
--- 51,64 ----
   * so get them all and "cat" them together into the static buffer
   * "buf" and return its address.
   */
+ static char    buf_header_field[HDRSIZ];
+ 
  char *
  real_header_field(n, str)
  char *str;
  {
      char 	   tmp[HDRSIZ];
!     register char  *p, *p2, *b = buf_header_field;
      int contd_hdr;  /* true if next line is a continuation of the hdr we want */
  
      /* use msg_get as a test for fseek() -- don't let it fgets() (pass 0) */
***************
*** 74,94 ****
  		continue;
  	    else
  		contd_hdr = 1;
! 	    if (b > buf && (b - buf) < sizeof buf - 2)
  		*b++ = ',';
  	} else if (!contd_hdr)
  	    continue;
  	skipspaces(0);
  	(void) no_newln(p);
! 	if (strlen(p) + (b - buf) < sizeof buf - 1) {
! 	    if (b > buf)
  		*b++ = ' ';
  	    b += Strcpy(b, p);
  	}
      }
!     if (b > buf && *--b == ',')
  	*b = 0;
!     return (*buf)? buf: NULL;
  }
  
  char *
--- 75,96 ----
  		continue;
  	    else
  		contd_hdr = 1;
! 	    if (b > buf_header_field &&
! 		(b - buf_header_field) < sizeof buf_header_field - 2)
  		*b++ = ',';
  	} else if (!contd_hdr)
  	    continue;
  	skipspaces(0);
  	(void) no_newln(p);
! 	if (strlen(p) + (b - buf_header_field) < sizeof buf_header_field - 1) {
! 	    if (b > buf_header_field)
  		*b++ = ' ';
  	    b += Strcpy(b, p);
  	}
      }
!     if (b > buf_header_field && *--b == ',')
  	*b = 0;
!     return (*buf_header_field)? buf_header_field: NULL;
  }
  
  char *
***************
*** 97,113 ****
  {
      register char *p, *q;
  
!     if (!lcase_strcmp(str, "from")) {
  	if (!(p = q = msg[n].m_from))
  	    p = real_header_field(n, str);
        	if (p == NULL) return NULL;
  	if (q == NULL) msg[n].m_from = savestr(p);
!     } else if (!lcase_strcmp(str, "subject")) {
  	if (!(p = q = msg[n].m_subject))
  	    p = real_header_field(n, str);
  	if (p == NULL) return NULL;
  	if (q == NULL) msg[n].m_subject = savestr(p);
!     } else if (!lcase_strcmp(str, "to")) {
  	if (!(p = q = msg[n].m_to))
  	    p = real_header_field(n, str);
  	if (p == NULL) return NULL;
--- 99,115 ----
  {
      register char *p, *q;
  
!     if (!lcase_strncmp(str, "from", -1)) {
  	if (!(p = q = msg[n].m_from))
  	    p = real_header_field(n, str);
        	if (p == NULL) return NULL;
  	if (q == NULL) msg[n].m_from = savestr(p);
!     } else if (!lcase_strncmp(str, "subject", -1)) {
  	if (!(p = q = msg[n].m_subject))
  	    p = real_header_field(n, str);
  	if (p == NULL) return NULL;
  	if (q == NULL) msg[n].m_subject = savestr(p);
!     } else if (!lcase_strncmp(str, "to", -1)) {
  	if (!(p = q = msg[n].m_to))
  	    p = real_header_field(n, str);
  	if (p == NULL) return NULL;
***************
*** 115,121 ****
      } else
  	p = real_header_field(n,str);
  
!     return p;
  }
  
  do_hdrs(argc, argv, list)
--- 117,123 ----
      } else
  	p = real_header_field(n,str);
  
!     return !p || p == buf_header_field ? p : strcpy(buf_header_field,p);
  }
  
  do_hdrs(argc, argv, list)
diff -cN 7.2.6-a1/makefile.solaris 7.2.6-a2/makefile.solaris
*** 7.2.6-a1/makefile.solaris	Sun Jul  9 12:52:51 1995
--- 7.2.6-a2/makefile.solaris	Sun Jul  9 12:37:54 1995
***************
*** 1,7 ****
  #
  # Mush makefile for Solaris with gcc 2.5.8
  #
! CC=gcc
  HDRS1= mush.h config.h
  HDRS2= strings.h options.h
  HDRS3= bindings.h glob.h
--- 1,7 ----
  #
  # Mush makefile for Solaris with gcc 2.5.8
  #
! CC=gcc -traditional
  HDRS1= mush.h config.h
  HDRS2= strings.h options.h
  HDRS3= bindings.h glob.h
***************
*** 26,32 ****
  #
  CFLAGS= 	-g -DSYSV -DUSG -DCURSES -DSIGRET=void -DSVR4 -DREGCMP
  LDFLAGS=	-g
! LIBS= 		-L/usr/ccs/lib -lcurses -lgen -ltermlib
  OTHERLIBS=
  # Use some variant of this one if you #define MMDF in config.h
  #OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
--- 26,32 ----
  #
  CFLAGS= 	-g -DSYSV -DUSG -DCURSES -DSIGRET=void -DSVR4 -DREGCMP
  LDFLAGS=	-g
! LIBS= 		-L/usr/ccs/lib -lcurses -lgen -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a
  OTHERLIBS=
  # Use some variant of this one if you #define MMDF in config.h
  #OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
diff -cN 7.2.6-a1/msgs.c 7.2.6-a2/msgs.c
*** 7.2.6-a1/msgs.c	Sun Jul  9 12:52:46 1995
--- 7.2.6-a2/msgs.c	Sun Jul  9 12:35:42 1995
***************
*** 171,177 ****
  	}
  
  	if (ison(flags, UPDATE_STATUS))
! 	    if (!lscase_strncmp(line, "Status:", 7) ||
  		    !lcase_strncmp(line, "Priority:", 9))
  		continue; /* ignore "Status" and "Priority" lines */
  	    else if (!on_hdr) {
--- 171,177 ----
  	}
  
  	if (ison(flags, UPDATE_STATUS))
! 	    if (!lcase_strncmp(line, "Status:", 7) ||
  		    !lcase_strncmp(line, "Priority:", 9))
  		continue; /* ignore "Status" and "Priority" lines */
  	    else if (!on_hdr) {
diff -cN 7.2.6-a1/mush.h 7.2.6-a2/mush.h
*** 7.2.6-a1/mush.h	Sun Jul  9 12:52:48 1995
--- 7.2.6-a2/mush.h	Sun Jul  9 12:35:41 1995
***************
*** 422,428 ****
  #define set_isread(n)	  \
  	(ison(glob_flags, READ_ONLY)? turnoff(msg[n].m_flags, UNREAD) : \
  	(turnon(msg[n].m_flags, DO_UPDATE) && ison(msg[n].m_flags, UNREAD)? \
! 	    turnon(glob_flags, DO_UPDATE), turnoff(msg[n].m_flags, UNREAD)))
  
  #define in_pipe() (ison(glob_flags, DO_PIPE|IS_PIPE))
  #define in_macro() (ison(glob_flags, LINE_MACRO|IN_MACRO))
--- 422,429 ----
  #define set_isread(n)	  \
  	(ison(glob_flags, READ_ONLY)? turnoff(msg[n].m_flags, UNREAD) : \
  	(turnon(msg[n].m_flags, DO_UPDATE) && ison(msg[n].m_flags, UNREAD)? \
! 	    turnon(glob_flags, DO_UPDATE), turnoff(msg[n].m_flags, UNREAD) : \
! 	    (u_long)0))
  
  #define in_pipe() (ison(glob_flags, DO_PIPE|IS_PIPE))
  #define in_macro() (ison(glob_flags, LINE_MACRO|IN_MACRO))
***************
*** 493,499 ****
  #define HELP_TEXT   ULBIT(25) /* create textsw frame for paging help messages */
  #define CORRUPTED   ULBIT(26) /* error loading new mail has occurred */
  
! #define DONT_CHECK  (DO_SHELL|IS_PIPE|IGN_SIGS|IS_GETTING|READ_ONLY|REDIRECT|CNTD_CMD|IS_SENDING|IN_MACRO)
  
  /* flags to control composition */
  #define VERBOSE		ULBIT(0)  /* verbose flag for sendmail */
--- 494,500 ----
  #define HELP_TEXT   ULBIT(25) /* create textsw frame for paging help messages */
  #define CORRUPTED   ULBIT(26) /* error loading new mail has occurred */
  
! #define DONT_CHECK  (DO_PIPE|IS_PIPE|IGN_SIGS|IS_GETTING|READ_ONLY|REDIRECT|CNTD_CMD|IS_SENDING|IN_MACRO)
  
  /* flags to control composition */
  #define VERBOSE		ULBIT(0)  /* verbose flag for sendmail */
diff -cN 7.2.6-a1/pmush.c 7.2.6-a2/pmush.c
*** 7.2.6-a1/pmush.c	Sun Jul  9 12:52:48 1995
--- 7.2.6-a2/pmush.c	Sun Jul  9 12:44:33 1995
***************
*** 16,25 ****
  #include "mush.h"
  #include "pop.h"
  
  /*
   * strstr - find first occurrence of wanted in s
   */
- 
  char *				/* found string, or NULL if none */
  strstr(s, wanted)
  char *s;
--- 16,25 ----
  #include "mush.h"
  #include "pop.h"
  
+ #if !(defined(sun) && defined(SVR4) || defined(__STDC__))
  /*
   * strstr - find first occurrence of wanted in s
   */
  char *				/* found string, or NULL if none */
  strstr(s, wanted)
  char *s;
***************
*** 41,46 ****
--- 41,47 ----
  	    return NULL;
      return scan;
  }
+ #endif
  
  /* This routine forms the header line for the From and Date functions below.
   * It was written by John Kammens for use by UCSC's version of UCBmail running
diff -cN 7.2.6-a1/pop.c 7.2.6-a2/pop.c
*** 7.2.6-a1/pop.c	Sun Jul  9 12:52:49 1995
--- 7.2.6-a2/pop.c	Sun Jul  9 12:41:53 1995
***************
*** 152,157 ****
--- 152,158 ----
  {
      int sock;
      PopServer server;
+     char buf[256];
  
      /* Determine the user name */
      if (!username) {
***************
*** 261,267 ****
  	return (0);
      }
      sprintf(buf, "PASS %s", password);
-     mailserver_SetPassword(mserv, password);
      if (sendline(server, buf) || getok(server)) {
  	/* pf Fri Feb 18 11:36:16 1994
  	 * this is a hack but it works.. make sure the error string
--- 262,267 ----
***************
*** 270,276 ****
  	 */
  	if (strstr(pop_error, "assword")) {
  	    strcpy(pop_error, "-ERR invalid password");
- 	    mailserver_UnsetPassword(mserv);
  	}
      	pop_close(server);
  	return (0);
--- 270,275 ----
***************
*** 299,305 ****
      sprintf(buf, "TOP %d %d", msgnum, lines);
      if (sendline(pserv, buf) ||  getok(pserv))
  	return (-1);
!     while (TRUE) {
  	if (!(p = getline(pserv)))
  	    return (-1);
  	if (p[0] == '.' && !p[1])
--- 298,304 ----
      sprintf(buf, "TOP %d %d", msgnum, lines);
      if (sendline(pserv, buf) ||  getok(pserv))
  	return (-1);
!     while (1) {
  	if (!(p = getline(pserv)))
  	    return (-1);
  	if (p[0] == '.' && !p[1])
diff -cN 7.2.6-a1/sort.c 7.2.6-a2/sort.c
*** 7.2.6-a1/sort.c	Sun Jul  9 12:52:49 1995
--- 7.2.6-a2/sort.c	Sun Jul  9 12:43:09 1995
***************
*** 170,177 ****
      char buf1[HDRSIZ], buf2[HDRSIZ];
      int retval;
  
!     (void) author_to(msg1 - msg, buf1);
!     (void) author_to(msg2 - msg, buf2);
      Debug("author: msg %d: %s, msg %d: %s\n", msg1-msg, buf1, msg2-msg, buf2);
      if (ignore_case)
  	retval = lcase_strncmp(buf1, buf2, -1) * order;
--- 170,177 ----
      char buf1[HDRSIZ], buf2[HDRSIZ];
      int retval;
  
!     (void) reply_to(msg1 - msg, 0, buf1);
!     (void) reply_to(msg2 - msg, 0, buf2);
      Debug("author: msg %d: %s, msg %d: %s\n", msg1-msg, buf1, msg2-msg, buf2);
      if (ignore_case)
  	retval = lcase_strncmp(buf1, buf2, -1) * order;
diff -cN 7.2.6-a1/strings.c 7.2.6-a2/strings.c
*** 7.2.6-a1/strings.c	Sun Jul  9 12:52:50 1995
--- 7.2.6-a2/strings.c	Sun Jul  9 12:37:36 1995
***************
*** 57,65 ****
  
  static int
  chk_one_item(item, len, list, delimiters)
!     const char *item;
!     char *list, *delimiters;
!     int len;
  {
      char *p;
  
--- 57,65 ----
  
  static int
  chk_one_item(item, len, list, delimiters)
! char *item;
! char *list, *delimiters;
! int len;
  {
      char *p;
  
diff -cN 7.2.6-a1/version.h 7.2.6-a2/version.h
*** 7.2.6-a1/version.h	Sun Jul  9 12:52:50 1995
--- 7.2.6-a2/version.h	Sun Jul  9 12:47:34 1995
***************
*** 1,7 ****
  /* @(#)version.h	(c) Copyright 1989, 1990, 1991 (Dan Heller) */
  
  #define MUSHNAME	"Mail User's Shell"
! #define RELEASE_DATE	"alpha 7/5/95"
  #define RELEASE		7
  #define REVISION	"2"
  #define PATCHLEVEL	6
--- 1,7 ----
  /* @(#)version.h	(c) Copyright 1989, 1990, 1991 (Dan Heller) */
  
  #define MUSHNAME	"Mail User's Shell"
! #define RELEASE_DATE	"alpha(2) 7/9/95"
  #define RELEASE		7
  #define REVISION	"2"
  #define PATCHLEVEL	6