#!/usr/local/share/perl
#!/usr/bin/perl
$n=$ARGV[0];

$n =~ /icon_(.*)\.xpm/;
$m = $1;

print <<EOF;
#include "pixmap.h"
EOF

open(IN,"<$n") || die @$;

while(<IN>)
{
	if(/static char \*\s*(.*)\[\](.*)/)
	{
		$_ = "static const char * bits[] = {\n";
	}

	print $_;
}

print <<EOF;
static pixmap p("$m",(const char**)bits);
EOF

