Article View: comp.sources.bugs
Article #721Official patch 6 for Psroff 3.0
From: Chris Lewis
Date: Mon, 09 Dec 1991 03:14
Date: Mon, 09 Dec 1991 03:14
1004 lines
32382 bytes
32382 bytes
Archive-name: psroff3.0/Patch.06
Submitted-by: clewis@ferret.ocunix.on.ca (Chris Lewis)
This is official patch 06 for Psroff 3.0.
Please apply it by:
cd <psroff source directory>
patch -N -p < <this file>
This is a moderately important patch:
1) \X emulation was busted, so you couldn't use psfig.
2) catconv enabling was a bit confused and buggy.
3) you couldn't feed troff2ps ditroff output back into
psroff troff2ps input. Ie: after previewing ditroff
on xtroff, you pass the file to psroff to print on
postscript, and if you selected a font past position 9
in the *.fonts file. (you would have gotten spurious
"increase INTFONTS" messages)
4) \D didn't work with ditroff output.
5) psrofflib.S wasn't taking advantage of %%FONTDIR%%
6) Improved documentation on lparg setting and catconv
enabling (and why you'd want catconv)
You are likely to get a number of rejects on psrofflib.S.
Please take the time to merge the changes with your configuration.
There were several places where the build procedure wouldn't
substitute in properly. Also, for your enjoyment, I have
turned on optimization in the Postscript driver by default, which
should have been done years ago.
../lib/psrofflib.S documentation/config/-Tps optimizer
../utils/catconv.S \X busted.
../utils/hpinterp.c fixed missing argument for font dumps
../dt.c (3) & (4)
../utils.c (3)
../ps.c \D't..' (line thickness) didn't work.
../dit.c Rewrote misleading error message.
../README Futures/hp2pbm/contact info
../defs.h patch level
../Makefile documentation re perl/catconv.
../psroff.S catconv invocation.
../makeincl.S PERL substitution botch.
Patchwrapped: 911207025223
Index: ./lib/psrofflib.S
*** /tmp/PATCHold/./lib/psrofflib.S Sat Dec 7 02:48:55 1991
--- ./lib/psrofflib.S Sat Dec 7 02:48:59 1991
***************
*** 1,8 ****
! # 2.20 91/08/03
# This file controls psroff, you can insert additional printer
# types here. These are eval'd *late* in processing, so that
# you can insert $copies etc.
#
# Syntax:
#
# troff=<path to troff>
--- 1,17 ----
! # 2.22 91/12/07
# This file controls psroff, you can insert additional printer
# types here. These are eval'd *late* in processing, so that
# you can insert $copies etc.
#
+ # This file contains a couple lines that specify the parameters
+ # for each different -T<xx> option to psroff. The -T<xx> options
+ # for psroff select which psroff configuration/printer method you
+ # wish to use. Most people won't have to change anything except
+ # "trofftype" and lparg. The former once, the latter for each -T
+ # option that is applicable to you. Each entry is commented
+ # with an english description of the configuration. Find the one[s]
+ # closest to what you want, and modify as necessary.
+ #
# Syntax:
#
# troff=<path to troff>
***************
*** 19,27 ****
# recommended if you have printers with different character
# widths. Psroff will complain. See trofftype assignment below.
#
! # name: name of config (eg: xt for ditroff->xtroff).
# width: name of width files (eg: "ps" for %%FONTDIR%%/ps/ftXX).
! # ptr: default physical printer id (eg: "lp -d$ptr")
#
# Useful troff2ps args:
# -T<type> driver type (ps, lj, dt)
--- 28,38 ----
# recommended if you have printers with different character
# widths. Psroff will complain. See trofftype assignment below.
#
! # name: name of config (eg: xt for ditroff->xtroff). The name
! # is used by psroff to select the configuration via -T<name>.
# width: name of width files (eg: "ps" for %%FONTDIR%%/ps/ftXX).
! @ This is what troff is told, not necessarily troff2ps.
! # ptr: default physical printer name (eg: "lp -d$ptr")
#
# Useful troff2ps args:
# -T<type> driver type (ps, lj, dt)
***************
*** 28,36 ****
# -p<printer> printer-specific initializations - eg:
# prefix for *.lib and *.fonts files.
# (defaults to <type>). Should be set
! # *before* -T.
# -d<device> x T <device> for ditroff drivers.
! # (defaults to alw)
# -R<num> ditroff resolution to use. Default 300
# -O<pageoffset> offset to be applied *bypassing* troff.
# Default "-O.5i". Set to 0 to get this
--- 39,49 ----
# -p<printer> printer-specific initializations - eg:
# prefix for *.lib and *.fonts files.
# (defaults to <type>). Should be set
! # *after* -T.
# -d<device> x T <device> for ditroff drivers.
! # (defaults to alw) Normally is same
! # as width parameter. Only matters if you're
! # driving some other ditroff drivers.
# -R<num> ditroff resolution to use. Default 300
# -O<pageoffset> offset to be applied *bypassing* troff.
# Default "-O.5i". Set to 0 to get this
***************
*** 62,67 ****
--- 75,109 ----
# print spool invocation manually simply by changing lparg
# to "cat".
#
+ # On BSDish systems (eg: SunOS, Ultrix etc.) that have lpr
+ # you want:
+ # lparg='lpr -#$copies -P$ptr'
+ # On System V systems with "lp" you want:
+ # lparg='lp -n$copies -d$ptr'
+ #
+ # Warning: HP Laserjet output needs a 8-bit path without
+ # any newline or tab expansion. You will have to examine
+ # your print spooler interface script or documentation to
+ # see how to invoke it. On many System V systems it's "-og"
+ # (graphics) which leads to a lparg setting of:
+ # lparg='lp -og -n$copies -d$ptr'
+ #
+ # Some systems have environment variables that can be
+ # used to default the printer in lp[r]. Your best bet is to
+ # simply leave the "-?$ptr" option out. However, you
+ # should be cautious about this - a single environment
+ # variable won't be sufficient when you're using multiple
+ # psroff -T's. For example, if you have a Laserjet and
+ # Postscript printer, the environment variable would
+ # have to change for -Tlj versus -Tps. Often it's
+ # the same physical printer but different logical names.
+ #
+ # One further option: if you add "v=1" to the entry, catconv will
+ # be invoked. This will enable the ditroff emulation facilities
+ # so that \X'...' (eg: psfig), \D'...' (drawing commands), and the
+ # extended character set will be enabled. You MUST have perl to have
+ # this work. This isn't needed for ditroff.
+ #
# Use single quotes for all strings that have embedded blanks or
# other metacharacters. (This delays the variable replacement until
# the correct point). Lines can be continued by prepending the
***************
*** 68,88 ****
# continuation lines with the "name" followed by whitespace.
#
# psroff will use the last assignments to troff and trofftype
! # ditroff prior to the matching name.
! #
! # There is one additional magic flag, "v". If you specify
! # "v=1" (as in cdps entry below), psroff will arrange to run
! # catconv on the (it has to be CAT) troff input. This will
! # permit you to do the extended character set and drawing routine
! # stuff without having to manually invoke catconv. HOWEVER,
! # before trying this, you have to have Perl, and make sure that
! # Perl will start it up properly (see MISC regarding catconv).
#
# Note: for the automatic ditroff width table installer to work,
# the width parameter, -N and -W (if present) options must be
# on the same line.
-
troff=''
trofftype='-T$width'
# Uncomment the following if you're a Sun or Ultrix -F troff.
--- 110,121 ----
# continuation lines with the "name" followed by whitespace.
#
# psroff will use the last assignments to troff and trofftype
! # prior to the matching name.
#
# Note: for the automatic ditroff width table installer to work,
# the width parameter, -N and -W (if present) options must be
# on the same line.
troff=''
trofftype='-T$width'
# Uncomment the following if you're a Sun or Ultrix -F troff.
***************
*** 92,98 ****
# turned on.
#trofftype='-F%%FONTDIR%%/$width/ftXX'
! # psroff generating postscript directly.
# The clause "| $LIBDIR/psxlate -r" is there to reverse the pages
# for some Postscript printers (eg: the ones that print the first
# page face up and then drop the second page face up on top of the
--- 125,131 ----
# turned on.
#trofftype='-F%%FONTDIR%%/$width/ftXX'
! # psroff generating postscript directly from CAT troff.
# The clause "| $LIBDIR/psxlate -r" is there to reverse the pages
# for some Postscript printers (eg: the ones that print the first
# page face up and then drop the second page face up on top of the
***************
*** 103,118 ****
# details. Or, you could do psxlate and the print spooler manually.
# In that case simply change lparg to be lparg='cat'.
#
! ps width=ps t2arg=-Tps lparg='| $LIBDIR/psxlate -r | rlp -d$ptr -n$copies'
ps ptr='gate!AppleLaser'
! # Example optimizer entry.
! ops width=ps t2arg='-Tps -Z -W/usr/lib/font/ps'
! ops lparg='| $LIBDIR/psxlate -r | rlp -d$ptr -n$copies' ptr='gate!AppleLaser'
# For testing new width tables without clobbering real one.
! tps width=tps t2arg='-Tps -Z -W/usr/lib/font/tps'
tps lparg='| $LIBDIR/psxlate -r | rlp -d$ptr -n$copies' ptr='gate!AppleLaser'
# System V'ish LJ printing to printer called laser.
# (Your lp filter script should support -og (8 bit, no filtering))
lj width=lj t2arg=-Tlj lparg='| lp -d$ptr -og -n$copies' ptr=laser
--- 136,151 ----
# details. Or, you could do psxlate and the print spooler manually.
# In that case simply change lparg to be lparg='cat'.
#
! ps width=ps t2arg='-Tps -Z -W%%FONTDIR%%/ps'
! ps lparg='| $LIBDIR/psxlate -r | rlp -d$ptr -n$copies'
ps ptr='gate!AppleLaser'
!
# For testing new width tables without clobbering real one.
! tps width=tps t2arg='-Tps -Z -W%%FONTDIR%%/tps'
tps lparg='| $LIBDIR/psxlate -r | rlp -d$ptr -n$copies' ptr='gate!AppleLaser'
# System V'ish LJ printing to printer called laser.
+ # Don't use this for Laserjet III's - see the *lj3* entries below.
# (Your lp filter script should support -og (8 bit, no filtering))
lj width=lj t2arg=-Tlj lparg='| lp -d$ptr -og -n$copies' ptr=laser
***************
*** 192,198 ****
# Using otroff (CAT troff on these machines) to drive.
#
# You should probably run xproof's devpsc ditroff width tables
! # through gfttab ("cd widths; gfnttab /usr/lib/font/devpsc psc" ?)
# and change width to psc. Special note: xproof keeps each symbol
# character/pointsize in a separate file, and counts as a separate font.
# The limit appears to be 50 fonts, so testtab.m won't print completely.
--- 225,231 ----
# Using otroff (CAT troff on these machines) to drive.
#
# You should probably run xproof's devpsc ditroff width tables
! # through gfttab ("cd widths; gfnttab %%FONTDIR%%/devpsc psc" ?)
# and change width to psc. Special note: xproof keeps each symbol
# character/pointsize in a separate file, and counts as a separate font.
# The limit appears to be 50 fonts, so testtab.m won't print completely.
***************
*** 220,222 ****
--- 253,263 ----
troff=/usr/local/bin/otroff
cdps v=1 width=ps t2arg='-Tps -S -Z'
cdps lparg="> /tmp/dps$$; %%LIBDIR%%/dodps /tmp/dps$$; rm /tmp/dps$$'
+
+ # Using groff (gtroff actually) and driving LJ3:
+ # You have to copy widths/widthlj3/[A-Z]* to gtroff's
+ # width directories/devlj3 for this to work.
+ troff=gtroff
+ trofftype='-T$width'
+ glj3 width=lj3 t2args='-Tlj -plj3 -N -Z -O0 -W%%FONTDIR%%/lj3 -G1'
+ glj3 lparg='lp -og -d$ptr -n$copies' ptr=laser
Index: ./utils/catconv.S
*** /tmp/PATCHold/./utils/catconv.S Sat Dec 7 02:49:29 1991
--- ./utils/catconv.S Sat Dec 7 02:49:30 1991
***************
*** 10,16 ****
#
# This does a very simpleminded conversion of ditroff-only-isms
# (such as graphics) into something handleable by CAT troff.
! # 1.8 91/09/27
$cc{'em'}=1; $cc{'ru'}=1; $cc{'14'}=1; $cc{'12'}=1; $cc{'hy'}=1;
$cc{'34'}=1; $cc{'fi'}=1; $cc{'fl'}=1; $cc{'ff'}=1; $cc{'ct'}=1;
$cc{'Fl'}=1; $cc{'Fi'}=1; $cc{'de'}=1; $cc{'dg'}=1; $cc{'rg'}=1;
--- 10,16 ----
#
# This does a very simpleminded conversion of ditroff-only-isms
# (such as graphics) into something handleable by CAT troff.
! # 1.9 91/11/22
$cc{'em'}=1; $cc{'ru'}=1; $cc{'14'}=1; $cc{'12'}=1; $cc{'hy'}=1;
$cc{'34'}=1; $cc{'fi'}=1; $cc{'fl'}=1; $cc{'ff'}=1; $cc{'ct'}=1;
$cc{'Fl'}=1; $cc{'Fi'}=1; $cc{'de'}=1; $cc{'dg'}=1; $cc{'rg'}=1;
***************
*** 72,78 ****
}
print "$line\n";
while($index) {
! print ".rr" . $regpref . $regnames[--$index] . "\n";
}
}
--- 72,78 ----
}
print "$line\n";
while($index) {
! print ".rr " . $regpref . $regnames[--$index] . "\n";
}
}
***************
*** 161,172 ****
$newy = '';
$newx = '';
! if ($arglist =~ /[-0-9]+/) {
if ($arglist =~ '-') {
$arglist = "0$arglist";
}
$num = $regpref . $regnames[$index];
! $predefs = ".nr $num $arglist\n";
$newargs = "\\(ts\\n($num";
$index++;
} else {
--- 161,172 ----
$newy = '';
$newx = '';
! if ($arglist =~ /\\/) { # has arithmetic in it
if ($arglist =~ '-') {
$arglist = "0$arglist";
}
$num = $regpref . $regnames[$index];
! $predefs .= ".nr $num $arglist\n";
$newargs = "\\(ts\\n($num";
$index++;
} else {
Index: ./utils/hpinterp.c
*** /tmp/PATCHold/./utils/hpinterp.c Sat Dec 7 02:49:40 1991
--- ./utils/hpinterp.c Sat Dec 7 02:49:42 1991
***************
*** 10,16 ****
#ifndef lint
static char SCCSID[] =
! "@(#)hpinterp.c 2.7 Copyright 91/08/29 18:22:29 Chris Lewis";
#endif
/* To install:
--- 10,16 ----
#ifndef lint
static char SCCSID[] =
! "@(#)hpinterp.c 2.8 Copyright 91/11/22 03:23:36 Chris Lewis";
#endif
/* To install:
***************
*** 645,651 ****
ta.a[1] = 0x02;
smallend = ((ta.b&0xff) == 0x01);
#endif
! while((c = getopt(argc, argv, "dpv")) != EOF)
switch(c) {
case 'p':
genps++;
--- 645,651 ----
ta.a[1] = 0x02;
smallend = ((ta.b&0xff) == 0x01);
#endif
! while((c = getopt(argc, argv, "dpvc")) != EOF)
switch(c) {
case 'p':
genps++;
***************
*** 652,657 ****
--- 652,661 ----
break;
case 'v':
verbose++;
+ break;
+ case 'c':
+ chars++;
+ verbose=chars;
break;
case 'd':
debug++;
Index: ./dt.c
*** /tmp/PATCHold/./dt.c Sat Dec 7 02:49:58 1991
--- ./dt.c Sat Dec 7 02:50:00 1991
***************
*** 12,18 ****
#ifndef lint
static char SCCSid[] =
! "@(#)dt.c: 2.10 Copyright 91/09/27 15:10:19 Chris Lewis";
#endif
/* These two tables are always included so that we have the
--- 12,18 ----
#ifndef lint
static char SCCSid[] =
! "@(#)dt.c: 2.13 Copyright 91/11/22 03:55:58 Chris Lewis";
#endif
/* These two tables are always included so that we have the
***************
*** 292,299 ****
#ifdef DT
#include "dt.h"
- #define USED 01
-
int dtresolution = DTRESOLUTION;
#ifdef DTOPT
--- 292,297 ----
***************
*** 325,348 ****
}
#endif /* DTOPT */
- dtSetFont(font, points)
- int font, points; {
- if (lastPoints != points || font != lastFont) {
-
- #ifdef DTOPT
- checknl();
- #endif /* DTOPT */
-
- if (!(fonttable[font].flags)&USED)
- printf("x font %d %s\n", font+1, fonttable[font].troffName);
- fonttable[font].flags |= USED;
- printf("f%d\n", font+1);
- printf("s%d\n", points);
- lastPoints = points;
- lastFont = font;
- }
- }
-
#ifdef DTOPT
static
putseq(flag, width, seq)
--- 323,328 ----
***************
*** 383,388 ****
--- 363,369 ----
char *sequence; {
register int nx = TROFF2DTX(x), ny = TROFF2DTY(y);
register struct troff2befont *rp;
+ int pfont;
#ifdef DTOPT
int optimizing = 0;
***************
*** 408,431 ****
/* Only fonts with "N" are subject to font translation */
case N:
if (font == symidx)
! font = 0; /* Special chars are Courier */
else {
DBP((D_BEND, "dtSetChar %d->%s (%s)\n", font,
xlatetable[font]->troffName,
xlatetable[font]->fontName));
! font = xlatetable[font] - fonttable;
}
break;
case S:
! font = 3;
! break;
! case D:
break;
default:
/* Typically used when the R and S fonts don't have the
character desired, so select the font via the index
in the fonts.?? file */
! font = rp->t2b_font;
break;
}
--- 389,410 ----
/* Only fonts with "N" are subject to font translation */
case N:
if (font == symidx)
! pfont = 0; /* Special chars are Courier */
else {
DBP((D_BEND, "dtSetChar %d->%s (%s)\n", font,
xlatetable[font]->troffName,
xlatetable[font]->fontName));
! pfont = xlatetable[font] - fonttable;
}
break;
case S:
! pfont = 3;
break;
default:
/* Typically used when the R and S fonts don't have the
character desired, so select the font via the index
in the fonts.?? file */
! pfont = rp->t2b_font;
break;
}
***************
*** 448,454 ****
if (rp->t2b_xc) nx += points * (.01 * rp->t2b_xc);
if (rp->t2b_yc) ny += points * (.01 * rp->t2b_yc);
! dtSetFont(font, points);
#ifndef DTOPT
{
--- 427,454 ----
if (rp->t2b_xc) nx += points * (.01 * rp->t2b_xc);
if (rp->t2b_yc) ny += points * (.01 * rp->t2b_yc);
!
! if (!(fonttable[pfont].flags&MOUNTED)) {
! #ifdef DTOPT
! checknl();
! #endif /* DTOPT */
! printf("x font %d %s\n", font+1, fonttable[pfont].troffName);
! fonttable[pfont].flags |= MOUNTED;
! lastFont = 9999;
! }
!
! if (lastPoints != points || font != lastFont) {
!
! #ifdef DTOPT
! checknl();
! #endif /* DTOPT */
!
! fonttable[pfont].flags |= USED;
! printf("f%d\n", font+1);
! printf("s%d\n", points);
! lastPoints = points;
! lastFont = font;
! }
#ifndef DTOPT
{
***************
*** 603,612 ****
}
#ifdef INSPECIAL
! dtDraw(origX, origY, s)
int origX, origY;
register char *s; {
! register int temp, t2;
DBP((D_CAT, "dtDraw: (%d,%d): %s\n", origX, origY, s));
#ifdef DTOPT
--- 603,617 ----
}
#ifdef INSPECIAL
! dtDraw(origX, origY, opcode, ctindex, numbers, s)
int origX, origY;
+ int opcode;
+ int ctindex;
+ short *numbers;
register char *s; {
! register int i;
! extern int indtres;
!
DBP((D_CAT, "dtDraw: (%d,%d): %s\n", origX, origY, s));
#ifdef DTOPT
***************
*** 620,645 ****
return;
putchar('D');
! putchar(*s);
! s++;
/* We just pass these thru, scaling them to output resolution */
! for (;*s;s++) {
! if (isspace(*s))
! putchar(' ');
! else if (!isdigit(*s))
! putchar(*s);
! else {
! extern int indtres;
! temp = *s - '0';
!
! while(isdigit(*(s+1)))
! temp = temp * 10 + (*++s - '0');
! t2 = temp * dtresolution / (ditroff? indtres:
! TROFFRESOLUTION);
! DBP((D_CAT, "dtDraw (scale): %d -> %d\n", temp, t2));
! printf("%d", t2);
! }
}
putchar('\n');
}
--- 625,641 ----
return;
putchar('D');
! putchar(opcode);
/* We just pass these thru, scaling them to output resolution */
! if (opcode == 'f' || opcode == 't')
! printf(" %d", numbers[0]);
!
! else {
!
! for (i = 0; i < ctindex; i++)
! printf(" %d", numbers[i] * dtresolution / TROFFRESOLUTION);
!
}
putchar('\n');
}
Index: ./utils.c
*** /tmp/PATCHold/./utils.c Sat Dec 7 02:50:29 1991
--- ./utils.c Sat Dec 7 02:50:32 1991
***************
*** 12,18 ****
#ifndef lint
static char SCCSid[] =
! "@(#)utils.c: 2.20 Copyright 91/10/18 16:32:49 Chris Lewis";
#endif
#ifndef HEADERSIZE
--- 12,18 ----
#ifndef lint
static char SCCSid[] =
! "@(#)utils.c: 2.21 Copyright 91/11/22 03:21:21 Chris Lewis";
#endif
#ifndef HEADERSIZE
***************
*** 435,440 ****
--- 435,444 ----
for (p = fonttable; p->troffName; p++)
if (strcmp(p->troffName, to) == 0) {
+
+ if (xlatetable[intfont]->flags)
+ xlatetable[intfont]->flags &= ~MOUNTED;
+
xlatetable[intfont] = p;
break;
}
Index: ./ps.c
*** /tmp/PATCHold/./ps.c Sat Dec 7 02:50:50 1991
--- ./ps.c Sat Dec 7 02:50:52 1991
***************
*** 15,21 ****
#ifndef lint
static char SCCSid[] =
! "@(#)ps.c: 2.15 Copyright 91/11/13 00:29:48 Chris Lewis";
#endif
/* ps.c will generate some additional "print" commands to cause
--- 15,21 ----
#ifndef lint
static char SCCSid[] =
! "@(#)ps.c: 2.17 Copyright 91/11/22 03:56:10 Chris Lewis";
#endif
/* ps.c will generate some additional "print" commands to cause
***************
*** 28,35 ****
static char Overlay[100] = {""};
#endif
- #define USED 01
-
struct troff2befont psStdFont[108] = {
/* Note on X-shift, Y-shift and point scale factor:
--- 28,33 ----
***************
*** 622,628 ****
int i, fill = 0;
static float curfill = 0;
! int curthick = 1;
/* map absolute beginning position. */
origX = TROFF2PSX(origX);
--- 620,626 ----
int i, fill = 0;
static float curfill = 0;
! static int curthick = 1;
/* map absolute beginning position. */
origX = TROFF2PSX(origX);
Index: ./dit.c
*** /tmp/PATCHold/./dit.c Sat Dec 7 02:51:08 1991
--- ./dit.c Sat Dec 7 02:51:09 1991
***************
*** 12,18 ****
#ifndef lint
static char SCCSid[] =
! "@(#)dit.c: Copyright 91/10/17 11:58:18 Chris Lewis";
#endif
extern struct cattab tabN[], tabS[], *extidx;
--- 12,18 ----
#ifndef lint
static char SCCSid[] =
! "@(#)dit.c: Copyright 91/11/22 03:53:18 Chris Lewis";
#endif
extern struct cattab tabN[], tabS[], *extidx;
***************
*** 160,166 ****
font = getnum();
if (font < 0 || font >= INTFONTS) {
fprintf(stderr,
! "%s: font number %d too high - make INTFONTS bigger\n",
progname, font);
font = 1;
} else if (font == 0)
--- 160,166 ----
font = getnum();
if (font < 0 || font >= INTFONTS) {
fprintf(stderr,
! "%s: font number %d too high - get help from Chris!\n",
progname, font);
font = 1;
} else if (font == 0)
Index: ./README
*** /tmp/PATCHold/./README Sat Dec 7 02:51:22 1991
--- ./README Sat Dec 7 02:51:26 1991
***************
*** 1,4 ****
! PSROFF RELEASE 3.0 README 2.21 91/10/11
Feb 19, 1991
Chris Lewis
--- 1,4 ----
! PSROFF RELEASE 3.0 README 2.22 91/12/07
Feb 19, 1991
Chris Lewis
***************
*** 389,413 ****
Future directions:
! They are two-fold: replacing the ".tm/.sR" mechanism for communication
! with the backend. There is a new method, using a FSA to recognize
! a special sequence of bell symbols (see catconv). I haven't converted
! over to it, because under some not-yet-understood situations, it
! doesn't work. Hence, psfig and drawing commands occasionally misbehave.
! Once this is reliable, all special commands (eg: the .fp fakeouts) will
! be converted over to the FSA mechanism.
You may have noticed a compile flag called "OPT" which is defined in
the distributed version of defs.h. If enabled (via -Z/W), this enables the
optimizer. It works well with Postscript output, but not with laserjet
! unless the fonts you use are VERY good. It's disabled by default. The
! optimizer does two things: it emits as many characters as it can as one
print directive, rather than one CAT code per print. On postscript and
HPLJ's this is a BIG win (printer execution speeds 3 or more times faster),
! but it won't work with ditroff. The optimizer requires access to the CAT
! troff width tables (even when used with ditroff), and if troff2ps can't find
! them, it simply doesn't optimize.
Psroff limitations:
- With the use of catconv and CAT troff, psroff supports:
- all drawing commands (including the newer \D'fn' (set fill),
--- 389,418 ----
Future directions:
! Replacing the ".tm/.sR" mechanism for communication with the backend.
! There is a new method, using a FSA to recognize a special sequence of
! bell symbols (see catconv). I haven't converted over to it, because
! under some not-yet-understood situations, it doesn't work. Hence, psfig
! and drawing commands occasionally misbehave. Once this is reliable, all
! special commands (eg: the .fp fakeouts) will be converted over to the FSA
! mechanism.
You may have noticed a compile flag called "OPT" which is defined in
the distributed version of defs.h. If enabled (via -Z/W), this enables the
optimizer. It works well with Postscript output, but not with laserjet
! unless the fonts you use are VERY good. It's enabled by default for ps.
! The optimizer does two things: it emits as many characters as it can as one
print directive, rather than one CAT code per print. On postscript and
HPLJ's this is a BIG win (printer execution speeds 3 or more times faster),
! and is essential with ditroff output to psdit and xtroff. The optimizer
! requires access to the CAT troff width tables (even when used with ditroff),
! and if troff2ps can't find them, it will abort.
+ Hpinterp was borrowed and converted into a general HP LJ to PBM
+ converter. This permits the output of psroff to be printed on
+ just about ANY printer. The new version of hpinterp (now called
+ hp2pbm) will eventually be reintegrated back into psroff.
+
Psroff limitations:
- With the use of catconv and CAT troff, psroff supports:
- all drawing commands (including the newer \D'fn' (set fill),
***************
*** 437,442 ****
--- 442,452 ----
Dunrobin, Ontario,
Canada K0A 1T0
Voice Phone: Canada (613) 832-0541
+ [Please note: I will not return LD phone calls. Even collect.
+ If you catch me in, no problem. If you get the answering machine,
+ you're best off calling back later. Email is usually more
+ convenient. Between 7 and 10pm EST (5 hours behind GMT) is
+ probably the best time.]
Userid's for e-mail contact:
Psroff enquiries/help: psroff-request
Non-psroff mail only: clewis
Index: ./defs.h
*** /tmp/PATCHold/./defs.h Sat Dec 7 02:51:42 1991
--- ./defs.h Sat Dec 7 02:51:43 1991
***************
*** 9,15 ****
*/
/* Official Release and Patch level: */
! #define T2VERSION "@(#)PSROFF Copyright 91/11/02 Chris Lewis - R3 PL5"
/* Configuration parameters:
*/
--- 9,15 ----
*/
/* Official Release and Patch level: */
! #define T2VERSION "@(#)PSROFF Copyright 91/11/22 Chris Lewis - R3 PL6"
/* Configuration parameters:
*/
***************
*** 292,297 ****
--- 292,300 ----
};
#define MAXFONTS 50
+
+ #define USED 01
+ #define MOUNTED 02
struct fonttable {
char *tab[4];
Index: ./Makefile
*** /tmp/PATCHold/./Makefile Sat Dec 7 02:51:55 1991
--- ./Makefile Sat Dec 7 02:51:57 1991
***************
*** 7,13 ****
# Function: Upper level makefile; configuration options.
#
#
! #ident "@(#)Makefile: 2.26 Copyright 91/10/18 16:32:33 Chris Lewis"
# If you're not sure whether you have a System V make, leave
# this alone, and run the make anyways. If it dies horribly
--- 7,13 ----
# Function: Upper level makefile; configuration options.
#
#
! #ident "@(#)Makefile: 2.28 Copyright 91/12/07 02:20:15 Chris Lewis"
# If you're not sure whether you have a System V make, leave
# this alone, and run the make anyways. If it dies horribly
***************
*** 144,152 ****
# If you have perl, make sure that this is the full pathname
# for it. If you don't have perl, you won't be able to use
! # catconv or calcfonts. Which is normally no big deal unless
! # you're trying to emulate \D with C/A/T troff OR build Laserjet
! # fonts from a TeX heirarchy.
PERL = /usr/bin/perl
# Dinna touch from here on
--- 144,156 ----
# If you have perl, make sure that this is the full pathname
# for it. If you don't have perl, you won't be able to use
! # catconv or calcfonts. This is normally no big deal unless
! # you're trying to emulate \D or \X with C/A/T troff OR build Laserjet
! # fonts from a TeX heirarchy. To enable catconv, you must also alter
! # the appropriate psrofflib.S entries to have the "v=1" option.
! # (catconv is a filter that will be run *before* troff to mangle
! # ditroffisms to CAT troffisms. \D is drawing commands. \X is
! # special directives (eg: you want to use psfig))
PERL = /usr/bin/perl
# Dinna touch from here on
***************
*** 372,378 ****
# Yes, this is a little wierd, but in this way I can figure
# out what you are...
! TEST: Makefile defs.h tests/testtab.m tests/exttab.m makeincl
cd lib ; $(MAKE)
rm -f TEST1 TEST2
PATH=.:$(LIBDIR):$$PATH \
--- 376,382 ----
# Yes, this is a little wierd, but in this way I can figure
# out what you are...
! TEST: Makefile defs.h sedscript tests/testtab.m tests/exttab.m makeincl
cd lib ; $(MAKE)
rm -f TEST1 TEST2
PATH=.:$(LIBDIR):$$PATH \
Index: ./psroff.S
*** /tmp/PATCHold/./psroff.S Sat Dec 7 02:52:08 1991
--- ./psroff.S Sat Dec 7 02:52:10 1991
***************
*** 7,13 ****
#
# Specs: troff2ps driver
#
! #ident "@(#)psroff.sh: 2.17 Copyright 91/11/13 00:30:44 Chris Lewis"
LIBDIR="%%LIBDIR%%"
FONTDIR="%%FONTDIR%%"
--- 7,13 ----
#
# Specs: troff2ps driver
#
! #ident "@(#)psroff.sh: 2.18 Copyright 91/11/22 03:21:09 Chris Lewis"
LIBDIR="%%LIBDIR%%"
FONTDIR="%%FONTDIR%%"
***************
*** 163,169 ****
# If -N in t2arg, then this is ditroff.
teststring=`echo "$t2arg" | sed -n -e '/-N/p'`
if [ -n "$teststring" ]
- ]
then
otroff=
widtharg="-T$width"
--- 163,168 ----
***************
*** 299,308 ****
cat $files |
! if [ -f "$PERL" ]
then
%%LIBDIR%%/catconv
else
sed -e 's/^\\!\(.*\)/.sR "\1"/'
fi
else
--- 298,308 ----
cat $files |
! if [ -f "%%PERL%%" -a -z "$v" ]
then
%%LIBDIR%%/catconv
else
+ # you only get \! emulation
sed -e 's/^\\!\(.*\)/.sR "\1"/'
fi
else
Index: ./makeincl.S
*** /tmp/PATCHold/./makeincl.S Sat Dec 7 02:52:18 1991
--- ./makeincl.S Sat Dec 7 02:52:19 1991
***************
*** 4,10 ****
# See the LICENSE file for a full description of the restrictions
# under which this software is provided.
#
! # Makefile overrides 2.5 91/03/25
CC = %%CC%%
CFLAGS = %%CCFLAGS%% -I../
FONTDIR = %%FONTDIR%%
--- 4,10 ----
# See the LICENSE file for a full description of the restrictions
# under which this software is provided.
#
! # Makefile overrides 2.6 91/11/22
CC = %%CC%%
CFLAGS = %%CCFLAGS%% -I../
FONTDIR = %%FONTDIR%%
***************
*** 20,25 ****
--- 20,26 ----
IGNORESH = %%IGNORESH%%
T2DIR = %%T2DIR%%
MAKEDEV = %%MAKEDEV%%
+ PERL = %%PERL%%
# This override is because apparently a .s suffix on a file will
# cause make to not select a ".S:" rule when the target is .s
Technical Details
Message-ID:
<2873@ecicrl.ocunix.on.ca>Path:
arc1-ca.pugleaf.net!wupost!cs.utexas.edu!utgpu!cunews!micor!ecicrl!ferret.ocunix.on.ca!clewisShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!wupost!cs.utexas.edu!utgpu!cunews!micor!ecicrl!ferret.ocunix.on.ca!clewis From: clewis@ferret.ocunix.on.ca (Chris Lewis) Newsgroups: comp.sources.bugs,comp.text,comp.lang.postscript,alt.sources Subject: Official patch 6 for Psroff 3.0 Message-ID: <2873@ecicrl.ocunix.on.ca> Date: 9 Dec 91 03:14:22 GMT Sender: clewis@ferret.ocunix.on.ca Followup-To: comp.sources.bugs Organization: Elegant Communications Inc., Ottawa, Canada Lines: 1004