Psroff Release 2.0, Patch 4
Chris Lewis
clewis at ecicrl.UUCP
Thu Oct 25 04:41:26 AEST 1990
Archive-name: psroff2.0/patch.04
Submitted-by: clewis at ecicrl.uucp (Chris Lewis)
I'm really sorry that Psroff 2.0 itself hasn't been posted.
It's been sitting in Rich's queue for comp.sources.unix since
July. I'm going to see if I can get it out through comp.sources.misc
in a timely fashion, if not, I'll just post it thru alt.sources.
If you do wish to followup to this article, please ensure that
your posting goes to comp.text - since I've moved to Ottawa, I've
been paying LD charges for my news, and I've not been receiving
any of the sources groups.
This is (almost) a trivial patch. When Psroff gets posted in its
entirety, it will be at THIS level (PL4).
This is official patch 04 for Psroff 2.0.
Please apply it by:
cd <psroff source directory>
patch -N -p < <this file>
./man/troff2ps.1.S Documented optimizer (-Z & -W)
./debug.c trailing spaces.
./utils/Makefile forgot catconv
./defs.h PL4 & NODECMD for systems without uuname -l.
./dt.c trailing spaces.
./utils.c NODECMD
*** /tmp/PATCHold/./man/troff2ps.1.S Wed Oct 24 13:42:08 1990
--- ./man/troff2ps.1.S Wed Oct 24 13:42:09 1990
***************
*** 1,4 ****
! .\"Copyright 1988 by Chris Lewis 2.1 90/07/18
.TH TROFF2PS 1 local
.SH NAME
troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
--- 1,4 ----
! .\"Copyright 1988 by Chris Lewis 2.2 90/10/24
.TH TROFF2PS 1 local
.SH NAME
troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
***************
*** 12,17 ****
--- 12,19 ----
.BI "[-p" prolog "]"
.BI "[-O" l "]"
.BI "[-Y" l "]"
+ .BI "[-W" directory "]"
+ .B "[-Z]"
[-V] [-M]
.SH DESCRIPTION
.I Troff2ps
***************
*** 112,117 ****
--- 114,158 ----
options allow you to specify page X and Y offsets respectively.
The value should be a number with a valid troff scale factor.
Eg: ``-O.463i''.
+ .P
+ The
+ .B -Z
+ and
+ .B -W
+ options controller the optimizer.
+ If the
+ .B -Z
+ option is specified, the backends attempt to coalesce strings of
+ characters into one drawing request.
+ Without this option,
+ .B troff2
+ draws words by positioning each letter separately.
+ The optimizer can reduce the size of the output file by factors of 3 or
+ more, and printer speeds similarly, particularly in Postscript.
+ This option is disabled in ditroff-output-mode - it's up to the
+ ditroff filter to optimize.
+ The
+ .BI -W directory
+ allows you to specify where the width tables are, by default they
+ are "/usr/lib/font/\fItype\fP", where \fItype\fP is the driver
+ type specified by the
+ .B -T
+ option.
+ This option is useful if you've moved the width directory somewhere
+ else, or the final directory name is different from the
+ .B -T
+ value.
+ See psrofflib entry "ops" for an example.
+ The
+ .B -W
+ option is ignored unless
+ .B -Z
+ is specified.
+ .P
+ The optimizer is quite good, but it is known that columns of text separated
+ by a leader made up of periods can fool it.
+ At the present time, it is unknown whether it's a width table or
+ printer or troff wierdness.
.SH "SPECIAL REQUESTS"
.BI troff2 xx
supports a number of additional features over and above bare
*** /tmp/PATCHold/./debug.c Wed Oct 24 13:42:21 1990
--- ./debug.c Wed Oct 24 13:42:22 1990
***************
*** 2,8 ****
#ifndef lint
static char SCCSid[] =
! "@(#)debug.c: 2.3 Copyright 90/10/01 14:41:07 Chris Lewis";
#endif
#ifdef DEBUG
--- 2,8 ----
#ifndef lint
static char SCCSid[] =
! "@(#)debug.c: 2.4 Copyright 90/10/22 14:53:06 Chris Lewis";
#endif
#ifdef DEBUG
***************
*** 120,126 ****
*/
bcopy(from, to, len)
register char *from, *to;
! register int len;
{
while(len--)
*to++ = *from++;
--- 120,126 ----
*/
bcopy(from, to, len)
register char *from, *to;
! register int len;
{
while(len--)
*to++ = *from++;
***************
*** 128,134 ****
bzero(array, len)
register char *array;
! register int len;
{
while(len--)
*array++ = '\0';
--- 128,134 ----
bzero(array, len)
register char *array;
! register int len;
{
while(len--)
*array++ = '\0';
*** /tmp/PATCHold/./utils/Makefile Wed Oct 24 13:42:32 1990
--- ./utils/Makefile Wed Oct 24 13:42:33 1990
***************
*** 1,5 ****
! # Copyright 16:49:40 Chris Lewis
! SCRIPTS = psdtwd showfont mkenctab calcfonts
PROGRAMS = hpinterp psxlate pk2sfp pk2ditwid pktype dumpft pk2ps lj2ps
MAPS = maps/S.cmtrf \
maps/alnum.ROMAN8 \
--- 1,5 ----
! # Copyright 14:22:49 Chris Lewis
! SCRIPTS = psdtwd showfont mkenctab calcfonts catconv
PROGRAMS = hpinterp psxlate pk2sfp pk2ditwid pktype dumpft pk2ps lj2ps
MAPS = maps/S.cmtrf \
maps/alnum.ROMAN8 \
*** /tmp/PATCHold/./defs.h Wed Oct 24 13:42:42 1990
--- ./defs.h Wed Oct 24 13:42:44 1990
***************
*** 1,4 ****
! /* Copyright 1988, 1989 13:38:22 Chris Lewis
All Rights Reserved
Permission to copy and further distribute is freely given provided
--- 1,4 ----
! /* Copyright 1988, 1989 13:21:58 Chris Lewis
All Rights Reserved
Permission to copy and further distribute is freely given provided
***************
*** 6,18 ****
sold for profit.
Project: Generic Troff drivers
! Module: defs.h 2.7 90/10/12 13:38:22
Author: Chris Lewis
Specs: Main header file - contains some customization
*/
/* Official Release and Patch level: */
! #define T2VERSION "@(#)PSROFF Copyright 90/10/12 Chris Lewis - R2 P3"
#ifndef LIBDIR
/* Don't touch this */
--- 6,18 ----
sold for profit.
Project: Generic Troff drivers
! Module: defs.h 2.9 90/10/24 13:21:58
Author: Chris Lewis
Specs: Main header file - contains some customization
*/
/* Official Release and Patch level: */
! #define T2VERSION "@(#)PSROFF Copyright 90/10/24 Chris Lewis - R2 P4"
#ifndef LIBDIR
/* Don't touch this */
***************
*** 31,37 ****
oldish BSD systems */
#undef BCOPYLIB /* Define if BCOPY is defined and you have */
! /* a bcopy in the library */
#undef UNSIGNEDCHAR /* Define if chars are unsigned on your machine */
--- 31,37 ----
oldish BSD systems */
#undef BCOPYLIB /* Define if BCOPY is defined and you have */
! /* a bcopy in your library */
#undef UNSIGNEDCHAR /* Define if chars are unsigned on your machine */
***************
*** 164,169 ****
--- 164,174 ----
psroff(1) -Y options too */
#define INSPECIAL /* enables ditroff graphics capability */
+
+ #define NODECMD "uuname -l" /* command to print on stdout the node name
+ of your machine. Use hostname on BSD-derived
+ systems that don't have UUCP. You can always
+ use "echo <nodename>" if necessary */
/* Edit no more .... */
*** /tmp/PATCHold/./dt.c Wed Oct 24 13:42:58 1990
--- ./dt.c Wed Oct 24 13:43:02 1990
***************
*** 15,21 ****
#ifndef lint
static char SCCSid[] =
! "@(#)dt.c: 2.2 Copyright 90/10/12 13:09:25 Chris Lewis";
#endif
/* These two tables are always included so that we have the
--- 15,21 ----
#ifndef lint
static char SCCSid[] =
! "@(#)dt.c: 2.3 Copyright 90/10/22 14:52:55 Chris Lewis";
#endif
/* These two tables are always included so that we have the
***************
*** 491,497 ****
temp = temp * 10 + (*++s - '0');
}
t2 = temp * dtresolution / TROFFRESOLUTION;
! DBP((D_CAT, "dtDraw (scale): %d -> %d\n", temp, t2));
printf("%d", t2);
}
}
--- 491,497 ----
temp = temp * 10 + (*++s - '0');
}
t2 = temp * dtresolution / TROFFRESOLUTION;
! DBP((D_CAT, "dtDraw (scale): %d -> %d\n", temp, t2));
printf("%d", t2);
}
}
*** /tmp/PATCHold/./utils.c Wed Oct 24 13:43:20 1990
--- ./utils.c Wed Oct 24 13:43:22 1990
***************
*** 15,21 ****
#ifndef lint
static char SCCSid[] =
! "@(#)utils.c: 2.1 Copyright 90/07/18 16:51:48 Chris Lewis";
#endif
extern struct cattab tabN[], tabS[];
--- 15,21 ----
#ifndef lint
static char SCCSid[] =
! "@(#)utils.c: 2.3 Copyright 90/10/24 13:37:08 Chris Lewis";
#endif
extern struct cattab tabN[], tabS[];
***************
*** 86,96 ****
char nodename[25];
getnodename() {
FILE *uuname;
! if ((uuname = popen("uuname -l", "r")) == NULL)
strcpy(nodename, "<noname>");
else {
fscanf(uuname, "%s", nodename);
! pclose(uuname);
}
}
--- 86,97 ----
char nodename[25];
getnodename() {
FILE *uuname;
! if ((uuname = popen(NODECMD, "r")) == NULL)
strcpy(nodename, "<noname>");
else {
fscanf(uuname, "%s", nodename);
! if (pclose(uuname))
! strcpy(nodename, "<noname>");
}
}
--
Chris Lewis, Phone: TBA
UUCP: uunet!utai!lsuc!ecicrl!clewis
Moderator of the Ferret Mailing List (ferret-request at eci386)
Psroff mailing list (psroff-request at eci386)
More information about the Alt.sources
mailing list