From:	ADVAX::"mcnc!VM1.NoDak.EDU!sloane%KUHUB.CC.UKANS.EDU" 14-MAR-1991 16:26:41.31
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: Local newsgroups?  (Hep me!)

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Thu, 14 Mar 91 16:25:12 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA18519 for ; Thu, 14 Mar 91 15:39:06 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA21565; Thu, 14 Mar 91 14:46:43 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9103141946.AA21565@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 7316; Thu, 14 Mar 91 13:46:47 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 8985; Thu, 14 Mar 91 13:46:45 CST
Date:         Thu, 14 Mar 91 13:38:04 CST
Reply-To: mcnc!VM1.NoDak.EDU!sloane%KUHUB.CC.UKANS.EDU
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: mcnc!VM1.NoDak.EDU!sloane%KUHUB.CC.UKANS.EDU
Subject:      Re: Local newsgroups?  (Hep me!)
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
In article <3043.27d7d913@dcatla.uucp>, itwaf@dcatla.uucp writes:
> I know the following:
>> NEWS_POST.DEFAULTS file seems to be the way to do this. Is that right???
>   Unfortunately, when I add an entry as:
> dca.*
>     Distribution: local
>
>   I get a crash (!) when I post to dca.test newsgroup.
 
In NEWSPOST.C, routine do_posting, the distribution is stored in a
variable called "distribution" in some places and "post_dist" in
others. The following VMS_SHARE file changes all the post_dist
references to distribitution.  I think this will fix the problem with
NEWS_POST.DEFAULTS Distribution: option.  Hopefully Geoff can verify
this.
--
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444
 
$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.2-007  22-FEB-1990
$!   On 14-MAR-1991 13:26:40.72   By user SLOANE
$!
$! 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. NEWSPOST.FIX;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*** `5B-.news_v60-2_src`5Dnewspost.c
X--- `5B-.news_src`5Dnewspost.c
X**************
X*** 412,418
X    int postfile, crosspost;
X  `7B
X    char ngroup`5B512`5D,
X!        post_dist`5B512`5D, post_path`5B512`5D,
X         s`5B512`5D,
X         infile`5B256`5D,
X         loc_id`5BIDLEN`5D,
X--- 413,419 -----
X    int postfile, crosspost;
X  `7B
X    char ngroup`5B512`5D,
X!        post_path`5B512`5D,
X         s`5B512`5D,
X         infile`5B256`5D,
X         loc_id`5BIDLEN`5D,
X**************
X*** 445,451
X    $DESCRIPTOR(infile_dsc,infile);
X `20
X    itm_approved = 0;
X!   *post_dist = *follow_groups = *followup_groups = *xnewsgroups = *xfollow
Vgroups = '\0';
X `20
X    if (crosspost) `7B
X      use_default = 1;
X--- 446,452 -----
X    $DESCRIPTOR(infile_dsc,infile);
X `20
X    itm_approved = 0;
X!   *follow_groups = *followup_groups = *xnewsgroups = *xfollowgroups = '\0'
V;
X `20
X    if (crosspost) `7B
X      use_default = 1;
X**************
X*** 1003,1009
X      if ((status & 1) && (usr_inp_l)) `7B
X        usr_inp`5Busr_inp_l`5D = '\0';
X        lower_case(usr_inp);
X!       strcpy(post_dist,usr_inp);
X        fprintf(fpw,"Distribution: %s\n",usr_inp);
X        `7D
X      `7D
X--- 1004,1010 -----
X      if ((status & 1) && (usr_inp_l)) `7B
X        usr_inp`5Busr_inp_l`5D = '\0';
X        lower_case(usr_inp);
X!       strcpy(distribution,usr_inp);
X        fprintf(fpw,"Distribution: %s\n",usr_inp);
X        `7D
X      `7D
X**************
X*** 1020,1026
X      `7D
X `20
X    clear_err_line();
X!   if (!sys_local_accept(ngroup,post_dist)) `7B
X      err_line("Post - Distribution of item not accepted by local news filte
Vr");
X      `7D
X    sprintf(err_oline,"Post to %s `5By`5D:",ngroup);
X--- 1021,1027 -----
X      `7D
X `20
X    clear_err_line();
X!   if (!sys_local_accept(ngroup,distribution)) `7B
X      err_line("Post - Distribution of item not accepted by local news filte
Vr");
X      `7D
X    sprintf(err_oline,"Post to %s `5By`5D:",ngroup);
X**************
X*** 1110,1116
X      net_news = 0;
X      auto_cre_grp = 1;
X      c$cks(1);
X!     if (!sys_local_accept(ngroup,post_dist))
X        err_line("Post - item NOT locally posted (filter rejection) - forwar
Vded");
X      else `7B
X        do_new_group(ngroup,1,cre_grp);
X--- 1111,1117 -----
X      net_news = 0;
X      auto_cre_grp = 1;
X      c$cks(1);
X!     if (!sys_local_accept(ngroup,distribution))
X        err_line("Post - item NOT locally posted (filter rejection) - forwar
Vded");
X      else `7B
X        do_new_group(ngroup,1,cre_grp);
X**************
X*** 1132,1138
X `20
X          /* check to see what else should be done with this posting */
X      if (forward_posting)
X!       sys_remote_send(post_path,ngroup,post_dist,Post_file,loc_id,0);
X      `7D
X `20
X      /* now look up news_manager:newspost.cc and then news_post_cc for more
X--- 1133,1139 -----
X `20
X          /* check to see what else should be done with this posting */
X      if (forward_posting)
X!       sys_remote_send(post_path,ngroup,distribution,Post_file,loc_id,0);
X      `7D
X `20
X      /* now look up news_manager:newspost.cc and then news_post_cc for more
$ CALL UNPACK NEWSPOST.FIX;1 1314981475
$ v=f$verify(v)
$ EXIT
