🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Phill Everson Sat, 29 Jul 1989 16:00
Official Patches to thack (troff -> ps filter) #2
#5
Author: 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);
  }
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