#!/usr/bin/perl
#
# $Id$
#

my $infile = $ARGV[0] or die "Usage: $0 infile structname";
my $structname = $ARGV[1] or die "Usage: $0 infile structname";;
open INF, "<$infile" or die "Unable to open $infile";

print "/* This file was autogenerated from $infile.  DO NOT EDIT !!!! */\n\n";
print "char *$structname = \n";
for my $x (<INF>) {
    chomp $x;
    $x =~ s/\\/\\\\/g;
    $x =~ s/"/\\"/g;
    print qq(   "$x\\n"\n);
}
print "   ;\n";

close INF;
