🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sources.bugs
1 messages
1 total messages Started by Chris Lewis Tue, 09 Mar 1993 00:58
Official Patch 16 for Psroff 3.0
#730
Author: Chris Lewis
Date: Tue, 09 Mar 1993 00:58
192 lines
5169 bytes
Archive-name: psroff3.0/Patch.16
Submitted-by: clewis@ferret.ocunix.on.ca (Chris Lewis)

    This is official patch 16 for Psroff 3.0.
    Please apply it by:
	cd <psroff source directory>
	patch -N -p < <this file>
    
    The base release of psroff3.0 and first four patches were in
    comp.sources.unix volume 24.

The lj.c patch solves a serious problem with ditroff graphics (\D)
on HP Laserjet (not LJIII), _including_ groff's tbl implementation.
Caused crashes.  No more.

./widths/Makefile	fix for restrictive umasks
./defs.h		PL16
./psroff.S		parse problem with no arguments
./ljdraw.c		LJ line drawing botch.

Patchwrapped: 930308195336

Index: ./widths/Makefile
*** /tmp/PATCHold/./widths/Makefile	Mon Mar  8 19:52:37 1993
--- ./widths/Makefile	Mon Mar  8 19:52:38 1993
***************
*** 4,10 ****
  #    See the LICENSE file for a full description of the restrictions
  #    under which this software is provided.
  #
! #2.22 92/12/22
  SCRIPTS	= gfnttab genext installdit
  TD	= testdir
  PSW	= \
--- 4,10 ----
  #    See the LICENSE file for a full description of the restrictions
  #    under which this software is provided.
  #
! #2.23 93/03/08
  SCRIPTS	= gfnttab genext installdit
  TD	= testdir
  PSW	= \
***************
*** 250,255 ****
--- 250,256 ----
  	do \
  	    base=`echo $$i | sed -e 's/.*width//'` ; \
  	    test -d $(FONTDIR)/$$base || mkdir $(FONTDIR)/$$base ; \
+ 	    chmod 755 $(FONTDIR)/$$base ; \
  	    files=`echo width$$base/ft*` ; \
  	    if [ "$$files" = "width$$base"'/ft*' ] ; \
  	    then \
Index: ./defs.h
*** /tmp/PATCHold/./defs.h	Mon Mar  8 19:52:49 1993
--- ./defs.h	Mon Mar  8 19:52:51 1993
***************
*** 9,15 ****
   */
  
  /*	Official Release and Patch level:	*/
! #define	T2VERSION	"@(#)PSROFF Copyright 93/01/03 Chris Lewis - R3 PL15"
  
  /*	Configuration parameters:
   */
--- 9,15 ----
   */
  
  /*	Official Release and Patch level:	*/
! #define	T2VERSION	"@(#)PSROFF Copyright 93/02/21 Chris Lewis - R3 PL16"
  
  /*	Configuration parameters:
   */
Index: ./psroff.S
*** /tmp/PATCHold/./psroff.S	Mon Mar  8 19:53:09 1993
--- ./psroff.S	Mon Mar  8 19:53:12 1993
***************
*** 7,13 ****
  #
  #	Specs:		troff2ps driver
  #
! #ident  "@(#)psroff.sh: 2.28 Copyright 93/01/10 01:20:52 Chris Lewis"
  
  LIBDIR="%%LIBDIR%%"
  FONTDIR="%%FONTDIR%%"
--- 7,13 ----
  #
  #	Specs:		troff2ps driver
  #
! #ident  "@(#)psroff.sh: 2.29 Copyright 93/03/08 19:42:10 Chris Lewis"
  
  LIBDIR="%%LIBDIR%%"
  FONTDIR="%%FONTDIR%%"
***************
*** 33,38 ****
--- 33,39 ----
  for i in "$@"
  do
      case $i in
+ 	'') ;;
  	-F)
  	    fail=true
  	    ;;
Index: ./ljdraw.c
*** /tmp/PATCHold/./ljdraw.c	Mon Mar  8 19:53:25 1993
--- ./ljdraw.c	Mon Mar  8 19:53:27 1993
***************
*** 32,38 ****
  
  #ifndef	lint
  static char SCCSid[] =
!     "@(#)ljdraw.c: 1.6 Copyright 93/01/10 00:40:10 Chris Lewis";
  #endif
  
  static int ljLine(), ljPos(), lineseg();
--- 32,38 ----
  
  #ifndef	lint
  static char SCCSid[] =
!     "@(#)ljdraw.c: 1.7 Copyright 93/01/17 22:36:34 Chris Lewis";
  #endif
  
  static int ljLine(), ljPos(), lineseg();
***************
*** 55,60 ****
--- 55,62 ----
  #endif
  #define	RAD_C	(M_PI*2)
  
+ static int numx, numy;
+ 
  ljDraw(origX, origY, opcode, ctindex, numbers, saves)
  int origX, origY;
  int opcode;
***************
*** 68,73 ****
--- 70,81 ----
      origX = TROFF2LJX(origX);
      origY = TROFF2LJY(origY);
  
+     if (!numx) {
+ 	numx = pagewidth * LJRESOLUTION/TROFFRESOLUTION;
+ 	numy = pagelength * LJRESOLUTION/TROFFRESOLUTION;
+     }
+ 
+ 
      if (!opcode) {
  	ljPos(origX, origY);
  	return;
***************
*** 705,711 ****
      return(end - start);
  }
  
- static int numx, numy;
  emitrast()
  {
      int bperline;
--- 713,718 ----
***************
*** 713,721 ****
      register currow, bcount;
      int linecount = 0;
  
-     numx = pagewidth * LJRESOLUTION/TROFFRESOLUTION;
-     numy = pagelength * LJRESOLUTION/TROFFRESOLUTION;
- 
      bperline = ((numx + 7) / 8);
  
      if (!thispage)
--- 720,725 ----
***************
*** 777,787 ****
--- 781,795 ----
  
  setbit(x, y)
  register int x, y; {
+     if (!ljraster[y])
+ 	return;
      ljraster[y][x >> 3] |= (0x80 >> (x & 0x7));
  }
  
  clearbit(x, y)
  register int x, y; {
+     if (!ljraster[y])
+ 	return;
      ljraster[y][x >> 3] &= ~(0x80 >> (x & 0x7));
  }
  
-- 
Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
Ferret list: ferret-request@ferret.ocunix.on.ca
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads