diff options
Diffstat (limited to 'libs/cairo-1.16.0/boilerplate/make-cairo-boilerplate-constructors.sh')
-rw-r--r-- | libs/cairo-1.16.0/boilerplate/make-cairo-boilerplate-constructors.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/cairo-1.16.0/boilerplate/make-cairo-boilerplate-constructors.sh b/libs/cairo-1.16.0/boilerplate/make-cairo-boilerplate-constructors.sh new file mode 100644 index 0000000..09716ca --- /dev/null +++ b/libs/cairo-1.16.0/boilerplate/make-cairo-boilerplate-constructors.sh @@ -0,0 +1,29 @@ +#! /bin/sh + +if test $# -eq 0; then + echo "$0: no input files." >&2 + exit 0 +fi + +cat <<HERE +/* WARNING: Autogenerated file - see $0! */ + +#include "cairo-boilerplate-private.h" + +void _cairo_boilerplate_register_all (void); + +HERE + +cat "$@" | sed '/^CAIRO_BOILERPLATE/!d; s/CAIRO_BOILERPLATE.*(\(.*\),.*/extern void _register_\1 (void);/' + +cat <<HERE + +void +_cairo_boilerplate_register_all (void) +{ +HERE + +cat "$@" | sed '/^CAIRO_BOILERPLATE/!d; s/CAIRO_BOILERPLATE.*(\(.*\),.*/ _register_\1 ();/' + +echo "}" + |