From:	ASTRO::NEWSMGR      "Mike Smisloff; EW MS 122; 776-3548"  8-AUG-1989 10:12
To:	ARISIA::EVERHART
CC:	NEWSMGR
Subj:	NEWS Mods for VMS 5.1

Glenn,

These are the changes I made to NEWS 5.7 for VMS 5.1.  (After reading the
warning, I decided not to put up version 5.8):


The MAIL spawn to post an item to a moderator wasn't working.  Eric Stahre
suggested the following.  (It may also be fixed by POSTINGFIX.SRC, but
this was simpler, and works.)
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
   94               mod[256],
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
   94               null_device[4] = "nl:";
   95               mod[256],
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  203               _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  204               while (!(delete(mail_scratch)));
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  204               _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  205               while (!(delete(mail_scratch)));
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  247               _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  248               while (!(delete(mail_scratch)));
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  248               _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  249               while (!(delete(mail_scratch)));
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  302               _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  303               while (!(delete(mail_scratch)));
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  303               _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  304               while (!(delete(mail_scratch)));
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  396                   _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  397                   while (!(delete(mail_scratch)));
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  397                   _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  398                   while (!(delete(mail_scratch)));
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  474                       _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  475                       while (!(delete(mail_scratch)));
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  475                       _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  476                       while (!(delete(mail_scratch)));
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  717                       _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  718                       }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  718                       _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  719                       }
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  727                   _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  728                   }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  728                   _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  729                   }
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
  792           _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  793           }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
  793           _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  794           }
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1
 1433                       _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
 1434                       }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3
 1434                       _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
 1435                       }
************

Number of difference sections found: 10
Number of difference records found: 10

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=NEWS_DEVICE:[NEWS_SRC]NEWSADD.DIFF;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSADD_C.OLD;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSADD.C;3


The PRV$V_whatevers don't exist any longer:
************
File NEWS_DEVICE:[NEWS_SRC]NEWSEXTRACT_C.OLD;1
  431                   if (!(curprivs[0] & ((1 << PRV$V_OPER) | (1 << PRV$V_ALTPRI)))) exit(SS$_NOPRIV);
  432                   }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSEXTRACT.C;2
  431                   if (!(curprivs[0] & (PRV$M_OPER | PRV$M_ALTPRI))) exit(SS$_NOPRIV);
  432                   }
************

Number of difference sections found: 1
Number of difference records found: 1

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=NEWS_DEVICE:[NEWS_SRC]NEWEXTRACT.DIFF;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSEXTRACT_C.OLD;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSEXTRACT.C;2


More MAIL spawns:
************
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD_C.OLD;1
   60            fpad[3];
   61       char *cp,
******
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD.C;3
   60            fpad[3],
   61            null_device[4] = "nl:";
   62       char *cp,
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD_C.OLD;1
  250       _c$cks(lib$spawn(c$dsc(xfrbuf),0,0,0,0,0,0,0,0,0,0,0));
  251   
******
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD.C;3
  251       _c$cks(lib$spawn(c$dsc(xfrbuf),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  252   
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD_C.OLD;1
  304            address[512],
******
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD.C;3
  305            null_device[4] = "nl:",
  306            address[512],
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD_C.OLD;1
  579       if (addressees) _c$cks(lib$spawn(c$dsc(xfrbuf),0,0,0,0,0,0,0,0,0,0,0));
  580   
******
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD.C;3
  581       if (addressees) _c$cks(lib$spawn(c$dsc(xfrbuf),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  582   
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD_C.OLD;1
  604                           _c$cks(lib$spawn(c$dsc(xfrbuf),0,0,0,0,0,0,0,0,0,0,0));
  605                           }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD.C;3
  606                           _c$cks(lib$spawn(c$dsc(xfrbuf),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  607                           }
************

Number of difference sections found: 5
Number of difference records found: 6

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD.DIFF;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD_C.OLD;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSFORWARD.C;3


More MAIL spawns:
************
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST_C.OLD;1
  157            *pa;
  158       int approval_required = 0,
******
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST.C;5
  157            *pa,
  158            null_device[4] = "nl:";
  159       int approval_required = 0,
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST_C.OLD;1
  622           _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  623           }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST.C;5
  623           _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  624           }
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST_C.OLD;1
  658           _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  659           if (screen_active) {
******
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST.C;5
  659           _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  660           if (screen_active) {
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST_C.OLD;1
  688                           _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  689                           if (screen_active) {
******
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST.C;5
  689                           _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  690                           if (screen_active) {
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST_C.OLD;1
  720                           _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
  721                           if (screen_active) {
******
File NEWS_DEVICE:[NEWS_SRC]NEWSPOST.C;5
  721                           _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
  722                           if (screen_active) {
************

Number of difference sections found: 5
Number of difference records found: 6

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=NEWS_DEVICE:[NEWS_SRC]NEWSPOST.DIFF;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSPOST_C.OLD;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSPOST.C;5


MAIL spawns, PRV$V_whatever:
************
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY_C.OLD;1
  161       msysprv[0] = (1 << PRV$V_SYSPRV);
  162       msysprv[1] = 0;
  163       c$cks(lib$getjpi(&item,0,0,&authprivs,0,0));
  164       if (!(authprivs[0] & (1 << PRV$V_SYSPRV))) c$cks(sys$setprv(0,msysprv,0,0));
  165   }
******
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY.C;3
  161       msysprv[0] = PRV$M_SYSPRV;
  162       msysprv[1] = 0;
  163       c$cks(lib$getjpi(&item,0,0,&authprivs,0,0));
  164       if (!(authprivs[0] & PRV$M_SYSPRV)) c$cks(sys$setprv(0,msysprv,0,0));
  165   }
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY_C.OLD;1
  177       msysprv[0] = (1 << PRV$V_SYSPRV);
  178       msysprv[1] = 0;
******
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY.C;3
  177       msysprv[0] = PRV$M_SYSPRV;
  178       msysprv[1] = 0;
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY_C.OLD;1
 1048   
******
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY.C;3
 1048                   char null_device[4] = "nl:";
 1049   
************
************
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY_C.OLD;1
 1058                   _c$cks(lib$spawn(c$dsc(mail_cmd),0,0,0,0,0,0,0,0,0,0,0));
 1059                   if (screen_active) {
******
File NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY.C;3
 1059                   _c$cks(lib$spawn(c$dsc(mail_cmd),c$dsc(null_device),0,0,0,0,0,0,0,0,0,0));
 1060                   if (screen_active) {
************

Number of difference sections found: 4
Number of difference records found: 7

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY.DIFF;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY_C.OLD;1-
    NEWS_DEVICE:[NEWS_SRC]NEWSUTILITY.C;3


PRV$V_whatever:
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  204       msysprv[0] = (1 << PRV$V_SYSPRV);
  205       msysprv[1] = 0;
  206       c$cks(lib$getjpi(&item,0,0,&authprivs,0,0));
  207       if (!(authprivs[0] & (1 << PRV$V_SYSPRV))) c$cks(sys$setprv(0,msysprv,0,0));
  208   
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  204       msysprv[0] = PRV$M_SYSPRV;
  205       msysprv[1] = 0;
  206       c$cks(lib$getjpi(&item,0,0,&authprivs,0,0));
  207       if (!(authprivs[0] & PRV$M_SYSPRV)) c$cks(sys$setprv(0,msysprv,0,0));
  208   
************
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  222       msysprv[0] = (1 << PRV$V_SYSPRV);
  223       msysprv[1] = 0;
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  222       msysprv[0] = PRV$M_SYSPRV;
  223       msysprv[1] = 0;
************

Added some debugging:
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  394   open_net(node,proto)
  395       char *node;
  396       int proto;
  397   {
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  394   open_net(node,proto,fpd,debugging)
  395       FILE *fpd;
  396       char *node;
  397       int proto, debugging;
  398   {
************

Made the NNTP_FEED DECnet transfers consistent with the way NEWS
does the transfers:
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  431           sprintf(netobj,"%s::\"NEWS=\"",node);
  432           return(sys$assign(c$dsc(netobj),&net_chan,0,0) & 1);
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  432           sprintf(netobj,"%s::\"TASK=NNTP\"",node);
  433           if(debugging)
  434             fprintf(fpd,"open_net: %s\n", netobj);
  435           return(sys$assign(c$dsc(netobj),&net_chan,0,0) & 1);
************

More debugging:
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  496   open_rem_chan(node,proto)
  497       char *node;
  498       int proto;
  499   {
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  499   open_rem_chan(node,proto,fpd,debugging)
  500       FILE *fpd;
  501       char *node;
  502       int proto, debugging;
  503   {
************
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  514           if (!open_net(net_open_chan,proto)) {
  515               net_read_status = 0;
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  518           if (!open_net(net_open_chan,proto,fpd,debugging)) {
  519               if(debugging) 
  520                 fprintf(fpd, "open_rem_chan: unable to open net channel to %s\n",
  521                         net_open_chan);
  522               net_read_status = 0;
************
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  521               close_net();
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  528               if (debugging)
  529                 fprintf(fpd, "open_rem_chan: net response timeout\n");
  530               close_net();
************
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  526           if (reply!=200) {
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  535           else if(debugging)
  536               fprintf(fpd, "open_rem_chan: net response = %d\n", reply);
  537           if (reply!=200) {
************
************
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1
  771           if (!open_rem_chan(node,proto_num)) {
  772               if (debugging) fprintf(fpd,"Cannot connect to node, retry: %s\n",inpline);
******
File NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
  782           if (!open_rem_chan(node,proto_num,fpd,debugging)) {
  783               if (debugging) fprintf(fpd,"Cannot connect to node, retry: %s\n",inpline);
************

Number of difference sections found: 9
Number of difference records found: 25

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.DIFF;1-
    NEWS_DEVICE:[NEWS_SRC]NNTP_FEED_C.OLD;1-
    NEWS_DEVICE:[NEWS_SRC]NNTP_FEED.C;5
