everson@CompSci.Bristol.AC.UK (Phill Everson ) (08/29/89)
Lots of improvements to the look of the output this time. It can now print the Csh manual page pretty much perfectly. Also, the postscript generated is now faster. If you've missed some patches (or the original posting) they are in your local comp.sources.misc archive or I have them here. Phill Everson Medical Imaging Dept Comp Sci University of Bristol, UK *** README.orig Sat Aug 5 17:14:54 1989 --- README Mon Aug 28 17:51:38 1989 *************** *** 2,8 **** 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). ! Thanks to Paul Eggert <eggert@twinsun.com> for fixing a number of bugs. Sample usage of thack is, say: --- 2,12 ---- 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). ! Thanks to Paul Eggert <eggert@twinsun.com> and Tarjei T. Jensen ! <jensen@uninett.hsr> for fixing a number of bugs. Thanks also to Paul Eggert ! for speeding up the Postscript generated. Please send me any modifications ! you make to thack (in patch format if possible - (use diff -c)) and I'll ! post them to the net. Sample usage of thack is, say: *************** *** 22,28 **** be previewed under Sunview with the Rutherford Postscript Interpreter. If you're using US paper check you have -DUSPAPERLENGTH set in the ! Makefile, then just make. Phill Everson Computer Science Dept., --- 26,32 ---- be previewed under Sunview with the Rutherford Postscript Interpreter. If you're using US paper check you have -DUSPAPERLENGTH set in the ! Makefile, then just make. (It's set up for European A4 paper). Phill Everson Computer Science Dept., *** thack.c.orig Sat Aug 5 17:14:56 1989 --- thack.c Mon Aug 28 17:50:21 1989 *************** *** 9,15 **** #ifndef PAGELENGTH #ifdef USPAGELENGTH #ifdef sun ! #define PAGELENGTH 11.1875 #else #define PAGELENGTH 11 #endif --- 9,15 ---- #ifndef PAGELENGTH #ifdef USPAGELENGTH #ifdef sun ! #define PAGELENGTH 11.375 #else #define PAGELENGTH 11 #endif *************** *** 22,28 **** main() { ! int c; int sflag; int hdist, vdist; int esc, lead; --- 22,28 ---- main() { ! int c, i; int sflag; int hdist, vdist; int esc, lead; *************** *** 266,273 **** fontps(0, size, "\\301"); break; /* grave */ case 30: ! fontps(0, size, "^"); ! break; /* ^ */ case 32: pstr = "\\334"; break; /* left hand */ --- 266,273 ---- fontps(0, size, "\\301"); break; /* grave */ case 30: ! fontps(0, size, "\\303"); ! break; /* tilde */ case 32: pstr = "\\334"; break; /* left hand */ *************** *** 412,418 **** font &= 27; break; default: ! fprintf(stderr, "ILLEGAL\n"); break; } tfont = font; --- 412,418 ---- font &= 27; break; default: ! fputs( "ILLEGAL\n", stderr ); break; } tfont = font; *************** *** 421,426 **** --- 421,427 ---- if (sflag) endpage(); epilog(); + return 0; } tprint() *************** *** 429,485 **** printf("%d ", size * 6); switch (font) { case 0: ! printf("TR"); break; case 1: ! printf("TI"); break; case 2: ! printf("TB"); break; case 3: ! printf("S"); break; case 8: ! printf("H"); break; case 9: ! printf("HO"); break; case 10: ! printf("HB"); break; case 11: ! printf("S"); break; case 16: ! printf("C"); break; case 17: ! printf("CO"); break; case 18: ! printf("CB"); break; case 19: ! printf("S"); break; case 24: ! printf("TBI"); break; case 25: ! printf("HBO"); break; case 26: ! printf("CBO"); break; case 27: ! printf("S"); break; default: fprintf(stderr, "Illegal Font %d\n", font); } ! printf(" F\n"); cfont = font; csize = size; } --- 430,486 ---- printf("%d ", size * 6); switch (font) { case 0: ! fputs("TR", stdout); break; case 1: ! fputs("TI", stdout); break; case 2: ! fputs("TB", stdout); break; case 3: ! fputs("S", stdout); break; case 8: ! fputs("H", stdout); break; case 9: ! fputs("HO", stdout); break; case 10: ! fputs("HB", stdout); break; case 11: ! fputs("S", stdout); break; case 16: ! fputs("C", stdout); break; case 17: ! fputs("CO", stdout); break; case 18: ! fputs("CB", stdout); break; case 19: ! fputs("S", stdout); break; case 24: ! fputs("TBI", stdout); break; case 25: ! fputs("HBO", stdout); break; case 26: ! fputs("CBO", stdout); break; case 27: ! fputs("S", stdout); break; default: fprintf(stderr, "Illegal Font %d\n", font); } ! fputs(" F\n", stdout); cfont = font; csize = size; } *************** *** 494,501 **** fontps(f1, ps, str) char *str; { - tfont = font; - tsize = size; pstr = str; size = ps; font = f1; --- 495,500 ---- *************** *** 504,510 **** illegal(s) char *s; { ! fprintf(stderr, "Sequence %s is not allowed\n", s); } crsize(old, new) --- 503,509 ---- illegal(s) char *s; { ! fprintf(stderr, "Sequence \\(%s is not allowed\n", s); } crsize(old, new) *************** *** 547,555 **** 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"); printf("/TR /Times-Roman def\n"); printf("/TI /Times-Italic def\n"); printf("/TB /Times-Bold def\n"); --- 546,554 ---- Courier-BoldOblique\n"); printf("%%%%EndComments\n"); ! printf("/P {moveto show} bind def\n"); ! printf("/X {currentpoint exch pop moveto show} bind def\n"); ! printf("/F {findfont exch scalefont setfont} bind def\n"); printf("/TR /Times-Roman def\n"); printf("/TI /Times-Italic def\n"); printf("/TB /Times-Bold def\n");