Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!mit-eddie!husc6!psuvax1!gondor.cs.psu.edu!flee From: flee@gondor.cs.psu.edu.UUCP Newsgroups: news.software.nntp Subject: Re: Can 'rrn' check for new news? Message-ID: <3625@psuvax1.psu.edu> Date: 21 May 88 01:32:19 GMT References: <322@fxgrp.UUCP> <1357@its63b.ed.ac.uk> Sender: news@psuvax1.psu.edu Reply-To: flee@gondor.cs.psu.edu (Felix Lee) Organization: The Roadside Picnic Lines: 67 Posted: Fri May 20 21:32:19 1988 In article <1357@its63b.ed.ac.uk> simon%lfcs.ed.ac.uk@nss.cs.ucl.ac.uk (Simon Brown) writes: > Aargh! This seems a pretty crude/bizarre way of doing it. Okay. Here is a different set of patches to rrn. The active file gets grabbed automagically when you reach the End of Newsgroups prompt. No "-A" option needed. A much better but more difficult solution would be to use the information that the server gives you when you send a "GROUP" command. Except the effort isn't really worth it. I'd just as soon wait for rn version 5.0. -- Felix Lee flee@gondor.cs.psu.edu *!psuvax1!gondor!flee diff -c -r4.3 rn.c *** /tmp/,RCSt1001373 Fri May 20 21:27:25 1988 --- rn.c Fri May 20 13:55:49 1988 *************** *** 88,98 **** --- 88,104 ---- bool special = FALSE; /* temporarily allow newsgroup */ /* with no unread news? */ bool retry; /* cycle back to top of list? */ + #ifdef SERVER + bool reretry; /* get the active file again? */ + #endif NG_NUM recent_ng = 0; current_ng = 0; do { retry = FALSE; + #ifdef SERVER + reretry = FALSE; + #endif if (findlast) { findlast = FALSE; starthere = 0; *************** *** 143,148 **** --- 149,162 ---- } } #endif + #ifdef SERVER + if (retry || reretry) { + (void) fclose(actfp); + ngdata_init(); /* get the active file again */ + retry = TRUE; + reretry = FALSE; + } + #endif dfltcmd = (retry ? "npq" : "qnp"); #ifdef VERBOSE IF(verbose) *************** *** 177,182 **** --- 191,199 ---- ng++; /* then skip it */ continue; } + #ifdef SERVER + reretry = TRUE; /* there's a non-empty newsgroup. */ + #endif dfltcmd = "ynq"; #ifdef VERBOSE IF(verbose)