home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR16 / GS261P.ZIP / GS261P3.FIX < prev    next >
Text File  |  1993-07-19  |  89KB  |  2,703 lines

  1.             Ghostscript 2.6.1 Patch #3
  2.  
  3.  
  4. To apply this patch:
  5.  
  6. cd to the directory containing the ghostscript source and do:
  7.     patch -s < ThisFile
  8. Patch will work silently unless an error occurs.
  9. If you want to watch patch do its thing, leave out the "-s" argument to patch.
  10.  
  11. See the readme.fix file for a summary of the fixes.
  12.  
  13. Prereq: 6/28/93
  14.  
  15. *** 1.2    1993/06/29 02:58:13
  16. --- readme.fix    1993/07/18 15:51:58
  17. ***************
  18. *** 7,13 ****
  19.   Fixes for Ghostscript 2.6.1
  20.   ---------------------------
  21.   
  22. ! (last update: 6/28/93)
  23.   
  24.   This file summarizes a number of important quality fixes for Ghostscript
  25.   2.6.1.  The fixes are supplied in the form of replacements for
  26. --- 7,13 ----
  27.   Fixes for Ghostscript 2.6.1
  28.   ---------------------------
  29.   
  30. ! (last update: 7/18/93)
  31.   
  32.   This file summarizes a number of important quality fixes for Ghostscript
  33.   2.6.1.  The fixes are supplied in the form of replacements for
  34. ***************
  35. *** 117,122 ****
  36. --- 117,124 ----
  37.   Files affected:
  38.       gxrefct.h
  39.   
  40. + ---------------- Fixes up to here distributed 6/23/93 ----------------
  41.   6/28/93
  42.   -------
  43.   
  44. ***************
  45. *** 125,127 ****
  46. --- 127,331 ----
  47.       file type1enc.ps.
  48.   Files affected:
  49.       unixtail.mak (and unix-*.mak, built from it using tar_cat)
  50. + Problem:
  51. +     X driver didn't free dynamic colors at the start of each page.
  52. + Files affected:
  53. +     gdevx.h
  54. +     gdevx.c
  55. + Problems:
  56. +     X driver didn't bind foreground/background defaults tightly.
  57. +     X driver didn't check for GHOSTVIEW_COLORS properly.
  58. +     X driver freed too many colors if an allocation request failed.
  59. +     X driver didn't check return value of gs_malloc for being NULL.
  60. + Files affected:
  61. +     gdevxini.c
  62. + Problem:
  63. +     There was no LaserJet 4 driver that could use the 600 dpi mode.
  64. + Fix:
  65. +     Implement one.
  66. + Files affected:
  67. +     devs.mak
  68. +     gdevdjet.c
  69. + Problem:
  70. +     The DeskJet and LaserJet drivers used \033&l0H (page eject)
  71. +     instead of \f (end of page), which prevented duplex printing.
  72. +     The DeskJet and LaserJet drivers reset the printer at the
  73. +     start of each page, which prevented manually initiated duplex
  74. +     printing.
  75. + Files affected:
  76. +     gdevdjet.c
  77. + 7/8/93
  78. + ------
  79. + Problem:
  80. +     kshow returned an incorrect (random, 32-bit) character code
  81. +     for the second character.
  82. + Fix:
  83. +     Make sure the character code is stored properly on all control paths.
  84. + Files affected:
  85. +     gschar.c
  86. + Problem:
  87. +     Color halftones "flipped over" at the 50% point, inverting
  88. +     foreground and background.
  89. + Fix:
  90. +     Correct a numerical error in the octant flip test.
  91. + Files affected:
  92. +     gxdither.c
  93. + Problem:
  94. +     setbbox didn't round the coordinates properly, which could cause
  95. +     erroneous rangecheck errors with coordinates on the edge of the box.
  96. + Files affected:
  97. +     gsdps1.c
  98. + Problem:
  99. +     The PCX driver put an old version number in the header, and
  100. +     didn't pad scan lines to an even number of bytes.
  101. + Files affected:
  102. +     gdevpcx.c
  103. + Problem:
  104. +     The TIFF driver didn't handle A4 or B4 size paper correctly.
  105. + Fix:
  106. +     Make the driver handle variable page sizes properly.
  107. + Files affected:
  108. +     gdevtiff.c
  109. + Problem:
  110. +     The VMS script files referenced IBSCAN instead of ISCAN2,
  111. +     and omitted GDEVXXF.
  112. + Files affected:
  113. +     vms-cc.mak
  114. +     vms-gcc.mak
  115. + Problem:
  116. +     zht2.c didn't include alloc.h.
  117. + Files affected:
  118. +     zht2.c
  119. + Problem:
  120. +     gdevx.h was inadvertently omitted from an earlier batch of fixes.
  121. + Files affected:
  122. +     gdevx.h
  123. + Problem:
  124. +     The UUENCODEd icons for the MS Windows platform were omitted
  125. +     from the fileset.
  126. + Files added:
  127. +     gsgraph.uue
  128. +     gstext.uue
  129. + 7/9/93
  130. + ------
  131. + Problem:
  132. +     exitserver didn't check the password, and always succeeded.
  133. + Fix:
  134. +     Make exitserver do a minimal password check.
  135. + Files affected:
  136. +     gs_statd.ps
  137. + Problem:
  138. +     Ghostscript only knew about a limited set of paper sizes.
  139. + Fix:
  140. +     Add many new paper sizes to gs_statd.ps.  It now includes ISO
  141. +     a0-a10 and b0-b10, and CAD sizes archA-archE.
  142. + Files affected:
  143. +     gs_statd.ps
  144. + 7/17/93
  145. + -------
  146. + Problem:
  147. +     The ESCP/2 driver was incorrectly named gdevescp2 in devs.mak.
  148. + Files affected:
  149. +     devs.mak
  150. + Problem:
  151. +     The X11 driver incorrectly demanded the Xmu library, which was
  152. +     not needed and which caused link errors on some versions of SunOS.
  153. + Solution:
  154. +     Remove Xmu from the list of X libraries.
  155. + Files affected:
  156. +     devs.mak
  157. + Problem:
  158. +     X11 font matching scheme was too loose, causing overlaps and
  159. +     other problems.
  160. + Solution:
  161. +     X11 font must be within 1/2 pixel of desired height to be used.
  162. + Files affected:
  163. +     gdevx.c, gdevx.h, gdevxini.c, gdevxxf.c
  164. + Problem:
  165. +     X11 Font Extensions (rotated and mirrored fonts) did not work
  166. +     properly on NCD terminals.
  167. + Solution:
  168. +     Add an X resource to be able to selectively turn off the use
  169. +     of Font Extensions.  It is called useFontExtensions.
  170. + Files affected:
  171. +     gdevx.c, gdevx.h, gdevxini.c, gdevxxf.c
  172. + Problem:
  173. +     When the X11 driver freed the rgb cube/gray ramp, the parameters
  174. +     to gs_free() did not exactly match the parameters to gs_malloc().
  175. + Solution:
  176. +     Make them match.
  177. + Files affected:
  178. +     gdevx.c
  179. + Problem:
  180. +     The X11 driver failed to warn the user when it could not allocate
  181. +     the original color cube/gray ramp and dropped back to a smaller
  182. +     cube/ramp, or from color to mono.
  183. + Solution:
  184. +     Warn the user when color allocation fails during initialization.
  185. + Files:
  186. +     gdevxini.c
  187. + Problem:
  188. +     x_release could cause Ghostscript to fail if a font was freed
  189. +     after the device was closed.
  190. + Solution:
  191. +     Don't free the font in x_release.  The font will be freed when
  192. +     the connection to the X server is closed.
  193. + Files affected:
  194. +     gdevx.c
  195. + 7/18/93
  196. + -------
  197. + Problem:
  198. +     On MS-DOS systems, filenameforall didn't interpret * alone
  199. +     as a pattern matching all files.
  200. + Fix:
  201. +     Recognize a trailing * in a pattern as a special case.
  202. + Files affected:
  203. +     gp_msdos.c
  204. + Problem:
  205. +     The FontName in the font file had be the same as the name in
  206. +     Fontmap.  (This requirement led to the need for aliases, and
  207. +     was extremely confusing to users.)
  208. + Fix:
  209. +     If loading a font file doesn't define the font with the
  210. +     requested name, parse the file to find the FontName, and make
  211. +     the requested name an alias for it.
  212. + Files affected:
  213. +     gs_fonts.ps
  214. + Problem:
  215. +     Users had to remember to edit the Fontmap file whenever they
  216. +     installed a new font.
  217. + Fix:
  218. +     Add a GS_FONTPATH environment variable containing a list of
  219. +     directories that should be scanned automatically for fonts at
  220. +     startup time.
  221. + Files affected:
  222. +     gs_fonts.ps, fonts.doc, use.doc
  223. *** 1.2    1993/06/29 02:22:52
  224. --- devs.mak    1993/07/17 17:40:16
  225. ***************
  226. *** 51,57 ****
  227.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  228.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  229.   # *    sunview  SunView window system   [SunOS only]
  230. ! #    x11    X Windows version 11, release >=3   [Unix and VMS only]
  231.   # Printers:
  232.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  233.   #    bj10e    Canon BubbleJet BJ10e
  234. --- 51,57 ----
  235.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  236.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  237.   # *    sunview  SunView window system   [SunOS only]
  238. ! #    x11    X Windows version 11, release >=4   [Unix and VMS only]
  239.   # Printers:
  240.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  241.   #    bj10e    Canon BubbleJet BJ10e
  242. ***************
  243. *** 83,88 ****
  244. --- 83,89 ----
  245.   # *    lj250    DEC LJ250 Companion color printer
  246.   # +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression
  247.   # +    ljet3    H-P LaserJet III* with Delta Row compression
  248. + # +    ljet4    H-P LaserJet 4 (defaults to 600 dpi)
  249.   # +    ljetplus  H-P LaserJet Plus
  250.   # *    m8510    C.Itoh M8510 printer
  251.   # *    necp6    NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
  252. ***************
  253. *** 410,415 ****
  254. --- 411,421 ----
  255.   ljet3.dev: $(HPMONO)
  256.       $(SHP)gssetdev ljet3 $(HPMONO)
  257.   
  258. + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
  259. + ljet4.dev: $(HPMONO)
  260. +     $(SHP)gssetdev ljet4 $(HPMONO)
  261.   ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
  262.   ### Note: there are two different 500C drivers, both contributed by users.###
  263.   ###   If you have questions about the djet500c driver,                    ###
  264. ***************
  265. *** 491,501 ****
  266.   ### Note: this driver was contributed by a user: if you have questions,  ###
  267.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  268.   
  269. ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ)
  270.   escp2.dev: $(escp2_)
  271.       $(SHP)gssetdev escp2 $(escp2_)
  272.   
  273. ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH)
  274.   
  275.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  276.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  277. --- 497,507 ----
  278.   ### Note: this driver was contributed by a user: if you have questions,  ###
  279.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  280.   
  281. ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
  282.   escp2.dev: $(escp2_)
  283.       $(SHP)gssetdev escp2 $(escp2_)
  284.   
  285. ! gdevescp.$(OBJ): gdevescp.c $(PDEVH)
  286.   
  287.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  288.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  289. ***************
  290. *** 690,703 ****
  291.   # Aladdin Enterprises does not support Ghostview.  For more information
  292.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  293.   
  294. - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy.  No
  295. - #       routines are used from either of these two libraries.  If you
  296. - #       do not have libXmu.a or libXext.a, simply remove these two lines
  297. - #       from the Makefile.
  298.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  299.   x11.dev: $(x11_)
  300.       $(SHP)gssetdev x11 $(x11_)
  301. !     $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext
  302.   
  303.   # See the main makefile for the definition of XINCLUDE.
  304.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  305. --- 696,705 ----
  306.   # Aladdin Enterprises does not support Ghostview.  For more information
  307.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  308.   
  309.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  310.   x11.dev: $(x11_)
  311.       $(SHP)gssetdev x11 $(x11_)
  312. !     $(SHP)gsaddmod x11 -lib Xt X11 Xext
  313.   
  314.   # See the main makefile for the definition of XINCLUDE.
  315.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  316. *** 1.1    1993/07/19 15:43:44
  317. --- fonts.doc    1993/07/17 19:27:38
  318. ***************
  319. *** 129,145 ****
  320.   entry for your new font at the end.  The format for entries is documented
  321.   in the Fontmap file.  Since later entries in Fontmap override earlier
  322.   entries, any fonts you add will supersede the corresponding fonts supplied
  323. ! with Ghostscript.  Note that the font name in the Fontmap entry must be
  324. ! the same as the FontName in the font itself.
  325.   
  326.   In the PC world, Type 1 fonts are customarily given names ending in .PFA
  327.   or .PFB.  Ghostscript can use these directly; you just need to make the
  328.   entry in Fontmap.  If you are going to use a commercial Type 1 font (such
  329.   as fonts obtained in conjunction with Adobe Type Manager) with
  330.   Ghostscript, please read carefully the license that accompanies the font;
  331. ! Aladdin Enterprises and the Free Software Foundation take no
  332. ! responsibility for any possible violations of such licenses.
  333.   
  334.   If you want to convert a BDF file to a scalable outline, use the program
  335.   bdftops.ps (and invoking shell script bdftops.bat or bdftops).  Run the
  336.   shell command
  337. --- 129,147 ----
  338.   entry for your new font at the end.  The format for entries is documented
  339.   in the Fontmap file.  Since later entries in Fontmap override earlier
  340.   entries, any fonts you add will supersede the corresponding fonts supplied
  341. ! with Ghostscript.
  342.   
  343.   In the PC world, Type 1 fonts are customarily given names ending in .PFA
  344.   or .PFB.  Ghostscript can use these directly; you just need to make the
  345.   entry in Fontmap.  If you are going to use a commercial Type 1 font (such
  346.   as fonts obtained in conjunction with Adobe Type Manager) with
  347.   Ghostscript, please read carefully the license that accompanies the font;
  348. ! Aladdin Enterprises takes no responsibility for any possible violations of
  349. ! such licenses.
  350.   
  351. + Converting BDF fonts
  352. + --------------------
  353.   If you want to convert a BDF file to a scalable outline, use the program
  354.   bdftops.ps (and invoking shell script bdftops.bat or bdftops).  Run the
  355.   shell command
  356. ***************
  357. *** 170,176 ****
  358.   The utility for precompiling fonts is called font2c.  Note that font2c is
  359.   a PostScript language program, so you must have Ghostscript already
  360.   running to be able to run font2c; you must also have entries in the
  361. ! Fontmap for the fonts you want to compile.)  For example, to precompile
  362.   the Times-Italic font,
  363.       font2c Times-Italic ptmri.c
  364.   where the first argument is the font name and the second is the name of
  365. --- 172,178 ----
  366.   The utility for precompiling fonts is called font2c.  Note that font2c is
  367.   a PostScript language program, so you must have Ghostscript already
  368.   running to be able to run font2c; you must also have entries in the
  369. ! Fontmap for the fonts you want to compile.  For example, to precompile
  370.   the Times-Italic font,
  371.       font2c Times-Italic ptmri.c
  372.   where the first argument is the font name and the second is the name of
  373. *** 1.2    1993/06/29 02:22:52
  374. --- gdevpcx.c    1993/07/09 14:47:28
  375. ***************
  376. *** 109,120 ****
  377.       ushort    hres;        /* horz. resolution */
  378.       ushort    vres;        /* vert. resolution */
  379.       byte    palette[16*3];    /* color palette */
  380. !     byte    vmode;        /* video mode for graphics board */
  381.       byte    nplanes;    /* number of color planes */
  382. !     ushort    bpl;        /* number of bytes per line (uncompresses) */
  383.       ushort    palinfo;    /* palette info 1=color, 2=grey */
  384. -     ushort    shres;        /* scanner horz. resolution */
  385. -     ushort    svres;        /* scanner vert. resolution */
  386.       byte    xtra[58];    /* fill out header to 128 bytes */
  387.   } pcx_header;
  388.   
  389. --- 109,118 ----
  390.       ushort    hres;        /* horz. resolution */
  391.       ushort    vres;        /* vert. resolution */
  392.       byte    palette[16*3];    /* color palette */
  393. !     byte    reserved;
  394.       byte    nplanes;    /* number of color planes */
  395. !     ushort    bpl;        /* number of bytes per line (uncompressed) */
  396.       ushort    palinfo;    /* palette info 1=color, 2=grey */
  397.       byte    xtra[58];    /* fill out header to 128 bytes */
  398.   } pcx_header;
  399.   
  400. ***************
  401. *** 124,130 ****
  402.   ** 0 == 2.5
  403.   ** 2 == 2.8 w/palette info
  404.   ** 3 == 2.8 without palette info
  405. ! ** 5 == 3.0
  406.   **
  407.   */
  408.   
  409. --- 122,128 ----
  410.   ** 0 == 2.5
  411.   ** 2 == 2.8 w/palette info
  412.   ** 3 == 2.8 without palette info
  413. ! ** 5 == 3.0 (includes palette)
  414.   **
  415.   */
  416.   
  417. ***************
  418. *** 136,146 ****
  419.   private int
  420.   pcxmono_print_page(gx_device_printer *pdev, FILE *file)
  421.   {    pcx_header header;
  422. -     header.version = 2;
  423.       header.bpp = 1;
  424.       header.nplanes = 1;
  425. !     /* Clear the EGA palette */
  426. !     memset((byte *)header.palette, 0, sizeof(header.palette));
  427.       return pcx_write_page(pdev, file, &header, 0);
  428.   }
  429.   
  430. --- 134,143 ----
  431.   private int
  432.   pcxmono_print_page(gx_device_printer *pdev, FILE *file)
  433.   {    pcx_header header;
  434.       header.bpp = 1;
  435.       header.nplanes = 1;
  436. !     /* Set the first two entries of the short palette. */
  437. !     memcpy((byte *)header.palette, "\377\377\377\000\000\000", 6);
  438.       return pcx_write_page(pdev, file, &header, 0);
  439.   }
  440.   
  441. ***************
  442. *** 154,160 ****
  443.   private int
  444.   pcx16_print_page(gx_device_printer *pdev, FILE *file)
  445.   {    pcx_header header;
  446. -     header.version = 2;
  447.       header.bpp = 1;
  448.       header.nplanes = 4;
  449.       /* Fill the EGA palette appropriately. */
  450. --- 151,156 ----
  451. ***************
  452. *** 167,173 ****
  453.   pcx256_print_page(gx_device_printer *pdev, FILE *file)
  454.   {    pcx_header header;
  455.       int code;
  456. -     header.version = 5;
  457.       header.bpp = 8;
  458.       header.nplanes = 1;
  459.       /* Clear the EGA palette */
  460. --- 163,168 ----
  461. ***************
  462. *** 187,216 ****
  463.   private int
  464.   pcx_write_page(gx_device_printer *pdev, FILE *file, pcx_header _ss *phdr,
  465.     int planar)
  466. ! {    int raster = gdev_prn_raster(pdev);
  467.       int height = pdev->height;
  468.       int depth = pdev->color_info.depth;
  469. !     uint rsize = (pdev->width + 7) >> 3;
  470. !     byte *row = (byte *)gs_malloc(raster + rsize, 1, "pcx file buffer");
  471. !     byte *end = row + raster;
  472. !     byte *plane = end;
  473.       int y;
  474.       int code = 0;            /* return code */
  475. !     if ( row == 0 )            /* can't allocate row buffer */
  476.           return_error(gs_error_VMerror);
  477.   
  478. !     /* setup the header struct */
  479.   
  480.       phdr->manuf = 10;
  481. !     /* version and bpp were set by the caller */
  482.       phdr->encoding = 1;    /* 1 for rle 8-bit encoding */
  483.       phdr->x1 = 0;
  484.       phdr->y1 = 0;
  485.       assign_ushort(phdr->x2, pdev->width-1);
  486.       assign_ushort(phdr->y2, height-1);
  487.       assign_ushort(phdr->hres, (int)pdev->x_pixels_per_inch);
  488.       assign_ushort(phdr->vres, (int)pdev->y_pixels_per_inch);
  489. !     phdr->vmode = 0;
  490.       /* nplanes was set by the caller */
  491.       assign_ushort(phdr->bpl, (planar && depth > 1 ? rsize : raster));
  492.       assign_ushort(phdr->palinfo, (gx_device_has_color(pdev) ? 1 : 2));
  493. --- 182,212 ----
  494.   private int
  495.   pcx_write_page(gx_device_printer *pdev, FILE *file, pcx_header _ss *phdr,
  496.     int planar)
  497. ! {    int orig_raster = gdev_prn_raster(pdev);
  498. !     int raster = round_up(orig_raster, 2);    /* PCX format requires even */
  499. !     uint rsize = round_up((pdev->width + 7) >> 3, 2);    /* ditto */
  500.       int height = pdev->height;
  501.       int depth = pdev->color_info.depth;
  502. !     byte *line = (byte *)gs_malloc(raster + rsize, 1, "pcx file buffer");
  503. !     byte *plane = line + raster;
  504.       int y;
  505.       int code = 0;            /* return code */
  506. !     if ( line == 0 )        /* can't allocate line buffer */
  507.           return_error(gs_error_VMerror);
  508.   
  509. !     /* Set up the header struct. */
  510.   
  511.       phdr->manuf = 10;
  512. !     phdr->version = 5;
  513.       phdr->encoding = 1;    /* 1 for rle 8-bit encoding */
  514. +     /* bpp was set by the caller */
  515.       phdr->x1 = 0;
  516.       phdr->y1 = 0;
  517.       assign_ushort(phdr->x2, pdev->width-1);
  518.       assign_ushort(phdr->y2, height-1);
  519.       assign_ushort(phdr->hres, (int)pdev->x_pixels_per_inch);
  520.       assign_ushort(phdr->vres, (int)pdev->y_pixels_per_inch);
  521. !     phdr->reserved = 0;
  522.       /* nplanes was set by the caller */
  523.       assign_ushort(phdr->bpl, (planar && depth > 1 ? rsize : raster));
  524.       assign_ushort(phdr->palinfo, (gx_device_has_color(pdev) ? 1 : 2));
  525. ***************
  526. *** 224,230 ****
  527.   
  528.       /* Dump the contents of the image. */
  529.       for ( y = 0; y < height; y++ )
  530. !        {    gdev_prn_copy_scan_lines(pdev, y, row, raster);
  531.           switch ( depth )
  532.              {
  533.           case 1:
  534. --- 220,233 ----
  535.   
  536.       /* Dump the contents of the image. */
  537.       for ( y = 0; y < height; y++ )
  538. !     {    byte *row;
  539. !         byte *end;
  540. !         int code = gdev_prn_get_bits(pdev, y, line, &row);
  541. !         if ( code < 0 ) break;
  542. !         end = row + raster;
  543. !         /* Clear an odd trailing byte. */
  544. !         if ( orig_raster & 1 )
  545. !             end[-1] = 0;
  546.           switch ( depth )
  547.              {
  548.           case 1:
  549. ***************
  550. *** 267,273 ****
  551.                          (((uint)from[7] & bmask)))
  552.                         >> shift;
  553.                   }
  554. !                 pcx_write_rle(plane, to, file);
  555.               }
  556.              }
  557.               break;
  558. --- 270,276 ----
  559.                          (((uint)from[7] & bmask)))
  560.                         >> shift;
  561.                   }
  562. !                 pcx_write_rle(plane, plane + rsize, file);
  563.               }
  564.              }
  565.               break;
  566. ***************
  567. *** 277,286 ****
  568.                 goto pcx_done;
  569.   
  570.              }
  571. !        }
  572.   
  573.   pcx_done:
  574. !     gs_free((char *)row, raster + rsize, 1, "pcx file buffer");
  575.   
  576.       return code;
  577.   }
  578. --- 280,289 ----
  579.                 goto pcx_done;
  580.   
  581.              }
  582. !     }
  583.   
  584.   pcx_done:
  585. !     gs_free((char *)line, raster + rsize, 1, "pcx file buffer");
  586.   
  587.       return code;
  588.   }
  589. *** 1.1    1993/07/19 15:43:44
  590. --- gdevtiff.c    1993/07/08 11:46:26
  591. ***************
  592. *** 47,52 ****
  593. --- 47,53 ----
  594.       long    prevdir;    /* file offset of previous directory offset */
  595.       long    diroff;        /* file offset of next write */
  596.       int        bigendian;    /* 1 if machine is big-endian, 0 otherwise */
  597. +     unsigned long iwidth;    /* width of image data in pixels */
  598.       int        fax_byte;
  599.       int        fax_weight;
  600.   } TIFFOUT;
  601. ***************
  602. *** 77,83 ****
  603.   /* The device descriptor */
  604.   #define X_DPI 204
  605.   #define Y_DPI 196
  606. ! #define LINE_SIZE ((X_DPI * 98 / 10 + 7) / 8)    /* bytes per line */
  607.   
  608.   private dev_proc_open_device(tiff_prn_open);
  609.   private dev_proc_print_page(tiff_print_page);
  610. --- 78,84 ----
  611.   /* The device descriptor */
  612.   #define X_DPI 204
  613.   #define Y_DPI 196
  614. ! #define LINE_SIZE ((X_DPI * 101 / 10 + 7) / 8)    /* bytes per line */
  615.   
  616.   private dev_proc_open_device(tiff_prn_open);
  617.   private dev_proc_print_page(tiff_print_page);
  618. ***************
  619. *** 108,116 ****
  620.   #define    PAPER_SIZE_LETTER    0
  621.       { 85,  110, 1728 },
  622.   #define    PAPER_SIZE_A4        1
  623. !     { 83,  117, 1728 },
  624.   #define    PAPER_SIZE_B4        2
  625. !     { 98, 1391, 2048 }
  626.   };
  627.   #define    NPAGEINFO (sizeof (pageinfo) / sizeof (pageinfo[0]))
  628.   
  629. --- 109,117 ----
  630.   #define    PAPER_SIZE_LETTER    0
  631.       { 85,  110, 1728 },
  632.   #define    PAPER_SIZE_A4        1
  633. !     { 85,  117, 1728 },
  634.   #define    PAPER_SIZE_B4        2
  635. !     { 101, 143, 2048 }
  636.   };
  637.   #define    NPAGEINFO (sizeof (pageinfo) / sizeof (pageinfo[0]))
  638.   
  639. ***************
  640. *** 143,148 ****
  641. --- 144,150 ----
  642.       if (rc == 0) {
  643.       gx_device_tiff* ddev = (gx_device_tiff*) pdev;
  644.       faxout_open_fp(ddev->file, &ddev->fax);
  645. +     ddev->fax.iwidth = pi->iw;
  646.       }
  647.       return (rc);
  648.   }
  649. ***************
  650. *** 654,660 ****
  651.       register int    run;
  652.       register int    rl;
  653.   
  654. !     ep = p + 1728/8;
  655.       bit = 7;
  656.       for (;;) {
  657.       find_white_run();
  658. --- 656,662 ----
  659.       register int    run;
  660.       register int    rl;
  661.   
  662. !     ep = p + faxp->iwidth/8;
  663.       bit = 7;
  664.       for (;;) {
  665.       find_white_run();
  666. ***************
  667. *** 689,695 ****
  668.   
  669.       if(c>=64) {
  670.       tpos = (c/64)-1;
  671. !     te = mwtable+tpos;
  672.       c -= te->count;
  673.       putcode(faxp, te);
  674.       }
  675. --- 691,697 ----
  676.   
  677.       if(c>=64) {
  678.       tpos = (c/64)-1;
  679. !     te = tpos < 27 ? mwtable+tpos : extable+tpos-27;
  680.       c -= te->count;
  681.       putcode(faxp, te);
  682.       }
  683. ***************
  684. *** 706,712 ****
  685.   
  686.       if(c>=64) {
  687.       tpos = (c/64)-1;
  688. !     te = mbtable+tpos;
  689.       c -= te->count;
  690.       putcode(faxp, te);
  691.       }
  692. --- 708,714 ----
  693.   
  694.       if(c>=64) {
  695.       tpos = (c/64)-1;
  696. !     te = tpos < 27 ? mbtable+tpos : extable+tpos-27;
  697.       c -= te->count;
  698.       putcode(faxp, te);
  699.       }
  700. *** 1.2    1993/06/29 02:22:52
  701. --- gdevx.c    1993/07/17 17:36:10
  702. ***************
  703. *** 157,164 ****
  704.       NULL,            /* palette */
  705.       NULL, NULL, NULL,    /* regularFonts, symbolFonts, dingbatFonts */
  706.       NULL, NULL, NULL,    /* regular_fonts, symbol_fonts, dingbat_fonts */
  707. !     1, 1, 0,        /* useXFonts, useScalableFonts, logXFonts */
  708. !     10.0,            /* xFontTolerance */
  709.       0.0, 0.0,        /* xResolution, yResolution */
  710.       1,            /* useBackingPixmap */
  711.       1, 1,            /* useXPutImage, useXSetTile */
  712. --- 157,164 ----
  713.       NULL,            /* palette */
  714.       NULL, NULL, NULL,    /* regularFonts, symbolFonts, dingbatFonts */
  715.       NULL, NULL, NULL,    /* regular_fonts, symbol_fonts, dingbat_fonts */
  716. !     1, 1,            /* useXFonts, useFontExtensions */
  717. !     1, 0,            /* useScalableFonts, logXFonts */
  718.       0.0, 0.0,        /* xResolution, yResolution */
  719.       1,            /* useBackingPixmap */
  720.       1, 1,            /* useXPutImage, useXSetTile */
  721. ***************
  722. *** 196,206 ****
  723.       }
  724.       if (xdev->dither_colors) {
  725.       if (gx_device_has_color(xdev))
  726.           gs_free((char *)xdev->dither_colors, sizeof(x_pixel),
  727. !             xdev->color_info.dither_gray, "gdev_x_gray_ramp");
  728.       else
  729.           gs_free((char *)xdev->dither_colors, sizeof(x_pixel),
  730. !             xdev->color_info.dither_rgb, "gdev_x_rgb_cube");
  731.       xdev->dither_colors = NULL;
  732.       }
  733.       if (xdev->dynamic_colors) {
  734. --- 196,208 ----
  735.       }
  736.       if (xdev->dither_colors) {
  737.       if (gx_device_has_color(xdev))
  738. + #define cube(r) (r*r*r)
  739.           gs_free((char *)xdev->dither_colors, sizeof(x_pixel),
  740. !             cube(xdev->color_info.dither_rgb), "gdev_x_rgb_cube");
  741. ! #undef cube
  742.       else
  743.           gs_free((char *)xdev->dither_colors, sizeof(x_pixel),
  744. !             xdev->color_info.dither_gray, "gdev_x_gray_ramp");
  745.       xdev->dither_colors = NULL;
  746.       }
  747.       if (xdev->dynamic_colors) {
  748. ***************
  749. *** 470,475 ****
  750. --- 472,488 ----
  751.       /* on every operation, but there's no separate driver routine */
  752.       /* for erasepage (yet). */
  753.       if (x == 0 && y == 0 && w == xdev->width && h == xdev->height) {
  754. +     if (color == xdev->foreground || color == xdev->background) {
  755. +         int i;
  756. +         XErrorHandler oldhandler = XSetErrorHandler(x_catch_free_colors);
  757. +         for (i = 0; i < xdev->dynamic_number; i++) {
  758. +         XFreeColors(xdev->dpy, xdev->cmap,
  759. +                 &xdev->dynamic_colors[i].pixel, 1, 0);
  760. +         }
  761. +         XSync(xdev->dpy, False);    /* Force any errors */
  762. +         oldhandler = XSetErrorHandler(oldhandler);
  763. +         xdev->dynamic_number = 0;
  764. +     }
  765.       xdev->colors_or = xdev->colors_and = color;
  766.       }
  767.       if (xdev->bpixmap != (Pixmap) 0) {
  768. *** 1.1    1993/07/19 15:43:44
  769. --- gdevx.h    1993/07/17 17:36:10
  770. ***************
  771. *** 145,152 ****
  772.       x11fontmap *regular_fonts;
  773.       x11fontmap *symbol_fonts;
  774.       x11fontmap *dingbat_fonts;
  775. !     Boolean useXFonts, useScalableFonts, logXFonts;
  776. !     float xFontTolerance;
  777.       float xResolution, yResolution;
  778.   
  779.       /* Flags work around various X server problems. */
  780. --- 145,151 ----
  781.       x11fontmap *regular_fonts;
  782.       x11fontmap *symbol_fonts;
  783.       x11fontmap *dingbat_fonts;
  784. !     Boolean useXFonts, useFontExtensions, useScalableFonts, logXFonts;
  785.       float xResolution, yResolution;
  786.   
  787.       /* Flags work around various X server problems. */
  788. ***************
  789. *** 159,164 ****
  790. --- 158,164 ----
  791.   /* function to keep track of screen updates */
  792.   void x_update_add(P5(gx_device *, int, int, int, int));
  793.   void gdev_x_clear_window(P1(gx_device_X *));
  794. + int x_catch_free_colors(P2(Display *, XErrorEvent *));
  795.   
  796.   /* Number used to distinguish when resoultion was set from the command line */
  797.   #define FAKE_RES (16*72)
  798. *** 1.2    1993/06/29 02:22:52
  799. --- gdevxini.c    1993/07/17 17:36:10
  800. ***************
  801. *** 40,48 ****
  802.       {"dingbatFonts", "DingbatFonts", XtRString, sizeof(String), 
  803.        XtOffsetOf(gx_device_X, dingbatFonts),
  804.        XtRString, "ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal--"},
  805. -     {"externalFontTolerance", "ExternalFontTolerance", XtRFloat, sizeof(float),
  806. -      XtOffsetOf(gx_device_X, xFontTolerance),
  807. -      XtRString, (XtPointer)"10.0"},
  808.       {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
  809.        XtOffsetOf(gx_device_X, foreground),
  810.        XtRString, (XtPointer)"XtDefaultForeground"},
  811. --- 40,45 ----
  812. ***************
  813. *** 110,115 ****
  814. --- 107,115 ----
  815.       {"useExternalFonts", "UseExternalFonts", XtRBoolean, sizeof(Boolean), 
  816.        XtOffsetOf(gx_device_X, useXFonts),
  817.        XtRImmediate, (XtPointer)True},
  818. +     {"useFontExtensions", "UseFontExtensions", XtRBoolean, sizeof(Boolean), 
  819. +      XtOffsetOf(gx_device_X, useFontExtensions),
  820. +      XtRImmediate, (XtPointer)True},
  821.       {"useScalableFonts", "UseScalableFonts", XtRBoolean, sizeof(Boolean), 
  822.        XtOffsetOf(gx_device_X, useScalableFonts),
  823.        XtRImmediate, (XtPointer)True},
  824. ***************
  825. *** 127,132 ****
  826. --- 127,139 ----
  827.        XtRString, (XtPointer)"0.0"},
  828.   };
  829.   
  830. + private String
  831. + fallback_resources[] = {
  832. +     "Ghostscript*Background: white",
  833. +     "Ghostscript*Foreground: black",
  834. +     NULL
  835. + };
  836.   /* Define constants for orientation from ghostview */
  837.   /* Number represents clockwise rotation of the paper in degrees */
  838.   typedef enum {
  839. ***************
  840. *** 157,163 ****
  841.       return oldhandler(dpy, err);
  842.   }
  843.   
  844. ! private int
  845.   x_catch_free_colors(Display *dpy, XErrorEvent *err)
  846.   {
  847.       if (err->request_code == X_FreeColors) return 0;
  848. --- 164,170 ----
  849.       return oldhandler(dpy, err);
  850.   }
  851.   
  852. ! int
  853.   x_catch_free_colors(Display *dpy, XErrorEvent *err)
  854.   {
  855.       if (err->request_code == X_FreeColors) return 0;
  856. ***************
  857. *** 329,334 ****
  858. --- 336,342 ----
  859.   #endif
  860.       XtToolkitInitialize();
  861.       app_con = XtCreateApplicationContext();
  862. +     XtAppSetFallbackResources(app_con, fallback_resources);
  863.       dpy = XtOpenDisplay(app_con, NULL, "ghostscript", "Ghostscript",
  864.               NULL, 0, &zero, NULL);
  865.       toplevel = XtAppCreateShell(NULL, "Ghostscript",
  866. ***************
  867. *** 576,582 ****
  868.           type == XA_STRING) {
  869.           nitems = sscanf(buf, "%*s %d %d", &(xdev->foreground),
  870.                                 &(xdev->background));
  871. !         if (nitems != 2 || *buf != 'M' || *buf != 'G' || *buf != 'C') {
  872.           eprintf("gs: Malformed ghostview color property.\n");
  873.           exit(1);
  874.           }
  875. --- 584,590 ----
  876.           type == XA_STRING) {
  877.           nitems = sscanf(buf, "%*s %d %d", &(xdev->foreground),
  878.                                 &(xdev->background));
  879. !         if (nitems != 2 || *buf != 'M' && *buf != 'G' && *buf != 'C') {
  880.           eprintf("gs: Malformed ghostview color property.\n");
  881.           exit(1);
  882.           }
  883. ***************
  884. *** 599,611 ****
  885.   #endif
  886.       xdev->dither_colors = NULL;
  887.       xdev->dynamic_colors = NULL;
  888.       xdev->color_info.depth = xdev->vinfo->depth;
  889.   
  890.       if (palette == 'C') {
  891.       xdev->color_info.num_components = 3;
  892.       xdev->color_info.max_gray =
  893.           xdev->color_info.max_rgb = num_rgb - 1;
  894. -     xdev->dither_colors = NULL;
  895.   #if HaveStdCMap
  896.       /* Get a standard color map if available */
  897.       if (xdev->vinfo->visual == DefaultVisualOfScreen(xdev->scr)) {
  898. --- 607,620 ----
  899.   #endif
  900.       xdev->dither_colors = NULL;
  901.       xdev->dynamic_colors = NULL;
  902. +     xdev->dynamic_size = 0;
  903. +     xdev->dynamic_number = 0;
  904.       xdev->color_info.depth = xdev->vinfo->depth;
  905.   
  906.       if (palette == 'C') {
  907.       xdev->color_info.num_components = 3;
  908.       xdev->color_info.max_gray =
  909.           xdev->color_info.max_rgb = num_rgb - 1;
  910.   #if HaveStdCMap
  911.       /* Get a standard color map if available */
  912.       if (xdev->vinfo->visual == DefaultVisualOfScreen(xdev->scr)) {
  913. ***************
  914. *** 641,646 ****
  915. --- 650,659 ----
  916.           xdev->dither_colors =
  917.               (x_pixel *) gs_malloc(sizeof(x_pixel), cube(ramp_size),
  918.                         "gdev_x_rgb_cube");
  919. +         if (xdev->dither_colors == NULL) {
  920. +             ramp_size--;
  921. +             goto no_cube;
  922. +         }
  923.           for (r = 0; r < ramp_size; r++) {
  924.               for (g = 0; g < ramp_size; g++) {
  925.               for (b = 0; b < ramp_size; b++) {
  926. ***************
  927. *** 663,681 ****
  928.                       xdev->dither_colors[cube_index(r, g, b)] =
  929.                       xc.pixel;
  930.                   } else {
  931. !                     int i;
  932.                       ramp_size--;
  933. !                     oldhandler =
  934. !                     XSetErrorHandler(x_catch_free_colors);
  935. !                     for (i = 1; i < cube_index(r, g, b); i++) {
  936.                       XFreeColors(xdev->dpy, xdev->cmap,
  937. !                             &(xdev->dither_colors[i]),
  938. !                             1, 0);
  939.                       }
  940. -                     /* Force any errors */
  941. -                     XSync(xdev->dpy, False);
  942. -                     oldhandler = XSetErrorHandler(oldhandler);
  943.                       gs_free((char *)xdev->dither_colors,
  944.                           sizeof(x_pixel), cube(ramp_size),
  945.                           "gdev_x_rgb_cube");
  946. --- 676,695 ----
  947.                       xdev->dither_colors[cube_index(r, g, b)] =
  948.                       xc.pixel;
  949.                   } else {
  950. !                     eprintf3("Warning: failed to allocate %dx%dx%d RGB cube.\n",
  951. !                          ramp_size, ramp_size, ramp_size);
  952.                       ramp_size--;
  953. !                     if (cube_index(r, g, b) - 1 > 0) {
  954. !                     oldhandler =
  955. !                       XSetErrorHandler(x_catch_free_colors);
  956.                       XFreeColors(xdev->dpy, xdev->cmap,
  957. !                             xdev->dither_colors + 1,
  958. !                             cube_index(r, g, b) - 1, 0);
  959. !                     /* Force any errors */
  960. !                     XSync(xdev->dpy, False);
  961. !                     oldhandler =
  962. !                         XSetErrorHandler(oldhandler);
  963.                       }
  964.                       gs_free((char *)xdev->dither_colors,
  965.                           sizeof(x_pixel), cube(ramp_size),
  966.                           "gdev_x_rgb_cube");
  967. ***************
  968. *** 696,717 ****
  969.   
  970.       /* Allocate space for dynamic colors, do at most 256 */
  971.       /* If there are more avaiaible, we ask the X server */
  972. -     xdev->dynamic_number = 0;
  973.       xdev->dynamic_size = min(256, xdev->vinfo->colormap_size -
  974.                         cube(xdev->color_info.dither_rgb));
  975.       if (xdev->dynamic_size) {
  976.           xdev->dynamic_colors =
  977.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  978.                        "gdev_x_dynamic_colors");
  979. !     } else {
  980. !         xdev->dynamic_colors = NULL;
  981.       }
  982.   #undef cube
  983.       } else if (palette == 'G') {
  984.   grayscale:
  985.       xdev->color_info.num_components = 1;
  986.       xdev->color_info.max_gray = num_rgb - 1;
  987. -     xdev->dither_colors = NULL;
  988.   #if HaveStdCMap
  989.       /* Get a standard color map if available */
  990.       if (xdev->std_cmap = x_get_std_cmap(xdev, XA_RGB_GRAY_MAP)) {
  991. --- 710,730 ----
  992.   
  993.       /* Allocate space for dynamic colors, do at most 256 */
  994.       /* If there are more avaiaible, we ask the X server */
  995.       xdev->dynamic_size = min(256, xdev->vinfo->colormap_size -
  996.                         cube(xdev->color_info.dither_rgb));
  997.       if (xdev->dynamic_size) {
  998.           xdev->dynamic_colors =
  999.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  1000.                        "gdev_x_dynamic_colors");
  1001. !         if (xdev->dynamic_colors == NULL) {
  1002. !         xdev->dynamic_size = 0;
  1003. !         }
  1004.       }
  1005.   #undef cube
  1006.       } else if (palette == 'G') {
  1007.   grayscale:
  1008.       xdev->color_info.num_components = 1;
  1009.       xdev->color_info.max_gray = num_rgb - 1;
  1010.   #if HaveStdCMap
  1011.       /* Get a standard color map if available */
  1012.       if (xdev->std_cmap = x_get_std_cmap(xdev, XA_RGB_GRAY_MAP)) {
  1013. ***************
  1014. *** 736,741 ****
  1015. --- 749,758 ----
  1016.           xdev->dither_colors =
  1017.               (x_pixel *) gs_malloc(sizeof(x_pixel), ramp_size,
  1018.                         "gdev_x_gray_ramp");
  1019. +         if (xdev->dither_colors == NULL) {
  1020. +             ramp_size--;
  1021. +             goto no_ramp;
  1022. +         }
  1023.           for (i = 0; i < ramp_size; i++) {
  1024.               XColor xc;
  1025.   
  1026. ***************
  1027. *** 749,763 ****
  1028.               if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) {
  1029.                   xdev->dither_colors[i] = xc.pixel;
  1030.               } else {
  1031. !                 int j = i;
  1032.                   ramp_size /= 2;
  1033. !                 oldhandler = XSetErrorHandler(x_catch_free_colors);
  1034. !                 for (i = 1; i < j; i++) {
  1035.                   XFreeColors(xdev->dpy, xdev->cmap,
  1036. !                         &(xdev->dither_colors[i]), 1, 0);
  1037.                   }
  1038. -                 XSync(xdev->dpy, False); /* Force any errors */
  1039. -                 oldhandler = XSetErrorHandler(oldhandler);
  1040.                   gs_free((char *)xdev->dither_colors,
  1041.                       sizeof(x_pixel), ramp_size,
  1042.                       "gdev_x_gray_ramp");
  1043. --- 766,782 ----
  1044.               if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) {
  1045.                   xdev->dither_colors[i] = xc.pixel;
  1046.               } else {
  1047. !                 eprintf1("Warning: failed to allocate %d level gray ramp.\n",
  1048. !                      ramp_size);
  1049.                   ramp_size /= 2;
  1050. !                 if (i - 1 > 0) {
  1051. !                 oldhandler =
  1052. !                     XSetErrorHandler(x_catch_free_colors);
  1053.                   XFreeColors(xdev->dpy, xdev->cmap,
  1054. !                         xdev->dither_colors + 1, i - 1, 0);
  1055. !                 XSync(xdev->dpy, False); /* Force any errors */
  1056. !                 oldhandler = XSetErrorHandler(oldhandler);
  1057.                   }
  1058.                   gs_free((char *)xdev->dither_colors,
  1059.                       sizeof(x_pixel), ramp_size,
  1060.                       "gdev_x_gray_ramp");
  1061. ***************
  1062. *** 775,789 ****
  1063.   
  1064.       /* Allocate space for dynamic colors, do at most 256 */
  1065.       /* If there are more avaiaible, we ask the X server */
  1066. -     xdev->dynamic_number = 0;
  1067.       xdev->dynamic_size = min(256, xdev->vinfo->colormap_size -
  1068.                         xdev->color_info.dither_gray);
  1069.       if (xdev->dynamic_size) {
  1070.           xdev->dynamic_colors =
  1071.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  1072.                        "gdev_x_dynamic_colors");
  1073. !     } else {
  1074. !         xdev->dynamic_colors = NULL;
  1075.       }
  1076.       } else if (palette == 'M') {
  1077.   monochrome:
  1078. --- 794,808 ----
  1079.   
  1080.       /* Allocate space for dynamic colors, do at most 256 */
  1081.       /* If there are more avaiaible, we ask the X server */
  1082.       xdev->dynamic_size = min(256, xdev->vinfo->colormap_size -
  1083.                         xdev->color_info.dither_gray);
  1084.       if (xdev->dynamic_size) {
  1085.           xdev->dynamic_colors =
  1086.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  1087.                        "gdev_x_dynamic_colors");
  1088. !         if (xdev->dynamic_colors == NULL) {
  1089. !         xdev->dynamic_size = 0;
  1090. !         }
  1091.       }
  1092.       } else if (palette == 'M') {
  1093.   monochrome:
  1094. ***************
  1095. *** 866,877 ****
  1096. --- 885,907 ----
  1097.       if (x11_name = get_x11_name(&cp, &x11_name_len)) {
  1098.           font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1,
  1099.                          "gdev_x_setup_fontmap");
  1100. +         if (font == NULL) continue;
  1101.           font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1,
  1102.                             "gdev_x_setup_fontmap");
  1103. +         if (font->ps_name == NULL) {
  1104. +         gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap");
  1105. +         continue;
  1106. +         }
  1107.           strncpy(font->ps_name, ps_name, ps_name_len);
  1108.           font->ps_name[ps_name_len] = '\0';
  1109.           font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len,
  1110.                              "gdev_x_setup_fontmap");
  1111. +         if (font->x11_name == NULL) {
  1112. +         gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1,
  1113. +             "gdev_x_font_psname");
  1114. +         gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap");
  1115. +         continue;
  1116. +         }
  1117.           strncpy(font->x11_name, x11_name, x11_name_len-1);
  1118.           font->x11_name[x11_name_len-1] = '\0';
  1119.           font->std_names = NULL;
  1120. ***************
  1121. *** 888,899 ****
  1122. --- 918,940 ----
  1123.       if (x11_name = get_x11_name(&cp, &x11_name_len)) {
  1124.           font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1,
  1125.                          "gdev_x_setup_fontmap");
  1126. +         if (font == NULL) continue;
  1127.           font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1,
  1128.                             "gdev_x_setup_fontmap");
  1129. +         if (font->ps_name == NULL) {
  1130. +         gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap");
  1131. +         continue;
  1132. +         }
  1133.           strncpy(font->ps_name, ps_name, ps_name_len);
  1134.           font->ps_name[ps_name_len] = '\0';
  1135.           font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len,
  1136.                              "gdev_x_setup_fontmap");
  1137. +         if (font->x11_name == NULL) {
  1138. +         gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1,
  1139. +             "gdev_x_font_psname");
  1140. +         gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap");
  1141. +         continue;
  1142. +         }
  1143.           strncpy(font->x11_name, x11_name, x11_name_len-1);
  1144.           font->x11_name[x11_name_len-1] = '\0';
  1145.           font->std_names = NULL;
  1146. ***************
  1147. *** 910,921 ****
  1148. --- 951,973 ----
  1149.       if (x11_name = get_x11_name(&cp, &x11_name_len)) {
  1150.           font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1,
  1151.                          "gdev_x_setup_fontmap");
  1152. +         if (font == NULL) continue;
  1153.           font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1,
  1154.                             "gdev_x_setup_fontmap");
  1155. +         if (font->ps_name == NULL) {
  1156. +         gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap");
  1157. +         continue;
  1158. +         }
  1159.           strncpy(font->ps_name, ps_name, ps_name_len);
  1160.           font->ps_name[ps_name_len] = '\0';
  1161.           font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len,
  1162.                              "gdev_x_setup_fontmap");
  1163. +         if (font->x11_name == NULL) {
  1164. +         gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1,
  1165. +             "gdev_x_font_psname");
  1166. +         gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap");
  1167. +         continue;
  1168. +         }
  1169.           strncpy(font->x11_name, x11_name, x11_name_len-1);
  1170.           font->x11_name[x11_name_len-1] = '\0';
  1171.           font->std_names = NULL;
  1172. *** 1.2    1993/06/29 02:22:52
  1173. --- gdevxxf.c    1993/07/17 17:36:10
  1174. ***************
  1175. *** 74,89 ****
  1176.       gx_device_X *xdev = (gx_device_X *) dev;
  1177.       x_xfont *xxf;
  1178.       char x11template[256];
  1179. !     char *x11fontname;
  1180.       XFontStruct *x11font;
  1181.       x11fontmap *fmp;
  1182.       int i;
  1183. -     double diff, d;
  1184.       double height;
  1185.       int size;
  1186.       int xwidth, xheight, angle;
  1187.       Boolean My;
  1188. !     Boolean scalable_font;
  1189.   
  1190.       if (!xdev->useXFonts) return NULL;
  1191.   
  1192. --- 74,88 ----
  1193.       gx_device_X *xdev = (gx_device_X *) dev;
  1194.       x_xfont *xxf;
  1195.       char x11template[256];
  1196. !     char *x11fontname = NULL;
  1197.       XFontStruct *x11font;
  1198.       x11fontmap *fmp;
  1199.       int i;
  1200.       double height;
  1201.       int size;
  1202.       int xwidth, xheight, angle;
  1203.       Boolean My;
  1204. !     Boolean scalable_font = False;
  1205.   
  1206.       if (!xdev->useXFonts) return NULL;
  1207.   
  1208. ***************
  1209. *** 108,113 ****
  1210. --- 107,114 ----
  1211.       /* Don't do very small fonts.  Font metrics are way off due to rounding */
  1212.       if (xwidth <= 4 || xheight <= 4) return NULL;
  1213.   
  1214. +     if (!xdev->useFontExtensions && (My || angle != 0)) return NULL;
  1215.       if (encoding_index == 0 || encoding_index == 1) {
  1216.       int tried_other_encoding = 0;
  1217.   
  1218. ***************
  1219. *** 120,126 ****
  1220.       if (fmp == NULL) return NULL;
  1221.       while (True) {
  1222.           if (encoding_index == 0) {
  1223. -         scalable_font = False;
  1224.           if (fmp->std_count == -1) {
  1225.               sprintf(x11template, "%s%s", fmp->x11_name,
  1226.                   "-*-*-*-*-*-*-Adobe-fontspecific");
  1227. --- 121,126 ----
  1228. ***************
  1229. *** 128,134 ****
  1230.                               &fmp->std_count);
  1231.           }
  1232.           if (fmp->std_count) {
  1233. -             diff = 999.9;
  1234.               for (i = 0; i < fmp->std_count; i++) {
  1235.               char *szp = fmp->std_names[i] + strlen(fmp->x11_name)+1;
  1236.   
  1237. --- 128,133 ----
  1238. ***************
  1239. *** 139,166 ****
  1240.                   scalable_font = True;
  1241.                   continue;
  1242.               }
  1243. !             d = fabs(height - size) / height;
  1244. !             if (d < diff) {
  1245.                   x11fontname = fmp->std_names[i];
  1246. !                 diff = d;
  1247.               }
  1248.               }
  1249. !             if (xdev->useScalableFonts && scalable_font) {
  1250. !             d = fabs(height - xheight) / height;
  1251. !             if (d < diff) {
  1252. !                 sprintf(x11template, "%s-%d%s", fmp->x11_name,
  1253. !                     xheight, "-0-0-0-*-0-Adobe-fontspecific");
  1254. !                 x11fontname = x11template;
  1255. !                 diff = 0;    /* Always use scalable font if closer */
  1256. !             }
  1257.               }
  1258. !             if (diff*100 <= xdev->xFontTolerance) break;
  1259.           }
  1260.           if (tried_other_encoding) return NULL;
  1261.           encoding_index = 1;
  1262.           tried_other_encoding = 1;
  1263.           } else if (encoding_index == 1) {
  1264. -         scalable_font = False;
  1265.           if (fmp->iso_count == -1) {
  1266.               sprintf(x11template, "%s%s", fmp->x11_name,
  1267.                   "-*-*-*-*-*-*-ISO8859-1");
  1268. --- 138,160 ----
  1269.                   scalable_font = True;
  1270.                   continue;
  1271.               }
  1272. !             if (size == xheight) {
  1273.                   x11fontname = fmp->std_names[i];
  1274. !                 break;
  1275.               }
  1276.               }
  1277. !             if (!x11fontname && scalable_font &&
  1278. !             xdev->useScalableFonts) {
  1279. !             sprintf(x11template, "%s-%d%s", fmp->x11_name,
  1280. !                 xheight, "-0-0-0-*-0-Adobe-fontspecific");
  1281. !             x11fontname = x11template;
  1282.               }
  1283. !             if (x11fontname) break;
  1284.           }
  1285.           if (tried_other_encoding) return NULL;
  1286.           encoding_index = 1;
  1287.           tried_other_encoding = 1;
  1288.           } else if (encoding_index == 1) {
  1289.           if (fmp->iso_count == -1) {
  1290.               sprintf(x11template, "%s%s", fmp->x11_name,
  1291.                   "-*-*-*-*-*-*-ISO8859-1");
  1292. ***************
  1293. *** 168,174 ****
  1294.                               &fmp->iso_count);
  1295.           }
  1296.           if (fmp->iso_count) {
  1297. -             diff = 999.9;
  1298.               for (i = 0; i < fmp->iso_count; i++) {
  1299.               char *szp = fmp->iso_names[i] + strlen(fmp->x11_name)+1;
  1300.   
  1301. --- 162,167 ----
  1302. ***************
  1303. *** 179,200 ****
  1304.                   scalable_font = True;
  1305.                   continue;
  1306.               }
  1307. !             d = fabs(height - size) / height;
  1308. !             if (d < diff) {
  1309.                   x11fontname = fmp->iso_names[i];
  1310. !                 diff = d;
  1311.               }
  1312.               }
  1313. !             if (xdev->useScalableFonts && scalable_font) {
  1314. !             d = fabs(height - xheight) / height;
  1315. !             if (d < diff) {
  1316. !                 sprintf(x11template, "%s-%d%s", fmp->x11_name,
  1317. !                     xheight, "-0-0-0-*-0-ISO8859-1");
  1318. !                 x11fontname = x11template;
  1319. !                 diff = 0;    /* Always use scalable font if closer */
  1320. !             }
  1321.               }
  1322. !             if (diff*100 <= xdev->xFontTolerance) break;
  1323.           }
  1324.           if (tried_other_encoding) return NULL;
  1325.           encoding_index = 0;
  1326. --- 172,189 ----
  1327.                   scalable_font = True;
  1328.                   continue;
  1329.               }
  1330. !             if (size == xheight) {
  1331.                   x11fontname = fmp->iso_names[i];
  1332. !                 break;
  1333.               }
  1334.               }
  1335. !             if (!x11fontname && scalable_font &&
  1336. !             xdev->useScalableFonts) {
  1337. !             sprintf(x11template, "%s-%d%s", fmp->x11_name,
  1338. !                 xheight, "-0-0-0-*-0-ISO8859-1");
  1339. !             x11fontname = x11template;
  1340.               }
  1341. !             if (x11fontname) break;
  1342.           }
  1343.           if (tried_other_encoding) return NULL;
  1344.           encoding_index = 0;
  1345. ***************
  1346. *** 202,208 ****
  1347.           }
  1348.       }
  1349.       } else if (encoding_index == 2 || encoding_index == 3) {
  1350. -     scalable_font = False;
  1351.       if (encoding_index == 2) fmp = xdev->symbol_fonts;
  1352.       if (encoding_index == 3) fmp = xdev->dingbat_fonts;
  1353.       while (fmp) {
  1354. --- 191,196 ----
  1355. ***************
  1356. *** 219,225 ****
  1357.                           &fmp->std_count);
  1358.       }
  1359.       if (fmp->std_count) {
  1360. -         diff = 999.9;
  1361.           for (i = 0; i < fmp->std_count; i++) {
  1362.           char *szp = fmp->std_names[i] + strlen(fmp->x11_name)+1;
  1363.   
  1364. --- 207,212 ----
  1365. ***************
  1366. *** 230,251 ****
  1367.               scalable_font = True;
  1368.               continue;
  1369.           }
  1370. !         d = fabs(height - size) / height;
  1371. !         if (d < diff) {
  1372.               x11fontname = fmp->std_names[i];
  1373. !             diff = d;
  1374.           }
  1375.           }
  1376. !         if (xdev->useScalableFonts && scalable_font) {
  1377. !         d = fabs(height - xheight) / height;
  1378. !         if (d < diff) {
  1379. !             sprintf(x11template, "%s-%d%s", fmp->x11_name, xheight,
  1380. !                 "-0-0-0-*-0-Adobe-fontspecific");
  1381. !             x11fontname = x11template;
  1382. !             diff = 0;    /* Always use scalable font if closer */
  1383. !         }
  1384.           }
  1385. !         if (diff*100 > xdev->xFontTolerance) return NULL;
  1386.       } else {
  1387.           return NULL;
  1388.       }
  1389. --- 217,233 ----
  1390.               scalable_font = True;
  1391.               continue;
  1392.           }
  1393. !         if (size == xheight) {
  1394.               x11fontname = fmp->std_names[i];
  1395. !             break;
  1396.           }
  1397.           }
  1398. !         if (!x11fontname && scalable_font && xdev->useScalableFonts) {
  1399. !         sprintf(x11template, "%s-%d%s", fmp->x11_name, xheight,
  1400. !             "-0-0-0-*-0-Adobe-fontspecific");
  1401. !         x11fontname = x11template;
  1402.           }
  1403. !         if (!x11fontname) return NULL;
  1404.       } else {
  1405.           return NULL;
  1406.       }
  1407. ***************
  1408. *** 458,466 ****
  1409.   x_release(gx_xfont *xf, const gs_memory_procs *mprocs)
  1410.   {
  1411.       x_xfont *xxf = (x_xfont *) xf;
  1412. -     gx_device_X *xdev = xxf->xdev;
  1413.   
  1414. !     XFreeFont(xxf->xdev->dpy, xxf->font);
  1415.       if (mprocs != NULL)
  1416.       (*mprocs->free) ((char *)xf, 1, sizeof(x_xfont),
  1417.                "x_release");
  1418. --- 440,448 ----
  1419.   x_release(gx_xfont *xf, const gs_memory_procs *mprocs)
  1420.   {
  1421.       x_xfont *xxf = (x_xfont *) xf;
  1422.   
  1423. !     /* The device may not be open.  Cannot reliably free the font. */
  1424. !     /* XFreeFont(xxf->xdev->dpy, xxf->font); */
  1425.       if (mprocs != NULL)
  1426.       (*mprocs->free) ((char *)xf, 1, sizeof(x_xfont),
  1427.                "x_release");
  1428. *** 1.1    1993/07/19 15:43:44
  1429. --- gp_msdos.c    1993/07/18 09:55:36
  1430. ***************
  1431. *** 161,166 ****
  1432. --- 161,167 ----
  1433.       char *p;
  1434.       int hsize = 0;
  1435.       int i;
  1436. +     int dot = 0;
  1437.       if ( pfen == 0 )
  1438.           return 0;
  1439.       pattern = (*mprocs->alloc)(pat_size, 1,
  1440. ***************
  1441. *** 176,183 ****
  1442. --- 177,193 ----
  1443.               /* Skip to . or end of string so DOS can do it. */
  1444.               *p++ = '*';
  1445.               while ( i < patlen && pat[i] != '.' ) i++;
  1446. +             if ( i == patlen && !dot )
  1447. +             {    /* DOS doesn't interpret * alone as */
  1448. +                 /* matching all files; we need *.*. */
  1449. +                 *p++ = '.';
  1450. +                 *p++ = '*';
  1451. +             }
  1452.               i--;
  1453.               continue;
  1454. +         case '.':
  1455. +             dot = 1;
  1456. +             break;
  1457.           case '\\':
  1458.               if ( i + 1 < patlen && pat[i + 1] == '\\' )
  1459.                   i++;
  1460. ***************
  1461. *** 185,190 ****
  1462. --- 195,201 ----
  1463.           case ':':
  1464.           case '/':
  1465.               hsize = p + 1 - (pattern + patlen);
  1466. +             dot = 0;
  1467.           }
  1468.           *p++ = pat[i];
  1469.       }
  1470. *** 1.1    1993/07/19 15:43:44
  1471. --- gs_fonts.ps    1993/07/18 11:40:58
  1472. ***************
  1473. *** 16,36 ****
  1474.   % things, the copyright notice and this notice must be preserved on all
  1475.   % copies.
  1476.   
  1477. ! % Font initialization for Ghostscript.
  1478.   
  1479.   % The standard representation for PostScript compatible fonts is described
  1480.   % in the book "Adobe Type 1 Font Format", published by Adobe Systems Inc.
  1481. - % We don't attempt to document this representation here.
  1482. - % Ghostscript uses Type 1 fonts, except that the external form doesn't use
  1483. - % eexec encryption and may not even use CharString encryption.
  1484.   
  1485.   % Define the default font.
  1486.   /defaultfontname /Ugly def
  1487.   
  1488.   % Load the font name -> font file name map.
  1489.   userdict /Fontmap FontDirectory maxlength dict put
  1490. ! /.loadFontmap        % <filename>
  1491.    { 2 dict begin
  1492.        mark Fontmap
  1493.        /;
  1494. --- 16,32 ----
  1495.   % things, the copyright notice and this notice must be preserved on all
  1496.   % copies.
  1497.   
  1498. ! % Font initialization and management code.
  1499.   
  1500.   % The standard representation for PostScript compatible fonts is described
  1501.   % in the book "Adobe Type 1 Font Format", published by Adobe Systems Inc.
  1502.   
  1503.   % Define the default font.
  1504.   /defaultfontname /Ugly def
  1505.   
  1506.   % Load the font name -> font file name map.
  1507.   userdict /Fontmap FontDirectory maxlength dict put
  1508. ! /.loadFontmap        % <filename> .loadFontmap -
  1509.    { 2 dict begin
  1510.        mark Fontmap
  1511.        /;
  1512. ***************
  1513. *** 46,56 ****
  1514.    } bind def
  1515.   (Fontmap) .loadFontmap
  1516.   
  1517. ! % Ghostscript optionally can load individual CharStrings as they are needed.
  1518.   % (This is intended primarily for machines with very small memories.)
  1519. ! % This happens if DISKFONTS is true.  In this case, we define another
  1520. ! % dictionary parallel to FontDirectory that retains an open file
  1521. ! % for every font loaded.
  1522.   /FontFileDirectory 10 dict def
  1523.   
  1524.   % Define an augmented version of .buildfont1 that inserts UnderlinePosition
  1525. --- 42,186 ----
  1526.    } bind def
  1527.   (Fontmap) .loadFontmap
  1528.   
  1529. ! % Parse a font file just enough to find the FontName.
  1530. ! /.findfontname        % <file> .findfontname <name> true
  1531. !             % <file> .findfontname false
  1532. !             % Closes the file in either case.
  1533. !  {  { dup token not { false exit } if        % end of file
  1534. !       dup /eexec eq { pop false exit } if    % reached eexec section
  1535. !       dup /FontName eq
  1536. !        { xcheck not { dup token exit } if }    % found /FontName
  1537. !        { pop }
  1538. !       ifelse
  1539. !     } loop
  1540. !    dup { 3 } { 2 } ifelse -1 roll closefile
  1541. !  } bind def
  1542. ! (GS_FONTPATH) getenv not { (%END GS_FONTPATH) .skipeof } if
  1543. ! pop
  1544. ! % Scan directories looking for plausible fonts.  "Plausible" means that
  1545. ! % the file begins either with %!PS-AdobeFont-, or with \200\001
  1546. ! % followed by four arbitrary bytes and then "%!PS-AdobeFont-".
  1547. ! % To speed up the search, we skip any file whose name appears in
  1548. ! % the Fontmap (with any extension and upper/lower case variation) already.
  1549. ! %
  1550. ! % NOTE: The current implementation of this procedure is Unix/DOS-
  1551. ! % specific.  It assumes that '/' and '\' are directory separators; that
  1552. ! % the part of a file name following the last '.' is the extension;
  1553. ! % that ';' cannot appear in a file name; and that ':' can appear in a
  1554. ! % file name only if the file name doesn't begin with '/', '\', or '.'.
  1555. ! % (this is so that Unix systems can use ':' as the separator).
  1556. ! %
  1557. ! /.lowerstring        % <string> .lowerstring <lowerstring>
  1558. !  { 0 1 2 index length 1 sub
  1559. !     { 2 copy get dup 65 ge exch 90 le and
  1560. !        { 2 copy 2 copy get 32 add put }
  1561. !      if pop
  1562. !     }
  1563. !    for
  1564. !  } bind def
  1565. ! /.splitfilename        % <dir.../base.extn> .basename <base> <extn>
  1566. !  {  { (/) search { true } { (\\) search } ifelse
  1567. !        { pop pop }
  1568. !        { exit }
  1569. !       ifelse
  1570. !     }
  1571. !    loop
  1572. !    dup { (.) search { pop pop } { exit } ifelse } loop
  1573. !    2 copy eq
  1574. !     { pop () }
  1575. !     { exch dup length 2 index length 1 add sub 0 exch getinterval exch }
  1576. !    ifelse
  1577. !  } bind def
  1578. ! /.scanfontdict Fontmap maxlength dict def
  1579. ! /.scanfontbegin
  1580. !  {    % Construct the table of all file names already in Fontmap.
  1581. !    Fontmap
  1582. !     { exch pop dup type /stringtype eq
  1583. !        { .splitfilename pop =string copy .lowerstring cvn
  1584. !          .scanfontdict exch true .growput
  1585. !        }
  1586. !        { pop
  1587. !        }
  1588. !       ifelse
  1589. !     }
  1590. !    forall
  1591. !  } bind def
  1592. ! /.scanfontskip 4 dict dup begin
  1593. !   (afm) true def
  1594. !   (pfm) true def
  1595. ! end def
  1596. ! /.scan1fontstring 128 string def
  1597. ! /.fontheader (\200\001????%!PS-AdobeFont-*) def
  1598. ! /.scan1fontfirst .fontheader length string def
  1599. ! /.scan1fontdir        % <dirname> .scan1fontdir -
  1600. !  { QUIET not { (Scanning ) print dup print ( for fonts... ) print flush } if
  1601. !    0 exch (/*) concatstrings
  1602. !     { dup .splitfilename
  1603. !       .scanfontskip exch known exch .scanfontdict exch known or
  1604. !        { pop
  1605. !        }
  1606. !        { dup (r) file
  1607. !          dup .scan1fontfirst readstring pop
  1608. !      dup .fontheader 6 16 getinterval .stringmatch
  1609. !       { pop true }
  1610. !       { .fontheader .stringmatch }
  1611. !      ifelse
  1612. !       { dup 0 setfileposition .findfontname
  1613. !          { dup Fontmap exch known
  1614. !             { pop pop
  1615. !         }
  1616. !         { exch copystring exch
  1617. !           Fontmap exch 2 index .growput
  1618. !           .splitfilename pop true .scanfontdict 3 1 roll .growput
  1619. !           1 add
  1620. !         }
  1621. !            ifelse
  1622. !          }
  1623. !         if
  1624. !       }
  1625. !       { closefile pop
  1626. !       }
  1627. !      ifelse
  1628. !        }
  1629. !       ifelse
  1630. !     }
  1631. !    .scan1fontstring filenameforall
  1632. !    QUIET { pop } { =only ( found.\n) print flush } ifelse
  1633. !  } bind def
  1634. ! % Scan all the directories mentioned in GS_FONTPATH.
  1635. ! (GS_FONTPATH) getenv
  1636. !  { .scanfontbegin
  1637. !     % Parsing the list of dictionaries is messy, since we have to
  1638. !     % handle both the Unix : and the other-system ; as separators.
  1639. !     % See the earlier comment for the restrictions that make this work.
  1640. !     { dup length 0 eq { pop exit } if
  1641. !       (;) search
  1642. !        { exch pop
  1643. !        }
  1644. !        { dup 0 1 getinterval (/\\.) exch search
  1645. !           { pop pop pop (:) search
  1646. !          { exch pop }
  1647. !          { () exch }
  1648. !         ifelse
  1649. !       }
  1650. !       { pop () exch
  1651. !       }
  1652. !      ifelse
  1653. !        }
  1654. !       ifelse .scan1fontdir
  1655. !     }
  1656. !    loop
  1657. !  }
  1658. ! if
  1659. ! %END GS_FONTPATH
  1660. ! % If DISKFONTS is true, we load individual CharStrings as they are needed.
  1661.   % (This is intended primarily for machines with very small memories.)
  1662. ! % In this case, we define another dictionary, parallel to FontDirectory,
  1663. ! % that retains an open file for every font loaded.
  1664.   /FontFileDirectory 10 dict def
  1665.   
  1666.   % Define an augmented version of .buildfont1 that inserts UnderlinePosition
  1667. ***************
  1668. *** 124,130 ****
  1669.    } odef
  1670.   
  1671.   
  1672. ! % Ghostscript optionally can load individual CharStrings as they are needed.
  1673.   % (This is intended primarily for machines with very small memories.)
  1674.   % Initially, the character definition is the file position of the definition;
  1675.   % this gets replaced with the actual CharString.
  1676. --- 254,260 ----
  1677.    } odef
  1678.   
  1679.   
  1680. ! % If DISKFONTS is true, we load individual CharStrings as they are needed.
  1681.   % (This is intended primarily for machines with very small memories.)
  1682.   % Initially, the character definition is the file position of the definition;
  1683.   % this gets replaced with the actual CharString.
  1684. ***************
  1685. *** 175,181 ****
  1686.   
  1687.   % Type1BuildGlyph calls load_C to actually load the character definition.
  1688.   
  1689. ! /load_C        % <charname> <fileposandlength> -> -
  1690.    { dup abs 1000 idiv FontFile exch setfileposition
  1691.      CharStrings 3 1 roll
  1692.      dup 0 lt
  1693. --- 305,311 ----
  1694.   
  1695.   % Type1BuildGlyph calls load_C to actually load the character definition.
  1696.   
  1697. ! /load_C        % <charname> <fileposandlength> load_C -
  1698.    { dup abs 1000 idiv FontFile exch setfileposition
  1699.      CharStrings 3 1 roll
  1700.      dup 0 lt
  1701. ***************
  1702. *** 195,201 ****
  1703.      pop        % the mark
  1704.    } bind def
  1705.   
  1706. ! /seac_C        % charstring -> achar bchar ..or nothing..
  1707.    { dup length _Cstring length le
  1708.       { 4330 exch _Cstring .type1decrypt exch pop
  1709.         dup dup length 2 sub 2 getinterval <0c06> eq    % seac
  1710. --- 325,331 ----
  1711.      pop        % the mark
  1712.    } bind def
  1713.   
  1714. ! /seac_C        % <charstring> seac_C <achar> <bchar> ..or nothing..
  1715.    { dup length _Cstring length le
  1716.       { 4330 exch _Cstring .type1decrypt exch pop
  1717.         dup dup length 2 sub 2 getinterval <0c06> eq    % seac
  1718. ***************
  1719. *** 294,341 ****
  1720.       ifelse
  1721.     } bind def
  1722.   currentdict end readonly /.loadfontdict exch def
  1723. ! /.loadfont        % <file> .loadfont ->
  1724.    { mark exch systemdict begin
  1725.      DISKFONTS { .loadfontdict begin } if
  1726.      % We really would just like systemdict on the stack,
  1727.      % but fonts produced by Fontographer require a writable dictionary....
  1728.      8 dict begin        % garbage
  1729. !     % We can't just use `run', because we want to check for
  1730. !     % .PFB files.  We can't save the packing status anywhere,
  1731. !     % so we need two separate control paths.
  1732. !     % Also, we would like to use `false /PFBDecode filter',
  1733.       % but this occasionally produces a whitespace character as
  1734.       % the first of an eexec section, so we can't do it.
  1735. !     % Finally, since the interpreter doesn't currently automatically
  1736.       % close an input file when the file reaches EOF (unless it's
  1737.       % the interpreter's current input file), we must explicitly
  1738.       % close the real file if we used a PFB filter.
  1739. !    currentpacking
  1740. !     { false setpacking
  1741. !        { dup read not { -1 } if
  1742. !          2 copy unread 16#80 eq
  1743. !       { dup true /PFBDecode filter cvx exec closefile }
  1744. !       { cvx exec }
  1745. !      ifelse
  1746. !        } stopped    % split up `execute'
  1747. !       true setpacking
  1748. !       $error /newerror get and {handleerror} if
  1749. !     }
  1750. !     {  { dup read not { -1 } if
  1751. !          2 copy unread 16#80 eq
  1752. !       { dup true /PFBDecode filter cvx exec closefile }
  1753. !       { cvx exec }
  1754. !      ifelse
  1755. !        } execute
  1756. !     }
  1757. !    ifelse
  1758. !    DISKFONTS { end } if
  1759. !    end end cleartomark
  1760.    } bind def
  1761.   
  1762.   % Define a procedure for defining aliased fonts.
  1763.   % We just copy the original font, changing the FontName.
  1764. ! /.aliasfont        % <name> <font> -> <newFont>
  1765.    { dup length 2 add dict
  1766.      dup 3 -1 roll { 1 index /FID eq { pop pop } { put dup } ifelse } forall
  1767.      /FontName 3 index put
  1768. --- 424,465 ----
  1769.       ifelse
  1770.     } bind def
  1771.   currentdict end readonly /.loadfontdict exch def
  1772. ! /.loadfont        % <file> .loadfont -
  1773.    { mark exch systemdict begin
  1774.      DISKFONTS { .loadfontdict begin } if
  1775.      % We really would just like systemdict on the stack,
  1776.      % but fonts produced by Fontographer require a writable dictionary....
  1777.      8 dict begin        % garbage
  1778. !     % We can't just use `run', because we want to check for .PFB files.
  1779. !    currentpacking
  1780. !     { false setpacking .loadfont1 true setpacking }
  1781. !     { .loadfont1 }
  1782. !    ifelse
  1783. !     { handleerror } if
  1784. !    end
  1785. !    DISKFONTS { end } if
  1786. !    end cleartomark
  1787. !  } bind def
  1788. ! /.loadfont1        % <file> .loadfont1 <errorflag>
  1789. !  {    % We would like to use `false /PFBDecode filter',
  1790.       % but this occasionally produces a whitespace character as
  1791.       % the first of an eexec section, so we can't do it.
  1792. !     % Also, since the interpreter doesn't currently automatically
  1793.       % close an input file when the file reaches EOF (unless it's
  1794.       % the interpreter's current input file), we must explicitly
  1795.       % close the real file if we used a PFB filter.
  1796. !     { dup read not { -1 } if
  1797. !       2 copy unread 16#80 eq
  1798. !        { dup true /PFBDecode filter cvx exec closefile }
  1799. !        { cvx exec }
  1800. !       ifelse
  1801. !     } stopped
  1802. !    $error /newerror get and
  1803.    } bind def
  1804.   
  1805.   % Define a procedure for defining aliased fonts.
  1806.   % We just copy the original font, changing the FontName.
  1807. ! /.aliasfont        % <name> <font> .aliasfont <newFont>
  1808.    { dup length 2 add dict
  1809.      dup 3 -1 roll { 1 index /FID eq { pop pop } { put dup } ifelse } forall
  1810.      /FontName 3 index put
  1811. ***************
  1812. *** 392,417 ****
  1813.           { vmstatus 3 { =only ( ) print } repeat
  1814.             (done.\n) print flush
  1815.           } if
  1816.          % Check to make sure the font was actually loaded.
  1817.          dup FontDirectory exch known { findfont exit } if
  1818.   
  1819. !        (Loading ) print dup cvx =only
  1820. !        ( font failed, substituting ) print defaultfontname cvx =only
  1821. !        (.\n) print flush
  1822.          defaultfontname findfont .aliasfont exit
  1823.        }
  1824.       if
  1825.   
  1826.       % findlibfile failed, substitute the default font.
  1827.       % Stack: fontname fontfilename
  1828. !     (Can't find \(or can't open\) font file ) print print
  1829. !     dup defaultfontname eq
  1830. !      { ( for default font \() print cvx =only
  1831.          (\)!  Giving up.\n) print flush 1 .quit
  1832.        }
  1833. !      { ( for font ) print dup cvx =only
  1834. !        (, substituting ) print defaultfontname cvx =only
  1835. !        (.\n) print flush
  1836.          defaultfontname findfont .aliasfont
  1837.        }
  1838.       ifelse
  1839. --- 516,574 ----
  1840.           { vmstatus 3 { =only ( ) print } repeat
  1841.             (done.\n) print flush
  1842.           } if
  1843.          % Check to make sure the font was actually loaded.
  1844.          dup FontDirectory exch known { findfont exit } if
  1845.   
  1846. !        % Maybe the file had a different FontName.
  1847. !        % See if we can get a FontName from the file, and if so,
  1848. !        % whether a font by that name exists now.
  1849. !        dup Fontmap exch get findlibfile
  1850. !         { exch pop .findfontname
  1851. !            { dup FontDirectory exch .knownget
  1852. !               {    % Yes.  Stack: origfontname filefontname fontdir
  1853. !             exch
  1854. !             QUIET
  1855. !              { pop
  1856. !              }
  1857. !              { (Using ) print cvx =only
  1858. !                ( font for ) print 1 index cvx =only
  1859. !                (.\n) print flush
  1860. !              }
  1861. !             ifelse
  1862. !             .aliasfont exit
  1863. !           }
  1864. !          if pop
  1865. !            }
  1866. !           if
  1867. !         }
  1868. !        if
  1869. !        % The font definitely did not load correctly.
  1870. !        QUIET not
  1871. !         { (Loading ) print dup cvx =only
  1872. !           ( font failed, substituting ) print defaultfontname cvx =only
  1873. !           (.\n) print flush
  1874. !         } if
  1875.          defaultfontname findfont .aliasfont exit
  1876.        }
  1877.       if
  1878.   
  1879.       % findlibfile failed, substitute the default font.
  1880.       % Stack: fontname fontfilename
  1881. !     (Can't find \(or can't open\) font file )
  1882. !     1 index defaultfontname eq
  1883. !      { print print ( for default font \() print cvx =only
  1884.          (\)!  Giving up.\n) print flush 1 .quit
  1885.        }
  1886. !      { QUIET
  1887. !         { pop
  1888. !         }
  1889. !         { print print ( for font ) print dup cvx =only
  1890. !           (, substituting ) print defaultfontname cvx =only
  1891. !           (.\n) print flush
  1892. !         }
  1893. !        ifelse
  1894.          defaultfontname findfont .aliasfont
  1895.        }
  1896.       ifelse
  1897. ***************
  1898. *** 469,475 ****
  1899.   % because that would bind it into outline_C.)
  1900.   /setcachedevice_C { setcachedevice } bind def
  1901.   
  1902. ! /outline_C        % <charname> <charstring> -> -
  1903.    { currentdict /Metrics .knownget
  1904.       { 2 index .knownget
  1905.          { dup type dup /integertype eq exch /realtype eq or
  1906. --- 626,632 ----
  1907.   % because that would bind it into outline_C.)
  1908.   /setcachedevice_C { setcachedevice } bind def
  1909.   
  1910. ! /outline_C        % <charname> <charstring> outline_C -
  1911.    { currentdict /Metrics .knownget
  1912.       { 2 index .knownget
  1913.          { dup type dup /integertype eq exch /realtype eq or
  1914. *** 1.1    1993/07/19 15:43:44
  1915. --- gs_statd.ps    1993/07/09 07:51:16
  1916. ***************
  1917. *** 33,43 ****
  1918.    /letter {612 792 //statusdict begin .setpagesize end} bind def
  1919.    /note {540 720 //statusdict begin .setpagesize end} bind def
  1920.    /legal {612 1008 //statusdict begin .setpagesize end} bind def
  1921. !  /a3 {842 1190 //statusdict begin .setpagesize end} bind def
  1922. !  /a4 {595 842 //statusdict begin .setpagesize end} bind def
  1923. !  /a5 {421 595 //statusdict begin .setpagesize end} bind def
  1924. !  /a6 {297 421 //statusdict begin .setpagesize end} bind def
  1925. !  /b4 {709 1002 //statusdict begin .setpagesize end} bind def
  1926.    /flsa {612 936 //statusdict begin .setpagesize end} bind def  % U.S. foolscap
  1927.    /flse {612 936 //statusdict begin .setpagesize end} bind def  % European foolscap
  1928.    /halfletter {396 612 //statusdict begin .setpagesize end} bind def
  1929. --- 33,60 ----
  1930.    /letter {612 792 //statusdict begin .setpagesize end} bind def
  1931.    /note {540 720 //statusdict begin .setpagesize end} bind def
  1932.    /legal {612 1008 //statusdict begin .setpagesize end} bind def
  1933. !  /a0 {2380 3368 //statusdict begin .setpagesize end} bind def  % ISO standard
  1934. !  /a1 {1684 2380 //statusdict begin .setpagesize end} bind def  % ISO standard
  1935. !  /a2 {1190 1684 //statusdict begin .setpagesize end} bind def  % ISO standard
  1936. !  /a3 {842 1190 //statusdict begin .setpagesize end} bind def  % ISO standard
  1937. !  /a4 {595 842 //statusdict begin .setpagesize end} bind def  % ISO standard
  1938. !  /a5 {421 595 //statusdict begin .setpagesize end} bind def  % ISO standard
  1939. !  /a6 {297 421 //statusdict begin .setpagesize end} bind def  % ISO standard
  1940. !  /a7 {210 297 //statusdict begin .setpagesize end} bind def  % ISO standard
  1941. !  /a8 {148 210 //statusdict begin .setpagesize end} bind def  % ISO standard
  1942. !  /a9 {105 148 //statusdict begin .setpagesize end} bind def  % ISO standard
  1943. !  /a10 {74 105 //statusdict begin .setpagesize end} bind def  % ISO standard
  1944. !  /b0 {2836 4008 //statusdict begin .setpagesize end} bind def  % ISO standard
  1945. !  /b1 {2004 2836 //statusdict begin .setpagesize end} bind def  % ISO standard
  1946. !  /b2 {1418 2004 //statusdict begin .setpagesize end} bind def  % ISO standard
  1947. !  /b3 {1002 1418 //statusdict begin .setpagesize end} bind def  % ISO standard
  1948. !  /b4 {709 1002 //statusdict begin .setpagesize end} bind def  % ISO standard
  1949. !  /b5 {501 709 //statusdict begin .setpagesize end} bind def  % ISO standard
  1950. !  /archE {2592 3456 //statusdict begin .setpagesize end} bind def % U.S. CAD std
  1951. !  /archD {1728 2592 //statusdict begin .setpagesize end} bind def % U.S. CAD std
  1952. !  /archC {1296 1728 //statusdict begin .setpagesize end} bind def % U.S. CAD std
  1953. !  /archB {864 1296 //statusdict begin .setpagesize end} bind def  % U.S. CAD std
  1954. !  /archA {648 864 //statusdict begin .setpagesize end} bind def  % U.S. CAD std
  1955.    /flsa {612 936 //statusdict begin .setpagesize end} bind def  % U.S. foolscap
  1956.    /flse {612 936 //statusdict begin .setpagesize end} bind def  % European foolscap
  1957.    /halfletter {396 612 //statusdict begin .setpagesize end} bind def
  1958. ***************
  1959. *** 51,57 ****
  1960.   % Define the pagetype values for the known page formats.
  1961.   % The values for all but letter and note are arbitrary.
  1962.   /.pagetypenames
  1963. !  { /letter /note /legal /a3 /a4 /a5 /a6 /b4
  1964.      /flsa /flse /halfletter /11x17 /ledger
  1965.    } cvlit readonly def
  1966.   
  1967. --- 68,76 ----
  1968.   % Define the pagetype values for the known page formats.
  1969.   % The values for all but letter and note are arbitrary.
  1970.   /.pagetypenames
  1971. !  { /letter /note /legal 
  1972. !    /a0 /a1 /a2 /a3 /a4 /a5 /a6 /a7 /a8 /a9 /a10
  1973. !    /b0 /b1 /b2 /b3 /b4 /b5 /archE /archD /archC /archB /archA
  1974.      /flsa /flse /halfletter /11x17 /ledger
  1975.    } cvlit readonly def
  1976.   
  1977. ***************
  1978. *** 176,182 ****
  1979.    /exitserver { clear stop } bind def
  1980.   % However, this interacts badly with our standard error handler,
  1981.   % so we override it with the following less appropriate definition.
  1982. !  /exitserver { clear cleardictstack } bind def
  1983.    /setrealdevice { } bind def
  1984.   
  1985.   end    % serverdict
  1986. --- 195,201 ----
  1987.    /exitserver { clear stop } bind def
  1988.   % However, this interacts badly with our standard error handler,
  1989.   % so we override it with the following less appropriate definition.
  1990. !  /exitserver { 0 ne { clear cleardictstack } if } bind def
  1991.    /setrealdevice { } bind def
  1992.   
  1993.   end    % serverdict
  1994. *** 1.1    1993/07/19 15:43:44
  1995. --- gschar.c    1993/07/08 16:50:00
  1996. ***************
  1997. *** 547,553 ****
  1998.               }
  1999.               else
  2000.                   code = show_fast_move(cc->wxy, pgs);
  2001. !             if ( code ) return code;
  2002.           }
  2003.           /* All done. */
  2004.           return show_finish(penum);
  2005. --- 547,558 ----
  2006.               }
  2007.               else
  2008.                   code = show_fast_move(cc->wxy, pgs);
  2009. !             if ( code )
  2010. !             {    /* Might be kshow, so store the state. */
  2011. !                 penum->current_char = chr;
  2012. !                 penum->current_glyph = glyph;
  2013. !                 return code;
  2014. !             }
  2015.           }
  2016.           /* All done. */
  2017.           return show_finish(penum);
  2018. *** 1.2    1993/06/29 02:22:52
  2019. --- gsdps1.c    1993/06/28 17:46:38
  2020. ***************
  2021. *** 18,23 ****
  2022. --- 18,24 ----
  2023.   
  2024.   /* gsdps1.c */
  2025.   /* Display PostScript graphics additions for Ghostscript library */
  2026. + #include "math_.h"
  2027.   #include "gx.h"
  2028.   #include "gserrors.h"
  2029.   #include "gxfixed.h"
  2030. ***************
  2031. *** 31,37 ****
  2032.   int
  2033.   gs_setbbox(gs_state *pgs, floatp llx, floatp lly, floatp urx, floatp ury)
  2034.   {    gs_rect ubox, dbox;
  2035. !     gs_fixed_rect bbox;
  2036.       gx_path *ppath = pgs->path;
  2037.       int code;
  2038.       if ( llx > urx || lly > ury )
  2039. --- 32,38 ----
  2040.   int
  2041.   gs_setbbox(gs_state *pgs, floatp llx, floatp lly, floatp urx, floatp ury)
  2042.   {    gs_rect ubox, dbox;
  2043. !     gs_fixed_rect obox, bbox;
  2044.       gx_path *ppath = pgs->path;
  2045.       int code;
  2046.       if ( llx > urx || lly > ury )
  2047. ***************
  2048. *** 43,61 ****
  2049.       ubox.q.y = ury;
  2050.       if ( (code = gs_bbox_transform(&ubox, &ctm_only(pgs), &dbox)) < 0 )
  2051.           return code;
  2052. !     if ( gx_path_bbox(ppath, &bbox) >= 0 )
  2053.       {    /* Take the union of the bboxes. */
  2054. !         ppath->bbox.p.x = min(bbox.p.x, float2fixed(dbox.p.x));
  2055. !         ppath->bbox.p.y = min(bbox.p.y, float2fixed(dbox.p.y));
  2056. !         ppath->bbox.q.x = max(bbox.q.x, float2fixed(dbox.q.x));
  2057. !         ppath->bbox.q.y = max(bbox.q.y, float2fixed(dbox.q.y));
  2058.       }
  2059.       else        /* empty path */
  2060.       {    /* Just set the bbox. */
  2061. !         ppath->bbox.p.x = float2fixed(dbox.p.x);
  2062. !         ppath->bbox.p.y = float2fixed(dbox.p.y);
  2063. !         ppath->bbox.q.x = float2fixed(dbox.q.x);
  2064. !         ppath->bbox.q.y = float2fixed(dbox.q.y);
  2065.           ppath->bbox_set = 1;
  2066.       }
  2067.       return 0;
  2068. --- 44,67 ----
  2069.       ubox.q.y = ury;
  2070.       if ( (code = gs_bbox_transform(&ubox, &ctm_only(pgs), &dbox)) < 0 )
  2071.           return code;
  2072. !     /* Round the corners in opposite directions. */
  2073. !     bbox.p.x = (fixed)floor(dbox.p.x * _fixed_scale);
  2074. !     bbox.p.y = (fixed)floor(dbox.p.y * _fixed_scale);
  2075. !     bbox.q.x = (fixed)ceil(dbox.q.x * _fixed_scale);
  2076. !     bbox.q.y = (fixed)ceil(dbox.q.y * _fixed_scale);
  2077. !     if ( gx_path_bbox(ppath, &obox) >= 0 )
  2078.       {    /* Take the union of the bboxes. */
  2079. !         ppath->bbox.p.x = min(obox.p.x, bbox.p.x);
  2080. !         ppath->bbox.p.y = min(obox.p.y, bbox.p.y);
  2081. !         ppath->bbox.q.x = max(obox.q.x, bbox.q.x);
  2082. !         ppath->bbox.q.y = max(obox.q.y, bbox.q.y);
  2083.       }
  2084.       else        /* empty path */
  2085.       {    /* Just set the bbox. */
  2086. !         ppath->bbox.p.x = bbox.p.x;
  2087. !         ppath->bbox.p.y = bbox.p.y;
  2088. !         ppath->bbox.q.x = bbox.q.x;
  2089. !         ppath->bbox.q.y = bbox.q.y;
  2090.           ppath->bbox_set = 1;
  2091.       }
  2092.       return 0;
  2093. *** /dev/null    1993/07/19 15:46:30
  2094. --- gsgraph.uue    1993/07/08 08:07:50
  2095. ***************
  2096. *** 0 ****
  2097. --- 1,21 ----
  2098. + begin 644 gsgraph.ico
  2099. + M   !  $ (" 0      #H @  %@   "@    @    0     $ !       @ ( 
  2100. + M                              "   "     @(  @    (  @ " @   
  2101. + M@("  $! 0    /\  /\   #__P#_    _P#_ /__  #___\ S,S,S,S,S,S,
  2102. + MS,S,S,S,S,S,S,S,S,S,S+N[S,S,S,S,O+S+S+S+N[S,S+S+N\S,S+R\R\R\
  2103. + MO,R\R[N\O,S,S,R\O,O,O,N[O+S,O+N[O,S,O+S+S+S,S+R\S+R\S+S,S+R[
  2104. + MO+O,R[O,R[N\R[O,S,S,S,S,S,S,S,S,S,S,S,S,O,S,S,S,S,S,S,S,S,S,
  2105. + MS,S,S,S,S,S,S,S,S,S,S    /__________\          /_______P\   
  2106. + M         /_______P             /_______P   /    _P /\/______
  2107. + M\ ____    ___P_______P_____P  _____P______________   /______
  2108. + M_______P /\  /_P /__________\  /\ #P  #__________P          
  2109. + M#_______\/             /_P_P#_\             #_#_\ __        
  2110. + M        _____P               /____\               #_#P_P    
  2111. + M            #___                  __\                 #__P  
  2112. + M               /__                   /\                     
  2113. + M                                                            
  2114. + M    ^   __P  ?_^  ?OS  "!X    .    !     (    &    PA@  >=\ 
  2115. + M /__@ '__\ !___@ ?__^ '___@#___X!____ ____@?___P/___^'____S_
  2116. + !____
  2117. +  
  2118. + end
  2119. *** /dev/null    1993/07/19 15:46:30
  2120. --- gstext.uue    1993/07/08 08:07:50
  2121. ***************
  2122. *** 0 ****
  2123. --- 1,21 ----
  2124. + begin 644 gstext.ico
  2125. + M   !  $ (" 0      #H @  %@   "@    @    0     $ !       @ ( 
  2126. + M                              "   "     @(  @    (  @ " @   
  2127. + M@("  $! 0    /\  /\   #__P#_    _P#_ /__  #___\ $1$1$1$1$1$1
  2128. + M$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1$1N[L1&[L1&[L1$1L1$1$1$;$1L;
  2129. + M$1L;$1L1$1$1$1$1&Q$;&Q$;&Q$;$1&Q$1$1$1L1&QL1&QL1&Q$1L1$1$1$;
  2130. + MN[$1N[$1N[$1$;$1$1$1&Q$1$1$1$1$1$1&Q$1$1$1L1$1$1$1$1$1$1L1$1
  2131. + M$1$1$1$1$1$1$1$1$1$1$0   /__________\          /_______P\   
  2132. + M         /_______P             /_______P   /    _P /\/______
  2133. + M\ ____    ___P_______P_____P  _____P______________   /______
  2134. + M_______P /\  /_P /__________\  /\ #P  #__________P          
  2135. + M#_______\/             /_P_P#_\             #_#_\ __        
  2136. + M        _____P               /____\               #_#P_P    
  2137. + M            #___                  __\                 #__P  
  2138. + M               /__                   /\                     
  2139. + M                                                            
  2140. + M    ^   __P  ?_^  ?OS  "!X    .    !     (    &    PA@  >=\ 
  2141. + M /__@ '__\ !___@ ?__^ '___@#___X!____ ____@?___P/___^'____S_
  2142. + !____
  2143. +  
  2144. + end
  2145. *** 1.1    1993/07/19 15:43:44
  2146. --- gxdither.c    1993/07/08 17:00:44
  2147. ***************
  2148. *** 234,250 ****
  2149.   #define half (frac_1/2)
  2150.       if ( rem_r > half )
  2151.           rem_r = frac_1 - rem_r,
  2152. !           adjust_r = -1, r++, lum_invert += lum_red_weight;
  2153.       else
  2154.           adjust_r = 1;
  2155.       if ( rem_g > half )
  2156.           rem_g = frac_1 - rem_g,
  2157. !           adjust_g = -1, g++, lum_invert += lum_green_weight;
  2158.       else
  2159.           adjust_g = 1;
  2160.       if ( rem_b > half )
  2161.           rem_b = frac_1 - rem_b,
  2162. !           adjust_b = -1, b++, lum_invert += lum_blue_weight;
  2163.       else
  2164.           adjust_b = 1;
  2165.       pdevc->color1 = (*map_rgb_color)(dev, fractional_color(r, max_value),
  2166. --- 234,250 ----
  2167.   #define half (frac_1/2)
  2168.       if ( rem_r > half )
  2169.           rem_r = frac_1 - rem_r,
  2170. !           adjust_r = -1, r++, lum_invert += lum_red_weight * 2;
  2171.       else
  2172.           adjust_r = 1;
  2173.       if ( rem_g > half )
  2174.           rem_g = frac_1 - rem_g,
  2175. !           adjust_g = -1, g++, lum_invert += lum_green_weight * 2;
  2176.       else
  2177.           adjust_g = 1;
  2178.       if ( rem_b > half )
  2179.           rem_b = frac_1 - rem_b,
  2180. !           adjust_b = -1, b++, lum_invert += lum_blue_weight * 2;
  2181.       else
  2182.           adjust_b = 1;
  2183.       pdevc->color1 = (*map_rgb_color)(dev, fractional_color(r, max_value),
  2184. ***************
  2185. *** 311,325 ****
  2186.           color2 = (*map_rgb_color)(dev, fractional_color(r, max_value),
  2187.                         fractional_color(g, max_value),
  2188.                         fractional_color(b, max_value));
  2189. - /****** THIS IS A BAD IDEA ******/
  2190. - #if 0
  2191.           if ( lum_w[diagc] < lum_invert )
  2192.              {    pdevc->color2 = pdevc->color1;
  2193.               pdevc->color1 = color2;
  2194.               pdevc->halftone_level = level = hsize - level;
  2195.              }
  2196.           else
  2197. - #endif
  2198.               pdevc->color2 = color2;
  2199.           gx_color_load(pdevc, pgs);
  2200.          }
  2201. --- 311,322 ----
  2202. *** 1.3    1993/06/29 02:58:13
  2203. --- unix-ansi.mak    1993/07/19 15:50:09
  2204. ***************
  2205. *** 1077,1083 ****
  2206.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  2207.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  2208.   # *    sunview  SunView window system   [SunOS only]
  2209. ! #    x11    X Windows version 11, release >=3   [Unix and VMS only]
  2210.   # Printers:
  2211.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  2212.   #    bj10e    Canon BubbleJet BJ10e
  2213. --- 1077,1083 ----
  2214.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  2215.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  2216.   # *    sunview  SunView window system   [SunOS only]
  2217. ! #    x11    X Windows version 11, release >=4   [Unix and VMS only]
  2218.   # Printers:
  2219.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  2220.   #    bj10e    Canon BubbleJet BJ10e
  2221. ***************
  2222. *** 1109,1114 ****
  2223. --- 1109,1115 ----
  2224.   # *    lj250    DEC LJ250 Companion color printer
  2225.   # +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression
  2226.   # +    ljet3    H-P LaserJet III* with Delta Row compression
  2227. + # +    ljet4    H-P LaserJet 4 (defaults to 600 dpi)
  2228.   # +    ljetplus  H-P LaserJet Plus
  2229.   # *    m8510    C.Itoh M8510 printer
  2230.   # *    necp6    NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
  2231. ***************
  2232. *** 1436,1441 ****
  2233. --- 1437,1447 ----
  2234.   ljet3.dev: $(HPMONO)
  2235.       $(SHP)gssetdev ljet3 $(HPMONO)
  2236.   
  2237. + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
  2238. + ljet4.dev: $(HPMONO)
  2239. +     $(SHP)gssetdev ljet4 $(HPMONO)
  2240.   ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
  2241.   ### Note: there are two different 500C drivers, both contributed by users.###
  2242.   ###   If you have questions about the djet500c driver,                    ###
  2243. ***************
  2244. *** 1517,1527 ****
  2245.   ### Note: this driver was contributed by a user: if you have questions,  ###
  2246.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  2247.   
  2248. ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ)
  2249.   escp2.dev: $(escp2_)
  2250.       $(SHP)gssetdev escp2 $(escp2_)
  2251.   
  2252. ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH)
  2253.   
  2254.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  2255.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  2256. --- 1523,1533 ----
  2257.   ### Note: this driver was contributed by a user: if you have questions,  ###
  2258.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  2259.   
  2260. ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
  2261.   escp2.dev: $(escp2_)
  2262.       $(SHP)gssetdev escp2 $(escp2_)
  2263.   
  2264. ! gdevescp.$(OBJ): gdevescp.c $(PDEVH)
  2265.   
  2266.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  2267.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  2268. ***************
  2269. *** 1716,1729 ****
  2270.   # Aladdin Enterprises does not support Ghostview.  For more information
  2271.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  2272.   
  2273. - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy.  No
  2274. - #       routines are used from either of these two libraries.  If you
  2275. - #       do not have libXmu.a or libXext.a, simply remove these two lines
  2276. - #       from the Makefile.
  2277.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  2278.   x11.dev: $(x11_)
  2279.       $(SHP)gssetdev x11 $(x11_)
  2280. !     $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext
  2281.   
  2282.   # See the main makefile for the definition of XINCLUDE.
  2283.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  2284. --- 1722,1731 ----
  2285.   # Aladdin Enterprises does not support Ghostview.  For more information
  2286.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  2287.   
  2288.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  2289.   x11.dev: $(x11_)
  2290.       $(SHP)gssetdev x11 $(x11_)
  2291. !     $(SHP)gsaddmod x11 -lib Xt X11 Xext
  2292.   
  2293.   # See the main makefile for the definition of XINCLUDE.
  2294.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  2295. *** 1.3    1993/06/29 02:58:13
  2296. --- unix-cc.mak    1993/07/19 15:50:10
  2297. ***************
  2298. *** 1072,1078 ****
  2299.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  2300.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  2301.   # *    sunview  SunView window system   [SunOS only]
  2302. ! #    x11    X Windows version 11, release >=3   [Unix and VMS only]
  2303.   # Printers:
  2304.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  2305.   #    bj10e    Canon BubbleJet BJ10e
  2306. --- 1072,1078 ----
  2307.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  2308.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  2309.   # *    sunview  SunView window system   [SunOS only]
  2310. ! #    x11    X Windows version 11, release >=4   [Unix and VMS only]
  2311.   # Printers:
  2312.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  2313.   #    bj10e    Canon BubbleJet BJ10e
  2314. ***************
  2315. *** 1104,1109 ****
  2316. --- 1104,1110 ----
  2317.   # *    lj250    DEC LJ250 Companion color printer
  2318.   # +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression
  2319.   # +    ljet3    H-P LaserJet III* with Delta Row compression
  2320. + # +    ljet4    H-P LaserJet 4 (defaults to 600 dpi)
  2321.   # +    ljetplus  H-P LaserJet Plus
  2322.   # *    m8510    C.Itoh M8510 printer
  2323.   # *    necp6    NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
  2324. ***************
  2325. *** 1431,1436 ****
  2326. --- 1432,1442 ----
  2327.   ljet3.dev: $(HPMONO)
  2328.       $(SHP)gssetdev ljet3 $(HPMONO)
  2329.   
  2330. + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
  2331. + ljet4.dev: $(HPMONO)
  2332. +     $(SHP)gssetdev ljet4 $(HPMONO)
  2333.   ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
  2334.   ### Note: there are two different 500C drivers, both contributed by users.###
  2335.   ###   If you have questions about the djet500c driver,                    ###
  2336. ***************
  2337. *** 1512,1522 ****
  2338.   ### Note: this driver was contributed by a user: if you have questions,  ###
  2339.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  2340.   
  2341. ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ)
  2342.   escp2.dev: $(escp2_)
  2343.       $(SHP)gssetdev escp2 $(escp2_)
  2344.   
  2345. ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH)
  2346.   
  2347.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  2348.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  2349. --- 1518,1528 ----
  2350.   ### Note: this driver was contributed by a user: if you have questions,  ###
  2351.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  2352.   
  2353. ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
  2354.   escp2.dev: $(escp2_)
  2355.       $(SHP)gssetdev escp2 $(escp2_)
  2356.   
  2357. ! gdevescp.$(OBJ): gdevescp.c $(PDEVH)
  2358.   
  2359.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  2360.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  2361. ***************
  2362. *** 1711,1724 ****
  2363.   # Aladdin Enterprises does not support Ghostview.  For more information
  2364.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  2365.   
  2366. - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy.  No
  2367. - #       routines are used from either of these two libraries.  If you
  2368. - #       do not have libXmu.a or libXext.a, simply remove these two lines
  2369. - #       from the Makefile.
  2370.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  2371.   x11.dev: $(x11_)
  2372.       $(SHP)gssetdev x11 $(x11_)
  2373. !     $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext
  2374.   
  2375.   # See the main makefile for the definition of XINCLUDE.
  2376.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  2377. --- 1717,1726 ----
  2378.   # Aladdin Enterprises does not support Ghostview.  For more information
  2379.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  2380.   
  2381.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  2382.   x11.dev: $(x11_)
  2383.       $(SHP)gssetdev x11 $(x11_)
  2384. !     $(SHP)gsaddmod x11 -lib Xt X11 Xext
  2385.   
  2386.   # See the main makefile for the definition of XINCLUDE.
  2387.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  2388. *** 1.3    1993/06/29 02:58:13
  2389. --- unix-gcc.mak    1993/07/19 15:50:12
  2390. ***************
  2391. *** 1079,1085 ****
  2392.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  2393.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  2394.   # *    sunview  SunView window system   [SunOS only]
  2395. ! #    x11    X Windows version 11, release >=3   [Unix and VMS only]
  2396.   # Printers:
  2397.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  2398.   #    bj10e    Canon BubbleJet BJ10e
  2399. --- 1079,1085 ----
  2400.   # *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  2401.   # *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  2402.   # *    sunview  SunView window system   [SunOS only]
  2403. ! #    x11    X Windows version 11, release >=4   [Unix and VMS only]
  2404.   # Printers:
  2405.   # *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  2406.   #    bj10e    Canon BubbleJet BJ10e
  2407. ***************
  2408. *** 1111,1116 ****
  2409. --- 1111,1117 ----
  2410.   # *    lj250    DEC LJ250 Companion color printer
  2411.   # +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression
  2412.   # +    ljet3    H-P LaserJet III* with Delta Row compression
  2413. + # +    ljet4    H-P LaserJet 4 (defaults to 600 dpi)
  2414.   # +    ljetplus  H-P LaserJet Plus
  2415.   # *    m8510    C.Itoh M8510 printer
  2416.   # *    necp6    NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
  2417. ***************
  2418. *** 1438,1443 ****
  2419. --- 1439,1449 ----
  2420.   ljet3.dev: $(HPMONO)
  2421.       $(SHP)gssetdev ljet3 $(HPMONO)
  2422.   
  2423. + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
  2424. + ljet4.dev: $(HPMONO)
  2425. +     $(SHP)gssetdev ljet4 $(HPMONO)
  2426.   ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
  2427.   ### Note: there are two different 500C drivers, both contributed by users.###
  2428.   ###   If you have questions about the djet500c driver,                    ###
  2429. ***************
  2430. *** 1519,1529 ****
  2431.   ### Note: this driver was contributed by a user: if you have questions,  ###
  2432.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  2433.   
  2434. ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ)
  2435.   escp2.dev: $(escp2_)
  2436.       $(SHP)gssetdev escp2 $(escp2_)
  2437.   
  2438. ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH)
  2439.   
  2440.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  2441.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  2442. --- 1525,1535 ----
  2443.   ### Note: this driver was contributed by a user: if you have questions,  ###
  2444.   ###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  2445.   
  2446. ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
  2447.   escp2.dev: $(escp2_)
  2448.       $(SHP)gssetdev escp2 $(escp2_)
  2449.   
  2450. ! gdevescp.$(OBJ): gdevescp.c $(PDEVH)
  2451.   
  2452.   ### ------------ The H-P PaintJet color printer device ----------------- ###
  2453.   ### Note: this driver also supports the DEC LJ250 color printer, which   ###
  2454. ***************
  2455. *** 1718,1731 ****
  2456.   # Aladdin Enterprises does not support Ghostview.  For more information
  2457.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  2458.   
  2459. - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy.  No
  2460. - #       routines are used from either of these two libraries.  If you
  2461. - #       do not have libXmu.a or libXext.a, simply remove these two lines
  2462. - #       from the Makefile.
  2463.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  2464.   x11.dev: $(x11_)
  2465.       $(SHP)gssetdev x11 $(x11_)
  2466. !     $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext
  2467.   
  2468.   # See the main makefile for the definition of XINCLUDE.
  2469.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  2470. --- 1724,1733 ----
  2471.   # Aladdin Enterprises does not support Ghostview.  For more information
  2472.   # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  2473.   
  2474.   x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  2475.   x11.dev: $(x11_)
  2476.       $(SHP)gssetdev x11 $(x11_)
  2477. !     $(SHP)gsaddmod x11 -lib Xt X11 Xext
  2478.   
  2479.   # See the main makefile for the definition of XINCLUDE.
  2480.   GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  2481. *** 1.1    1993/07/19 15:43:44
  2482. --- use.doc    1993/07/18 15:52:50
  2483. ***************
  2484. *** 1,4 ****
  2485. !    Copyright (C) 1989, 1992 Aladdin Enterprises.  All rights reserved.
  2486.   
  2487.   This file is part of Ghostscript.
  2488.   
  2489. --- 1,4 ----
  2490. !    Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2491.   
  2492.   This file is part of Ghostscript.
  2493.   
  2494. ***************
  2495. *** 286,291 ****
  2496. --- 286,298 ----
  2497.   single directory, or a list of directories separated by a character
  2498.   appropriate for the operating system (':' on Unix systems, ';' on VMS
  2499.   systems, ';' on MS-DOS systems).
  2500. + When Ghostscript starts up, it also looks at the GS_FONTPATH environment
  2501. + variable, which is also a list of directories.  It goes to those
  2502. + directories and looks for all files that appear to contain PostScript
  2503. + fonts; it then effectively adds all those files and fonts to its internal
  2504. + copy of the Fontmap (the catalog of fonts and the files that contain
  2505. + them).
  2506.   
  2507.   Temporary files
  2508.   ---------------
  2509. *** 1.1    1993/07/19 15:43:44
  2510. --- vms-cc.mak    1993/07/08 16:55:20
  2511. ***************
  2512. *** 151,157 ****
  2513.   GXSTROKE
  2514.   IALLOC
  2515.   IBNUM
  2516. - IBSCAN
  2517.   ICCFONT
  2518.   IDEBUG
  2519.   IDICT
  2520. --- 151,156 ----
  2521. ***************
  2522. *** 161,166 ****
  2523. --- 160,166 ----
  2524.   INTERP
  2525.   ISAVE
  2526.   ISCAN
  2527. + ISCAN2
  2528.   IUTIL
  2529.   SBITS
  2530.   SCFD
  2531. ***************
  2532. *** 263,272 ****
  2533.   $ !
  2534.   $ CC'CDEF/NOLIST/OBJECT=GDEVX.OBJ GDEVX.C
  2535.   $ !
  2536.   $ CC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C
  2537.   $ !
  2538.   $ CC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C
  2539. ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GCONFIG,-
  2540.     GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,-
  2541.     ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,-
  2542.     ZDICT,ZFILE,ZFILEDEV,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,-
  2543. --- 263,274 ----
  2544.   $ !
  2545.   $ CC'CDEF/NOLIST/OBJECT=GDEVX.OBJ GDEVX.C
  2546.   $ !
  2547. + $ CC'CDEF/NOLIST/OBJECT=GDEVXXF.OBJ GDEVXXF.C
  2548. + $ !
  2549.   $ CC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C
  2550.   $ !
  2551.   $ CC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C
  2552. ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GDEVXXF,GCONFIG,-
  2553.     GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,-
  2554.     ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,-
  2555.     ZDICT,ZFILE,ZFILEDEV,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,-
  2556. ***************
  2557. *** 275,281 ****
  2558.     ZPROPS,ZRELBIT,ZSTACK,ZSTRING,ZTYPE,ZUPATH,ZVMEM),SYS$INPUT/OPT
  2559.   SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE
  2560.   $ !
  2561. ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,-
  2562.            GCONFIG.OBJ.*
  2563.   $ !
  2564.   $ DEASSIGN X11
  2565. --- 277,283 ----
  2566.     ZPROPS,ZRELBIT,ZSTACK,ZSTRING,ZTYPE,ZUPATH,ZVMEM),SYS$INPUT/OPT
  2567.   SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE
  2568.   $ !
  2569. ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GDEVXXF.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,-
  2570.            GCONFIG.OBJ.*
  2571.   $ !
  2572.   $ DEASSIGN X11
  2573. *** 1.1    1993/07/19 15:43:44
  2574. --- vms-gcc.mak    1993/07/08 16:55:32
  2575. ***************
  2576. *** 157,163 ****
  2577.   GXSTROKE
  2578.   IALLOC
  2579.   IBNUM
  2580. - IBSCAN
  2581.   ICCFONT
  2582.   IDEBUG
  2583.   IDICT
  2584. --- 157,162 ----
  2585. ***************
  2586. *** 167,172 ****
  2587. --- 166,172 ----
  2588.   INTERP
  2589.   ISAVE
  2590.   ISCAN
  2591. + ISCAN2
  2592.   IUTIL
  2593.   SBITS
  2594.   SCFD
  2595. ***************
  2596. *** 263,274 ****
  2597.   $ GCC'CDEF/NOLIST/DEFINE=('LIBDEF','INIDEF')/OBJECT=GCONFIG.OBJ GCONFIG.C
  2598.   $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") -
  2599.       /OBJECT=GDEVXINI.OBJ GDEVXINI.C
  2600. ! $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON")/OBJECT=GDEVX.OBJ -
  2601. !     GDEVX.C
  2602.   $ GCC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C
  2603.   $ !
  2604.   $ GCC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C
  2605. ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GCONFIG,-
  2606.     GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,-
  2607.     ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,-
  2608.     ZDICT,ZFILE,ZFILEDEV,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,-
  2609. --- 263,276 ----
  2610.   $ GCC'CDEF/NOLIST/DEFINE=('LIBDEF','INIDEF')/OBJECT=GCONFIG.OBJ GCONFIG.C
  2611.   $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") -
  2612.       /OBJECT=GDEVXINI.OBJ GDEVXINI.C
  2613. ! $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") -
  2614. !     /OBJECT=GDEVX.OBJ GDEVX.C
  2615. ! $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") -
  2616. !     /OBJECT=GDEVXXF.OBJ GDEVXXF.C
  2617.   $ GCC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C
  2618.   $ !
  2619.   $ GCC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C
  2620. ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GDEVXXF,GCONFIG,-
  2621.     GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,-
  2622.     ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,-
  2623.     ZDICT,ZFILE,ZFILEDEV,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,-
  2624. ***************
  2625. *** 277,283 ****
  2626.     ZPROPS,ZRELBIT,ZSTACK,ZSTRING,ZTYPE,ZUPATH,ZVMEM),SYS$INPUT/OPT
  2627.   SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE
  2628.   $ !
  2629. ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,-
  2630.            GCONFIG.OBJ.*
  2631.   $ !
  2632.   $ DONE:
  2633. --- 279,285 ----
  2634.     ZPROPS,ZRELBIT,ZSTACK,ZSTRING,ZTYPE,ZUPATH,ZVMEM),SYS$INPUT/OPT
  2635.   SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE
  2636.   $ !
  2637. ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GDEVXXF.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,-
  2638.            GCONFIG.OBJ.*
  2639.   $ !
  2640.   $ DONE:
  2641. *** 1.1    1993/07/19 15:43:44
  2642. --- zht2.c    1993/07/08 16:58:14
  2643. ***************
  2644. *** 21,26 ****
  2645. --- 21,27 ----
  2646.   #include "ghost.h"
  2647.   #include "errors.h"
  2648.   #include "oper.h"
  2649. + #include "alloc.h"
  2650.   #include "dict.h"
  2651.   #include "dparam.h"
  2652.   #include "iname.h"        /* for name_eq */
  2653.