/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1989 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* Note added 9/25/83
Setting the parameter biggestfont in the DESC file
to be at least as big as the number of characters
in the largest font for a particular device
eliminates the "font X too big for position Y"
message from troff.
Thanks to Dave Stephens, WECo.
*/
/*
makedev:
read text info about a particular device
(e.g., cat, 202, aps5) from file, convert
it into internal (binary) form suitable for
fast reading by troff initialization (ptinit()).
Usage:
makedev DESC [ F ... ]
uses DESC to create a description file
using the information therein.
It creates the file DESC.out.
makedev F ...
makes the font tables for fonts F only,
creates files F.out.
DESC.out contains:
dev structure with fundamental sizes
list of sizes (nsizes+1) terminated by 0, as short's
indices of char names (nchtab * sizeof(short))
char names as hy\0em\0... (lchname)
nfonts occurrences of
widths (nwidth)
kerning (nwidth) [ascender+descender only so far]
codes (nwidth) to drive actual typesetter
fitab (nchtab+128-32)
each of these is an array of char.
dev.filesize contains the number of bytes
in the file, excluding the dev part itself.
F.out contains the font header, width, kern, codes, and fitab.
Width, kern and codes are parallel arrays.
(Which suggests that they ought to be together?)
Later, we might allow for codes which are actually
sequences of formatting info so characters can be drawn.
*/
#include "stdio.h"
#include "dev.h"
/* zero if not there */
{
int i, totfont, v;
if (argc < 2) {
exit(1);
}
exit(1);
}
p = chname;
while (*p++) /* skip to end of name */
;
}
} else
}
if (fdout < 0) {
exit(1);
}
totfont = 0;
}
+ totfont * sizeof(char);
argc--;
argv++;
}
for (i = 1; i < argc; i++)
exit(0);
return (0);
}
int
char *name;
{
int fdout;
exit(2);
}
for (i = 0; i < NFITAB; i++)
fitab[i] = 0;
for (i = 0; i < FSIZE; i++)
if (cmd[0] == '#')
nw = 0;
/* widths are origin 1 so fitab==0 can mean "not there" */
nw++;
/* temporarily, pick up one byte as code */
if (s3[0] == '0')
else
}
/*
* otherwise it's a synonym for previous character,
* so leave previous values intact
*/
else { /* it has a funny name */
break;
}
}
}
nw++;
n = dev.biggestfont;
else {
if (dev.biggestfont > 0)
n = nw;
}
}
}
if (spacewidth == 0)
return v;
}
int
{
int lig;
lig = 0;
else
}
return lig;
}