3 # Create encoding files from the `*.txt' encoding files.
4 # Copyright (c) 1995-1998 Markku Rossi.
5 # Author: Markku Rossi <mtr@iki.fi>
9 # This file is part of GNU enscript.
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2, or (at your option)
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; see the file COPYING. If not, write to
23 # the Free Software Foundation, 51 Franklin Street, Fifth Floor,
24 # Boston, MA 02110-1301, USA.
32 print "usage: make-encoding.pl encfile\n";
38 open(FP, $file) || die "couldn't open input file `$file': $!\n";
40 # Find the start of the table.
50 die "file `$file' is not a valid encoding file: couldn't find table\n";
62 * This file is automatically generated from file \`$file.txt\'. If you
63 * have any corrections to this file, please, edit file \`$file.txt\' instead.
67 * This program is free software; you can redistribute it and/or modify
68 * it under the terms of the GNU General Public License as published by
69 * the Free Software Foundation; either version 2, or (at your option)
72 * This program is distributed in the hope that it will be useful,
73 * but WITHOUT ANY WARRANTY; without even the implied warranty of
74 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75 * GNU General Public License for more details.
77 * You should have received a copy of the GNU General Public License
78 * along with this program; see the file COPYING. If not, write to
79 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
80 * Boston, MA 02110-1301, USA.
85 print "#include \"afmint.h\"\n\n";
87 printf("AFMEncodingTable afm_%s_encoding[] =\n{\n",
95 } elsif ($_ =~ /non-printable/) {
96 print " {@cols[1], AFM_ENC_NONE},\n";
97 } elsif (@cols[2] =~ /-/) {
98 print " {@cols[1], AFM_ENC_NON_EXISTENT},\n";
102 print " {@cols[1], \"$name\"},\n";
108 printf(" {-1, NULL},\n};\n");