cleanup keyword databases on proram termination
This commit is contained in:
parent
80bc975e33
commit
3d7ab6a297
|
|
@ -75,6 +75,7 @@ com_quit(wordlist *wl)
|
|||
|
||||
/* then go away */
|
||||
|
||||
cp_destroy_keywords();
|
||||
destroy_ivars();
|
||||
|
||||
byemesg();
|
||||
|
|
|
|||
|
|
@ -496,6 +496,16 @@ cp_addkword(int kw_class, char *word)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
cp_destroy_keywords(void)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<NCLASSES; i++)
|
||||
throwaway(keywords[i]);
|
||||
throwaway(commands);
|
||||
}
|
||||
|
||||
/* Remove a keyword from the database. */
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ extern void cp_ccon(bool on);
|
|||
extern void cp_ccrestart(bool kwords);
|
||||
extern void cp_remcomm(char *word);
|
||||
extern void cp_remkword(int kw_class, char *word);
|
||||
extern void cp_destroy_keywords(void);
|
||||
|
||||
extern wordlist *cp_cctowl(struct ccom *stuff);
|
||||
|
||||
/* cshpar.c */
|
||||
|
|
|
|||
Loading…
Reference in New Issue