Commit MetaInfo

Revisione2bd1d869dfba2a382b05dcf24f25c005f36e4c1 (tree)
Zeit2021-06-13 21:38:26
AutorSHIRAKATA Kentaro <argrath@ub32...>
CommiterSHIRAKATA Kentaro

Log Message

improve accuracy

Ändern Zusammenfassung

Diff

--- a/grepen/grepen.pl
+++ b/grepen/grepen.pl
@@ -7,6 +7,9 @@ binmode(STDIN);
77 my $f = 0;
88
99 while(<>){
10+ if (eof) { # eof() ではない。
11+ close(ARGV);
12+ }
1013 chomp;
1114 if(m@^.if 0 /\*JP@){
1215 $f = 1;
@@ -36,19 +39,26 @@ while(<>){
3639 if(/debugpline\d\(/){ next; }
3740 if(/impossible\(/){ next; }
3841 if(/panic\(/){ next; }
42+ if(/error\(/){ next; }
43+
44+ if(/getobj\(/){ next; }
45+ if(/floorfood\(/){ next; }
46+ if(/wield_tool\(/){ next; }
47+
3948 if(/.include/){ next; }
4049
4150 s@/\*.*\*/@@g;
4251 my $ff = 0;
4352 while(/\"([^\"]*)\"/gc){
4453 my $m = $1;
45- $m =~ s/%s//g;
54+ $m =~ s/%-?[0-9]*l?[sd]//g;
55+ $m =~ s/[ \[\]]//g;
4656
4757 if($m =~ /^[ !#-~]+$/a){ # }
4858 $ff = 1;
4959 }
5060 }
5161 if($ff == 1){
52- printf "%d:%s\n", $., $_;
62+ printf "%s:%d:%s\n", $ARGV, $., $_;
5363 }
5464 }
Show on old repository browser