DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (1aeaa33a64f9)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/awk -f
# Reads cairo header files on stdin, and outputs a file with defines for
# renaming all public functions to Mozilla-specific names.
# Usage:
#   cat *.h | awk -f ./filterpublic.awk | sort > cairo-rename.h
#
# pixman:
#   grep '(' ../../libpixman/src/pixman.h | grep '^[a-z]' | sed 's, *(.*$,,' | sed 's,^.* ,,'

BEGIN { state = "public"; }

/^cairo_public/ { state = "function"; next; }
/[a-zA-Z_]+/	{
			if (state == "function") {
				print "#define " $1 " _moz_" $1;
				state = "public";
			}
		}

# catch some one-off things
END {
}