Official Patch to psroff

Chris Lewis clewis at eci386.uucp
Tue Nov 14 04:13:30 AEST 1989


This has also been sent to comp.sources.unix.  Rich, if you see this,
please don't cancel the submission, because I want the c.s.u archivers 
to see it.

Note: an extract from Patch02 (currently in the works):

    - WARNING: some versions of troff (Xenix comes to mind) have the
      width table for the default four fonts (R, I, B & S) compiled
      in.  Therefore, the width tables will not take effect.  However,
      (at least Xenix) troff will reload the font widths from disk if 
      you include the following in tmac.t2:

	.fp 1 R
	.fp 2 I
	.fp 3 B
	.fp 4 S

#! /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 1 (of 1)."
# Contents:  Patch01
# Wrapped by clewis at eci386 on Mon Nov 13 12:12:21 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Patch01' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Patch01'\"
else
echo shar: Extracting \"'Patch01'\" \(7061 characters\)
sed "s/^X//" >'Patch01' <<'END_OF_FILE'
XPsroff, release 1, Patch 1
X
XThis is the first official patch for psroff, please apply it:
X
X	1) bug in dit2catwid - strcmp presented with NULL pointer which
X	   causes it to dump on Suns.  Presumably elsewhere...
X	   Thanks to the many who reported it.
X	2) Instituted patch level numbering by rearranging T2VERSION in
X	   defs.h.  troff2ps -V prints the current revision and patch
X	   level.
X	3) At least some versions of troff generate Wang CAT NOP opcodes 
X	   when the output buffer fills up.  If this lands in the middle
X	   of a back-end directive, you're screwed.  Back-end directive
X	   snarfing now ignores NOPs.
X	4) make clean was a leetle too violent.
X	5) ps.c: cent sign is in normal character set, not Symbol twit!
X	6) ps.c: changed horizontal rule table entry to use font native
X	   underscore rather than doru.  (tables sometimes look funny in 
X	   fonts other than Roman)
X
XTo apply:
X	cd <whereever_you_keep_psroff>
X	patch < this_file
X	make install
X
X
X*** /usr4/public/src/t2current/./troff2.c	Mon Nov  6 16:08:54 1989
X--- /usr4/public/src/t2new/./troff2.c	Mon Nov  6 16:25:18 1989
X***************
X*** 15,24 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)troff2.c: 1.16 Copyright 89/07/17 10:58:29 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)troff2.c: 1.16 Copyright 89/07/17 10:58:29 Chris Lewis"
X  #endif
X  
X  #define	ESC	0x80
X--- 15,24 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)troff2.c: 1.17 Copyright 89/10/10 16:03:38 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)troff2.c: 1.17 Copyright 89/10/10 16:03:38 Chris Lewis"
X  #endif
X  
X  #define	ESC	0x80
X***************
X*** 250,255 ****
X--- 250,259 ----
X  			    static char specialbuf[SPSIZ], *sbp;
X  			    sbp = specialbuf;
X  			    while((c = getc(stdin)) != EOF && c != '\n') {
X+ 				if (!c)	/* some troff's add NOP's when
X+ 					   the internal output buffer is
X+ 					   flushed */
X+ 				    continue;
X  				if (sbp < &specialbuf[SPSIZ]-2)
X  				*sbp++ = c;
X  			    }
X*** /usr4/public/src/t2current/./defs.h	Mon Nov  6 16:07:17 1989
X--- /usr4/public/src/t2new/./defs.h	Mon Nov  6 16:25:19 1989
X***************
X*** 15,20 ****
X--- 15,22 ----
X  #define	LIBDIR	"/usr/lib/troff2"
X  #endif
X  
X+ #define	T2VERSION	"Release 1 Patchlevel 1 89/11/06"
X+ 
X  /*#define	BSD		/* Define if you are a V7 or BSD machine */
X  #define ATT		/* Define if you are some sort of SIII or SV system */
X  #define	SVR3		/* Define if you are System VR3 (ATT should also be
X***************
X*** 22,31 ****
X  
X  #ifdef	SVR3
X  #ifndef	lint
X! static char defid[] = "@(#)defs.h: 1.14 Copyright 89/06/14 17:39:59 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)defs.h: 1.14 Copyright 89/06/14 17:39:59 Chris Lewis"
X  #endif
X  
X  
X--- 24,33 ----
X  
X  #ifdef	SVR3
X  #ifndef	lint
X! static char defid[] = "@(#)defs.h: 1.16 Copyright 89/11/06 16:14:49 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)defs.h: 1.16 Copyright 89/11/06 16:14:49 Chris Lewis"
X  #endif
X  
X  
X***************
X*** 126,130 ****
X  
X  int currentPage;
X  int pagePending;
X! 
X! #define	T2VERSION	"R1.14 89/06/14"
X--- 128,131 ----
X  
X  int currentPage;
X  int pagePending;
X! 
X*** /usr4/public/src/t2current/./dit2catwid.c	Mon Nov  6 16:08:25 1989
X--- /usr4/public/src/t2new/./dit2catwid.c	Mon Nov  6 16:25:20 1989
X***************
X*** 1,9 ****
X! /* Brute force ditroff to CAT width table converter 1.5 89/08/25
X     Will generate ft* files that are compatible with troff (at least the
X     Xenix version that is)
X  */
X  
X! static char SCCSid[] = "@(#)dit2catwid.c 1.5 89/08/25";
X  
X  #include <stdio.h>
X  #include "defs.h"
X--- 1,9 ----
X! /* Brute force ditroff to CAT width table converter 1.6 89/10/20
X     Will generate ft* files that are compatible with troff (at least the
X     Xenix version that is)
X  */
X  
X! static char SCCSid[] = "@(#)dit2catwid.c 1.6 89/10/20";
X  
X  #include <stdio.h>
X  #include "defs.h"
X***************
X*** 478,484 ****
X  #endif
X  
X      for (i = 0; i < 224; i++)
X! 	if (0 == strcmp(table[i].name, str))
X  	    table[i].catwidth = val;
X  }
X  
X--- 478,484 ----
X  #endif
X  
X      for (i = 0; i < 224; i++)
X! 	if (table[i].name && str && 0 == strcmp(table[i].name, str))
X  	    table[i].catwidth = val;
X  }
X  
X*** /usr4/public/src/t2current/./Makefile	Mon Nov  6 16:08:13 1989
X--- /usr4/public/src/t2new/./Makefile	Mon Nov  6 16:25:21 1989
X***************
X*** 12,18 ****
X  #	Note:		This is a System V Makefile, so you may
X  #			have some problems making a few of the items.
X  #
X! #ident  "@(#)Makefile: 1.33 Copyright 89/08/28 17:13:47 Chris Lewis"
X  
X  #	Set to where you want the user-interfaces to go
X  INDIR	= /usr/lbin
X--- 12,18 ----
X  #	Note:		This is a System V Makefile, so you may
X  #			have some problems making a few of the items.
X  #
X! #ident  "@(#)Makefile: 1.34 Copyright 89/10/20 11:01:50 Chris Lewis"
X  
X  #	Set to where you want the user-interfaces to go
X  INDIR	= /usr/lbin
X***************
X*** 143,146 ****
X  	su root -c "rm -f $(INSTALL); rmdir $(LIBDIR)"
X  
X  clean:
X! 	rm -f core *.o $(UTILLIST) ltest.troff
X--- 143,147 ----
X  	su root -c "rm -f $(INSTALL); rmdir $(LIBDIR)"
X  
X  clean:
X! 	rm -f core *.o troff2ps psroff psxlate upload showfont ltest.troff \
X! 	    dit2catwid
X*** /usr4/public/src/t2current/./ps.c	Mon Nov  6 16:09:00 1989
X--- /usr4/public/src/t2new/./ps.c	Mon Nov  6 16:25:22 1989
X***************
X*** 18,27 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)ps.c: 1.24 Copyright 89/08/28 17:11:47 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)ps.c: 1.24 Copyright 89/08/28 17:11:47 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X  #define	METRICS
X--- 18,27 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)ps.c: 1.26 Copyright 89/10/30 21:40:57 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)ps.c: 1.26 Copyright 89/10/30 21:40:57 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X  #define	METRICS
X***************
X*** 91,97 ****
X  	/* 19*/	{U, 0, 0, 1, ";",		";"},
X  	/* 20*/	{U, 0, 0, 1, NOCODE,		"unassigned"},
X  	/* 21*/	{U, 0, 0, 1, "a",		"a"},
X! 	/* 22*/	{D, 0, 0, 1, "doru",		"horizontal rule"},
X  	/* 23*/	{U, 0, 0, 1, "c",		"c"},
X  	/* 24*/	{U, 0, 0, 1, "`",		"` open"},
X  	/* 25*/	{U, 0, 0, 1, "e",		"e"},
X--- 91,97 ----
X  	/* 19*/	{U, 0, 0, 1, ";",		";"},
X  	/* 20*/	{U, 0, 0, 1, NOCODE,		"unassigned"},
X  	/* 21*/	{U, 0, 0, 1, "a",		"a"},
X! 	/* 22*/	{U, 0, 0, 1, "_",		"horizontal rule"},
X  	/* 23*/	{U, 0, 0, 1, "c",		"c"},
X  	/* 24*/	{U, 0, 0, 1, "`",		"` open"},
X  	/* 25*/	{U, 0, 0, 1, "e",		"e"},
X***************
X*** 156,162 ****
X  	/* 83*/	{U, 0, 0, 1, "\\256",		"fi"},
X  	/* 84*/	{U, 0, 0, 1, "\\257",		"fl"},
X  	/* 85*/	{D, 0, 0, 1, "doff",		"ff"},
X! 	/* 86*/	{S, 0, 0, 1, "\\242",		"cent sign"},
X  	/* 87*/	{D, 0, 0, 1, "doFl",		"ffl"},
X  	/* 88*/	{D, 0, 0, 1, "doFi",		"ffi"},
X  	/* 89*/	{U, 0, 0, 1, "\\(",		"("},
X--- 156,162 ----
X  	/* 83*/	{U, 0, 0, 1, "\\256",		"fi"},
X  	/* 84*/	{U, 0, 0, 1, "\\257",		"fl"},
X  	/* 85*/	{D, 0, 0, 1, "doff",		"ff"},
X! 	/* 86*/	{U, 0, 0, 1, "\\242",		"cent sign"},
X  	/* 87*/	{D, 0, 0, 1, "doFl",		"ffl"},
X  	/* 88*/	{D, 0, 0, 1, "doFi",		"ffi"},
X  	/* 89*/	{U, 0, 0, 1, "\\(",		"("},
END_OF_FILE
if test 7061 -ne `wc -c <'Patch01'`; then
    echo shar: \"'Patch01'\" unpacked with wrong size!
fi
# end of 'Patch01'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    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
-- 
He's a consultant:             | Chris Lewis, Elegant Communications Inc.
Lend him your watch            | UUCP {uunet!attcan,utzoo}!lsuc!eci386!clewis
and he'll tell you the time.   | Moderator of the Ferret mailing list.
   Don Munroe, Cosmic Commander|



More information about the Comp.sources.bugs mailing list