ANU News Patch Patch ID: 940526_newsrc.c!bailey@genetics.upenn.edu Date: 26-May-1994 Author: Charles Bailey bailey@genetics.upenn.edu News Version: 6.1beta9 News Files: NewsRC.C Description: If the /DotNewsRC qualifier was specified when invoking News, it should override the profile setting DotNewsRC for the current session. This patch fixed a bug which caused the profile setting to override the command line setting after initial startup was complete. *** newsrc.c --- newsrc_new.c ************** *** 46,48 **-- **/ --- 46,51 ----- + ** V6.1b9 26-May-1994 bailey@genetics.upenn.edu + ** - fixed bug which caused profile DotNewsRc setting to override /DotNewsRC + ** qualifier on News CL once startup was completed **-- **/ ************** *** 147,152 * a call to init_screen after read_reg_file is invoked) */ int read_reg_file() { char *in_line, *itm_list, new_name[128], *old_dir_typ; --- 150,159 ----- * a call to init_screen after read_reg_file is invoked) */ + /* preserve News CL setting of usedotnewsrc across + read_reg_file into reg_context */ + static int clusedotnewsrc; + int read_reg_file() { char *in_line, *itm_list, new_name[128], *old_dir_typ; ************** *** 217,223 if (chop_str(in_line,'|')) profile_flags |= PROFILE_DOTNEWSRC; usedotnewsrc = (usedotnewsrc < 2) ? profile_flags & PROFILE_DOTNEWSRC ! : usedotnewsrc - 2; if (usedotnewsrc) { if (dotnewsrc = fopen("sys$login:.newsrc","r")) { dotnewsrcexists = _ck_open_r(dotnewsrc,"sys$login:.newsrc"); --- 224,230 ----- if (chop_str(in_line,'|')) profile_flags |= PROFILE_DOTNEWSRC; usedotnewsrc = (usedotnewsrc < 2) ? profile_flags & PROFILE_DOTNEWSRC ! : (clusedotnewsrc = usedotnewsrc) - 2; if (usedotnewsrc) { if (dotnewsrc = fopen("sys$login:.newsrc","r")) { dotnewsrcexists = _ck_open_r(dotnewsrc,"sys$login:.newsrc"); ************** *** 503,509 struct dir_class *ch = c_head; line_editing = (profile_flags & PROFILE_LINEEDIT) != 0; ! usedotnewsrc = (profile_flags & PROFILE_DOTNEWSRC) != 0; curr_class = 0; if (*n_class_name) { while (ch) { --- 510,520 ----- struct dir_class *ch = c_head; line_editing = (profile_flags & PROFILE_LINEEDIT) != 0; ! if (clusedotnewsrc) { ! usedotnewsrc = clusedotnewsrc - 2; ! clusedotnewsrc = 0; ! } ! else usedotnewsrc = (profile_flags & PROFILE_DOTNEWSRC) != 0; curr_class = 0; if (*n_class_name) { while (ch) { *** patchlist.h;-1 --- patchlist.h ************** *** 1,1 =+=+= End =+=+= --- 1,2 ----- + 940526_newsrc.c!bailey@genetics.upenn.edu =+=+= End =+=+=