Article View: news.software.b
Article #4846Cnews histdups broken after patch
From: G. Roderick Singleton
Date: Sun, 09 Jun 1991 18:10
Date: Sun, 09 Jun 1991 18:10
60 lines
2045 bytes
2045 bytes
Somewhere along the line, a patch ( no way to tell which one ) added
three lines too many.
Since I've run into the problem, I suspect others may also have
inherited this little problem. What follows are two version of the
histdups awk script. The faulty one first then the working one. If
any one recognizes the patch that produces this result, I'd sure like
to know as it may have introduced other problems.
Here's the faulty histdups ( note the extra print line at the end ):
# Awk program to merge history lines for the same article in a sorted history
# file (such as is generated during the mkhistory processing).
BEGIN { FS = "\t" ; OFS = "\t" ; mesgid = "" }
{
if ($1 != mesgid) {
if (mesgid != "")
print mesgid, dates, names
mesgid = $1
dates = $2
names = $3
} else
names = names " " $3
}
END {
if (mesgid != "")
print mesgid, dates, names
}
print mesgid, dates, names
}
Now my known working version (pre-patch):
# Awk program to merge history lines for the same article in a sorted history
# file (such as is generated during the mkhistory processing).
BEGIN { FS = "\t" ; OFS = "\t" ; mesgid = "" }
{
if ($1 != mesgid) {
if (mesgid != "")
print mesgid, dates, names
mesgid = $1
dates = $2
names = $3
} else
names = names " " $3
}
END { if (mesgid != "")
print mesgid, dates, names
}
If memory serves me right, there was a patch that addressed duplicates
some time ago. It was not official (i.e. from geoff or henry). I can't
find any such patch in my cnews source tree but I wonder.
ger
--
G. Roderick Singleton, System and Network Manager, JTS Computers
{yunexus | uunet | geac | torsqnt}!gerry@jtsv16.jts.com
Technical Details
Message-ID:
<1991Jun9.181012.25570@jts.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!gerryShow Full Headers
Complete Article Headers
Newsgroups: news.software.b Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!gerry From: gerry@jts.com (G. Roderick Singleton ) Subject: Cnews histdups broken after patch Message-ID: <1991Jun9.181012.25570@jts.com> Organization: JTS Computer Systems Ltd. Date: Sun, 9 Jun 1991 18:10:12 GMT