xpmdata_pixel('background','','+');
return;
} elsif (!$t{Segnum}) {
- xpmdata_pixel('background','','?');
+ xpmdata_pixel('background','',':');
return;
} else {
xpmdata_pixel('background','','!');
xpm_cmap("background","background");
xpm_cmap_rgbpermil("background",qw(- 100 100 100
+ 999 0 999
- ? 75 75 75
+ : 75 75 75
! 999 0 999));
xpm_cmap("off","off");
xpm_cmap_fixedbitmap("off",'*');
$cmap= $cmap{$cmapname};
foreach $pixchars (sort keys %$cmap) {
$sname= "m_${cmapname}_". unpack "H*", $pixchars;
- printf("static const char %s= \"%s %s\";\n",
+ printf("static const char %s[]= \"%s %s\";\n",
$sname, $pixchars, $cmap->{$pixchars})
or die $!;
push @$stuff, $sname;
$header_data .= " ";
}
for ($p{Y}=$xp->{Y}{Min}; $p{Y}<=$xp->{Y}{Max}; $p{Y}++) {
- printf "static const char d%04d_%s%s= \"",
+ printf "static const char d%04d_%s%s[]= \"",
$p{Y}, $style, $namerhs or die $!;
$row= $xp->{Pixels}{$p{Y}};
$pp= "$style $namerhs $p{X} $p{Y}";
$n_posns= $movfeat_configbits{$xpmname};
$code= $movfeat_prefix{$xpmname};
}
- printf("const PlanPixmapOnData pon_%s[]= {\n",
+ printf("static const PlanPixmapOnData pon_%s[]= {\n",
$xpmname)
or die $!;
for ($posn=0; $posn < $n_posns; $posn++) {
if ($movfeat eq '') {
- $dname= sprintf "_%s", $segname;
+ $dname= $segname;
} else {
- $dname= sprintf "_%s_%s_%d", $segname, $movfeat, $posn;
+ $dname= sprintf "%s_%s_%d", $segname, $movfeat, $posn;
}
- printf(" { on_$dname, det_$dname,".
- " ion_$dname, idet_$dname },\n")
+ printf(" { { { p_on_$dname, p_det_$dname },".
+ " { p_ion_$dname, p_idet_$dname } } },\n")
or die $!;
}
- printf(" 0\n".
- "};\n")
+ printf("};\n")
or die $!;
- $mfd .= sprintf(" { 0x%x, %d, pon_%s },\n",
- $code, $n_posns, $xpmname);
+ $mfd .= sprintf(" { 0x%x, p_off_%s, %d, pon_%s },\n",
+ $code, $xpmname, $n_posns, $xpmname);
}
- printf("const PlanSegmovfeatData mf_%s[]= {\n".
+ printf("static const PlanSegmovfeatData mf_%s[]= {\n".
"%s".
- " 0\n".
"};\n",
$segname, $mfd)
or die $!;
}
+ printf("static const PlanSegmentData segments[]= {\n")
+ or die $!;
for $segname (@segnames) {
if (exists $movfeats{$segname}) {
printf(" { %d, mf_%s },\n",
- scalar(@{ $movfeats{$segname} })+1, $segname)
+ scalar(@{ $movfeats{$segname} })+1,
+ $segname)
or die $!;
} else {
- printf(" { 1, mf_%s },\n", $segname)
+ printf(" { 1, mf_%s },\n",
+ $segname)
or die $!;
}
}
- printf(" { -1, 0 }\n".
- "};\n")
+ printf("};\n")
or die $!;
printf("const PlanData ui_plan_data= {\n".
" p_background,\n".
" %d, segments\n".
- "}\n",
+ "};\n",
scalar(@segnames))
or die $!;
}
+print "#include \"plan-data-format.h\"\n" or die $!;
cmapdata_output_all();
xpmdata_output_all();
plandata_output_all();