File: unitable

package info (click to toggle)
hxtools 20180301-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,600 kB
  • sloc: ansic: 5,926; perl: 3,905; sh: 1,638; cpp: 342; makefile: 191; asm: 173
file content (30 lines) | stat: -rwxr-xr-x 488 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl

use strict;
use warnings;
use utf8;
binmode(STDOUT, ":utf8");

printf "U+nnnn | ";
for (my $x = 0; $x < 64; $x += 4) {
	if ($x % 16 == 0) {
		printf "%x   ", int($x / 16);
	} else {
		print "    ";
	}
}
print "\n";
printf "U+nnnn | ";
for (my $x = 0; $x < 64; ++$x) {
	printf "%x", $x % 16;
}
print "\n";
print "-" x 74;
print "\n";
for (my $y = 64; $y < 0x300; $y += 64) {
	printf "U+%04x | ", $y;
	for (my $x = 0; $x < 64; ++$x) {
		print chr($y+$x);
	}
	print "\n";
}