From:	AITGW::"ake%DAYTON.SAIC.COM@VM1.NoDak.EDU" "Earle Ake"  7-AUG-1991 01:31:43.54
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	BUGFIX for extra "\n" in cross-posted article headers

Received: by AITGW.DECnet (utk-mail11 v1.5) ; Wed, 7 Aug 91 01:29:23 EDT
Received: from vm1.NoDak.edu by aitgw.ge.com (5.61/GE Gateway 1.3)
	id AA14350; Wed, 7 Aug 91 01:29:03 -0400
Message-Id: <9108070529.AA14350@aitgw.ge.com>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 2107; Wed, 07 Aug 91 00:25:47 CDT
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 5667; Wed, 07 Aug 91 00:25:46 CDT
Date:         Wed, 7 Aug 1991 01:54:12 GMT
Reply-To: Earle Ake <ake%DAYTON.SAIC.COM@VM1.NoDak.EDU>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Earle Ake <ake%DAYTON.SAIC.COM@VM1.NoDak.EDU>
Subject:      BUGFIX for extra "\n" in cross-posted article headers
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
        Below is a small patch to newspost.c for News 6.0-3.  This fixes a
spurious "\n" character from showing up in the middle of the headers of a
cross-posted article generated on the local system.  This caused the last
few headers to be interpreted as article text rather than headers.
 
 
-Earle
_____________________________________________________________________________
             ____ ____    ___
Earle Ake   /___ /___/ / /     Science Applications International Corporation
           ____//   / / /__                 Dayton, Ohio
-----------------------------------------------------------------------------
Internet: ake@dayton.saic.com        uucp: dayvb!ake         SPAN: 28284::ake
 
 
*** newspost.old;171
--- newspost.c
**************
*** 429,435
        fd,
        g,
        use_default = 1,
!       header = 0;
    time_t cur_time;
    int edit_switch = 0, control_switch = 0,
        line_count = 0,
--- 429,436 -----
        fd,
        g,
        use_default = 1,
!       header = 0,
!       file_headers = 0;
    time_t cur_time;
    int edit_switch = 0, control_switch = 0,
        line_count = 0,
**************
*** 680,685
          else if (crosspost && strncmp(xfrbuf,"Path:",5) && strncmp(xfrbuf,"CC:
",3)) {
            if (!strchr(xfrbuf,':')) fputs(xfrbuf,fpw);
            else {
              if (strncmp(xfrbuf,"X-",2)) fputs("X-",fpw);
              else fputs("X",fpw);
              fputs(xfrbuf,fpw);
--- 681,687 -----
          else if (crosspost && strncmp(xfrbuf,"Path:",5) && strncmp(xfrbuf,"CC:
",3)) {
            if (!strchr(xfrbuf,':')) fputs(xfrbuf,fpw);
            else {
+             ++file_headers;
              if (strncmp(xfrbuf,"X-",2)) fputs("X-",fpw);
              else fputs("X",fpw);
              fputs(xfrbuf,fpw);
**************
*** 1092,1098
    if (!linesseen) {
      fprintf(fpw,"Lines: %d\n",line_count);
      }
!   fprintf(fpw,"\n");
    while (fgets(xfrbuf,510,fpr)) fputs(xfrbuf,fpw);
    fclose(fpr);
    fclose(fpw);
--- 1094,1102 -----
    if (!linesseen) {
      fprintf(fpw,"Lines: %d\n",line_count);
      }
!   if ((!crosspost) || (crosspost && !file_headers)) {
!     fprintf(fpw,"\n");
!     }
    while (fgets(xfrbuf,510,fpr)) fputs(xfrbuf,fpw);
    fclose(fpr);
    fclose(fpw);
