elm 2.3 Patch #6

Syd Weinstein syd at dsinc.DSI.COM
Thu Aug 16 14:04:15 AEST 1990


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

The newly introduced function 'stricmp' has a name conflict with a libc
function under SunOS 4.1.  Changed name to istrcmp.
From: scs at lokkur.dexter.mi.us (Steve Simmons)

Change resync not to delete empty files
From: Syd

the user's (unmodified) limit criteria was being compared w/
the lower-case version of the header contents.
From: dwolfe at earth.sps.mot.com (Dave Wolfe)

deal with several of the problems that have come up trying to use the MMDF
submit program directly rather than going through the sendmail stub
included with MMDF.  This should take care of the problem of not being
able to send mail to usernames beginning with "i" and with the
'No valid author specified' problem.
From: jac%brahms.tinton.ccur.com at RELAY.CS.NET

Fix to use time instead of bytes for changes to file and to process
each entry on delete properly
From: Denis Lambot <d241s016!lde at swn.siemens.be>


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 -d
		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 at DSI.COM

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

	Subject: patch list
	send index elm

Index: hdrs/patchlevel.h
Prereq: 5
*** ../elm2.3/hdrs/patchlevel.h	Thu Jul 12 23:35:15 1990
--- hdrs/patchlevel.h	Thu Jul 12 23:38:11 1990
***************
*** 1 ****
! #define PATCHLEVEL 5
--- 1 ----
! #define PATCHLEVEL 6

Index: Configure
Prereq: 4.1.1.8
*** ../elm2.3/Configure	Thu Jul 12 23:35:17 1990
--- Configure	Wed Aug 15 22:42:35 1990
***************
*** 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.rel/RCS/Configure,v 4.1.1.8 90/07/12 23:24:37 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.rel/RCS/Configure,v 4.1.1.9 90/08/15 22:42:11 syd Exp $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
***************
*** 262,268 ****
  attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
  d_newshome="/usr/NeWS"
  defvoidused=7
! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb /usr/convex /usr/mmdf/bin ${BSDBASE-/bsd}/usr/ucb ${BSDBASE-/bsd}/bin ${BSDBASE-/bsd}/usr/bin"
  
  : check for out bin directory
  if test ! -d ../bin; then
--- 262,270 ----
  attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
  d_newshome="/usr/NeWS"
  defvoidused=7
! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/5bin /vol/local/bin /etc"
! pth="$pth /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb"
! pth="$pth /usr/convex /usr/mmdf/bin /usr/mmdf/lib ${BSDBASE-/bsd}/usr/ucb ${BSDBASE-/bsd}/bin ${BSDBASE-/bsd}/usr/bin"
  
  : check for out bin directory
  if test ! -d ../bin; then
***************
*** 3248,3254 ****
  elif $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
      echo "You have void (*signal())() instead of int."
      d_voidsig="$define"
! elif $contains 'extern.*signal' $$.tmp >/dev/null 2>&1 ; then
      echo "You have int (*signal())() instead of void."
      d_voidsig="$undef"
  elif $test -n "$d_voidsig"; then
--- 3250,3256 ----
  elif $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
      echo "You have void (*signal())() instead of int."
      d_voidsig="$define"
! elif $contains 'extern[ 	]*signal' $$.tmp >/dev/null 2>&1 ; then
      echo "You have int (*signal())() instead of void."
      d_voidsig="$undef"
  elif $test -n "$d_voidsig"; then
***************
*** 3558,3567 ****
  mailgrp=`$expr "$mailgrp" : "[ld][rwxstS-]*[ 0123456789]*\(.*\)"`
  : now mailgrp is either    user group size mon day time/year name
  : or                       group size mon day time/year name
! try1=`$expr "$mailgrp" : "[A-z0-9]* *\([A-z0-9]*\).*"`
  try1a=`$expr "$try1" : "\([0-9]*\).*"`
  if $test "$try1" = "$try1a"; then
!     mailgrp=`$expr "$mailgrp" : "\([A-z0-9]*\).*"`
  else
      mailgrp="$try1"
  fi
--- 3560,3569 ----
  mailgrp=`$expr "$mailgrp" : "[ld][rwxstS-]*[ 0123456789]*\(.*\)"`
  : now mailgrp is either    user group size mon day time/year name
  : or                       group size mon day time/year name
! try1=`$expr "$mailgrp" : "[A-Za-z_0-9]* *\([A-Za-z_0-9]*\).*"`
  try1a=`$expr "$try1" : "\([0-9]*\).*"`
  if $test "$try1" = "$try1a"; then
!     mailgrp=`$expr "$mailgrp" : "\([A-Za-z_0-9]*\).*"`
  else
      mailgrp="$try1"
  fi

Index: Patchlist
*** ../elm2.3/Patchlist	Tue Jun 26 21:09:00 1990
--- Patchlist	Wed Aug 15 22:44:50 1990
***************
*** 1,3 ****
--- 1,50 ----
+ 	Elm 2.3 Patch 6 - Misc bug fixes
+ 	Wed Aug 15 22:43:46 EDT 1990 (Creation date, not posting date)
+ The newly introduced function 'stricmp' has a name conflict with a libc
+ function under SunOS 4.1.  Changed name to istrcmp.
+ From: scs at lokkur.dexter.mi.us (Steve Simmons)
+ 
+ Change resync not to delete empty files
+ From: Syd
+ 
+ the user's (unmodified) limit criteria was being compared w/
+ the lower-case version of the header contents.
+ From: dwolfe at earth.sps.mot.com (Dave Wolfe)
+ 
+ deal with several of the problems that have come up trying to use the MMDF
+ submit program directly rather than going through the sendmail stub
+ included with MMDF.  This should take care of the problem of not being
+ able to send mail to usernames beginning with "i" and with the
+ 'No valid author specified' problem.
+ From: jac%brahms.tinton.ccur.com at RELAY.CS.NET
+ 
+ Fix to use time instead of bytes for changes to file and to process
+ each entry on delete properly
+ From: Denis Lambot <d241s016!lde at swn.siemens.be>
+ 
+ 	Elm 2.3 Patch 5 - Misc bug fixes
+ 	Thu Jul 12 23:37:22 EDT 1990 (Creation date, not posting date)
+ Be sure that output characters are not negative integers.
+ From: tct!chip at uunet.UU.NET (Chip Salzenberg)
+ 
+ patch fixes some minor typing mistakes in error messages
+ From: hz247bi at duc220.uni-duisburg.de (Bieniek)
+ 
+ Fix cursor getting lost on some system calls by forcing
+ an absolute move.
+ From: Syd, reported by Douglas Lamb
+ 
+ When Elm is compiled with the NO_XHEADER symbol defined, it failed
+ to put a blank line between the message header and message body.
+ From: mca at medicus.medicus.com (Mark Adams)
+ 
+ Fix MMDF case, where MSG_SEPERATOR has newline, buffer check
+ didnt, thus it didnt detect the MSG_SEPERATOR.
+ From: jbwaters at bsu-cs.bsu.edu (J. Brian Waters)
+ 
+ Make domain name checking case independent
+ From: Syd, reported by Steven Baur
+ 
  	Elm 2.3 Patch 4 - 8 Bit Changes
  	Tue Jun 26 20:45:13 EDT 1990 (Creation date, not posting date)
  Fix encoding to encode lines that start with [ and are not

Index: src/aliaslib.c
Prereq: 4.1.1.3
*** ../elm2.3/src/aliaslib.c	Thu Jul 12 23:35:18 1990
--- src/aliaslib.c	Thu Aug  2 21:57:55 1990
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1.1.3 90/07/12 23:18:17 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1.1.4 90/08/02 21:57:53 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
***************
*** 14,19 ****
--- 14,24 ----
   *
   *******************************************************************************
   * $Log:	aliaslib.c,v $
+  * Revision 4.1.1.4  90/08/02  21:57:53  syd
+  * The newly introduced function 'stricmp' has a name conflict with a libc
+  * function under SunOS 4.1.  Changed name to istrcmp.
+  * From: scs at lokkur.dexter.mi.us (Steve Simmons)
+  * 
   * Revision 4.1.1.3  90/07/12  23:18:17  syd
   * Make domain name checking case independent
   * From: Syd, reported by Steven Baur
***************
*** 286,292 ****
  
  	loc = hash_it(word, size);
  
! 	while (stricmp(word, table[loc].name) != 0) {
  	  if (table[loc].name[0] == '\0')
  	    return(-1);
  	  loc = (loc + 1) % size;
--- 291,297 ----
  
  	loc = hash_it(word, size);
  
! 	while (istrcmp(word, table[loc].name) != 0) {
  	  if (table[loc].name[0] == '\0')
  	    return(-1);
  	  loc = (loc + 1) % size;
***************
*** 296,302 ****
  }
  
  int
! stricmp(s1,s2)
  register char *s1, *s2;
  {
  	/* case insensitive comparison */
--- 301,307 ----
  }
  
  int
! istrcmp(s1,s2)
  register char *s1, *s2;
  {
  	/* case insensitive comparison */

Index: src/init.c
Prereq: 4.1.1.1
*** ../elm2.3/src/init.c	Thu Jul 12 23:35:21 1990
--- src/init.c	Thu Aug  2 21:57:58 1990
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: init.c,v 4.1.1.1 90/07/12 23:19:17 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: init.c,v 4.1.1.2 90/08/02 21:57:56 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
***************
*** 14,19 ****
--- 14,24 ----
   *
   *******************************************************************************
   * $Log:	init.c,v $
+  * Revision 4.1.1.2  90/08/02  21:57:56  syd
+  * The newly introduced function 'stricmp' has a name conflict with a libc
+  * function under SunOS 4.1.  Changed name to istrcmp.
+  * From: scs at lokkur.dexter.mi.us (Steve Simmons)
+  * 
   * Revision 4.1.1.1  90/07/12  23:19:17  syd
   * Make domain name checking case independent
   * From: Syd, reported by Steven Baur
***************
*** 267,273 ****
  	hostlen = strlen(hostname);
  	domlen = strlen(hostdomain);
  	if (hostlen >= domlen) {
! 	  if (stricmp(&hostname[hostlen - domlen], hostdomain) == 0)
  	    strcpy(hostfullname, hostname);
  	  else {
  	    strcpy(hostfullname, hostname);
--- 272,278 ----
  	hostlen = strlen(hostname);
  	domlen = strlen(hostdomain);
  	if (hostlen >= domlen) {
! 	  if (istrcmp(&hostname[hostlen - domlen], hostdomain) == 0)
  	    strcpy(hostfullname, hostname);
  	  else {
  	    strcpy(hostfullname, hostname);
***************
*** 274,280 ****
  	    strcat(hostfullname, hostdomain);
  	  }
  	} else {
! 	  if (stricmp(hostname, hostdomain + 1) == 0)
  	    strcpy(hostfullname, hostname);
  	  else {
  	    strcpy(hostfullname, hostname);
--- 279,285 ----
  	    strcat(hostfullname, hostdomain);
  	  }
  	} else {
! 	  if (istrcmp(hostname, hostdomain + 1) == 0)
  	    strcpy(hostfullname, hostname);
  	  else {
  	    strcpy(hostfullname, hostname);

Index: src/leavembox.c
Prereq: 4.1.1.3
*** ../elm2.3/src/leavembox.c	Fri Jun 22 00:00:02 1990
--- src/leavembox.c	Wed Aug 15 21:00:23 1990
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.3 90/06/21 22:51:52 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.4 90/08/15 21:00:07 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
***************
*** 14,19 ****
--- 14,23 ----
   *
   *******************************************************************************
   * $Log:	leavembox.c,v $
+  * Revision 4.1.1.4  90/08/15  21:00:07  syd
+  * Change elm to not delete empty folders on a resync
+  * From: Syd
+  * 
   * Revision 4.1.1.3  90/06/21  22:51:52  syd
   * Add time.h to includes as some OSs include needed substructure only
   * from time.h
***************
*** 452,458 ****
  	  }
  	  dprint(2, (debugfile, "\n\n"));
  
! 	} else if (folder_type == NON_SPOOL && !keep_empty_files) {
  
  	  /* i.e. if no messages were to be kept and this is not a spool
  	   * folder and we aren't keeping empty non-spool folders,
--- 456,462 ----
  	  }
  	  dprint(2, (debugfile, "\n\n"));
  
! 	} else if (folder_type == NON_SPOOL && !keep_empty_files && !resyncing) {
  
  	  /* i.e. if no messages were to be kept and this is not a spool
  	   * folder and we aren't keeping empty non-spool folders,
***************
*** 557,563 ****
  	  /* link or copy complete - remove temp keep file */
  	  unlink(temp_keep_file);
  
! 	} else if(folder_type == SPOOL || keep_empty_files) {
  
  	  /* if this is an empty spool file, or if this is an empty non spool 
  	   * file and we keep empty non spool files (we always keep empty
--- 561,567 ----
  	  /* link or copy complete - remove temp keep file */
  	  unlink(temp_keep_file);
  
! 	} else if(folder_type == SPOOL || keep_empty_files || resyncing) {
  
  	  /* if this is an empty spool file, or if this is an empty non spool 
  	   * file and we keep empty non spool files (we always keep empty

Index: src/mailmsg2.c
Prereq: 4.1.1.6
*** ../elm2.3/src/mailmsg2.c	Thu Jul 12 23:35:22 1990
--- src/mailmsg2.c	Wed Aug 15 22:02:41 1990
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 4.1.1.6 90/07/12 23:19:20 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.6 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 4.1.1.7 90/08/15 22:02:36 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.7 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
***************
*** 14,19 ****
--- 14,27 ----
   *
   *******************************************************************************
   * $Log:	mailmsg2.c,v $
+  * Revision 4.1.1.7  90/08/15  22:02:36  syd
+  * deal with several of the problems that have come up trying to use the MMDF
+  * submit program directly rather than going through the sendmail stub
+  * included with MMDF.  This should take care of the problem of not being
+  * able to send mail to usernames beginning with "i" and with the
+  * 'No valid author specified' problem.
+  * From: jac%brahms.tinton.ccur.com at RELAY.CS.NET
+  * 
   * Revision 4.1.1.6  90/07/12  23:19:20  syd
   * Make domain name checking case independent
   * From: Syd, reported by Steven Baur
***************
*** 370,377 ****
  	  else
  	    mailerflags[0] ='\0';
  
! 	  quote_args(very_long_buffer, strip_parens(strip_commas(expanded_to)));
! 	  strcpy(expanded_to, very_long_buffer);
  
  	  sprintf(very_long_buffer,"( (%s %s %s ; %s %s) & ) < %s", 
  		mailer, mailerflags, expanded_to,
--- 378,389 ----
  	  else
  	    mailerflags[0] ='\0';
  
! 	  if (strcmp(submitmail, mailer) == 0)
! 	    strcpy(expanded_to, " ");
! 	  else {
! 	    quote_args(very_long_buffer, strip_parens(strip_commas(expanded_to)));
! 	    strcpy(expanded_to, very_long_buffer);
! 	  }
  
  	  sprintf(very_long_buffer,"( (%s %s %s ; %s %s) & ) < %s", 
  		mailer, mailerflags, expanded_to,
***************
*** 673,678 ****
--- 685,693 ----
  	char  buffer[SLEN];
  	int   is_hidden_user;		/* someone we should know about?  */
  #endif
+ #ifdef MMDF
+ 	int   is_submit_mailer;		/* using submit means change From: */
+ #endif /* MMDF */
  
  	char  *get_arpa_date();
  
***************
*** 738,758 ****
  	fprintf(filedesc,"Date: %s\n", get_arpa_date());
  
  #ifndef DONT_ADD_FROM
  # ifdef SITE_HIDING
  	if (is_hidden_user)
  	  fprintf(filedesc,"From: %s <%s!%s!%s>\n", full_username,
  		  hostname, HIDDEN_SITE_NAME, username);
  	else
  # else
  #  ifdef  INTERNET
  #   ifdef  USE_DOMAIN
! 	fprintf(filedesc,"From: %s <%s@%s>\n", full_username, 
  		username, hostfullname);
  #   else
  	fprintf(filedesc,"From: %s <%s@%s>\n", full_username,
  		username, hostname);
  #   endif
  #  else
  	fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  		hostname, username);
  #  endif
--- 753,798 ----
  	fprintf(filedesc,"Date: %s\n", get_arpa_date());
  
  #ifndef DONT_ADD_FROM
+ #ifdef MMDF
+ 	is_submit_mailer = (strcmp(submitmail,mailer) == 0);
+ #endif /* MMDF */
  # ifdef SITE_HIDING
+ #    ifdef MMDF
+ 	if (is_submit_mailer)
+ 	  fprintf(filedesc,"From: %s <%s>\n", full_username, username);
+ 	else
+ #    endif /* MMDF */
  	if (is_hidden_user)
  	  fprintf(filedesc,"From: %s <%s!%s!%s>\n", full_username,
  		  hostname, HIDDEN_SITE_NAME, username);
  	else
+ 	  fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
+ 		  hostname, username);
  # else
  #  ifdef  INTERNET
  #   ifdef  USE_DOMAIN
! #    ifdef MMDF
! 	if (is_submit_mailer)
! 	  fprintf(filedesc,"From: %s <%s>\n", full_username, username);
! 	else
! #    endif /* MMDF */
! 	  fprintf(filedesc,"From: %s <%s@%s>\n", full_username, 
  		username, hostfullname);
  #   else
+ #    ifdef MMDF
+ 	if (is_submit_mailer)
+ 	  fprintf(filedesc,"From: %s <%s>\n", full_username, username);
+ 	else
+ #    endif /* MMDF */
  	fprintf(filedesc,"From: %s <%s@%s>\n", full_username,
  		username, hostname);
  #   endif
  #  else
+ #    ifdef MMDF
+ 	if (is_submit_mailer)
+ 	  fprintf(filedesc,"From: %s <%s>\n", full_username, username);
+ 	else
+ #    endif /* MMDF */
  	fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  		hostname, username);
  #  endif

Index: src/strings.c
Prereq: 4.1.1.2
*** ../elm2.3/src/strings.c	Fri Jun 22 00:00:05 1990
--- src/strings.c	Wed Aug 15 21:48:09 1990
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: strings.c,v 4.1.1.2 90/06/21 22:45:06 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: strings.c,v 4.1.1.3 90/08/15 21:48:07 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
***************
*** 14,19 ****
--- 14,24 ----
   *
   *******************************************************************************
   * $Log:	strings.c,v $
+  * Revision 4.1.1.3  90/08/15  21:48:07  syd
+  * the user's (unmodified) limit criteria was being compared w/
+  * the lower-case version of the header contents.
+  * From: dwolfe at earth.sps.mot.com (Dave Wolfe)
+  * 
   * Revision 4.1.1.2  90/06/21  22:45:06  syd
   * Make display not show To user if user is also sender
   * From: Marius Olafsson
***************
*** 364,372 ****
  
  	for (; *buffer && ! whitespace(*buffer); buffer++, first++)
  	  if (islower(*buffer))
- 	    *first = tolower(*buffer);
- 	  else
  	    *first = *buffer;
  
  	*first = '\0';
  	
--- 369,377 ----
  
  	for (; *buffer && ! whitespace(*buffer); buffer++, first++)
  	  if (islower(*buffer))
  	    *first = *buffer;
+ 	  else
+ 	    *first = tolower(*buffer);
  
  	*first = '\0';
  	
***************
*** 374,382 ****
  
  	for (; *buffer; buffer++, rest++)
  	  if (islower(*buffer))
- 	    *rest = tolower(*buffer);
- 	  else
  	    *rest = *buffer;
  
  	*rest = '\0';
  
--- 379,387 ----
  
  	for (; *buffer; buffer++, rest++)
  	  if (islower(*buffer))
  	    *rest = *buffer;
+ 	  else
+ 	    *rest = tolower(*buffer);
  
  	*rest = '\0';
  

Index: utils/arepdaem.c
Prereq: 4.1
*** ../elm2.3/utils/arepdaem.c	Sat Apr 28 22:44:34 1990
--- utils/arepdaem.c	Wed Aug 15 22:50:27 1990
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1 90/04/28 22:44:33 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1.1.2 90/08/15 22:50:14 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
***************
*** 14,19 ****
--- 14,28 ----
   *
   *******************************************************************************
   * $Log:	arepdaem.c,v $
+  * Revision 4.1.1.2  90/08/15  22:50:14  syd
+  * Fix last size to time call
+  * From: Syd
+  * 
+  * Revision 4.1.1.1  90/08/15  22:33:54  syd
+  * Fix to use time instead of bytes for changes to file and to process
+  * each entry on delete properly
+  * From: Denis Lambot <d241s016!lde at swn.siemens.be>
+  * 
   * Revision 4.1  90/04/28  22:44:33  syd
   * checkin of Elm 2.3 as of Release PL0
   * 
***************
*** 93,104 ****
        } reply_table[MAX_PEOPLE];
  
  FILE  *logfd;				/* logfile (log action)   */
! long  autoreply_size = 0L;		/* size of autoreply file */
  int   active = 0;			/* # of people 'enrolled' */
  
  FILE  *open_logfile();			/* forward declaration    */
  
  long  bytes();				/*       ditto 		  */
  
  #ifdef VOIDSIG
  void	term_signal();
--- 102,114 ----
        } reply_table[MAX_PEOPLE];
  
  FILE  *logfd;				/* logfile (log action)   */
! time_t autoreply_time = 0L;		/* modif date of autoreply file */
  int   active = 0;			/* # of people 'enrolled' */
  
  FILE  *open_logfile();			/* forward declaration    */
  
  long  bytes();				/*       ditto 		  */
+ time_t ModTime();			/*       ditto		  */
  
  #ifdef VOIDSIG
  void	term_signal();
***************
*** 110,115 ****
--- 120,126 ----
  {
  	long size;
  	int  person, data_changed;
+ 	time_t time;
  
  	if (fork()) exit(0);
  
***************
*** 133,141 ****
  
  	  /* 1. check to see if autoreply table has changed.. */
  
! 	  if ((size = bytes(autoreply_file)) != autoreply_size) {
  	    read_autoreply_file(); 
! 	    autoreply_size = size;
  	  }
  
  	  /* 2. now for each active person... */
--- 144,152 ----
  
  	  /* 1. check to see if autoreply table has changed.. */
  
! 	  if ((time = ModTime(autoreply_file)) != autoreply_time) {
  	    read_autoreply_file(); 
! 	    autoreply_time = time;
  	  }
  
  	  /* 2. now for each active person... */
***************
*** 169,175 ****
  int
  read_autoreply_file()
  {
! 	/** We're here because the autoreply file has changed size!!  It
  	    could either be because someone has been added or because
  	    someone has been removed...since the list will always be in
  	    order (nice, eh?) we should have a pretty easy time of it...
--- 180,186 ----
  int
  read_autoreply_file()
  {
! 	/** We're here because the autoreply file has changed!!  It
  	    could either be because someone has been added or because
  	    someone has been removed...since the list will always be in
  	    order (nice, eh?) we should have a pretty easy time of it...
***************
*** 217,226 ****
  
  	/** now check to see if anyone has been removed... **/
  
! 	for (person = 0; person < active; person++)
! 	  if (reply_table[person].in_list == 0) {
! 	     log("removing %s from the active list", 
! 		  reply_table[person].username);
  	    strcpy(reply_table[person].username, 
  		   reply_table[active-1].username);
  	    strcpy(reply_table[person].mailfile, 
--- 228,241 ----
  
  	/** now check to see if anyone has been removed... **/
  
! 	person = 0;
! 	while (person < active)
! 	  if (reply_table[person].in_list) {
! 	    person++;
! 	  }
! 	  else {
! 	    log("removing %s from the active list",
! 		   reply_table[person].username);
  	    strcpy(reply_table[person].username, 
  		   reply_table[active-1].username);
  	    strcpy(reply_table[person].mailfile, 
***************
*** 253,259 ****
  	fclose(file);
  
  /*	printf("updated autoreply file\n"); */
! 	autoreply_size = bytes(autoreply_file);
  }
  
  int
--- 268,274 ----
  	fclose(file);
  
  /*	printf("updated autoreply file\n"); */
! 	autoreply_time = ModTime(autoreply_file);
  }
  
  int
***************
*** 462,467 ****
--- 477,504 ----
  	    ok = 0;
  	
  	return(ok ? buffer.st_size : 0);
+ }
+ 
+ time_t
+ ModTime(name)
+ char *name;
+ {
+ 	/** return the modification time in the specified file.
+ 	    This is to check to see if autoreply has changed....  **/
+ 
+ 	int ok = 1;
+ 	extern int errno;	/* system error number! */
+ 	struct stat buffer;
+ 
+ 	if (stat(name, &buffer) != 0)
+ 	  if (errno != 2) {
+ 	   unlock();
+ 	   exit(fprintf(stderr,"Error %d attempting fstat on %s", errno, name));
+ 	  }
+ 	  else
+ 	    ok = 0;
+ 
+ 	return(ok ? buffer.st_mtime : (time_t) 0);
  }
  
  mail(to, subject, filename, person)

Index: utils/newalias.c
Prereq: 4.1.1.1
*** ../elm2.3/utils/newalias.c	Tue Jun  5 22:02:39 1990
--- utils/newalias.c	Thu Aug  2 21:58:01 1990
***************
*** 1,8 ****
  
! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.1 90/06/05 21:11:20 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
--- 1,8 ----
  
! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.2 90/08/02 21:57:58 syd Exp $";
  
  /*******************************************************************************
!  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
   *
   * 			Copyright (c) 1986, 1987 Dave Taylor
   * 			Copyright (c) 1988, 1989, 1990 USENET Community Trust
***************
*** 14,19 ****
--- 14,24 ----
   *
   *******************************************************************************
   * $Log:	newalias.c,v $
+  * Revision 4.1.1.2  90/08/02  21:57:58  syd
+  * The newly introduced function 'stricmp' has a name conflict with a libc
+  * function under SunOS 4.1.  Changed name to istrcmp.
+  * From: scs at lokkur.dexter.mi.us (Steve Simmons)
+  * 
   * Revision 4.1.1.1  90/06/05  21:11:20  syd
   * alias command in ELM2.3 fails because of the wrong sized aliases.hash
   * newalias did not truncate existing file (aliases.hash)
***************
*** 404,410 ****
  
  	loc = hash_it(word, size);
  
! 	while (table[loc].name[0] != '\0' && stricmp(table[loc].name,word) != 0)
  	  loc = (loc + 1) % size; 
  
  	if (table[loc].name[0] == '\0') {
--- 409,415 ----
  
  	loc = hash_it(word, size);
  
! 	while (table[loc].name[0] != '\0' && istrcmp(table[loc].name,word) != 0)
  	  loc = (loc + 1) % size; 
  
  	if (table[loc].name[0] == '\0') {
***************
*** 417,423 ****
  }
  
  int
! stricmp(s1,s2)
  register char *s1, *s2;
  {
  	/* case insensitive comparison */
--- 422,428 ----
  }
  
  int
! istrcmp(s1,s2)
  register char *s1, *s2;
  {
  	/* case insensitive comparison */
***************
*** 530,540 ****
  	if (hash_table_loaded || is_system) {
  	  loc = hash_it(name, MAX_SALIASES);
  
! 	  while (stricmp(name, shash_table[loc].name) != 0 && 
                   shash_table[loc].name[0] != '\0')
  	    loc = (loc + 1) % MAX_SALIASES; 
    
! 	  if (stricmp(name, shash_table[loc].name) == 0)
  	    return(1);	/* found it! */
  	}
  
--- 535,545 ----
  	if (hash_table_loaded || is_system) {
  	  loc = hash_it(name, MAX_SALIASES);
  
! 	  while (istrcmp(name, shash_table[loc].name) != 0 && 
                   shash_table[loc].name[0] != '\0')
  	    loc = (loc + 1) % MAX_SALIASES; 
    
! 	  if (istrcmp(name, shash_table[loc].name) == 0)
  	    return(1);	/* found it! */
  	}
  
***************
*** 541,551 ****
  	if (! is_system) {	/* okay! Let's check the user alias file! */
  	  loc = hash_it(name, MAX_UALIASES);
  
! 	  while (stricmp(name, uhash_table[loc].name) != 0 && 
                   uhash_table[loc].name[0] != '\0')
  	    loc = (loc + 1) % MAX_UALIASES; 
  
! 	  if (stricmp(name, uhash_table[loc].name) == 0)
  	    return(1);	/* found it! */
  	}
  
--- 546,556 ----
  	if (! is_system) {	/* okay! Let's check the user alias file! */
  	  loc = hash_it(name, MAX_UALIASES);
  
! 	  while (istrcmp(name, uhash_table[loc].name) != 0 && 
                   uhash_table[loc].name[0] != '\0')
  	    loc = (loc + 1) % MAX_UALIASES; 
  
! 	  if (istrcmp(name, uhash_table[loc].name) == 0)
  	    return(1);	/* found it! */
  	}
  

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



More information about the Comp.sources.bugs mailing list