(REPOST) Mush 6.4 to 6.5 Patch Kit, Part 6

Barton E. Schaefer schaefer at ogccse.ogc.edu
Fri May 5 10:18:20 AEST 1989


[ Ooops.  I reposted Part 5 to comp.sources.d instead of bugs.
  I'll post this one to both, and repost Part 5 to bugs.  Sorry. ]

Since this piece of the patch is smaller, it seems a good place for some
editorial remarks.  As has been noted, the first 5 parts are the original
kit (or as much so as there can be an original of something that started
out as one 20k file and has turned into a 200k 6-part monster), and this
file represents some late-breaking but important bug fixes.

This kit has been posted with the full knowledge and consent of Dan Heller.
He just happens to be too busy right now to organize it.  (Actually, *I'm*
too busy right now to organize it either, and I sincerely hope that it is
just about finished consuming my spare time.  But having got started it's
hard to quit.)  This patch kit takes care of all currently known bugs in
mush 6.4, but it also throws in some new features, which may of course
have bugs of their own.

If you have general questions, comments, or even bug reports, there is
currently a mush mailing list: mush-users at garp.mit.edu, subscription
requests to mush-users-request at garp.mit.edu -- and there may soon be a
mush newsgroup: comp.mail.mush -- and some mush discussion appears on
comp.mail.misc.  Or just blaze away to Dan or me; obviously, considering
the monster we've created, we must *like* to get E-mail. :-) :-/ :-o
However, we encourage use of the mailing list and/or newsgroups first,
so that (a) bugs become general knowledge, both to cut down duplicate bug
reports and so they can be avoided by other users; (b) other mush users
have a chance to share their insights; (c) when questions are answered,
the largest possible audience sees the answers, cutting down repetition.

A complete copy of mush-6.5 can be obtained by anonymous ftp from
ucbvax.berkeley.edu, as a compressed tar file.  The file is mush-6.5.tar.Z
in directory pub.  This copy will be kept reasonably up-to-date as bug
fixes are made.  If you do not have ftp access, send mail to Dan Heller at
one of the addresses below -- he will be handling mailed copies.

				Bart Schaefer <schaefer at cse.ogc.edu>
				Dan Heller <island!argv at cad.berkeley.edu>
					or <dheller at cory.berkeley.edu>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Part 6 of the Mush 6.5 Upgrade Kit.  Read the instructions in part 1.
---------------------------------------------------------------------------
Prereq: Part5
*** mush-6.4/kit.check	Tue Apr 18 17:29:04 1989
--- kit.check	Tue Apr 18 17:29:04 1989
***************
*** 1 ****
!  Part5 
--- 1 ----
!  Part5-check 
*** phase2/README-6.5	Fri Apr 28 10:48:15 1989
--- README-6.5	Fri Apr 28 10:48:04 1989
***************
*** 1,7 ****
  Changes/bugfixes in Mush 6.5 from 6.4:
  --------------------------------------
  
! Changed VERSION to 6.5 and date to 4/03/89.
  
  [mmdf and suntools specific changes are at the bottom]
  
--- 1,7 ----
  Changes/bugfixes in Mush 6.5 from 6.4:
  --------------------------------------
  
! Changed VERSION to 6.5 and date to 4/17/89.
  
  [mmdf and suntools specific changes are at the bottom]
  
*** phase2/mush.1	Tue Apr 18 09:26:39 1989
--- mush.1	Fri Apr 21 13:19:10 1989
***************
*** 94,100 ****
  .I Mush
  (full word forms in parentheses):
  .TP
! \-b
  (\-blindcarbon, \-blind)
  The list of Blind Carbon Copy recipients is set on the command line.
  If more than one address or an address containing spaces is specified, the
--- 94,100 ----
  .I Mush
  (full word forms in parentheses):
  .TP
! \-b bcc-list
  (\-blindcarbon, \-blind)
  The list of Blind Carbon Copy recipients is set on the command line.
  If more than one address or an address containing spaces is specified, the
***************
*** 3174,3179 ****
--- 3174,3181 ----
  Neither the user or the hostname needs to match; only the domain name must
  be required to match.
  .RE
+ .\" Nroff note: RE takes us all the way out of TP, so step back in again.
+ .RS
  .sp
  Example:
  .sp
***************
*** 3237,3242 ****
--- 3239,3245 ----
  .sp
  Note that mail sent via redirection from the calling shell will not
  sign letters or append fortunes.
+ .RE
  .TP
  .B cdpath
  (String)
***************
*** 3300,3327 ****
  .B edit_hdrs
  (Boolean)
  When in letter-composition mode (via \fBmail\fR or \fBreply\fR, etc),
! the headers of the outgoing message is stored in the same buffer as
! the text of the letter.  So, if the editor is called to edit the message
! buffer, the headers of the message can be edited as well.  There are
! some restrictions, however.
  .sp
! There must be a To: header.  Without this, mush will not deliver the
! letter.  Instead, the editor must be reentered and a To: header with
! a valid recipient must be inserted.  Just because a valid Cc: header
! exists does not affect this restriction.  You may have as many To: and
! Cc: headers as you like.
  .sp
! The From: header must not be altered.  Altering this header will
! result in a warning and it will be replaced by a correct one.
  .sp
  The Date: header will always be replaced by one with a more accurate
! time and date stamp.  Therefore, changing or removing this header has
! no effect.
  .sp
  You cannot add a Status: header and blank headers are dropped.
  For example, if an empty Cc: header exists, the header will
! not show up in the outgoing message.  Therefore, leaving empty
! headers has no effect.
  .sp
  Aliases specified on the command line are expanded and put into the
  message buffer in their expanded form regardless of the value of
--- 3303,3333 ----
  .B edit_hdrs
  (Boolean)
  When in letter-composition mode (via \fBmail\fR or \fBreply\fR, etc),
! the headers of the outgoing message are stored in the same buffer as
! the text of the letter.
! So, if the editor is called to edit the message
! buffer, the headers of the message can be edited as well.
! However, there are some restrictions.
  .sp
! There must be a To: header.
! Without this, mush will not deliver the letter.
! Instead, the editor must be reentered and a To: header with
! a valid recipient must be inserted.
! A valid Cc: header does not remove this restriction.
! You may have as many To: and Cc: headers as you like.
  .sp
! The From: header must not be altered.
! Altering this header will result in a warning and it will be replaced by a
! correct one.
  .sp
  The Date: header will always be replaced by one with a more accurate
! time and date stamp.
! Therefore, changing or removing this header has no effect.
  .sp
  You cannot add a Status: header and blank headers are dropped.
  For example, if an empty Cc: header exists, the header will
! not show up in the outgoing message.
! Therefore, leaving empty headers has no effect.
  .sp
  Aliases specified on the command line are expanded and put into the
  message buffer in their expanded form regardless of the value of
***************
*** 3329,3335 ****
  However, if the user changes the headers using the editor and specifies
  aliases, those aliases will not be expanded if
  .B no_expand
! is set.  Otherwise, they are expanded as usual.
  .sp
  The headers Bcc: and Fcc: are removed as expected.
  .sp
--- 3335,3342 ----
  However, if the user changes the headers using the editor and specifies
  aliases, those aliases will not be expanded if
  .B no_expand
! is set.
! Otherwise, they are expanded as usual.
  .sp
  The headers Bcc: and Fcc: are removed as expected.
  .sp
***************
*** 3336,3348 ****
  One added side effect of
  .B edit_hdrs
  is that you can add an Fcc: header to specify a \*QFile Carbon Copy\*U.
! This must be a full pathname to a file or program.  For programs, the
! pathname must be preceded by a pipe character (|).
  .sp
  When using
  .B edit_hdrs,
! certain tilde escapes don't work.  Specifically, any tilde escape that
! allows you to add or set headers or to empty the file are inactive.
  These functions are to be done in the editor only.
  .sp
  Once a letter is being edited,
--- 3343,3356 ----
  One added side effect of
  .B edit_hdrs
  is that you can add an Fcc: header to specify a \*QFile Carbon Copy\*U.
! This must be a full pathname to a file or program.
! For programs, the pathname must be preceded by a pipe character (|).
  .sp
  When using
  .B edit_hdrs,
! certain tilde escapes don't work.
! Specifically, any tilde escape that allows you to add or set headers or to
! empty the file are inactive.
  These functions are to be done in the editor only.
  .sp
  Once a letter is being edited,
***************
*** 3349,3354 ****
--- 3357,3369 ----
  .B edit_hdrs
  cannot be set or unset; the user must end the letter (either
  by sending it or forcefully terminating it) first.
+ .sp
+ Header editing is not allowed when using the
+ .I Compose
+ tool mode item, because that item prompts for all necessary headers.
+ It works normally when the
+ .I Reply
+ item is selected.
  .TP
  .B escape
  (Character)
***************
*** 4119,4126 ****
  Line wrapping occurs only at whitespace (spaces or tabs).
  Lines containing no whitespace to the left of the specified column
  will not be wrapped.
! If mush was started with the \-e option (echo mode), line wrapping
! cannot be done.
  .SH MACROS
  Macros are available in several different modes in
  .IR Mush .
--- 4134,4141 ----
  Line wrapping occurs only at whitespace (spaces or tabs).
  Lines containing no whitespace to the left of the specified column
  will not be wrapped.
! If mush was started with the \-e (echo mode) option, or is in tool mode,
! line wrapping cannot be done due to I/O incompatibilities.
  .SH MACROS
  Macros are available in several different modes in
  .IR Mush .
***************
*** 4144,4150 ****
  command, and are effective only when composing mail messages.
  Macros are not available in the
  .I tool
! mode; see, however, the
  .B fkey
  command.
  Line and composition mode macros are also nonfunctional when mush is
--- 4159,4165 ----
  command, and are effective only when composing mail messages.
  Macros are not available in the
  .I tool
! mode, nor when composing messages from the tool mode; see, however, the
  .B fkey
  command.
  Line and composition mode macros are also nonfunctional when mush is
*** phase2/addrs.c	Wed Apr 26 14:41:14 1989
--- addrs.c	Wed Apr 26 10:16:09 1989
***************
*** 399,416 ****
      /* otherwise, get the pre_path */
      if (p = get_name_n_addr(sender, NULL, tmp))
  	c = p - sender; /* save the original length */
!     if (*tmp)
  	(void) bang_form(pre_path, tmp);
!     else
  	pre_path[0] = 0;
  
-     if (p = rindex(pre_path, '!')) {
- 	*p = 0;
- 	Debug("Routing thru \"%s\"\n", pre_path);
-     }
- 
      while (*next == ',' || isspace(*next))
! 	 next++;
      improve_uucp_paths(next, HDRSIZ - (int)(next - to), pre_path);
      improve_uucp_paths(cc, HDRSIZ, pre_path);
      p = sender + c;
--- 399,416 ----
      /* otherwise, get the pre_path */
      if (p = get_name_n_addr(sender, NULL, tmp))
  	c = p - sender; /* save the original length */
!     if (*tmp) {
  	(void) bang_form(pre_path, tmp);
! 	if (p = rindex(pre_path, '!')) {
! 	    *p = 0;
! 	    Debug("Routing thru \"%s\"\n", pre_path);
! 	} else
! 	    pre_path[0] = 0;
!     } else
  	pre_path[0] = 0;
  
      while (*next == ',' || isspace(*next))
! 	next++;
      improve_uucp_paths(next, HDRSIZ - (int)(next - to), pre_path);
      improve_uucp_paths(cc, HDRSIZ, pre_path);
      p = sender + c;
*** phase2/curses.c	Thu Apr 27 11:53:18 1989
--- curses.c	Thu Apr 27 11:14:56 1989
***************
*** 411,417 ****
  		char *argv[3];
  		clr_bot_line();
  		argv[0] = strcpy(buf, p);
! 		argv[1] = (*file) ? file : NULL;
  		argv[2] = NULL;
  		if (!*list)
  		    set_msg_bit(msg_list, current_msg);
--- 411,418 ----
  		char *argv[3];
  		clr_bot_line();
  		argv[0] = strcpy(buf, p);
! 		p = file; skipspaces(0);
! 		argv[1] = (*p) ? p : NULL;
  		argv[2] = NULL;
  		if (!*list)
  		    set_msg_bit(msg_list, current_msg);
*** phase2/hdrs.c	Wed Apr 26 19:56:01 1989
--- hdrs.c	Wed Apr 26 19:48:43 1989
***************
*** 84,91 ****
  {
      register int   pageful = 0;
      SIGRET 	   (*oldint)(), (*oldquit)();
!     int		   show_deleted;
!     static int     cnt;
      register char  *p;
      char 	   first_char = (argc) ? **argv: 'h';
  
--- 84,91 ----
  {
      register int   pageful = 0;
      SIGRET 	   (*oldint)(), (*oldquit)();
!     int		   show_deleted, srch = 1; /* search forward by default */
!     static int     cnt, oldscrn;
      register char  *p;
      char 	   first_char = (argc) ? **argv: 'h';
  
***************
*** 118,134 ****
  
      on_intr();
  
!     if (argc && (argv[0][1] == '-' || argc > 1 && !strcmp(argv[1], "-")))
! 	cnt = max((cnt - 2*screen), 0);
!     else if (argc && (argv[0][1] == '+' || argc > 1 && !strcmp(argv[1], "+")) ||
! 	    first_char == 'z' && !argv[1])
  	if (msg_cnt > screen)
  	    cnt = min(msg_cnt - screen, n_array[0] + screen);
  	else
  	    cnt = 0;
!     else if (argc && *++argv &&
! 	(isdigit(**argv) || **argv == '^' || **argv == '$' || **argv == '.')
! 	 || ison(glob_flags, IS_PIPE)) {
  	/* if we're coming from a pipe, start display at the first msg bit
  	 * set in the msg_list
  	 */
--- 118,137 ----
  
      on_intr();
  
!     if (argc && (argv[0][1] == '-' || argc > 1 && !strcmp(argv[1], "-"))) {
! 	cnt = max(n_array[0], 0);
! 	srch = -1;	/* search backwards */
!     } else if (argc && (argv[0][1] == '+' ||
! 	    argc > 1 && !strcmp(argv[1], "+")) ||
! 	    first_char == 'z' && !argv[1]) {
  	if (msg_cnt > screen)
  	    cnt = min(msg_cnt - screen, n_array[0] + screen);
  	else
  	    cnt = 0;
!     } else if (argc && *++argv &&
! 	    (isdigit(**argv) || **argv == '^' ||
! 		**argv == '$' || **argv == '.') ||
! 	    ison(glob_flags, IS_PIPE)) {
  	/* if we're coming from a pipe, start display at the first msg bit
  	 * set in the msg_list
  	 */
***************
*** 148,173 ****
  	}
  	for (cnt = fnd - 1; cnt > 0 && cnt + screen > msg_cnt; cnt--)
  	    ;
!     } else if (current_msg < n_array[0] || current_msg > n_array[screen-1])
  	cnt = current_msg; /* adjust if reads have passed screen bounds */
      else if (cnt >= msg_cnt || !argc || !*argv)
  	cnt = max((cnt - screen), 0); /* adjust window to maintain position */
  
      show_deleted = !!do_set(set_options, "show_deleted");
  
      /* Make sure we have at least $screen headers to print */
      if (cnt > 0 && !iscurses && !show_deleted && first_char == 'h') {
! 	int tmp = cnt;
  	/* first count how many messages we can print without adjusting */
! 	for (pageful = 0; pageful < screen && cnt < msg_cnt; cnt++)
! 	    if (isoff(msg[cnt].m_flags, DELETE))
  		pageful++;
  	/* if we can't print a pagefull of hdrs, back up till we can */
! 	for (cnt = tmp; pageful < screen && cnt; --cnt)
! 	    if (isoff(msg[cnt].m_flags, DELETE))
  		pageful++;
  	pageful = 0;	/* Used later as an index, so reset */
!     }
  
      for (;pageful<screen && cnt<msg_cnt && isoff(glob_flags, WAS_INTR); cnt++) {
  	if (!iscurses && !show_deleted && first_char == 'h'
--- 151,183 ----
  	}
  	for (cnt = fnd - 1; cnt > 0 && cnt + screen > msg_cnt; cnt--)
  	    ;
!     } else if (current_msg < n_array[0] || current_msg > n_array[oldscrn-1]
! 	    || cnt > current_msg + screen || cnt < current_msg - screen)
  	cnt = current_msg; /* adjust if reads have passed screen bounds */
      else if (cnt >= msg_cnt || !argc || !*argv)
  	cnt = max((cnt - screen), 0); /* adjust window to maintain position */
  
+     oldscrn = screen;
      show_deleted = !!do_set(set_options, "show_deleted");
  
      /* Make sure we have at least $screen headers to print */
      if (cnt > 0 && !iscurses && !show_deleted && first_char == 'h') {
! 	int top, bot = cnt;
  	/* first count how many messages we can print without adjusting */
! 	for (pageful = 0; pageful < screen && bot < msg_cnt && bot; bot += srch)
! 	    if (isoff(msg[bot].m_flags, DELETE))
  		pageful++;
  	/* if we can't print a pagefull of hdrs, back up till we can */
! 	for (top = cnt; pageful < screen && top && top < msg_cnt; top -= srch)
! 	    if (isoff(msg[top].m_flags, DELETE))
  		pageful++;
  	pageful = 0;	/* Used later as an index, so reset */
! 	if (srch < 0)
! 	    cnt = bot;	/* the search was upside down */
! 	else
! 	    cnt = top;
!     } else if (cnt > 0 && srch < 0)
! 	cnt = max(cnt - screen, 0);
  
      for (;pageful<screen && cnt<msg_cnt && isoff(glob_flags, WAS_INTR); cnt++) {
  	if (!iscurses && !show_deleted && first_char == 'h'
*** phase2/mail.c	Wed Apr 26 20:46:32 1989
--- mail.c	Wed Apr 26 20:41:16 1989
***************
*** 219,225 ****
      if (ison(flgs, FORWARD) && ison(flgs, EDIT) ||
  	    lower(firstchar) == 'r' && isoff(flgs, NEW_SUBJECT)) {
  	turnoff(flgs, NEW_SUBJECT);
! 	if (subj = subject_to(current_msg, buf))
  	    subj = strcpy(Subject, buf + 4*(lower(firstchar) != 'r'));
      } else if (isoff(flgs, NEW_SUBJECT) && isoff(flgs, FORWARD) &&
  	(do_set(set_options, "ask") || do_set(set_options, "asksub")))
--- 219,227 ----
      if (ison(flgs, FORWARD) && ison(flgs, EDIT) ||
  	    lower(firstchar) == 'r' && isoff(flgs, NEW_SUBJECT)) {
  	turnoff(flgs, NEW_SUBJECT);
! 	if (subj && *subj && (isoff(flgs, FORWARD) || ison(flgs, EDIT)))
! 	    subj = strcpy(Subject, subj);
! 	else if (subj = subject_to(current_msg, buf))
  	    subj = strcpy(Subject, buf + 4*(lower(firstchar) != 'r'));
      } else if (isoff(flgs, NEW_SUBJECT) && isoff(flgs, FORWARD) &&
  	(do_set(set_options, "ask") || do_set(set_options, "asksub")))
***************
*** 355,361 ****
  	    fix_up_addr(p);
  	(void) strcpy(To, p);
  	/* don't prompt for subject if forwarding mail */
! 	if (isoff(flags, FORWARD) && 
  		(p = set_header("Subject: ", subject,
  			!*subject && ison(flags, NEW_SUBJECT))))
  	    (void) strcpy(Subject, p);
--- 357,363 ----
  	    fix_up_addr(p);
  	(void) strcpy(To, p);
  	/* don't prompt for subject if forwarding mail */
! 	if (isoff(flags, FORWARD) && (*subject || ison(flags, NEW_SUBJECT)) &&
  		(p = set_header("Subject: ", subject,
  			!*subject && ison(flags, NEW_SUBJECT))))
  	    (void) strcpy(Subject, p);
*** phase2/makefile.bsd	Wed Apr 26 14:41:36 1989
--- makefile.bsd	Wed Apr 26 11:01:06 1989
***************
*** 26,31 ****
--- 26,33 ----
  	@echo loading...
  	@cc $(LDFLAGS) $(OBJS) $(LIBES) -o mush
  
+ $(OBJS): config.h
+ 
  tape:
  	@tar cv $(MAKES) $(HDRS) $(SRCS) $(HELP_FILES)
  
*** phase2/makefile.sun	Wed Apr 26 15:34:09 1989
--- makefile.sun	Wed Apr 26 11:01:13 1989
***************
*** 33,38 ****
--- 33,40 ----
  	@echo loading...
  	@cc $(LDFLAGS) $(OBJS) $(LIBES) -o mush
  
+ $(OBJS): config.h
+ 
  tar:
  	@tar fcv MUSH $(HELP_FILES) $(MAKES) $(IMAGES) $(HDRS) $(SRCS)
  
*** phase2/makefile.xenix	Wed Apr 26 14:41:37 1989
--- makefile.xenix	Wed Apr 26 11:02:20 1989
***************
*** 40,45 ****
--- 40,47 ----
  	@echo loading...
  	@cc $(LDFLAGS) $(OBJS) $(LIBES) -o mush
  
+ $(OBJS): config.h
+ 
  # For 80286 machines, use these two lines...
  # misc.o:	misc.c
  # 	cc $(CFLAGS) -LARGE -c misc.c
*** phase2/misc.c	Wed Apr 26 14:41:39 1989
--- misc.c	Wed Apr 26 08:57:59 1989
***************
*** 68,74 ****
  #endif /* SUNTOOL */
  char *file;
  {
!     register char	*p;
      char		buf[BUFSIZ], help_str[32];
      register int	height;
      extern char		*no_newln(), *more_prompt;
--- 68,74 ----
  #endif /* SUNTOOL */
  char *file;
  {
!     register char	*p, **text = (char **)str;
      char		buf[BUFSIZ], help_str[32];
      register int	height;
      extern char		*no_newln(), *more_prompt;
***************
*** 81,88 ****
  #endif /* SUNTOOL */
  	/* use the pager on the args to the function */
  	do_pager(NULL, TRUE);
! 	while (*str) {
! 	    (void) do_pager(*str++, FALSE);
  	    if (do_pager("\n", FALSE) == EOF)
  		break;
  	}
--- 81,88 ----
  #endif /* SUNTOOL */
  	/* use the pager on the args to the function */
  	do_pager(NULL, TRUE);
! 	while (*text) {
! 	    (void) do_pager(*text++, FALSE);
  	    if (do_pager("\n", FALSE) == EOF)
  		break;
  	}
*** mush-6.4/kit.check	Tue Apr 18 17:29:04 1989
--- kit.check	Tue Apr 18 17:29:04 1989
***************
*** 1 ****
!  Part5-check 
--- 1 ----
!  Part6 
-- 
Bart Schaefer       "And if you believe that, you'll believe anything."
							-- DangerMouse
CSNET / Internet                schaefer at cse.ogc.edu
UUCP                            ...{sun,tektronix,verdix}!ogccse!schaefer



More information about the Comp.sources.bugs mailing list