home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1993 < prev    next >
Internet Message Format  |  1990-12-28  |  9KB

  1. From: clewis@ecicrl.UUCP (Chris Lewis)
  2. Newsgroups: comp.text,comp.sources.bugs,alt.sources
  3. Subject: Psroff Release 2.0, Patch 4
  4. Message-ID: <899@ecicrl.UUCP>
  5. Date: 24 Oct 90 18:41:26 GMT
  6.  
  7. Archive-name: psroff2.0/patch.04
  8. Submitted-by: clewis@ecicrl.uucp (Chris Lewis)
  9.  
  10. I'm really sorry that Psroff 2.0 itself hasn't been posted.
  11. It's been sitting in Rich's queue for comp.sources.unix since
  12. July.  I'm going to see if I can get it out through comp.sources.misc
  13. in a timely fashion, if not, I'll just post it thru alt.sources.
  14.  
  15. If you do wish to followup to this article, please ensure that
  16. your posting goes to comp.text - since I've moved to Ottawa, I've
  17. been paying LD charges for my news, and I've not been receiving
  18. any of the sources groups.
  19.  
  20. This is (almost) a trivial patch.  When Psroff gets posted in its
  21. entirety, it will be at THIS level (PL4).
  22.  
  23.     This is official patch 04 for Psroff 2.0.
  24.     Please apply it by:
  25.     cd <psroff source directory>
  26.     patch -N -p < <this file>
  27.  
  28. ./man/troff2ps.1.S    Documented optimizer (-Z & -W)
  29. ./debug.c        trailing spaces.
  30. ./utils/Makefile    forgot catconv
  31. ./defs.h        PL4 & NODECMD for systems without uuname -l.
  32. ./dt.c            trailing spaces.
  33. ./utils.c        NODECMD
  34.  
  35. *** /tmp/PATCHold/./man/troff2ps.1.S    Wed Oct 24 13:42:08 1990
  36. --- ./man/troff2ps.1.S    Wed Oct 24 13:42:09 1990
  37. ***************
  38. *** 1,4 ****
  39. ! .\"Copyright 1988 by Chris Lewis 2.1 90/07/18
  40.   .TH TROFF2PS 1 local
  41.   .SH NAME
  42.   troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
  43. --- 1,4 ----
  44. ! .\"Copyright 1988 by Chris Lewis 2.2 90/10/24
  45.   .TH TROFF2PS 1 local
  46.   .SH NAME
  47.   troff2ps, troff2lj, troff2xx \- convert troff output to Postscript, HP etc.
  48. ***************
  49. *** 12,17 ****
  50. --- 12,19 ----
  51.   .BI "[-p" prolog "]"
  52.   .BI "[-O" l "]"
  53.   .BI "[-Y" l "]"
  54. + .BI "[-W" directory "]"
  55. + .B "[-Z]"
  56.   [-V] [-M]
  57.   .SH DESCRIPTION
  58.   .I Troff2ps
  59. ***************
  60. *** 112,117 ****
  61. --- 114,158 ----
  62.   options allow you to specify page X and Y offsets respectively.
  63.   The value should be a number with a valid troff scale factor.
  64.   Eg: ``-O.463i''.
  65. + .P
  66. + The
  67. + .B -Z
  68. + and
  69. + .B -W
  70. + options controller the optimizer.
  71. + If the
  72. + .B -Z
  73. + option is specified, the backends attempt to coalesce strings of
  74. + characters into one drawing request.
  75. + Without this option,
  76. + .B troff2
  77. + draws words by positioning each letter separately.
  78. + The optimizer can reduce the size of the output file by factors of 3 or
  79. + more, and printer speeds similarly, particularly in Postscript.
  80. + This option is disabled in ditroff-output-mode - it's up to the
  81. + ditroff filter to optimize.
  82. + The
  83. + .BI -W directory
  84. + allows you to specify where the width tables are, by default they
  85. + are "/usr/lib/font/\fItype\fP", where \fItype\fP is the driver
  86. + type specified by the
  87. + .B -T
  88. + option.
  89. + This option is useful if you've moved the width directory somewhere
  90. + else, or the final directory name is different from the
  91. + .B -T
  92. + value.
  93. + See psrofflib entry "ops" for an example.
  94. + The
  95. + .B -W
  96. + option is ignored unless
  97. + .B -Z
  98. + is specified.
  99. + .P
  100. + The optimizer is quite good, but it is known that columns of text separated
  101. + by a leader made up of periods can fool it.
  102. + At the present time, it is unknown whether it's a width table or
  103. + printer or troff wierdness.
  104.   .SH "SPECIAL REQUESTS"
  105.   .BI troff2 xx
  106.   supports a number of additional features over and above bare
  107. *** /tmp/PATCHold/./debug.c    Wed Oct 24 13:42:21 1990
  108. --- ./debug.c    Wed Oct 24 13:42:22 1990
  109. ***************
  110. *** 2,8 ****
  111.   
  112.   #ifndef    lint
  113.   static char SCCSid[] =
  114. !     "@(#)debug.c: 2.3 Copyright 90/10/01 14:41:07 Chris Lewis";
  115.   #endif
  116.   
  117.   #ifdef    DEBUG
  118. --- 2,8 ----
  119.   
  120.   #ifndef    lint
  121.   static char SCCSid[] =
  122. !     "@(#)debug.c: 2.4 Copyright 90/10/22 14:53:06 Chris Lewis";
  123.   #endif
  124.   
  125.   #ifdef    DEBUG
  126. ***************
  127. *** 120,126 ****
  128.    */
  129.   bcopy(from, to, len)
  130.   register char *from, *to;
  131. ! register int len; 
  132.   {
  133.     while(len--)
  134.       *to++ = *from++;
  135. --- 120,126 ----
  136.    */
  137.   bcopy(from, to, len)
  138.   register char *from, *to;
  139. ! register int len;
  140.   {
  141.     while(len--)
  142.       *to++ = *from++;
  143. ***************
  144. *** 128,134 ****
  145.   
  146.   bzero(array, len)
  147.   register char *array;
  148. ! register int len; 
  149.   {
  150.     while(len--)
  151.       *array++ = '\0';
  152. --- 128,134 ----
  153.   
  154.   bzero(array, len)
  155.   register char *array;
  156. ! register int len;
  157.   {
  158.     while(len--)
  159.       *array++ = '\0';
  160. *** /tmp/PATCHold/./utils/Makefile    Wed Oct 24 13:42:32 1990
  161. --- ./utils/Makefile    Wed Oct 24 13:42:33 1990
  162. ***************
  163. *** 1,5 ****
  164. ! #    Copyright 16:49:40 Chris Lewis
  165. ! SCRIPTS    = psdtwd showfont mkenctab calcfonts
  166.   PROGRAMS = hpinterp psxlate pk2sfp pk2ditwid pktype dumpft pk2ps lj2ps
  167.   MAPS = maps/S.cmtrf \
  168.       maps/alnum.ROMAN8 \
  169. --- 1,5 ----
  170. ! #    Copyright 14:22:49 Chris Lewis
  171. ! SCRIPTS    = psdtwd showfont mkenctab calcfonts catconv
  172.   PROGRAMS = hpinterp psxlate pk2sfp pk2ditwid pktype dumpft pk2ps lj2ps
  173.   MAPS = maps/S.cmtrf \
  174.       maps/alnum.ROMAN8 \
  175. *** /tmp/PATCHold/./defs.h    Wed Oct 24 13:42:42 1990
  176. --- ./defs.h    Wed Oct 24 13:42:44 1990
  177. ***************
  178. *** 1,4 ****
  179. ! /*    Copyright 1988, 1989 13:38:22 Chris Lewis
  180.           All Rights Reserved
  181.   
  182.       Permission to copy and further distribute is freely given provided
  183. --- 1,4 ----
  184. ! /*    Copyright 1988, 1989 13:21:58 Chris Lewis
  185.           All Rights Reserved
  186.   
  187.       Permission to copy and further distribute is freely given provided
  188. ***************
  189. *** 6,18 ****
  190.       sold for profit.
  191.   
  192.       Project:    Generic Troff drivers
  193. !     Module:        defs.h 2.7 90/10/12 13:38:22
  194.       Author:     Chris Lewis
  195.       Specs:        Main header file - contains some customization
  196.    */
  197.   
  198.   /*    Official Release and Patch level:    */
  199. ! #define    T2VERSION    "@(#)PSROFF Copyright 90/10/12 Chris Lewis - R2 P3"
  200.   
  201.   #ifndef    LIBDIR
  202.   /*    Don't touch this */
  203. --- 6,18 ----
  204.       sold for profit.
  205.   
  206.       Project:    Generic Troff drivers
  207. !     Module:        defs.h 2.9 90/10/24 13:21:58
  208.       Author:     Chris Lewis
  209.       Specs:        Main header file - contains some customization
  210.    */
  211.   
  212.   /*    Official Release and Patch level:    */
  213. ! #define    T2VERSION    "@(#)PSROFF Copyright 90/10/24 Chris Lewis - R2 P4"
  214.   
  215.   #ifndef    LIBDIR
  216.   /*    Don't touch this */
  217. ***************
  218. *** 31,37 ****
  219.                  oldish BSD systems */
  220.   
  221.   #undef  BCOPYLIB    /* Define if BCOPY is defined and you have */
  222. !             /* a bcopy in the library */ 
  223.   
  224.   #undef    UNSIGNEDCHAR    /* Define if chars are unsigned on your machine */
  225.   
  226. --- 31,37 ----
  227.                  oldish BSD systems */
  228.   
  229.   #undef  BCOPYLIB    /* Define if BCOPY is defined and you have */
  230. !             /* a bcopy in your library */
  231.   
  232.   #undef    UNSIGNEDCHAR    /* Define if chars are unsigned on your machine */
  233.   
  234. ***************
  235. *** 164,169 ****
  236. --- 164,174 ----
  237.                  psroff(1) -Y options too */
  238.   
  239.   #define    INSPECIAL    /* enables ditroff graphics capability */
  240. + #define    NODECMD    "uuname -l" /* command to print on stdout the node name
  241. +                of your machine.  Use hostname on BSD-derived
  242. +                systems that don't have UUCP.  You can always
  243. +                use "echo <nodename>" if necessary */
  244.   
  245.   /*    Edit no more .... */
  246.   
  247. *** /tmp/PATCHold/./dt.c    Wed Oct 24 13:42:58 1990
  248. --- ./dt.c    Wed Oct 24 13:43:02 1990
  249. ***************
  250. *** 15,21 ****
  251.   
  252.   #ifndef    lint
  253.   static char SCCSid[] =
  254. !     "@(#)dt.c: 2.2 Copyright 90/10/12 13:09:25 Chris Lewis";
  255.   #endif
  256.   
  257.   /*    These two tables are always included so that we have the
  258. --- 15,21 ----
  259.   
  260.   #ifndef    lint
  261.   static char SCCSid[] =
  262. !     "@(#)dt.c: 2.3 Copyright 90/10/22 14:52:55 Chris Lewis";
  263.   #endif
  264.   
  265.   /*    These two tables are always included so that we have the
  266. ***************
  267. *** 491,497 ****
  268.           temp = temp * 10 + (*++s - '0');
  269.           }
  270.           t2 = temp * dtresolution / TROFFRESOLUTION;
  271. !         DBP((D_CAT, "dtDraw (scale): %d -> %d\n", temp, t2)); 
  272.           printf("%d", t2);
  273.       }
  274.       }
  275. --- 491,497 ----
  276.           temp = temp * 10 + (*++s - '0');
  277.           }
  278.           t2 = temp * dtresolution / TROFFRESOLUTION;
  279. !         DBP((D_CAT, "dtDraw (scale): %d -> %d\n", temp, t2));
  280.           printf("%d", t2);
  281.       }
  282.       }
  283. *** /tmp/PATCHold/./utils.c    Wed Oct 24 13:43:20 1990
  284. --- ./utils.c    Wed Oct 24 13:43:22 1990
  285. ***************
  286. *** 15,21 ****
  287.   
  288.   #ifndef    lint
  289.   static char SCCSid[] =
  290. !     "@(#)utils.c: 2.1 Copyright 90/07/18 16:51:48 Chris Lewis";
  291.   #endif
  292.   
  293.   extern struct cattab tabN[], tabS[];
  294. --- 15,21 ----
  295.   
  296.   #ifndef    lint
  297.   static char SCCSid[] =
  298. !     "@(#)utils.c: 2.3 Copyright 90/10/24 13:37:08 Chris Lewis";
  299.   #endif
  300.   
  301.   extern struct cattab tabN[], tabS[];
  302. ***************
  303. *** 86,96 ****
  304.   char nodename[25];
  305.   getnodename() {
  306.       FILE *uuname;
  307. !     if ((uuname = popen("uuname -l", "r")) == NULL)
  308.       strcpy(nodename, "<noname>");
  309.       else {
  310.       fscanf(uuname, "%s", nodename);
  311. !     pclose(uuname);
  312.       }
  313.   }
  314.   
  315. --- 86,97 ----
  316.   char nodename[25];
  317.   getnodename() {
  318.       FILE *uuname;
  319. !     if ((uuname = popen(NODECMD, "r")) == NULL)
  320.       strcpy(nodename, "<noname>");
  321.       else {
  322.       fscanf(uuname, "%s", nodename);
  323. !     if (pclose(uuname))
  324. !         strcpy(nodename, "<noname>");
  325.       }
  326.   }
  327.   
  328. -- 
  329. Chris Lewis, Phone: TBA
  330. UUCP: uunet!utai!lsuc!ecicrl!clewis
  331. Moderator of the Ferret Mailing List (ferret-request@eci386)
  332. Psroff mailing list (psroff-request@eci386)
  333.