blob: f01c24eb37cebe1ab1935ba565776630b1587dcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
LANG=C
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
|