From:	ADVAX::"mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM" "William H. Glass"  4-FEB-1991 00:27:56.40
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: Buffalo Chicken Wings and ANU-NEWS

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Mon, 4 Feb 91 00:26:13 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AB11451 for ; Sun, 3 Feb 91 21:28:56 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA08962; Sun, 3 Feb 91 09:30:12 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9102031430.AA08962@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 6438; Sun, 03 Feb 91 08:29:49 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 1679; Sun, 03 Feb 91 08:29:47 CST
Date:         Sat, 2 Feb 91 22:39:01 CST
Reply-To: "William H. Glass" <mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: "William H. Glass" <mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM>
Subject:      Re: Buffalo Chicken Wings and ANU-NEWS
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
   Boy did I pick a bad time to post a big patch - just before Geoff
announced 6.0-2.  So, for all of you who are interested, I've redone
the patch for release 6.0-2.  If you missed the previous posting, this
will correct some problems that can cause ANU-NEWS to split an incoming
article into pieces, assign new message-ID's to the new parts, and resend
them back to the net.  Since each ANU-NEWS site does this, a storm of bogus
articles can result.
 
   Also, at the suggestion of Ross Smith, I've constructed this patch
as a VMS SHARE file to correct some problems apparently caused by some
long lines in the previous version.  The SHARE file will produce two
context diff files (NEWSADD.DIFF and NEWSCMD.DIFF).  These can then
be run through the context patch program to modify NEWSADD.C and
NEWSCMD.CLD.
 
--
 
William H. Glass                        Internet: glass@mgi.com
Management Graphics, Inc.               Phone:    +1 (612) 854-1220
1401 E. 79th Street
Minneapolis, MN  55425
 
$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.2-007  22-FEB-1990
$!   On  2-FEB-1991 22:23:17.59   By user GLASS
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. NEWSADD.DIFF;1
$!       2. NEWSCMD.DIFF;1
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$UNPACK: SUBROUTINE ! P1=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete 'f'*
$ exit
$file_absent:
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'."
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped."
$ delete 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=
CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));
LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);
IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;
MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;
ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=
1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";
POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);
ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;
COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,
"output_file"));ENDPROCEDURE;Unpacker;QUIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create 'f'
X*** newsadd.c;1
X--- newsadd.c
X**************
X*** 101,107
X `20
X  int do_add_net() `7B return(0); `7D
X `20
X! #else
X `20
X  static
X  int scanline_m = 0;
X--- 101,107 -----
X `20
X  int do_add_net() `7B return(0); `7D
X `20
X! char *create_article(char *fn, char *xref) `7B return(NULL); `7D
X `20
X  #else
X `20
X**************
X*** 103,108
X `20
X  #else
X `20
X  static
X  int scanline_m = 0;
X `20
X--- 103,110 -----
X `20
X  char *create_article(char *fn, char *xref) `7B return(NULL); `7D
X `20
X+ #else
X+`20
X  static
X  int scanline_m = 0;
X `20
X**************
X*** 184,189
X      no_add = 0,
X      mod_add = 0,
X      control_squelch = 0,
X      temp_file_error = 0,
X      loc_junk = 0;
X `20
X--- 186,192 -----
X      no_add = 0,
X      mod_add = 0,
X      control_squelch = 0,
X+     genid = 0,
X      temp_file_error = 0,
X      loc_junk = 0;
X `20
X**************
X*** 212,218
X    for (i = 0; i < NHEADERS; ++i) known_headers`5Bi`5D = &(itm`5Bi`5D`5B0`5
VD);
X    strcpy(newsgroup,ng);
X    mail_add_expiry = parse_expiry_date(itm`5BEXPIRES`5D);
X!   if (*itm`5BCONTROL`5D && !no_control) `7B
X      strcpy(newsgroup,"control");
X      if (   !skip_loop_test
X          && (
X--- 215,222 -----
X    for (i = 0; i < NHEADERS; ++i) known_headers`5Bi`5D = &(itm`5Bi`5D`5B0`5
VD);
X    strcpy(newsgroup,ng);
X    mail_add_expiry = parse_expiry_date(itm`5BEXPIRES`5D);
X!   if (!*itm`5BMESSAGE_ID`5D && genid) strcpy(itm`5BMESSAGE_ID`5D,gen_id())
V;
X!   if (*itm`5BCONTROL`5D && !no_control && *itm`5BMESSAGE_ID`5D) `7B
X      strcpy(newsgroup,"control");
X      if (   !skip_loop_test
X          && (
X**************
X*** 242,247
X      printf(": JUNK (No Newsgroup)");
X      strcpy(newsgroup,junk);
X      `7D
X `20
X  #if SELF_PATH_CHECK
X    if (!skip_loop_test && !mod_add && path_match(itm`5BPATH`5D,news_pathnam
Ve)) `7B
X--- 246,255 -----
X      printf(": JUNK (No Newsgroup)");
X      strcpy(newsgroup,junk);
X      `7D
X+   if (!*itm`5BMESSAGE_ID`5D) `7B
X+     printf(": REJECT (No Message-ID)\n");
X+     return;
X+     `7D
X `20
X  #if SELF_PATH_CHECK
X    if (!skip_loop_test && !mod_add && path_match(itm`5BPATH`5D,news_pathnam
Ve)) `7B
X**************
X*** 281,291
X          `7D
X        else `7B
X          if (strcmp(newsgroup,junk)) `7B
X-           if (!*itm_fname && !fn) `7B
X-             if (!(fn = create_article(NULL,NULL))) return;
X-             `7D
X-           sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5BDISTRIBU
VTION`5D,
X-                      ((*itm_fname) ? itm_fname : fn),itm`5BMESSAGE_ID`5D,!
Vmod_add);
X            if (!junk_it) `7B
X              printf(": REJECT (%s)\n",no_new_item);
X              return;
X--- 289,294 -----
X          `7D
X        else `7B
X          if (strcmp(newsgroup,junk)) `7B
X            if (!junk_it) `7B
X              if (!*itm_fname && !fn && !(fn = create_article(NULL,NULL))) r
Veturn;
X              sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5BDISTRI
VBUTION`5D,
X**************
X*** 287,292
X            sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5BDISTRIBU
VTION`5D,
X                       ((*itm_fname) ? itm_fname : fn),itm`5BMESSAGE_ID`5D,!
Vmod_add);
X            if (!junk_it) `7B
X              printf(": REJECT (%s)\n",no_new_item);
X              return;
X              `7D
X--- 290,299 -----
X        else `7B
X          if (strcmp(newsgroup,junk)) `7B
X            if (!junk_it) `7B
X+             if (!*itm_fname && !fn && !(fn = create_article(NULL,NULL))) r
Veturn;
X+             sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5BDISTRI
VBUTION`5D,
X+                             ((*itm_fname) ? itm_fname : fn),
X+                             itm`5BMESSAGE_ID`5D,!mod_add);
X              printf(": REJECT (%s)\n",no_new_item);
X              return;
X              `7D
X**************
X*** 331,338
X      `7D
X    if (*itm_fname) sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5B
VDISTRIBUTION`5D,itm_fname,itm`5BMESSAGE_ID`5D,!mod_add);
X    else `7B
X-     if (!fn && !(fn = create_article(NULL,NULL))) return;
X-     sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5BDISTRIBUTION`5
VD,fn,itm`5BMESSAGE_ID`5D,!mod_add);
X      if (strcmp(newsgroup,junk)) `7B
X        if (!junk_it) `7B
X          printf(": REJECT\n");
X--- 338,343 -----
X      `7D
X    if (*itm_fname) sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5B
VDISTRIBUTION`5D,itm_fname,itm`5BMESSAGE_ID`5D,!mod_add);
X    else `7B
X      if (strcmp(newsgroup,junk)) `7B
X        if (!junk_it) `7B
X          if (!fn && !(fn = create_article(NULL,NULL))) return;
X**************
X*** 335,340
X      sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5BDISTRIBUTION`5
VD,fn,itm`5BMESSAGE_ID`5D,!mod_add);
X      if (strcmp(newsgroup,junk)) `7B
X        if (!junk_it) `7B
X          printf(": REJECT\n");
X          return;
X          `7D
X--- 340,347 -----
X    else `7B
X      if (strcmp(newsgroup,junk)) `7B
X        if (!junk_it) `7B
X+         if (!fn && !(fn = create_article(NULL,NULL))) return;
X+         sys_remote_send(itm`5BPATH`5D,itm`5BNEWSGROUPS`5D,itm`5BDISTRIBUTI
VON`5D,fn,itm`5BMESSAGE_ID`5D,!mod_add);
X          printf(": REJECT\n");
X          return;
X          `7D
X**************
X*** 386,392
X    char oline`5B1024`5D, head`5B30`5D;
X    int i;
X `20
X-   if (!*itm`5BMESSAGE_ID`5D) strcpy(itm`5BMESSAGE_ID`5D,gen_id());
X    sprintf(oline,"%s%s %s VAX/VMS V%d.%d; site %s\n",fheaders`5BRELAY_VERSI
VON`5D,
X          NEWS_VERSION,NEWS_DDATE, vms_major,vms_minor,Node_address);
X    fout_line(oline,fpl);
X--- 393,398 -----
X    char oline`5B1024`5D, head`5B30`5D;
X    int i;
X `20
X    sprintf(oline,"%s%s %s VAX/VMS V%d.%d; site %s\n",fheaders`5BRELAY_VERSI
VON`5D,
X          NEWS_VERSION,NEWS_DDATE, vms_major,vms_minor,Node_address);
X    fout_line(oline,fpl);
X**************
X*** 726,731
X  #endif
X      return(0);
X      `7D
X `20
X    if (first_get_call) `7B
X      first_get_call = 0;
X--- 732,738 -----
X  #endif
X      return(0);
X      `7D
X+   if (infile_eom) return(0);
X `20
X    if (first_get_call) `7B
X      first_get_call = 0;
X**************
X*** 1134,1139
X    auto_cre_grp = cli$present(c$dsc("CREGRP")) & 1;
X    del_after = (cli$present(c$dsc("DELETE")) & 1);
X    skip_loop_test = cli$present(c$dsc("RETRY")) & 1;
X `20
X    exec_opt = 0;
X    exec_switch = 0;
X--- 1141,1147 -----
X    auto_cre_grp = cli$present(c$dsc("CREGRP")) & 1;
X    del_after = (cli$present(c$dsc("DELETE")) & 1);
X    skip_loop_test = cli$present(c$dsc("RETRY")) & 1;
X+   genid = cli$present(c$dsc("GENID")) & 1;
X `20
X    exec_opt = 0;
X    exec_switch = 0;
$ CALL UNPACK NEWSADD.DIFF;1 1477662480
$ create 'f'
X*** newscmd.cld;1
X--- newscmd.cld
X**************
X*** 200,205
X      qualifier   ACCEPT      placement=positional,negatable
X      qualifier   NEWSGROUP   placement=positional,value
X      qualifier   NOCONTROL   nonnegatable
X `20
X  define syntax ADD_ENTRY
X      routine do_add_entry
X--- 200,206 -----
X      qualifier   ACCEPT      placement=positional,negatable
X      qualifier   NEWSGROUP   placement=positional,value
X      qualifier   NOCONTROL   nonnegatable
X+     qualifier   GENID
X `20
X  define syntax ADD_ENTRY
X      routine do_add_entry
$ CALL UNPACK NEWSCMD.DIFF;1 1247312462
$ v=f$verify(v)
$ EXIT
