🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.misc
Article #5

Official Patches to thack (troff -> ps filter) #2

#5
From: Phill Everson
Date: Sat, 29 Jul 1989 16:00
92 lines
2849 bytes
*** README.orig	Fri Jul 28 13:48:51 1989
--- README	Fri Jul 28 13:50:02 1989
***************
*** 1,6 ****
  
  Enclosed please find thack, a Troff C/A/T to Postscript filter, written
! by a colleague of mine, Gareth Waddell.
  
  Sample usage of thack is, say:
  
--- 1,7 ----
  
  Enclosed please find thack, a Troff C/A/T to Postscript filter, written
! by a colleague of mine, Gareth Waddell. Attempt to make output 
! Adobe-conformant Postscript by David R. Kaelbling (drk@twinkie.Rational.COM)
  
  Sample usage of thack is, say:
  
*** thack.c.orig	Fri Jul 28 13:30:01 1989
--- thack.c	Fri Jul 28 13:48:26 1989
***************
*** 1,5 ****
--- 1,6 ----
  #include "th.h"
  
+ int npages;
  int xpos, ypos, cx, cy;
  int font, cfont, size, csize, tfont, tsize;
  char *pstr, *cstr();
***************
*** 408,413 ****
--- 409,415 ----
  	}
  	if (sflag)
  		endpage();
+ 	epilog();
  }
  
  tprint()
***************
*** 514,524 ****
--- 516,540 ----
  
  newpage()
  {
+ 	printf("%%%%Page: %d %d\n", npages, ++npages);
  	printf("save\n");
  }
  
  prolog()
  {
+ 	long clock = time(0);
+ 	  
+ 	printf("%%!PS-Adobe-\n");
+ 	printf("%%%%Creator: (thack - contact <everson@cs.bris.ac.uk>)\n");
+ 	printf("%%%%Title: unknown\n");
+ 	printf("%%%%CreationDate: %s", asctime (localtime (&clock)));
+ 	printf("%%%%Pages: (atend)\n");
+ 	printf("%%%%DocumentFonts: Times-Roman Times-Italic Times-Bold \
+ 	            Symbol Helvetica Helvetica-Oblique Helvetica-Bold Courier \
+ 		    Courier-Oblique Courier-Bold Times-BoldItalic Helvetica-BoldOblique \
+ 		    Courier-BoldOblique\n");
+ 	printf("%%%%EndComments\n");
+ 
  	printf("/P {moveto show} def\n");
  	printf("/X {currentpoint exch pop moveto show} def\n");
  	printf("/F {findfont exch scalefont setfont} def\n");
***************
*** 536,541 ****
--- 552,560 ----
  	printf("/HBO /Helvetica-BoldOblique def\n");
  	printf("/CBO /Courier-BoldOblique def\n");
  	printf("1 6 div dup scale\n");
+ 
+ 	printf("%%%%EndProlog\n");
+         npages = 0;
  }
  
  endpage()
***************
*** 543,546 ****
--- 562,571 ----
  	printf("showpage\n");
  	printf("restore\n");
  	cfont = csize = -1;	/* Doing this will cause a new font message */
+ }
+ 
+ epilog()
+ {
+   printf("%%%%Trailer\n");
+   printf("%%%%Pages: %d\n", npages);
  }
Technical Details
Message-ID: <868@csisles.Bristol.AC.UK>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!ukc!reading!cf-cm!csisles!everson

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!ukc!reading!cf-cm!csisles!everson
From: everson@CompSci.Bristol.AC.UK (Phill Everson )
Newsgroups: comp.bugs.misc
Subject: Official Patches to thack (troff -> ps filter) #2
Message-ID: <868@csisles.Bristol.AC.UK>
Date: 29 Jul 89 16:00:35 GMT
Reply-To: everson@CompSci.Bristol.AC.UK ()
Organization: Dept of Computer Science, University of Bristol, UK.
Lines: 92