[comp.sources.bugs] elm 2.2 Patch #8

syd@dsinc.DSI.COM (Syd Weinstein) (05/25/89)

Summary: This is an official patch for elm 2.2 system.  Please apply it.
Priority: LOW

A troff directive was missing its leading dot.
From: uunet!munnari!itd.dsto.oz.au!ksh (Ken Hayman 6340)

Fix message in sample elmrc file.
From: uunet!calgary!xenlink!pldnec!dudley

Change #ifdef SV_INTERRUPT that fool some BSD enhanced systems
that only have sigvec for kernel use but not for task use.
From: Robert Claeson <uunet!mcvax!erbe.se!prc>

Fixes the signature code to work for fully qualified local addresses.  Also
fixes the problem that signatures can't really be determined until after the
message is entered (the user may use ~h to change it's local/remote status).
From: lll-tis!ames!mailrus!sharkey!b-tech.ann-arbor.mi.us!zeeff (Jon Zeeff)

Fixed several problems, mostly off-by-one errors and the missed
consideration that a delay of around 8 weeks (the maximum allowed)
can actually push you more than one month into the future
(eg 28th Feb + 40 days is in April, not March).
From: munnari!itd.dsto.oz.au!ksh@uunet.UU.NET (Ken Hayman 6340)

Prevent a string in a document trigger some action by adding a null width
space before the word in the keyword.
From: uunet!!phil (Phil Hochstetler)

Fix the "message-id" variable that is used in the In-Reply-To: field
to initialize it to no.id for those messages without a message id.
From: Dave Taylor

Updateing the status line for non forwarded messages was doubling
the status tag.
From: Samuel Lam <van-bc!skl@beaver.cs.washington.edu>

Changes to remote-install in Makefiles
From: David Newall

Change configure to not define USE_DOMAIN if the MTA cannot
handle internet addresses
From: Syd Weinstein

There was one space too many before the word "Display" in the PF1
definition; this causes the key label to look quite ugly when the word
"Display" wraps into the second line.
From: uunet!smsdpg!seg (Scott Garfinkle)

Fix:	From rn, say "| patch -p -N -d DIR", where DIR is your elm source
	directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
	If you don't have the patch program, apply the following by hand,
	or get patch (version 2.0, latest patchlevel).

	After patching:
		sh Configure -v
		make
		make install

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel.h file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	If you are missing previous patches they can be obtained from our:
	archive server.

	Syd Weinstein
	elm@dsinc.UUCP

	The patches are available from the dsinc archive server
	Send the following message to archive-server@dsinc.UUCP for
	a list of available patches:

	Subject: patch list
	send index elm

Index: hdrs/patchlevel.h
Prereq: 7
*** ../elm2.2/hdrs/patchlevel.h	Mon May  8 21:53:47 1989
--- hdrs/patchlevel.h	Wed May 24 18:41:14 1989
***************
*** 1 ****
! #define PATCHLEVEL 7
--- 1 ----
! #define PATCHLEVEL 8

Index: Configure
Prereq: 2.39
*** ../elm2.2/Configure	Fri Apr 28 16:05:21 1989
--- Configure	Wed May 24 20:42:46 1989
***************
*** 8,14 ****
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $Header: /files/home/users/syd/elm/RCS/Configure,v 2.39 89/04/28 15:07:28 syd Exp $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
--- 8,14 ----
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $Header: /files/home/users/syd/elm/RCS/Configure,v 2.40 89/05/24 20:42:27 syd Exp $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
***************
*** 140,145 ****
--- 140,146 ----
  d_rename=''
  d_setgid=''
  mailermode=''
+ d_sigvec=''
  d_strings=''
  d_pwdinsys=''
  includepath=''
***************
*** 1446,1451 ****
--- 1447,1455 ----
  if $test -f "$pathalias.pag" -a -f "$pathalias.dir"; then
      ans=`loc libdbm.a x $libpth`
      if $test "$ans" = x; then
+ 	ans=`loc Slibdbm.a x $libpth`
+     fi
+     if $test "$ans" = x; then
  	dflt=y
  	echo " "
  	rp="You have pathalias as a DBM file, but I cannot find the
***************
*** 1677,1702 ****
  	*)  d_nocheckvalid="$define";;
  	esac
  
! 	case "$d_usedomain" in
! 	"$define") dflt=y;;
! 	"$undef")  dflt=n;;
! 	*)	   dflt=y;;
! 	esac
  
! 	$cat <<EOM
  
  Are you running a machine where you want to have a domain name appended
  to the hostname on outbound mail?
  EOM
! 	echo " "
! 	rp="Would you like the domain name appended? [$dflt]"
! 	$echo $n "$rp $c"
! 	. myread
! 	case "$ans" in
! 	y*) d_usedomain="$define";;
! 	*)  d_usedomain="$undef";;
! 	esac
  
  	case "$d_noaddfrom" in
  	"$define") dflt=y;;
  	"$undef")  dflt=n;;
--- 1681,1717 ----
  	*)  d_nocheckvalid="$define";;
  	esac
  
! 	if $test "$d_internet" = "$define"; then
! 		case "$d_usedomain" in
! 		"$define") dflt=y;;
! 		"$undef")  dflt=n;;
! 		*)	   dflt=y;;
! 		esac
  
! 		$cat <<EOM
  
  Are you running a machine where you want to have a domain name appended
  to the hostname on outbound mail?
  EOM
! 		echo " "
! 		rp="Would you like the domain name appended? [$dflt]"
! 		$echo $n "$rp $c"
! 		. myread
! 		case "$ans" in
! 		y*) d_usedomain="$define";;
! 		*)  d_usedomain="$undef";;
! 		esac
! 	else
! 		d_usedomain="$undef"
! 		$cat <<EOM
  
+ Since your mailer does not understand internet addresses, undefining
+ usedomain, your domain name will not be appended to the hostname on
+ outbound mail.
+ 
+ EOM
+ 	fi
+ 
  	case "$d_noaddfrom" in
  	"$define") dflt=y;;
  	"$undef")  dflt=n;;
***************
*** 1834,1839 ****
--- 1849,1864 ----
      d_rename="$undef"
  fi
  
+ : see if sigvec exists
+ echo " "
+ if $contains sigvec libc.list >/dev/null 2>&1; then
+     echo 'sigvec() found.'
+     d_sigvec="$define"
+ else
+     echo 'sigvec() not found--will use signal instead.'
+     d_sigvec="$undef"
+ fi
+ 
  : see if tempnam exists
  echo " "
  if $contains tempnam libc.list >/dev/null 2>&1; then
***************
*** 3258,3263 ****
--- 3283,3289 ----
  d_rename='$d_rename'
  d_setgid='$d_setgid'
  mailermode='$mailermode'
+ d_sigvec='$d_sigvec'
  d_strings='$d_strings'
  d_pwdinsys='$d_pwdinsys'
  includepath='$includepath'

Index: config.h.SH
*** ../elm2.2/config.h.SH	Wed Mar 29 09:20:02 1989
--- config.h.SH	Wed May 24 20:42:49 1989
***************
*** 244,249 ****
--- 244,254 ----
   */
  #$d_setgid SAVE_GROUP_MAILBOX_ID	/**/
  
+ /* SIGVEC:
+  *	This symbol, if defined, indicates that the sigvec() routine exists.
+  */
+ #$d_sigvec	SIGVEC		/**/
+ 
  /* STRINGS:
   *	This symbol, if defined, indicates that the file strings.h
   *	should be included not string.h

Index: Makefile.SH
Prereq: 2.23
*** ../elm2.2/Makefile.SH	Mon Apr 24 20:03:59 1989
--- Makefile.SH	Wed May 24 19:39:12 1989
***************
*** 21,27 ****
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
  #
! # $Id: Makefile.SH,v 2.23 89/04/19 13:10:39 syd Exp $
  #
  #  Makefile for the entire ELM mail system
  #
--- 21,27 ----
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
  #
! # $Id: Makefile.SH,v 2.24 89/05/24 19:38:59 syd Exp $
  #
  #  Makefile for the entire ELM mail system
  #
***************
*** 29,34 ****
--- 29,38 ----
  #         (C) Copyright 1988, 1989, USENET Community Trust
  #
  #  $Log:	Makefile.SH,v $
+ # Revision 2.24  89/05/24  19:38:59  syd
+ # Fix remove flags
+ # From: David Newall
+ # 
  # Revision 2.23  89/04/19  13:10:39  syd
  # added missing dependency
  # 
***************
*** 79,88 ****
  		  $(ECHO) "ELM on the remote machine <$(REMOTE)>. If this is";\
  		  $(ECHO) "not the case, interrupt this process quickly!";\
  		  $(SLEEP) 10;)
! 		cd src; $(MAKE) -$(MAKEFLAGS) REMOTE=$$(REMOTE) $@
! 		cd filter; $(MAKE) -$(MAKEFLAGS) REMOTE=$$(REMOTE) $@
! 		cd utils; $(MAKE) -$(MAKEFLAGS) REMOTE=$$(REMOTE) $@
! 		cd doc; $(MAKE) -$(MAKEFLAGS) REMOTE=$$(REMOTE) $@
  
  rmt-defined:
  	@(if [ "$(REMOTE)" = "" ];\
--- 83,92 ----
  		  $(ECHO) "ELM on the remote machine <$(REMOTE)>. If this is";\
  		  $(ECHO) "not the case, interrupt this process quickly!";\
  		  $(SLEEP) 10;)
! 		cd src; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
! 		cd filter; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
! 		cd utils; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
! 		cd doc; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
  
  rmt-defined:
  	@(if [ "$(REMOTE)" = "" ];\

Index: doc/Form.guide
Prereq: 2.8
*** ../elm2.2/doc/Form.guide	Wed Mar 29 10:08:59 1989
--- doc/Form.guide	Wed May 24 19:13:11 1989
***************
*** 1,4 ****
! \" @(#)$Id: Form.guide,v 2.8 89/03/29 10:08:51 syd Exp $
  \"
  \"  A guide to using the Elm Forms mode
  \"  format with:
--- 1,4 ----
! \" @(#)$Id: Form.guide,v 2.9 89/05/24 19:13:06 syd Exp $
  \"
  \"  A guide to using the Elm Forms mode
  \"  format with:
***************
*** 12,17 ****
--- 12,21 ----
  \"  (C) Copyright 1988, 1989 Usenet Community Trust
  \"
  \"  $Log:	Form.guide,v $
+ \" Revision 2.9  89/05/24  19:13:06  syd
+ \" make commands look transparent to mailer to avoid mis interpretation
+ \" From: Phil Hochstetler
+ \" 
  \" Revision 2.8  89/03/29  10:08:51  syd
  \" First tmac.n checkin
  \" 
***************
*** 219,229 ****
  .nf
  .in .5i
  \f2The Message Header\fC
! [OPTIONS-SECTION]
  ***
! [FORMS-IMAGE]
  ***
! [RULES-SECTION]\f1
  .in 0
  .fi
  \f3Elm\f1 generates form messages with the ``options'' section filled out,
--- 223,233 ----
  .nf
  .in .5i
  \f2The Message Header\fC
! [\&OPTIONS-SECTION]
  ***
! [\&FORMS-IMAGE]
  ***
! [\&RULES-SECTION]\f1
  .in 0
  .fi
  \f3Elm\f1 generates form messages with the ``options'' section filled out,

Index: doc/Makefile.SH
Prereq: 2.8
*** ../elm2.2/doc/Makefile.SH	Thu Mar 30 16:01:42 1989
--- doc/Makefile.SH	Wed May 24 19:36:59 1989
***************
*** 16,22 ****
  echo "Extracting doc/Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
  #
! # $Id: Makefile.SH,v 2.8 89/03/30 16:01:35 syd Exp $
  #
  #  Makefile for the documentation of the ELM mail system
  #
--- 16,22 ----
  echo "Extracting doc/Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
  #
! # $Id: Makefile.SH,v 2.9 89/05/24 19:36:43 syd Exp $
  #
  #  Makefile for the documentation of the ELM mail system
  #
***************
*** 23,28 ****
--- 23,32 ----
  #         (C) Copyright 1989, USENET Community Trust
  #
  #  $Log:	Makefile.SH,v $
+ # Revision 2.9  89/05/24  19:36:43  syd
+ # add newmail to remote list
+ # From: David Newall
+ # 
  # Revision 2.8  89/03/30  16:01:35  syd
  # First tmac.n checkin
  # 
***************
*** 73,78 ****
--- 77,83 ----
  				$(REMOTE)$(MAN)/listalias.$(MANEXT)	\
  				$(REMOTE)$(MAN)/messages.$(MANEXT)	\
  				$(REMOTE)$(MAN)/newalias.$(MANEXT)	\
+ 				$(REMOTE)$(MAN)/newmail.$(MANEXT)	\
  				$(REMOTE)$(MAN)/printmail.$(MANEXT)	\
  				$(REMOTE)$(MAN)/readmsg.$(MANEXT)
  

Index: doc/Ref.guide
Prereq: 2.25
*** ../elm2.2/doc/Ref.guide	Fri Apr 28 16:05:23 1989
--- doc/Ref.guide	Wed May 24 19:13:05 1989
***************
*** 1,4 ****
! \" @(#)$Id: Ref.guide,v 2.25 89/04/28 14:48:06 syd Exp $
  \"
  \"  Reference guide to the Elm mail system.
  \"  format with 
--- 1,4 ----
! \" @(#)$Id: Ref.guide,v 2.27 89/05/24 19:12:40 syd Exp $
  \"
  \"  Reference guide to the Elm mail system.
  \"  format with 
***************
*** 12,17 ****
--- 12,25 ----
  \"  (C) Copyright 1988, 1989 Usenet Community Trust
  \"
  \"  $Log:	Ref.guide,v $
+ \" Revision 2.27  89/05/24  19:12:40  syd
+ \" make commands look transparent to mailer to avoid mis interpretation
+ \" From: Phil Hochstetler
+ \" 
+ \" Revision 2.26  89/05/24  18:48:25  syd
+ \" Fix message in sample elmrc file.
+ \" From: uunet!calgary!xenlink!pldnec!dudley
+ \" 
  \" Revision 2.25  89/04/28  14:48:06  syd
  \" This reinstates elm 2.1 functionality of saving a copy of an outbound
  \" message by name only if the folder preexists, while keeping the new
***************
*** 678,685 ****
    # save messages, incoming and outbound, by login name of sender/recipient?
    savename = ON
  
!   # save outbound messages by login name of sender even if the associated
!   # folder doesn't already exist?
    forcename = OFF
  
    # are we running on an HP terminal and want HOME, PREV, NEXT, etc...?
--- 686,693 ----
    # save messages, incoming and outbound, by login name of sender/recipient?
    savename = ON
  
!   # save outbound messages by login name of sender/recipient even if the
!   # associated folder doesn't already exist?
    forcename = OFF
  
    # are we running on an HP terminal and want HOME, PREV, NEXT, etc...?
***************
*** 813,821 ****
  ability to send \f2encrypted\f1 mail! To do this is 
  extremely simple:  You need merely to have two key lines
  .ft CW
! [encode]\f1 and 
  .ft CW
! [clear]\f1 in the message body.
  
  Consider the following outgoing message:
  .nf
--- 821,829 ----
  ability to send \f2encrypted\f1 mail! To do this is 
  extremely simple:  You need merely to have two key lines
  .ft CW
! [\&encode]\f1 and 
  .ft CW
! [\&clear]\f1 in the message body.
  
  Consider the following outgoing message:
  .nf
***************
*** 826,838 ****
  Remember that talk we had about Amy?  Well, I talked to my manager 
  about it and he said...
  uhh...better encrypt this...the usual `key'...
! [encode]
  He said that Amy was having family problems and that it had been 
  affecting her work.
  Given this, I went and talked to her, and told her I was sorry for 
  getting angry.  She said that she understood.
  We're friends again!!
! [clear]
  Exciting stuff, eh?   
  \h'3i'Mike
  .ps 10
--- 834,846 ----
  Remember that talk we had about Amy?  Well, I talked to my manager 
  about it and he said...
  uhh...better encrypt this...the usual `key'...
! [\&encode]
  He said that Amy was having family problems and that it had been 
  affecting her work.
  Given this, I went and talked to her, and told her I was sorry for 
  getting angry.  She said that she understood.
  We're friends again!!
! [\&clear]
  Exciting stuff, eh?   
  \h'3i'Mike
  .ps 10
***************
*** 862,868 ****
  If the mailer doesn't ask for the encryption key, it's because
  you don't have the 
  .ft CW
! [encode]\f1 entered as the first 8 characters
  of the line.  It MUST be so for this to work!!
  
  On the other end, a person receiving this mail (they must also
--- 870,876 ----
  If the mailer doesn't ask for the encryption key, it's because
  you don't have the 
  .ft CW
! [\&encode]\f1 entered as the first 8 characters
  of the line.  It MUST be so for this to work!!
  
  On the other end, a person receiving this mail (they must also
***************
*** 881,887 ****
  The program will then on-the-fly decrypt the mail 
  and display each line as it is decoded.  The 
  .ft CW
! [clear]\f1 
  line signifies that the block to encrypt is done.  
  
  Note that it is not possible currently to \f2pipe\f1 or \f2print\f1
--- 889,895 ----
  The program will then on-the-fly decrypt the mail 
  and display each line as it is decoded.  The 
  .ft CW
! [\&clear]\f1 
  line signifies that the block to encrypt is done.  
  
  Note that it is not possible currently to \f2pipe\f1 or \f2print\f1
***************
*** 899,910 ****
  .nf
  .ft CW
  .ti .5i
! [nosave]
  .ft 1
  or
  .ft CW
  .ti .5i
! [no save]
  .ft 1
  .fi
  appear by itself on a line.  This will be removed from 
--- 907,918 ----
  .nf
  .ft CW
  .ti .5i
! [\&nosave]
  .ft 1
  or
  .ft CW
  .ti .5i
! [\&no save]
  .ft 1
  .fi
  appear by itself on a line.  This will be removed from 

Index: doc/Users.guide
Prereq: 2.15
*** ../elm2.2/doc/Users.guide	Fri Mar 31 10:19:04 1989
--- doc/Users.guide	Wed May 24 18:43:39 1989
***************
*** 1,4 ****
! \" @(#)$Id: Users.guide,v 2.15 89/03/31 10:18:55 syd Exp $
  \"
  \"  Users guide to the ELM mail system.
  \"  format with:
--- 1,4 ----
! \" @(#)$Id: Users.guide,v 2.16 89/05/24 18:43:35 syd Exp $
  \"
  \"  Users guide to the ELM mail system.
  \"  format with:
***************
*** 12,17 ****
--- 12,21 ----
  \"  (C) Copyright 1988, 1989 Usenet Community Trust
  \"
  \"  $Log:	Users.guide,v $
+ \" Revision 2.16  89/05/24  18:43:35  syd
+ \" A troff directive was missing its leading dot.
+ \" From: uunet!munnari!itd.dsto.oz.au!ksh (Ken Hayman 6340)
+ \" 
  \" Revision 2.15  89/03/31  10:18:55  syd
  \" Release 2.2 checkin
  \" 
***************
*** 731,737 ****
  rather than continue with our example, let's
  look at some other aspects of the program.
  .br 
! ne 5
  .sp
  .hn 1 Non-Interactive Uses of Elm
  
--- 735,741 ----
  rather than continue with our example, let's
  look at some other aspects of the program.
  .br 
! .ne 5
  .sp
  .hn 1 Non-Interactive Uses of Elm
  

Index: doc/elmrc-info
Prereq: 2.10
*** ../elm2.2/doc/elmrc-info	Fri Apr 28 16:05:24 1989
--- doc/elmrc-info	Wed May 24 18:48:31 1989
***************
*** 1,4 ****
! #@(#)$Id: elmrc-info,v 2.10 89/04/28 14:48:13 syd Exp $
  # Elm Version 2.2
  # For yes/no settings with ?, ON means yes, OFF means no
  
--- 1,4 ----
! #@(#)$Id: elmrc-info,v 2.11 89/05/24 18:48:30 syd Exp $
  # Elm Version 2.2
  # For yes/no settings with ?, ON means yes, OFF means no
  
***************
*** 69,76 ****
  # save messages, incoming and outbound, by login name of sender/recipient?
  
  forcename
! # save outbound messages by login name of sender even if the associated
! # folder doesn't already exist?
  
  movepage
  # when using the page commands (+ - <NEXT> <PREV>) change the current
--- 69,76 ----
  # save messages, incoming and outbound, by login name of sender/recipient?
  
  forcename
! # save outbound messages by login name of sender/recipient even if the
! # associated folder doesn't already exist?
  
  movepage
  # when using the page commands (+ - <NEXT> <PREV>) change the current

Index: doc/elmrc.samp
Prereq: 2.9
*** ../elm2.2/doc/elmrc.samp	Fri Apr 28 16:05:25 1989
--- doc/elmrc.samp	Wed May 24 18:48:33 1989
***************
*** 1,4 ****
! #@(#)$Id: elmrc.samp,v 2.9 89/04/28 14:48:15 syd Exp $
  #
  # .elm/elmrc - options file for the ELM mail system
  #
--- 1,4 ----
! #@(#)$Id: elmrc.samp,v 2.10 89/05/24 18:48:32 syd Exp $
  #
  # .elm/elmrc - options file for the ELM mail system
  #
***************
*** 114,121 ****
  # save messages, incoming and outbound, by login name of sender/recipient?
  savename = ON
  
! # save outbound messages by login name of sender even if the associated
! # folder doesn't already exist?
  forcename = OFF
  
  # are we running on an HP terminal and want HOME, PREV, NEXT, etc...?
--- 114,121 ----
  # save messages, incoming and outbound, by login name of sender/recipient?
  savename = ON
  
! # save outbound messages by login name of sender/recipient even if the
! # associated folder doesn't already exist?
  forcename = OFF
  
  # are we running on an HP terminal and want HOME, PREV, NEXT, etc...?

Index: src/date.c
Prereq: 2.7
*** ../elm2.2/src/date.c	Mon Apr 24 20:04:02 1989
--- src/date.c	Wed May 24 19:10:09 1989
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: date.c,v 2.7 89/04/24 19:14:34 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.7 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: date.c,v 2.8 89/05/24 19:10:07 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.8 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
***************
*** 14,19 ****
--- 14,26 ----
   *
   *******************************************************************************
   * $Log:	date.c,v $
+  * Revision 2.8  89/05/24  19:10:07  syd
+  * Fixed several problems, mostly off-by-one errors and the missed
+  * consideration that a delay of around 8 weeks (the maximum allowed)
+  * can actually push you more than one month into the future
+  * (eg 28th Feb + 40 days is in April, not March).
+  * From: munnari!itd.dsto.oz.au!ksh@uunet.UU.NET (Ken Hayman 6340)
+  * 
   * Revision 2.7  89/04/24  19:14:34  syd
   * Add gould timezone patches From Andy Linton @ newcastle
   * 
***************
*** 154,179 ****
  	/* the day of the month... */
  	the_time->tm_mday += days;
  	
! 	if (the_time->tm_mday > days_in_month[the_time->tm_mon]) {
! 	  if (the_time->tm_mon == FEB && leapyear(the_time->tm_year)) {
! 	    if (the_time->tm_mday > DAYS_IN_LEAP_FEB) {
! 	      the_time->tm_mday -= days_in_month[the_time->tm_mon];
! 	      the_time->tm_mon += 1;
! 	    }
! 	  }
! 	  else {
! 	    the_time->tm_mday -= days_in_month[the_time->tm_mon];
! 	    the_time->tm_mon += 1;
! 	  }
! 	}
  
! 	/* check the month of the year */
! 	if (the_time->tm_mon > MONTHS_IN_YEAR) {
! 	  the_time->tm_mon -= MONTHS_IN_YEAR;
! 	  the_time->tm_year += 1;
! 	}
! 
! 	/* now, finally, build the actual date string */
  
  	sprintf(buffer, "%s, %d %s %d",
  	  arpa_dayname[the_time->tm_wday],
--- 161,188 ----
  	/* the day of the month... */
  	the_time->tm_mday += days;
  	
!         while (the_time->tm_mday > days_in_month[the_time->tm_mon]) {
!           if (the_time->tm_mon == FEB && leapyear(the_time->tm_year)) {
!             if (the_time->tm_mday > DAYS_IN_LEAP_FEB) {
!               the_time->tm_mday -= DAYS_IN_LEAP_FEB;
!               the_time->tm_mon += 1;
!             }
!             else
!               break;            /* Is Feb 29, so leave */
!           }
!           else {
!             the_time->tm_mday -= days_in_month[the_time->tm_mon];
!             the_time->tm_mon += 1;
!           }
  
!           /* check the month of the year */
!           if (the_time->tm_mon > MONTHS_IN_YEAR) {
!             the_time->tm_mon -= (MONTHS_IN_YEAR + 1);
!             the_time->tm_year += 1;
!           }
!         }
!   
!         /* now, finally, build the actual date string */
  
  	sprintf(buffer, "%s, %d %s %d",
  	  arpa_dayname[the_time->tm_wday],

Index: src/fileio.c
Prereq: 2.16
*** ../elm2.2/src/fileio.c	Thu Mar 30 10:35:57 1989
--- src/fileio.c	Wed May 24 19:32:34 1989
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: fileio.c,v 2.16 89/03/25 21:46:21 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.16 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: fileio.c,v 2.17 89/05/24 19:32:32 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.17 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
***************
*** 14,19 ****
--- 14,24 ----
   *
   *******************************************************************************
   * $Log:	fileio.c,v $
+  * Revision 2.17  89/05/24  19:32:32  syd
+  * Updateing the status line for non forwarded messages was doubling
+  * the status tag.
+  * From: Samuel Lam <van-bc!skl@beaver.cs.washington.edu>
+  * 
   * Revision 2.16  89/03/25  21:46:21  syd
   * Initial 2.2 Release checkin
   * 
***************
*** 175,181 ****
  	    ignoring = TRUE;
  	    continue;	/* we will output a new Status: line later. */
  	  } else {
! 	    fprintf(dest_file, "%sStatus: %s\n", prefix, buffer);
  	    continue;
  	  }
  	}
--- 180,186 ----
  	    ignoring = TRUE;
  	    continue;	/* we will output a new Status: line later. */
  	  } else {
! 	    fprintf(dest_file, "%s%s\n", prefix, buffer);
  	    continue;
  	  }
  	}

Index: src/init.c
Prereq: 2.28
*** ../elm2.2/src/init.c	Mon May  8 21:53:51 1989
--- src/init.c	Wed May 24 18:58:12 1989
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: init.c,v 2.28 89/05/04 14:44:52 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.28 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: init.c,v 2.29 89/05/24 18:57:32 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.29 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
***************
*** 14,19 ****
--- 14,24 ----
   *
   *******************************************************************************
   * $Log:	init.c,v $
+  * Revision 2.29  89/05/24  18:57:32  syd
+  * Add SIGVEC symbol as some systems use sigvec in kernel but not for user
+  * tasks.
+  * From: Syd and Robert Claeson
+  * 
   * Revision 2.28  89/05/04  14:44:52  syd
   * Change cast on init signal code.
   * From: root@cheviot.newcastle.ac.uk (Andy Linton)
***************
*** 108,114 ****
  #endif
  #endif
  
! #ifdef SV_INTERRUPT
  	struct sigvec alarm_vec;
  #endif
  	char     buffer[SLEN], *cp;
--- 113,119 ----
  #endif
  #endif
  
! #ifdef SIGVEC
  	struct sigvec alarm_vec;
  #endif
  	char     buffer[SLEN], *cp;
***************
*** 211,217 ****
    "\n*** Elm-Internal Signal Handlers Disabled due to debug level %d ***\n\n",
  		    debug));
  	}
! #ifdef SV_INTERRUPT
  	alarm_vec.sv_handler = alarm_signal;
  	alarm_vec.sv_flags = SV_INTERRUPT;
  	sigvec (SIGALRM, &alarm_vec, (struct sigvec *)0);	/* Process Timer Alarm	    */
--- 216,222 ----
    "\n*** Elm-Internal Signal Handlers Disabled due to debug level %d ***\n\n",
  		    debug));
  	}
! #ifdef SIGVEC
  	alarm_vec.sv_handler = alarm_signal;
  	alarm_vec.sv_flags = SV_INTERRUPT;
  	sigvec (SIGALRM, &alarm_vec, (struct sigvec *)0);	/* Process Timer Alarm	    */

Index: src/mailmsg2.c
Prereq: 2.32
*** ../elm2.2/src/mailmsg2.c	Mon May  8 21:53:52 1989
--- src/mailmsg2.c	Wed May 24 19:01:21 1989
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 2.32 89/05/08 17:09:35 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.32 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 2.33 89/05/24 19:01:19 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.33 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
***************
*** 14,19 ****
--- 14,25 ----
   *
   *******************************************************************************
   * $Log:	mailmsg2.c,v $
+  * Revision 2.33  89/05/24  19:01:19  syd
+  * Fixes the signature code to work for fully qualified local addresses.  Also
+  * fixes the problem that signatures can't really be determined until after the
+  * message is entered (the user may use ~h to change it's local/remote status).
+  * From: lll-tis!ames!mailrus!sharkey!b-tech.ann-arbor.mi.us!zeeff (Jon Zeeff)
+  * 
   * Revision 2.32  89/05/08  17:09:35  syd
   * mail_form() called mail() with a "NO" argument to tell it not to
   * add the Contains line; this caused the recipient of a Form to
***************
*** 48,54 ****
  
  /** Interface to allow mail to be sent to users.  Part of ELM  **/
  
- 
  #include "headers.h"
  #include <errno.h>
  
--- 54,59 ----
***************
*** 58,63 ****
--- 63,69 ----
  char *error_name(), *error_description(), *strip_parens();
  char *strcat(), *strcpy();
  char *format_long(), *strip_commas(), *tail_of_string(); 
+ char *strchr(), *strrchr();
  
  unsigned long sleep();
  
***************
*** 166,190 ****
  	  else
  	    copy_message("", reply, noheader, FALSE, FALSE);
  
- 	if (!batch_only && !retransmit && copy_msg != FORM) {
- 	  char *sig;
- 
- 	  if (chloc(expanded_to, '!') == -1 && chloc(expanded_to, '@') == -1)
- 	    sig = local_signature;
- 	  else
- 	    sig = remote_signature;
- 
- 	  if (sig[0]) {
- 	    fprintf(reply, "\n-- \n");  /* News 2.11 compatibility? */
- 	    if (sig[0] != '/')
- 	      sprintf(filename2, "%s/%s", home, sig);
- 	    else
- 	      strcpy(filename2, sig);
- 	    (void) append(reply, filename2);
- 	    already_has_text = TRUE;  /* added signature... */
- 	  }
- 	}
- 
  	if (! retransmit && copy_msg != FORM)
  	  if (reply != NULL)
  	    (void) fclose(reply);	/* on replies, it won't be open! */
--- 172,177 ----
***************
*** 322,328 ****
--- 309,366 ----
  
  	}
  	else {
+ 
  	  copy_message_across(reply, real_reply, FALSE);
+ 
+           /* Append signature */
+ 
+ 	  if (!batch_only && !retransmit && copy_msg != FORM
+               && (local_signature[0] || remote_signature[0])) {
+ 
+             char filename2[SLEN];
+ 	    char *sig;
+ 
+   	    if (strchr(expanded_to, '!') || strchr(expanded_cc,'!'))
+               sig = remote_signature;		/* ! always means remote */
+             else {
+ 	      /* check each @ for @thissite.domain */
+ 	      /* if any one is different than this, then use remote sig */
+ 	      int len;
+ 	      char *ptr;
+ 	      char sitename[SLEN];
+ 	      sprintf(sitename,"@%s%s",hostname,hostdomain);
+ 	      len = strlen(sitename);
+               sig = local_signature;
+               for (ptr = strchr(expanded_to,'@'); ptr;  /* check To: list */
+ 	          ptr = strchr(ptr+1,'@')) {
+ 		if (strncmp(ptr,sitename,len) != 0
+ 		    || (*(ptr+len) != ',' && *(ptr+len) != 0
+ 		    && *(ptr+len) != ' ')) {
+ 	          sig = remote_signature;
+                   break;
+                 }
+               }
+               if (sig == local_signature)		   /* still local? */ 
+                 for (ptr = strchr(expanded_cc,'@'); ptr;   /* check Cc: */
+ 		    ptr = strchr(ptr+1,'@')) {
+ 		  if (strncmp(ptr,sitename,len) != 0
+ 		      || (*(ptr+len) != ',' && *(ptr+len) != 0 
+ 		      && *(ptr+len) != ' ')) {
+ 	            sig = remote_signature;
+                     break;
+                   }
+                 }
+             }
+ 
+             if (sig[0]) {  /* if there is a signature file */
+ 	      fprintf(real_reply, "\n-- \n");  /* News 2.11 compatibility? */
+ 	      if (sig[0] != '/')
+ 	        sprintf(filename2, "%s/%s", home, sig);
+ 	      else
+ 	        strcpy(filename2, sig);
+ 	      (void) append(real_reply, filename2);
+             }
+           }
  
  	  fclose(real_reply);
  

Index: src/mkhdrs.c
Prereq: 2.7
*** ../elm2.2/src/mkhdrs.c	Thu Mar 30 10:36:33 1989
--- src/mkhdrs.c	Wed May 24 19:27:08 1989
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: mkhdrs.c,v 2.7 89/03/25 21:46:48 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.7 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: mkhdrs.c,v 2.9 89/05/24 19:26:52 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.9 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
***************
*** 14,19 ****
--- 14,23 ----
   *
   *******************************************************************************
   * $Log:	mkhdrs.c,v $
+  * Revision 2.9  89/05/24  19:26:52  syd
+  * Fix garbage headers on reply by setting up no.id header
+  * From: Dave Taylor
+  * 
   * Revision 2.7  89/03/25  21:46:48  syd
   * Initial 2.2 Release checkin
   * 
***************
*** 39,45 ****
  	char buffer[SLEN];
  
  
! 	if (msg == -1)		/* not a reply! */
  	  in_reply_to[0] = '\0';
  	else {
  	  if (chloc(headers[msg]->from, '!') != -1)
--- 43,49 ----
  	char buffer[SLEN];
  
  
! 	if (msg == -1)		/* not a reply! */
  	  in_reply_to[0] = '\0';
  	else {
  	  if (chloc(headers[msg]->from, '!') != -1)
***************
*** 47,52 ****
--- 51,57 ----
  	  else
  	    strcpy(buffer, headers[msg]->from);
  	  sprintf(in_reply_to, "%s; from \"%s\" at %s %s, %s %s",
+                   headers[msg]->messageid[0] == '\0'? "<no.id>":
  		  headers[msg]->messageid,
  		  buffer,
  		  headers[msg]->month,

Index: src/newmbox.c
Prereq: 2.37
*** ../elm2.2/src/newmbox.c	Wed Apr 26 12:12:06 1989
--- src/newmbox.c	Wed May 24 19:27:11 1989
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: newmbox.c,v 2.37 89/04/26 11:41:10 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.37 $   $State: Exp $
   *
   * 			Copyright (c) 1988, USENET Community Trust
   * 			Copyright (c) 1988, 1989 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: newmbox.c,v 2.38 89/05/24 19:27:08 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.38 $   $State: Exp $
   *
   * 			Copyright (c) 1988, USENET Community Trust
   * 			Copyright (c) 1988, 1989 USENET Community Trust
***************
*** 14,19 ****
--- 14,23 ----
   *
   *******************************************************************************
   * $Log:	newmbox.c,v $
+  * Revision 2.38  89/05/24  19:27:08  syd
+  * Fix garbage headers on reply by setting up no.id header
+  * From: Dave Taylor
+  * 
   * Revision 2.37  89/04/26  11:41:10  syd
   * This fixes bug EB13, whereby if there was a Status: header for a message,
   * elm would lose track of status information (such as Priority:), because
***************
*** 437,442 ****
--- 441,447 ----
  	      strcpy(current_header->subject, "");	/* clear subj    */
  	      strcpy(current_header->to, "");		/* clear to    */
  	      strcpy(current_header->mailx_status, "");	/* clear status flags */
+ 	      strcpy(current_header->messageid, "<no.id>"); /* set no id into message id */
  	      current_header->encrypted = 0;		/* clear encrypted */
  	      current_header->exit_disposition = UNSET;
  	      current_header->status_chgd = FALSE;

Index: src/softkeys.c
Prereq: 2.8
*** ../elm2.2/src/softkeys.c	Thu Mar 30 10:37:35 1989
--- src/softkeys.c	Wed May 24 19:54:35 1989
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: softkeys.c,v 2.8 89/03/25 21:47:25 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.8 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: softkeys.c,v 2.9 89/05/24 19:54:19 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 2.9 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989 USENET Community Trust
***************
*** 14,19 ****
--- 14,23 ----
   *
   *******************************************************************************
   * $Log:	softkeys.c,v $
+  * Revision 2.9  89/05/24  19:54:19  syd
+  * Fix wrap of PF1 name
+  * From: Scott Garfinkle
+  * 
   * Revision 2.8  89/03/25  21:47:25  syd
   * Initial 2.2 Release checkin
   * 
***************
*** 30,36 ****
  
  	if (level == MAIN) {
  
! 	  define_key(f1, "  Display  Msg",   "\r");
  	  define_key(f2, "  Mail     Msg",   "m");
  	  define_key(f3, "  Reply  to Msg",  "r");
  
--- 34,40 ----
  
  	if (level == MAIN) {
  
! 	  define_key(f1, " Display   Msg",   "\r");
  	  define_key(f2, "  Mail     Msg",   "m");
  	  define_key(f3, "  Reply  to Msg",  "r");
  

Index: utils/Makefile.SH
Prereq: 2.19
*** ../elm2.2/utils/Makefile.SH	Mon Apr 24 20:26:30 1989
--- utils/Makefile.SH	Wed May 24 19:36:03 1989
***************
*** 16,22 ****
  echo "Extracting utils/Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
  
! # @(#)$Id: Makefile.SH,v 2.19 89/04/24 20:17:15 syd Exp $
  #
  #  Makefile for the Elm system utilities
  #
--- 16,22 ----
  echo "Extracting utils/Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
  
! # @(#)$Id: Makefile.SH,v 2.20 89/05/24 19:35:48 syd Exp $
  #
  #  Makefile for the Elm system utilities
  #
***************
*** 29,34 ****
--- 29,38 ----
  #			dsinc!elm
  #
  # $Log:	Makefile.SH,v $
+ # Revision 2.20  89/05/24  19:35:48  syd
+ # Fix some of the remote install files
+ # From: David Newall
+ # 
  # Revision 2.19  89/04/24  20:17:15  syd
  # Remove bad include
  # 
***************
*** 93,104 ****
  			$(REMOTE)$(DEST)/checkalias	\
  			$(REMOTE)$(DEST)/fastmail	\
  			$(REMOTE)$(DEST)/frm		\
! 			$(REMOVE)$(DEST)/listalias	\
! 			$(REMOVE)$(DEST)/messages	\
! 			$(REMOVE)$(DEST)/newalias	\
! 			$(REMOVE)$(DEST)/newmail	\
! 			$(REMOVE)$(DEST)/printmail	\
! 			$(REMOVE)$(DEST)/readmsg
  
  #		List of programs in bin directory
  BINARY_LIST	=	$(BIN)/answer		\
--- 97,108 ----
  			$(REMOTE)$(DEST)/checkalias	\
  			$(REMOTE)$(DEST)/fastmail	\
  			$(REMOTE)$(DEST)/frm		\
! 			$(REMOTE)$(DEST)/listalias	\
! 			$(REMOTE)$(DEST)/messages	\
! 			$(REMOTE)$(DEST)/newalias	\
! 			$(REMOTE)$(DEST)/newmail	\
! 			$(REMOTE)$(DEST)/printmail	\
! 			$(REMOTE)$(DEST)/readmsg
  
  #		List of programs in bin directory
  BINARY_LIST	=	$(BIN)/answer		\
***************
*** 202,208 ****
  			-$(RM) $(DEST)/readmsg.old
  			-$(RM) $(DEST)/wnewmail.old
  			$(CP) $(REMOTE_LIST) $(DEST)
! 			$(LN) $(REMOTE)$(DEST)/wnewmail $(DEST)
  			$(CHMOD) a+rx $(INSTALL_LIST)
  
  rmt-defined:
--- 206,212 ----
  			-$(RM) $(DEST)/readmsg.old
  			-$(RM) $(DEST)/wnewmail.old
  			$(CP) $(REMOTE_LIST) $(DEST)
! 			$(LN) $(DEST)/newmail $(DEST)/wnewmail
  			$(CHMOD) a+rx $(INSTALL_LIST)
  
  rmt-defined:

-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.				Voice: (215) 947-9900
syd@DSI.COM or {bpa,vu-vlsi}!dsinc!syd	        FAX:   (215) 938-0235