nickles (03/31/83)
#N:ihlpf:7700003: 0:696
ihlpf!nickles Mar 31 9:41:00 1983
If your notes program gets a feed from news version 2.10, the
internet address format can play mean games to what notes thinks
is the author's original site. The formats are:
Old format
Asite.seqno (ex: ihlpf.453)
New format
A<seq@site.UUCP> (ex: 453@ihlpf.UUCP)
I added the following code to newsinput.c, at the first fscanf to
fix this problem (line 91 in my code). Change line
fscanf(rawnews, "%[^.].%ld", origsys, &newsseq);
to
fscanf(rawnews, "%[^<.]", origsys);
if (*origsys != '\0')
fscanf(rawnews, ".%ld", &newsseq);
else
fscanf(rawnews, "<%ld@%[^.]", &newsseq, origsys);
This should parse both formats correctly.
Jack Nickles
[...ihnss!] ihlpf!nicklesnickles (03/31/83)
#R:ihlpf:7700003:ihlpf:7700004: 0:641
ihlpf!nickles Mar 31 10:14:00 1983
And another thing:
The new date format (from some obscure standard?), looks like
Thu, 31-Mar-83 08:54:11 CST
instead of
Thu Mar 31 08:54:11 1983 (ctime(3) format, a normal standard).
To fix this, change lines 21-24 of datein.c to read:
if ((sscanf (line, "%[^ ]%hd %hd:%hd:%hd %hd", month, &day, &hour,
&min, &sec, &year) != 6) && /* old format? */
(sscanf (line, "%hd-%[^-]-%hd %hd:%hd:%hd", &day, month, &year,
&hour, &min, &sec) != 6)) /* 2.10 format? */
return - 1; /* bad date parsed */
if (year < 1000)
year += 1900; /* kludge for new format */
Jack Nickles
[...ihnss!] ihlpf!nicklesmark (03/31/83)
This mod to notes is not necessary. You're just seeing the results of a bug that existed at one time in 2.10. It's already been fixed - the routine to write A format has to change from "ident" to "oident" what is written after the A. Mark