X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2FMKcodes.awk;h=b9ba636e0ccdcd021a77991048dbb0b11396aa28;hp=d3aff51eca8b0d9b446a6263f2f0a58e6b9b8e45;hb=e70a86c3d48b8cbad0f6d1c33ba5b027a243834e;hpb=f7b8e526e024ce141e61633e966255400de67772 diff --git a/ncurses/tinfo/MKcodes.awk b/ncurses/tinfo/MKcodes.awk index d3aff51e..b9ba636e 100644 --- a/ncurses/tinfo/MKcodes.awk +++ b/ncurses/tinfo/MKcodes.awk @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # +# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -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.5 2008/06/28 23:13:25 tom Exp $ function large_item(value) { result = sprintf("%d,", offset); offset = offset + length(value) + 1; @@ -138,6 +138,20 @@ END { print "FIX(numcodes)" print "FIX(strcodes)" print "" + print "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }" + print "" + print "#if NO_LEAKS" + 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 "#endif" + print "" print "#else" print "" print "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]"