From cfad7d2f6c2a3155d9b142596198f55d6d76af4a Mon Sep 17 00:00:00 2001 From: Melody Date: Sat, 29 Dec 2018 10:06:44 -0500 Subject: count undocumented globals --- .travis/calcrom/calcrom.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis/calcrom/calcrom.pl b/.travis/calcrom/calcrom.pl index 8ee02036d..a0a74ca1b 100755 --- a/.travis/calcrom/calcrom.pl +++ b/.travis/calcrom/calcrom.pl @@ -7,6 +7,7 @@ open(my $file, $ARGV[0]) my $src = 0; my $asm = 0; +my $undocumented = 0; while (my $line = <$file>) { if ($line =~ /^ \.(\w+)\s+0x[0-9a-f]+\s+(0x[0-9a-f]+) (\w+)\/.+\.o/) @@ -27,6 +28,13 @@ while (my $line = <$file>) } } } + if($line =~ /^\s+0x([0-9A-f]+)\s+[A-z_]+([0-9A-f]+)/) { + my $thing1 = sprintf("%08X", hex($1)); + my $thing2 = sprintf("%08X", hex($2)); + if($thing1 eq $thing2) { + $undocumented += 1; + } + } } my $total = $src + $asm; @@ -35,3 +43,4 @@ my $asmPct = sprintf("%.4f", 100 * $asm / $total); print "$total total bytes of code\n"; print "$src bytes of code in src ($srcPct%)\n"; print "$asm bytes of code in asm ($asmPct%)\n"; +print "$undocumented global names undocumented\n"; \ No newline at end of file -- cgit v1.2.3 From 8a69f68d50f6ea33d3f7139d804d376850b0d291 Mon Sep 17 00:00:00 2001 From: Melody Date: Sat, 29 Dec 2018 10:09:05 -0500 Subject: newline --- .travis/calcrom/calcrom.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/calcrom/calcrom.pl b/.travis/calcrom/calcrom.pl index a0a74ca1b..5bcd9deab 100755 --- a/.travis/calcrom/calcrom.pl +++ b/.travis/calcrom/calcrom.pl @@ -43,4 +43,4 @@ my $asmPct = sprintf("%.4f", 100 * $asm / $total); print "$total total bytes of code\n"; print "$src bytes of code in src ($srcPct%)\n"; print "$asm bytes of code in asm ($asmPct%)\n"; -print "$undocumented global names undocumented\n"; \ No newline at end of file +print "$undocumented global names undocumented\n"; -- cgit v1.2.3 From daa2e36be68558569cb7ad33bf7e8fe6be137931 Mon Sep 17 00:00:00 2001 From: Melody Date: Sat, 29 Dec 2018 11:59:39 -0500 Subject: change names -> symbols --- .travis/calcrom/calcrom.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/calcrom/calcrom.pl b/.travis/calcrom/calcrom.pl index 5bcd9deab..9eff1c064 100755 --- a/.travis/calcrom/calcrom.pl +++ b/.travis/calcrom/calcrom.pl @@ -43,4 +43,4 @@ my $asmPct = sprintf("%.4f", 100 * $asm / $total); print "$total total bytes of code\n"; print "$src bytes of code in src ($srcPct%)\n"; print "$asm bytes of code in asm ($asmPct%)\n"; -print "$undocumented global names undocumented\n"; +print "$undocumented global symbols undocumented\n"; -- cgit v1.2.3