--- nono/lib/monitor_id.pl 2026/04/29 17:05:15 1.1.1.3 +++ nono/lib/monitor_id.pl 2026/04/29 17:05:48 1.1.1.6 @@ -27,6 +27,12 @@ $hdrfile =~ s/txt$/h/; $srcfile =~ s/txt$/cpp/; + # 先頭に一つダミーエントリを入れる。 + # (あまりサポートしてないけど) wxMac ではメニュー ID が 0 だと死ぬので。 + $id = "ID_MONITOR_zeroth_dummy_for_wxmac"; + $mon_defs .= "\t$id = 0,\n"; + $mon_body .= "\t{ $id, },\n"; + open(IN, $infile) || die "Cannot open infile: ${infile}\n"; while () { # Remove comments. @@ -48,6 +54,7 @@ foreach $n (@names) { $r = $n; $r =~ s/%${atnum}/${i}/g; + $r =~ s/%/${i}/g; push(@rep_names, $r); } parse_line(@rep_names); @@ -92,7 +99,7 @@ $srcnew .= $sub_body; $srcnew .= "};\n"; $srcnew .= "\n"; - $srcnew .= "/*static*/ const std::vector>\n"; + $srcnew .= "/*static*/ const std::vector>\n"; $srcnew .= "Monitor::idtext {\n"; $srcnew .= $label_body; $srcnew .= "};\n"; @@ -134,7 +141,11 @@ sub parse_line() $last_sub_id = $id; } - # フラグは '|' で並べることが出来る + if ($flag eq ".") { + # フラグ省略時(モニタの場合)は vmcap を参照することはないはず + $flag = "NONE"; + } + # フラグは '|' で並べることが出来る。 @flags = split(/\|/, $flag); @caps = map { "VMCap::".$_ } @flags; $cap = join('|', @caps);