Path: 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: Date: 11 Dec 90 19:41:21 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 33 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...