[news.software.anu-news] NEWS V5.9B diff/patch 1/11

gih900@csc.anu.oz (Geoff Huston) (11/25/89)

$! ................... Cut between dotted lines and save. ...................
$!...........................................................................
$! VAX/VMS archive file created by VMS_SHARE V06.10 7-FEB-1989.
$!
$! VMS_SHARE was written by James Gray (Gray:OSBUSouth@Xerox.COM) from
$! VMS_SHAR by Michael Bednarek (U3369429@ucsvc.dn.mu.oz.au).
$!
$! To unpack, simply save, concatinate all parts into one file and
$! execute (@) that file.
$!
$! This archive was created by user GIH900
$! on 24-NOV-1989 16:46:28.97.
$!
$! ATTENTION: To keep each article below 31 blocks (15872 bytes), this
$!            program has been transmitted in 11 parts.  You should
$!            concatenate ALL parts to ONE file and execute (@) that file.
$!
$! It contains the following 46 files:
$!        AAREADME.TXT
$!        ADD_TRANSFORM.DIFF
$!        MAILDEF.DIFF
$!        NEWS.DIFF
$!        NEWSADD.DIFF
$!        NEWSBUILD.DIFF
$!        NEWSCMD.DIFF
$!        NEWSDEFINE.DIFF
$!        NEWSDELETE.DIFF
$!        NEWSDIR.DIFF
$!        NEWSDISPLAY.DIFF
$!        NEWSDIST.DIFF
$!        NEWSEXTERN.DIFF
$!        NEWSEXTRACT.DIFF
$!        NEWSFILES.DIFF
$!        NEWSFORWARD.DIFF
$!        NEWSHELP.DIFF
$!        NEWSINCLUDE.DIFF
$!        NEWSMOD.DIFF
$!        NEWSMODE.DIFF
$!        NEWSPOST.DIFF
$!        NEWSRC.DIFF
$!        NEWSREAD.DIFF
$!        NEWSREGISTER.DIFF
$!        NEWSREMCLIENT.DIFF
$!        NEWSRTL.DIFF
$!        NEWSSEARCH.DIFF
$!        NEWSSELECT.DIFF
$!        NEWSSETSHOW.DIFF
$!        NEWSSITE.DIFF
$!        NEWSSITE_H.DIFF
$!        NEWSSKIM.DIFF
$!        NEWSSKIP.DIFF
$!        NEWSUTILITY.DIFF
$!        NEWSV58_UPGRADE.DIFF
$!        NEWSVARIABLES.DIFF
$!        NEWSVMSMAIL.DIFF
$!        NEWS_HLP.DIFF
$!        NNTP_CLIENT.DIFF
$!        NNTP_DEC.DIFF
$!        NNTP_DECM.DIFF
$!        NNTP_FEED.DIFF
$!        NNTP_SERVER.DIFF
$!        NNTP_TCPCMU.DIFF
$!        NNTP_TCPWIN.DIFF
$!        NNTP_TTY.DIFF
$!
$!============================================================================
$ SET SYMBOL/SCOPE=( NOLOCAL, NOGLOBAL )
$ VERSION = F$GETSYI( "VERSION" )
$ IF VERSION .GES "V4.4" THEN GOTO VERSION_OK
$ WRITE SYS$OUTPUT "You are running VMS ''VERSION'; ", -
    "VMS_SHARE V06.10 7-FEB-1989 requires VMS V4.4 or higher."
$ EXIT 44 ! SS$_ABORT
$VERSION_OK:
$ GOTO START
$!
$UNPACK_FILE:
$ WRITE SYS$OUTPUT "Creating ''FILE_IS'"
$ DEFINE/USER_MODE SYS$OUTPUT NL:
$ EDIT/TPU/COMMAND=SYS$INPUT/NODISPLAY/OUTPUT='FILE_IS'/NOSECTION -
    VMS_SHARE_DUMMY.DUMMY
b_part := CREATE_BUFFER( "{Part}", GET_INFO( COMMAND_LINE, "file_name" ) )
; s_file_spec := GET_INFO( COMMAND_LINE, "output_file" ); SET( OUTPUT_FILE
, b_part, s_file_spec ); b_errors := CREATE_BUFFER( "{Errors}" ); i_errors 
:= 0; pat_beg_1 := ANCHOR & "-+-+-+ Beginning"; pat_beg_2 := LINE_BEGIN 
& "+-+-+-+ Beginning"; pat_end := ANCHOR & "+-+-+-+-+ End"; POSITION
( BEGINNING_OF( b_part ) ); LOOP EXITIF SEARCH( SPAN( ' ' )@r_trail 
& LINE_END, FORWARD) = 0; POSITION( r_trail ); ERASE( r_trail ); ENDLOOP
; POSITION( BEGINNING_OF( b_part ) ); i_append_line := 0; LOOP EXITIF MARK
( NONE ) = END_OF( b_part ); s_x := ERASE_CHARACTER( 1 )
; IF s_x = '+' THEN r_skip := SEARCH( pat_beg_1, FORWARD, EXACT ); IF r_skip 
<> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ERASE_LINE; ENDIF
; ENDIF; IF s_x = '-' THEN r_skip := SEARCH( pat_end, FORWARD, EXACT )
; IF r_skip <> 0 THEN s_x := ''; MOVE_HORIZONTAL( -CURRENT_OFFSET ); m_skip 
:= MARK( NONE ); r_skip := SEARCH( pat_beg_2, FORWARD, EXACT ); IF r_skip 
<> 0 THEN POSITION( END_OF( r_skip ) ); MOVE_HORIZONTAL( -CURRENT_OFFSET )
; MOVE_VERTICAL( 1 ); MOVE_HORIZONTAL( -1 ); ELSE POSITION( END_OF( b_part ) 
); ENDIF; ERASE( CREATE_RANGE( m_skip, MARK( NONE ), NONE ) ); ENDIF; ENDIF
; IF s_x = 'V' THEN s_x := ''; IF i_append_line <> 0 THEN APPEND_LINE
; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF; i_append_line := 1
; MOVE_VERTICAL( 1 ); ENDIF; IF s_x = 'X' THEN s_x := ''; IF i_append_line 
<> 0 THEN APPEND_LINE; MOVE_HORIZONTAL( -CURRENT_OFFSET ); ENDIF
; i_append_line := 0; MOVE_VERTICAL( 1 ); ENDIF; IF s_x <> '' THEN i_errors 
:= i_errors + 1; s_text := CURRENT_LINE; POSITION( b_errors ); COPY_TEXT
( "The following line could not be unpacked properly:" ); SPLIT_LINE
; COPY_TEXT( s_x ); COPY_TEXT( s_text ); POSITION( b_part ); MOVE_VERTICAL
( 1 ); ENDIF; ENDLOOP; POSITION( BEGINNING_OF( b_part ) ); LOOP r_x := SEARCH
( "`", FORWARD, EXACT ); EXITIF r_x = 0; POSITION( r_x ); ERASE_CHARACTER( 1 
); COPY_TEXT( ASCII( INT( ERASE_CHARACTER( 3 ) ) ) ); ENDLOOP
; IF i_errors = 0 THEN SET( NO_WRITE, b_errors, ON ); ELSE POSITION
( BEGINNING_OF( b_errors ) ); COPY_TEXT( FAO
( "The following !UL errors were detected while unpacking !AS", i_errors
, s_file_spec ) ); SPLIT_LINE; SET( OUTPUT_FILE, b_errors, "SYS$COMMAND" )
; ENDIF; EXIT; 
$ DELETE VMS_SHARE_DUMMY.DUMMY;*
$ CHECKSUM 'FILE_IS
$ WRITE SYS$OUTPUT " CHECKSUM ", -
  F$ELEMENT( CHECKSUM_IS .EQ. CHECKSUM$CHECKSUM, ",", "failed!!,passed." )
$ RETURN
$!
$START: 
$ FILE_IS = "AAREADME.TXT"
$ CHECKSUM_IS = 1612265732
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
XRelease notes for NEWS V5.9B release.
X
XI have built V5.9B using the VAX C compiler V3.0. If you are using an earlier
Vversion of the compiler you'll need to keep the .h files which have been post
Xed
Vto the anu-news mailing list in September 1989. I will not include these file
Xs
Xin any subsequent releases.
X
XThe diffs here refer to V5.9   NOT V5.9A
X                        ----
X
Xa) File changes in V5.9b (from V5.9)
X`009DELETED`009    sortdef.h`009-- no longer referenced in any of the modules
X`009RENAMED     newsmail.c`009-- newsvmsmail.c
X`009NEW FILE    nntp
X
Xb) BEFORE applying the v5.9B patches RENAME NEWSMAIL.C to NEWSVMSMAIL.C
X
XGeoff Huston
$ GOSUB UNPACK_FILE

$ FILE_IS = "ADD_TRANSFORM.DIFF"
$ CHECKSUM_IS = 1630369066
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]add_transform.c
X--- [.news_src]add_transform.c
X**************
X*** 45,51
X  **`009`009# this is an example address cnf file
X  **`009`009*@*.anu.* \002::\001
X  **`009`009*@*.anu`009  \002::\001
X! **`009`009*@*`009  "gateway::in%""\001@\002"""
X  **`009`009*::*`009  \001::\002
X  **`009`009*`009  \001
X  **
X--- 45,51 -----
X  **`009`009# this is an example address cnf file
X  **`009`009*@*.anu.* \002::\001
X  **`009`009*@*.anu`009  \002::\001
X! **`009`009*@*`009  gateway::in%"\001@\002"
X  **`009`009*::*`009  \001::\002
X  **`009`009*`009  \001
X  **
X**************
X*** 113,120
X  `009`123"in%*",    "in%\001"`125,
X  `009`123"psi%*",   "psi%\001"`125,
X  `009`123"@*",`009    "@\001"`125,
X! `009`123"*@*",`009    "\"in\%\"\"\001@\002\"\"\""`125,
X! `009`123"*::*",    "\"in\%\"\"\002@\001\"\"\""`125,
X  `009`123"*",`009    "\001"`125,
X  `009`123"",""`125`125,
X        *addrs = 0;`009/* Pointer to loaded rule set`009`009`009     */
X--- 113,120 -----
X  `009`123"in%*",    "in%\001"`125,
X  `009`123"psi%*",   "psi%\001"`125,
X  `009`123"@*",`009    "@\001"`125,
X! `009`123"*@*",`009    "in\%\"\001@\002\""`125,
X! `009`123"*::*",    "in\%\"\002@\001\""`125,
X  `009`123"*",`009    "\001"`125,
X  `009`123"",""`125`125,
X        *addrs = 0;`009/* Pointer to loaded rule set`009`009`009     */
$ GOSUB UNPACK_FILE

$ FILE_IS = "MAILDEF.DIFF"
$ CHECKSUM_IS = 1985494578
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]maildef.h
X--- [.news_src]maildef.h
$ GOSUB UNPACK_FILE

$ FILE_IS = "NEWS.DIFF"
$ CHECKSUM_IS = 1985494772
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]news.c
X--- [.news_src]news.c
$ GOSUB UNPACK_FILE

$ FILE_IS = "NEWSADD.DIFF"
$ CHECKSUM_IS = 940843672
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]newsadd.c
X--- [.news_src]newsadd.c
X**************
X*** 64,69
X  **      V5.9    18-Apr-1989     GIH
V  **        - Make the auto mail to usenet in response to a cancel control me
Xssage
X  **          conditional on the compilation constant CANCELMAIL
X  **--
X  **/
X  `012
X--- 64,72 -----
X  **      V5.9    18-Apr-1989     GIH
V  **        - Make the auto mail to usenet in response to a cancel control me
Xssage
X  **          conditional on the compilation constant CANCELMAIL
X+ **`009V5.9B`00912-Oct-1989`009Mark Pizzolato
X+ **`009  - Amended the routines control_ihave and control_sendme to actually
X+ **`009    work properly.
X  **--
X  **/
X  `012
X**************
X*** 855,861
X         s_str[132],
X         newsgroups[132],
X         *il = itm[CONTROL] + 5,
X!        *cp;
X    FILE *fpw = 0,
X         *fpr;
X    int line_count = 0;
X--- 858,865 -----
X         s_str[132],
X         newsgroups[132],
X         *il = itm[CONTROL] + 5,
X!        *cp,
X!        subject[132];
X    FILE *fpw = 0,
X         *fpr;
X    int line_count = 0,
X**************
X*** 858,864
X         *cp;
X    FILE *fpw = 0,
X         *fpr;
X!   int line_count = 0;
X `032
X    sprintf(s_str,"to.%s",news_node);
X    strcpy(newsgroups,itm[NEWSGROUPS]);
X--- 862,869 -----
X         subject[132];
X    FILE *fpw = 0,
X         *fpr;
X!   int line_count = 0,
X!       cre_grp[2];
X `032
X    sprintf(s_str,"to.%s",news_node);
X    strcpy(newsgroups,itm[NEWSGROUPS]);
X**************
X*** 863,869
X    sprintf(s_str,"to.%s",news_node);
X    strcpy(newsgroups,itm[NEWSGROUPS]);
X    s_to_lower(newsgroups);
X!   if (strcmp(newsgroups,s_str)) `123
V      printf("Control: %s - Directed to foreign node: %s\n",itm[CONTROL],news
Xgroups);
X      return;
X      `125
X--- 868,876 -----
X    sprintf(s_str,"to.%s",news_node);
X    strcpy(newsgroups,itm[NEWSGROUPS]);
X    s_to_lower(newsgroups);
X!   strcpy(xbuf, newsgroups);
X!   if ((cp = strrchr(xbuf, '.')) && !strcmp(".ctl",cp)) *cp = '\0';
X!   if (strcmp(xbuf,s_str)) `123
V      printf("Control: %s - Directed to foreign node: %s\n",itm[CONTROL],news
Xgroups);
X      return;
X      `125
X**************
X*** 884,890
X      `125
X    s_to_lower(s_str);
X    sprintf(send_scr_file,"SYS$SCRATCH:SENDME_MAIL_%X.TMP",getpid());
X!   fpw = fopen(send_scr_file,"w");
X `032
X    il = itm[CONTROL] + 5;
X    while (cp = strchr(il,'<')) `123
X--- 891,897 -----
X      `125
X    s_to_lower(s_str);
X    sprintf(send_scr_file,"SYS$SCRATCH:SENDME_MAIL_%X.TMP",getpid());
X!   fpw = fopen(send_scr_file,"w","mbc=32");
X `032
X    il = itm[CONTROL] + 5;
X    while (cp = strchr(il,'<')) `123
X**************
X*** 896,902
X        `125
X      else ++il;
X      `125
X!   if (fpr = fopen(fn,"r")) `123
X      while ((fgets(xbuf,510,fpr)) && (*xbuf != '\n'));
X      while (fgets(xbuf,510,fpr)) `123
X        if (*xbuf == '\n') continue;
X--- 903,909 -----
X        `125
X      else ++il;
X      `125
X!   if (fpr = fopen(fn,"r","mbc=32","mbf=2")) `123
X      while ((fgets(xbuf,510,fpr)) && (*xbuf != '\n'));
X      while (fgets(xbuf,510,fpr)) `123
X        if (*xbuf == '\n') continue;
X**************
X*** 915,922
X       int cur_time;
X       struct tm *stm;
X `032
X!      fpr = fopen(send_scr_file,"r");
X!      fpw = fopen(send_scr_file,"w");
X       sprintf(post_path," %s!%s",news_node,usr_username);
X       fprintf(fpw,"Path: %s\n",post_path);
X       fprintf(fpw,"From: %s@%s",usr_username,Node_address);
X--- 922,929 -----
X       int cur_time;
X       struct tm *stm;
X `032
X!      fpr = fopen(send_scr_file,"r","mbc=32","mbf=2");
X!      fpw = fopen(send_scr_file,"w","mbc=32");
X       sprintf(post_path," %s!%s",news_node,usr_username);
X       fprintf(fpw,"Path: %s\n",post_path);
X       fprintf(fpw,"From: %s@%s",usr_username,Node_address);
X**************
X*** 923,930
X       if (*usr_persname) fprintf(fpw," (%s)",usr_persname);
X       fprintf(fpw,"\n");
X       fprintf(fpw,"Newsgroups: %s\n",s_str);
X!      fprintf(fpw,"Control: sendme %s\n",news_node);
X!      fprintf(fpw,"Subject: sendme %s\n",news_node);
X       time(&cur_time);
X       p = ctime(&cur_time);
X       p += 4;
X--- 930,938 -----
X       if (*usr_persname) fprintf(fpw," (%s)",usr_persname);
X       fprintf(fpw,"\n");
X       fprintf(fpw,"Newsgroups: %s\n",s_str);
X!      sprintf(subject,"sendme %s",news_node);
X!      fprintf(fpw,"Control: %s\n",subject);
X!      fprintf(fpw,"Subject: %s\n",subject);
X       time(&cur_time);
X       p = ctime(&cur_time);
X       p += 4;
X**************
X*** 939,945
X       while (fgets(xbuf,510,fpr)) fputs(xbuf,fpw);
X       fclose(fpr);
X       fclose(fpw);
V!      sys_remote_send(post_path,s_str,post_dist,"SYS$SCRATCH:SENDME.MAIL",lo
Xc_id,0);
X       `125
X    while (!delete(send_scr_file));
X  `125
X--- 947,958 -----
X       while (fgets(xbuf,510,fpr)) fputs(xbuf,fpw);
X       fclose(fpr);
X       fclose(fpw);
X!      sys_remote_send(post_path,s_str,post_dist,send_scr_file,loc_id,0);
X!      if (sys_local_accept(s_str,post_dist)) `123
X!        do_new_group(s_str,0,cre_grp);
X!        if (cre_grp[0])
X! `009 do_new_item(cre_grp,loc_id,subject,send_scr_file,1,0,line_count);
X!        `125
X       `125
X    while (!delete(send_scr_file));
X  `125
X**************
X*** 956,962
X    char *fn;
X  `123
X    char s_str[132],
X!        *il = itm[CONTROL] + 5,
X         *cp,
X         l_id[IDLEN + 4],
X         post_dist = '\0',
X--- 969,975 -----
X    char *fn;
X  `123
X    char s_str[132],
X!        *il = itm[CONTROL] + 6,
X         *cp,
X         l_id[IDLEN + 4],
X         post_dist = '\0',
X**************
X*** 963,969
X         post_path[132];
X    int i,
X        gn;
X!   FILE *fpr;
X `032
X    sprintf(post_path," %s!%s",news_node,usr_username);
X    itmrab.rab$l_kbf = l_id;
X--- 976,982 -----
X         post_path[132];
X    int i,
X        gn;
X!   FILE *fpr,*fpi;
X `032
X    sprintf(post_path," %s!%s",news_node,usr_username);
X    itmrab.rab$l_kbf = l_id;
X**************
X*** 975,980
X    sprintf(s_str,"to.%s",news_node);
X    strcpy(xbuf,itm[NEWSGROUPS]);
X    s_to_lower(xbuf);
X    if (strcmp(xbuf,s_str))
V      return(printf("Control: %s - Directed to foreign node: %s\n",itm[CONTRO
XL],xbuf));
X    if (cp = strrchr(il,'>')) il = ++cp;
X--- 988,994 -----
X    sprintf(s_str,"to.%s",news_node);
X    strcpy(xbuf,itm[NEWSGROUPS]);
X    s_to_lower(xbuf);
X+   if ((cp = strrchr(xbuf,'.')) && !strcmp(".ctl",cp)) *cp = '\0';
X    if (strcmp(xbuf,s_str))
V      return(printf("Control: %s - Directed to foreign node: %s\n",itm[CONTRO
XL],xbuf));
X    if (cp = strrchr(il,'>')) il = ++cp;
X**************
X*** 989,995
V      return(printf("Control: sendme - Error (No remote system specified)\n")
X);
X    s_to_lower(s_str);
X `032
X!   il = itm[CONTROL] + 5;
X    while (cp = strchr(il,'<')) `123
X      il = cp;
X      if (cp = strchr(il,'>')) `123
X--- 1003,1009 -----
V      return(printf("Control: sendme - Error (No remote system specified)\n")
X);
X    s_to_lower(s_str);
X `032
X!   il = itm[CONTROL] + 6;
X    while (cp = strchr(il,'<')) `123
X      il = cp;
X      if (cp = strchr(il,'>')) `123
X**************
X*** 1009,1017
X        `125
X      else ++il;
X      `125
X!   if (fpr = fopen(fn,"r")) `123
X!     while ((fgets(xbuf,510,fpr)) && (*xbuf != '\n'));
X!     while (fgets(xbuf,510,fpr)) `123
X        if (*xbuf == '\n') continue;
-+-+-+-+-+ End of part 1 +-+-+-+-+-