[news.software.b] Patch #11 didn't completely fix expire.c

rct@occrsh.ATT.COM (Bob_Tracy) (10/21/87)

The intent of the last few patches for expire.c seems to be to have
expire for non-DBM sites use "history" rather than "nhistory" as the
new history file.  After applying patch #11, line 770 in expire.c
only gets executed for DBM sites, so NARTFILE doesn't get renamed
to ARTFILE and rebuildhistorydir() fails miserably.  The solution
appears to be assigning nhfd to ARTFILE for non-DBM sites rather
than to NARTFILE.  Here is a context diff suitable for patch:


=====================--CUT HERE--======================
*** expire.c.0	Mon Oct 19 15:57:38 1987
--- expire.c	Wed Oct 21 12:58:00 1987
***************
*** 361,370 ****
  	} else {
  #ifdef DBM
  		ohfd = xfopen(ARTFILE, "r");
  #else
  		ohfd = nexthistfile((FILE *)NULL);
  #endif /* DBM */
- 		nhfd = xfopen(NARTFILE, "w");
  	}
  
  	dolock();
--- 361,371 ----
  	} else {
  #ifdef DBM
  		ohfd = xfopen(ARTFILE, "r");
+ 		nhfd = xfopen(NARTFILE, "w");
  #else
  		ohfd = nexthistfile((FILE *)NULL);
+ 		nhfd = xfopen(ARTFILE, "w");
  #endif /* DBM */
  	}
  
  	dolock();
=====================--CUT HERE--======================

--Bob Tracy	AT&T Network & Data Systems	Oklahoma City
{most AT&T sites}!occrsh!rct	or	rct@occrsh.att.com