summaryrefslogtreecommitdiff
path: root/gdk/broadway/toarray.pl
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-11-18 21:26:40 +0100
committerAlexander Larsson <alexl@redhat.com>2010-11-25 22:09:29 +0100
commitb07ead64ed460ff9074b6a4eba63466c06ab3130 (patch)
treee9c3194e744c6c45becc429b8207f7fa8f13f0ca /gdk/broadway/toarray.pl
parentded9bc698bc822a939cad9155454e0c3e6754e3b (diff)
downloadgtk+-b07ead64ed460ff9074b6a4eba63466c06ab3130.tar.gz
Add makerules to turn client.html and broadway.js into #include files
Diffstat (limited to 'gdk/broadway/toarray.pl')
-rwxr-xr-xgdk/broadway/toarray.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdk/broadway/toarray.pl b/gdk/broadway/toarray.pl
new file mode 100755
index 0000000000..e430885e9a
--- /dev/null
+++ b/gdk/broadway/toarray.pl
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -w
+
+my $FILENAME = $ARGV[0];
+
+open FILE, $FILENAME or die "Cannot open $FILENAME";
+
+my $ARRAYNAME = $ARGV[1];
+print "static const char $ARRAYNAME\[\] =";
+while (<FILE>) {
+ s@\\@\\\\@g;
+ s@"@\\"@g;
+ chomp ($_);
+ print "\n \"$_\\n\"";
+}
+print ";\n";