[comp.sources.unix] v23i002: Deliver 2.0 patches, Part02/10

rsalz@bbn.com (Rich Salz) (08/31/90)

Submitted-by: Chip Salzenberg <tct!chip@uunet.uu.net>
Posting-number: Volume 23, Issue 2
Archive-name: deliver2.0pch/part02

Patch #3 for Deliver 2.0 includes only one changes, but it's an important
one if you're using a picky mail user agent like the Xenix /usr/bin/mail.

If a message has a valid From_ line, Deliver retains it.  However, if the
From_ line has a "remote from" clause, Deliver prepends the remote host to
the From_ address.  Unfortunately, a small bug in the "remote from" removal
left a spurious space at the end of the From_ line.  This patch removes that
space.

This patch contains changes to the following files:
	patchlevel.h
	copymsg.c

Index: patchlevel.h
Prereq: 2
***************
*** 1,1 ****
! #define PATCHLEVEL 2
--- 1,1 ----
! #define PATCHLEVEL 3

Index: copymsg.c
***************
*** 1,3 ****
! /* $Header: copymsg.c,v 2.2 89/09/29 18:17:53 network Exp $
   *
   * Take the message from standard input and write it to two temp files,
--- 1,3 ----
! /* $Header: copymsg.c,v 2.3 89/11/27 14:18:29 network Exp $
   *
   * Take the message from standard input and write it to two temp files,
***************
*** 5,8 ****
--- 5,11 ----
   *
   * $Log:	copymsg.c,v $
+  * Revision 2.3  89/11/27  14:18:29  network
+  * Strip trailing spaces from date on From_ line.
+  * 
   * Revision 2.2  89/09/29  18:17:53  network
   * Save message when delivery file produces no output,
***************
*** 135,138 ****
--- 138,142 ----
  		/*
  		 * Advance to first non-space in date.
+ 		 * Strip trailing spaces from date.
  		 * If there is no date, clear the date pointer.
  		 */
***************
*** 140,143 ****
--- 144,150 ----
  		while (*fdate && isspace(*fdate))
  			++fdate;
+ 		p = fdate + strlen(fdate);
+ 		while (p > fdate && isspace(*(p - 1)))
+ 			*--p = 0;
  		if (*fdate == 0)
  			fdate = NULL;


exit 0 # Just in case...
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.