Article View: comp.soft-sys.andrew
Article #1280Re: updating the inset in messages.SurrogateHelpFile?
From: Nathaniel Borenstein
Date: Tue, 11 Dec 1990 19:41
Date: Tue, 11 Dec 1990 19:41
33 lines
2028 bytes
2028 bytes
This is not a Messages bug, but, properly speaking, it is a CH*MP bug.
(However, that doesn't get ME off the hook, since I'm the author of
both!) The bug is that once a program is started and is running the
ch*mp code, it never again checks to see if any of the data files (the
files on your champpath preference, if you have one) have changed. In
other words, if you add events, you won't see them until you exit &
restart the program. You will see this same bug if you use ez to view a
chomp inset, as well.
This could, of course, be fixed. The code is all in atk/champ. In
fact, here's an inefficient but simple fix: In the file
atk/champ/match.c, add the following to the very beginning of the
procedure "FlagEventsMatchingDate":
struct eventnode *preven = NULL;
for (en=RootEventNode; en ; en=en->next) {
if (en->event) free(en->event);
if (preven) free(preven);
preven = en;
}
free(preven);
RootEventNode = NULL;
ReadDatesFromChampPath(NULL);
Note that I haven't tested the above code, but I believe it should fix
the problem. The only thing is, it is very inefficient -- it rereads
all your champ files every time, rather than only when they change. To
do it right would be a little more work, but would all be localized to
the two files match.c and read.c, and should be within the abilities of
most C programmers. (Note that no ATK knowledge is required, as this is
all in the non-ATK part of the code.) I trust that if anyone actually
gets motivated to fix this "right" they will pass the code back to the
ITC...
Technical Details
Message-ID:
<UbNHNVa0M2Yt44WLZM@thumper.bellcore.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!ogicse!ucsd!ucbvax!THUMPER.BELLCORE.COM!nsbReferences:
<AbNH27G0=deb8IlooL@frenchhorn.ecn.purdue.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ogicse!ucsd!ucbvax!THUMPER.BELLCORE.COM!nsb From: nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) Newsgroups: comp.soft-sys.andrew Subject: Re: updating the inset in messages.SurrogateHelpFile? Message-ID: <UbNHNVa0M2Yt44WLZM@thumper.bellcore.com> Date: 11 Dec 90 19:41:21 GMT References: <AbNH27G0=deb8IlooL@frenchhorn.ecn.purdue.edu> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33