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 # Enscript 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 3 of the License, or
15 # (at your option) any later version.
17 # Enscript 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 Enscript. If not, see <http://www.gnu.org/licenses/>.
31 print "usage: $0 encfile\n";
37 open(FP, $file) || die "couldn't open input file `$file': $!\n";
39 # Find the start of the table.
49 die "file `$file' is not a valid encoding file: couldn't find table\n";
59 % $file encoding vector.
61 % This file is automatically generated from file \`$file.txt\'. If you
62 % have any corrections to this file, please, edit file \`$file.txt\' instead.
66 % This file is part of GNU Enscript.
68 % Enscript is free software: you can redistribute it and/or modify
69 % it under the terms of the GNU General Public License as published by
70 % the Free Software Foundation, either version 3 of the License, or
71 % (at your option) any later version.
73 % Enscript is distributed in the hope that it will be useful,
74 % but WITHOUT ANY WARRANTY; without even the implied warranty of
75 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76 % GNU General Public License for more details.
78 % You should have received a copy of the GNU General Public License
79 % along with Enscript. If not, see <http://www.gnu.org/licenses/>.
82 % -- code follows this line --
91 printf("%-14s\t", $name);
92 if ((++$inum % $names_per_row) == 0) {
102 } elsif ($_ =~ /non-printable/) {
103 $fields{hex(@cols[1])} = "/.notdef";
104 } elsif (@cols[2] =~ /-/) {
105 $fields{hex(@cols[1])} = "/.notdef";
107 $fields{hex(@cols[1])} = @cols[2];
112 for ($i = 0; $i < 256; $i++) {
113 if (!defined($fields{$i})) {
114 print "* code $i is not defined, assuming `.notdef'\n";
123 if (($inum % $names_per_row) != 0) {