home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / psroff3.0 / patch7 < prev    next >
Encoding:
Text File  |  1992-01-11  |  19.8 KB  |  716 lines

  1. Newsgroups: comp.sources.unix
  2. From: clewis@ferret.ocunix.on.ca (Chris Lewis)
  3. Subject: v25i104: psroff 3.0, Patch07
  4. Sender: sources-moderator@pa.dec.com
  5. Approved: vixie@pa.dec.com
  6.  
  7. Submitted-By: clewis@ferret.ocunix.on.ca (Chris Lewis)
  8. Posting-Number: Volume 25, Issue 104
  9. Archive-Name: psroff3.0/patch7
  10.  
  11.     This is official patch 07 for Psroff 3.0.
  12.     Please apply it by:
  13.     cd <psroff source directory>
  14.     patch -N -p < <this file>
  15.  
  16.                 clewis@ferret.ocunix.on.ca (Chris Lewis)
  17.  
  18. These patches primarily impact people who are driving psroff from
  19. groff or ditroff, especially when generating HP Laserjet.
  20.  
  21. Highlights:
  22.     1) ditroff *input* coredumped when no character extensions
  23.        (-Tlj personality) sometimes.  Null dereference fixed.
  24.     2) When Postscript&optimizer turned on, "period leaders" (eg:
  25.        in table of contents) looked awful.  Disabled optimization on "."
  26.        character.  Problem seems to be that Postscript treats a
  27.        period's width differently when adjacent to another period.
  28.        (No, I don't really believe this either, but I don't believe
  29.        the width generator is wrong either)
  30.     3) ditroff input with optimizer on would die with "can't open
  31.        ftS2".  This is non-fatal, so error disabled for this font.
  32.     4) Included shell script to permit building laserjet fonts for
  33.        psroff from the Jetroff 1.0 font distribution (available from
  34.        c.s.u).  (Ie: If you don't have perl and thus can't run the
  35.        intelligent font generator, you can use this shell script.
  36.        See LASERFONTS file)
  37.     5) Without a DESC file for lj, you couldn't use it with
  38.        ditroff or groff.
  39.  
  40. ./widths/widthlj/DESC    Needed for ditroff/groff driving Laserjet.
  41. ./widths/Makefile    References DESC
  42. ./utils/calcfonts.S    Minor mods for generating commands from file lists.
  43. ./utils/pk2ditwid.c    Put "name" into generated width files.
  44. ./utils/psxlate.c    Memory allocation checking, minor botch in long lines.
  45. ./utils.c        Failed open of ftS2 no longer fatal. (optimizer)
  46. ./dit.c            Coredumps on null dereference.
  47. ./defs.h        PL7
  48. ./psroff.S        Finally fixed bloody v flag.
  49. ./opt.c            disable of . optimization
  50. ./zap            missing reference to utils, and fixes for broken shells
  51. ./LASERFONTS        How to build Laserjet fonts without Perl
  52.  
  53. Patchwrapped: 920105005055
  54.  
  55. Index: ./widths/widthlj/DESC
  56. 0a1,26
  57. > # DESC for LaserJet - dummied for ljroff using pk's or SFP's. 1.1 91/12/26
  58. > fonts 6 R I B H HI S
  59. > sizes 6 7 8 9 10 11 12 14 16 18 20 22 24 28 36 0
  60. > unitwidth 10
  61. > paperwidth 2550
  62. > paperlength 3300
  63. > hor 1
  64. > vert 1
  65. > res 300
  66. > charset
  67. > \| \^ \- \` \'
  68. > em hy bu sq ru fi fl ff Fi Fl de dg fm ct rg co
  69. > sc aa ga dd
  70. > *A *B *C *D *E *F *G *H *I *K *L *M *N *O *P *Q *R *S *T *U *W *X *Y *Z
  71. > *a *b *c *d *e *f *g *h *i *k *l *m *n *o *p *q *r *s *t *u *w *x *y *z
  72. > pl mi eq ** ul sl sr rn >= <= == ~= ap != -> <- ua da mu di +- ts
  73. > cu ca sb sp ib ip if pd gr no is pt es mo
  74. > br or ci lt lb rt rb lk rk bv lf rf lc rc
  75. > 12 13 14 18 23 34 38 58 78 rh lh
  76. > $J '' .. AE I! I? O/ PL Pl ae be bq cd d< d> dt hc l< lq ma n' o/ oe og
  77. > pm po pp r> ri rq sd ss ui um a~ a^ OE A: O: U: a: o: u:
  78. > !m nm !s :> <: <> a+ ag al an ax bt cm cr dm fa im io la lo m. mt te tf tm =~
  79. > AL Cc Cd Ch Cs L< R> r1 r2 u= d=
  80. > bx bs
  81. Index: ./widths/Makefile
  82. *** /tmp/PATCHold/./widths/Makefile    Sun Jan  5 00:48:19 1992
  83. --- ./widths/Makefile    Sun Jan  5 00:48:21 1992
  84. ***************
  85. *** 4,10 ****
  86.   #    See the LICENSE file for a full description of the restrictions
  87.   #    under which this software is provided.
  88.   #
  89. ! #2.19 91/07/31
  90.   SCRIPTS    = gfnttab genext installdit
  91.   TD    = testdir
  92.   PSW    = \
  93. --- 4,10 ----
  94.   #    See the LICENSE file for a full description of the restrictions
  95.   #    under which this software is provided.
  96.   #
  97. ! #2.20 91/12/26
  98.   SCRIPTS    = gfnttab genext installdit
  99.   TD    = testdir
  100.   PSW    = \
  101. ***************
  102. *** 16,22 ****
  103.       widthps/B  widthps/CO widthps/Hb widthps/NX widthps/ZC \
  104.       widthps/BB widthps/CX widthps/Hi widthps/PB widthps/ZD \
  105.       widthps/BI widthps/Hr widthps/PI widthps/BO widthps/H \
  106. !     widthps/Hx widthps/PR
  107.   LJ3W    = \
  108.       widthlj3/DESC widthlj3/S2 \
  109.           widthlj3/B widthlj3/I widthlj3/R widthlj3/S widthlj3/X \
  110. --- 16,23 ----
  111.       widthps/B  widthps/CO widthps/Hb widthps/NX widthps/ZC \
  112.       widthps/BB widthps/CX widthps/Hi widthps/PB widthps/ZD \
  113.       widthps/BI widthps/Hr widthps/PI widthps/BO widthps/H \
  114. !     widthps/Hx widthps/PR \
  115. !     widthlj/DESC
  116.   LJ3W    = \
  117.       widthlj3/DESC widthlj3/S2 \
  118.           widthlj3/B widthlj3/I widthlj3/R widthlj3/S widthlj3/X \
  119. Index: ./utils/calcfonts.S
  120. *** /tmp/PATCHold/./utils/calcfonts.S    Sun Jan  5 00:48:30 1992
  121. --- ./utils/calcfonts.S    Sun Jan  5 00:48:31 1992
  122. ***************
  123. *** 7,13 ****
  124.   #    See the LICENSE file for a full description of the restrictions
  125.   #    under which this software is provided.
  126.   #
  127. ! #Copyright 1991/09/27 Chris Lewis 2.3
  128.   
  129.   #    Set to path of sfp2pk if you have it, otherwise NULL.
  130.   $sfp2pk    = '';
  131. --- 7,13 ----
  132.   #    See the LICENSE file for a full description of the restrictions
  133.   #    under which this software is provided.
  134.   #
  135. ! #Copyright 1991/12/26 Chris Lewis 2.4
  136.   
  137.   #    Set to path of sfp2pk if you have it, otherwise NULL.
  138.   $sfp2pk    = '';
  139. ***************
  140. *** 106,127 ****
  141.           $found[$pointsize] = 1;
  142.           chop($usedfonts);
  143.           printf STDERR ("Generating $outf at $pointsize using $usedfonts\n");
  144. !         if (system($cmdline)) {
  145. !         printf STDERR ("failed ($!) $cmdline\n");
  146. !         exit(1);
  147. !         }
  148. !         if (system("$basedir/pk2sfp t > $newfonts/$outf.$pointsize.sfp")) {
  149. !         printf STDERR ("pk2sfp sort to build $outf.$pointsize.sfp failed\n");
  150. !         exit(1);
  151. !         }
  152. !         unlink('t');
  153. !         if ($sfp2pk) {
  154. !         if (system("$sfp2pk < $newfonts/$outf.$pointsize.sfp " .
  155. !             "> $newfonts/$outf.$pointsize.pk")) {
  156. !             printf STDERR ("sfp2pk < $outf.$pointsize.sfp failed\n");
  157.               exit(1);
  158.           }
  159. !         unlink("$newfonts/$outf.$pointsize.sfp");
  160.           }
  161.           close(GEN);
  162.       }
  163. --- 106,132 ----
  164.           $found[$pointsize] = 1;
  165.           chop($usedfonts);
  166.           printf STDERR ("Generating $outf at $pointsize using $usedfonts\n");
  167. !         if ($nogenerate) {
  168. !         printf "$cmdline\n";
  169. !         printf "$basedir/pk2sfp t > $newfonts/$outf.$pointsize.sfp\n";
  170. !         } else {
  171. !         if (system($cmdline)) {
  172. !             printf STDERR ("failed ($!) $cmdline\n");
  173. !             exit(1);
  174. !         }
  175. !         if (system("$basedir/pk2sfp t > $newfonts/$outf.$pointsize.sfp")) {
  176. !             printf STDERR ("pk2sfp sort to build $outf.$pointsize.sfp failed\n");
  177.               exit(1);
  178.           }
  179. !         unlink('t');
  180. !         if ($sfp2pk) {
  181. !             if (system("$sfp2pk < $newfonts/$outf.$pointsize.sfp " .
  182. !             "> $newfonts/$outf.$pointsize.pk")) {
  183. !             printf STDERR ("sfp2pk < $outf.$pointsize.sfp failed\n");
  184. !             exit(1);
  185. !             }
  186. !             unlink("$newfonts/$outf.$pointsize.sfp");
  187. !         }
  188.           }
  189.           close(GEN);
  190.       }
  191. ***************
  192. *** 184,189 ****
  193. --- 189,198 ----
  194.       $sfp2pk = $1;
  195.       } elsif ($arg =~ /^-f(.*)/) {
  196.       $newfonts = $1;
  197. +     } elsif ($arg =~ /^-F(.*)/) {
  198. +     $fontfilelist = $1;
  199. +     } elsif ($arg =~ /^-O/) {
  200. +     $nogenerate = 1;
  201.       } elsif ($arg !~ /^-/) {
  202.       if (-d $arg) {
  203.           $dirlist = "$dirlist $arg";
  204. ***************
  205. *** 202,209 ****
  206.       $sfp2pk = '';
  207.   }
  208.   
  209. ! if (!$dirlist) {
  210. !     printf STDERR ("No directories to search - aborting\n");
  211.       exit(0);
  212.   }
  213.   
  214. --- 211,218 ----
  215.       $sfp2pk = '';
  216.   }
  217.   
  218. ! if (!$dirlist && !$fontfilelist) {
  219. !     printf STDERR ("No directories or files to search - aborting\n");
  220.       exit(0);
  221.   }
  222.   
  223. ***************
  224. *** 215,223 ****
  225.   open(DISCARD, ">discard");
  226.   
  227.   $cmdline =
  228. !     "find $dirlist -type f '(' -name '*pk' -o -name '*.sfp' ')' -print";
  229.   printf STDERR ("Commandline: $cmdline\n");
  230. ! open(INLIST, "$cmdline|") || die "Cannot start $cmdline\n";
  231.   
  232.   while(<INLIST>) {
  233.       chop;
  234. --- 224,235 ----
  235.   open(DISCARD, ">discard");
  236.   
  237.   $cmdline =
  238. !     "find $dirlist -type f '(' -name '*pk' -o -name '*.sfp' ')' -print|";
  239. ! if ($fontfilelist) {
  240. !     $cmdline = "<$fontfilelist";
  241. ! }
  242.   printf STDERR ("Commandline: $cmdline\n");
  243. ! open(INLIST, "$cmdline") || die "Cannot start $cmdline\n";
  244.   
  245.   while(<INLIST>) {
  246.       chop;
  247. ***************
  248. *** 319,325 ****
  249.       'cmr,jmr', 'cmsy,jmsy', 'cmti,jmti', 'cmtrf,jmtrf');
  250.   
  251.   do gen('I', 'Times-Italic', '\033(8U\033(s1p1s-3b05T', 'ROMAN8',
  252. !     'cmsl,jmsl/cmr', 'cmsy,jmsy', 'cmti,jmti', 'cmtrf,jmtrf');
  253.   
  254.   do gen('B', 'Times-Bold', '\033(8U\033(s1p0s03b05T', 'ROMAN8',
  255.       'cmbx,jmbx/cmr', 'cmsy,jmsy', 'cmti,jmti', 'cmtrf,jmtrf');
  256. --- 331,337 ----
  257.       'cmr,jmr', 'cmsy,jmsy', 'cmti,jmti', 'cmtrf,jmtrf');
  258.   
  259.   do gen('I', 'Times-Italic', '\033(8U\033(s1p1s-3b05T', 'ROMAN8',
  260. !     'cmti,cmsl,jmsl/cmr', 'cmsy,jmsy', 'cmti,jmti', 'cmtrf,jmtrf');
  261.   
  262.   do gen('B', 'Times-Bold', '\033(8U\033(s1p0s03b05T', 'ROMAN8',
  263.       'cmbx,jmbx/cmr', 'cmsy,jmsy', 'cmti,jmti', 'cmtrf,jmtrf');
  264. Index: ./utils/pk2ditwid.c
  265. *** /tmp/PATCHold/./utils/pk2ditwid.c    Sun Jan  5 00:48:41 1992
  266. --- ./utils/pk2ditwid.c    Sun Jan  5 00:48:42 1992
  267. ***************
  268. *** 10,16 ****
  269.   
  270.   #ifndef    lint
  271.   static char SCCSID[] =
  272. !     "@(#)pk2ditwid.c 2.3 Copyright 91/02/20 09:09:45 Chris Lewis";
  273.   #endif
  274.   
  275.   #include "defs.h"
  276. --- 10,16 ----
  277.   
  278.   #ifndef    lint
  279.   static char SCCSID[] =
  280. !     "@(#)pk2ditwid.c 2.4 Copyright 91/12/26 17:59:20 Chris Lewis";
  281.   #endif
  282.   
  283.   #include "defs.h"
  284. ***************
  285. *** 131,136 ****
  286. --- 131,137 ----
  287.       } else {
  288.           fprintf(fout, "# %s\n", buf);
  289.           fprintf(fout, "# Generated by pk2ditwid\n");
  290. +         fprintf(fout, "name %s\n", buf);
  291.           fprintf(fout, "spacewidth 22\n");
  292.           fprintf(fout, "charset\n");
  293.       }
  294. Index: ./utils/psxlate.c
  295. *** /tmp/PATCHold/./utils/psxlate.c    Sun Jan  5 00:48:52 1992
  296. --- ./utils/psxlate.c    Sun Jan  5 00:48:54 1992
  297. ***************
  298. *** 23,29 ****
  299.    */
  300.   #ifndef    lint
  301.   static char SCCSid[] =
  302. !     "@(#)psxlate.c: 2.17 Copyright 91/10/23 10:47:15 Chris Lewis";
  303.   #endif
  304.   
  305.   #ifdef    ALONE
  306. --- 23,29 ----
  307.    */
  308.   #ifndef    lint
  309.   static char SCCSid[] =
  310. !     "@(#)psxlate.c: 2.18 Copyright 91/12/21 13:13:44 Chris Lewis";
  311.   #endif
  312.   
  313.   #ifdef    ALONE
  314. ***************
  315. *** 228,233 ****
  316. --- 228,234 ----
  317.       int nest = 0;
  318.   
  319.       magicstr = malloc(strlen(buffer) + 1);
  320. +     allchk(magicstr);
  321.       strcpy(magicstr, buffer);
  322.   
  323.       while(1) {
  324. ***************
  325. *** 452,457 ****
  326. --- 453,459 ----
  327.       append(2);
  328.   
  329.       p = (struct pagedesc *) malloc(sizeof(struct pagedesc) * pagecnt);
  330. +     allchk(p);
  331.   
  332.       mid = pagecnt / 2;
  333.   
  334. ***************
  335. *** 508,513 ****
  336. --- 510,516 ----
  337.       append(4);
  338.   
  339.       p = (struct pagedesc *) malloc(sizeof(struct pagedesc) * pagecnt);
  340. +     allchk(p);
  341.       mid = pagecnt / 2;
  342.       for (i = 0, end = pagecnt - 1; i < mid; i += 2, end -= 2) {
  343.       p[i] = pageidx[end];
  344. ***************
  345. *** 544,549 ****
  346. --- 547,553 ----
  347.   
  348.       if (buffer == NULL) {
  349.       buffer = malloc(4096);
  350. +     allchk(buffer);
  351.       buflimit = 4096;
  352.       }
  353.   
  354. ***************
  355. *** 552,559 ****
  356. --- 556,566 ----
  357.       putc(ch, out);
  358.       curcount++;
  359.       if (p - buffer > buflimit-3) {
  360. +         int offset = p - buffer;
  361.           buflimit += CHUNK;
  362.           buffer = realloc(buffer, buflimit);
  363. +         allchk(buffer);
  364. +         p = buffer + offset;
  365.       }
  366.       *p++ = ch;
  367.       if (ch == '\n')
  368. ***************
  369. *** 690,693 ****
  370. --- 697,709 ----
  371.       fputs(cmdbuffer, stdout);
  372.   
  373.       fclose(f);
  374. + }
  375. + allchk(p)
  376. + register char *p; {
  377. +     if (!p) {
  378. +     fprintf(stderr, "%s: [re|m]alloc failed - out of memory\n",
  379. +         progname);
  380. +     exit(1);
  381. +     }
  382.   }
  383. Index: ./utils.c
  384. *** /tmp/PATCHold/./utils.c    Sun Jan  5 00:49:12 1992
  385. --- ./utils.c    Sun Jan  5 00:49:22 1992
  386. ***************
  387. *** 12,18 ****
  388.   
  389.   #ifndef    lint
  390.   static char SCCSid[] =
  391. !     "@(#)utils.c: 2.21 Copyright 91/11/22 03:21:21 Chris Lewis";
  392.   #endif
  393.   
  394.   #ifndef    HEADERSIZE
  395. --- 12,18 ----
  396.   
  397.   #ifndef    lint
  398.   static char SCCSid[] =
  399. !     "@(#)utils.c: 2.22 Copyright 91/12/26 17:58:48 Chris Lewis";
  400.   #endif
  401.   
  402.   #ifndef    HEADERSIZE
  403. ***************
  404. *** 527,536 ****
  405.       DBP((D_SPEC, "Failed to open widthtable %s\n", widthtables));
  406.       free(p->widthtable);
  407.       p->widthtable = (char *) 1;
  408. !     fprintf(stderr, "%s: failed to open width table %s\n",
  409. !         progname, widthtables);
  410. !     fprintf(stderr, "\trecheck -W option\n");
  411. !     exit(1);
  412.       }
  413.   }
  414.   
  415. --- 527,539 ----
  416.       DBP((D_SPEC, "Failed to open widthtable %s\n", widthtables));
  417.       free(p->widthtable);
  418.       p->widthtable = (char *) 1;
  419. !     /* This isn't really the right way to do this, but.... */
  420. !     if (strcmp(p->troffName, "S2") != 0) {
  421. !         fprintf(stderr, "%s: failed to open width table %s\n",
  422. !         progname, widthtables);
  423. !         fprintf(stderr, "\trecheck -W option\n");
  424. !         exit(1);
  425. !     }
  426.       }
  427.   }
  428.   
  429. Index: ./dit.c
  430. *** /tmp/PATCHold/./dit.c    Sun Jan  5 00:49:43 1992
  431. --- ./dit.c    Sun Jan  5 00:49:46 1992
  432. ***************
  433. *** 12,18 ****
  434.   
  435.   #ifndef    lint
  436.   static char SCCSid[] =
  437. !     "@(#)dit.c: Copyright 91/11/22 03:53:18 Chris Lewis";
  438.   #endif
  439.   
  440.   extern struct cattab tabN[], tabS[], *extidx;
  441. --- 12,18 ----
  442.   
  443.   #ifndef    lint
  444.   static char SCCSid[] =
  445. !     "@(#)dit.c: Copyright 91/12/26 17:58:58 Chris Lewis";
  446.   #endif
  447.   
  448.   extern struct cattab tabN[], tabS[], *extidx;
  449. ***************
  450. *** 93,99 ****
  451.   
  452.       addtab(tabN);
  453.       addtab(tabS);
  454. !     addtab(extidx);
  455.   
  456.       /*    Magic */
  457.       dittab['-'] = &tabN[31];
  458. --- 93,100 ----
  459.   
  460.       addtab(tabN);
  461.       addtab(tabS);
  462. !     if (extidx)
  463. !     addtab(extidx);
  464.   
  465.       /*    Magic */
  466.       dittab['-'] = &tabN[31];
  467. Index: ./defs.h
  468. *** /tmp/PATCHold/./defs.h    Sun Jan  5 00:49:58 1992
  469. --- ./defs.h    Sun Jan  5 00:50:00 1992
  470. ***************
  471. *** 9,15 ****
  472.    */
  473.   
  474.   /*    Official Release and Patch level:    */
  475. ! #define    T2VERSION    "@(#)PSROFF Copyright 91/11/22 Chris Lewis - R3 PL6"
  476.   
  477.   /*    Configuration parameters:
  478.    */
  479. --- 9,15 ----
  480.    */
  481.   
  482.   /*    Official Release and Patch level:    */
  483. ! #define    T2VERSION    "@(#)PSROFF Copyright 91/12/26 Chris Lewis - R3 PL7"
  484.   
  485.   /*    Configuration parameters:
  486.    */
  487. Index: ./psroff.S
  488. *** /tmp/PATCHold/./psroff.S    Sun Jan  5 00:50:13 1992
  489. --- ./psroff.S    Sun Jan  5 00:50:15 1992
  490. ***************
  491. *** 7,13 ****
  492.   #
  493.   #    Specs:        troff2ps driver
  494.   #
  495. ! #ident  "@(#)psroff.sh: 2.18 Copyright 91/11/22 03:21:09 Chris Lewis"
  496.   
  497.   LIBDIR="%%LIBDIR%%"
  498.   FONTDIR="%%FONTDIR%%"
  499. --- 7,13 ----
  500.   #
  501.   #    Specs:        troff2ps driver
  502.   #
  503. ! #ident  "@(#)psroff.sh: 2.19 Copyright 91/12/26 17:58:37 Chris Lewis"
  504.   
  505.   LIBDIR="%%LIBDIR%%"
  506.   FONTDIR="%%FONTDIR%%"
  507. ***************
  508. *** 298,304 ****
  509.   
  510.       cat $files |
  511.   
  512. !     if [ -f "%%PERL%%" -a -z "$v" ]
  513.       then
  514.       %%LIBDIR%%/catconv
  515.       else
  516. --- 298,304 ----
  517.   
  518.       cat $files |
  519.   
  520. !     if [ -f "%%PERL%%" -a -n "$v" ]
  521.       then
  522.       %%LIBDIR%%/catconv
  523.       else
  524. Index: ./opt.c
  525. *** /tmp/PATCHold/./opt.c    Sun Jan  5 00:50:24 1992
  526. --- ./opt.c    Sun Jan  5 00:50:25 1992
  527. ***************
  528. *** 16,22 ****
  529.   #ifdef    OPT
  530.   #ifndef    lint
  531.   static char SCCSid[] =
  532. !     "@(#)opt.c: 2.6 Copyright 91/08/12 23:52:41 Chris Lewis";
  533.   #endif
  534.   
  535.   struct insbuf {
  536. --- 16,22 ----
  537.   #ifdef    OPT
  538.   #ifndef    lint
  539.   static char SCCSid[] =
  540. !     "@(#)opt.c: 2.7 Copyright 92/01/03 11:33:47 Chris Lewis";
  541.   #endif
  542.   
  543.   struct insbuf {
  544. ***************
  545. *** 247,259 ****
  546.       }
  547.   
  548.       cantcache = !wp || (int) wp == 1 || (font == symidx ? bp->t2b_font != S:
  549. !                  bp->t2b_font != N);
  550.   
  551. !     if (bp->t2b_xc || bp->t2b_yc || bp->t2b_scale || cantcache)
  552.       optflush();
  553.   
  554.       DBP((D_CAT, "opt: font: %d/%d xpos: %d/%d\n",
  555.       optfont, font, optxpos, xpos));
  556.       if (optxpos != xpos)    /* handle spaces one day... */
  557.       optflush();
  558.   
  559. --- 247,265 ----
  560.       }
  561.   
  562.       cantcache = !wp || (int) wp == 1 || (font == symidx ? bp->t2b_font != S:
  563. !                  bp->t2b_font != N)
  564. ! #ifndef    FIXEDPERIODWIDTH
  565. !                  /* period widths are screwed in Postscript */
  566. !                  || (font != symidx && nc == 35)
  567. ! #endif
  568. !             ;
  569.   
  570. !     if (cantcache || bp->t2b_xc || bp->t2b_yc || bp->t2b_scale)
  571.       optflush();
  572.   
  573.       DBP((D_CAT, "opt: font: %d/%d xpos: %d/%d\n",
  574.       optfont, font, optxpos, xpos));
  575.       if (optxpos != xpos)    /* handle spaces one day... */
  576.       optflush();
  577.   
  578. Index: ./zap
  579. *** /tmp/PATCHold/./zap    Sun Jan  5 00:50:33 1992
  580. --- ./zap    Sun Jan  5 00:50:34 1992
  581. ***************
  582. *** 1,9 ****
  583.   :
  584. ! #1.3 91/07/23: Used to bypass broken makes - see MISC "Broken makes"
  585.   if [ $# = 0 ]
  586.   then
  587.       make sedscript makeincl
  588. !     for i in adapters lib widths tests man
  589.       do
  590.       cd $i
  591.       for j in *.S
  592. --- 1,9 ----
  593.   :
  594. ! #1.4 91/12/26: Used to bypass broken makes - see MISC "Broken makes"
  595.   if [ $# = 0 ]
  596.   then
  597.       make sedscript makeincl
  598. !     for i in adapters lib widths tests man utils
  599.       do
  600.       cd $i
  601.       for j in *.S
  602. ***************
  603. *** 15,21 ****
  604.               ;;
  605.           '*.S')
  606.               echo "No .S files in $i"
  607. !             continue
  608.               ;;
  609.           esac
  610.           f=`basename $j .S`
  611. --- 15,21 ----
  612.               ;;
  613.           '*.S')
  614.               echo "No .S files in $i"
  615. !             break
  616.               ;;
  617.           esac
  618.           f=`basename $j .S`
  619. Index: ./LASERFONTS
  620. *** /tmp/PATCHold/./LASERFONTS    Sun Jan  5 00:50:44 1992
  621. --- ./LASERFONTS    Sun Jan  5 00:50:45 1992
  622. ***************
  623. *** 1,5 ****
  624.       How to build Fonts and Width Tables for your Laserjet
  625. !             2.4 91/07/20
  626.   
  627.   This readme presents a general discussion on how to build fonts
  628.   for psroff.  The first part gives a complete description of what
  629. --- 1,5 ----
  630.       How to build Fonts and Width Tables for your Laserjet
  631. !             2.5 91/12/26
  632.   
  633.   This readme presents a general discussion on how to build fonts
  634.   for psroff.  The first part gives a complete description of what
  635. ***************
  636. *** 131,136 ****
  637. --- 131,138 ----
  638.   There is a perl script in utils called "calcfonts", which if invoked
  639.   in the top level make via:
  640.   
  641. + [If you don't have Perl, go to "AUTOMATING IF YOU DON'T HAVE PERL"]
  642.       make buildljfonts
  643.   
  644.   Will traverse every directory you've specified for PKFONTS during
  645. ***************
  646. *** 172,174 ****
  647. --- 174,230 ----
  648.   only used if you've selected a point size which is marked "b" (builtin),
  649.   or is marked "n" (non-existent), and the bestmatch code in lj.c didn't
  650.   find an existing font (same typeface) at a "close enough" pointsize.
  651. + AUTOMATING IF YOU DON'T HAVE PERL
  652. + If you don't have perl, the following script will construct R, I, B
  653. + and C at point sizes 6 through 28 from the Jetroff 1.0 font distribution.
  654. + Run this in place of "make buildljfonts".  After running it,
  655. + copy all of the files from /tmp/newfonts into $LJF. Then
  656. + mark point sizes 6 thru 28 (in R, I, B and C) as "s" in lj.fonts, then:
  657. +     make register
  658. +     su root
  659. +     make install
  660. +     make installwidths
  661. + ---------------------- Snip here ---------------------
  662. + PSRC=<path to psroff source>
  663. + JFONTS=<path to jetroff fonts>
  664. + NEWFONT=/tmp/newfonts
  665. + if [ ! -d /tmp/newfonts ]
  666. + then
  667. +     mkdir /tmp/newfonts
  668. + fi
  669. + for i in 6 7 8 9 10 11 12 14 16 18 20 22 24 28
  670. + do
  671. +     $PSRC/utils/pk2sfp -m \
  672. +     $PSRC/utils/maps/cmr.ROMAN8 $JFONTS/devjet/pk/cmr$i.300pk \
  673. +     $PSRC/utils/maps/cmsy.ROMAN8 $JFONTS/devjet/pk/cmsy$i.300pk \
  674. +     $PSRC/utils/maps/cmti.ROMAN8 $JFONTS/devjet/pk/cmti$i.300pk \
  675. +     $PSRC/utils/maps/cmtrf.ROMAN8 $JFONTS/devjet/pk/cmtrf$i.300pk \
  676. +         > t
  677. +     $PSRC/utils/pk2sfp t > $NEWFONT/R.$i.sfp
  678. +     $PSRC/utils/pk2sfp -m \
  679. +     $PSRC/utils/maps/cmr.ROMAN8 $JFONTS/devjet/pk/cmbx$i.300pk \
  680. +     $PSRC/utils/maps/cmsy.ROMAN8 $JFONTS/devjet/pk/cmsy$i.300pk \
  681. +     $PSRC/utils/maps/cmti.ROMAN8 $JFONTS/devjet/pk/cmti$i.300pk \
  682. +     $PSRC/utils/maps/cmtrf.ROMAN8 $JFONTS/devjet/pk/cmtrf$i.300pk \
  683. +         > t
  684. +     $PSRC/utils/pk2sfp t > $NEWFONT/B.$i.sfp
  685. +     $PSRC/utils/pk2sfp -m \
  686. +     $PSRC/utils/maps/cmtt.ROMAN8 $JFONTS/devjet/pk/cmtt$i.300pk \
  687. +     $PSRC/utils/maps/cmsy.ROMAN8 $JFONTS/devjet/pk/cmsy$i.300pk \
  688. +     $PSRC/utils/maps/cmti.ROMAN8 $JFONTS/devjet/pk/cmti$i.300pk \
  689. +     $PSRC/utils/maps/cmtrf.ROMAN8 $JFONTS/devjet/pk/cmtrf$i.300pk \
  690. +         > t
  691. +     $PSRC/utils/pk2sfp t > $NEWFONT/C.$i.sfp
  692. +     $PSRC/utils/pk2sfp -m \
  693. +     $PSRC/utils/maps/cmr.ROMAN8 $JFONTS/devjet/pk/cmti$i.300pk \
  694. +     $PSRC/utils/maps/cmsy.ROMAN8 $JFONTS/devjet/pk/cmsy$i.300pk \
  695. +     $PSRC/utils/maps/cmti.ROMAN8 $JFONTS/devjet/pk/cmti$i.300pk \
  696. +     $PSRC/utils/maps/cmtrf.ROMAN8 $JFONTS/devjet/pk/cmtrf$i.300pk \
  697. +         > t
  698. +     $PSRC/utils/pk2sfp t > $NEWFONT/I.$i.sfp
  699. + done
  700. + ---------------------- Snip here ---------------------
  701.  
  702. -- 
  703. Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
  704. Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
  705. Moderator of the ferret list: ferret-request@ferret.ocunix.on.ca
  706. **** NEVER let something mechanical know you're in a hurry. ****
  707.