The Makefile patch will vary from system to system.  Systems with
a common makefile for RN and RRN need different changes.  The change
is pretty trivial, just add 'filtpipe.o' to the object file list.

diff -c old/Makefile ./Makefile
*** old/Makefile	Tue Apr 25 16:15:43 1989
--- ./Makefile	Tue Apr 25 16:15:51 1989
***************
*** 36,46 ****
  
  c = $(c1) $(c2) $(c3) $(c4)
  
  
  obj1 = addng.o art.o artio.o artsrch.o backpage.o bits.o cheat.o
  obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
  obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o
! obj4 = respond.o rn.o search.o sw.o term.o util.o
  
  obj = $(obj1) $(obj2) $(obj3) $(obj4)
  
--- 36,47 ----
  
  c = $(c1) $(c2) $(c3) $(c4)
  
+ FILTO=filtpipe.o
  
  obj1 = addng.o art.o artio.o artsrch.o backpage.o bits.o cheat.o
  obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
  obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o
! obj4 = respond.o rn.o search.o sw.o term.o util.o $(FILTO)
  
  obj = $(obj1) $(obj2) $(obj3) $(obj4)
  
diff -c old/art.c ./art.c
*** old/art.c	Wed Apr 26 22:10:33 1989
--- ./art.c	Wed Apr 26 22:28:10 1989
***************
*** 751,756 ****
--- 751,759 ----
      case 'p':	case 'P':	case Ctl('p'):	
  		case 'Q':
      case 'r':	case 'R':	case Ctl('r'):
+ #ifdef NEWSFILTER
+     case 'T':
+ #endif
      case 'v':
  		case 'Y':
  #ifndef ROTATION
***************
*** 765,771 ****
  	reread = FALSE;
  	do_hiding = TRUE;
  	if (index("nNpP",*buf) == Nullch &&
! 	  index("wWsS!&|/?123456789.",*buf) != Nullch) {
  	    setdfltcmd();
  	    standout();		/* enter standout mode */
  	    printf(prompt,mailcall,dfltcmd);
--- 768,778 ----
  	reread = FALSE;
  	do_hiding = TRUE;
  	if (index("nNpP",*buf) == Nullch &&
! #ifdef NEWSFILTER
! 	  index("wWsST!&|/?123456789.",*buf) != Nullch) {
! #else
! 	  index("wWsS!&|/?123456789.",*buf) != Nullch) {  /* } */
! #endif
  	    setdfltcmd();
  	    standout();		/* enter standout mode */
  	    printf(prompt,mailcall,dfltcmd);
diff -c old/config.h ./config.h
*** old/config.h	Tue Apr 25 16:16:42 1989
--- ./config.h	Wed Apr 26 00:55:22 1989
***************
*** 77,79 ****
--- 77,82 ----
  #undef	GETHOSTNAME	/* do we have a gethostname function? */
  #undef	DOUNAME		/* do we have a uname function? */
  #define	PHOSTNAME "uuname -l"	/* how to get host name with popen */
+ 
+ #define NEWSFILTER 1	/* support news filter protocol */
+ #define RTFILTER 1	/* filter as articles are read instead of in advance */
diff -c old/final.c ./final.c
*** old/final.c	Tue Apr 25 16:12:42 1989
--- ./final.c	Tue Apr 25 16:13:09 1989
***************
*** 51,56 ****
--- 51,59 ----
  finalize(status)
  int status;
  {
+ #ifdef NEWSFILTER
+     filter_quit();
+ #endif
      if (bizarre)
  	resetty();
      UNLINK(lockname);
diff -c old/init.c ./init.c
*** old/init.c	Tue Apr 25 16:06:39 1989
--- ./init.c	Tue Apr 25 16:06:41 1989
***************
*** 148,153 ****
--- 148,156 ----
  /*  sw_init();      already done */
  /*  term_init();	already done */
      util_init();
+ #ifdef NEWSFILTER
+ 	filter_init(dotdir);
+ #endif
  
  #ifdef FINDNEWNG
      fstat(actfp->_file,&filestat);	/* did active file grow? */
diff -c old/ng.c ./ng.c
*** old/ng.c	Wed May  3 00:16:13 1989
--- ng.c	Wed May  3 01:15:11 1989
***************
*** 194,199 ****
--- 194,225 ----
  #ifdef CACHESUBJ
      subj_list = Null(char **);		/* no subject list till needed */
  #endif
+ 
+ #ifdef NEWSFILTER
+ 	if( !no_filter_group( ngname ) )
+ # ifdef RTFILTER
+ 		;
+ # else RTFILTER
+ 
+ 		{
+ 		ART_NUM i;
+ 		fputs( "\nFiltering...\n", stdout ) FLUSH;
+ 		for( i = firstart; i < lastart; i++ )
+ 			if( !was_read(i) ) {
+ #ifdef SERVER
+ 				/* Ideally we should use query filtering here
+ 				   so that we only have to read the header */
+ 	    			artopen(art);
+ 	    			sprintf( artname, "/tmp/rrn%ld.%d", (long)i, our_pid );
+ 				if( !filter_art( artname, (char*)0, ngname, i)) 
+ #else
+ 				if( !filter_art( spool, ngdir, ngname, i ) ) 
+ #endif
+ 					mark_as_read( i );
+ 			}
+ 		}
+ # endif RTFILTER
+ #endif
      
      /* initialize control bitmap */
  
***************
*** 383,388 ****
--- 409,430 ----
  	    continue;
  	}
  	else {				/* we have a real live article */
+ #ifdef NEWSFILTER
+ # ifdef RTFILTER
+ #  ifdef SERVER
+ 	    artopen(art);	/* be sure it is open and created */
+ 	    sprintf( artname, "/tmp/rrn%ld.%d", (long)art, our_pid );
+ 	    if( !reread && !filter_art( artname, (char *)0, ngname, art ) ) {
+ #  else SERVER
+ 	    if( !reread && !filter_art( spool, ngdir, ngname, art ) ) {
+ #  endif SERVER
+ 		printf( "\nFiltered %ld", art ) FLUSH;
+ 		mark_as_read( art );
+ 		art++;
+ 		continue;
+ 	    }
+ # endif RTFILTER
+ #endif
  	    skipstate = 0;		/* back to none skipped */
  	    if (art != curr_art) {
  		recent_art = curr_art;
***************
*** 657,663 ****
      {		/* search for article by pattern */
  	char cmd = *buf;
  	
! 	reread = TRUE;		/* assume this */
  	switch (art_search(buf, (sizeof buf), TRUE)) {
  	case SRCH_ERROR:
  	    return AS_ASK;
--- 699,706 ----
      {		/* search for article by pattern */
  	char cmd = *buf;
  	
! 	if( cmd != Ctl('n') )
! 		reread = TRUE;		/* assume this */
  	switch (art_search(buf, (sizeof buf), TRUE)) {
  	case SRCH_ERROR:
  	    return AS_ASK;
***************
*** 986,991 ****
--- 1029,1044 ----
  #ifdef STRICTCR
      case '\n':
  	fputs(badcr,stdout) FLUSH;
+ 	return AS_ASK;
+ #endif
+ #ifdef NEWSFILTER
+     case 'T':				/* talk to news filter */
+ 	if( !finish_command(TRUE) )
+ 		return AS_ASK;		/* aborted talk command */
+ 	if( !filter_command( buf ) ) {
+ 		printf("\n%s",hforhelp) FLUSH;
+ 		settle_down();
+ 	}
  	return AS_ASK;
  #endif
      default:

