#!/usr/bin/env perl
-# $Id: tracemunch,v 1.27 2020/02/02 23:34:34 tom Exp $
+# $Id: tracemunch,v 1.28 2020/03/08 12:22:49 tom Exp $
##############################################################################
# Copyright 2018-2019,2020 Thomas E. Dickey #
# Copyright 1998-2005,2017 Free Software Foundation, Inc. #
use strict;
use warnings;
+$| = 1;
+
our $putattr =
'PutAttrChar\(\{\{ ' . "'(.)'"
. ' = 0[0-7]+ \}\}\) at \(([0-9]+), ([0-9]+)\)';
my $type = $known_p1{$func};
chomp $addr;
$addr =~ s/^[^(]+\((0x[[:xdigit:]]+).*/$1/i;
- if ( $type == 1 ) {
+ if ( $addr !~ /^0x[[:xdigit:]]+$/i ) {
+ printf "OOPS - expected type #$type, skipping\n>>$addr\n";
+ }
+ elsif ( $type == 1 ) {
$scr_addr{$addr} = ++$scr_nums;
$arg = &transaddr($arg);
}