[comp.sources.misc] v04i004: Extended troff CAT to LaserJet filter, part 2 of 2

edf@ROCKEFELLER.ARPA (David MacKenzie) (07/28/88)

Posting-number: Volume 4, Issue 4
Submitted-by: "David MacKenzie" <edf@ROCKEFELLER.ARPA>
Archive-name: troff2lj-v2/Part2

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 2 (of 2)."
# Contents:  troff2lj.c ccfont heqn htroff installfont width fthR.c
#   fthI.c fthB.c fthS.c fiR.c fiI.c fiB.c
# Wrapped by dave@edfdc  on Wed Jul 27 23:15:26 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'troff2lj.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'troff2lj.c'\"
else
echo shar: Extracting \"'troff2lj.c'\" \(15069 characters\)
sed "s/^X//" >'troff2lj.c' <<'END_OF_FILE'
X/*
X *	troff2lj
X *
X *	Filter that translates troff CAT output into commands for
X *	an HP LaserJet printer.
X *
X *	Assumes that the needed fonts are already present in the
X *	printer, and marked as permanent.
X *
X *	Usage: troff2lj [-1xx] [-2xx] [-3xx]
X *	where xx is the one or two character name of a font to assume is
X *	mounted on troff position 1, 2, or 3.
X *
X *	by Sverre Froyen & David MacKenzie
X */
X
X#include <stdio.h>
X
X/*#define DEBUG				/* Debug option */
X/*#define RESET				/* Reset printer when done. */
X#define COMPRESS			/* Compress text horizontally 5% */
X#define BERKELEY_HACK			/* Codes 0116/0117 are not tilt */
X
X#define LINES		(11*432)	/* #CAT-lines on a page */
X
X/* Convert CAT units to LaserJet units and set first page offset (CAT units) */
X
X#define SCALE_X(n)	((300*n)/432)
X#ifdef COMPRESS
X# define SCALE_Y(n)	((286.36*n)/432+75)	/* 10.5", 0.25" margin */
X# define SKIP		348			/* Empirical */
X#else
X# define SCALE_Y(n)	((300*n)/432)		/* 11", no margin */
X# define SKIP		240			/* Empirical */
X#endif
X
X/* Some escape sequences for the LaserJet */
X/*
X * INIT explained:
X * \033E	printer reset
X * \017		Shift In to primary font
X * \033(0U	USASCII 7-bit symbol set
X * \033(s10V	10 point
X */
X#define INIT		"\033E\017\033(0U\033(s10V"
X/*
X * EXIT explained:
X * \033E	printer reset
X * \033&k2G	line termination: CR->CR, LF->CRLF, FF->CRFF
X */
X#define EXIT		"\033E\033&k2G"
X#define X_POS(x)	"\033*p%dX",x		/* Left to right */
X#define XY_POS(x,y)	"\033*p%dx%dY",x,y	/* Top to bottom */
X#define FORM_FEED	"\033&l1H"
X#define POINT_SIZE(n)	"\033(s%dV",n
X
Xchar *prog_name;
X
X/* State of CAT; escape is horizontal motion, lead is vertical motion */
X
Xstatic char upper_rail = 0;
Xstatic char upper_mag = 0;
Xstatic char tilt_up = 0;
Xstatic char upper_font = 0;
Xstatic char escape_backward = 0;
Xstatic char lead_backward = 0;
Xstatic char lead_magnification = 0;
X
X/* These have corresponding LaserJet variables (below) */
X
Xstatic char cat_font = 2;
Xstatic char cat_ps = 10;
Xstatic int cat_col = 0;
Xstatic int cat_row = -SKIP;
X
X/* State of LaserJet */
X
Xstatic char hp_char_set = 0;		/* Values 0 through 5 are allowed */
Xstatic char page_not_blank = 0;		/* Flag */
X
X/* These have corresponding CAT variables (above) */
X
Xstatic char hp_font = 2;
Xstatic char hp_ps = 10;
Xstatic int hp_col = -100000;		/* These are in LaserJet units */
Xstatic int hp_row = -100000;		/* 300 per inch */
X
Xstatic struct char_table {
X	char c;				/* LaserJet character */
X	char char_set;			/* LaserJet character set */
X	char x_shift;			/* Horizontal ajustment */
X	char y_shift;			/* Vertical ajustment */
X};
X
X/*
X *	The next two char_table structures define the mapping of a
X *	CAT character position to the corresponding LaserJet character.
X *	Note the following restrictions in the K font point sizes:
X *
X *	Style				Character Set #
X *			0	1	2	3	4	5
X *
X *	Roman		8,10	8,10	8,10	8,10	10	10
X *	Italic		10	10	*	*	*	*
X *	Bold		10	10	*	*	*	*
X *
X *	The x_shift, y_shift fields are for fine tuning of the final
X *	character position. These will be scaled with the point size
X *	and should be given in units 3000 to the inch for point size 10.
X *	The coordinate directions are:
X *		x_shift: from left to right
X *		y_shift: from top to bottom.
X */
X
Xstatic struct char_table standard_table [110] = {
X	'\0',	0,	0,	0,	/* null */
X	'h',	0,	0,	0,	/* h */
X	't',	0,	0,	0,	/* t */
X	'n',	0,	0,	0,	/* n */
X	'm',	0,	0,	0,	/* m */
X	'l',	0,	0,	0,	/* l */
X	'i',	0,	0,	0,	/* i */
X	'z',	0,	0,	0,	/* z */
X	's',	0,	0,	0,	/* s */
X	'd',	0,	0,	0,	/* d */
X	'b',	0,	0,	0,	/* b */
X	'x',	0,	0,	0,	/* x */
X	'f',	0,	0,	0,	/* f */
X	'j',	0,	0,	0,	/* j */
X	'u',	0,	0,	0,	/* u */
X	'k',	0,	0,	0,	/* k */
X	'\0',	0,	0,	0,	/* null */
X	'p',	0,	0,	0,	/* p */
X	'v',	1,	0,	0,	/* 3/4 em dash */
X	';',	0,	0,	0,	/* ; */
X	'\0',	0,	0,	0,	/* null */
X	'a',	0,	0,	0,	/* a */
X	'_',	0,	0,	-85,	/* rule */
X	'c',	0,	0,	0,	/* c */
X	'`',	0,	0,	0,	/* open quote */
X	'e',	0,	0,	0,	/* e */
X	'\'',	0,	0,	0,	/* close quote */
X	'o',	0,	0,	0,	/* o */
X	'w',	1,	0,	0,	/* 1/4 */
X	'r',	0,	0,	0,	/* r */
X	'x',	1,	0,	0,	/* 1/2 */
X	'v',	0,	0,	0,	/* v */
X	'-',	0,	0,	0,	/* hyphen */
X	'w',	0,	0,	0,	/* w */
X	'q',	0,	0,	0,	/* q */
X	'/',	0,	0,	0,	/* / */
X	'.',	0,	0,	0,	/* . */
X	'g',	0,	0,	0,	/* g */
X	'\0',	0,	0,	0,	/* 3/4 */
X	',',	0,	0,	0,	/* , */
X	'&',	0,	0,	0,	/* & */
X	'y',	0,	0,	0,	/* y */
X	'\0',	0,	0,	0,	/* null */
X	'%',	0,	0,	0,	/* % */
X	'\0',	0,	0,	0,	/* null */
X	'Q',	0,	0,	0,	/* Q */
X	'T',	0,	0,	0,	/* T */
X	'O',	0,	0,	0,	/* O */
X	'H',	0,	0,	0,	/* H */
X	'N',	0,	0,	0,	/* N */
X	'M',	0,	0,	0,	/* M */
X	'L',	0,	0,	0,	/* L */
X	'R',	0,	0,	0,	/* R */
X	'G',	0,	0,	0,	/* G */
X	'I',	0,	0,	0,	/* I */
X	'P',	0,	0,	0,	/* P */
X	'C',	0,	0,	0,	/* C */
X	'V',	0,	0,	0,	/* V */
X	'E',	0,	0,	0,	/* E */
X	'Z',	0,	0,	0,	/* Z */
X	'D',	0,	0,	0,	/* D */
X	'B',	0,	0,	0,	/* B */
X	'S',	0,	0,	0,	/* S */
X	'Y',	0,	0,	0,	/* Y */
X	'\0',	0,	0,	0,	/* null */
X	'F',	0,	0,	0,	/* F */
X	'X',	0,	0,	0,	/* X */
X	'A',	0,	0,	0,	/* A */
X	'W',	0,	0,	0,	/* W */
X	'J',	0,	0,	0,	/* J */
X	'U',	0,	0,	0,	/* U */
X	'K',	0,	0,	0,	/* K */
X	'0',	0,	0,	0,	/* 0 */
X	'1',	0,	0,	0,	/* 1 */
X	'2',	0,	0,	0,	/* 2 */
X	'3',	0,	0,	0,	/* 3 */
X	'4',	0,	0,	0,	/* 4 */
X	'5',	0,	0,	0,	/* 5 */
X	'6',	0,	0,	0,	/* 6 */
X	'7',	0,	0,	0,	/* 7 */
X	'8',	0,	0,	0,	/* 8 */
X	'9',	0,	0,	0,	/* 9 */
X	'*',	0,	0,	0,	/* * */
X	'-',	0,	0,	0,	/* curent font minus */
X	'\0',	0,	0,	0,	/* fi */
X	'\0',	0,	0,	0,	/* fl */
X	'\0',	0,	0,	0,	/* ff */
X	'?',	1,	0,	0,	/* cent sign */
X	'\0',	0,	0,	0,	/* ffl */
X	'\0',	0,	0,	0,	/* ffi */
X	'(',	0,	0,	0,	/* ( */
X	')',	0,	0,	0,	/* ) */
X	'[',	0,	0,	0,	/* [ */
X	']',	0,	0,	0,	/* ] */
X	'3',	1,	0,	0,	/* degree */
X	'N',	3,	0,	0,	/* dagger */
X	'=',	0,	0,	0,	/* = */
X	',',	5,	0,	0,	/* registered */
X	':',	0,	0,	0,	/* : */
X	'+',	0,	0,	0,	/* + */
X	'\0',	0,	0,	0,	/* null */
X	'!',	0,	0,	0,	/* ! */
X	'K',	3,	0,	0,	/* bullet */
X	'?',	0,	0,	0,	/* ? */
X	'\'',	2,	0,	0,	/* foot mark */
X	'|',	0,	0,	0,	/* | */
X	'\0',	0,	0,	0,	/* null */
X	'-',	5,	0,	0,	/* copyright */
X	'l',	5,	0,	0,	/* square */
X	'$',	0,	0,	0	/* $ */
X};
X
Xstatic struct char_table special_table [110] = {
X	'\0',	2,	0,	0,	/* null */
X	'w',	2,	0,	0,	/* psi */
X	'h',	2,	0,	0,	/* theta */
X	'm',	2,	0,	0,	/* nu */
X	'l',	2,	0,	0,	/* mu */
X	'k',	2,	0,	0,	/* lambda */
X	'i',	2,	0,	0,	/* iota */
X	'f',	2,	0,	0,	/* zeta */
X	'r',	2,	0,	0,	/* sigma */
X	'd',	2,	0,	0,	/* delta */
X	'b',	2,	0,	0,	/* beta */
X	'n',	2,	0,	0,	/* xi */
X	'g',	2,	0,	0,	/* eta */
X	'u',	2,	0,	0,	/* phi */
X	't',	2,	0,	0,	/* upsilon */
X	'j',	2,	0,	0,	/* kappa */
X	'\0',	2,	0,	0,	/* null */
X	'p',	2,	0,	0,	/* pi */
X	'@',	0,	0,	0,	/* @ */
X	'#',	3,	0,	0,	/* down arrow */
X	'\0',	2,	0,	0,	/* null */
X	'a',	2,	0,	0,	/* alpha */
X	'|',	0,	0,	0,	/* or */
X	'v',	2,	0,	0,	/* chi */
X	'"',	0,	0,	0,	/* " */
X	'e',	2,	0,	0,	/* epsilon */
X	'=',	2,	0,	0,	/* math equals */
X	'o',	2,	0,	0,	/* omicron */
X	'$',	3,	0,	0,	/* left arrow */
X	'q',	2,	0,	0,	/* rho */
X	'!',	3,	0,	0,	/* up arrow */
X	's',	2,	0,	0,	/* tau */
X	'_',	0,	0,	0,	/* underrule */
X	'\\',	0,	0,	0,	/* \ */
X	'W',	2,	0,	0,	/* Psi */
X	'H',	5,	0,	0,	/* bell system sign */
X	'$',	2,	0,	0,	/* infinity */
X	'c',	2,	0,	0,	/* gamma */
X	'?',	3,	0,	0,	/* improper superset */
X	'&',	2,	0,	0,	/* proportional to */
X	'&',	3,	0,	0,	/* right hand */
X	'x',	2,	0,	0,	/* omega */
X	'\0',	2,	0,	0,	/* null */
X	'Y',	2,	0,	0,	/* gradient */
X	'\0',	2,	0,	0,	/* null */
X	'U',	2,	0,	0,	/* Phi */
X	'H',	2,	0,	0,	/* Theta */
X	'X',	2,	0,	0,	/* Omega */
X	'5',	3,	0,	0,	/* cup (union) */
X	'0',	3,	0,	0,	/* root en extender */
X	'[',	2,	0,	0,	/* terminal sigma */
X	'K',	2,	0,	0,	/* Lambda */
X	'-',	2,	0,	0,	/* math minus */
X	'C',	2,	0,	0,	/* Gamma */
X	'U',	3,	0,	0,	/* integral sign */
X	'P',	2,	0,	0,	/* Pi */
X	':',	3,	0,	0,	/* subset of */
X	';',	3,	0,	0,	/* superset of */
X	'~',	0,	0,	0,	/* approximates */
X	'Z',	2,	0,	0,	/* partial derivative */
X	'D',	2,	0,	0,	/* Delta */
X	'!',	2,	0,	0,	/* square root */
X	'R',	2,	0,	0,	/* Sigma */
X	'?',	2,	0,	0,	/* approx = */
X	'\0',	2,	0,	0,	/* null */
X	'>',	0,	0,	0,	/* > */
X	'N',	2,	0,	0,	/* Xi */
X	'<',	0,	0,	0,	/* < */
X	'/',	0,	0,	0,	/* slash (matching backslash) */
X	'6',	3,	0,	0,	/* cap (intersection) */
X	'T',	2,	0,	0,	/* Upsilon */
X	'H',	3,	0,	0,	/* not */
X	'p',	3,	0,	0,	/* right ceiling */
X	'b',	3,	0,	0,	/* left top */
X	'v',	3,	0,	0,	/* bold vertical (used with floor...) */
X	'c',	3,	0,	0,	/* left center of big curly bracket */
X	'd',	3,	0,	0,	/* left bottom */
X	'r',	3,	0,	0,	/* right top */
X	's',	3,	0,	0,	/* right center of big curly bracket */
X	't',	3,	0,	0,	/* right bottom */
X	'q',	3,	0,	0,	/* right floor */
X	'a',	3,	0,	0,	/* left floor */
X	'`',	3,	0,	0,	/* left ceiling */
X	'*',	2,	0,	0,	/* multiply */
X	'%',	2,	0,	0,	/* divide */
X	'~',	3,	0,	0,	/* plus-minus */
X	'\\',	2,	0,	0,	/* <= */
X	'^',	2,	0,	0,	/* >= */
X	'}',	2,	0,	0,	/* identically equal */
X	']',	2,	0,	0,	/* not equal */
X	'{',	0,	0,	0,	/* { */
X	'}',	0,	0,	0,	/* } */
X	'(',	1,	0,	0,	/* acute accent */
X	')',	1,	0,	0,	/* grave accent */
X	'*',	1,	0,	0,	/* ^ */
X	'#',	0,	0,	0,	/* # */
X	'(',	3,	0,	0,	/* left hand */
X	'7',	3,	0,	0,	/* member of */
X	',',	1,	0,	0,	/* ~ */
X	'X',	3,	0,	0,	/* empty set */
X	'\0',	2,	0,	0,	/* null */
X	'O',	3,	0,	0,	/* double dagger */
X	'v',	3,	0,	0,	/* box vertical rule */
X	'*',	0,	0,	0,	/* math star */
X	'>',	3,	0,	0,	/* improper subset */
X	'M',	3,	0,	0,	/* circle */
X	'\0',	2,	0,	0,	/* null */
X	'+',	2,	0,	0,	/* math plus */
X	'"',	3,	0,	0,	/* right arrow */
X	'=',	1,	0,	0	/* section */
X};
X
Xmain (argc, argv)
Xint argc;
Xchar **argv;
X{
X	extern int optind;
X	extern char *optarg;
X	static char *fnames[3] = { "R", "I", "B" };
X	register int c;
X
X	prog_name = argv[0];
X	while ((c = getopt(argc, argv, "1:2:3:")) != EOF)
X	    switch (c) {
X	    case '1':
X	    case '2':
X	    case '3':
X		fnames[c - '1'] = optarg;
X		break;
X	    default:
X		fprintf(stderr,
X		"Usage: %s [-1xx] [-2xx] [-3xx]\n", prog_name);
X		exit(1);
X	    }
X
X	hp_init_fonts (fnames);
X
X	printf (INIT);
X	hp_sel_font (1);
X
X	read_cat ();
X#ifdef RESET
X	printf (EXIT);
X#endif
X	exit(0);
X}
X
X/*
X *	Read end interpret CAT codes
X */
X read_cat ()
X {
X	register int c;
X
X	while ((c = getchar ()) != EOF) {
X		if (c & 0200)
X			escape ((~c) & 0177);
X		else if (c < 0100)
X			flash (c);
X		else if ((c & 0340) == 0140)
X			lead ((~c) & 037);
X		else if ((c & 0360) == 0120)
X			change_point_size (c & 017);
X		else if ((c & 0360) == 0100)
X			control (c & 017);
X		else
X			fprintf (stderr,
X			"%s: Illegal CAT code: 0%o\n", prog_name, c);
X	}
X}
X
X/*
X *	Horizontal motion
X */
Xescape (c)
Xint c;
X{
X	if (escape_backward)
X		cat_col -= c;
X	else
X		cat_col += c;
X}
X
X/*
X *	Print character
X */
Xflash (c)
Xint c;
X{
X	if (upper_font)
X		c += 64;
X
X#ifdef DEBUG
X	fprintf (stderr, "Flash char %d on font %d, ", c, cat_font);
X#endif
X
X	if (cat_font <= 7)
X		hp_print_char (standard_table [c]);
X	else
X		hp_print_char (special_table [c]);
X	
X	page_not_blank = 1;
X}
X
X/*
X *	Vertical motion
X */
Xlead (c)
Xint c;
X{
X	if (lead_magnification)
X		c <<= 6;
X	lead_magnification = 0;
X
X	c *= 3;
X
X	if (lead_backward)
X		cat_row -= c;
X	else
X		cat_row += c;
X
X	if (cat_row >= LINES) {
X		hp_form_feed ();
X		cat_row -= LINES;
X	}
X}
X
X/*
X *	Interpret change-point-size code
X */
Xchange_point_size (c)
Xint c;
X{
X	static int c_last = 2;
X	static char point_size_table [15] =
X		{7, 8, 10, 11, 12, 14, 18, 9, 6, 16, 20, 22, 24, 28, 36};
X
X	/* Adjust escape */
X
X	if (c_last <= 8 && c > 8)		/* Single to double */
X		cat_col -= 55;
X	else if (c_last > 8 && c <= 8)		/* Double to single */
X		cat_col += 55;
X	c_last = c;
X	
X	/* Interpret new point size */
X
X	if (c >= 0 && c <= 016)
X		cat_ps = point_size_table [c];
X	else
X		fprintf (stderr,
X		"%s: Illegal CAT point size: 0%o\n", prog_name, c);
X
X	if (hp_ps != cat_ps)
X		hp_ch_point_size ();
X
X#ifdef DEBUG
X	fprintf (stderr, "New point_size %d\n", cat_ps);
X#endif
X}
X
X/*
X *	CAT control codes: init and font changes
X */
Xcontrol (c)
Xint c;
X{
X	switch (c) {
X	case 0:				/* Initialize */
X		upper_rail = 0;
X		upper_mag = 0;
X		tilt_up = 0;
X		upper_font = 0;
X		escape_backward = 0;
X		lead_backward = 0;
X		lead_magnification = 0;
X		break;
X	case 01:			/* Font change */
X		upper_rail = 0;
X		break;
X	case 02:			/* Font change */
X		upper_rail = 1;
X		break;
X	case 03:			/* Font change */
X		upper_mag = 1;
X		break;
X	case 04:			/* Font change */
X		upper_mag = 0;
X		break;
X	case 05:			/* Change font half */
X		upper_font = 0;
X		break;
X	case 06:			/* Change font half */
X		upper_font = 1;
X		break;
X	case 07:			/* Change horizontal direction */
X		escape_backward = 0;
X		break;
X	case 010:			/* Change horizontal direction */
X		escape_backward = 1;
X		break;
X	case 011:			/* Stop code */
X		break;
X	case 012:			/* Change vertical direction */
X		lead_backward = 0;
X		break;
X	case 014:			/* Change vertical direction */
X		lead_backward = 1;
X		break;
X#ifdef BERKELEY_HACK
X	case 016:			/* Magnify next lead 64 times */
X		lead_magnification = 1;
X		break;
X#else
X	case 016:			/* Font change */
X		tilt_up = 1;
X		break;
X	case 017:			/* Font change */
X		tilt_up = 0;
X		break;
X#endif
X	default:
X		fprintf (stderr,
X		"%s: Illegal CAT control code: 0%o\n", prog_name, c);
X		break;
X	}
X
X	cat_font = 2 - tilt_up + (upper_rail << 1) + (upper_mag << 2);
X
X	if (hp_font != cat_font)
X		hp_ch_font ();
X
X#ifdef DEBUG
X	fprintf (stderr, "Control code: 0%o\n", c);
X#endif
X}
X
Xhp_print_char (c)
Xstruct char_table c;
X{
X	int x, y;
X
X	if (hp_char_set != c.char_set)
X		hp_ch_char_set (c.char_set);
X
X	/* Convert to LaserJet coordinates (50 is for rounding) */
X
X	if (c.x_shift < 0)
X		x = SCALE_X(cat_col) + (c.x_shift * hp_ps - 50) / 100;
X	else
X		x = SCALE_X(cat_col) + (c.x_shift * hp_ps + 50) / 100;
X	if (c.y_shift < 0)
X		y = SCALE_Y(cat_row) + (c.y_shift * hp_ps - 50) / 100;
X	else
X		y = SCALE_Y(cat_row) + (c.y_shift * hp_ps + 50) / 100;
X
X	/* Position LaserJet (cannot trust hp_col -- see below) */
X
X	if (hp_row != y)
X		printf (XY_POS(x,y));
X	else
X		printf (X_POS(x));
X
X	putchar (c.c);
X
X	hp_col = x;			/* Wrong by a character width */
X	hp_row = y;
X
X#ifdef DEBUG
X	fprintf (stderr, "col=%d, row=%d, ", x, y);
X	fprintf (stderr, "hp_c = %c(%d), c_set=%d\n", c.c, c.c, c.char_set);
X#endif
X}
X
Xhp_ch_char_set (char_set)
Xchar char_set;
X{
X	switch (char_set) {
X	case 0:				/* USASCII */
X		printf ("\033(0U");
X		break;
X	case 1:				/* Roman Extension */
X		printf ("\033(0E");
X		break;
X	case 2:				/* Math 8a */
X		printf ("\033(0Q");
X		break;
X	case 3:				/* Math 8b */
X		printf ("\033(1Q");
X		break;
X	case 4:				/* Math 7 */
X		printf ("\033(0A");
X		break;
X	case 5:				/* PiFonta */
X		printf ("\033(2Q");
X		break;
X	default:
X		fprintf (stderr,
X		"%s: Illegal HP character set: %d\n", prog_name, char_set);
X		break;
X	}
X	hp_char_set = char_set;
X}
X
Xhp_form_feed ()
X{
X	if (page_not_blank)
X		printf (FORM_FEED);
X
X	page_not_blank = 0;
X}
X
Xhp_ch_point_size ()
X{
X
X/*
X *	Note that no checking is done to see if the asked for
X *	point size is available.
X */
X
X	printf (POINT_SIZE(cat_ps));
X	
X	hp_ps = cat_ps;
X}
X
Xhp_ch_font ()
X{
X	switch (cat_font) {
X	case 1:				/* Roman - troff position 1 */
X	case 2:
X	case 7:
X	case 8:
X		hp_sel_font (1);
X		break;
X	case 3:				/* Italic - troff position 2 */
X	case 4:
X		hp_sel_font (2);
X		break;
X	case 5:				/* Bold - troff position 3 */
X	case 6:
X		hp_sel_font (3);
X		break;
X	default:
X		fprintf (stderr,
X		"%s: Illegal HP font: %d\n", prog_name, cat_font);
X		break;
X	}
X	
X	hp_font = cat_font;
X}
END_OF_FILE
if test 15069 -ne `wc -c <'troff2lj.c'`; then
    echo shar: \"'troff2lj.c'\" unpacked with wrong size!
fi
# end of 'troff2lj.c'
fi
if test -f 'ccfont' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'ccfont'\"
else
echo shar: Extracting \"'ccfont'\" \(264 characters\)
sed "s/^X//" >'ccfont' <<'END_OF_FILE'
X:
X# ccfont
X#
X# Input:  ftXX.c file, generated by hpwidth or width
X# Output: ftXX file, usable by troff when put in /usr/lib/font
X#
X# Sample usage: ccfont fthR
X#
X# David MacKenzie
X# Latest revision: 07/21/88
X
Xfor font
Xdo
X    cc -c $font.c
X    mv $font.o $font
Xdone
END_OF_FILE
if test 264 -ne `wc -c <'ccfont'`; then
    echo shar: \"'ccfont'\" unpacked with wrong size!
fi
chmod +x 'ccfont'
# end of 'ccfont'
fi
if test -f 'heqn' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'heqn'\"
else
echo shar: Extracting \"'heqn'\" \(197 characters\)
sed "s/^X//" >'heqn' <<'END_OF_FILE'
X#! /bin/sh
X#	heqn
X#
X#	invoke eqn with appropriate options for use with HP LaserJet.
X#
X#	-p2	super/subscripts are 2 pointsizes smaller than other text
X#	-fR	use font R globally
X
Xexec eqn -p2 -fR $*
END_OF_FILE
if test 197 -ne `wc -c <'heqn'`; then
    echo shar: \"'heqn'\" unpacked with wrong size!
fi
chmod +x 'heqn'
# end of 'heqn'
fi
if test -f 'htroff' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'htroff'\"
else
echo shar: Extracting \"'htroff'\" \(947 characters\)
sed "s/^X//" >'htroff' <<'END_OF_FILE'
X:
X# htroff - troff for HP LaserJet
X# Usage: htroff [-options] [files]
X#
X# Special options:
X# -nXX	mount font XX on position n (n = 1-3)
X#
X# Sends its output to the LaserJet automatically.
X# Latest revision: 07/26/88
X
Xtranslate=troff2lj
X#translate=/usr/local/lib/troff2lj
Xprintcmd='lpr -plaserjet'
X#printcmd='uux -n - "sst!/usr/ucb/lpr -Prhp"'
X
Xoptions=-t # Send output to stdout instead of /dev/cat.
Xljopts=
Xfiles=
Xfont1=R
Xfont2=I
Xfont3=B
X
Xfor arg
Xdo
X    case $arg in
X	-) files="$files $arg" ;;
X	-1*) font1=`echo $arg|sed 's/-1//'`; ljopts="$ljopts $arg" ;;
X	-2*) font2=`echo $arg|sed 's/-2//'`; ljopts="$ljopts $arg" ;;
X	-3*) font3=`echo $arg|sed 's/-3//'`; ljopts="$ljopts $arg" ;;
X	-[4-9]*|-0*) echo "Illegal font mount: $arg" >&2; exit 1 ;;
X	-*) options="$options $arg" ;;
X	*) files="$files $arg" ;;
X    esac
Xdone
X
X{
Xecho "\
X.fp 1 $font1
X.fp 2 $font2
X.fp 3 $font3
X.fp 4 S
X.lg 0"
X
Xcat $files
X} | troff $options | $translate $ljopts | $printcmd
END_OF_FILE
if test 947 -ne `wc -c <'htroff'`; then
    echo shar: \"'htroff'\" unpacked with wrong size!
fi
chmod +x 'htroff'
# end of 'htroff'
fi
if test -f 'installfont' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'installfont'\"
else
echo shar: Extracting \"'installfont'\" \(2185 characters\)
sed "s/^X//" >'installfont' <<'END_OF_FILE'
X:
X# installfont
X# Usage: installfont
X#
X# David MacKenzie
X# Latest revision: 07/21/88
X
X#fontdir=/usr/lib/hpfont
Xfinfodir=/usr/lib/hpfontinfo
X
X# No cleanup performed currently.
X#trap 'exit' 1 2 3 15
X
Xecho '
XThis program installs an HP LaserJet soft font family for troff use.
XThree types of files are involved in this process:
X
X1.  LaserJet font files (typically with extension .sfp or .usp)
X2.  width files for troff (called ftXX)
X3.  fontinfo files for troff2lj (called fiXX)
X
XStarting out with a file of type 1., this program generates the other two.
X
XYou need to run this program once for each style in each font family
X(i.e., Roman, Bold, Italic, any other variation), but for only one
Xpointsize within each style (which pointsize you use does not matter).'
X
Xvalid=false
Xwhile [ $valid = false ]
Xdo
Xecho '
XEnter full path name of LaserJet font file to install:'
Xread fontfile
X
Xif [ -f "$fontfile" ]
Xthen
X    valid=true
Xelse
X    echo 'File not found.  Try again.'
Xfi
Xdone
X
Xecho '
XCurrently used names for type 2. and 3. files are:'
Xls /usr/lib/font
X
Xvalid=false
Xwhile [ $valid = false ]
Xdo
Xecho '
XEnter 1-or-2-character name (XX) to use for generated type 2. and 3. files:'
Xread ext
X
Xextlen=`expr "$ext" : '.*'`
Xif [ $extlen -eq 0 -o $extlen -gt 2 ]
Xthen
X    echo 'Illegal name.  Try again.'
Xelse
X    valid=true
Xfi
X
Xdone    
X
Xvalid=false
Xwhile [ $valid = false ]
Xdo
Xecho "
XYou have two options for where I will put the type 2. and 3. files that
XI generate:
X
X1.  Put them both in the current directory
X2.  Put the ft$ext file in /usr/lib/font and the fi$ext file in $finfodir
X    (they will be generated in the current directory and then moved to
X    the appropriate directories)
X
XSelect one:"
Xread place
X
Xcase $place in
X    1) mvfiles=false; valid=true ;;
X    2) mvfiles=true; valid=true ;;
X    *) echo 'Illegal location.  Try again.' ;;
Xesac
Xdone
X
Xecho "
XGenerating ft$ext..."
X# Generate ftXX file for troff.
Xhpwidth $fontfile > ft$ext.c
Xccfont ft$ext
Xrm ft$ext.c
Xif [ $mvfiles = true ]
Xthen
X    mv ft$ext /usr/lib/font
Xfi
X
Xecho "
XGenerating fi$ext..."
X# Generate fiXX file for troff2lj.
Xmkhpfi $fontfile fi$ext
Xif [ $mvfiles = true ]
Xthen
X    mv fi$ext $finfodir
Xfi
X
Xecho '
XDone.'
END_OF_FILE
if test 2185 -ne `wc -c <'installfont'`; then
    echo shar: \"'installfont'\" unpacked with wrong size!
fi
chmod +x 'installfont'
# end of 'installfont'
fi
if test -f 'width' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'width'\"
else
echo shar: Extracting \"'width'\" \(501 characters\)
sed "s/^X//" >'width' <<'END_OF_FILE'
X:
X# width - produce C troff width table from HP ASCII file
X# Usage: width hpfile
X
X# for use with troff2lj
X
Xif test $# -ne 1
Xthen
X	echo "Usage: width hpfile" >&2; exit 1
Xfi
X
Xawk '
XBEGIN		{
X			char = 0
X			printf "char xxW [256-32] = {\n"
X		}
X$2 == "POINTS"	{ ps = $1 }
X$1 == "32"	{ char = 1 }
X$1 == "127"	{ char = 0 }
XNF > 0 		{
X			if (char == 1) {
X				width = int ($9 * 8.64 / ps + 0.5)
X				printf "%d,	/* %c */\n", width, $1
X			}
X		}
XEND		{ printf "}	/* from file %s, ps=%f */\n", FILENAME, ps }
X' $1
END_OF_FILE
if test 501 -ne `wc -c <'width'`; then
    echo shar: \"'width'\" unpacked with wrong size!
fi
chmod +x 'width'
# end of 'width'
fi
if test -f 'fthR.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fthR.c'\"
else
echo shar: Extracting \"'fthR.c'\" \(3518 characters\)
sed "s/^X//" >'fthR.c' <<'END_OF_FILE'
Xchar XXw[256-32] = {
X12,		/* space */
X10,		/* ! */
X0,		/* " */
X0,		/* # */
X20,		/* $ */
X30,		/* % */
X30,		/* & */
X10,		/* ' */
X13,		/* ( */
X14,		/* ) */
X19,		/* * */
X20,		/* + */
X12,		/* , */
X20,		/* - hyphen */
X10,		/* . */
X18,		/* / */
X20+0200,	/* 0 */
X20+0200,	/* 1 */
X20+0200,	/* 2 */
X20+0200,	/* 3 */
X20+0200,	/* 4 */
X20+0200,	/* 5 */
X20+0200,	/* 6 */
X20+0200,	/* 7 */
X20+0200,	/* 8 */
X20+0200,	/* 9 */
X9,		/* : */
X10,		/* ; */
X0,		/* < */
X22,		/* = */
X0,		/* > */
X19,		/* ? */
X0,		/* @ */
X30+0200,	/* A */
X25+0200,	/* B */
X27+0200,	/* C */
X29+0200,	/* D */
X26+0200,	/* E */
X24+0200,	/* F */
X31+0200,	/* G */
X30+0200,	/* H */
X14+0200,	/* I */
X17+0200,	/* J */
X33+0200,	/* K */
X26+0200,	/* L */
X36+0200,	/* M */
X30+0200,	/* N */
X29+0200,	/* O */
X22+0200,	/* P */
X29+0300,	/* Q */
X29+0200,	/* R */
X19+0200,	/* S */
X26+0200,	/* T */
X32+0200,	/* U */
X29+0200,	/* V */
X33+0200,	/* W */
X31+0200,	/* X */
X29+0200,	/* Y */
X27+0200,	/* Z */
X11,		/* [ */
X0,		/* \ */
X12,		/* ] */
X0,		/* ^ */
X0,		/* _ */
X10,		/* ` */
X18,		/* a */
X22+0200,	/* b */
X18,		/* c */
X22+0200,	/* d */
X18,		/* e */
X16+0200,	/* f */
X20+0100,	/* g */
X22+0200,	/* h */
X12+0200,	/* i */
X15+0300,	/* j */
X22+0200,	/* k */
X11+0200,	/* l */
X32,		/* m */
X22,		/* n */
X20,		/* o */
X22+0100,	/* p */
X21+0100,	/* q */
X16,		/* r */
X15,		/* s */
X13+0200,	/* t */
X22,		/* u */
X21,		/* v */
X29,		/* w */
X21,		/* x */
X21+0100,	/* y */
X17,		/* z */
X0,		/* { */
X7,		/* | */
X0,		/* } */
X0,		/* ~ */
X6,		/* narrow space */
X20,		/* hyphen */
X12,		/* bullet */
X22,		/* square */
X33,		/* 3/4 em dash */
X30,		/* rule */
X18,		/* 1/4 */
X18,		/* 1/2 */
X0,		/* 3/4 */
X20,		/* minus */
X0,		/* fi */
X0,		/* fl */
X0,		/* ff */
X0,		/* ffi */
X0,		/* ffl */
X14,		/* degree */
X16,		/* dagger */
X0,		/* section (unimplem) */
X8,		/* foot mark */
X0,		/* acute acc (unimplem) */
X0,		/* grave acc (unimplem) */
X0,		/* underrule (unimplem) */
X0,		/* slash (unimplem) */
X3,		/* half narrow space */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X22,		/* registered */
X22,		/* copyright */
X0,		/* null */
X21,		/* cent */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0		/* null */
X};
END_OF_FILE
if test 3518 -ne `wc -c <'fthR.c'`; then
    echo shar: \"'fthR.c'\" unpacked with wrong size!
fi
# end of 'fthR.c'
fi
if test -f 'fthI.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fthI.c'\"
else
echo shar: Extracting \"'fthI.c'\" \(3517 characters\)
sed "s/^X//" >'fthI.c' <<'END_OF_FILE'
Xchar XXw[256-32] = {
X12,		/* space */
X15,		/* ! */
X0,		/* " */
X0,		/* # */
X20,		/* $ */
X28,		/* % */
X28,		/* & */
X9,		/* ' */
X17,		/* ( */
X17,		/* ) */
X18,		/* * */
X20,		/* + */
X10,		/* , */
X20,		/* - hyphen */
X10,		/* . */
X27,		/* / */
X20+0200,	/* 0 */
X20+0200,	/* 1 */
X20+0200,	/* 2 */
X20+0200,	/* 3 */
X20+0200,	/* 4 */
X20+0200,	/* 5 */
X20+0200,	/* 6 */
X20+0200,	/* 7 */
X20+0200,	/* 8 */
X20+0200,	/* 9 */
X16,		/* : */
X15,		/* ; */
X0,		/* < */
X22,		/* = */
X0,		/* > */
X18,		/* ? */
X0,		/* @ */
X26+0200,	/* A */
X25+0200,	/* B */
X27+0200,	/* C */
X29+0200,	/* D */
X25+0200,	/* E */
X25+0200,	/* F */
X26+0200,	/* G */
X30+0200,	/* H */
X16+0200,	/* I */
X21+0200,	/* J */
X27+0200,	/* K */
X26+0200,	/* L */
X35+0200,	/* M */
X29+0200,	/* N */
X29+0200,	/* O */
X24+0200,	/* P */
X29+0300,	/* Q */
X28+0200,	/* R */
X24+0200,	/* S */
X26+0200,	/* T */
X29+0200,	/* U */
X27+0200,	/* V */
X30+0200,	/* W */
X29+0200,	/* X */
X25+0200,	/* Y */
X29+0200,	/* Z */
X21,		/* [ */
X0,		/* \ */
X21,		/* ] */
X0,		/* ^ */
X0,		/* _ */
X9,		/* ` */
X20,		/* a */
X19+0200,	/* b */
X17,		/* c */
X22+0200,	/* d */
X17,		/* e */
X18+0200,	/* f */
X22+0100,	/* g */
X20+0200,	/* h */
X12+0200,	/* i */
X18+0300,	/* j */
X21+0200,	/* k */
X13+0200,	/* l */
X31,		/* m */
X20,		/* n */
X19,		/* o */
X21+0100,	/* p */
X19+0100,	/* q */
X16,		/* r */
X16,		/* s */
X12+0200,	/* t */
X19,		/* u */
X16,		/* v */
X27,		/* w */
X22,		/* x */
X20+0100,	/* y */
X20,		/* z */
X0,		/* { */
X6,		/* | */
X0,		/* } */
X0,		/* ~ */
X6,		/* narrow space */
X20,		/* hyphen */
X12,		/* bullet */
X22,		/* square */
X31,		/* 3/4 em dash */
X29,		/* rule */
X14,		/* 1/4 */
X14,		/* 1/2 */
X0,		/* 3/4 */
X20,		/* minus */
X0,		/* fi */
X0,		/* fl */
X0,		/* ff */
X0,		/* ffi */
X0,		/* ffl */
X14,		/* degree */
X16,		/* dagger */
X0,		/* section (unimplem) */
X8,		/* foot mark */
X0,		/* acute acc (unimplem) */
X0,		/* grave acc (unimplem) */
X0,		/* underrule (unimplem) */
X0,		/* slash (unimplem) */
X3,		/* half narrow space */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X22,		/* registered */
X22,		/* copyright */
X0,		/* null */
X18,		/* cent */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0		/* null */
X};
END_OF_FILE
if test 3517 -ne `wc -c <'fthI.c'`; then
    echo shar: \"'fthI.c'\" unpacked with wrong size!
fi
# end of 'fthI.c'
fi
if test -f 'fthB.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fthB.c'\"
else
echo shar: Extracting \"'fthB.c'\" \(3519 characters\)
sed "s/^X//" >'fthB.c' <<'END_OF_FILE'
Xchar XXw[256-32] = {
X12,		/* space */
X12,		/* ! */
X0,		/* " */
X0,		/* # */
X21,		/* $ */
X34,		/* % */
X29,		/* & */
X10,		/* ' */
X16,		/* ( */
X16,		/* ) */
X16,		/* * */
X21,		/* + */
X12,		/* , */
X21,		/* - hyphen */
X12,		/* . */
X19,		/* / */
X21+0200,	/* 0 */
X21+0200,	/* 1 */
X21+0200,	/* 2 */
X21+0200,	/* 3 */
X21+0200,	/* 4 */
X21+0200,	/* 5 */
X21+0200,	/* 6 */
X21+0200,	/* 7 */
X21+0200,	/* 8 */
X21+0200,	/* 9 */
X10,		/* : */
X10,		/* ; */
X0,		/* < */
X22,		/* = */
X0,		/* > */
X19,		/* ? */
X0,		/* @ */
X28+0200,	/* A */
X27+0200,	/* B */
X27+0200,	/* C */
X28+0200,	/* D */
X25+0200,	/* E */
X23+0200,	/* F */
X30+0200,	/* G */
X32+0200,	/* H */
X16+0200,	/* I */
X21+0200,	/* J */
X29+0200,	/* K */
X25+0200,	/* L */
X34+0200,	/* M */
X29+0200,	/* N */
X29+0200,	/* O */
X24+0200,	/* P */
X29+0300,	/* Q */
X28+0200,	/* R */
X22+0200,	/* S */
X26+0200,	/* T */
X30+0200,	/* U */
X29+0200,	/* V */
X35+0200,	/* W */
X28+0200,	/* X */
X27+0200,	/* Y */
X28+0200,	/* Z */
X11,		/* [ */
X0,		/* \ */
X12,		/* ] */
X0,		/* ^ */
X0,		/* _ */
X10,		/* ` */
X20,		/* a */
X21+0200,	/* b */
X18,		/* c */
X21+0200,	/* d */
X18,		/* e */
X16+0200,	/* f */
X20+0100,	/* g */
X23+0200,	/* h */
X12+0200,	/* i */
X15+0300,	/* j */
X22+0200,	/* k */
X12+0200,	/* l */
X31,		/* m */
X22,		/* n */
X20,		/* o */
X21+0100,	/* p */
X21+0100,	/* q */
X16,		/* r */
X16,		/* s */
X14+0200,	/* t */
X21,		/* u */
X17,		/* v */
X28,		/* w */
X21,		/* x */
X20+0100,	/* y */
X17,		/* z */
X0,		/* { */
X7,		/* | */
X0,		/* } */
X0,		/* ~ */
X6,		/* narrow space */
X21,		/* hyphen */
X12,		/* bullet */
X22,		/* square */
X31,		/* 3/4 em dash */
X29,		/* rule */
X16,		/* 1/4 */
X16,		/* 1/2 */
X0,		/* 3/4 */
X21,		/* minus */
X0,		/* fi */
X0,		/* fl */
X0,		/* ff */
X0,		/* ffi */
X0,		/* ffl */
X11,		/* degree */
X16,		/* dagger */
X0,		/* section (unimplem) */
X8,		/* foot mark */
X0,		/* acute acc (unimplem) */
X0,		/* grave acc (unimplem) */
X0,		/* underrule (unimplem) */
X0,		/* slash (unimplem) */
X3,		/* half narrow space */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X22,		/* registered */
X22,		/* copyright */
X0,		/* null */
X20,		/* cent */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0		/* null */
X};
END_OF_FILE
if test 3519 -ne `wc -c <'fthB.c'`; then
    echo shar: \"'fthB.c'\" unpacked with wrong size!
fi
# end of 'fthB.c'
fi
if test -f 'fthS.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fthS.c'\"
else
echo shar: Extracting \"'fthS.c'\" \(4114 characters\)
sed "s/^X//" >'fthS.c' <<'END_OF_FILE'
Xchar XXw[256-32] = {
X0,		/* null */
X0,		/* null */
X13,		/* " */
X26,		/* # */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X21,		/* < */
X0,		/* null */
X21,		/* > */
X0,		/* null */
X34,		/* @ */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X18,		/* \ */
X0,		/* null */
X14,		/* ^ */
X30,		/* _ */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X14,		/* { */
X0,		/* null */
X15,		/* } */
X15,		/* ~ */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X20+0300,	/* section */
X0,		/* null */
X10,		/* acute accent */
X10,		/* grave accent */
X30,		/* underrule */
X18,		/* slash (matching backslash) */
X0,		/* null */
X0,		/* null */
X22,		/* alpha */
X21+0300,	/* beta */
X20+0100,	/* gamma */
X16+0200,	/* delta */
X15,		/* epsilon */
X17+0300,	/* zeta */
X19+0100,	/* eta */
X15+0200,	/* theta */
X14,		/* iota */
X20,		/* kappa */
X20+0200,	/* lambda */
X22+0100,	/* mu */
X20,		/* nu */
X18+0300,	/* xi */
X17,		/* omicron */
X20,		/* pi */
X17+0100,	/* rho */
X19,		/* sigma */
X16,		/* tau */
X19,		/* upsilon */
X20+0100,	/* phi */
X22+0100,	/* chi */
X22+0300,	/* psi */
X22,		/* omega */
X21+0200,	/* Gamma */
X30+0200,	/* Delta */
X26+0200,	/* Theta */
X23+0200,	/* Lambda */
X20+0300,	/* Xi */
X26+0200,	/* Pi */
X26+0200,	/* Sigma */
X0,		/* null */
X25+0200,	/* Upsilon */
X26+0200,	/* Phi */
X27+0200,	/* Psi */
X24+0200,	/* Omega */
X30,		/* square root */
X17,		/* terminal sigma */
X30,		/* root en extender */
X21,		/* >= */
X21,		/* <= */
X22,		/* identically equal */
X20,		/* minus */
X26,		/* approx = */
X22,		/* approximates */
X22+0300,	/* not equal */
X34,		/* right arrow */
X34,		/* left arrow */
X18+0200,	/* up arrow */
X18+0200,	/* down arrow */
X22,		/* math equals */
X21,		/* multiply */
X20,		/* divide */
X21,		/* plus-minus */
X24,		/* cup (union) */
X24,		/* cap (intersection) */
X24,		/* subset of */
X24,		/* superset of */
X24,		/* improper subset */
X24,		/* improper superset */
X35,		/* infinity */
X20+0200,	/* partial derivative */
X20,		/* gradient */
X23,		/* not */
X22,		/* integral sign */
X26,		/* proportional to */
X25+0300,	/* empty set */
X24,		/* member of */
X20,		/* math plus */
X0,		/* null */
X0,		/* null */
X30,		/* box vertical rule */
X0,		/* null */
X16+0300,	/* dbl dagger */
X34,		/* right hand */
X34,		/* left hand */
X19+0200,	/* math star */
X21,		/* bell system sign (replaced with h bar)*/
X7+0200,		/* or */
X27,		/* circle */
X30,		/* left top (of big curly) */
X30,		/* left bottom */
X30,		/* right top */
X30,		/* right bot */
X30,		/* left center of big curly bracket */
X30,		/* right center of big curly bracket */
X30,		/* bold vertical */
X30,		/* left floor (lb of bracket) */
X30,		/* right floor (rb of bracket) */
X30,		/* left ceiling (lt of bracket) */
X30,		/* right ceiling (rt of bracket) */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0,		/* null */
X0		/* null */
X};
END_OF_FILE
if test 4114 -ne `wc -c <'fthS.c'`; then
    echo shar: \"'fthS.c'\" unpacked with wrong size!
fi
# end of 'fthS.c'
fi
if test -f 'fiR.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fiR.c'\"
else
echo shar: Extracting \"'fiR.c'\" \(238 characters\)
sed "s/^X//" >'fiR.c' <<'END_OF_FILE'
X/*
X * fiR.c
X * HP fontinfo definition for
X * Times Roman typeface
X */
X
X#include "hpfinfo.h"
X
Xstruct hpfontinfo x = {
X	0,	/* portrait */
X	1,	/* proportional spacing */
X	0,	/* upright */
X	0,	/* medium boldness */
X	5	/* Times typeface */
X};
END_OF_FILE
if test 238 -ne `wc -c <'fiR.c'`; then
    echo shar: \"'fiR.c'\" unpacked with wrong size!
fi
# end of 'fiR.c'
fi
if test -f 'fiI.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fiI.c'\"
else
echo shar: Extracting \"'fiI.c'\" \(238 characters\)
sed "s/^X//" >'fiI.c' <<'END_OF_FILE'
X/*
X * fiI.c
X * HP fontinfo definition for
X * Times italic typeface
X */
X
X#include "hpfinfo.h"
X
Xstruct hpfontinfo x = {
X	0,	/* portrait */
X	1,	/* proportional spacing */
X	1,	/* italic */
X	0,	/* medium boldness */
X	5	/* Times typeface */
X};
END_OF_FILE
if test 238 -ne `wc -c <'fiI.c'`; then
    echo shar: \"'fiI.c'\" unpacked with wrong size!
fi
# end of 'fiI.c'
fi
if test -f 'fiB.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fiB.c'\"
else
echo shar: Extracting \"'fiB.c'\" \(230 characters\)
sed "s/^X//" >'fiB.c' <<'END_OF_FILE'
X/*
X * fiB.c
X * HP fontinfo definition for
X * Times bold typeface
X */
X
X#include "hpfinfo.h"
X
Xstruct hpfontinfo x = {
X	0,	/* portrait */
X	1,	/* proportional spacing */
X	0,	/* upright */
X	3,	/* boldness */
X	5	/* Times typeface */
X};
END_OF_FILE
if test 230 -ne `wc -c <'fiB.c'`; then
    echo shar: \"'fiB.c'\" unpacked with wrong size!
fi
# end of 'fiB.c'
fi
echo shar: End of archive 2 \(of 2\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked both archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0