🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.4bsd
Article #1725

bib - disambiguating references

#1725
From: Col. G. L. Sicherman
Date: Wed, 05 Nov 1986 21:23
58 lines
2375 bytes
Bib disambiguates only successive references.  Thus if your citation
template differs from your sort template, references may not be dis-
ambiguated properly.  Example:

bibl	%A Abel Abel			.\" bib -c3\ D | ditroff -ms
	%T All about Aardvarks		Much has been written about
	%I Aeolipile Press		aardvarks [. abel aardvarks .].
	%D 1986				Some regard them as a sort
					of behemoth [. abel baker behemoths .];
	%A Abel Abel			others consider them superior to
	%A Baker Baker			cats [. abel cats .].
	%T Beset by Behemoths
	%I Basilisk Press		REFERENCES.
	%D 1986
					[Abel 1986]
	%A Abel Abel				A. Abel, _All about Aardvarks,_
	%T Cats Can't Count		Aeolipile Press, 1986.
	%I Cat-O-Print Co.
	%D 1986				[Abel and Baker 1986]
						A. Abel and B. Baker, _Beset
					by Behemoths,_ Basilisk Press, 1986.

					[Abel 1986]
						A. Abel, _Cats Can't Count,_
					Cat-O-Print Co., 1986.

Here's a quick, ugly fix.  The source file is bibargs.c.
-------------------------
994a995,999
> /*
>  *	Bug fix: if sort template != citation template, equal citation
>  *	  strings may not be adjacent.  Quick kluge is to compare all
>  *	  strings (yuk).		--the Colonel, 5 Nov 1986
>  */
999,1000c1004,1006
<    for (i = 0; i < numrefs-1; i = j) {
<       j = i + 1;
---
>    for (i = 0; i < numrefs-1; i++) {
>       adstr = 'a';
>       for (j = i + 1; j < numrefs; j++)
1002,1009c1008,1009
<          adstr = 'a';
<          for(j = i+1;
< 	     j<numrefs && strcmp(refinfo[i].ri_cite,refinfo[j].ri_cite) == 0;
< 	     j++) {
<             adstr = 'a' + (j-i);
< 	    refinfo[j].ri_disambig[0] = adstr;
<             }
< 	 refinfo[i].ri_disambig[0] = 'a';
---
>          refinfo[i].ri_disambig[0] = 'a';
>          refinfo[j].ri_disambig[0] = ++adstr;
-- 
Col. G. L. Sicherman
UU: ...{rocksvax|decvax}!sunybcs!colonel
CS: colonel@buffalo-cs
BI: colonel@sunybcs, csdsiche@sunyabvc
Technical Details
Message-ID: <1374@sunybcs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!sunybcs!colonel

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!sunybcs!colonel
From: colonel@sunybcs.UUCP (Col. G. L. Sicherman)
Newsgroups: net.bugs.4bsd
Subject: bib - disambiguating references
Message-ID: <1374@sunybcs.UUCP>
Date: Wed, 5-Nov-86 16:23:53 EST
Article-I.D.: sunybcs.1374
Posted: Wed Nov  5 16:23:53 1986
Date-Received: Fri, 7-Nov-86 21:05:50 EST
Organization: DALEK Reproducing Equipment, Inc.
Lines: 58