gih900@csc.anu.oz (Geoff Huston) (12/21/89)
+-+-+-+ Beginning of part 2 +-+-+-+
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;
X if ((cp = strchr(xbuf,'<')) && (il = strchr(cp,'>'))) `123
X *++il = '\0';
X--- 1023,1031 -----
X `125
X else ++il;
X `125
X! if (fpi = fopen(fn,"r")) `123
X! while ((fgets(xbuf,510,fpi)) && (*xbuf != '\n'));
X! while (fgets(xbuf,510,fpi)) `123
X if (*xbuf == '\n') continue;
X if ((cp = strchr(xbuf,'<')) && (il = strchr(cp,'>'))) `123
X *++il = '\0';
X**************
X*** 1022,1028
X (!strcmp(l_id,newsitm.itm_id)) &&
X (gn = ga_locate(newsitm.itm_grp)) &&
V (fpr = do_oitem(&newsitm,"r",ga[gn]->grp_name,0,(ga[gn]->grp_fl
Xags & NEWS_M_RESTRICT_SET)))) `123
X! fclose(fpr);
X sys_remote_send(post_path,s_str,post_dist,itm_fname,l_id,0);
X `125
X `125
X--- 1036,1043 -----
X (!strcmp(l_id,newsitm.itm_id)) &&
X (gn = ga_locate(newsitm.itm_grp)) &&
V (fpr = do_oitem(&newsitm,"r",ga[gn]->grp_name,0,(ga[gn]->grp_fl
Xags & NEWS_M_RESTRICT_SET)))) `123
X! fclose(fpi);
X! fpi = 0;
X sys_remote_send(post_path,s_str,post_dist,itm_fname,l_id,0);
X `125
X `125
X**************
X*** 1027,1032
X `125
X `125
X `125
X `125
X `125
X `012
X--- 1042,1048 -----
X `125
X `125
X `125
X+ if (fpi) fclose(fpi);
X `125
X `125
X `012
X**************
X*** 1116,1126
X strcpy(newsgroup,itm[NEWSGROUPS]);
X mail_add_expiry = parse_date(itm[EXPIRES]);
X if (*itm[CONTROL]) `123
X! if (sys_local_accept(newsgroup,itm[DISTRIBUTION])) `123
X! strcpy(newsgroup,"control");
X! if (!skip_loop_test && path_match(itm[PATH],news_node))
X! printf("\tControl: Ignored (Loop Detected)\n");
X! else parse_control_item(fn);
X `125
X else printf("\tControl: Ignored (SYS filter)\n");
X `125
X--- 1132,1145 -----
X strcpy(newsgroup,itm[NEWSGROUPS]);
X mail_add_expiry = parse_date(itm[EXPIRES]);
X if (*itm[CONTROL]) `123
X! strcpy(newsgroup,"control");
X! if ( !skip_loop_test
X! && ( path_match(itm[PATH],news_node)
X! `124`124 check_id(itm[MESSAGE_ID])))
X! printf("\tControl: Ignored (Loop Detected)\n");
X! else `123
V! if (sys_local_accept(newsgroup,itm[DISTRIBUTION])) parse_control_item
X(fn);
X! else printf("\tControl: Ignored (SYS filter)\n");
X `125
X `125
X printf("Add %s %s",itm[MESSAGE_ID],newsgroup);
X**************
X*** 1122,1128
X printf("\tControl: Ignored (Loop Detected)\n");
X else parse_control_item(fn);
X `125
X- else printf("\tControl: Ignored (SYS filter)\n");
X `125
X printf("Add %s %s",itm[MESSAGE_ID],newsgroup);
V if (!strcmp(newsgroup,"junk") && !junk_it) return(printf(": REJECT (/NOJU
XNK)\n"));
X--- 1141,1146 -----
V if (sys_local_accept(newsgroup,itm[DISTRIBUTION])) parse_control_item
X(fn);
X else printf("\tControl: Ignored (SYS filter)\n");
X `125
X `125
X printf("Add %s %s",itm[MESSAGE_ID],newsgroup);
V if (!strcmp(newsgroup,"junk") && !junk_it) return(printf(": REJECT (/NOJU
XNK)\n"));
X**************
X*** 1151,1158
X *itm_fname = '\0';
X status = 0;
X if (*cre_grp) `123
V! if (status = do_new_item(cre_grp,itm[MESSAGE_ID],subject,fn,1,skip_loop
X_test,linecount)) `123
V! if ((status == 0xb00184ec) `124`124 (status == 0xb0010001)) return(pr
Xintf(": REJECT (Duplicate)\n",no_new_item));
X else `123
X if (strcmp(newsgroup,junk)) `123
V sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION],((*it
Xm_fname) ? itm_fname : fn),itm[MESSAGE_ID],!mod_add);
X--- 1169,1179 -----
X *itm_fname = '\0';
X status = 0;
X if (*cre_grp) `123
X! if (status = do_new_item(cre_grp,itm[MESSAGE_ID],subject,fn,1,
X! skip_loop_test,linecount)) `123
X! if ( (status == 0xb00184ec)
X! `124`124 (status == 0xb0010001))
X! return(printf(": REJECT (Looping item)\n",no_new_item));
X else `123
X if (strcmp(newsgroup,junk)) `123
X sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION],
X**************
X*** 1155,1161
V if ((status == 0xb00184ec) `124`124 (status == 0xb0010001)) return(pr
Xintf(": REJECT (Duplicate)\n",no_new_item));
X else `123
X if (strcmp(newsgroup,junk)) `123
V! sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION],((*it
Xm_fname) ? itm_fname : fn),itm[MESSAGE_ID],!mod_add);
X if (!junk_it) return(printf(": REJECT (%s)\n",no_new_item));
X printf(": JUNK (%s)\n",no_new_item);
X strcpy(itm[NEWSGROUPS],junk);
X--- 1176,1183 -----
X return(printf(": REJECT (Looping item)\n",no_new_item));
X else `123
X if (strcmp(newsgroup,junk)) `123
X! sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION],
V! ((*itm_fname) ? itm_fname : fn),itm[MESSAGE_ID],!mod_a
Xdd);
X if (!junk_it) return(printf(": REJECT (%s)\n",no_new_item));
X printf(": JUNK (%s)\n",no_new_item);
X strcpy(itm[NEWSGROUPS],junk);
X**************
X*** 1170,1176
X char *id,
X *ide,
X *mail_sender = itm[SENDER],
X! net_sender[132];
X `032
X if ((id = strchr(itm[SUPERSEDES],'<'))
X && (ide = strchr(itm[SUPERSEDES],'>'))) `123
X--- 1192,1199 -----
X char *id,
X *ide,
X *mail_sender = itm[SENDER],
X! net_sender[132],
X! `009 save_itm_fname[256];
X `032
X strcpy(save_itm_fname,itm_fname);
X if ((id = strchr(itm[SUPERSEDES],'<'))
X**************
X*** 1172,1177
X *mail_sender = itm[SENDER],
X net_sender[132];
X `032
X if ((id = strchr(itm[SUPERSEDES],'<'))
X && (ide = strchr(itm[SUPERSEDES],'>'))) `123
X *(ide + 1) = '\0';
X--- 1195,1201 -----
X net_sender[132],
X `009 save_itm_fname[256];
X `032
X+ strcpy(save_itm_fname,itm_fname);
X if ((id = strchr(itm[SUPERSEDES],'<'))
X && (ide = strchr(itm[SUPERSEDES],'>'))) `123
X *(ide + 1) = '\0';
X**************
X*** 1193,1198
X if (!del_id(id,net_sender)) hist_add(id);
X printf(" (Supersedes %s)",itm[SUPERSEDES]);
X `125
X `125
X `125
V if (*itm_fname) sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTIO
XN],itm_fname,itm[MESSAGE_ID],!mod_add);
X--- 1217,1223 -----
X if (!del_id(id,net_sender)) hist_add(id);
X printf(" (Supersedes %s)",itm[SUPERSEDES]);
X `125
X+ strcpy(itm_fname,save_itm_fname);
X `125
X `125
V if (*itm_fname) sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTIO
XN],itm_fname,itm[MESSAGE_ID],!mod_add);
X**************
X*** 1482,1492
X `032
X if (first_get_call) `123
X first_get_call = 0;
X! if (!fgets(add_inline,512,fpr)) `123
X! infile_eof = 1;
X! return(0);
X! `125 `032
X! while (!strcmp(add_inline,"\f\n")) `123
X if (!fgets(add_inline,512,fpr)) `123
X infile_eof = 1;
X return(0);
X--- 1507,1513 -----
X `032
X if (first_get_call) `123
X first_get_call = 0;
X! do `123
X if (!fgets(add_inline,512,fpr)) `123
X infile_eof = 1;
X return(0);
X**************
X*** 1490,1497
X if (!fgets(add_inline,512,fpr)) `123
X infile_eof = 1;
X return(0);
X! `125
X! `125 `032
X `125
X `032
X else if (n_stripping) `123
X--- 1511,1518 -----
X if (!fgets(add_inline,512,fpr)) `123
X infile_eof = 1;
X return(0);
X! `125 `032
X! `125 while (!strcmp(add_inline,"\f\n"));
X `125
X `032
X else if (n_stripping) `123
$ GOSUB UNPACK_FILE
$ FILE_IS = "NEWSBUILD.DIFF"
$ CHECKSUM_IS = 763255641
$ COPY SYS$INPUT VMS_SHARE_DUMMY.DUMMY
X*** [.news_v59_src]newsbuild.com
X--- [.news_src]newsbuild.com
X**************
X*** 36,41
X $ on control_y then $ stop
X $ on error then $ goto done
X $ define lnk$library sys$library:vaxcrtl
X $ no_wintcp = 1
X $ if f$search("TWG$TCP:[NETDIST.INCLUDE]*.H") .eqs. "" then $goto notwg
X $!
X--- 36,42 -----
X $ on control_y then $ stop
X $ on error then $ goto done
X $ define lnk$library sys$library:vaxcrtl
X+ $ no_multinettcp = 1
X $ no_wintcp = 1
V $ if f$search("multinet_root:[multinet.include]*.H") .eqs. "" then $goto no
Xmultinet
X $!
X**************
X*** 37,43
X $ on error then $ goto done
X $ define lnk$library sys$library:vaxcrtl
X $ no_wintcp = 1
X! $ if f$search("TWG$TCP:[NETDIST.INCLUDE]*.H") .eqs. "" then $goto notwg
X $!
X $! Include WIN/TCP support modules.....
X $!
X--- 38,44 -----
X $ define lnk$library sys$library:vaxcrtl
X $ no_multinettcp = 1
X $ no_wintcp = 1
V! $ if f$search("multinet_root:[multinet.include]*.H") .eqs. "" then $goto no
Xmultinet
X $!
X $! Include MULTINET/TCP support modules.....
X $!
X**************
X*** 39,44
X $ no_wintcp = 1
X $ if f$search("TWG$TCP:[NETDIST.INCLUDE]*.H") .eqs. "" then $goto notwg
X $!
X $! Include WIN/TCP support modules.....
X $!
X $ no_wintcp = 0
X--- 40,66 -----
X $ no_wintcp = 1
V $ if f$search("multinet_root:[multinet.include]*.H") .eqs. "" then $goto no
Xmultinet
X $!
X+ $! Include MULTINET/TCP support modules.....
X+ $!
X+ $ no_wintcp = 0
X+ $ define vaxc$include `009multinet_root:[multinet.include.ARPA],-
X+ `009`009`009multinet_root:[multinet.include.NET],-
X+ `009`009`009multinet_root:[multinet.include.NETCHAOS],-
X+ `009`009`009multinet_root:[multinet.include.NETINET],-
X+ `009`009`009multinet_root:[multinet.include.NETPUP],-
X+ `009`009`009multinet_root:[multinet.include.NFS],-
X+ `009`009`009multinet_root:[multinet.include.RPC],-
X+ `009`009`009multinet_root:[multinet.include.SYS],-
X+ `009`009`009multinet_root:[multinet.include.VMS],-
X+ `009`009`009multinet_root:[multinet.include],-
X+ `009sys$library
X+ $ define lnk$library MULTINET_COMMON_ROOT:[MULTINET.LIBRARY]LIB.OLB
X+ $ define lnk$library_1 MULTINET_COMMON_ROOT:[MULTINET.LIBRARY]RPC.OLB
X+ $ define lnk$library_3 sys$library:vaxcrtl
X+ $ cc :== "CC/DEFINE=MULTINET"
X+ $nomultinet:
X+ $ if f$search("TWG$TCP:[NETDIST.INCLUDE]*.H") .eqs. "" then $goto notwg
X+ $!
X $! Include WIN/TCP support modules.....
X $!
X $ no_wintcp = 0
X**************
X*** 46,51
X twg$tcp:[netdist.include.sys],-
X twg$tcp:[netdist.include.vms],-
X twg$tcp:[netdist.include.netinet],-
X sys$library
X $ define lnk$library twg$tcp:[netdist.lib]libnet
X $ define lnk$library_1 twg$tcp:[netdist.lib]libnetacc
X--- 68,74 -----
X twg$tcp:[netdist.include.sys],-
X twg$tcp:[netdist.include.vms],-
X twg$tcp:[netdist.include.netinet],-
X+ twg$tcp:[netdist.include.arpa],-
X sys$library
X $ define lnk$library twg$tcp:[netdist.lib]libnet
X $ define lnk$library_1 twg$tcp:[netdist.lib]libnetacc
X**************
X*** 77,83
X $ call compile "NEWSFILES" "DELOBJ" 'p1
X $ call compile "NEWSFORWARD" "DELOBJ" 'p1
X $ call compile "NEWSHELP" "DELOBJ" 'p1
X! $ call compile "NEWSMAIL" "DELOBJ" 'p1
X $ call compile "NEWSMOD" "DELOBJ" 'p1
X $ call compile "NEWSMODE" "DELOBJ" 'p1
X $ call compile "NEWSPOST" "DELOBJ" 'p1
X--- 100,106 -----
X $ call compile "NEWSFILES" "DELOBJ" 'p1
X $ call compile "NEWSFORWARD" "DELOBJ" 'p1
X $ call compile "NEWSHELP" "DELOBJ" 'p1
X! $ call compile "NEWSVMSMAIL" "DELOBJ" 'p1
X $ call compile "NEWSMOD" "DELOBJ" 'p1
X $ call compile "NEWSMODE" "DELOBJ" 'p1
X $ call compile "NEWSPOST" "DELOBJ" 'p1
X**************
X*** 318,324
X $ purge nntp_feed.*,[-.news_dist]nntp_feed.*
X $past18:
X $!
-+-+-+-+-+ End of part 2 +-+-+-+-+-