summaryrefslogtreecommitdiff
path: root/libs/cairo-1.16.0/boilerplate/make-cairo-boilerplate-constructors.sh
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-10-12 12:03:23 -0500
committersanine <sanine.not@pm.me>2022-10-12 12:03:23 -0500
commit530ffd0b7d3c39757b20f00716e486b5caf89aff (patch)
tree76b35fdf57317038acf6b828871f6ae25fce2ebe /libs/cairo-1.16.0/boilerplate/make-cairo-boilerplate-constructors.sh
parent3dbe9332e47c143a237db12440f134caebd1cfbe (diff)
add cairo
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.sh29
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 "}"
+