I made a change to the word2ascii routine and replicated it out to other programs.

This commit is contained in:
Warren Toomey
2016-03-10 14:14:57 +10:00
parent f468628159
commit 089c8b806f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -17,9 +17,9 @@ while (1) {
my $word= (($b1 & 077) << 12) | (($b2 & 077) << 6) | ($b3 & 077);
my $c1= ($word >> 9) & 0777;
$c1= ($c1 < 0200) ? chr($c1) : " ";
$c1= (($c1 >= 32) && ($c1 <= 126)) ? chr($c1) : ' ';
my $c2= $word & 0777;
$c2= ($c2 < 0200) ? chr($c2) : " ";
$c2= (($c2 >= 32) && ($c2 <= 126)) ? chr($c2) : ' ';
printf("%06o %s%s\n", $word, $c1, $c2)
}
close($IN);