diff options
Diffstat (limited to 'libs/cairo-1.16.0/src/check-headers.sh')
-rwxr-xr-x | libs/cairo-1.16.0/src/check-headers.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libs/cairo-1.16.0/src/check-headers.sh b/libs/cairo-1.16.0/src/check-headers.sh new file mode 100755 index 0000000..6123295 --- /dev/null +++ b/libs/cairo-1.16.0/src/check-headers.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +LC_ALL=C +export LC_ALL + +test -z "$srcdir" && srcdir=. +stat=0 + +echo Checking public headers for missing cairo_public decorators + +cd "$srcdir" +FILES=$all_cairo_headers +if test "x$FILES" = x; then + FILES=`find . -name 'cairo*.h' ! -name '*-private.h' ! -name 'cairoint.h'` +fi + +grep -B 1 '^cairo_.*[ ]\+(' /dev/null $FILES | +awk ' +/^--$/ { context=""; public=0; next; } +/:cairo_.*[ ]+\(/ { if (!public) {print context; print; print "--";} next; } +/-cairo_public.*[ ]/ {public=1;} +{ context=$0; } +' | +sed 's/[.]h-/.h:/' | +grep . >&2 && stat=1 + +exit $stat |