X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=extract-wrapped-symbols;h=8cdd035070d5b8c974ee128773c0b876a8d7bcca;hb=5169acf1de805f8ad277554f6ec064e8f36111c3;hp=2b9f76a6344af7c35af5d4c3f804b1d57d1e4c0d;hpb=c063b28a99d7ee825bcc84e00737469049592169;p=fips diff --git a/extract-wrapped-symbols b/extract-wrapped-symbols index 2b9f76a..8cdd035 100755 --- a/extract-wrapped-symbols +++ b/extract-wrapped-symbols @@ -8,12 +8,16 @@ # libfips, while all other symbols are private. # We have two different patterns for identifying wrapped -# functions. The first is a call to a macro ending in "DEFER" (such as -# DEFER or TIMED_DEFER). In this case, the first argument to the macro -# is the name of the wrapped function. +# functions. The first is a call to one of the DEFER macros +# (GLWRAP_DEFER, TIMED_DEFER, WGLWRAP_DEFER_WITH_RETURN, etc.). In +# this case, the name of the wrapped function appears as the first or +# second argument to the macro, (second for the case of of +# _WITH_RETURN macro). deferred=`grep 'DEFER[ (]*e*gl' $@ | sed -s 's/.*DEFER *(\([^,)]*\).*/\1/'` +deferred_return=`grep 'DEFER_WITH_RETURN *([^,]*, *e*gl' $@ | sed -s 's/.*DEFER_WITH_RETURN *([^,]*, *\([^,)]*\).*/\1/'` + # The second-case is functions for which we either implement or call # the underlying "real" function. In these cases, the code uses the # convention of having a function or a function-pointer with a name of @@ -32,6 +36,7 @@ global: EOF echo "$deferred +$deferred_return $wrapped" | sort | uniq | sed -e 's/\(.*\)/ \1;/' cat <