home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / psroff3.0 / patch5 next >
Encoding:
Internet Message Format  |  1991-12-12  |  29.8 KB

  1. Subject: v25i032: psroff 3.0 patch 5
  2. Newsgroups: comp.sources.unix
  3. Approved: vixie@pa.dec.com
  4.  
  5. Submitted-By: clewis@ferret.ocunix.on.ca (Chris Lewis)
  6. Posting-Number: Volume 25, Issue 32
  7. Archive-Name: psroff3.0/patch5
  8.  
  9.     This is official patch 05 for Psroff 3.0.
  10.     Please apply it by:
  11.     cd <psroff source directory>
  12.     patch -N -p < <this file>
  13.  
  14. Just minor fixes this time.  Majority are about compilation
  15. on 286's with slightly odd compilers.
  16.  
  17. ./man/troff2ps.1.S        grammar fixes
  18. ./widths/dit2catwid.c        286 long versus int
  19. ./utils/Makefile        move asc2ps.o out of the way of psxlate builds.
  20. ./utils/pk2ps.c            printf "%d" versys "%ld".  sigh...
  21. ./utils/psxlate.c        Missing fclose - ascii to Postscript failed.
  22.                 ifdef out register - 286 compiler wimps out.
  23. ./utils.c            missing extern char *realloc()
  24. ./ps.c                moved \(ru and \(is slightly.  eqn should look
  25.                 nicer.
  26. ./dit.c                Missing * in (*p->f)().  Dumb 286.
  27. ./README            mkfont reference fixed.
  28. ./troff2.c            (*p->f)() and other 286 jazz.
  29. ./MISC                grammatical.
  30. ./defs.h            REGSPILL for undefing register on compilers
  31.                 that get confused by psxlate.c
  32. ./TROUBLE            grammatical.
  33. ./Makefile            grammatical changes in instructions.
  34. ./audit.S            enquoted something that needed it.
  35. ./psroff.S            compat with busted Xenix bourne shell.
  36. ./DITROFF            extensive rewrite.  Including pointers for
  37.                 groff.
  38. Index: ./man/troff2ps.1.S
  39. *** /tmp/PATCHold/./man/troff2ps.1.S    Wed Nov 13 00:37:46 1991
  40. --- ./man/troff2ps.1.S    Wed Nov 13 00:37:48 1991
  41. ***************
  42. *** 1,4 ****
  43. ! .\"Copyright 1988 by Chris Lewis 2.13 91/08/03
  44.   .TH TROFF2PS %%MANEXT%% "Psroff %%T2VERSION%%"
  45.   .SH NAME
  46.   troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
  47. --- 1,4 ----
  48. ! .\"Copyright 1988 by Chris Lewis 2.14 91/11/13
  49.   .TH TROFF2PS %%MANEXT%% "Psroff %%T2VERSION%%"
  50.   .SH NAME
  51.   troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
  52. ***************
  53. *** 113,119 ****
  54.   .PP
  55.   The
  56.   .BI \-P opt
  57. ! directive can be specified as many times as you wish, it tells
  58.   .I troff2ps
  59.   to emit each
  60.   .I opt
  61. --- 113,119 ----
  62.   .PP
  63.   The
  64.   .BI \-P opt
  65. ! directive can be specified as many times as you wish.  It tells
  66.   .I troff2ps
  67.   to emit each
  68.   .I opt
  69. ***************
  70. *** 157,164 ****
  71.   This is because individual fonts often do not scale very well.
  72.   The
  73.   .BI \-W directory
  74. ! allows you to specify where the width tables are, by default they
  75. ! are ``%%FONTDIR%%/\fItype\fP'', where \fItype\fP is the driver
  76.   type specified by the
  77.   .B \-T
  78.   option.
  79. --- 157,164 ----
  80.   This is because individual fonts often do not scale very well.
  81.   The
  82.   .BI \-W directory
  83. ! allows you to specify where the width tables are.  By default they
  84. ! are in ``%%FONTDIR%%/\fItype\fP'', where \fItype\fP is the driver
  85.   type specified by the
  86.   .B \-T
  87.   option.
  88. ***************
  89. *** 247,253 ****
  90.   The overlay is typically a name from the printer-specific library.
  91.   Eg: "Confidential" is the name for the confidential overlay.
  92.   Only supported by postscript driver and this directive must be
  93. ! executed before any output on the page the overlay is desired.
  94.   A O without a name (eg: ``.sR "O"'') cancels the current overlay.
  95.   More than one overlay can be specified in one ``O'' request, as
  96.   in "OLetterhead Confidential".
  97. --- 247,253 ----
  98.   The overlay is typically a name from the printer-specific library.
  99.   Eg: "Confidential" is the name for the confidential overlay.
  100.   Only supported by postscript driver and this directive must be
  101. ! executed before any output on the page where the overlay is desired.
  102.   A O without a name (eg: ``.sR "O"'') cancels the current overlay.
  103.   More than one overlay can be specified in one ``O'' request, as
  104.   in "OLetterhead Confidential".
  105. Index: ./widths/dit2catwid.c
  106. *** /tmp/PATCHold/./widths/dit2catwid.c    Wed Nov 13 00:38:07 1991
  107. --- ./widths/dit2catwid.c    Wed Nov 13 00:38:10 1991
  108. ***************
  109. *** 10,16 ****
  110.   
  111.   #ifndef    lint
  112.   static char SCCSID[] =
  113. !     "@(#)dit2catwid.c 2.9 Copyright 91/07/27 12:36:15 Chris Lewis";
  114.   #endif
  115.   
  116.   #include <stdio.h>
  117. --- 10,16 ----
  118.   
  119.   #ifndef    lint
  120.   static char SCCSID[] =
  121. !     "@(#)dit2catwid.c 2.10 Copyright 91/10/17 19:56:13 Chris Lewis";
  122.   #endif
  123.   
  124.   #include <stdio.h>
  125. ***************
  126. *** 371,377 ****
  127.       return;
  128.   
  129.       do {
  130. !     tok = gettoken(buffer, NULL);
  131.   
  132.       if (!tok)
  133.           continue;
  134. --- 371,377 ----
  135.       return;
  136.   
  137.       do {
  138. !     tok = gettoken(buffer, (char *)NULL);
  139.   
  140.       if (!tok)
  141.           continue;
  142. ***************
  143. *** 415,421 ****
  144.   #ifdef    DEBUG
  145.       printf("buffer: %s\n", buffer);
  146.   #endif
  147. !     tok = gettoken(buffer, NULL);
  148.       if (!tok)
  149.           continue;
  150.       if (strlen(tok) > 30) {
  151. --- 415,421 ----
  152.   #ifdef    DEBUG
  153.       printf("buffer: %s\n", buffer);
  154.   #endif
  155. !     tok = gettoken(buffer, (char *)NULL);
  156.       if (!tok)
  157.           continue;
  158.       if (strlen(tok) > 30) {
  159. Index: ./utils/Makefile
  160. *** /tmp/PATCHold/./utils/Makefile    Wed Nov 13 00:38:21 1991
  161. --- ./utils/Makefile    Wed Nov 13 00:38:22 1991
  162. ***************
  163. *** 4,10 ****
  164.   #    See the LICENSE file for a full description of the restrictions
  165.   #    under which this software is provided.
  166.   #
  167. ! #2.8 91/09/27
  168.   SCRIPTS    = psdtwd showfont mkenctab calcfonts catconv dodps
  169.   PROGRAMS = hpinterp psxlate pk2sfp pk2ditwid pktype dumpft pk2ps lj2ps \
  170.       asc2ps
  171. --- 4,10 ----
  172.   #    See the LICENSE file for a full description of the restrictions
  173.   #    under which this software is provided.
  174.   #
  175. ! #2.9 91/10/17
  176.   SCRIPTS    = psdtwd showfont mkenctab calcfonts catconv dodps
  177.   PROGRAMS = hpinterp psxlate pk2sfp pk2ditwid pktype dumpft pk2ps lj2ps \
  178.       asc2ps
  179. ***************
  180. *** 44,50 ****
  181. --- 44,52 ----
  182.   tmaps:    $(MAPS)
  183.   
  184.   asc2ps:    asc2ps.c
  185. +     -mv asc2ps.o asc2ps.x
  186.       $(CC) $(CFLAGS) -DALONE -o asc2ps asc2ps.c
  187. +     -mv asc2ps.x asc2ps.o
  188.   
  189.   $(MAPS):
  190.       cd maps ; get s.$(@F)
  191. Index: ./utils/pk2ps.c
  192. *** /tmp/PATCHold/./utils/pk2ps.c    Wed Nov 13 00:38:31 1991
  193. --- ./utils/pk2ps.c    Wed Nov 13 00:38:32 1991
  194. ***************
  195. *** 14,20 ****
  196.   
  197.   #ifndef    lint
  198.   static char SCCSID[] =
  199. !     "@(#)pk2ps.c 2.2 Copyright 91/02/20 09:10:38 Chris Lewis";
  200.   #endif
  201.   #include "defs.h"
  202.   #include "pk.h"
  203. --- 14,20 ----
  204.   
  205.   #ifndef    lint
  206.   static char SCCSID[] =
  207. !     "@(#)pk2ps.c 2.3 Copyright 91/10/22 03:03:11 Chris Lewis";
  208.   #endif
  209.   #include "defs.h"
  210.   #include "pk.h"
  211. ***************
  212. *** 107,113 ****
  213.       for (pc = p->pkp_chars; pc; pc = pc->pkc_next) {
  214.           if (pc->pkc_next)
  215.           printf("dup ");
  216. !         printf("%d /ch%d put\n", pc->pkc_char, pc->pkc_char);
  217.           highest = max(highest, pc->pkc_char);
  218.           chcount++;
  219.       }
  220. --- 107,113 ----
  221.       for (pc = p->pkp_chars; pc; pc = pc->pkc_next) {
  222.           if (pc->pkc_next)
  223.           printf("dup ");
  224. !         printf("%ld /ch%ld put\n", pc->pkc_char, pc->pkc_char);
  225.           highest = max(highest, pc->pkc_char);
  226.           chcount++;
  227.       }
  228. ***************
  229. *** 160,166 ****
  230.           continue;
  231.           }
  232.           printf(
  233. !         "    /ch%d [ %.2f %.2f %.2f %.2f %.2f %d %d %.2f %.2f\n\t<",
  234.           pc->pkc_char,
  235.   
  236.           DOTS2UNITS((double) pc->pkc_dx / pow2(16)),    /* width */
  237. --- 160,166 ----
  238.           continue;
  239.           }
  240.           printf(
  241. !         "    /ch%ld [ %.2f %.2f %.2f %.2f %.2f %ld %ld %.2f %.2f\n\t<",
  242.           pc->pkc_char,
  243.   
  244.           DOTS2UNITS((double) pc->pkc_dx / pow2(16)),    /* width */
  245. Index: ./utils/psxlate.c
  246. *** /tmp/PATCHold/./utils/psxlate.c    Wed Nov 13 00:38:45 1991
  247. --- ./utils/psxlate.c    Wed Nov 13 00:38:47 1991
  248. ***************
  249. *** 23,29 ****
  250.    */
  251.   #ifndef    lint
  252.   static char SCCSid[] =
  253. !     "@(#)psxlate.c: 2.16 Copyright 91/09/30 16:29:20 Chris Lewis";
  254.   #endif
  255.   
  256.   #ifdef    ALONE
  257. --- 23,29 ----
  258.    */
  259.   #ifndef    lint
  260.   static char SCCSid[] =
  261. !     "@(#)psxlate.c: 2.17 Copyright 91/10/23 10:47:15 Chris Lewis";
  262.   #endif
  263.   
  264.   #ifdef    ALONE
  265. ***************
  266. *** 33,38 ****
  267. --- 33,42 ----
  268.   #include "defs.h"
  269.   #endif
  270.   
  271. + #ifdef    REGSPILL
  272. + #define    register
  273. + #endif
  274.   int    xlate;
  275.   int    italic;
  276.   int    needd;
  277. ***************
  278. *** 192,197 ****
  279. --- 196,202 ----
  280.           if (verbose || debug)
  281.           fprintf(stderr, "DEBUG: non-Postscript file %s\n", buffer);
  282.           asc2ps(buffer);
  283. +         fclose(tempfile);
  284.           stripbyrange();
  285.           transform();
  286.           emit(tmp);
  287. Index: ./utils.c
  288. *** /tmp/PATCHold/./utils.c    Wed Nov 13 00:39:01 1991
  289. --- ./utils.c    Wed Nov 13 00:39:03 1991
  290. ***************
  291. *** 12,18 ****
  292.   
  293.   #ifndef    lint
  294.   static char SCCSid[] =
  295. !     "@(#)utils.c: 2.19 Copyright 91/09/30 16:29:32 Chris Lewis";
  296.   #endif
  297.   
  298.   #ifndef    HEADERSIZE
  299. --- 12,18 ----
  300.   
  301.   #ifndef    lint
  302.   static char SCCSid[] =
  303. !     "@(#)utils.c: 2.20 Copyright 91/10/18 16:32:49 Chris Lewis";
  304.   #endif
  305.   
  306.   #ifndef    HEADERSIZE
  307. ***************
  308. *** 210,215 ****
  309. --- 210,216 ----
  310.               }
  311.   
  312.               if (state == READEXT) {
  313. +                 extern char *realloc();
  314.                   if (!(extcount % EXTCHUNK)) {
  315.                   if (!extchars) {
  316.                       extchars = (struct troff2befont *)
  317. Index: ./ps.c
  318. *** /tmp/PATCHold/./ps.c    Wed Nov 13 00:39:32 1991
  319. --- ./ps.c    Wed Nov 13 00:39:37 1991
  320. ***************
  321. *** 15,21 ****
  322.   
  323.   #ifndef    lint
  324.   static char SCCSid[] =
  325. !     "@(#)ps.c: 2.14 Copyright 91/08/18 03:27:46 Chris Lewis";
  326.   #endif
  327.   
  328.   /*    ps.c will generate some additional "print" commands to cause
  329. --- 15,21 ----
  330.   
  331.   #ifndef    lint
  332.   static char SCCSid[] =
  333. !     "@(#)ps.c: 2.15 Copyright 91/11/13 00:29:48 Chris Lewis";
  334.   #endif
  335.   
  336.   /*    ps.c will generate some additional "print" commands to cause
  337. ***************
  338. *** 81,87 ****
  339.       /* 18*/    {N, 0, 0, 0, ";"},
  340.       /* 19*/    {N, 0, 0, 0, NOC},
  341.       /* 20*/    {N, 0, 0, 0, "a"},
  342. !     /* 21*/    {N, 0, 0, 0, "_"},
  343.       /* 22*/    {N, 0, 0, 0, "c"},
  344.       /* 23*/    {N, 0, 0, 0, "`"},
  345.       /* 24*/    {N, 0, 0, 0, "e"},
  346. --- 81,87 ----
  347.       /* 18*/    {N, 0, 0, 0, ";"},
  348.       /* 19*/    {N, 0, 0, 0, NOC},
  349.       /* 20*/    {N, 0, 0, 0, "a"},
  350. !     /* 21*/    {N, 0, 120, 0, "_"},
  351.       /* 22*/    {N, 0, 0, 0, "c"},
  352.       /* 23*/    {N, 0, 0, 0, "`"},
  353.       /* 24*/    {N, 0, 0, 0, "e"},
  354. ***************
  355. *** 242,248 ****
  356.       /* 50*/    {S, 0, 0, 0, "\114"},
  357.       /* 51*/    {S, 0, 0, 0, "\055"},
  358.       /* 52*/    {S, 0, 0, 0, "\107"},
  359. !     /* 53*/    {S, 0, 0, 0, "\362"},
  360.       /* 54*/    {S, 0, 0, 0, "\120"},
  361.       /* 55*/    {S, 0, 0, 0, "\314"},
  362.       /* 56*/    {S, 0, 0, 0, "\311"},
  363. --- 242,248 ----
  364.       /* 50*/    {S, 0, 0, 0, "\114"},
  365.       /* 51*/    {S, 0, 0, 0, "\055"},
  366.       /* 52*/    {S, 0, 0, 0, "\107"},
  367. !     /* 53*/    {S, 0, -80, 0, "\362"},
  368.       /* 54*/    {S, 0, 0, 0, "\120"},
  369.       /* 55*/    {S, 0, 0, 0, "\314"},
  370.       /* 56*/    {S, 0, 0, 0, "\311"},
  371. Index: ./dit.c
  372. *** /tmp/PATCHold/./dit.c    Wed Nov 13 00:39:49 1991
  373. --- ./dit.c    Wed Nov 13 00:39:51 1991
  374. ***************
  375. *** 12,18 ****
  376.   
  377.   #ifndef    lint
  378.   static char SCCSid[] =
  379. !     "@(#)dit.c: Copyright 91/09/30 16:29:42 Chris Lewis";
  380.   #endif
  381.   
  382.   extern struct cattab tabN[], tabS[], *extidx;
  383. --- 12,18 ----
  384.   
  385.   #ifndef    lint
  386.   static char SCCSid[] =
  387. !     "@(#)dit.c: Copyright 91/10/17 11:58:18 Chris Lewis";
  388.   #endif
  389.   
  390.   extern struct cattab tabN[], tabS[], *extidx;
  391. ***************
  392. *** 461,467 ****
  393.       xpos, ypos, opcode, ct, special));
  394.   
  395.               if (be->bedraw)
  396. !                 (be->bedraw)(xpos * TROFFRESOLUTION / indtres,
  397.                        ypos * TROFFRESOLUTION / indtres,
  398.                        opcode, ct, values, special);
  399.               xpos = newx;
  400. --- 461,467 ----
  401.       xpos, ypos, opcode, ct, special));
  402.   
  403.               if (be->bedraw)
  404. !                 (*be->bedraw)(xpos * TROFFRESOLUTION / indtres,
  405.                        ypos * TROFFRESOLUTION / indtres,
  406.                        opcode, ct, values, special);
  407.               xpos = newx;
  408. Index: ./README
  409. *** /tmp/PATCHold/./README    Wed Nov 13 00:40:06 1991
  410. --- ./README    Wed Nov 13 00:40:11 1991
  411. ***************
  412. *** 1,4 ****
  413. !         PSROFF RELEASE 3.0 README 2.20 91/07/20
  414.   
  415.               Feb 19, 1991
  416.               Chris Lewis
  417. --- 1,4 ----
  418. !         PSROFF RELEASE 3.0 README 2.21 91/10/11
  419.   
  420.               Feb 19, 1991
  421.               Chris Lewis
  422. ***************
  423. *** 59,65 ****
  424.         tables for the built-in fonts.
  425.       - If you're intending to use ditroff *input*, you should ensure
  426.         that you have makedev, or the PD makedev clone "mkfont" from
  427. !       comp.sources.unix in 1988.  There was a bug in mkfont which
  428.         bites on some machines, if your ditroff doesn't like the
  429.         width tables mkfont generates, contact me, I have a teensy patch
  430.         for it.
  431. --- 59,65 ----
  432.         tables for the built-in fonts.
  433.       - If you're intending to use ditroff *input*, you should ensure
  434.         that you have makedev, or the PD makedev clone "mkfont" from
  435. !       comp.sources.misc volume 2.  There was a bug in mkfont which
  436.         bites on some machines, if your ditroff doesn't like the
  437.         width tables mkfont generates, contact me, I have a teensy patch
  438.         for it.
  439. Index: ./troff2.c
  440. *** /tmp/PATCHold/./troff2.c    Wed Nov 13 00:40:27 1991
  441. --- ./troff2.c    Wed Nov 13 00:40:30 1991
  442. ***************
  443. *** 12,18 ****
  444.   
  445.   #ifndef    lint
  446.   static char SCCSid[] =
  447. !     "@(#)troff2.c: 2.21 Copyright 91/08/29 18:22:41 Chris Lewis";
  448.   #endif
  449.   
  450.   #define    ESC    0x80
  451. --- 12,18 ----
  452.   
  453.   #ifndef    lint
  454.   static char SCCSid[] =
  455. !     "@(#)troff2.c: 2.22 Copyright 91/10/17 11:58:25 Chris Lewis";
  456.   #endif
  457.   
  458.   #define    ESC    0x80
  459. ***************
  460. *** 711,717 ****
  461.       xpos, ypos, opcode, ct, string));
  462.   
  463.           if (be->bedraw)
  464. !             (be->bedraw)(specXPos, specYPos, opcode, ct, values,
  465.               string);
  466.           specXPos = newx;
  467.           specYPos = newy;
  468. --- 711,717 ----
  469.       xpos, ypos, opcode, ct, string));
  470.   
  471.           if (be->bedraw)
  472. !             (*be->bedraw)(specXPos, specYPos, opcode, ct, values,
  473.               string);
  474.           specXPos = newx;
  475.           specYPos = newy;
  476. ***************
  477. *** 739,750 ****
  478.           } else {
  479.               if (be->beputchar) {
  480.               if (p->ch_wididx == NTC) /* extended character */
  481. !                 (be->beputchar)(specXPos, specYPos,
  482.                   p->ch_set == N ? -font-1: -symidx-1,
  483.                   points, p->ch_catidx,
  484.                   extchars[p->ch_catidx].t2b_charseq);
  485.               else
  486. !                 (be->beputchar)(specXPos, specYPos,
  487.                   p->ch_set == N ? font: symidx,
  488.                   points, p->ch_catidx, (char *) NULL);
  489.               }
  490. --- 739,750 ----
  491.           } else {
  492.               if (be->beputchar) {
  493.               if (p->ch_wididx == NTC) /* extended character */
  494. !                 (*be->beputchar)(specXPos, specYPos,
  495.                   p->ch_set == N ? -font-1: -symidx-1,
  496.                   points, p->ch_catidx,
  497.                   extchars[p->ch_catidx].t2b_charseq);
  498.               else
  499. !                 (*be->beputchar)(specXPos, specYPos,
  500.                   p->ch_set == N ? font: symidx,
  501.                   points, p->ch_catidx, (char *) NULL);
  502.               }
  503. Index: ./MISC
  504. *** /tmp/PATCHold/./MISC    Wed Nov 13 00:40:52 1991
  505. --- ./MISC    Wed Nov 13 00:40:57 1991
  506. ***************
  507. *** 1,5 ****
  508.           Miscellaneous Tuning/Customization
  509. !             2.15 91/08/29
  510.   
  511.       - Vertical bars in eqn may not be vertical.  This is a botch
  512.         in some versions of eqn - namely, eqn is asking for "|"
  513. --- 1,5 ----
  514.           Miscellaneous Tuning/Customization
  515. !             2.16 91/11/13
  516.   
  517.       - Vertical bars in eqn may not be vertical.  This is a botch
  518.         in some versions of eqn - namely, eqn is asking for "|"
  519. ***************
  520. *** 212,223 ****
  521.   
  522.             x adjust, y adjust, scale default to 0, 0 and 100 respectively.
  523.             x and y adjust are multiplied by .01, then the pointsize
  524. !           and of the output driver to give the shift factor in
  525.             1/resolution units.  Scale allows you to change the size
  526.             of that one character (eg: you think bullet is too small), but
  527.             it isn't recommended too much (it may not work reasonably
  528.             on non-postscript drivers).  Again, scale is prescaled by
  529. !           .01 first, so 100 is 1-1.
  530.   
  531.             <sequence> defaults to <troffchar>.  N means normal mapping
  532.             (eg: for fonts other than S with no cross font jumping),
  533. --- 212,223 ----
  534.   
  535.             x adjust, y adjust, scale default to 0, 0 and 100 respectively.
  536.             x and y adjust are multiplied by .01, then the pointsize
  537. !           of the output driver to give the shift factor in
  538.             1/resolution units.  Scale allows you to change the size
  539.             of that one character (eg: you think bullet is too small), but
  540.             it isn't recommended too much (it may not work reasonably
  541.             on non-postscript drivers).  Again, scale is prescaled by
  542. !           .01 first, so 100 is 1:1.
  543.   
  544.             <sequence> defaults to <troffchar>.  N means normal mapping
  545.             (eg: for fonts other than S with no cross font jumping),
  546. Index: ./defs.h
  547. *** /tmp/PATCHold/./defs.h    Wed Nov 13 00:41:14 1991
  548. --- ./defs.h    Wed Nov 13 00:41:16 1991
  549. ***************
  550. *** 9,15 ****
  551.    */
  552.   
  553.   /*    Official Release and Patch level:    */
  554. ! #define    T2VERSION    "@(#)PSROFF Copyright 91/09/27 Chris Lewis - R3 PL4"
  555.   
  556.   /*    Configuration parameters:
  557.    */
  558. --- 9,15 ----
  559.    */
  560.   
  561.   /*    Official Release and Patch level:    */
  562. ! #define    T2VERSION    "@(#)PSROFF Copyright 91/11/02 Chris Lewis - R3 PL5"
  563.   
  564.   /*    Configuration parameters:
  565.    */
  566. ***************
  567. *** 24,29 ****
  568. --- 24,33 ----
  569.   
  570.   #undef  BCOPYLIB    /* Define if BCOPY is defined and you have */
  571.               /* a bcopy in your library */
  572. + #undef    REGSPILL    /* Define if your compiler gives "infinite register
  573. +                spill in utils/psxlate.c (Xenix III) */
  574. +     
  575.   
  576.   /*    The name of a routine that can be called thusly:
  577.       VFPRINTF(stream, format, ap)
  578. Index: ./TROUBLE
  579. *** /tmp/PATCHold/./TROUBLE    Wed Nov 13 00:41:28 1991
  580. --- ./TROUBLE    Wed Nov 13 00:41:31 1991
  581. ***************
  582. *** 1,4 ****
  583. !         Psroff 3.0 Trouble Shooting.... 2.15 91/07/20
  584.   
  585.   (psroff 1.0 users can use this to a certain extent.  This is relatively
  586.   unchanged from Psroff 2.0 except for the ditroff input capability)
  587. --- 1,4 ----
  588. !         Psroff 3.0 Trouble Shooting.... 2.16 91/11/13
  589.   
  590.   (psroff 1.0 users can use this to a certain extent.  This is relatively
  591.   unchanged from Psroff 2.0 except for the ditroff input capability)
  592. ***************
  593. *** 53,59 ****
  594.         Note, however, that some manual page sets do not mention either
  595.         of these options - in that case it's probably -F.
  596.         
  597. !       This is should be specified by "trofftype" in lib/psroff.lib.S.
  598.         If you have a "-T" version of troff, FONTDIR *must* be /usr/lib/font.
  599.         If your troff supports neither -T or -F (some real old versions of
  600.         Xenix, V7 perchance), you will have to install the width tables in
  601. --- 53,59 ----
  602.         Note, however, that some manual page sets do not mention either
  603.         of these options - in that case it's probably -F.
  604.         
  605. !       This should be specified by "trofftype" in lib/psroff.lib.S.
  606.         If you have a "-T" version of troff, FONTDIR *must* be /usr/lib/font.
  607.         If your troff supports neither -T or -F (some real old versions of
  608.         Xenix, V7 perchance), you will have to install the width tables in
  609. ***************
  610. *** 64,70 ****
  611.         In ditroff input, the trofftype is forced to be -T$width.
  612.   
  613.       - "psroff debug" - rerun the psroff command, additionally specifying
  614. !       "-F" in the command line.  This permit's troff's stderr to be
  615.         seen.  Correct any problems that it tells you about.  (eg:
  616.         "width option").  If you see lines of the form:
  617.           M<string>
  618. --- 64,70 ----
  619.         In ditroff input, the trofftype is forced to be -T$width.
  620.   
  621.       - "psroff debug" - rerun the psroff command, additionally specifying
  622. !       "-F" in the command line.  This permits troff's stderr to be
  623.         seen.  Correct any problems that it tells you about.  (eg:
  624.         "width option").  If you see lines of the form:
  625.           M<string>
  626. ***************
  627. *** 74,80 ****
  628.         of the width table files.  HEADERSIZE (defs.h) allows you to
  629.         specify an arbitrary number of bytes on the front of the table
  630.         in the width file.  Check /usr/lib/font/ftR (should be part
  631. !       of your original troff installation.  Is ftR 224 bytes long?
  632.         If so, HEADERSIZE should be zero.  If not (eg: Ultrix,
  633.         BSD's, some older Xenix, V7), you will have to specify
  634.         HEADERSIZE.  SunOS, VAX/Ultrix wants 32.  (should be the size
  635. --- 74,80 ----
  636.         of the width table files.  HEADERSIZE (defs.h) allows you to
  637.         specify an arbitrary number of bytes on the front of the table
  638.         in the width file.  Check /usr/lib/font/ftR (should be part
  639. !       of your original troff installation).  Is ftR 224 bytes long?
  640.         If so, HEADERSIZE should be zero.  If not (eg: Ultrix,
  641.         BSD's, some older Xenix, V7), you will have to specify
  642.         HEADERSIZE.  SunOS, VAX/Ultrix wants 32.  (should be the size
  643. ***************
  644. *** 127,133 ****
  645.          a HEADERSIZE guess, plus an error count.  The errorcount
  646.          will have a minimum value, ideally zero.  Set
  647.          the HEADERSIZE to the guess with the minimum error
  648. !        count and rebuild retry everything.  I won't attempt
  649.          to supply these numbers for each of these systems because
  650.          the number changes from release to release in some systems.
  651.   
  652. --- 127,133 ----
  653.          a HEADERSIZE guess, plus an error count.  The errorcount
  654.          will have a minimum value, ideally zero.  Set
  655.          the HEADERSIZE to the guess with the minimum error
  656. !        count and rebuild and retry everything.  I won't attempt
  657.          to supply these numbers for each of these systems because
  658.          the number changes from release to release in some systems.
  659.   
  660. ***************
  661. *** 449,455 ****
  662.         be the wrong size and some characters will be missing (italic
  663.         and bold "6").  See LASERFONTS/LJIII file.
  664.   
  665. ! Laserjet: lousey/wrong/missing characters (non-S font):
  666.   
  667.       - You got crummy fonts.  Go buy or steal some good ROMAN8's in Roman,
  668.         Italic and Bold at CAT troff's supported point sizes.
  669. --- 449,455 ----
  670.         be the wrong size and some characters will be missing (italic
  671.         and bold "6").  See LASERFONTS/LJIII file.
  672.   
  673. ! Laserjet: lousy/wrong/missing characters (non-S font):
  674.   
  675.       - You got crummy fonts.  Go buy or steal some good ROMAN8's in Roman,
  676.         Italic and Bold at CAT troff's supported point sizes.
  677. Index: ./Makefile
  678. *** /tmp/PATCHold/./Makefile    Wed Nov 13 00:41:54 1991
  679. --- ./Makefile    Wed Nov 13 00:41:56 1991
  680. ***************
  681. *** 7,13 ****
  682.   #    Function: Upper level makefile; configuration options.
  683.   #
  684.   #
  685. ! #ident  "@(#)Makefile: 2.24 Copyright 91/10/01 23:19:27 Chris Lewis"
  686.   
  687.   #    If you're not sure whether you have a System V make, leave
  688.   #    this alone, and run the make anyways.  If it dies horribly
  689. --- 7,13 ----
  690.   #    Function: Upper level makefile; configuration options.
  691.   #
  692.   #
  693. ! #ident  "@(#)Makefile: 2.26 Copyright 91/10/18 16:32:33 Chris Lewis"
  694.   
  695.   #    If you're not sure whether you have a System V make, leave
  696.   #    this alone, and run the make anyways.  If it dies horribly
  697. ***************
  698. *** 132,139 ****
  699.   #    enormous...  (5000+ blocks)
  700.   NEWFONTS = /tmp/newfonts
  701.   #    If you are going to be working with ditroff, set this to the
  702. ! #    path to the makedev (DWB) or mkfont (PD via comp.sources.unix) program.
  703. ! #    If this doesn't point at an executable program, nothing will happen.
  704.   #    A make install in the widths directory will go through the psrofflib
  705.   #    file, looking for each configuration requiring ditroff, and install
  706.   #    the needed widths in the proper directory.  This will NOT overwrite
  707. --- 132,141 ----
  708.   #    enormous...  (5000+ blocks)
  709.   NEWFONTS = /tmp/newfonts
  710.   #    If you are going to be working with ditroff, set this to the
  711. ! #    path to the makedev (DWB) or mkfont (PD via comp.sources.misc vol 2)
  712. ! #    program.  If this doesn't point at an executable program, nothing will
  713. ! #    happen.
  714. ! #
  715.   #    A make install in the widths directory will go through the psrofflib
  716.   #    file, looking for each configuration requiring ditroff, and install
  717.   #    the needed widths in the proper directory.  This will NOT overwrite
  718. ***************
  719. *** 261,268 ****
  720.       cd lib ; $(MAKE) lj.fonts lj.lib
  721.       cd utils ; $(MAKE) buildfonts
  722.   
  723.   myuid:
  724. !     echo 'main() { printf("%d\\n", getuid()); exit(0); }' > myuid.c
  725.       $(CC) -o myuid myuid.c
  726.       rm -f myuid.c
  727.   
  728. --- 263,271 ----
  729.       cd lib ; $(MAKE) lj.fonts lj.lib
  730.       cd utils ; $(MAKE) buildfonts
  731.   
  732. + #    putchar(10).  Sigh...
  733.   myuid:
  734. !     echo 'main() { printf("%d%c", getuid(), 10); exit(0); }' > myuid.c
  735.       $(CC) -o myuid myuid.c
  736.       rm -f myuid.c
  737.   
  738. Index: ./audit.S
  739. *** /tmp/PATCHold/./audit.S    Wed Nov 13 00:42:09 1991
  740. --- ./audit.S    Wed Nov 13 00:42:15 1991
  741. ***************
  742. *** 6,12 ****
  743.   #    under which this software is provided.
  744.   #
  745.   #
  746. ! #    Psroff checking script 2.11 91/08/18
  747.   chkinst=false
  748.   for i
  749.   do
  750. --- 6,12 ----
  751.   #    under which this software is provided.
  752.   #
  753.   #
  754. ! #    Psroff checking script 2.12 91/11/13
  755.   chkinst=false
  756.   for i
  757.   do
  758. ***************
  759. *** 339,345 ****
  760.       echo "   * $msgtyp: FONTDIR/$width not installed yet"
  761.       echo "              psroff -T$width won't work until you do"
  762.       fi
  763. !     if [ ! -d widths/width${width} ]
  764.       then
  765.       echo "   * WARNING: no widths/width${width} directory"
  766.       fi
  767. --- 339,345 ----
  768.       echo "   * $msgtyp: FONTDIR/$width not installed yet"
  769.       echo "              psroff -T$width won't work until you do"
  770.       fi
  771. !     if [ ! -d "widths/width${width}" ]
  772.       then
  773.       echo "   * WARNING: no widths/width${width} directory"
  774.       fi
  775. Index: ./psroff.S
  776. *** /tmp/PATCHold/./psroff.S    Wed Nov 13 00:42:29 1991
  777. --- ./psroff.S    Wed Nov 13 00:42:30 1991
  778. ***************
  779. *** 7,13 ****
  780.   #
  781.   #    Specs:        troff2ps driver
  782.   #
  783. ! #ident  "@(#)psroff.sh: 2.16 Copyright 91/09/28 00:08:35 Chris Lewis"
  784.   
  785.   LIBDIR="%%LIBDIR%%"
  786.   FONTDIR="%%FONTDIR%%"
  787. --- 7,13 ----
  788.   #
  789.   #    Specs:        troff2ps driver
  790.   #
  791. ! #ident  "@(#)psroff.sh: 2.17 Copyright 91/11/13 00:30:44 Chris Lewis"
  792.   
  793.   LIBDIR="%%LIBDIR%%"
  794.   FONTDIR="%%FONTDIR%%"
  795. ***************
  796. *** 18,24 ****
  797.   then
  798.       type=$PSROFF
  799.   else
  800. !     type=`basename $0 | sed -n -e 's;^\([^/]*\)roff$;\1;p'`
  801.       if [ -z "$type" ]
  802.       then
  803.       echo "psroff: Can't intuit psroff type from $0" >&2
  804. --- 18,24 ----
  805.   then
  806.       type=$PSROFF
  807.   else
  808. !     type=`basename $0 | sed -n -e 's;roff$;;p'`
  809.       if [ -z "$type" ]
  810.       then
  811.       echo "psroff: Can't intuit psroff type from $0" >&2
  812. ***************
  813. *** 161,172 ****
  814.   fi
  815.   
  816.   #    If -N in t2arg, then this is ditroff.
  817. ! if [ -n "`echo "$t2arg" | sed -n -e '/-N/p'`" ]
  818.   then
  819.       otroff=
  820.       widtharg="-T$width"
  821.   else
  822. !     otroff=-t
  823.   fi
  824.   
  825.   #    Try to find troff
  826. --- 161,174 ----
  827.   fi
  828.   
  829.   #    If -N in t2arg, then this is ditroff.
  830. ! teststring=`echo "$t2arg" | sed -n -e '/-N/p'`
  831. ! if [ -n "$teststring" ]
  832. ! ]
  833.   then
  834.       otroff=
  835.       widtharg="-T$width"
  836.   else
  837. !     otroff="-t"
  838.   fi
  839.   
  840.   #    Try to find troff
  841. Index: ./DITROFF
  842. *** /tmp/PATCHold/./DITROFF    Wed Nov 13 00:42:38 1991
  843. --- ./DITROFF    Wed Nov 13 00:42:39 1991
  844. ***************
  845. *** 1,5 ****
  846.           Ditroff/Groff input configuration notes
  847. !             2.4 91/04/17
  848.   
  849.   This document attempts to describe some of the issues of using
  850.   psroff with ditroff or groff instead of CAT troff.  Some of the
  851. --- 1,5 ----
  852.           Ditroff/Groff input configuration notes
  853. !             2.6 91/10/18
  854.   
  855.   This document attempts to describe some of the issues of using
  856.   psroff with ditroff or groff instead of CAT troff.  Some of the
  857. ***************
  858. *** 28,46 ****
  859.   Width tables:
  860.   ------------
  861.   
  862. ! Psroff installation does not install ditroff width tables
  863. ! into a place for ditroff to find them.  The "make installwidths"
  864. ! only installs CAT-compatible width tables in FONTDIR/<widthname>/ft*,
  865. ! yet, ditroff will insist upon a FONTDIR/dev<widthname>/*.out format.
  866.   
  867.   Groff width tables are somewhat different - see the end of this file.
  868.   
  869.   The supplied lj3 and ps widths (widths/width???) files are designed to
  870. ! operate with full ditroff.  To use them, copy widths/widthlj3/[A-Z]* to
  871. ! FONTDIR/devlj3 or widths/widthps/[A-Z]* to FONTDIR/devpsc.  Then,
  872. ! chdir to that directory and run "makedev".  Some ditroff releases
  873. ! came without a "makedev" program.  A reimplementation
  874. ! of makedev was published in comp.sources.misc in 1988:
  875.   
  876.       v02i084   mkfont  mkfont/rdfont--compile and uncompile ditroff fonts
  877.   
  878. --- 28,45 ----
  879.   Width tables:
  880.   ------------
  881.   
  882. ! Psroff installation will install ditroff width tables in the
  883. ! right place, provided that FONTDIR is pointing at the directory
  884. ! that ditroff is expecting to see them (normally /usr/lib/font,
  885. ! same as C/A/T troff), AND that you have set MAKEDEV properly.
  886. ! This is done during the installdit phase in the widths Makefile.
  887.   
  888.   Groff width tables are somewhat different - see the end of this file.
  889.   
  890.   The supplied lj3 and ps widths (widths/width???) files are designed to
  891. ! operate with full ditroff.  To use them, make sure that MAKEDEV
  892. ! points to the makedev that comes with your ditroff, OR, points at
  893. ! "mkfont", which is was posted in comp.sources.misc:
  894.   
  895.       v02i084   mkfont  mkfont/rdfont--compile and uncompile ditroff fonts
  896.   
  897. ***************
  898. *** 65,98 ****
  899.   Macro Adapters & Page offsets:
  900.   -----------------------------
  901.   
  902. ! When you specify "-mm", psroff goes and looks for a file called
  903. ! "tmac.m" in the macro library area, namely, /usr/lib/tmac.
  904. ! In order to support CAT troff, psroff looks in LIBDIR/adapters
  905. ! for a file called tmac.m, which includes LIBDIR/adapters/cmn.pre
  906. ! to predefine some CAT-specific things, then includes
  907. ! /usr/lib/tmac/tmac.m to customize the real tmac.m macros for
  908. ! CAT limitations, then includes LIBDIR/adapters/cmn.post.
  909. ! You'll probably want to simply replace adapters/tmac.*.S with
  910. ! a ".so" of the real macros.  Eg, for -mm, replace tmac.m.S
  911. ! with:
  912. !     .so %%RTMACDIR%%/tmac.m
  913. !     .de sR
  914. !     \X'\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9'
  915. !     ..
  916. ! (Note, since I don't really know the ditroff convention for
  917. ! the contents of \X, other code that relies on particular
  918. ! behaviour for \X may not work.  Though, if you use the .sR
  919. ! mechanism as described in the psroff/troff2ps manual pages,
  920. ! that will work just as it does with CAT troff.
  921. ! Also, you'll probably want to override the default 1/2 inch offset
  922. ! that troff2ps implements by specifying -O0 in the t2arg entry of
  923. ! lib/psrofflib.S.
  924.   
  925. - You should test this stuff first, because the -N option overrides
  926. - part of the adapter file search.
  927.   Groff
  928.   -----
  929.   
  930. --- 64,72 ----
  931.   Macro Adapters & Page offsets:
  932.   -----------------------------
  933.   
  934. ! When using ditroff, the psroff shell script ignores the adapters
  935. ! talked about in psroff(1) and elsewhere.
  936.   
  937.   Groff
  938.   -----
  939.   
  940. ***************
  941. *** 109,114 ****
  942. --- 83,94 ----
  943.   script to call troff2ps (you will need to specify the -N option,
  944.   plus set the -p and -T values).  You will probably have to build
  945.   up a proper DESC file for widthlj if you aren't driving a LJ3.
  946. + If groff complains about the width tables, you will have to
  947. + remove the characters in the width tables that call for multiple
  948. + character sequences in the output.  In particular, specifications
  949. + with more than 4 characters in the fourth field.  Eg: "ff", "fi",
  950. + "fl" etc.
  951.   
  952.   Secondly, if you want to drive DVI interfaces from CAT troff, you
  953.   can use the ditroff-2-dvi converter with psroff's ditroff output
  954.  
  955. -- 
  956. Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
  957. Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
  958. Moderator of the ferret list: ferret-request@ferret.ocunix.on.ca
  959. **** NEVER let something mechanical know you're in a hurry. ****
  960.  
  961.