X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2FMKcodes.awk;h=db8ad5541841a376d9fcb755d751f9470f2c08a6;hp=d3aff51eca8b0d9b446a6263f2f0a58e6b9b8e45;hb=40df80d8d3f96c991f55569bce475e71cc38be12;hpb=f7b8e526e024ce141e61633e966255400de67772 diff --git a/ncurses/tinfo/MKcodes.awk b/ncurses/tinfo/MKcodes.awk index d3aff51e..db8ad554 100644 --- a/ncurses/tinfo/MKcodes.awk +++ b/ncurses/tinfo/MKcodes.awk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKcodes.awk,v 1.3 2007/09/01 20:50:01 tom Exp $ +# $Id: MKcodes.awk,v 1.4 2007/11/03 20:24:15 tom Exp $ function large_item(value) { result = sprintf("%d,", offset); offset = offset + length(value) + 1; @@ -138,6 +138,17 @@ END { print "FIX(numcodes)" print "FIX(strcodes)" print "" + print "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }" + print "" + print "NCURSES_EXPORT(void)" + print "_nc_codes_leaks(void)" + print "{" + if (bigstrings) { + print "FREE_FIX(boolcodes)" + print "FREE_FIX(numcodes)" + print "FREE_FIX(strcodes)" + } + print "}" print "#else" print "" print "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]"