3 # Create encoding vectors from the `*.txt' encoding files.
4 # Copyright (c) 1995-1998 Markku Rossi
6 # Author: Markku Rossi <mtr@iki.fi>
10 # This file is part of GNU enscript.
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2, or (at your option)
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; see the file COPYING. If not, write to
24 # the Free Software Foundation, 51 Franklin Street, Fifth Floor,
25 # Boston, MA 02110-1301, USA.
33 print "usage: $0 encfile\n";
39 open(FP, $file) || die "couldn't open input file `$file': $!\n";
41 # Find the start of the table.
51 die "file `$file' is not a valid encoding file: couldn't find table\n";
61 % $file encoding vector.
63 % This file is automatically generated from file \`$file.txt\'. If you
64 % have any corrections to this file, please, edit file \`$file.txt\' instead.
68 % This file is part of GNU enscript.
70 % This program is free software; you can redistribute it and/or modify
71 % it under the terms of the GNU General Public License as published by
72 % the Free Software Foundation; either version 2, or (at your option)
75 % This program is distributed in the hope that it will be useful,
76 % but WITHOUT ANY WARRANTY; without even the implied warranty of
77 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78 % GNU General Public License for more details.
80 % You should have received a copy of the GNU General Public License
81 % along with this program; see the file COPYING. If not, write to
82 % the Free Software Foundation, 51 Franklin Street, Fifth Floor,
83 % Boston, MA 02110-1301, USA.
86 % -- code follows this line --
95 printf("%-14s\t", $name);
96 if ((++$inum % $names_per_row) == 0) {
106 } elsif ($_ =~ /non-printable/) {
107 $fields{hex(@cols[1])} = "/.notdef";
108 } elsif (@cols[2] =~ /-/) {
109 $fields{hex(@cols[1])} = "/.notdef";
111 $fields{hex(@cols[1])} = @cols[2];
116 for ($i = 0; $i < 256; $i++) {
117 if (!defined($fields{$i})) {
118 print "* code $i is not defined, assuming `.notdef'\n";
127 if (($inum % $names_per_row) != 0) {