Kamil Rytarowski | b7d5a9c | 2017-04-26 15:16:04 +0200 | [diff] [blame] | 1 | #!/usr/bin/env perl |
Gerd Hoffmann | d98bc0b | 2015-01-16 13:59:17 +0100 | [diff] [blame] | 2 | use strict; |
3 | use warnings; | ||||
4 | |||||
5 | my $file = shift; | ||||
6 | open FILE, "<", $file or die "open $file: $!"; | ||||
7 | my $name = $file; | ||||
8 | $name =~ s|.*/||; | ||||
9 | $name =~ s/[-.]/_/g; | ||||
10 | print "static GLchar ${name}_src[] =\n"; | ||||
11 | while (<FILE>) { | ||||
12 | chomp; | ||||
13 | printf " \"%s\\n\"\n", $_; | ||||
14 | } | ||||
15 | print " \"\\n\";\n"; | ||||
16 | close FILE; |