[comp.sources.bugs] PC-MAIL release 2, Patch 2

wswietse@lso.win.tue.nl (Wietse Venema) (02/04/90)

This patch solves a problem with garbled To: lines in the daemon
support software. It has no effect if mail transport is done via
the UUCP file transfer programs. The error must have crept in
when merging different production versions of the same software.

In order to apply this patch, cd to the `daemon' subdirectory and
feed this article to the patch command. If you do not have patch,
just replace the expression "n == 0" by "n++ == 0" at line 435 in 
the file pc-maild.c.

*** pc-maild.c-	Tue Jan 30 11:58:24 1990
--- pc-maild.c	Tue Jan 30 11:36:08 1990
***************
*** 50,62 ****
  /* CREATION DATE
  /*	Sun Oct 22 22:12:15 MED 1989
  /* LAST MODIFICATION
! /*	1/6/90 19:45:05
  /* VERSION/RELEASE
! /*	1.6
  /*--*/
  
  #ifndef lint
! static char sccsid[] = "@(#) pc-maild.c 1.6 1/6/90 19:45:05";
  
  #endif
  
--- 50,62 ----
  /* CREATION DATE
  /*	Sun Oct 22 22:12:15 MED 1989
  /* LAST MODIFICATION
! /*	1/30/90 11:42:09
  /* VERSION/RELEASE
! /*	1.7
  /*--*/
  
  #ifndef lint
! static char sccsid[] = "@(#) pc-maild.c 1.7 1/30/90 11:42:09";
  
  #endif
  
***************
*** 432,438 ****
      (void) fprintf(pfp, "From: %s (%s)\n", uinfo->pw_name,
  	    fullname(uinfo));			/* add From: header line */
      for (name = strtok(dest, sep); name; name = strtok((char *) 0, sep))
! 	(void) fprintf(pfp, "%s%s", n == 0 ? "To: " : ",\n    ", name);
      if (n)
  	(void) putc('\n', pfp);
  }
--- 432,438 ----
      (void) fprintf(pfp, "From: %s (%s)\n", uinfo->pw_name,
  	    fullname(uinfo));			/* add From: header line */
      for (name = strtok(dest, sep); name; name = strtok((char *) 0, sep))
! 	(void) fprintf(pfp, "%s%s", n++ == 0 ? "To: " : ",\n    ", name);
      if (n)
  	(void) putc('\n', pfp);
  }

wietse@wzv.win.tue.nl (Wietse Z. Venema) (02/11/90)

This is a re-post of a patch posted earlier.  Apparently, patch 1 
never made it out of our country; every now and then there seems 
to be a major lossage of news at or national or continental back 
bone.

This patch solves a problem with garbled To: lines in the daemon
support software. It has no effect if mail transport is done via
the UUCP file transfer programs. The error must have crept in
when merging different production versions of the same software.

In order to apply this patch, cd to the `daemon' subdirectory and
feed this article to the patch command. If you do not have patch,
just replace the expression "n == 0" by "n++ == 0" at line 435 in 
the file pc-maild.c.

*** pc-maild.c-	Tue Jan 30 11:58:24 1990
--- pc-maild.c	Tue Jan 30 11:36:08 1990
***************
*** 50,62 ****
  /* CREATION DATE
  /*	Sun Oct 22 22:12:15 MED 1989
  /* LAST MODIFICATION
! /*	1/6/90 19:45:05
  /* VERSION/RELEASE
! /*	1.6
  /*--*/
  
  #ifndef lint
! static char sccsid[] = "@(#) pc-maild.c 1.6 1/6/90 19:45:05";
  
  #endif
  
--- 50,62 ----
  /* CREATION DATE
  /*	Sun Oct 22 22:12:15 MED 1989
  /* LAST MODIFICATION
! /*	1/30/90 11:42:09
  /* VERSION/RELEASE
! /*	1.7
  /*--*/
  
  #ifndef lint
! static char sccsid[] = "@(#) pc-maild.c 1.7 1/30/90 11:42:09";
  
  #endif
  
***************
*** 432,438 ****
      (void) fprintf(pfp, "From: %s (%s)\n", uinfo->pw_name,
  	    fullname(uinfo));			/* add From: header line */
      for (name = strtok(dest, sep); name; name = strtok((char *) 0, sep))
! 	(void) fprintf(pfp, "%s%s", n == 0 ? "To: " : ",\n    ", name);
      if (n)
  	(void) putc('\n', pfp);
  }
--- 432,438 ----
      (void) fprintf(pfp, "From: %s (%s)\n", uinfo->pw_name,
  	    fullname(uinfo));			/* add From: header line */
      for (name = strtok(dest, sep); name; name = strtok((char *) 0, sep))
! 	(void) fprintf(pfp, "%s%s", n++ == 0 ? "To: " : ",\n    ", name);
      if (n)
  	(void) putc('\n', pfp);
  }