disambiguation in bib - CORRECTED
Col. G. L. Sicherman
colonel at sunybcs.UUCP
Fri Nov 7 03:54:15 AEST 1986
Here's a correction to the disambiguation fix. To summarize the problem:
[Abel 1986a]
[Abel 1986b]
[Abel 1986c]
[Abel and Baker 1986]
[Abel 1986a] (should be 1986d)
[Abel 1986b] (should be 1986e)
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, 6 Nov 1986
> */
999,1009c1004,1010
< for (i = 0; i < numrefs-1; i = j) {
< j = i + 1;
< if (strcmp(refinfo[i].ri_cite, refinfo[j].ri_cite)==0) {
< 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';
---
> for (i = 0; i < numrefs-1; i++) {
> adstr = 'a';
> if (!refinfo[i].ri_disambig[0])
> for (j = i + 1; j < numrefs; j++)
> if (strcmp(refinfo[i].ri_cite, refinfo[j].ri_cite)==0) {
> refinfo[i].ri_disambig[0] = 'a';
> refinfo[j].ri_disambig[0] = ++adstr;
--
Col. G. L. Sicherman
UU: ...{rocksvax|decvax}!sunybcs!colonel
CS: colonel at buffalo-cs
BI: colonel at sunybcs, csdsiche at sunyabvc
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list