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

gtk/glade build interface converter - by Nelgin

parent 3046f018
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
#!/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