6 open(OUTPUTC
, "> $name.c");
7 open(OUTPUTH
, "> $name.h");
19 $datan =~ s/\\01/\01/g;
22 printf(OUTPUTC
"const char $var\[%d] = \n", length($datan) + 1);
23 printf(OUTPUTC
"/* \"$data\" */\n");
25 for($j = 0; $j < length($datan); $j++) {
26 printf(OUTPUTC
"%#02x, ", unpack("C", substr($datan, $j, 1)));
28 printf(OUTPUTC
"};\n");
30 printf(OUTPUTH
"extern const char $var\[%d];\n", length($datan) + 1);