Keepnews patch

Herb Barad barad at brand.UUCP
Sat Jun 8 06:57:37 AEST 1985


Certain news header are different than those assumed by the previous release
of keepnews.  For instance, our line:

Article-I.D.: 123

is really

Article 123 of net.random:

This following patch will cure this.  Other fixes are possible.



*** keepnews.c	Fri Jun  7 13:50:31 1985
--- keepnews.c.orig	Fri Jun  7 13:51:50 1985
***************
*** 37,43
  			 	"Newsgroups: ",
  			 	"Subject: ",
  			 	"Posted: ",
! 			 	"Article "	/* instead of Article-I.D.: */
  				} ;
  main(argc,argv) char **argv;
  {   FILE  *rlogfp, *flogfp, *filefp;

--- 37,43 -----
  			 	"Newsgroups: ",
  			 	"Subject: ",
  			 	"Posted: ",
! 			 	"Article-I.D.: "
  				} ;
  main(argc,argv) char **argv;
  {   FILE  *rlogfp, *flogfp, *filefp;
***************
*** 100,106
  	    exit(1);
  	  }
  	f += j + 1;
!         for (i = 0 ; i <= 3 ; i++)
  	    if (tmpline = match(line,head[i]))
  		{ strcpy(content[i],tmpline) ; break ; }
  	if (tmpline = match(line,head[4]))

--- 100,106 -----
  	    exit(1);
  	  }
  	f += j + 1;
!         for (i = 0 ; i <= 4 ; i++)
  	    if (tmpline = match(line,head[i]))
  		{ strcpy(content[i],tmpline) ; break ; }
        }
***************
*** 103,115
          for (i = 0 ; i <= 3 ; i++)
  	    if (tmpline = match(line,head[i]))
  		{ strcpy(content[i],tmpline) ; break ; }
- 	if (tmpline = match(line,head[4]))
- 	{
- 	  i=0;
- 	  while( tmpline[i] != ' ' )
- 	    {content[4][i] = tmpline[i];i++;}
- 	  content[4][i] = '\0';
- 	}
        }
  
      /* add '-t' and '-n' information to article information */

--- 103,108 -----
          for (i = 0 ; i <= 4 ; i++)
  	    if (tmpline = match(line,head[i]))
  		{ strcpy(content[i],tmpline) ; break ; }
        }
  
      /* add '-t' and '-n' information to article information */
-- 
Herb Barad	[USC - Signal and Image Processing Institute]

...!{lbl-csam,trwrb}!trwspf!herb		or
...!{lbl-csam,trwrb}!trwspf!brand!barad



More information about the Comp.sources.bugs mailing list