Patch 4 for psroff.

Chris Lewis clewis at eci386.uucp
Sun Dec 10 07:12:37 AEST 1989


Original-posting-by: clewis at eci386.uucp (Chris Lewis)
Reposted-by: emv at math.lsa.umich.edu (Edward Vielmetti)
Posting-id: 891209.2014
Posting-number: Volume TEST, Number TEST
Archive-name: psroff-Patch04.shar

[This is an experimental alt.sources re-posting from the
newsgroup(s) comp.sources.bugs.
No attempt has been made to edit, clean, modify, or otherwise
change the contents of the original posting, or to contact the
author.  Please consider cross-posting all sources postings to
alt.sources as a matter of course.]

[Comments on this service to emv at math.lsa.umich.edu (Edward Vielmetti)]


#! /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:  Patch04
# Wrapped by clewis at eci386 on Wed Dec  6 17:48:18 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Patch04' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Patch04'\"
else
echo shar: Extracting \"'Patch04'\" \(46091 characters\)
sed "s/^X//" >'Patch04' <<'END_OF_FILE'
XThis is patch 4 for psroff.
X
XWhen patching, please:
X	cd <your psroff directory>
X	unshar this patch
X	patch -N -p < <this patch>
X
X	make
X	su root
X	rm -fr /usr/lib/troff2 /usr/lib/tmac/tmac.t2
X	make install
X
X*** /usr4/public/src/t2current/./gfnttab.sh	Wed Dec  6 17:41:57 1989
X--- ./gfnttab.sh	Wed Dec  6 17:42:20 1989
X***************
X*** 1,12 ****
X  :
X! #@(#)gfnttab.sh 1.3 89/11/09
X  #	Set this to something non-null if you need a.out.h/COFF
X  #	headers on your width files, and the COFF/HEADERSIZE
X  #	defines cause dit2catwid to generate width tables that
X  #	troff screams about.
X  COMPILE=
X  trap "exit 1" 0 1 2 3 15
X! if [ ! -d /usr/lib/oldfonts ]
X  then
X      if mkdir /usr/lib/oldfonts
X      then
X--- 1,13 ----
X  :
X! #@(#)gfnttab.sh 1.6 89/12/06
X  #	Set this to something non-null if you need a.out.h/COFF
X  #	headers on your width files, and the COFF/HEADERSIZE
X  #	defines cause dit2catwid to generate width tables that
X  #	troff screams about.
X  COMPILE=
X+ install=$1
X  trap "exit 1" 0 1 2 3 15
X! if [ -n "$install" -a ! -d /usr/lib/oldfonts ]
X  then
X      if mkdir /usr/lib/oldfonts
X      then
X***************
X*** 52,58 ****
X  	    ;;
X      esac
X  done
X- set -ex
X- mv font/ft* /usr/lib/font
X  trap "" 0
X  exit 0
X--- 53,62 ----
X  	    ;;
X      esac
X  done
X  trap "" 0
X+ if [ -n "$install" ]
X+ then
X+     mv font/ft* /usr/lib/font
X+     exit $?
X+ fi
X  exit 0
X*** /usr4/public/src/t2current/./utils.c	Wed Dec  6 17:39:49 1989
X--- ./utils.c	Wed Dec  6 17:42:21 1989
X***************
X*** 15,27 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)utils.c: 1.7 Copyright 89/07/17 10:58:36 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)utils.c: 1.7 Copyright 89/07/17 10:58:36 Chris Lewis"
X  #endif
X  
X  #ifdef	DEBUG
X  debugprintf(fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
X  char	*fmt;
X  int	a1, a2, a3, a4, a5, a6, a7, a8, a9, a10; {
X--- 15,43 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)utils.c: 1.8 Copyright 89/12/05 14:03:48 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)utils.c: 1.8 Copyright 89/12/05 14:03:48 Chris Lewis"
X  #endif
X  
X  #ifdef	DEBUG
X+ #ifdef VFPRINTF
X+ #include <varargs.h>
X+ /* VARARGS */
X+ debugprintf(va_alist)
X+ va_dcl
X+ {
X+ 	va_list args;
X+ 	char *fmt;
X+ 
X+ 	va_start(args);
X+ 	fmt = va_arg(args, char *);
X+ 	VFPRINTF(diagFile, fmt, args);
X+ 	va_end(args);
X+ }
X+ #else
X+ /* VARARGS1 ARGSUSED */
X  debugprintf(fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
X  char	*fmt;
X  int	a1, a2, a3, a4, a5, a6, a7, a8, a9, a10; {
X***************
X*** 30,35 ****
X--- 46,52 ----
X  	fprintf(diagFile, buf);
X  }
X  #endif
X+ #endif
X  
X  char *skipblanks(p)
X  register char *p; {
X***************
X*** 47,53 ****
X  
X  interp(buf, xlator, suffix)
X  char *buf, *suffix; FUNC xlator; {
X!     register char *p, *ep;
X      char token[512];
X      p = gettok(buf, token);
X      if (0 == strcmp(token, "include") || 0 == strcmp(token, "binclude")) {
X--- 64,70 ----
X  
X  interp(buf, xlator, suffix)
X  char *buf, *suffix; FUNC xlator; {
X!     register char *p;
X      char token[512];
X      p = gettok(buf, token);
X      if (0 == strcmp(token, "include") || 0 == strcmp(token, "binclude")) {
X***************
X*** 85,91 ****
X  char nodename[25];
X  getnodename() {
X      FILE *uuname;
X-     int c;
X      if ((uuname = popen("uuname -l", "r")) == NULL)
X  	strcpy(nodename, "<noname>");
X      else {
X--- 102,107 ----
X*** /usr4/public/src/t2current/./lj.c	Wed Dec  6 17:41:58 1989
X--- ./lj.c	Wed Dec  6 17:42:21 1989
X***************
X*** 52,61 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)lj.c: 1.9 Copyright 89/11/22 12:05:06 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)lj.c: 1.9 Copyright 89/11/22 12:05:06 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X  #define	USED	1
X--- 52,61 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)lj.c: 1.10 Copyright 89/12/05 14:03:51 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)lj.c: 1.10 Copyright 89/12/05 14:03:51 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X  #define	USED	1
X***************
X*** 75,81 ****
X  }
X  
X  static
X! doPageStart(e) {
X      currentPage++;
X      pagePending = 0;
X  }
X--- 75,81 ----
X  }
X  
X  static
X! doPageStart() {
X      currentPage++;
X      pagePending = 0;
X  }
X***************
X*** 143,149 ****
X  	doPageStart();
X      }
X  
X!     DEBUGPRINTF("x,y=%d,%d; font=%d, points=%d, tc=%d\n",
X  	x, y, font, points, troffChar);
X  
X      if (font == 3) {
X--- 143,149 ----
X  	doPageStart();
X      }
X  
X!     DEBUGPRINTF("x,y=%ld,%ld; font=%d, points=%d, tc=%d\n",
X  	x, y, font, points, troffChar);
X  
X      if (font == 3) {
X***************
X*** 223,233 ****
X  			be->bename);
X  		    exit(1);
X  		}
X! 		p->troffName = malloc(strlen(nbuf) + 1);
X  		strcpy(p->troffName, nbuf);
X! 		p->ascName = malloc(strlen(ljbuf) + 1);
X  		strcpy(p->ascName, ljbuf);
X! 		p->fontSeq = malloc(strlen(seqbuf) + 1);
X  		strcpy(p->fontSeq, seqbuf);
X  		p->flags = flags;
X  		p++;
X--- 223,233 ----
X  			be->bename);
X  		    exit(1);
X  		}
X! 		p->troffName = malloc((unsigned) strlen(nbuf) + 1);
X  		strcpy(p->troffName, nbuf);
X! 		p->ascName = malloc((unsigned) strlen(ljbuf) + 1);
X  		strcpy(p->ascName, ljbuf);
X! 		p->fontSeq = malloc((unsigned) strlen(seqbuf) + 1);
X  		strcpy(p->fontSeq, seqbuf);
X  		p->flags = flags;
X  		p++;
X***************
X*** 241,250 ****
X  
X  ljProlog() {
X      extern char *getlogin(), *ctime();
X!     char *buf2[15];
X      FILE *library;
X      int c;
X-     long curtime;
X  
X      currentPage = 0;
X      pagePending = 1;
X--- 241,249 ----
X  
X  ljProlog() {
X      extern char *getlogin(), *ctime();
X!     char buf2[15];
X      FILE *library;
X      int c;
X  
X      currentPage = 0;
X      pagePending = 1;
X***************
X*** 426,432 ****
X  	doPageStart();
X      }
X  
X!     DEBUGPRINTF("x,y=%d,%d; font=%d, points=%d, tc=%d\n",
X  	x, y, font, points, troffChar);
X  
X      if (font == 3)
X--- 425,431 ----
X  	doPageStart();
X      }
X  
X!     DEBUGPRINTF("x,y=%ld,%ld; font=%d, points=%d, tc=%d\n",
X  	x, y, font, points, troffChar);
X  
X      if (font == 3)
X*** /usr4/public/src/t2current/./troff2ps.1	Wed Dec  6 17:40:58 1989
X--- ./troff2ps.1	Wed Dec  6 17:42:22 1989
X***************
X*** 1,4 ****
X! .\"Copyright 1988 by Chris Lewis 1.3 89/04/21
X  .TH TROFF2PS 1 local
X  .SH NAME
X  troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
X--- 1,4 ----
X! .\"Copyright 1988 by Chris Lewis 1.5 89/12/06
X  .TH TROFF2PS 1 local
X  .SH NAME
X  troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
X***************
X*** 7,13 ****
X  [-D] 
X  .RI "[-d" xx "]"
X  .RI "[-l" length "]"
X! [-V] [-m]
X  .SH DESCRIPTION
X  .I Troff2ps
X  takes
X--- 7,13 ----
X  [-D] 
X  .RI "[-d" xx "]"
X  .RI "[-l" length "]"
X! [-V] [-M]
X  .SH DESCRIPTION
X  .I Troff2ps
X  takes
X***************
X*** 69,75 ****
X  to print a version message and quit.
X  .P
X  A trailer page of statistics can be generated by using the
X! .B -m
X  option provided that the driver supports it.
X  .SH "SPECIAL REQUESTS"
X  .BI troff2 xx
X--- 69,75 ----
X  to print a version message and quit.
X  .P
X  A trailer page of statistics can be generated by using the
X! .B -M
X  option provided that the driver supports it.
X  .SH "SPECIAL REQUESTS"
X  .BI troff2 xx
X***************
X*** 168,180 ****
X  a library file) does the same thing, except that the file included is
X  simply copied, no translations are done.
X  .SH FILES
X! .if t .ta 2i
X! .if n .ta 3i
X  /usr/lib/troff2	Troff2ps library directory
X  .br
X! /usr/lib/troff2/*.ps	Postscript libraries
X  .br
X! /usr/lib/troff2/*.lj	HP Laserjet libraries
X  .SH BUGS
X  Due to the nature by which special sequences are transmitted by
X  troff (stderr, forced into stdin by
X--- 168,182 ----
X  a library file) does the same thing, except that the file included is
X  simply copied, no translations are done.
X  .SH FILES
X! .if t .ta 2.5i
X! .if n .ta 3.5i
X  /usr/lib/troff2	Troff2ps library directory
X  .br
X! /usr/lib/troff2/lib/*.ps	Postscript libraries
X  .br
X! /usr/lib/troff2/lib/*.lj	HP Laserjet libraries
X! .br
X! etc.
X  .SH BUGS
X  Due to the nature by which special sequences are transmitted by
X  troff (stderr, forced into stdin by
X*** /usr4/public/src/t2current/./psroff.sh	Wed Dec  6 17:39:46 1989
X--- ./psroff.sh	Wed Dec  6 17:42:24 1989
X***************
X*** 11,17 ****
X  #	Author: 	Chris Lewis
X  #	Specs:		troff driver
X  #
X! #ident  "@(#)psroff.sh: 1.15 Copyright 89/07/14 14:47:46 Chris Lewis"
X  term=false
X  type=`basename $0 | sed -e 's/^\(..\).*/\1/'`
X  copies=1
X--- 11,17 ----
X  #	Author: 	Chris Lewis
X  #	Specs:		troff driver
X  #
X! #ident  "@(#)psroff.sh: 1.19 Copyright 89/12/06 15:28:43 Chris Lewis"
X  term=false
X  type=`basename $0 | sed -e 's/^\(..\).*/\1/'`
X  copies=1
X***************
X*** 33,49 ****
X  	-n*)
X  	    copies=`echo $i | sed -e 's/-n//'`
X  	    ;;
X! 	-D | -m)
X  	    debug="$debug $i"
X  	    ;;
X  	-)
X  	    files="$files $i"
X  	    ;;
X  	-rL*)
X  	    eval `echo $i | sed -e 's/-rL\(..*\)\(.\)$/length=\1 prec=\2/'`
X  	    if [ -z "$length" -o -z "$prec" ]
X  	    then
X! 		echo "Bad length definition ($i) - must have value and scale" \
X  		    >&2
X  		exit 1
X  	    fi
X--- 33,65 ----
X  	-n*)
X  	    copies=`echo $i | sed -e 's/-n//'`
X  	    ;;
X! 	-D | -M)
X  	    debug="$debug $i"
X  	    ;;
X+ 	-m*)
X+ 	    mac=`echo $i | sed -e 's/-m//'`
X+ 	    file="%%TMACDIR%%/mac.$type/tmac.$mac"
X+ 	    if [ ! -r $file ]
X+ 	    then
X+ 		file="%%RTMACDIR%%/tmac.$mac"
X+ 	    fi
X+ 	    if [ ! -r $file ]
X+ 	    then
X+ 		echo "$0: Couldn't find tmac.$mac anywhere!" >&2
X+ 		exit 1
X+ 	    fi
X+ 	    files="$files $file"
X+ 	    seenmacro=1
X+ 	    ;;
X  	-)
X  	    files="$files $i"
X+ 	    seenfiles=1
X  	    ;;
X  	-rL*)
X  	    eval `echo $i | sed -e 's/-rL\(..*\)\(.\)$/length=\1 prec=\2/'`
X  	    if [ -z "$length" -o -z "$prec" ]
X  	    then
X! 		echo "$0: Bad length definition ($i) - must have value and scale" \
X  		    >&2
X  		exit 1
X  	    fi
X***************
X*** 55,60 ****
X--- 71,77 ----
X  	    ;;
X  	*)
X  	    files="$files $i"
X+ 	    seenfiles=1
X  	    if [ ! -r $i ]
X  	    then
X  		echo "$0: cannot open $i" >&2
X***************
X*** 64,69 ****
X--- 81,91 ----
X      esac
X  done
X  
X+ if [ -n "$seenmac" -a -z "$seenfiles" ]
X+ then
X+     files="$files -"
X+ fi
X+ 
X  if [ -x troff2ps ]
X  then
X      t2=./troff2ps
X***************
X*** 73,79 ****
X  
X  #	If you add a driver, you will have to add it here too:
X  case $type in
X!     lj | lk)		OUTPUT="%%LJOUTPUT%%" ;;
X      ps)		OUTPUT="%%PSOUTPUT%%" ;;
X      dt)		OUTPUT="%%DTOUTPUT%%" ;;
X      *)
X--- 95,103 ----
X  
X  #	If you add a driver, you will have to add it here too:
X  case $type in
X!     lj)		OUTPUT="%%LJOUTPUT%%" ;;
X!     lk)		OUTPUT="%%LKOUTPUT%%" ;;
X!     dj)		OUTPUT="%%DJOUTPUT%%" ;;
X      ps)		OUTPUT="%%PSOUTPUT%%" ;;
X      dt)		OUTPUT="%%DTOUTPUT%%" ;;
X      *)
X*** /usr4/public/src/t2current/./ps.h	Wed Dec  6 17:39:44 1989
X--- ./ps.h	Wed Dec  6 17:42:24 1989
X***************
X*** 13,22 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char psID[] = "@(#)ps.h: 1.14 Copyright 89/04/21 11:47:53 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)ps.h: 1.14 Copyright 89/04/21 11:47:53 Chris Lewis"
X  #endif
X  
X  /*	Points per inch (default PostScript resolution) */
X--- 13,22 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char psID[] = "@(#)ps.h: 1.16 Copyright 89/12/06 15:28:45 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)ps.h: 1.16 Copyright 89/12/06 15:28:45 Chris Lewis"
X  #endif
X  
X  /*	Points per inch (default PostScript resolution) */
X***************
X*** 46,49 ****
X  
X  #define	PSNAME	"ps"
X  
X! struct troff2befont psSymFont[], psStdFont[];
X--- 46,49 ----
X  
X  #define	PSNAME	"ps"
X  
X! extern struct troff2befont psSymFont[], psStdFont[];
X*** /usr4/public/src/t2current/./dt.c	Wed Dec  6 17:41:59 1989
X--- ./dt.c	Wed Dec  6 17:42:25 1989
X***************
X*** 20,29 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)dt.c: 1.6 Copyright 89/11/22 12:05:13 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)dt.c: 1.6 Copyright 89/11/22 12:05:13 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X  #define	MAXFONT	50
X--- 20,29 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)dt.c: 1.7 Copyright 89/12/05 14:04:01 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)dt.c: 1.7 Copyright 89/12/05 14:04:01 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X  #define	MAXFONT	50
X***************
X*** 308,314 ****
X  }
X  
X  static
X! doPageStart(e) {
X      currentPage++;
X      pagePending = 0;
X      printf("p%d\n", currentPage);
X--- 308,314 ----
X  }
X  
X  static
X! doPageStart() {
X      currentPage++;
X      pagePending = 0;
X      printf("p%d\n", currentPage);
X***************
X*** 341,347 ****
X  	    doPageStart();
X  	}
X  
X! 	DEBUGPRINTF("x,y=%d,%d; font=%d, points=%d, tc=%d\n",
X  	    x, y, font, points, troffChar);
X  
X  	if (font == 3) {
X--- 341,347 ----
X  	    doPageStart();
X  	}
X  
X! 	DEBUGPRINTF("x,y=%ld,%ld; font=%d, points=%d, tc=%d\n",
X  	    x, y, font, points, troffChar);
X  
X  	if (font == 3) {
X***************
X*** 515,523 ****
X  			be->bename);
X  		    exit(1);
X  		}
X! 		p->troffName = malloc(strlen(nbuf) + 1);
X  		strcpy(p->troffName, nbuf);
X! 		p->ascName = malloc(strlen(dtbuf) + 1);
X  		strcpy(p->ascName, dtbuf);
X  		p->flags = 0;
X  		p++;
X--- 515,523 ----
X  			be->bename);
X  		    exit(1);
X  		}
X! 		p->troffName = malloc((unsigned) strlen(nbuf) + 1);
X  		strcpy(p->troffName, nbuf);
X! 		p->ascName = malloc((unsigned) strlen(dtbuf) + 1);
X  		strcpy(p->ascName, dtbuf);
X  		p->flags = 0;
X  		p++;
X*** /usr4/public/src/t2current/./fonts.ps	Wed Dec  6 17:39:38 1989
X--- ./fonts.ps	Wed Dec  6 17:42:25 1989
X***************
X*** 1,4 ****
X! #@(#)fonts.ps 1.9 89/08/22
X  #	DO NOT CHANGE THE ORDER OF THE FIRST FOUR LINES - THESE ARE
X  #	THE DEFAULT TROFF FONTS IN POSITIONS 1-5.  IN PARTICULAR, IF
X  #	SYMBOL ISN'T THE FOURTH ENTRY AND BRACKETFONT ISN'T THE FIFTH, 
X--- 1,4 ----
X! #@(#)fonts.ps 1.11 89/12/06
X  #	DO NOT CHANGE THE ORDER OF THE FIRST FOUR LINES - THESE ARE
X  #	THE DEFAULT TROFF FONTS IN POSITIONS 1-5.  IN PARTICULAR, IF
X  #	SYMBOL ISN'T THE FOURTH ENTRY AND BRACKETFONT ISN'T THE FIFTH, 
X***************
X*** 10,20 ****
X  B	Times-Bold
X  S	Symbol
X  ..	BracketFont
X! BB	Bookman-Demi
X  BI	Times-BoldItalic
X- BO	Bookman-LightItalic
X- BR	Bookman-Light
X- BX	Bookman-DemiItalic
X  C	Courier
X  CB	Courier-Bold
X  CO	Courier-Oblique
X--- 10,20 ----
X  B	Times-Bold
X  S	Symbol
X  ..	BracketFont
X! AB	AvantGarde-Demi
X! AI	AvantGarde-DemiItalic
X! AR	AvantGarde-Book
X! AX	AvantGarde-BookOblique
X  BI	Times-BoldItalic
X  C	Courier
X  CB	Courier-Bold
X  CO	Courier-Oblique
X***************
X*** 23,27 ****
X  HB	Helvetica-Bold
X  HO	Helvetica-Oblique
X  HX	Helvetica-BoldOblique
X! PA	Palatino-Roman
X  PB	Palatino-Bold
X--- 23,38 ----
X  HB	Helvetica-Bold
X  HO	Helvetica-Oblique
X  HX	Helvetica-BoldOblique
X! Hb	Helvetica-Narrow-Bold
X! Hn	Helvetica-Narrow
X! Ho	Helvetica-Narrow-Oblique
X! Hx	Helvetica-Narrow-BoldOblique
X! NB	NewCenturySchlbk-Bold
X! NI	NewCenturySchlbk-Italic
X! NR	NewCenturySchlbk-Roman
X! NX	NewCenturySchlbk-BoldItalic
X  PB	Palatino-Bold
X+ PI	Palatino-Italic PalatPI
X+ PR	Palatino-Roman
X+ PX	Palatino-BoldItalic PalatPX
X+ ZC	ZapfChancery-MediumItalic
X*** /usr4/public/src/t2current/./lib.ps	Wed Dec  6 17:41:59 1989
X--- ./lib.ps	Wed Dec  6 17:42:26 1989
X***************
X*** 9,23 ****
X  %	Module:		lib.ps
X  %	Author: 	Chris Lewis
X  %	Specs:		Predefinitions for PostScript
X! %ident  @(#)lib.ps: 1.17 Copyright 89/11/07 14:51:24 Chris Lewis"
X  
X! /Y { 3 1 roll dup /CurY exch def moveto show } def
X! /X { exch CurY moveto show } def
X! 
X! /Hits	10 string def
X! Hits 0 0 1 string cvs putinterval
X! /Misses	10 string def
X! Misses 0 0 1 string cvs putinterval
X  
X  /drawfraction {
X      /denominator exch def
X--- 9,21 ----
X  %	Module:		lib.ps
X  %	Author: 	Chris Lewis
X  %	Specs:		Predefinitions for PostScript
X! %ident  @(#)lib.ps: 1.18 Copyright 89/12/06 15:28:48 Chris Lewis"
X  
X! /Y { 3 1 roll dup /CurY exch def moveto show } bind def
X! /X { exch CurY moveto show } bind def
X! /hits 0 def
X! /misses 0 def
X! /pagecount 0 def
X  
X  /drawfraction {
X      /denominator exch def
X***************
X*** 107,112 ****
X--- 105,135 ----
X      cF load setfont
X  } def
X  
X+ /metrics {
X+     /psize 16 def
X+     /Times-Roman psize SetFont
X+     /charcount exch def
X+     /curpos 720 def
X+     /xpos 72 def
X+     xpos curpos (Execution Summary:) Y
X+     /curpos curpos psize sub def
X+     xpos 36 add curpos (Font cache hits: )Y
X+     hits (         ) cvs show
X+     /curpos curpos psize sub def
X+     xpos 36 add curpos (Font cache misses: )Y
X+     misses (         ) cvs show
X+     /curpos curpos psize sub def
X+     xpos 36 add curpos (Character count: )Y
X+     charcount (        ) cvs show
X+     /curpos curpos psize sub def
X+     xpos 36 add curpos (Page count: )Y
X+     pagecount (        ) cvs show
X+     /curpos curpos psize sub def
X+     xpos 36 add curpos (Execution time (seconds): )Y
X+     usertime btime sub 0.001 mul (          ) cvs show
X+     showpage
X+ } def
X+ 
X  /docircle {
X      /origY exch def
X      /origX exch def
X***************
X*** 172,186 ****
X  %	These are macros so that they can be redefined.
X  %	print current page.
X  /ShowPage {
X-     Misses dup cvi misses add 10 string cvs 0 exch putinterval
X-     Hits dup cvi hits add 10 string cvs 0 exch putinterval
X      showpage
X  } def
X  
X  %	Emitted at beginning of page.
X  /StartPage {
X-     /hits 0 def
X-     /misses 0 def
X      Form
X  } def
X  
X--- 195,206 ----
X  %	These are macros so that they can be redefined.
X  %	print current page.
X  /ShowPage {
X      showpage
X+     /pagecount pagecount 1 add def
X  } def
X  
X  %	Emitted at beginning of page.
X  /StartPage {
X      Form
X  } def
X  
X***************
X*** 380,387 ****
X  } def end
X  /BracketFont BracketFontDict definefont pop
X  
X- /hits 0 def
X- /misses 0 def
X  
X  %	This macro is invoked by ShowPage to display the current form.
X  %	Usually redefined to point at a form loaded by an include
X--- 400,405 ----
X*** /usr4/public/src/t2current/./lj.h	Wed Dec  6 17:42:00 1989
X--- ./lj.h	Wed Dec  6 17:42:27 1989
X***************
X*** 16,25 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char ljID[] = "@(#)lj.h: 1.5 Copyright 89/11/22 12:06:46 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)lj.h: 1.5 Copyright 89/11/22 12:06:46 Chris Lewis"
X  #endif
X  
X  /*	We're using decipoints */
X--- 16,25 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char ljID[] = "@(#)lj.h: 1.6 Copyright 89/12/05 14:04:08 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)lj.h: 1.6 Copyright 89/12/05 14:04:08 Chris Lewis"
X  #endif
X  
X  /*	We're using decipoints */
X***************
X*** 65,75 ****
X  #define DJNAME	"dj"
X  
X  #ifdef	LJ
X! struct troff2befont ljSymFont[], ljStdFont[];
X  #endif
X  #ifdef	LK
X! struct troff2befont lkSymFont[], lkStdFont[];
X  #endif
X  #ifdef	DJ
X! struct troff2befont djSymFont[], djStdFont[];
X  #endif
X--- 65,75 ----
X  #define DJNAME	"dj"
X  
X  #ifdef	LJ
X! extern struct troff2befont ljSymFont[], ljStdFont[];
X  #endif
X  #ifdef	LK
X! extern struct troff2befont lkSymFont[], lkStdFont[];
X  #endif
X  #ifdef	DJ
X! extern struct troff2befont djSymFont[], djStdFont[];
X  #endif
X*** /usr4/public/src/t2current/./troff2.c	Wed Dec  6 17:42:01 1989
X--- ./troff2.c	Wed Dec  6 17:42:27 1989
X***************
X*** 15,24 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)troff2.c: 1.19 Copyright 89/11/22 12:05:18 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)troff2.c: 1.19 Copyright 89/11/22 12:05:18 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.21 Copyright 89/12/06 15:28:53 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)troff2.c: 1.21 Copyright 89/12/06 15:28:53 Chris Lewis"
X  #endif
X  
X  #define	ESC	0x80
X***************
X*** 70,78 ****
X  int	argc;
X  char	**argv; {
X  	register int nc, c;
X- 	register int i,j;
X  	register int units;
X! 	register int font, rail, mag, tilt, half, escape, lead;
X  
X  	extern int getopt();
X  	extern char *optarg;
X--- 70,77 ----
X  int	argc;
X  char	**argv; {
X  	register int nc, c;
X  	register int units;
X! 	register int font=0, rail=0, mag=0, tilt=0, half=0, escape=0, lead=0;
X  
X  	extern int getopt();
X  	extern char *optarg;
X***************
X*** 88,99 ****
X  	else
X  	    driver = "ZZ";
X  
X! 	while((c = getopt(argc, argv, "T:VDd:l:m")) != EOF)
X  	    switch (c) {
X  		case 'T':
X  		    device = optarg;
X  		    break;
X! 		case 'm':
X  		    metrics = 1;
X  		    break;
X  		case 'V':
X--- 87,98 ----
X  	else
X  	    driver = "ZZ";
X  
X! 	while((c = getopt(argc, argv, "T:VDd:l:M")) != EOF)
X  	    switch (c) {
X  		case 'T':
X  		    device = optarg;
X  		    break;
X! 		case 'M':
X  		    metrics = 1;
X  		    break;
X  		case 'V':
X***************
X*** 342,347 ****
X--- 341,347 ----
X  			break;
X  		/* Escape (horizontal motion) codes */
X  		case 0x80: case 0x81: case 0x82: case 0x83:
X+ #ifndef lint
X  		case 0x84: case 0x85: case 0x86: case 0x87:
X  		case 0x88: case 0x89: case 0x8a: case 0x8b:
X  		case 0x8c: case 0x8d: case 0x8e: case 0x8f:
X***************
X*** 373,378 ****
X--- 373,379 ----
X  		case 0xf4: case 0xf5: case 0xf6: case 0xf7:
X  		case 0xf8: case 0xf9: case 0xfa: case 0xfb:
X  		case 0xfc: case 0xfd: case 0xfe:
X+ #endif
X  
X  			units = CTOINT(c,0x7f);
X  			if (escape == FORWARD)
X***************
X*** 392,397 ****
X--- 393,399 ----
X  	if (be->beepilog)
X  	    (*be->beepilog) ();
X  	exit(0);
X+ 	/* NOTREACHED */
X  }
X  
X  usage() {
X*** /usr4/public/src/t2current/./defs.h	Wed Dec  6 17:42:01 1989
X--- ./defs.h	Wed Dec  6 17:42:29 1989
X***************
X*** 17,23 ****
X  #define	LIBDIR	"/usr/lib/troff2"
X  #endif
X  
X! #define	T2VERSION	"Release 1 Patchlevel 2 89/11/09"
X  
X  /*	Configuration parameters:
X   */
X--- 17,23 ----
X  #define	LIBDIR	"/usr/lib/troff2"
X  #endif
X  
X! #define	T2VERSION	"Release 1 Patchlevel 4 89/12/06"
X  
X  /*	Configuration parameters:
X   */
X***************
X*** 29,34 ****
X--- 29,47 ----
X  			   defined */
X  #undef	UNSIGNEDCHAR	/* define if chars are unsigned on your machine */
X  
X+ /*	The name of a routine that can be called thusly:
X+ 	VFPRINTF(stream, format, ap)
X+ 	FILE *stream;
X+ 	char *format;
X+ 	va_list ap;
X+     (eg: you have varargs.h and you have a routine functionally compatible
X+     with System V vfprintf.  I think BSD has one too)
X+ 
X+     undef if you don't got, and maybe my fakeout will work.
X+  */
X+ 
X+ #define VFPRINTF	vfprintf
X+ 
X  /*	Font width file configuration:
X  
X  	- If HEADERSIZE defined, use that many bytes as a prefix to the
X***************
X*** 74,79 ****
X--- 87,93 ----
X  #define	DT	/* ditroff */
X  #define	DJ	/* Deskjet */
X  
X+ 
X  /*	Edit no more .... */
X  
X  /*	configuration verification */
X***************
X*** 87,96 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char defid[] = "@(#)defs.h: 1.18 Copyright 89/11/09 14:30:36 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)defs.h: 1.18 Copyright 89/11/09 14:30:36 Chris Lewis"
X  #endif
X  
X  #include <stdio.h>
X--- 101,110 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char defid[] = "@(#)defs.h: 1.20 Copyright 89/12/06 15:28:57 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)defs.h: 1.20 Copyright 89/12/06 15:28:57 Chris Lewis"
X  #endif
X  
X  #include <stdio.h>
X***************
X*** 123,136 ****
X  #define	BACKWARD 5
X  
X  #define	TROFFRESOLUTION	432
X- #define	DEBUGPRINTF	if (diagFile) debugprintf
X  
X  #define	SPECIAL		/* define if you want to supports special directives */
X  #define	FORM		/* define if you want the forms facility */
X  
X  #define	DEBUG
X  #define	DEBUGPRINTF	if (diagFile) debugprintf
X  FILE	*diagFile;
X  
X  typedef int(*FUNC)();
X  
X--- 137,153 ----
X  #define	BACKWARD 5
X  
X  #define	TROFFRESOLUTION	432
X  
X  #define	SPECIAL		/* define if you want to supports special directives */
X  #define	FORM		/* define if you want the forms facility */
X  
X  #define	DEBUG
X+ 
X+ #ifdef DEBUG
X  #define	DEBUGPRINTF	if (diagFile) debugprintf
X  FILE	*diagFile;
X+ extern debugprintf();
X+ #endif
X  
X  typedef int(*FUNC)();
X  
X*** /usr4/public/src/t2current/./ps.c	Wed Dec  6 17:42:05 1989
X--- ./ps.c	Wed Dec  6 17:42:33 1989
X***************
X*** 18,31 ****
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)ps.c: 1.27 Copyright 89/11/22 12:05:29 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)ps.c: 1.27 Copyright 89/11/22 12:05:29 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X! #define	METRICS
X! static charCount;
X  
X  #ifdef	FORM
X  static char Overlay[100] = {""};
X--- 18,35 ----
X  
X  #ifndef	SVR3
X  #ifndef	lint
X! static char SCCSid[] = "@(#)ps.c: 1.30 Copyright 89/12/06 17:27:35 Chris Lewis";
X  #endif
X  #else
X! #ident  "@(#)ps.c: 1.30 Copyright 89/12/06 17:27:35 Chris Lewis" /*(SVR3)*/
X  #endif
X  
X! /*	ps.c will generate some additional "print" commands to cause
X! 	the printer to "print" back who did the job, and how long it
X! 	took.  define NOCHATTER if you don't want this.
X!  */
X! #undef	NOCHATTER	
X! static long charCount;
X  
X  #ifdef	FORM
X  static char Overlay[100] = {""};
X***************
X*** 101,107 ****
X  	/* 29*/	{U, 0, 0, 1, "r",		"r"},
X  	/* 30*/	{D, 0, 0, 1, "do12",		"1/2"},
X  	/* 31*/	{U, 0, 0, 1, "v",		"v"},
X! 	/* 32*/	{U, 0, 0, 1, "-",		"- hyphen"},
X  	/* 33*/	{U, 0, 0, 1, "w",		"w"},
X  	/* 34*/	{U, 0, 0, 1, "q",		"q"},
X  	/* 35*/	{U, 0, 0, 1, "/",		"/"},
X--- 105,111 ----
X  	/* 29*/	{U, 0, 0, 1, "r",		"r"},
X  	/* 30*/	{D, 0, 0, 1, "do12",		"1/2"},
X  	/* 31*/	{U, 0, 0, 1, "v",		"v"},
X! 	/* 32*/	{U, 0, 0, 1, "-",		"hyphen"},
X  	/* 33*/	{U, 0, 0, 1, "w",		"w"},
X  	/* 34*/	{U, 0, 0, 1, "q",		"q"},
X  	/* 35*/	{U, 0, 0, 1, "/",		"/"},
X***************
X*** 152,158 ****
X  	/* 79*/	{U, 0, 0, 1, "8",		"8"},
X  	/* 80*/	{U, 0, 0, 1, "9",		"9"},
X  	/* 81*/	{U, 0, 0, 1, "*",		"*"},
X! 	/* 82*/	{S, 0, 0, 1, "\\055",		"minus"},
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--- 156,162 ----
X  	/* 79*/	{U, 0, 0, 1, "8",		"8"},
X  	/* 80*/	{U, 0, 0, 1, "9",		"9"},
X  	/* 81*/	{U, 0, 0, 1, "*",		"*"},
X! 	/* 82*/	{U, 0, 0, 1, "\\261",		"minus (endash)"},
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***************
X*** 314,321 ****
X  };
X  
X  psPage() {
X! 	EMITPS("ShowPage\n");
X  	EMITPS("PageSave restore\n");
X  	pagePending = 1;
X  }
X  
X--- 318,327 ----
X  };
X  
X  psPage() {
X! 	EMITPS("hits misses\n");
X  	EMITPS("PageSave restore\n");
X+ 	EMITPS("/misses exch def /hits exch def\n");
X+ 	EMITPS("ShowPage\n");
X  	pagePending = 1;
X  }
X  
X***************
X*** 378,384 ****
X  
X  	charCount++;
X  
X! 	DEBUGPRINTF("x,y=%d,%d; font=%d, points=%d, tc=%d\n",
X  	    x, y, font, points, troffChar);
X  
X  	if (font == 3) {
X--- 384,390 ----
X  
X  	charCount++;
X  
X! 	DEBUGPRINTF("x,y=%ld,%ld; font=%d, points=%d, tc=%d\n",
X  	    x, y, font, points, troffChar);
X  
X  	if (font == 3) {
X***************
X*** 405,413 ****
X  	    case D:
X  		break;
X  	    default:
X- 		/* Typically used when the main fonts don't have the
X- 		   character desired.  Eg: right-hand is in the
X- 		   ZapfDingbats font */
X  		font = rp->t2b_font;
X  		break;
X  	}
X--- 411,416 ----
X***************
X*** 428,433 ****
X--- 431,443 ----
X  	if (rp->t2b_font == D)
X  	    EMITPS("%g %g %s\n", nx, ny, sequence);
X  	else {
X+ #ifdef	NEVER
X+ 	    if (lasty != ny) {
X+ 		EMITPS("%.2f %.2f(%s)Y\n", nx, ny, sequence);
X+ 		lasty = ny;
X+ 	    } else
X+ 		EMITPS("%.2f(%s)X\n", nx, sequence);
X+ #else
X  	    emitnum(nx);
X  	    if (lasty != ny) {
X  		EMITPS(" ");
X***************
X*** 436,441 ****
X--- 446,452 ----
X  		lasty = ny;
X  	    } else
X  		EMITPS("(%s)X\n",sequence);
X+ #endif
X  	}
X  }
X  
X***************
X*** 469,477 ****
X  			PSFONTS);
X  		    exit(1);
X  		}
X! 		p->troffName = malloc(strlen(nbuf) + 1);
X  		strcpy(p->troffName, nbuf);
X! 		p->fontName = malloc(strlen(psbuf) + 1);
X  		strcpy(p->fontName, psbuf);
X  		p++;
X  	}
X--- 480,488 ----
X  			PSFONTS);
X  		    exit(1);
X  		}
X! 		p->troffName = malloc((unsigned) strlen(nbuf) + 1);
X  		strcpy(p->troffName, nbuf);
X! 		p->fontName = malloc((unsigned) strlen(psbuf) + 1);
X  		strcpy(p->fontName, psbuf);
X  		p++;
X  	}
X***************
X*** 535,544 ****
X      EMITPS("%%%%Pages: (atend)\n");
X      EMITPS("%%%%DocumentFonts: (atend)\n");
X      EMITPS("%%%%EndComments\n");
X!     EMITPS("(%s@%s %s %s %s\n) print\n", lognm, nodename, buffer, 
X  	progname, T2VERSION);
X      psXlate(library);
X-     EMITPS("/GlobalSave save def\n");
X      EMITPS("%%%%EndProlog\n");
X      fclose(library);
X  }
X--- 546,559 ----
X      EMITPS("%%%%Pages: (atend)\n");
X      EMITPS("%%%%DocumentFonts: (atend)\n");
X      EMITPS("%%%%EndComments\n");
X!     EMITPS("/GlobalSave save def\n");
X!     EMITPS("/hits 0 def /misses 0 def\n");
X! #ifndef	NOCHATTER
X!     EMITPS("(%s@%s %s %s %s\\n) print\n", lognm, nodename, buffer, 
X  	progname, T2VERSION);
X+ #endif
X+     EMITPS("usertime /btime exch def\n");
X      psXlate(library);
X      EMITPS("%%%%EndProlog\n");
X      fclose(library);
X  }
X***************
X*** 545,574 ****
X  
X  psEpilog() {
X      int i;
X- #ifdef	METRICS
X-     int curpos = 720;		/* ten inches from bottom of page */
X- #define	XD	36
X- #define	CH	16
X-     if (metrics) {
X- 	psBin("");
X- 	psOverlay("");
X- 	doPageStart();
X- 	lastFont = -1;	/* force the font change nomatter what */
X- 	psSetFont(0, 16);
X- 	EMITPS("%d %d(%s Execution Summary:)Y\n", progname, XD, curpos);
X- 	curpos -= CH;
X- 	EMITPS("%d %d(Font cache hits: )Y Hits show\n",
X- 	    XD + 18, curpos);
X- 	curpos -= CH;
X- 	EMITPS("%d %d(Font cache misses: )Y Misses show\n",
X- 	    XD + 18, curpos);
X- 	curpos -= CH;
X- 	EMITPS("%d %d(Character Count: %d)Y\n",
X- 	    charCount, XD + 18, curpos);
X- 	psPage();
X-     }
X- #endif
X      EMITPS("%%%%Trailer\n");
X      EMITPS("GlobalSave restore\n");
X      EMITPS("%%%%DocumentFonts:");
X      for (i = 0; i < MAXFONT; i++)
X--- 560,573 ----
X  
X  psEpilog() {
X      int i;
X      EMITPS("%%%%Trailer\n");
X+     if (metrics)
X+ 	EMITPS("%ld metrics\n", charCount);
X+ #ifndef	NOCHATTER
X+     EMITPS("(Execution time (seconds): ) print\n");
X+     EMITPS("usertime btime sub 0.001 mul (          ) cvs print\n");
X+     EMITPS("(\\n) print\n");
X+ #endif
X      EMITPS("GlobalSave restore\n");
X      EMITPS("%%%%DocumentFonts:");
X      for (i = 0; i < MAXFONT; i++)
X*** /usr4/public/src/t2current/./fonts.dt	Wed Dec  6 17:39:37 1989
X--- ./fonts.dt	Wed Dec  6 17:42:36 1989
X***************
X*** 1,4 ****
X! #@(#)fonts.dt 1.1 89/06/14
X  #	DO NOT CHANGE THE ORDER OF THE FIRST FOUR LINES - THESE ARE
X  #	THE DEFAULT TROFF FONTS IN POSITIONS 1-4.  IN PARTICULAR, IF
X  #	SYMBOL ISN'T THE FOURTH ENTRY, BOXES, TABLES, AND OTHER FANCY
X--- 1,4 ----
X! #@(#)fonts.dt 1.2 89/12/04
X  #	DO NOT CHANGE THE ORDER OF THE FIRST FOUR LINES - THESE ARE
X  #	THE DEFAULT TROFF FONTS IN POSITIONS 1-4.  IN PARTICULAR, IF
X  #	SYMBOL ISN'T THE FOURTH ENTRY, BOXES, TABLES, AND OTHER FANCY
X***************
X*** 7,25 ****
X  I	Times-Italic
X  B	Times-Bold
X  S	Symbol
X  BI	Times-BoldItalic
X  H	Helvetica
X- HI	Helvetica-Oblique
X  HB	Helvetica-Bold
X! Ho	Helvetica-BoldOblique
X! CW	Courier
X! ZC	ZapfChancery-MediumItalic
X! A	AvantGarde-Book
X! AI	AvantGarde-BookOblique
X! AB	AvantGarde-Demi
X! Ai	AvantGarde-DemiItalic
X! AP	APL
X! h	Helvetica-Narrow
X! hi	Helvetica-Narrow-Oblique
X! hb	Helvetica-Narrow-Bold
X! hI	Helvetica-Narrow-BoldOblique
X--- 7,25 ----
X  I	Times-Italic
X  B	Times-Bold
X  S	Symbol
X+ ..	BracketFont
X+ BB	Bookman-Demi
X  BI	Times-BoldItalic
X+ BO	Bookman-LightItalic
X+ BR	Bookman-Light
X+ BX	Bookman-DemiItalic
X+ C	Courier
X+ CB	Courier-Bold
X+ CO	Courier-Oblique
X+ CX	Courier-BoldOblique
X  H	Helvetica
X  HB	Helvetica-Bold
X! HO	Helvetica-Oblique
X! HX	Helvetica-BoldOblique
X! PA	Palatino-Roman
X! PB	Palatino-Bold
X*** /usr4/public/src/t2current/./psroff.1	Wed Dec  6 17:39:45 1989
X--- ./psroff.1	Wed Dec  6 17:42:36 1989
X***************
X*** 1,10 ****
X! .\"Copyright 1988 by Chris Lewis 1.3 89/05/18
X  .TH PSROFF 1 local
X  .SH NAME
X! psroff,ljroff,xxroff \- troff replacement for PostScript or HP Printers.
X  .SH SYNOPSIS
X  .IB xx roff
X! [-D] [-X]
X  .RI "[-d" xx "]"
X  .RI "[-rL" length "]"
X  .RI [ troffopts ] files ...
X--- 1,10 ----
X! .\"Copyright 1988 by Chris Lewis 1.5 89/12/06
X  .TH PSROFF 1 local
X  .SH NAME
X! psroff,ljroff,xxroff \- troff replacement for PostScript or other printers
X  .SH SYNOPSIS
X  .IB xx roff
X! [-D] [-X] [-M]
X  .RI "[-d" xx "]"
X  .RI "[-rL" length "]"
X  .RI [ troffopts ] files ...
X***************
X*** 21,27 ****
X--- 21,31 ----
X  (or HP Laserjet) output to stdout.
X  The "-X" option does a "set -x" for debugging.
X  The "-D" option passes the "-D" option through to troff2ps.
X+ The "-M" option turns on printer metrics (if supported by the driver).
X  .P
X+ Note that -m directives are parsed by psroff itself, not troff, and
X+ must be invoked *after* -d if -d is used.
X+ .P
X  .I Psroff
X  can be made to generate several different printer output formats.
X  It selects which one by one of two methods.
X***************
X*** 65,71 ****
X  directives) together.
X  .P
X  Unfortunately, this means that you don't get to see troff-generated
X! errors except as "illegal flash" errors from troff2ps, or varying
X  degrees of extreme garbage on the printer.
X  If you encounter mangled output, try running
X  troff instead of psroff, with the ``-t'' option, and direct stdout
X--- 69,75 ----
X  directives) together.
X  .P
X  Unfortunately, this means that you don't get to see troff-generated
X! errors except possibly as "illegal flash" errors from troff2ps, or varying
X  degrees of extreme garbage on the printer.
X  If you encounter mangled output, try running
X  troff instead of psroff, with the ``-t'' option, and direct stdout
X*** /usr4/public/src/t2current/./Makefile	Wed Dec  6 17:41:34 1989
X--- ./Makefile	Wed Dec  6 17:42:37 1989
X***************
X*** 12,21 ****
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  #	Command to send the output from troff2
X  #	"rlp" is a local command for remote printing to an AppleLaser.
X--- 12,21 ----
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.38 Copyright 89/12/06 17:27:41 Chris Lewis"
X  
X  #	Set to where you want the user-interfaces to go
X! BINDIR	= /usr/lbin
X  
X  #	Command to send the output from troff2
X  #	"rlp" is a local command for remote printing to an AppleLaser.
X***************
X*** 27,42 ****
X  PSOUTPUT	= | $(LIBDIR)/psxlate | rlp -dgate!AppleLaser -n$$copies
X  #	System V'ish printing to printer called laser, with no filtering
X  LJOUTPUT	= | lp -dlaser -og -n$$copies
X  #	Ditroff output
X! DTOUTPUT	= | /usr/lib/troff/tpscript | rlp -dgate!AppleLaser
X  #	Testing type:
X  TTYPE	= ps
X  
X  #	Libraries for Troff2 internals, created if it doesn't exist.
X  LIBDIR	= /usr/lib/troff2
X  
X! #	nroff/troff macro directory
X! TMACDIR	= /usr/lib/tmac
X  #	Where should the manual pages go?
X  MANDIR	= /usr/man/local/man1
X  
X--- 27,52 ----
X  PSOUTPUT	= | $(LIBDIR)/psxlate | rlp -dgate!AppleLaser -n$$copies
X  #	System V'ish printing to printer called laser, with no filtering
X  LJOUTPUT	= | lp -dlaser -og -n$$copies
X+ DJOUTPUT	= $(LJOUTPUT)
X+ LKOUTPUT	= $(LJOUTPUT)
X  #	Ditroff output
X! DTOUTPUT	= | /usr/lib/troff/tpscript | rlp -dgate!AppleLaser -n$$copies
X  #	Testing type:
X  TTYPE	= ps
X+ TFLAGS	= -mt2 -M
X  
X  #	Libraries for Troff2 internals, created if it doesn't exist.
X+ #	This *must* be a directory all by itself with no other stuff
X+ #	in it.
X  LIBDIR	= /usr/lib/troff2
X  
X! #	nroff/troff macro directory for tmac.t2.
X! T2DIR	= /usr/lib/tmac
X! #	Where your real macros are
X! RTMACDIR = /usr/lib/tmac
X! #	Root for printer specific macro adapters:
X! #	Shouldn't have to change this.
X! TMACDIR	= $(LIBDIR)/macros
X  #	Where should the manual pages go?
X  MANDIR	= /usr/man/local/man1
X  
X***************
X*** 43,59 ****
X  #	Comment this if you don't have shared libraries ala 386/ix
X  LIBFLAGS = -lc_s
X  
X! INSTALL	=	$(LIBDIR)/troff2ps $(INDIR)/psroff $(LIBDIR)/psxlate \
X! 		$(TMACDIR)/tmac.t2 \
X  		$(MANDIR)/psroff.1 \
X  		$(MANDIR)/troff2ps.1 \
X! 		$(LIBDIR)/lib.lj  $(LIBDIR)/fonts.lj \
X! 		$(LIBDIR)/lib.lk $(LIBDIR)/fonts.lk \
X! 		$(LIBDIR)/lib.dt  $(LIBDIR)/fonts.dt \
X! 		$(LIBDIR)/lib.ps $(LIBDIR)/fonts.ps \
X! 		$(LIBDIR)/confid.ps $(LIBDIR)/lethead.ps
X  
X! DEFINES	= '-DLIBDIR="$(LIBDIR)"'
X  CFLAGS	= $(DEFINES)
X  
X  .SUFFIXES: .ps .ps~ .lj .lj~ .1 .1~ .lk .lk~ .dt .dt~ .tst .prt .m .m~
X--- 53,71 ----
X  #	Comment this if you don't have shared libraries ala 386/ix
X  LIBFLAGS = -lc_s
X  
X! #	Dinna touch from here on
X! PLIBDIR = $(LIBDIR)/lib
X! INSTALL	=	$(LIBDIR)/troff2ps $(BINDIR)/psroff $(LIBDIR)/psxlate \
X! 		$(T2DIR)/tmac.t2 \
X  		$(MANDIR)/psroff.1 \
X  		$(MANDIR)/troff2ps.1 \
X! 		$(PLIBDIR)/lib.lj  $(PLIBDIR)/fonts.lj \
X! 		$(PLIBDIR)/lib.lk $(PLIBDIR)/fonts.lk \
X! 		$(PLIBDIR)/lib.dt  $(PLIBDIR)/fonts.dt \
X! 		$(PLIBDIR)/lib.ps $(PLIBDIR)/fonts.ps \
X! 		$(PLIBDIR)/confid.ps $(PLIBDIR)/lethead.ps
X  
X! DEFINES	= '-DLIBDIR="$(PLIBDIR)"'
X  CFLAGS	= $(DEFINES)
X  
X  .SUFFIXES: .ps .ps~ .lj .lj~ .1 .1~ .lk .lk~ .dt .dt~ .tst .prt .m .m~
X***************
X*** 62,71 ****
X  	$(GET) $(GFLAGS) $<
X  
X  .m.prt:
X! 	tbl $*.m | eqn | ./psroff -d$(TTYPE) -mt2 -
X  
X  .m.tst:
X! 	tbl $*.m | eqn | ./psroff -d$(TTYPE) -t -mt2 - > $*.tst
X  
X  .m~.m:
X  	$(GET) $(GFLAGS) $<
X--- 74,83 ----
X  	$(GET) $(GFLAGS) $<
X  
X  .m.prt:
X! 	tbl $*.m | eqn | ./psroff -d$(TTYPE) $(TFLAGS) -
X  
X  .m.tst:
X! 	tbl $*.m | eqn | ./psroff -d$(TTYPE) $(TFLAGS) -t - > $*.tst
X  
X  .m~.m:
X  	$(GET) $(GFLAGS) $<
X***************
X*** 89,95 ****
X  	fonts.ps fonts.lj fonts.lk \
X  	confid.ps lethead.ps
X  
X! all:	$(UTILLIST)
X  
X  chartab.tst ltest.tst: troff2ps
X  chartab.prt ltest.prt: troff2ps
X--- 101,107 ----
X  	fonts.ps fonts.lj fonts.lk \
X  	confid.ps lethead.ps
X  
X! all:	$(UTILLIST) fonts
X  
X  chartab.tst ltest.tst: troff2ps
X  chartab.prt ltest.prt: troff2ps
X***************
X*** 107,112 ****
X--- 119,127 ----
X  		lj.o ljtables.o \
X  		$(LIBFLAGS)
X  
X+ dit2catwid:	dit2catwid.o
X+ 	$(CC) $(CFLAGS) -o dit2catwid dit2catwid.o $(LIBFLAGS)
X+ 
X  #	Drivers include dependencies - add to this list if you're adding
X  #	drivers.
X  t2conf.o:	defs.h ps.h lj.h dt.h
X***************
X*** 113,118 ****
X--- 128,134 ----
X  ps.o:	defs.h ps.h
X  lj.o ljtables.o:	defs.h lj.h
X  dt.o:	defs.h dt.h
X+ dit2catwid.o:	defs.h
X  
X  #	Testing software:
X  testps.o:	defs.h ps.h
X***************
X*** 119,140 ****
X  
X  troff2.o utils.o: defs.h
X  
X! install:	$(LIBDIR) $(TMACDIR) $(INSTALL) fonts
X  
X  fonts:	dit2catwid gfnttab
X! 	su root -c "./gfnttab"
X  
X  $(INSTALL):	$$(@F)
X  	su root -c "cp $(@F) $@"
X  
X! $(LIBDIR) $(TMACDIR):
X  	su root -c "mkdir $@"
X  
X  psroff:	psroff.sh Makefile
X  	sed -e 's;%%LJOUTPUT%%;$(LJOUTPUT);g' \
X  	    -e 's;%%PSOUTPUT%%;$(PSOUTPUT);g' \
X  	    -e 's;%%DTOUTPUT%%;$(DTOUTPUT);g' \
X  	    -e 's;%%LIBDIR%%;$(LIBDIR);g' \
X  	    psroff.sh > T
X  	chmod 755 T
X  	mv T psroff
X--- 135,164 ----
X  
X  troff2.o utils.o: defs.h
X  
X! install:	$(LIBDIR) $(T2DIR) $(TMACDIR) $(RTMACDIR) $(PLIBDIR) \
X! 		$(INSTALL) installfonts
X  
X  fonts:	dit2catwid gfnttab
X! 	./gfnttab
X! 
X! installfonts:	dit2catwid gfnttab
X! 	su root -c "./gfnttab install"
X  
X  $(INSTALL):	$$(@F)
X  	su root -c "cp $(@F) $@"
X  
X! $(LIBDIR) $(T2DIR) $(TMACDIR) $(PLIBDIR):
X  	su root -c "mkdir $@"
X  
X  psroff:	psroff.sh Makefile
X  	sed -e 's;%%LJOUTPUT%%;$(LJOUTPUT);g' \
X+ 	    -e 's;%%LKOUTPUT%%;$(LKOUTPUT);g' \
X+ 	    -e 's;%%DJOUTPUT%%;$(DJOUTPUT);g' \
X  	    -e 's;%%PSOUTPUT%%;$(PSOUTPUT);g' \
X  	    -e 's;%%DTOUTPUT%%;$(DTOUTPUT);g' \
X  	    -e 's;%%LIBDIR%%;$(LIBDIR);g' \
X+ 	    -e 's;%%TMACDIR%%;$(TMACDIR);g' \
X+ 	    -e 's;%%RTMACDIR%%;$(RTMACDIR);g' \
X  	    psroff.sh > T
X  	chmod 755 T
X  	mv T psroff
X***************
X*** 144,147 ****
X  
X  clean:
X  	rm -f core *.o troff2ps psroff psxlate upload showfont ltest.troff \
X! 	    dit2catwid
X--- 168,171 ----
X  
X  clean:
X  	rm -f core *.o troff2ps psroff psxlate upload showfont ltest.troff \
X! 	    dit2catwid *.tst *.prt
X*** /usr4/public/src/t2current/./dit2catwid.c	Wed Dec  6 17:42:03 1989
X--- ./dit2catwid.c	Wed Dec  6 17:42:38 1989
X***************
X*** 1,9 ****
X! /* Brute force ditroff to CAT width table converter 1.7 89/11/09
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.7 89/11/09";
X  
X  #include <stdio.h>
X  #include "defs.h"
X--- 1,9 ----
X! /* Brute force ditroff to CAT width table converter 1.8 89/12/06
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.8 89/12/06";
X  
X  #include <stdio.h>
X  #include "defs.h"
X***************
X*** 190,196 ****
X  	{"*"},
X  	{"+"},
X  	{","},
X! 	{"-"},		/* - hyphen - is this right? */
X  	{"."},
X  	{"/"},
X  	{"0"},
X--- 190,196 ----
X  	{"*"},
X  	{"+"},
X  	{","},
X! 	{"-"},		/* hyphen: -, \(hy */
X  	{"."},
X  	{"/"},
X  	{"0"},
X***************
X*** 281,287 ****
X  	{"14"},
X  	{"12"},
X  	{"34"},
X! 	{"-"},		/* - hyphen - is this right? */
X  	{"fi"},
X  	{"fl"},
X  	{"ff"},
X--- 281,287 ----
X  	{"14"},
X  	{"12"},
X  	{"34"},
X! 	{"\\-"},		/* \- hyphen */
X  	{"fi"},
X  	{"fl"},
X  	{"ff"},
X*** /usr4/public/src/t2current/./genftable.ps	Wed Dec  6 17:41:04 1989
X--- ./genftable.ps	Wed Dec  6 17:42:39 1989
X***************
X*** 7,13 ****
X  %	      defined (hand built) characters.
X  %
X  % Michael Rourke, University of N.S.W., Australia
X! % (included in troff2: 1.2 89/08/25)
X  
X  /t 30 string def
X  
X--- 7,13 ----
X  %	      defined (hand built) characters.
X  %
X  % Michael Rourke, University of N.S.W., Australia
X! % (included in troff2: 1.3 89/12/06)
X  
X  /t 30 string def
X  
X***************
X*** 563,578 ****
X  /Helvetica-Narrow	/HelvNarHn	/Hn	fontinfo
X  /Helvetica-Narrow-Oblique /HelvNarHo	/Ho	fontinfo
X  /Helvetica-Narrow-BoldOblique	/HelvNarHx	/Hx	fontinfo
X  /ZapfChancery-MediumItalic	/ZapfC	/ZC	fontinfo
X  /AvantGarde-Book	/AvantAR	/AR	fontinfo
X  /AvantGarde-BookOblique	/AvantAX	/AX	fontinfo
X  /AvantGarde-Demi	/AvantAB	/AB	fontinfo
X  /AvantGarde-DemiItalic	/AvantAI	/AI	fontinfo
X! /Palatino-Roman	/PalatPR	/PR	fontinfo
X! /Palatino-Bold	/PalatPB	/PB	fontinfo
X! /Palatino-BoldItalic /PalatPX	/PX	fontinfo
X! /Palatino-Italic /PalatPI	/PI	fontinfo
X! /NewCenturySchlbk-Bold		/NB	fontinfo
X! /NewCenturySchlbk-BoldItalic	/NX	fontinfo
X! /NewCenturySchlbk-Italic	/NI	fontinfo
X! /NewCenturySchlbk-Roman		/NR	fontinfo
X--- 563,579 ----
X  /Helvetica-Narrow	/HelvNarHn	/Hn	fontinfo
X  /Helvetica-Narrow-Oblique /HelvNarHo	/Ho	fontinfo
X  /Helvetica-Narrow-BoldOblique	/HelvNarHx	/Hx	fontinfo
X+ /Helvetica-Narrow-Bold	/HelvNarHb	/Hb	fontinfo
X  /ZapfChancery-MediumItalic	/ZapfC	/ZC	fontinfo
X  /AvantGarde-Book	/AvantAR	/AR	fontinfo
X  /AvantGarde-BookOblique	/AvantAX	/AX	fontinfo
X  /AvantGarde-Demi	/AvantAB	/AB	fontinfo
X  /AvantGarde-DemiItalic	/AvantAI	/AI	fontinfo
X! /Palatino-Roman		/PalatPR	/PR	fontinfo
X! /Palatino-Bold		/PalatPB	/PB	fontinfo
X! /Palatino-BoldItalic 	/PalatPX	/PX	fontinfo
X! /Palatino-Italic 	/PalatPI	/PI	fontinfo
X! /NewCenturySchlbk-Bold	/NewCB	/NB	fontinfo
X! /NewCenturySchlbk-BoldItalic /NewCX	/NX	fontinfo
X! /NewCenturySchlbk-Italic	/NewCI	/NI	fontinfo
X! /NewCenturySchlbk-Roman	/NewCR	/NR	fontinfo
X*** /usr4/public/src/t2current/./fonts.lj	Wed Dec  6 17:39:37 1989
X--- ./fonts.lj	Wed Dec  6 17:42:39 1989
X***************
X*** 1,4 ****
X! #@(#)fonts.lj 1.1 89/05/02
X  #	four fields:
X  #	troff-name english-name HPLJ-code-to-transmit flags
X  #		flags of interest: 02 indicates that it's a built-in font.
X--- 1,4 ----
X! #@(#)fonts.lj 1.2 89/12/04
X  #	four fields:
X  #	troff-name english-name HPLJ-code-to-transmit flags
X  #		flags of interest: 02 indicates that it's a built-in font.
X***************
X*** 18,24 ****
X  B  Times-Bold       \033(8U\033(s1p0s03b05T 2
X  S  Symbol           \033(8U\033(s0p0s00b03T 2
X  BI Times-BoldItalic \033(8U\033(s1p1s03b05T 2
X! CW Courier          \033(8U\033(s0p0s00b03T 2
X  CI Courier-Italic   \033(8U\033(s0p1s-3b03T 2
X  CB Courier-Bold     \033(8U\033(s0p0s03b03T 2
X  L  LinePrinter      \033(8U\033(s0p0s00b00T 2
X--- 18,24 ----
X  B  Times-Bold       \033(8U\033(s1p0s03b05T 2
X  S  Symbol           \033(8U\033(s0p0s00b03T 2
X  BI Times-BoldItalic \033(8U\033(s1p1s03b05T 2
X! C  Courier          \033(8U\033(s0p0s00b03T 2
X  CI Courier-Italic   \033(8U\033(s0p1s-3b03T 2
X  CB Courier-Bold     \033(8U\033(s0p0s03b03T 2
X  L  LinePrinter      \033(8U\033(s0p0s00b00T 2
X*** /usr4/public/src/t2current/./README	Wed Dec  6 17:42:15 1989
X--- ./README	Wed Dec  6 17:42:46 1989
X***************
X*** 1,4 ****
X! 			README 1.11 89/11/22
X  		See defs.h for the patchlevel
X  
X  Normal UNIX troff only prints its output on WANG C/A/T Phototypesetters.
X--- 1,4 ----
X! 			README 1.15 89/12/06
X  		See defs.h for the patchlevel
X  
X  Normal UNIX troff only prints its output on WANG C/A/T Phototypesetters.
X***************
X*** 321,327 ****
X  	   underscore rather than doru.  (horizontal lines sometimes
X  	   had holes in fonts other than Roman)
X  
X! Patch 2: Nov 9, 1989		(NEW FEATURES)
X  
X  	1) Installed DeskJet support from Ron Florence, uunet!mlfarm!ron
X  	   (Thanks Ron!)
X--- 321,327 ----
X  	   underscore rather than doru.  (horizontal lines sometimes
X  	   had holes in fonts other than Roman)
X  
X! Patch 2/3: Nov 9, 1989		(NEW FEATURES)
X  
X  	1) Installed DeskJet support from Ron Florence, uunet!mlfarm!ron
X  	   (Thanks Ron!)
X***************
X*** 343,348 ****
X--- 343,361 ----
X  	   sizeof(long).  Not to mention passing a string as the second
X  	   argument to strrchr (thanks to Eric Norum alberta!edson!bode!eric)
X  	10) Some paragraphing fixes (due to my own sloppiness)
X+ 
X+ Patch 4: Dec 6, 1989	(Installability/maintenance improvements)
X+ 	1) implementation of LIBDIR/macros and LIBDIR/lib directories,
X+ 	   and processing of "-m" in psroff rather than troff.
X+ 	2) Completion of ??OUTPUT stuff in Makefile and psroff.
X+ 	3) Some corrections in fonts.dt and fonts.lj
X+ 	4) Delinting and a bit of sizeof(int) != sizeof(long) fixes
X+ 	   courtesy Eric Norum.
X+ 	5) Fixed metrics and added printer execution time.
X+ 	6) Diddled around with hyphens/minus/\- in ps.c and dit2catwid.
X+ 	   Should work better now.  \- still broken, but better
X+ 	7) Minor cleanups here and there.
X+ 	8) Completed fonts.ps.
X  
X  PLEASE PLEASE PLEASE!  If you have any problems with it, or would like
X  to make some suggestions for changing it, or have implemented a new driver
END_OF_FILE
if test 46091 -ne `wc -c <'Patch04'`; then
    echo shar: \"'Patch04'\" unpacked with wrong size!
fi
# end of 'Patch04'
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
-- 
A fanatic is one who can't change his | Chris Lewis, Elegant Communications Inc
mind and won't change the subject.    | {uunet!attcan,utzoo}!lsuc!eci386!clewis
   [Winston Churchill]                | Ferret mailing list: eci386!ferret-list
				      | psroff mailing list: eci386!psroff-list



More information about the Alt.sources mailing list