v04i072: JetRoff Source Code (03 of 7)

root2 at pcrat.UUCP root2 at pcrat.UUCP
Sun Sep 18 09:07:48 AEST 1988


Posting-number: Volume 4, Issue 72
Submitted-by: "A. Nonymous" <root2 at pcrat.UUCP>
Archive-name: jetroff/src/Part03

#! /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 3 (of 7)."
# Contents:  Fonts License bm/hp2jetbm.c bm/myreopen.c bm/unittestR.sh
#   bsd/jetroffBSD.sh djet/arc.c djet/bitmap.c djet/dlj.h djet/main.c
#   djet/makefile djet/out.c djet/verify.c doc/djet.mm
# Wrapped by rick at pcroe on Sat Aug 27 13:01:05 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Fonts' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Fonts'\"
else
echo shar: Extracting \"'Fonts'\" \(2814 characters\)
sed "s/^X//" >'Fonts' <<'END_OF_FILE'
XSTANDARD FONTS
X--------------
X
XJetRoff currently has the following typefaces and sizes:
X
XR  Computer Modern Roman  4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XI  Computer Modern Italic 4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XB  Computer Modern Bold   4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XH  Sans Serif             4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XHB Sans Serif Bold        4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XHI Sans Serif Italic      4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XCW Constant Width         4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XS  Math Symbols           4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XST Troff Math Symbols     4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XSI Italic Math Symbols    4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
XHD Sans Serif DemiBold    4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 36 40
X
XAt this time, it is unknown whether the full complement of fonts listed
Xabove will be distributed via the USENET, due to size considerations.
X
XIf you have the USENET distribution, and the font set was a subset of the
Xabove, you can get the additional fonts by becoming a registered user
Xand paying the suggested Shareware contribution as described in the License.
X
XJust indicate that you need the full set of fonts when you register,
Xand we'll send them on High Density floppies.  The files can either
Xbe sent as MS-DOS files, or as an "afio" archive.  Please indicate.
XSorry, we cannot provide the fonts on any other medium.
X
XRick Richardson
XPC Research, Inc.
X94 Apple Orchard Drive
XTinton Falls, NJ   07724
X
XAugust, 1988
X
XCHEAP FONTS FROM OTHER SOURCES
X------------------------------
X
XWe've tried the Glyphix typefaces with JetRoff, and they are acceptable.
XThey are outline based typefaces, and so have the same advantages and
Xdisadvantages as most outline typefaces: you can generate any size font
Xfrom the outlines, but the bitmaps aren't optimal at all sizes due to
Xthe real world nature of the human eye and the printer.
X
XGlyphix currently offers 6 disks of four typefaces.  You can get
XGlyphix typefaces, which list for $99.95 per set of four directly
Xfrom the manufacturer:
X
X	SWFTE International, Ltd.
X	P. O. Box 5773
X	Wilmington, DE   19808
X	(302) 733-0956
X
Xor mail order for $79.00 from:
X
X	Publishing Perfection
X	N88 W16444 Main Street
X	Menomonee Falls, WI   53051
X	1-800-PUBLYSH
X
XTo use the fonts, you must generate the bitmaps for the fonts you
Xneed under MS-DOS.  We recommend using a 4 letter font name,
Xfollowed by "i" or "b" if slanted or bold, followed by a 1 or 2 digit
Xpoint size as the naming convention.  The file suffix should be ".sfp".
XThen, you must use the sfp2pk utility to convert each font file
Xto packed.  Finally, edit fontlist and run fontcfg.
END_OF_FILE
if test 2814 -ne `wc -c <'Fonts'`; then
    echo shar: \"'Fonts'\" unpacked with wrong size!
fi
# end of 'Fonts'
fi
if test -f 'License' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'License'\"
else
echo shar: Extracting \"'License'\" \(3255 characters\)
sed "s/^X//" >'License' <<'END_OF_FILE'
X	       tm
X	JetRoff   - HP LaserJet Series II postprocessor for DWB 2.0
X
X	(c) Copyright 1988 PC Research, Inc.  All Rights Reserved.
X
X
X			SHAREWARE LICENSE
X
XThe JetRoff source code is being supplied to you under the concept
Xknown as "Shareware".  Subject to the duties and restrictions set forth
Xbelow, you may make use of JetRoff for your own personal purposes.
XIf you find that JetRoff is useful to you, you are requested to mail a
Xsuggested contribution (US dollars) of $50 for an individual, or $100 for
Xa business, per computer on which you use JetRoff.
X
X			PC Research, Inc
X			JetRoff Shareware
X			94 Apple Orchard Drive
X			Tinton Falls, NJ   07724
X
XSmaller contributions will be accepted; send what you can afford.
XHowever, we believe that JetRoff is worth this token amount
Xwhen compared to other commercial alternatives.
X
XWhen you consider the effort I've gone through to provide this
Xpackage to you, the effort you may have to go through to get
Xyour company or spouse to agree to write out a check is minimal.
X
XIn return for your contribution, you will be placed on the list of
Xregistered users and notified of enhancements, bug fixes, and
Xadditional fonts for JetRoff.  All correspondence concerning
XJetRoff should be directed to the above address or to the
XUSENET address: ..!uunet!pcrat!jetroff.
X
XSite Licenses and rights to distribute for profit can be arranged
Xby written agreement with PC Research, Inc.
X
X			DUTIES AND RESTRICTIONS
X
X1)	You may not remove any of the Copyright notices or
X	this notice from any copies you may make of JetRoff.
X	You may not modify the copyright notices or this
X	License in any way.  You may not claim that you wrote JetRoff.
X
X2)	You may modify the JetRoff source code in order to get it to
X	work on your computer.  Any modifications you make must be
X	mailed or transmitted to PC Research, Inc. 
X
X3)	You may make copies of the source code and distribute JetRoff
X	as long as you distribute the entire JetRoff distribution the
X	way you received it.  You may distribute your modifications
X	made under 2), but only as a separate add on to the JetRoff
X	distribution.  You must include this notice in any distributions
X	that you make.
X
X4)	You may not charge any money for a copy of the JetRoff source
X	code, other than your actual costs to copy or transmit it.
X
X5)	You may not distribute the machine executable copies of JetRoff
X	that you make by compiling JetRoff unless you do not charge
X	any money for them, or have written permission from PC Research,
X	Inc.  Furthermore, you must include this notice with any
X	executables that you distribute.
X
X6)	You may not use the JetRoff source code to derive any other
X	works, without written permission of PC Research, Inc.
X
X7)	PC Research, Inc. makes no warranties, either expressed or
X	implied, and hereby disclaims all implied warranties of
X	merchantability and fitness for a particular purpose.  In
X	no event shall PC Research, Inc. be liable for any special,
X	indirect or consequential or punitive damages for any reason
X	or for lost profits or for any damages resulting from errors
X	or omissions made in this software.
X
X8)	If you do not agree to the terms of this License, you must
X	destroy any copies of JetRoff that you may have in your
X	possession.
X
XAugust, 1988
END_OF_FILE
if test 3255 -ne `wc -c <'License'`; then
    echo shar: \"'License'\" unpacked with wrong size!
fi
# end of 'License'
fi
if test -f 'bm/hp2jetbm.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bm/hp2jetbm.c'\"
else
echo shar: Extracting \"'bm/hp2jetbm.c'\" \(4319 characters\)
sed "s/^X//" >'bm/hp2jetbm.c' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
Xstatic char	Copyright[] =
X"@(#) JetRoff (c) Copyright 1988 PC Research, Inc.  All Rights Reserved.";
X
X/*
X *
X *	hp2jetbm <hp_pcl_bitmap >bitmap.jbm
X *
X *		read standard input for an HP PCL bitmap and output
X *		in jetroff "standard" bitmap format.  "Standard"
X *		format is 4 bytes bitmap width (LSB first), then 4 bytes
X *		bitmap height (LSB first), then pixels, 8 pixels per
X *		byte, MSB is leftmost, row by row.
X */
X
X/*
X * $Id: hp2jetbm.c,v 1.1 88/08/26 23:26:21 rick Exp $
X *
X * $Log:	hp2jetbm.c,v $
X * Revision 1.1  88/08/26  23:26:21  rick
X * Initial revision
X * 
X */
X#ifndef lint
Xstatic char rcsid[] = "$Id: hp2jetbm.c,v 1.1 88/08/26 23:26:21 rick Exp $";
X#endif
X
X#include <stdio.h>
X
Xextern char	*malloc();
Xextern void	free();
Xextern void	exit();
X#define	Fprintf	(void) fprintf
X
Xchar	*map[300*11];
Xint	len[300*11];
Xint	x, y;
Xint	maxx, maxy;
X
Xmain(argc, argv)
Xchar	*argv[];
X{
X	register int	c;
X	extern char	*optarg;
X	extern int	optind;
X
X	while ((c = getopt(argc, argv, "?")) != EOF)
X		switch (c)
X		{
X		default:
X			break;
X		}
X
X	(void) convert(stdin);
X	exit(0);
X	/* NOTREACHED */
X}
X
Xconvert(fp)
XFILE	*fp;
X{
X	register int	c;
X	register int	state = 0;
X
X	while ( (c = fgetc(fp)) != EOF)
X	{
X		switch (state)
X		{
X		case 0:
X			if (c == '\033') state = '\033';
X			break;
X		case '\033':
X			if (c >= 48 && c <= 126)
X			{
X			}
X			else if (c >= 33 && c <= 47)
X			{
X				if (do_esc(fp, c) == EOF)
X					return EOF;
X			}
X			else
X				burp(state, c);
X			state = 0;
X			break;
X		}
X	}
X	dump_map();
X	return EOF;
X}
X
Xdo_esc(infp, intro)
XFILE	*infp;
Xchar	intro;
X{
X	register int	c;
X	register int	i;
X	char		groupc;
X	int		nparms;
X	char		parms[16][64];
X	char		*parmp[16];
X	char		parmc[16];
X	register int	state = 'g';
X	int		sbincount = 0;
X	int		rbincount = 0;
X
X/* Fprintf(stderr, "do_esc %c\n", intro); */
X	while ( (c = fgetc(infp)) != EOF)
X	{
X/* Fprintf(stderr, "%c %d\n", c, c); */
X		switch (state)
X		{
X		case 'g':
X			state = 'v';
X			nparms = 0;
X			parmp[nparms] = parms[nparms];
X			*parmp[nparms] = 0;
X			if (c < 96 || c > 126)
X				groupc = 0;
X			else
X			{
X				groupc = c;
X				break;
X			}
X			/* FALL THRU */
X		case 'v':
X			if ( (c >= 48 && c <= 57)
X				|| c == '+' || c == '-' || c == '.')
X			{
X				*parmp[nparms]++ = c;
X				*parmp[nparms] = 0;
X			}
X			else if (c >= 96 && c <= 126)
X			{
X				parmc[nparms] = c;
X				++nparms;
X				parmp[nparms] = parms[nparms];
X				*parmp[nparms] = 0;
X			}
X			else if (c >= 64 && c <= 94)
X			{
X				parmc[nparms] = c;
X				++nparms;
X				goto wade;
X			}
X			else
X				burp(state, c);
X			break;
X		}
X	}
X	return EOF;
X
Xwade:
X	for (i = 0; i < nparms; ++i)
X	{
X		switch (parmc[i])
X		{
X		case 'a': case 'A':
X			y = 0; maxy = -1;
X			x = 0; maxx = -1;
X			break;
X		case 'b': case 'B':
X			break;
X		case 'w': case 'W':
X			if (groupc == 's' && (intro == '(' || intro == ')') )
X			{	/* Font desc or character */
X				sbincount += atoi(parms[i]);
X			}
X			else if (groupc == 'b' && intro == '*')
X			{	/* Raster transfer */
X				rbincount += atoi(parms[i]);
X				if (rbincount > maxx) maxx = rbincount;
X				if (map[y]) free(map[y]);
X				if (rbincount)
X					map[y] = (char *)
X						malloc((unsigned) rbincount);
X				else
X					map[y] = NULL;
X				len[y] = rbincount;
X				x = 0;
X				while (rbincount--)
X				{
X					c = fgetc(infp);
X					if (c == EOF)
X						burp(state, c);
X					map[y][x++] = c;
X				}
X				maxy = ++y;
X			}
X			break;
X		default:
X			break;
X		}
X	}
X	while (sbincount--)
X	{
X		c = fgetc(infp);
X		if (c == EOF)
X			burp(state, c);
X	}
X
X	return (1);
X}
X
Xburp(state, c)
X{
X	Fprintf(stderr, "Burp state=%c %d, char=%c %d\n",
X		state, state, c, c);
X	exit(1);
X}
X
Xputlong(xx)
Xregister long	xx;
X{
X	register char	c;
X
X	c = xx; (void) putchar(c);
X	c = xx>>8; (void) putchar(c);
X	c = xx>>16; (void) putchar(c);
X	c = xx>>24; (void) putchar(c);
X}
X
Xdump_map()
X{
X	register int xx, yy;
X
X	putlong( (long) maxx << 3);
X	putlong( (long) maxy);
X
X	for (yy = 0; yy < maxy; ++yy)
X	{
X		for (xx = 0; xx < len[yy]; ++xx)
X			(void) putchar(map[yy][xx]);
X		for (; xx < maxx; ++xx)
X			(void) putchar(0);
X	}
X}
END_OF_FILE
if test 4319 -ne `wc -c <'bm/hp2jetbm.c'`; then
    echo shar: \"'bm/hp2jetbm.c'\" unpacked with wrong size!
fi
# end of 'bm/hp2jetbm.c'
fi
if test -f 'bm/myreopen.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bm/myreopen.c'\"
else
echo shar: Extracting \"'bm/myreopen.c'\" \(3662 characters\)
sed "s/^X//" >'bm/myreopen.c' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
X/*
X *	FILE *myreopen(name, mode, ofp, env, std)
X *
X *	reopen name, trying several methods
X *		0) if (name[0] == $)
X *			use first component of name as environment variable
X *			lookup value and prepend to remaining component(s)
X *			of name.  Try to open that file. Return in any case.
X *		1) Try to open name.  If success, return
X *		2) Try to open getenv(env) # '/' # name. Return if success
X *		3) if (std[0] == '/')
X *			try to open std # name.  Return in any case.
X *		   else
X *			use first component of std to choose list of
X *			likely places.  Try to open each
X *				likely[N] # std # name
X *			return on first success
X */
X
X/*
X * $Id: myreopen.c,v 1.1 88/08/26 23:26:24 rick Exp $
X *
X * $Log:	myreopen.c,v $
X * Revision 1.1  88/08/26  23:26:24  rick
X * Initial revision
X * 
X */
X#ifndef lint
Xstatic char rcsid[] = "$Id: myreopen.c,v 1.1 88/08/26 23:26:24 rick Exp $";
X#endif
X
X#include <stdio.h>
X#include <string.h>
X
Xextern char	*malloc();
Xextern void	free();
X
Xtypedef struct
X{
X	char	*dir;
X	char	**like;
X} PLACES;
X
Xstatic char	*binlib[] =
X{
X	"/usr2/",
X	"/usr/l",
X	"/usr/local/",
X	"/usr/",
X	"/",
X	"/usr/add-on/",
X	NULL
X};
X
Xstatic char	*etc[] =
X{
X	"/",
X	"/usr/",
X	NULL
X};
X
Xstatic PLACES	places[] =
X{
X	"lib",	binlib,
X	"etc",	etc,
X	"bin",	binlib,
X	NULL
X};
X
XFILE *
Xmyreopen(name, mode, ofp, env, std)
Xchar	*name;	/* Path name */
Xchar	*mode;	/* mode */
XFILE	*ofp;	/* Old file desc */
Xchar	*env;	/* Environment variable name of PATH string */
Xchar	*std;	/* Standard directory */
X{
X	FILE		*fp;
X	register char	*fname;
X	extern char	*getenv();
X
X	if (name[0] == '$')
X	{
X		register char	*envname;
X		register char	*b;
X		char		*e;
X
X		envname = malloc( (unsigned) strlen(name) + 1);
X		(void) strcpy(envname, name);
X		b = envname+1;
X		e = strchr(envname, '/');
X		if (e) *e = 0;
X		b = getenv(b);
X		if (!b) { free(envname); return (NULL); }
X
X		fname = malloc( (unsigned) strlen(b) + strlen(name) + 2);
X		(void) strcpy(fname, b);
X		(void) strcat(fname, "/");
X		(void) strcat(fname, name);
X		fp = freopen(fname, mode, ofp);
X		free(fname);
X		free(envname);
X
X		return (fp);
X	}
X
X	fp = freopen(name, mode, ofp);
X	if (fp || name[0] == '/' || name[0] == '\\')
X		return (fp);
X
X	if (env)
X	{
X		env = getenv(env);
X
X		fname = malloc( (unsigned) strlen(env) + strlen(name) + 2);
X		(void) strcpy(fname, env);
X		(void) strcat(fname, "/");
X		(void) strcat(fname, name);
X		fp = freopen(fname, mode, ofp);
X		free(fname);
X		if (fp) return (fp);
X	}
X
X	if (std)
X	{
X		if (std[0] == '/')
X		{
Xfixed:
X			fname = malloc( (unsigned) strlen(std)
X					+ strlen(name) + 2);
X			(void) strcpy(fname, std);
X			(void) strcat(fname, "/");
X			(void) strcat(fname, name);
X			fp = freopen(fname, mode, ofp);
X			free(fname);
X			if (fp) return (fp);
X		}
X		else
X		{
X			register PLACES	*place;
X			register int	n;
X
X			for (place = places; place->dir; ++place)
X				if (strncmp(place->dir, std,
X						strlen(place->dir)) == 0)
X					break;
X			if (place->dir == NULL) goto fixed;
X			for (n = 0; place->like[n]; ++n)
X			{
X				fname = malloc((unsigned) strlen(place->like[n])
X						+ strlen(std)
X						+ strlen(name) + 2);
X				(void) strcpy(fname, place->like[n]);
X				(void) strcat(fname, std);
X				(void) strcat(fname, "/");
X				(void) strcat(fname, name);
X				fp = freopen(fname, mode, ofp);
X				free(fname);
X				if (fp) return (fp);
X			}
X		}
X	}
X	return (NULL);
X}
END_OF_FILE
if test 3662 -ne `wc -c <'bm/myreopen.c'`; then
    echo shar: \"'bm/myreopen.c'\" unpacked with wrong size!
fi
# end of 'bm/myreopen.c'
fi
if test -f 'bm/unittestR.sh' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bm/unittestR.sh'\"
else
echo shar: Extracting \"'bm/unittestR.sh'\" \(3040 characters\)
sed "s/^X//" >'bm/unittestR.sh' <<'END_OF_FILE'
X#/*c
X# *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X# *
X# *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X# *
X# *	This source code is supplied to you under the terms of the
X# *	contents of the "License" agreement found with this source
X# *	distribution.  You must read the "License" before you use
X# *	this source code in any way.
X# *
X#c*/
X
X#
X# $Id: unittestR.sh,v 1.1 88/08/26 23:26:28 rick Exp $
X#
X# $Log:	unittestR.sh,v $
X# Revision 1.1  88/08/26  23:26:28  rick
X# Initial revision
X# 
X#
X
X#
X#	Pictures are:
X#
X#	ROTATE			0 90 180 270
X#	ROTATE+MIRROR		0 90 180 270
X#	ROTATE+CLIP		0 90 180 270
X#	ROTATE+MIRROR+CLIP	0 90 180 270
X#	ROTATE+CLIP+MIRROR	0 90 180 270
X#
Xp="-p5,7,11-15"
X
XY=50; X=2300; echo "\033*p${X}x${Y}YR\c"
XY=650; X=2300; echo "\033*p${X}x${Y}YRM\c"
XY=1250; X=2300; echo "\033*p${X}x${Y}YRC\c"
XY=1850; X=2300; echo "\033*p${X}x${Y}YRMC\c"
XY=2450; X=2300; echo "\033*p${X}x${Y}YRCM\c"
X
XY=0; X=0; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a0 -c -H $DEBUG $p sam_16.pic
XY=600; X=0; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a0 -c -i -H $DEBUG $p sam_16.pic
XY=1200; X=0; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a0 -c -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=1800; X=0; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a0 -c -i -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=2400; X=0; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a0 -c -l61 -r101 -t60 -b100 -i -H $DEBUG $p sam_16.pic
XY=2900; X=0; echo "\033*p${X}x${Y}YROTATE 0\c"
X
XY=0; X=600; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a90 -c -H $DEBUG $p sam_16.pic
XY=600; X=600; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a90 -c -i -H $DEBUG $p sam_16.pic
XY=1200; X=600; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a90 -c -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=1800; X=600; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a90 -c -i -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=2400; X=600; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a90 -c -l61 -r101 -t60 -b100 -i -H $DEBUG $p sam_16.pic
XY=2900; X=600; echo "\033*p${X}x${Y}YROTATE 90\c"
X
XY=0; X=1200; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a180 -c -H $DEBUG $p sam_16.pic
XY=600; X=1200; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a180 -c -i -H $DEBUG $p sam_16.pic
XY=1200; X=1200; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a180 -c -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=1800; X=1200; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a180 -c -i -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=2400; X=1200; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a180 -c -l61 -r101 -t60 -b100 -i -H $DEBUG $p sam_16.pic
XY=2900; X=1200; echo "\033*p${X}x${Y}YROTATE 180\c"
X
XY=0; X=1800; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a270 -c -H $DEBUG $p sam_16.pic
XY=600; X=1800; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a270 -c -i -H $DEBUG $p sam_16.pic
XY=1200; X=1800; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a270 -c -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=1800; X=1800; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a270 -c -i -l61 -r101 -t60 -b100 -H $DEBUG $p sam_16.pic
XY=2400; X=1800; echo "\033*p${X}x${Y}Y\c"
Xpcpaint -a270 -c -l61 -r101 -t60 -b100 -i -H $DEBUG $p sam_16.pic
XY=2900; X=1800; echo "\033*p${X}x${Y}YROTATE 270\c"
END_OF_FILE
if test 3040 -ne `wc -c <'bm/unittestR.sh'`; then
    echo shar: \"'bm/unittestR.sh'\" unpacked with wrong size!
fi
chmod +x 'bm/unittestR.sh'
# end of 'bm/unittestR.sh'
fi
if test -f 'bsd/jetroffBSD.sh' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bsd/jetroffBSD.sh'\"
else
echo shar: Extracting \"'bsd/jetroffBSD.sh'\" \(3975 characters\)
sed "s/^X//" >'bsd/jetroffBSD.sh' <<'END_OF_FILE'
X#!/bin/sh
X#/*c
X# *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X# *
X# *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X# *
X# *	This source code is supplied to you under the terms of the
X# *	contents of the "License" agreement found with this source
X# *	distribution.  You must read the "License" before you use
X# *	this source code in any way.
X# *
X#c*/
X
XJETSCAN=1
X
Xset X `getopt h?o:n:s:m:r:iqzaF:R:c:d:l:SbptegP4 $*`
Xif [ $? != 0 ]; then jetusage; exit 2; fi
Xshift
X
Xpiped=2
Xcat=
Xeqn=
Xpic=
Xgrap=
Xtbl=
Xbackup=
Xtroff="troff -Tjet"	# Troff command
Xtroff_opts=		# Troff options
Xdjet=djet		# djet postprocessor
Xdjet_opts=		# djet options
Xlp=lp			# line printer spooler
Xlp_opts=-otroff		# spooler options (raw output, no CR/NL mapping)
Xpid=$$
X
Xfor i in $*
Xdo
X	case $i in
X	-m)
X		if [ "Q$2" = Qanual ]
X		then
X			# Special help for -manual (PCR local)
X			if [ "Q$backup" != Q ]
X			then
X				djet_opts="$djet_opts -l2:14i";
X			fi
X			troff_opts="$troff_opts -rs1";
X		fi
X		troff_opts="$troff_opts $i$2";
X		shift;shift;
X		;;
X	-4)
X		# Special help for 4 on 1 output (PCR local)
X		djet_opts="$djet_opts -l1:14i";
X		backup="jetbackup -b";
X		shift;
X		;;
X	-o|-n|-s|-r)
X		troff_opts="$troff_opts $i$2"; shift;shift;;
X	-i|-q|-z)
X		troff_opts="$troff_opts $i"; shift;;
X	-a)
X		troff_opts="$troff_opts $i"; shift; djet=; lp=;;
X	-F)
X		troff_opts="$troff_opts $i$2";
X		djet_opts="$djet_opts $i$2/devjet";
X		shift;shift;;
X	-R|-c|-l)
X		djet_opts="$djet_opts $i$2"; shift;shift;;
X	-d)
X		if [ "Q$2" = Q- ]; then lp=;
X		else lp_opts="$lp_opts $i$2"; fi
X		shift;shift;;
X	-S)
X		djet_opts="$djet_opts $i"; shift;;
X	-b)
X		troff_opts="$troff_opts -mjetroff"; shift;;
X	-p)
X		pic=pic; cat=cat; shift;;
X	-e)
X		eqn=eqn; cat=cat; shift;;
X	-t)
X		tbl=tbl; cat=cat; shift;;
X	-g)
X		grap=grap; pic=pic; cat=cat; shift;;
X	-P)
X		piped=`expr $piped - 1`; shift;;
X	--)
X		shift; break;;
X	-h|-?)
X		jetusage; exit 0;;
X	esac
Xdone
Xfiles="$*"
X
Xif [ "Q$JETSCAN" = Q1 ]
Xthen
X	for i in `jetcheck $files`
X	do
X		case $i in
X		-p)
X			pic=pic; cat=cat;;
X		-e)
X			eqn=eqn; cat=cat;;
X		-t)
X			tbl=tbl; cat=cat;;
X		-g)
X			grap=grap; pic=pic; cat=cat;;
X		-b)
X			troff_opts="$troff_opts -mjetroff"; shift;;
X		esac
X	done
Xfi
X
Xcmd=
Xif [ $piped = 2 ]
Xthen
X	if [ "$cat" != "" ]; then cmd="$cat $files | "; files=; fi
X	if [ "$grap" != "" ]; then cmd="$cmd $grap | "; fi
X	if [ "$pic" != "" ]; then cmd="$cmd $pic | "; fi
X	if [ "$tbl" != "" ]; then cmd="$cmd $tbl | "; fi
X	if [ "$eqn" != "" ]; then cmd="$cmd $eqn | "; fi
X	cmd="$cmd $troff $troff_opts $files"
X	if [ "$djet" != "" ]; then cmd="$cmd | $djet $djet_opts"; fi
X	if [ "$backup" != "" ]; then cmd="$cmd | $backup"; fi
X	if [ "$lp" != "" ]; then cmd="$cmd | $lp $lp_opts"; fi
Xelse
X	if [ $piped = 0 ]; then pid=; fi
X	to=
X	fn=0
X	if [ "$cat" != "" ]; then cmd="$cat $files | "; files=; fi
X	if [ "$grap" != "" ]
X	then
X		if [ "$to" != "" ]; then ti="<$to"; else ti=; fi
X		fn=`expr $fn + 1`; to="/tmp/JET$pid.$fn"
X		cmd="$cmd $grap $ti >$to;";
X	fi
X	if [ "$pic" != "" ]
X	then
X		if [ "$to" != "" ]; then ti="<$to"; else ti=; fi
X		fn=`expr $fn + 1`; to="/tmp/JET$pid.$fn"
X		cmd="$cmd $pic $ti >$to;";
X	fi
X	if [ "$tbl" != "" ]
X	then
X		if [ "$to" != "" ]; then ti="<$to"; else ti=; fi
X		fn=`expr $fn + 1`; to="/tmp/JET$pid.$fn"
X		cmd="$cmd $tbl $ti >$to;";
X	fi
X	if [ "$eqn" != "" ]
X	then
X		if [ "$to" != "" ]; then ti="<$to"; else ti=; fi
X		fn=`expr $fn + 1`; to="/tmp/JET$pid.$fn"
X		cmd="$cmd $eqn $ti >$to;";
X	fi
X	if [ "$to" != "" ]; then ti="<$to"; else ti=; fi
X	fn=`expr $fn + 1`; to="/tmp/JET$pid.$fn"
X	cmd="$cmd $troff $troff_opts $files $ti >$to"
X	if [ "$djet" != "" ]
X	then
X		ti="<$to"
X		cmd="$cmd; $djet $djet_opts $ti"
X	fi
X	if [ "$backup" != "" ]; then cmd="$cmd | $backup"; fi
X	if [ "$lp" != "" ]; then cmd="$cmd | $lp $lp_opts"; fi
Xfi
Xeval $cmd
Xif [ $piped = 1 ]
Xthen
X	i=1
X	while [ $i -le $fn ]
X	do
X		rm /tmp/JET$pid.$i
X		i=`expr $i + 1`
X	done
Xfi
Xexit 0
X#	undocumented -P (and -P -P) option for 386/ix floating point
X#	bug (can't have two procs doing fp at same time).
END_OF_FILE
if test 3975 -ne `wc -c <'bsd/jetroffBSD.sh'`; then
    echo shar: \"'bsd/jetroffBSD.sh'\" unpacked with wrong size!
fi
chmod +x 'bsd/jetroffBSD.sh'
# end of 'bsd/jetroffBSD.sh'
fi
if test -f 'djet/arc.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'djet/arc.c'\"
else
echo shar: Extracting \"'djet/arc.c'\" \(4280 characters\)
sed "s/^X//" >'djet/arc.c' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
X/*
X * $Id: arc.c,v 1.1 88/08/26 23:10:44 rick Exp $
X *
X * $Log:	arc.c,v $
X * Revision 1.1  88/08/26  23:10:44  rick
X * Initial revision
X * 
X *
X */
X#ifndef lint
Xstatic char rcsid[] = "@(#) $Id: arc.c,v 1.1 88/08/26 23:10:44 rick Exp $";
X#endif
X
X#include <stdio.h>
X#include <math.h>
X#define sqr(x) (long int)(x)*(x)
X
X#ifndef M_PI
X#define	M_PI	3.1415926535
X#endif
X
Xdraw_circle(lcx, lcy, d)
X{
X	bres_circle(lcx + d/2, lcy, d/2);
X}
X
Xbres_circle(xc, yc, radius)
X{
X	register int	p, x, y;
X	
X	x = 0; y = radius; p = 3 - 2 * radius;
X	while (x < y)
X	{
X		circle_points(xc, yc, x, y);
X		if (p < 0)
X			p += (x<<2) + 6;
X		else
X		{
X			p += (x - y)*4 + 10;
X			--y;
X		}
X		++x;
X	}
X	if (x == y)
X		circle_points(xc, yc, x, y);
X}
Xcircle_points(xc, yc, x, y)
Xregister int xc, yc, x, y;
X{
X	draw_point(xc+x, yc+y);
X	draw_point(xc-x, yc+y);
X	draw_point(xc+x, yc-y);
X	draw_point(xc-x, yc-y);
X	draw_point(xc+y, yc+x);
X	draw_point(xc-y, yc+x);
X	draw_point(xc+y, yc-x);
X	draw_point(xc-y, yc-x);
X}
X
Xaken_ellipse(xc, yc, a0, b0)
Xint	xc;
Xint	yc;
Xint	a0;	/* x direction radius */
Xint	b0;	/* y direction radius */
X{
X	register int	x = 0;
X	register int	y = b0;
X	long		a = a0;
X	long		b = b0;
X	long		Asq = a*a;
X	long		twoAsq = 2 * Asq;
X	long		Bsq = b*b;
X	long		twoBsq = 2 * Bsq;
X	long		d;
X	long		dx, dy;
X
X#	if 1
X		(void) fprintf(stderr, "Ellipse (%d,%d) at (%d,%d)\n",
X			a0, b0, xc, yc);
X#	endif
X
X	d = Bsq - Asq*b + Asq/4L;
X	dx = 0;
X	dy = twoAsq * b;
X	while (dx < dy)
X	{
X		ellipse_points(xc, yc, x, y);
X		if (d > 0L)
X		{
X			--y;
X			dy -= twoAsq;
X			d -= dy;
X		}
X		++x;
X		dx += twoBsq;
X		d += Bsq + dx;
X	}
X	d += (3L*(Asq-Bsq)/2L - (dx+dy)) / 2L;
X	while (y >= 0)
X	{
X		ellipse_points(xc, yc, x, y);
X		if (d < 0L)
X		{
X			++x;
X			dx += twoBsq;
X			d += dx;
X		}
X		--y;
X		dy -= twoAsq;
X		d += Asq - dy;
X	}
X}
Xellipse_points(xc, yc, x, y)
Xregister int xc, yc, x, y;
X{
X	draw_point(xc+x, yc+y);
X	draw_point(xc-x, yc+y);
X	draw_point(xc+x, yc-y);
X	draw_point(xc-x, yc-y);
X}
X
Xdraw_ellipse(lcx, lcy, a, b)
X{
X	aken_ellipse(lcx + a/2, lcy, a/2, b/2);
X}
X
Xdraw_arc(xs, ys, dx1, dy1, dx2, dy2)
X{
X#	if 0
X		(void) fprintf(stderr, "draw-arc (%d,%d) (%d,%d) (%d,%d)\n",
X			xs, ys, dx1, dy1, dx2, dy2);
X#	endif
X	arc(xs, ys, xs+dx1+dx2, ys+dy1+dy2, xs+dx1, ys+dy1);
X}
X
Xdouble	arc_start;
Xdouble	arc_end;
X
X/*
X *	FIXME: Slow algorithm
X */
Xarc(xs, ys, xe, ye, xc, yc)
Xint xs, ys, xe, ye, xc, yc;
X{
X	register int	p, x, y;
X	int x0s, y0s, x0e, y0e;
X	int radius;
X	double	t;
X
X#	if 0
X		(void) fprintf(stderr, "arc (%d,%d) --> (%d,%d) . (%d,%d)\n",
X			xs, ys, xe, ye, xc, yc);
X#	endif
X	x0s = xs - xc;
X	y0s = -(ys - yc);	/* ljet Y coords are upside down */
X	x0e = xe - xc;
X	y0e = -(ye - yc);	/* ljet Y coords are upside down */
X	radius = sqrt( (double) x0s*x0s + (double) y0s *y0s) + .5;
X	arc_start = atan2( (double) y0s, (double) x0s );
X	arc_end = atan2( (double) y0e, (double) x0e );
X	if (arc_start < 0) arc_start += M_PI * 2;
X	if (arc_end < 0) arc_end += M_PI * 2;
X	if (arc_start > arc_end)
X		{ t = arc_start;  arc_start = arc_end; arc_end = t; }
X#	if 0
X		(void) fprintf(stderr, "start %f end %f\n",
X			arc_start*360/(M_PI*2), arc_end*360/(M_PI*2));
X#	endif
X	
X	x = 0; y = radius; p = 3 - 2 * radius;
X	while (x < y)
X	{
X		arc_points(xc, yc, x, y);
X		if (p < 0)
X			p += (x<<2) + 6;
X		else
X		{
X			p += (x - y)*4 + 10;
X			--y;
X		}
X		++x;
X	}
X	if (x == y)
X		arc_points(xc, yc, x, y);
X}
Xarc_points(xc, yc, x, y)
Xregister int x, y;
Xregister int xc, yc;
X{
X	if (in_arc(x, y)) draw_point(xc+x, yc+y);
X	if (in_arc(-x, y)) draw_point(xc-x, yc+y);
X	if (in_arc(x, -y)) draw_point(xc+x, yc-y);
X	if (in_arc(-x, -y)) draw_point(xc-x, yc-y);
X	if (in_arc(y, x)) draw_point(xc+y, yc+x);
X	if (in_arc(-y, x)) draw_point(xc-y, yc+x);
X	if (in_arc(y, -x)) draw_point(xc+y, yc-x);
X	if (in_arc(-y, -x)) draw_point(xc-y, yc-x);
X}
X
Xin_arc(x, y)
X{
X	double a;
X	/* ljet coords are upside down */
X	a = atan2( (double) -y, (double) x );
X	if (a < 0) a += M_PI * 2;
X	if (a >= arc_start && a <= arc_end)
X		return 1;
X	else
X		return 0;
X}
END_OF_FILE
if test 4280 -ne `wc -c <'djet/arc.c'`; then
    echo shar: \"'djet/arc.c'\" unpacked with wrong size!
fi
# end of 'djet/arc.c'
fi
if test -f 'djet/bitmap.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'djet/bitmap.c'\"
else
echo shar: Extracting \"'djet/bitmap.c'\" \(2984 characters\)
sed "s/^X//" >'djet/bitmap.c' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
X/*
X * $Id: bitmap.c,v 1.1 88/08/26 23:10:49 rick Exp $
X *
X * $Log:	bitmap.c,v $
X * Revision 1.1  88/08/26  23:10:49  rick
X * Initial revision
X * 
X */
X#ifndef lint
Xstatic char rcsid[] = "@(#) $Id: bitmap.c,v 1.1 88/08/26 23:10:49 rick Exp $";
X#endif
X
X#include <stdio.h>
X#include "dlj.h"
X
X/*
X *	[itmap] file type res just bitx bity
X */
Xbitmap()
X{
X	register int	c;
X	char		file[256];
X	char		type[64];
X	char		buf[16];
X	int		res;
X	char		just[8];
X	int		bitx;
X	int		bity;
X	int		bm_width, bm_height;
X
X	while ( (c = getchar()) != EOF && c != ' ')
X		;
X	(void) get_qarg(file, sizeof(file));
X	(void) get_qarg(type, sizeof(type));
X	(void) get_qarg(buf, sizeof(buf)); res = atoi(buf);
X	(void) get_qarg(just, sizeof(just));
X	(void) get_qarg(buf, sizeof(buf)); bitx = atoi(buf);
X	(void) get_qarg(buf, sizeof(buf)); bity = atoi(buf);
X
X	if (res <= 0) res = 300;
X
X	esc("*t%dR", res);
X
X	if (strcmp(type, "test") == 0)
X	{
X		(void) sscanf(file, "%dx%d", &bm_width, &bm_height);
X
X		if (Landscape) hp_pos(bitx+bm_width, bity);
X		else hp_pos(bitx, bity);
X
X		esc("*c%da%db%dg2P", bm_width*300/res, bm_height*300/res, 20);
X	}
X	else
X	{
X		FILE		*fp;
X		char		*p;
X		int		bm_bwidth;
X		register int	x, y;
X		extern FILE	*popen();
X
X		p = (char *) Malloc((unsigned) strlen(type)+strlen(file)+16, 0);
X		if (!p)
X			error(1, "can't get space for bitmap file name");
X		if (Landscape)
X			Sprintf(p, "%s -a90 %s", type, file);
X		else
X			Sprintf(p, "%s %s", type, file);
X		fp = popen(p, "r");
X		if (!fp)
X			error(0, "I don't know '%s' bitmap format\n", type);
X
X		bm_width = getw(fp);
X		bm_height = getw(fp);
X		bm_bwidth = (bm_width + 7) / 8;
X
X		if (Landscape)
X			hp_pos(bitx+bm_height, bity);
X		else
X			hp_pos(bitx, bity);
X
X		esc("*r1A");
X		for (y = 0; y < bm_height; ++y)
X		{
X			esc("*b%dW", bm_bwidth);
X			for (x = 0; x < bm_bwidth; ++x)
X				(void) putchar(getc(fp));
X		}
X		esc("*rB");
X		(void) pclose(fp);
X		Free(p);
X	}
X
X	hp_is_at(-30000, -30000);
X	esc("*t300R");
X	if (debug)
X		Fprintf(stderr, "bitmap at (%d,%d) troff at (%d,%d)\n",
X			bitx, bity, TroffX, TroffY);
X}
X
Xget_qarg(buf, n)
Xchar	*buf;
X{
X	register char	*p = buf;
X	register int	c;
X
X	buf[0] = 0;
X	while ( (c = getchar()) != EOF && c == ' ')
X		;
X	if (c == EOF) return 0;
X	if (c == '\n')
X	{
X		(void) ungetc(c, stdin);
X		return 0;
X	}
X	if (c == '"')
X	{
X		while ( (c = getchar()) != EOF && c != '"' && c != '\n')
X			if ( (p-buf) < n)
X				*p++ = c;
X		if (c == '\n')
X			(void) ungetc(c, stdin);
X		*p++ = 0;
X		return (1);
X	}
X	else
X	{
X		*p++ = c;
X		while ( (c = getchar()) != EOF && c != ' ' && c != '\n')
X			if ( (p-buf) < n)
X				*p++ = c;
X		if (c == '\n')
X			(void) ungetc(c, stdin);
X		*p++ = 0;
X		return (1);
X	}
X}
END_OF_FILE
if test 2984 -ne `wc -c <'djet/bitmap.c'`; then
    echo shar: \"'djet/bitmap.c'\" unpacked with wrong size!
fi
# end of 'djet/bitmap.c'
fi
if test -f 'djet/dlj.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'djet/dlj.h'\"
else
echo shar: Extracting \"'djet/dlj.h'\" \(3754 characters\)
sed "s/^X//" >'djet/dlj.h' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
X/*
X * $Id: dlj.h,v 1.1 88/08/26 23:10:54 rick Exp $
X *
X * $Log:	dlj.h,v $
X * Revision 1.1  88/08/26  23:10:54  rick
X * Initial revision
X * 
X */
X
X#ifndef EXTERN
X#define EXTERN extern
X#endif
X
Xtypedef unsigned char	uchar;
Xextern char		*malloc();
Xextern void		free();
Xextern void		exit();
Xextern void		*Malloc();
Xextern void		Free();
Xextern char		*getenv();
X
X#define	Fprintf		(void)fprintf
X#define	Printf		(void)printf
X#define	Sprintf		(void)sprintf
X#define	Strcpy		(void)strcpy
X
XEXTERN	char	*argv0;
XEXTERN	int	debug;
X
X#ifdef COMMERCIAL
XEXTERN	int	demo;
X#endif
X
XEXTERN	char	FontDir[128];	/* Path for Font description files */
XEXTERN	char	RastDir[128];	/* Path for packed raster files */
X
XEXTERN	int	LineNumber;	/* Current input Line Number */
XEXTERN	int	PointSize;	/* From 's' command */
XEXTERN	int	FontNumber;	/* From 'f' command */
XEXTERN	int	TroffX;		/* Troff's current X position */
XEXTERN	int	TroffY;		/* Troff's current X position */
XEXTERN	int	PageNumber;	/* Current page number */
X
XEXTERN	int	Copies;		/* Number of copies of each page */
XEXTERN	int	Landscape;	/* Printing in landscape */
XEXTERN	int	LandPages;	/* Number of side-by-side pages */
XEXTERN	int	LandWidth;	/* Width of landscape paper */
XEXTERN	int	LandOffset;	/* Current X offset */
XEXTERN	int	LandPageNumber;	/* Current logical page (modulo LandPages) */
X
X/*
X *	Stuff associated with TROFF DESC.out and FONT.out files
X */
X
Xtypedef struct tdev
X{	/* characteristics of a typsetter */
X      unsigned  short filesize;	/* number of bytes in file, */
X				/* excluding dev part */
X	short	res;		/* basic resolution in goobies/inch */
X	short	hor;		/* goobies horizontally */
X	short	vert;
X	short	unitwidth;	/* size at which widths are given, in effect */
X	short	nfonts;		/* number of fonts physically available */
X	short	nsizes;		/* number of sizes it has */
X	short	sizescale;	/* scaling for fractional point sizes */
X	short	paperwidth;	/* max line length in units */
X	short	paperlength;	/* max paper length in units */
X	short	nchtab;		/* number of funny names in chtab */
X	short	lchname;	/* length of chname table */
X	short	biggestfont;	/* */
X	short	spare2;
X} DEVICE;
X
Xtypedef struct tfont
X{	/* characteristics of a font */
X	uchar	nwfont;		/* number of width entries for this font */
X	char	specfont;	/* 1 == special font */
X	char	ligfont;	/* 1 == ligatures exist on this font */
X	char	spare1;		/* unused for now */
X	char	namefont[10];	/* name of this font (e.g., "R" */
X	char	intname[10];	/* internal name on device, in ascii */
X} FONT;
X
X/* ligatures, ORed into ligfont */
X
X#define	LFF	01
X#define	LFI	02
X#define	LFL	04
X#define	LFFI	010
X#define	LFFL	020
X
X
XEXTERN	DEVICE	DESC_dev;		/* Device Structure in DESC.out */
XEXTERN	short	*DESC_sizes;		/* List of point sizes */
XEXTERN	short	*DESC_funny_index;
XEXTERN	char	*DESC_funny_names;
X
X#define	NFONT	32		/* Number of Font Names allowed */
X#define	NSIZES	32		/* Number of Font Sizes allowed */
X
Xtypedef struct 
X{
X	FONT	*font_info;	/* Malloc'd pointer to font information */
X	uchar	*width_table;
X	uchar	*kern_table;
X	uchar	*code_table;
X	uchar	*font_index;
X	char	tex_name[15];
X	short	sizes[NSIZES];	/* Sizes available in this font */
X	short	id[NSIZES];	/* Raster id (pk.c) for font/size combo */
X} FONTFILE;
XEXTERN	FONTFILE	Font[NFONT];	/* Info About a font */
XEXTERN	short		FontMap[NFONT];
X				/* Index from font position into font[] */
XEXTERN	short		NFont;	/* Number which have been read in */
END_OF_FILE
if test 3754 -ne `wc -c <'djet/dlj.h'`; then
    echo shar: \"'djet/dlj.h'\" unpacked with wrong size!
fi
# end of 'djet/dlj.h'
fi
if test -f 'djet/main.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'djet/main.c'\"
else
echo shar: Extracting \"'djet/main.c'\" \(2778 characters\)
sed "s/^X//" >'djet/main.c' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
X#ifndef lint
Xstatic char	Copyright[] =
X"@(#) JetRoff (c) Copyright 1988 PC Research, Inc.  All Rights Reserved.";
X#endif
X
X/*
X * $Id: main.c,v 1.1 88/08/26 23:11:03 rick Exp $
X *
X * $Log:	main.c,v $
X * Revision 1.1  88/08/26  23:11:03  rick
X * Initial revision
X * 
X */
X#ifndef lint
Xstatic char rcsid[] = "@(#) $Id: main.c,v 1.1 88/08/26 23:11:03 rick Exp $";
X#endif
X
X#include <stdio.h>
X#include <string.h>
X
X#define EXTERN
X#include "dlj.h"
X#include "paths.h"
X
Xmain(argc, argv)
Xint	argc;
Xchar	*argv[];
X{
X	register int	c;
X	register char	*p;
X	int		getopt();
X	long		atol();
X	double		atof();
X	extern int	optind;
X	extern char	*optarg;
X	int		Statistics = 0;
X
X#	ifdef COMMERCIAL
X		int		CopyRight = 0;
X#	endif
X
X	argv0 = argv[0];
X
X	Strcpy(FontDir, FONTDIR); if (p = getenv(FONTENV)) Strcpy(FontDir, p);
X	Strcpy(RastDir, RASTDIR); if (p = getenv(RASTENV)) Strcpy(RastDir, p);
X
X	Copies = 1;
X	Landscape = 0;
X#	ifdef COMMERCIAL
X		demo = 1;
X#	endif
X	while ( (c = getopt(argc, argv, "l:I:CSc:F:R:d")) != EOF)
X	{
X		switch (c)
X		{
X		case 'I':
X#			ifdef COMMERCIAL
X				set_code(atol(optarg));
X#			endif
X			exit(0);
X			break;
X		case 'C':
X#			ifdef COMMERCIAL
X				CopyRight = 0;
X#			endif
X			break;
X		case 'c':
X			Copies = atoi(optarg);
X			if (Copies < 1) Copies = 1;
X			else if (Copies > 99) Copies = 99;
X			break;
X		case 'd':
X			debug = 1;
X			break;
X		case 'F':
X			Strcpy(FontDir, optarg);
X			break;
X		case 'R':
X			Strcpy(RastDir, optarg);
X			break;
X		case 'S':
X			Statistics = 1;
X			break;
X		case 'l':
X			Landscape = 1;
X			LandWidth = 11 * 300;
X			LandPages = atoi(optarg);
X			if (LandPages < 1) LandPages = 1;
X			if (LandPages > 2) LandPages = 2;
X			p = strchr(optarg, ':');
X			if (p)
X			{
X				double	x;
X				++p;
X				x = atof(p);
X				if (strchr(p, 'd')) LandWidth = x*300/720;
X				else if (strchr(p, 'p')) LandWidth = x*300/72;
X				else LandWidth = x * 300;
X			}
X			break;
X		default:
X			usage();
X			break;
X		}
X	}
X
X#	ifdef	COMMERCIAL
X		demo = demo_version();
X		if (CopyRight || demo)
X			copyright();
X#	endif
X
X	convert();
X	if (Statistics)
X	{
X		extern int npk, pk_downbytes;
X
X		Fprintf(stderr, "%d Fonts downloaded\n", npk);
X		Fprintf(stderr, "%d Glyph bytes downloaded\n", pk_downbytes);
X		Fprintf(stderr, "%d Lines read from troff\n", LineNumber);
X		Fprintf(stderr, "%d Pages printed\n", PageNumber);
X	}
X	exit(0);
X	/* NOTREACHED */
X}
X
Xusage()
X{
X	Fprintf(stderr, "Usage:	%s [-d] <troff.out >hplj.in\n", argv0);
X	exit(1);
X	/* NOTREACHED */
X}
END_OF_FILE
if test 2778 -ne `wc -c <'djet/main.c'`; then
    echo shar: \"'djet/main.c'\" unpacked with wrong size!
fi
# end of 'djet/main.c'
fi
if test -f 'djet/makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'djet/makefile'\"
else
echo shar: Extracting \"'djet/makefile'\" \(2897 characters\)
sed "s/^X//" >'djet/makefile' <<'END_OF_FILE'
X#
X# $Id: makefile,v 1.1 88/08/26 23:11:10 rick Exp $
X#
X#	Build:
X#		djet:		Postprocessor
X#		jetroff_bm:	Bitmap includer
X#		jetcheck:	Preprocessor scanner
X#		jetbackup:	Four on One postprocessor
X#
X#	Compile options:
X#		ERR_ARRAY_TOO_LARGE	(AT&T 286 SGS bug)
X#		ERR_SEG_OVERWRITE	(AT&T 286 SGS bug)
X#		SERIES=1		(Old HP printers)
X#		COMMERCIAL		(Serial number verify)
X#
XSHELL=/bin/sh
XBIN=/usr/local/bin
XBIN=/usr/bin
X
X#
X#	Select HP LaserJet series number (series 1 is untested!)
X#
XSERIES=-DSERIES=1
XSERIES=-DSERIES=2
X
X#
X#	UNIX Version options.  Put the set you use LAST
X#
X
X#	For BSD
XCFLAGS=-O -I../bsd $(SERIES)
XLFLAGS=../bsd/bsd.a
X
X#	For AT&T 286 SGS:
XCFLAGS=-O -Ml -DERR_ARRAY_TOO_LARGE -DERR_SEG_OVERWRITE $(SERIES)
XLFLAGS=
X
X#	For normal system V.3
XCFLAGS=-O $(SERIES)
XLFLAGS=
X
X#
X#	Various lists.  You shouldn't need to change from here on down
X#
X
X# Always use 16, other version is outdated
XSIXTEEN=16
XHDRS=		dlj.h draw.h lj.h paths.h
XSRC_PK=		pk$(SIXTEEN).c
XSRC_VERIFY=	verify.c
XSRC_VERIFY=
XSRC_COM=	main.c error.c convert.c out.c device.c $(SRC_VERIFY) $(SRC_PK)
XSRC_DEMO=	$(SRC_COM) stubs.c
XSRC_FULL=	$(SRC_COM) arc.c line.c spline.c bitmap.c draw.c
XSRC_ALL=	$(SRC_COM) arc.c line.c spline.c bitmap.c draw.c \
X		pk.c pk16.c stubs.c
XEXTRA=		license makefile jetroff.sh tmac.jetroff \
X		jetroff_bm.c jetcheck.c jetbackup.c
X
XOBJ_PK=		pk$(SIXTEEN).o
XOBJ_VERIFY=	verify.o
XOBJ_VERIFY=
XOBJ_COM=	main.o error.o convert.o out.o device.o $(OBJ_PK)
XOBJ_DEMO=	$(OBJ_COM) stubs.o
XOBJ_FULL=	$(OBJ_COM) arc.o line.o spline.o bitmap.o draw.o
X
XDEMOJET=	demojet
XDEMOJET=
XPROGS= 		djet jetroff_bm jetcheck jetbackup $(DEMOJET)
X
Xall:	djet jetroff_bm jetcheck jetbackup
X
Xshowpk: pk.c
X	$(CC) -DUNIT_TEST pk.c -o $@
X
Xjetroff_bm: jetroff_bm.c error.o
X	$(CC) $(CFLAGS) jetroff_bm.c error.o $(LFLAGS) -o $@
X
Xjetcheck: jetcheck.c
X	$(CC) $(CFLAGS) jetcheck.c $(LFLAGS) -o $@
X
Xjetbackup: jetbackup.c
X	$(CC) $(CFLAGS) jetbackup.c $(LFLAGS) -o $@
X
Xdjet:	$(OBJ_FULL)
X	$(CC) $(CFLAGS) $(OBJ_FULL) -lm $(LFLAGS) -o $@
X
Xdemojet: $(OBJ_DEMO)
X	$(CC) $(CFLAGS) $(OBJ_DEMO) -lm $(LFLAGS) -o $@
X
Xverify: verify.c
X	$(CC) -DUNIT_TEST verify.c $(LFLAGS) -o verify
X
Xinstall:	all
X	strip djet jetcheck jetroff_bm jetbackup
X	cp djet jetcheck jetroff_bm jetbackup $(BIN)
X	cp jetroff.sh $(BIN)/jetroff
X	cp tmac.jetroff /usr/lib/tmac/tmac.jetroff
X
Xclean:
X	-rm -f *.o
X
Xclobber: clean
X	-rm -f $(PROGS)
X
Xlint:
X	lint	$(SRC_FULL) -lc -lm >lint.out 2>&1
X	echo	"******** OK, now let's get brutal with -p *********" >>lint.out
X	lint	-p $(SRC_FULL) -lc -lm >>lint.out 2>&1
X	echo	"******* Hah! I'll bet you thought it'd pass *******" >>lint.out
X
Xdjet.cpio:	$(EXTRA) $(HDRS) $(SRC_ALL)
X	/bin/ls $(EXTRA) $(HDRS) $(SRC_ALL) | afio -o $@
X
Xconvert.o:	dlj.h
Xdevice.o:	dlj.h
Xdraw.o:		dlj.h
Xerror.o:	dlj.h
Xline.o:		dlj.h
Xmain.o:		dlj.h
Xout.o:		dlj.h
X
Xdevice.o:	paths.h
Xmain.o:		paths.h
Xpk.o:		paths.h
Xpk16.o:		paths.h
X
Xdraw.o:		draw.h
X
Xpk.o:		lj.h
Xpk16.o:		lj.h
END_OF_FILE
if test 2897 -ne `wc -c <'djet/makefile'`; then
    echo shar: \"'djet/makefile'\" unpacked with wrong size!
fi
# end of 'djet/makefile'
fi
if test -f 'djet/out.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'djet/out.c'\"
else
echo shar: Extracting \"'djet/out.c'\" \(3493 characters\)
sed "s/^X//" >'djet/out.c' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
X/*
X * $Id: out.c,v 1.1 88/08/26 23:11:04 rick Exp $
X *
X * $Log:	out.c,v $
X * Revision 1.1  88/08/26  23:11:04  rick
X * Initial revision
X * 
X */
X#ifndef lint
Xstatic char rcsid[] = "@(#) $Id: out.c,v 1.1 88/08/26 23:11:04 rick Exp $";
X#endif
X
X#include <stdio.h>
X#include <varargs.h>
X#include "dlj.h"
X
X/* VARARGS */
Xesc(va_alist)
Xva_dcl
X{
X	va_list		args;
X	register char	*fmt;
X
X	va_start(args);
X#	if lint			/* Lint bitches here, don't know why */
X		fmt = "";
X#	else
X		fmt = va_arg(args, char *);
X#	endif
X	(void) putchar('\033');
X	(void) vprintf(fmt, args);
X	va_end(args);
X}
X
X/*
X *	hp_is_at(x, y)
X *	best_way_there(buf, here, there)
X *	hp_pos(x, y)
X *
X *		HP movement.
X *		If -DSERIES=1, use decipoint positioning, else use dots.
X */
Xstatic int hpx;
Xstatic int hpy;
X
Xhp_is_at(x, y)
X{
X	hpx = x + LandOffset;
X	hpy = y;
X}
X
X#define abs(x)	(((x) >= 0) ? (x) : -(x))
X
Xchar *best_way_there(buf, here, there)
Xchar	*buf;
Xint	here;
Xregister int there;
X{
X	int		therelen;
X	register int	delta = there - here;
X	register int	deltalen;
X
X#	if SERIES == 1
X		here *= 12; here /= 5;
X		there *= 12; there /= 5;
X#	endif
X	if (there >= 1000) therelen = 4;
X	else if (there >= 100) therelen = 3;
X	else if (there >= 10) therelen = 2;
X	else therelen = 1;
X	if (abs(delta) >= 1000) deltalen = 5;
X	else if (abs(delta) >= 100) deltalen = 4;
X	else if (abs(delta) >= 10) deltalen = 3;
X	else deltalen = 2;
X	if (therelen <= deltalen)
X		Sprintf(buf, "%d", there);
X	else if (delta >= 0)
X		Sprintf(buf, "+%d", delta);
X	else
X		Sprintf(buf, "%d", delta);
X	return (buf);
X}
X
Xhp_pos(x, y)
X{
X	static char	bufx[12];
X	static char	bufy[12];
X
X	if (debug)
X		if (LandOffset)
X			Fprintf(stderr, "Moving from (%d, %d) to (%d+%d, %d)\n",
X				hpx, hpy, x, LandOffset, y);
X		else
X			Fprintf(stderr, "Moving from (%d, %d) to (%d, %d)\n",
X				hpx, hpy, x, y);
X
X	x += LandOffset;
X
X	if (x == hpx)
X	{
X		if (y == hpy) return;
X#		if SERIES == 1
X			Printf("\033*p%sV", best_way_there(bufy, hpy, y));
X#		else
X			Printf("\033*p%sY", best_way_there(bufy, hpy, y));
X#		endif
X	}
X	else if (y == hpy)
X	{
X#		if SERIES == 1
X			Printf("\033*p%sH", best_way_there(bufx, hpx, x));
X#		else
X			Printf("\033*p%sX", best_way_there(bufx, hpx, x));
X#		endif
X	}
X	else
X	{
X#		if SERIES == 1
X			Printf("\033*p%sh%sV",
X				best_way_there(bufx, hpx, x),
X				best_way_there(bufy, hpy, y));
X#		else
X			Printf("\033*p%sx%sY",
X				best_way_there(bufx, hpx, x),
X				best_way_there(bufy, hpy, y));
X#		endif
X	}
X	hpx = x;
X	hpy = y;
X}
X
X/*
Xputshort(s, fp)
Xunsigned short s;
XFILE	*fp;
X{
X	(void) putc(s>>8, fp);
X	(void) putc(s, fp);
X}
X*/
X
Xhp_init()
X{
X	esc("*c0F");	/* delete all soft fonts */
X	esc("*c1F");	/* delete temporary soft fonts */
X
X	/*
X	 *	0o - portrait
X	 *	1o - landscape
X	 *	6d - 6 lines/inch
X	 *	0l - no perf skip (1l is perf skip)
X	 *	66p - 66 lines/page
X	 *	0e - 0 lines top margin
X	 *	66f - 66 lines text
X	 *	Nx - N copies
X	 *	1h - feed from tray
X	 */
X	if (Landscape)
X	{
X		if (LandWidth == 14*300)
X		{	/* Legal, landscape */
X			esc("&l3a6d84p84f1o6dle%dx2H", Copies);
X		}
X		else
X			esc("&l1o6dl66pe66f%dx1H", Copies);
X	}
X	else
X		esc("&l0o6dl66pe66f%dx1H", Copies);
X	esc("*t300R");
X	hp_is_at(-30000, -30000);	/* No idea */
X}
END_OF_FILE
if test 3493 -ne `wc -c <'djet/out.c'`; then
    echo shar: \"'djet/out.c'\" unpacked with wrong size!
fi
# end of 'djet/out.c'
fi
if test -f 'djet/verify.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'djet/verify.c'\"
else
echo shar: Extracting \"'djet/verify.c'\" \(3219 characters\)
sed "s/^X//" >'djet/verify.c' <<'END_OF_FILE'
X/*c
X *	JetRoff - DWB 2.0 postprocessor for HP LaserJet Series II
X *
X *	Copyright (c) 1988 PC Research, Inc.  All Rights Reserved.
X *
X *	This source code is supplied to you under the terms of the
X *	contents of the "License" agreement found with this source
X *	distribution.  You must read the "License" before you use
X *	this source code in any way.
X *
Xc*/
X
X/*
X * $Id: verify.c,v 1.1 88/08/26 23:11:08 rick Exp $
X *
X * $Log:	verify.c,v $
X * Revision 1.1  88/08/26  23:11:08  rick
X * Initial revision
X * 
X */
X#ifndef lint
Xstatic char rcsid[] = "@(#) $Id: verify.c,v 1.1 88/08/26 23:11:08 rick Exp $";
X#endif
X
X#include <stdio.h>
X#include <sys/utsname.h>
X#include "dlj.h"
X
X#define	BAD_CODE	99999L
X#define	GOOD_CODE	66666L
X
X#ifndef UNIT_TEST
Xdemo_notice()
X{
X	hp_is_at(-30000, -30000); hp_pos(70, 100);
X	Printf(
X"djet demonstrator.  Licensing info available from uunet!pcrat!jetroff,  or:");
X	hp_is_at(-30000, -30000); hp_pos(70, 140);
X	Printf(
X"PC Research, Inc. 94 Apple Orchard Dr., Tinton Falls, NJ 07724 (201) 389-8963.");
X}
X
Xlong get_code()
X{
X	FILE	*fp;
X	long	code;
X	char	buf[256];
X
X	Sprintf(buf, "%s/install.code", FontDir);
X	fp = fopen(buf, "r");
X	if (!fp) return (BAD_CODE);
X	if (fscanf(fp, "%ld", &code) != 1) return (BAD_CODE);
X	(void) fclose(fp);
X	return (code);
X}
X
Xset_code(code)
Xlong	code;
X{
X	FILE	*fp;
X	char	buf[256];
X
X	Sprintf(buf, "%s/install.code", FontDir);
X	fp = fopen(buf, "w");
X	if (!fp) error(1, "Install failed: Couldn't open %s", buf);
X	Fprintf(fp, "%ld\n", code);
X	(void) fclose(fp);
X}
X
X#	ifdef lint /* GAK! <utsname.h> has extern struct utsname utsname; */
X		struct utsname utsname;
X#	endif
X
Xdemo_version()
X{
X	struct utsname u;
X	long	got;
X	long	verify();
X
X#	ifdef lint /* GAK! <utsname.h> has extern struct utsname utsname; */
X		u = utsname;
X#	endif
X
X	if (uname(&u) < 0) return 1;
X	got = get_code();
X	if (got == GOOD_CODE) return 0;
X	if (verify(u.nodename) == got) return 0;
X	if (verify(u.sysname) == got) return 0;
X
X	return 1;
X}
X
Xcopyright()
X{
X	Fprintf(stderr,
X"jetroff Version 1.4 (08/24/88) -- ditroff to HP LaserJet Series II\n");
X	Fprintf(stderr,
X"(c) Copyright 1988 by PC Research, Inc. All Rights Reserved.\n");
X	if (demo)
X		bitch();
X}
X
Xstatic char msg[] = "\
XPlease type:\n\
X	djet -I<code>\n\
XWhere '<code>' is the installation number for your license.\n\
XUntil you do this, your output will be marked 'demonstration version'.\n\
X\n\
XIf your site name has changed, or you'd like to purchase a license,\n\
Xplease contact:\n\
X	PC Research, Inc.\n\
X	94 Apple Orchard Drive\n\
X	Tinton Falls, NJ   07724\n\
X	(201) 389-8963\n\
X\n\
XLicenses are available starting at $50 per computer.\n\
X";
X
Xbitch()
X{
X	struct utsname u;
X	(void) uname(&u);
X	Fprintf(stderr, "\nInstallation code '%ld' incorrect for site '%s'.\n",
X		get_code(), u.nodename);
X	Fprintf(stderr, msg);
X}
X#endif
X
Xlong verify(s)
Xchar	*s;
X{
X	register long sum;
X	register char	*p;
X
X	for (sum = 0, p = s; *p; ++p)
X		sum = (sum<<2) + *p;
X	return (sum & 65535L);
X}
X
X#ifdef UNIT_TEST
Xint demo;
Xerror(){}
Xmain(argc, argv)
Xchar	*argv[];
X{
X	struct utsname u;
X	char	buf[256];
X
X	Printf("Verify code for '%s' = %ld\n", argv[1], verify(argv[1]) );
X	(void) uname(&u);
X	Printf("Verify code for '%s' = %ld\n", u.nodename, verify(u.nodename) );
X}
X#endif
END_OF_FILE
if test 3219 -ne `wc -c <'djet/verify.c'`; then
    echo shar: \"'djet/verify.c'\" unpacked with wrong size!
fi
# end of 'djet/verify.c'
fi
if test -f 'doc/djet.mm' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'doc/djet.mm'\"
else
echo shar: Extracting \"'doc/djet.mm'\" \(4164 characters\)
sed "s/^X//" >'doc/djet.mm' <<'END_OF_FILE'
X.ds HF 3 3 3
X.ds HP 10 10 10
X.PH "''\f(HB\s(24\(rh JetRoff Low Cost UNIX Typesetting \(lh\s(10\fP''"
X.PF "''\fI\s7* Price comparisons based on UNIX System V/386. Other systems may cost more.\s0''"
X.EF "''\fBPC Research, Inc. \(ob 94 Apple Orchard Drive \(ob Tinton Falls, NJ 07724 \(ob (201) 389-8963\fP''"
X.OF "''\fBPC Research, Inc. \(ob 94 Apple Orchard Drive \(ob Tinton Falls, NJ 07724 \(ob (201) 389-8963\fP''"
X.ds jr \fIJetRoff\fP
X.P
X\fBJetRoff\fP is the missing link between AT&T's Documenter's Workbench\(tm
X(DWB)
Xrelease 2.0 and your \fBHP LaserJet Series II\fP printer.
XDWB 2.0 is one of the most
Xpowerful publishing systems available today.  But DWB 2.0 only comes standard
Xwith support for very expensive typesetters.
X\*(jr converts the device independent output of DWB 2.0 into the specific
Xcommands and fonts for the LaserJet.
X.P
XNow you can produce professional quality publications at a price you can afford.
XBuy AT&T's DWB 2.0 from your UNIX\(tm vendor for around $200.
XAnd buy \*(jr from us for \fB$100\fP.
XNo expensive font cartridges are necessary; \*(jr includes a generous
Xselection of fonts.  Total cost to you is around $300.
XTo get the same capabilities from another vendor you would pay around $800
Xfor the software and another $400 for the fonts!*
X.P
XThis page is an example of what DWB 2.0 and \*(jr can do together:
X.2C
X.HU "Tables"
XLook at \*(jr handle tables from the \fItbl\fP preprocessor:
X.DS
X.TS
Xdoublebox;
XcfB s s s.
XComposition of Foods
X=
X.T&
Xc | cI s s
Xc | c s s
Xc | c | c | c.
XFood	Percent by Weight
X\^	_
X\^	Protein	Fat	Carbo-
X\^	\^	\^	hydrate
X_
X.T&
Xl | n | n | n.
XApples	.4	.5	13.0
XHalibut	18.4	5.2	...
XLima Beans	7.5	.8	22.0
XMushrooms	3.5	.4	6.0
XRye Bread	9.0	.6	52.7
X.TE
X.DE
X.HU "Equations"
XMathematical equations from \fIeqn\fP are a breeze:
X.DS
X.EQ
XG(z) =~e sup { ln ~G(z) }
X~=~exp left (
Xsum from k>=1 {S sub k z sup k} over k right )
X~=~ prod from k>=1 e sup {S sub k z sup k /k}
X.EN
X
X.EQ
Xlineup = sum from m>=0 left (
Xsum from
Xpile { k sub 1 ,k sub 2 ,..., k sub m >= 0
Xabove
Xk sub 1 +2k sub 2 + ... +mk sub m}
X{ S sub 1 sup {k sub 1} } over {1 sup k sub 1 k sub 1 ! } ~
X...
X{ S sub m sup {k sub m} } over {m sup k sub m k sub m ! }
Xright ) z sup m
X.EN
X.DE
X.ne 2.25i
X.HU "Graphs"
XAnd \fBgrap\fP can be used to make graphs and charts like these:
X.DS CB
X.G1
Xframe invis ht 1 wid 2.25 left solid bot solid
Xlabel bot "Olympic 400 Meter Run: Winning Times"
Xcoord x 1894,1982 y 42,56
Xticks bot in from 1900 to 1980 by 20
Xticks left out at 44 "44", 46, 48 "48", 50, 52 "52", 54
Xdraw solid
Xcopy "400mpairs.d"
Xnew dotted
Xcopy "400wpairs.d"
X"Women" at 1950,52
X"Men" at 1910,47
X.G2
X.DE
X.HU "Pictures"
XEven \fIpic\fP pictures and diagrams can be printed:
X.DS CB
X.PS
Xh = .5; dh = .02; dw = .1
X[
X	Ptr: [
X		boxht = h; boxwid = dw
X		A: box
X		B: box
X		C: box
X		box wid 2*boxwid "..."
X		D: box
X	]
X	Block: [
X		boxht = 2*dw; boxwid = 2*dw
X		movewid = 2*dh
X		A: box; move;
X		B: box; move;
X		C: box; move;
X		box invis "..." wid 2*boxwid; move
X		D: box
X	] with .t at Ptr.s - (0,h/2)
X	arrow from Ptr.A to Block.A.nw + (dh, 0)
X	arrow from Ptr.B to Block.B.nw + (dh, 0)
X	arrow from Ptr.C to Block.C.nw + (dh, 0)
X	arrow from Ptr.D to Block.D.nw + (dh, 0)
X]
Xbox dashed ht last [].ht+dw wid last [].wid+dw at last []
X.PE
X.DE
X.HU "Bitmaps"
XAnd
X.BM monster.clp pcpaint 300 LJ
Xhere's a bitmap created by \fIPC Paint Plus\fP and inserted into
Xthis page.  Notice how the text flows around the picture.  You can
Xleft justify, right justify, or center a bitmap.  Bitmaps can also
Xbe rotated. Other bitmap formats are easily added.
X.HU "Typefaces"
X.P
XAll standard typefaces come in sizes from 4 to 40 points.  Here are some of
Xthe typefaces which are included at no additional cost:
X.DS I
X.TS
Xl c.
XTypeface Name	Font
X_
X\fRComputer Modern Roman\fP	R
X\fBComputer Modern Bold\fP	B
X\fIComputer Modern Slanted Roman\fP	I
X\fHComputer Modern Sans Serif\fP	H
X\f(HBComputer Modern Sans Serif Bold\fP	HB
X\f(CWComputer Modern Typewriter\fP	CW
X.TE
X.DE
X.HU "Availability"
X\*(jr is now available under UNIX System V/386 (sold by Interactive Systems,
XMicroport, Bell Technologies, and others).  Contact us for availability
Xon other computers or operating systems.
X.1C
END_OF_FILE
if test 4164 -ne `wc -c <'doc/djet.mm'`; then
    echo shar: \"'doc/djet.mm'\" unpacked with wrong size!
fi
# end of 'doc/djet.mm'
fi
echo shar: End of archive 3 \(of 7\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 4 5 6 7 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 7 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



More information about the Comp.sources.misc mailing list