X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0138ab0e9b1e8fa59be141338d599277095dec8c..eceaf7315dcf1e04a5195d3da52c5c9836fdce25:/sbr/fmt_compile.c diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 4409e628..0fd83d1e 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -856,6 +856,24 @@ fmt_free(struct format *fmt, int reset_comptable) free_comptable(); } +/* + * Free just the text strings from all of the component hash table entries + */ + +void +fmt_freecomptext(void) +{ + unsigned int i; + struct comp *cm; + + for (i = 0; i < sizeof(wantcomp)/sizeof(wantcomp[0]); i++) + for (cm = wantcomp[i]; cm; cm = cm->c_next) + if (cm->c_text) { + free(cm->c_text); + cm->c_text = NULL; + } +} + /* * Find a component in our hash table. This is just a public interface to * the FINDCOMP macro, so we don't have to expose our hash table.