2 unidup - check for duplicate code points in sorted unifont.hex file.
4 Synopsis: unidup < unifont_file.hex
6 [Hopefully there won't be any output!]
8 Author: Paul Hardy, unifoundry <at> unifoundry.com, December 2007
10 Copyright (C) 2007, 2008, 2013 Paul Hardy
14 This program is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 2 of the License, or
17 (at your option) any later version.
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program. If not, see <http://www.gnu.org/licenses/>.
35 main (int argc, char **argv)
40 char *infile; /* the input file name */
41 FILE *infilefp; /* file pointer to input file */
45 if ((infilefp = fopen (infile, "r")) == NULL) {
46 fprintf (stderr, "\nERROR: Can't open file %s\n\n", infile);
56 while (fgets (inbuf, MAXBUF-1, infilefp) != NULL) {
57 sscanf (inbuf, "%X", &iy);
58 if (ix == iy) fprintf (stderr, "Duplicate code point: %04X\n", ix);