stu@jpusa1.UUCP (Stu Heiss) (05/24/86)
Os sys5.1; cpu 68000. I just brought rn up to patch level 27 and reinstalled rn/news with dbm; I had originally installed it without. Two problems surfaced. On long-aligned machines, bits.c blows up if DBM is defined; see the recent discussion on article.c for reference. That was easy enough to fix - the next one has me stumped. Inews doesn't seem to be updating the history dbm files properly as evidenced by rn's not handling xrefs properly. Further investigation by playing with 'article' on freshly posted articles verifies the dbm problem. I can force a rebuild with 'expire -r' which fixes the dbm files (xref handling works again) until more news comes in. So the code in expire is working right but what's going on with inews? BTW, if you don't compile bits.c (rn) with DBM defined (no reference in the Makefile or documentation), you probably wont observe this funny behaviour. If anybody know what's going on, please MAIL to me at 'ihnp4!jpusa1!stu'. In the meantime, here are fixes for bits.c on long-aligned machines and the bogus sed script in newsgroups. Sorry about the Revision numbers... -----------snip------------ *** /tmp/,RCSt1a09282 Fri May 23 11:50:13 1986 --- /tmp/,RCSt2a09282 Fri May 23 11:50:45 1986 *************** *** 1,4 ! /* $Header: bits.c,v 1.1 86/05/23 11:02:09 stu Exp $ * * $Log: bits.c,v $ * Revision 1.1 86/05/23 11:02:09 stu --- 1,4 ----- ! /* $Header: bits.c,v 1.2 86/05/23 11:18:30 stu Exp $ * * $Log: bits.c,v $ * Revision 1.2 86/05/23 11:18:30 stu *************** *** 1,6 /* $Header: bits.c,v 1.1 86/05/23 11:02:09 stu Exp $ * * $Log: bits.c,v $ * Revision 1.1 86/05/23 11:02:09 stu * Initial revision * --- 1,12 ----- /* $Header: bits.c,v 1.2 86/05/23 11:18:30 stu Exp $ * * $Log: bits.c,v $ + * Revision 1.2 86/05/23 11:18:30 stu + * dbm/fseek fix + * + * Revision 1.2 86/05/23 11:13:30 stu + * dbm/fseek fix + * * Revision 1.1 86/05/23 11:02:09 stu * Initial revision * *************** *** 9,14 * */ #include "EXTERN.h" #include "common.h" #include "rcstuff.h" --- 15,21 ----- * */ + #define bcopy(a,b,c) blt(b,a,c) #include "EXTERN.h" #include "common.h" #include "rcstuff.h" *************** *** 305,310 register char *idp; char *ident_buf; static FILE * hist_file = Nullfp; #else if ( #ifdef DEBUGGING --- 312,318 ----- register char *idp; char *ident_buf; static FILE * hist_file = Nullfp; + long offset; #else if ( #ifdef DEBUGGING *************** *** 350,356 rhs = fetch(lhs); /* fetch the record */ if (rhs.dptr == NULL) /* if null, nothing there */ goto wild_goose; ! fseek (hist_file, *((long *)rhs.dptr), 0); /* datum returned is position in hist file */ fgets (xref_buf, BUFSIZ, hist_file); #ifdef DEBUGGING --- 358,365 ----- rhs = fetch(lhs); /* fetch the record */ if (rhs.dptr == NULL) /* if null, nothing there */ goto wild_goose; ! bcopy(rhs.dptr, (char *)&offset, sizeof(long)); ! fseek (hist_file, offset, 0); /* datum returned is position in hist file */ fgets (xref_buf, BUFSIZ, hist_file); #ifdef DEBUGGING -----------snip------------ *** /tmp/,RCSt1a09273 Fri May 23 11:49:10 1986 --- /tmp/,RCSt2a09273 Fri May 23 11:49:21 1986 *************** *** 1,5 : use /bin/sh ! # $Header: newsgroups,v 1.1 86/05/22 22:42:30 stu Exp $ # # $Log: newsgroups,v $ # Revision 1.1 86/05/22 22:42:30 stu --- 1,5 ----- : use /bin/sh ! # $Header: newsgroups,v 1.2 86/05/22 23:00:39 stu Exp $ # # $Log: newsgroups,v $ # Revision 1.2 86/05/22 23:00:39 stu *************** *** 2,7 # $Header: newsgroups,v 1.1 86/05/22 22:42:30 stu Exp $ # # $Log: newsgroups,v $ # Revision 1.1 86/05/22 22:42:30 stu # Initial revision # --- 2,10 ----- # $Header: newsgroups,v 1.2 86/05/22 23:00:39 stu Exp $ # # $Log: newsgroups,v $ + # Revision 1.2 86/05/22 23:00:39 stu + # fix bad sed script + # # Revision 1.1 86/05/22 22:42:30 stu # Initial revision # *************** *** 17,23 : You might want to change pager to a "make column" program if you have one. : On the other hand, if your kernel does paging, cat would probably do. ! pager="/usr/local/bin/less" active="/usr/lib/news/active" : End of system dependencies, hopefully --- 20,27 ----- : You might want to change pager to a "make column" program if you have one. : On the other hand, if your kernel does paging, cat would probably do. ! #pager="/usr/local/bin/less" ! pager="/bin/pr -2 -t -r" active="/usr/lib/news/active" : End of system dependencies, hopefully *************** *** 54,59 /bin/echo "" /bin/echo "Unsubscribed but mentioned in .newsrc:" /bin/sed < $dotdir/.newsrc \ ! -e "/$1.*!/"'s/^\([^!]*\)!.*$/\1/p' \ ! -e 'd' | \ /bin/sort | $pager --- 58,67 ----- /bin/echo "" /bin/echo "Unsubscribed but mentioned in .newsrc:" /bin/sed < $dotdir/.newsrc \ ! -e "/$1.*!.*/b x" \ ! -e 'd' \ ! -e ":x" \ ! -e "/$1.*!/"'s/^\([^!]*\)!.*$/\1/p' | \ /bin/sort | $pager exit 0 ### doesnt work... *************** *** 57,59 -e "/$1.*!/"'s/^\([^!]*\)!.*$/\1/p' \ -e 'd' | \ /bin/sort | $pager --- 63,71 ----- -e ":x" \ -e "/$1.*!/"'s/^\([^!]*\)!.*$/\1/p' | \ /bin/sort | $pager + exit 0 + ### doesnt work... + #/bin/sed < $dotdir/.newsrc \ + # -e "/$1.*!/"'s/^\([^!]*\)!.*$/\1/p' \ + # -e 'd' | \ + #/bin/sort | $pager -----------snip------------ -- Stu Heiss {ihnp4!jpusa1!stu}