Path: utzoo!yunexus!ists!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!fletcher From: fletcher@cs.utexas.edu (Fletcher Mattox) Newsgroups: news.admin Subject: Re: Annoying problem with rn (v2.11.18) Message-ID: <7228@cs.utexas.edu> Date: 18 Nov 89 17:28:39 GMT Article-I.D.: cs.7228 References: <124@toaster.SFSU.EDU> <1989Nov17.005615.4816@NCoast.ORG> Organization: U. Texas CS Dept., Austin, Texas Lines: 109 In article <1989Nov17.005615.4816@NCoast.ORG> allbery@ncoast.ORG (Brandon S. Allbery) writes: >Pardon me, but by default rn does *not* add new groups to a user's .newsrc if >the user does not choose to subscribe to them. Rn uses a separate file >(.rnsoft) to relate the contents of the active file to that of the .newsrc; >this can become out of step if a newsgroup is rmgroup'ed, which causes rn (on >ncoast, at least) to suddenly prompt with about 60 "new" newsgroups. (When I found this annoying too. Rn notices that the size of the active file (as recorded in .rnlast) has changed and then prompts you to add every newsgroup which is in active but is not in .newsrc. I arranged for rn to add (but unsubscribe) the newsgroup to .newsrc when you respond negatively to "Newsgroup %s not in .newsrc--add? [yn]". That way you get asked once and only once. *** /tmp/rcstuff.c Sat Nov 18 11:23:45 1989 --- rcstuff.c Tue May 30 23:21:41 1989 *************** *** 290,295 goto reask_add; } else if (*buf == 'n' || *buf == 'q') { return FALSE; } else if (*buf == 'y') { --- 290,296 ----- goto reask_add; } else if (*buf == 'n' || *buf == 'q') { + ng = add_newsgroup(ngname, '!'); return FALSE; } else if (*buf == 'y') { *************** *** 293,299 return FALSE; } else if (*buf == 'y') { ! ng = add_newsgroup(ngname); do_reloc = FALSE; } else { --- 294,300 ----- return FALSE; } else if (*buf == 'y') { ! ng = add_newsgroup(ngname, ':'); do_reloc = FALSE; } else { *************** *** 359,366 /* add a newsgroup to the .newsrc file (eventually) */ NG_NUM ! add_newsgroup(ngn) ! char *ngn; { register NG_NUM newng = nextrcline++; /* increment max rcline index */ --- 360,367 ----- /* add a newsgroup to the .newsrc file (eventually) */ NG_NUM ! add_newsgroup(ngn, c) ! char *ngn, c; { register NG_NUM newng = nextrcline++; /* increment max rcline index */ *************** *** 369,375 rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1)); strcpy(rcline[newng],ngn); /* and copy over the name */ *(rcline[newng] + rcnums[newng]) = '\0'; ! rcchar[newng] = ':'; /* call it subscribed */ toread[newng] = TR_NONE; /* just for prettiness */ #ifdef HASHNG sethash(newng); /* so we can find it again */ --- 370,376 ----- rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1)); strcpy(rcline[newng],ngn); /* and copy over the name */ *(rcline[newng] + rcnums[newng]) = '\0'; ! rcchar[newng] = c; /* subscribe or unsubscribe */ toread[newng] = TR_NONE; /* just for prettiness */ #ifdef HASHNG sethash(newng); /* so we can find it again */ *************** *** 375,381 sethash(newng); /* so we can find it again */ #endif #ifdef RELOCATE ! return relocate_newsgroup(newng,-1); #else return newng; #endif --- 376,382 ----- sethash(newng); /* so we can find it again */ #endif #ifdef RELOCATE ! return c=='!' ? newng : relocate_newsgroup(newng,-1); #else return newng; #endif