mirror of
https://git.femboyfinancial.jp/james/lipsync.git
synced 2025-02-19 16:59:02 -08:00
72 lines
1.6 KiB
Perl
72 lines
1.6 KiB
Perl
![]() |
# <20><><EFBFBD>݂̃f<CC83>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD>ɂ<EFBFBD><C982><EFBFBD>C#<23>R<EFBFBD>[<5B>h<EFBFBD><68><EFBFBD>ǂݍ<C782><DD8D>݁A<DD81>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD><EFBFBD>Ă<EFBFBD><C482>Ȃ<EFBFBD>Message.ID<49><44>
|
|||
|
# result.txt<78>ɏo<C98F>͂<EFBFBD><CD82><EFBFBD><EFBFBD>B<EFBFBD>T<EFBFBD>u<EFBFBD>f<EFBFBD>B<EFBFBD><42><EFBFBD>N<EFBFBD>g<EFBFBD><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B
|
|||
|
$listname = "_";
|
|||
|
while( -e $listname ){
|
|||
|
$listname = $listname . "_";
|
|||
|
}
|
|||
|
|
|||
|
system "dir /s /b>" . $listname;
|
|||
|
|
|||
|
%hash;
|
|||
|
%defined;
|
|||
|
|
|||
|
open( FILE, $listname );
|
|||
|
while( $line = <FILE> ){
|
|||
|
chomp $line;
|
|||
|
# MessageID<49>̒<EFBFBD><CC92>`<60><><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD><43><EFBFBD>`<60>ς݂<CF82>enum<75><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if( index( $line, "MessageID.cs" ) >= 0 ){
|
|||
|
open( CS, $line );
|
|||
|
$mode = 0;
|
|||
|
while( $cs_line = <CS> ){
|
|||
|
if( $mode == 1 && index( $cs_line, "}" ) >= 0 ){
|
|||
|
$mode = 2;
|
|||
|
next;
|
|||
|
}
|
|||
|
if( $mode == 1 ){
|
|||
|
$line2 = "" . $cs_line;
|
|||
|
chomp $line2;
|
|||
|
$line2 =~ s/ //g;
|
|||
|
$line2 =~ s/,//g;
|
|||
|
$line3 = $line2;
|
|||
|
$defined{$line3} = 0;
|
|||
|
}
|
|||
|
if( $mode == 0 && index( $cs_line, "enum MessageID" ) >= 0 ){
|
|||
|
$mode = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
close( CS );
|
|||
|
next;
|
|||
|
}else{
|
|||
|
open( CS, $line );
|
|||
|
while( $cs_line = <CS> ){
|
|||
|
$index = index( $cs_line, "MessageID." );
|
|||
|
while( $index >= 0 ){
|
|||
|
$spl = substr( $cs_line, $index + 10 );
|
|||
|
$index2 = index( $spl, ")" );
|
|||
|
$cs_line = substr( $spl, $index2 );
|
|||
|
$spl2 = substr( $spl, 0, $index2 );
|
|||
|
$spl2 =~ s/ //g;
|
|||
|
$hash{$spl2} = $hash{$spl2} + 1;
|
|||
|
$index = index( $cs_line, "MessageID." );
|
|||
|
}
|
|||
|
}
|
|||
|
close( CS );
|
|||
|
}
|
|||
|
}
|
|||
|
close( FILE );
|
|||
|
|
|||
|
@keys = keys( %hash );
|
|||
|
foreach $entry( @keys ){
|
|||
|
$defined{$entry} = 1;
|
|||
|
}
|
|||
|
open( RESULT, ">result.txt" );
|
|||
|
@keys2 = keys( %defined );
|
|||
|
foreach $entry( @keys2 ){
|
|||
|
if( $defined{$entry} == 0 ){
|
|||
|
print RESULT $entry . "," . $defined{$entry} . "\n";
|
|||
|
}
|
|||
|
}
|
|||
|
close( RESULT );
|
|||
|
|
|||
|
system "del " . $listname;
|