Skip to content
Snippets Groups Projects
Commit 2ee5a9b1 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

gtk/glade build interface converter - by Nelgin

parent c488cefb
Branches
Tags
No related merge requests found
#!/usr/bin/perl
use strict;
use warnings;
my $filename = shift or die "Usage: $0 FILENAME\n";
open my $fh, "<", $filename || die "Cannot open $filename $!\n";
my $char;
my $newstr;
my $count;
while (read $fh,$char,1 ) {
$newstr .= ord($char) . ",";
$count++;
}
chop $newstr;
close $fh;
$filename =~ s/\./_/;
$filename .= ".c";
open my $fh2, ">" , $filename || die "Cannot open g $!\n";
print $fh2 "const char builder_interface[" . $count ."] = {" . $newstr . "};";
close $fh2;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment