File: domestic-ascii.pl

package info (click to toggle)
libmoe 1.5.7-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 6,772 kB
  • ctags: 267,602
  • sloc: ansic: 478,515; perl: 2,318; makefile: 201; sh: 22
file content (53 lines) | stat: -rw-r--r-- 691 bytes parent folder | download | duplicates (5)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Perl5 script to make a table of domestic ascii based on
#   <URL:http://kanji.zinbun.kyoto-u.ac.jp/~yasuoka/CJK.html>.
# Invoke as:
#   perl domestic-ascii.pl

BEGIN {require 'mbenclib.pl'}

$da_h = 'domestic-ascii.h' if (!defined($da_h));

local (*H);

open(H, ">$da_h") || die "open(H, \">$da_h\"): $!";

my @da = 
  (
   0x40,
   0x41,
   0x42,
   0x43,
   0x47,
   0x48,
   0x4A,
   0x4B,
   0x4C,
   0x52,
   0x54,
   0x59,
   0x5A,
   0x60,
   0x61,
   0x66,
   0x67,
   0x68,
   0x69,
   0x6E,
   0x75,
   0x77,
   0x78,
   0x7A,
   0x81,
   0x82,
   );

my $hole = 0;

foreach $fc (@da) {
  for (; $hole < $fc ; ++$hole) {
    printf H "0,\n";
  }

  ++$hole;
  printf H "1,\n";
}