home *** CD-ROM | disk | FTP | other *** search
- From decwrl!purdue!tut.cis.ohio-state.edu!unmvax!aplcen!ginosko!uunet!allbery Thu Aug 3 08:52:05 PDT 1989
- Article 1003 of comp.sources.misc:
- Path: decwrl!purdue!tut.cis.ohio-state.edu!unmvax!aplcen!ginosko!uunet!allbery
- From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
- Newsgroups: comp.sources.misc
- Subject: v07i111: Official Patch to thack (troff -> ps filter) #2
- Message-ID: <62023@uunet.UU.NET>
- Date: 30 Jul 89 22:42:37 GMT
- Sender: allbery@uunet.UU.NET
- Reply-To: everson%compsci.bristol.ac.uk@NSFnet-Relay.AC.UK
- Lines: 107
- Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 7, Issue 111
- Submitted-by: everson%compsci.bristol.ac.uk@NSFnet-Relay.AC.UK
- Archive-name: thack.p2
-
- Please find enclosed the 2nd Official Set of Patches to thack, a troff
- to postscript filter, recently posted to comp.sources.misc. These
- patches are the work of David R. Kaelbling (drk@twinkie.Rational.COM)
- and attempt to make the postscript produced Adobe-conformant. Thanks
- David.
-
- Phill Everson
- Medical Imaging
- Dept Comp Sci
- University of Bristol, UK
-
- *** 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);
- }
-
-
-