Skip to content
Snippets Groups Projects
Commit 85a7d892 authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

diagnostic messages

parent 988163ac
No related branches found
No related tags found
No related merge requests found
...@@ -139,7 +139,8 @@ my %ns; ...@@ -139,7 +139,8 @@ my %ns;
my @lines; my @lines;
my %frame; my %frame;
my @text; my @text;
my %cnt_ATTN= 0; my $cnt_ATTN= 0;
my $debug_item= 0;
LINE: while (1) LINE: while (1)
{ {
$pos= tell(FI); $pos= tell(FI);
...@@ -188,6 +189,7 @@ LINE: while (1) ...@@ -188,6 +189,7 @@ LINE: while (1)
{ {
# print ">>> REVISION\n"; # print ">>> REVISION\n";
$state= 2; $state= 2;
@text= ();
} }
elsif ($l =~ m#^\s*<(title|ns|id)>([^<]+)</.+>#) elsif ($l =~ m#^\s*<(title|ns|id)>([^<]+)</.+>#)
{ {
...@@ -210,8 +212,9 @@ LINE: while (1) ...@@ -210,8 +212,9 @@ LINE: while (1)
} }
elsif ($l =~ m#^\s*<text(.*)>#) # TODO: check for other <text> tags elsif ($l =~ m#^\s*<text(.*)>#) # TODO: check for other <text> tags
{ {
print "ATTN: strange text-tag: [$_]\n"; print "ATTN: strange text-tag: [$l] title=[$frame{title}]\n";
$cnt_ATTN++; $cnt_ATTN++;
$debug_item= 1;
} }
elsif ($l =~ m#^\s*<(id|sha1)>([^<]+)</.+>#) elsif ($l =~ m#^\s*<(id|sha1)>([^<]+)</.+>#)
{ {
...@@ -238,13 +241,15 @@ LINE: while (1) ...@@ -238,13 +241,15 @@ LINE: while (1)
$frame{fo_pos_end}= $fo_rec->tell(); $frame{fo_pos_end}= $fo_rec->tell();
if ($debug > 1) if ($debug > 1 || $debug_item)
{ {
print "="x72, "\n"; print "="x72, "\n";
print "frame: ", Dumper(\%frame); print "frame: ", Dumper(\%frame);
print "text: ", Dumper(\@text); print "text: ", Dumper(\@text);
# print "lines: ", Dumper (\@lines); print "lines: ", Dumper (\@lines);
print "="x72, "\n"; print "="x72, "\n";
$debug_item= 0;
} }
print FO_ITEMS join ($TSV_SEP, map { $frame{$_} } @cols1), "\n"; print FO_ITEMS join ($TSV_SEP, map { $frame{$_} } @cols1), "\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment