Skip to content

Commit

Permalink
Merge pull request #39 from WhenGryphonsFly/working
Browse files Browse the repository at this point in the history
Cleanup + QoL
  • Loading branch information
WhenGryphonsFly authored Jan 16, 2024
2 parents c1e02fb + 313de60 commit c48ca71
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 36 deletions.
58 changes: 28 additions & 30 deletions .github/calcrom/calcrom.pl
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,31 @@
or die "ERROR: Cannot convert string to num: '$incbin_bytes_as_string'";


my $functions_remaining_cmd = "git grep 'thumb_func_start' ':/asm/**.s'";
my $functions_remaining_as_string;
(run (
command => "$functions_remaining_cmd | $count_cmd",
buffer => \$functions_remaining_as_string,
timeout => 60
))
or die "ERROR: Error while calculating TODO totals: $?";
my $functions_remaining_count = $functions_remaining_as_string + 0;
(($functions_remaining_count != 0) and ($functions_remaining_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$functions_remaining_as_string'";

my $nonmatching_cmd = "git grep -E '#if[n]?def NONMATCHING' ':/' ':(exclude)*.pl'";
my $nonmatching_as_string;
(run (
command => "$nonmatching_cmd | $count_cmd",
buffer => \$nonmatching_as_string,
timeout => 60
))
or die "ERROR: Error while calculating NONMATCHING totals: $?";
my $nonmatching_count = $nonmatching_as_string + 0;
(($nonmatching_count != 0) and ($nonmatching_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$nonmatching_as_string'";



my $total = $src + $lib + $asm;
$src = $src + $lib;
Expand All @@ -200,6 +225,8 @@
printf "%8d total bytes of code\n", $total;
printf "%8d bytes of code in src (%.4f%%)\n", $src, $srcPct;
printf "%8d bytes of code in asm (%.4f%%)\n", $asm, $asmPct;
printf "%8d functions remain\n", $functions_remaining_count;
printf "%8d functions are NONMATCHING\n", $nonmatching_count;
}
print "\n";

Expand Down Expand Up @@ -264,48 +291,19 @@

if ($verbose != 0)
{
my $nonmatching_cmd = "git grep -E '#if[n]?def NONMATCHING' ':/' ':(exclude)*.pl'";

my $todo_cmd = "git grep 'TODO' ':/' ':(exclude)*.pl'";
my $functions_remaining_cmd = "git grep 'thumb_func_start' ':/asm/**.s'";

my $nonmatching_as_string;
(run (
command => "$nonmatching_cmd | $count_cmd",
buffer => \$nonmatching_as_string,
timeout => 60
))
or die "ERROR: Error while calculating NONMATCHING totals: $?";

my $todo_as_string;
(run (
command => "$todo_cmd | $count_cmd",
buffer => \$todo_as_string,
timeout => 60
))
or die "ERROR: Error while calculating TODO totals: $?";

my $functions_remaining_as_string;
(run (
command => "$functions_remaining_cmd | $count_cmd",
buffer => \$functions_remaining_as_string,
timeout => 60
))
or die "ERROR: Error while calculating TODO totals: $?";

my $nonmatching_count = $nonmatching_as_string + 0;
(($nonmatching_count != 0) and ($nonmatching_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$nonmatching_as_string'";

my $todo_count = $todo_as_string + 0;
(($todo_count != 0) and ($todo_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$todo_as_string'";

my $functions_remaining_count = $functions_remaining_as_string + 0;
(($functions_remaining_count != 0) and ($functions_remaining_as_string ne "0"))
or die "ERROR: Cannot convert string to num: '$functions_remaining_as_string'";

print "\n";
printf "%8d functions are NONMATCHING\n", $nonmatching_count;
printf "%8d functions remain\n", $functions_remaining_count;
printf "%8d comments are labeled TODO\n", $todo_count;
}
6 changes: 0 additions & 6 deletions asm/ereader.s

This file was deleted.

0 comments on commit c48ca71

Please sign in to comment.