JHWELCH@AMHERST.BITNET (Jonathan_Welch) (12/21/89)
I've been modifying my copy of news.c when new releases come out to enable one to supply an internal news command to be executed after news has started up. Our users had been trained to type $ ANNOUNCE to read messages about system upgraded, etc. When we converted from DEC's NOTES program to the news system we needed to keep this functionality so I modified news.c to do this. Now our ANNOUNCE command is a symbol with the following definition: $Announce :== 'news select ecs.announce This modification is also useful if you want to go into a newsgroup immediately without having to scan all the groups or whatever. Geoff - if you think this feature is a good idea perhaps you could put it into forthcoming releases. Jonathan Welch VAX Systems Programmer Bitnet: JHWELCH@umaecs Univ. of Mass, Amherst Internet: JHWELCH@ecs.umass.edu ************ File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59C]NEWS.C;21 125 if ((one_pass) && (one_pass++ > 1)) break; 126 c$cks(1); ****** File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59A]NEWS.C;3 125 /* if ((one_pass) && (one_pass++ > 1)) break; old code -jw */ 126 c$cks(1); ************ ************ File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59C]NEWS.C;21 140 if ((cmd_status != 2) && (!one_pass)) { 141 if (screen_active) { 142 if ((news_context == 1) && (cur_dir_type == DIR_NEW)) dirnew_che ck(); ****** File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59A]NEWS.C;3 140 /* if ((cmd_status != 2) && (!one_pass)) { old code -jw */ 141 if ((cmd_status != 2) && (screen_active) && (one_pass == 0)) { 142 /* if (screen_active) { old code -jw */ 143 if ((news_context == 1) && (cur_dir_type == DIR_NEW)) dirnew_che ck(); ************ ************ File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59C]NEWS.C;21 145 cmd_status = smg$read_composed_line(&kid,&keytab,&command,c$dsc("N EWS> "), ****** File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59A]NEWS.C;3 146 if ((cmd_status != 2) && (one_pass == 0)) { /* new code -jw */ 147 cmd_status = smg$read_composed_line(&kid,&keytab,&command,c$dsc("N EWS> "), ************ ************ File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59C]NEWS.C;21 151 brdcst_line = 0; ****** File D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59A]NEWS.C;3 153 one_pass = 0; /* new code -jw */ 154 brdcst_line = 0; ************ Number of difference sections found: 4 Number of difference records found: 6 DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59C]NEWS.D IFF;1- D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59C]NEWS.C;21- D$SOFTWARE2:[NEWSMGR.NEWS_SRC_V59A]NEWS.C;3
jeh@simpact.com (12/30/89)
In article <ANU-NEWS%89122011084646@NDSUVM1.BITNET>, JHWELCH@AMHERST.BITNET (Jonathan_Welch) writes: > I've been modifying my copy of news.c when new releases come out to enable > one to supply an internal news command to be executed after news has > started up [by specifying the command as command-line parameters to NEWS, eg > > $ news select ecs.announce > > Geoff - if you think this feature is a good idea perhaps you could put > it into forthcoming releases. This is nice, but I would like to repeat my earlier request that the NEWS_INI file be allowed to contain generalized commands and not just DEFINE/KEY . For instance I (and all users at my shop) would like to specify SET LINE_EDITING automatically upon NEWS startup; I should be able to put this command in the NEWS_INI file. A NEWS command found on the DCL command line, as in the example supplied by Mr. Welch, should of course be executed after any commands found in NEWS_INI. --- Jamie Hanrahan, Simpact Associates, San Diego CA Chair, VMSnet [DECUS uucp] and Internals Working Groups, DECUS VAX Systems SIG Internet: jeh@simpact.com, or if that fails, jeh@crash.cts.com Uucp: ...{crash,scubed,decwrl}!simpact!jeh