Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!kuhub.cc.ukans.edu!anu-news!list From: JHWELCH@AMHERST.BITNET (Jonathan_Welch) Newsgroups: news.software.anu-news Subject: Giving NEWS an internal news command at startup Message-ID: Date: 20 Dec 89 16:46:00 GMT Sender: ANU-NEWS Discussion Reply-To: Jonathan_Welch Lines: 70 X-VMS-To: JHWELCH,IN%"anu-news@ndsuvm1" 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