home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR16 / GS261P.ZIP / GS261P1.FIX next >
Text File  |  1993-06-27  |  50KB  |  1,534 lines

  1.             Ghostscript 2.6.1 Patch #1
  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. *** /dev/null    Sun Jun 27 07:26:01 1993
  14. --- readme.fix    Thu Jun 17 11:18:48 1993
  15. ***************
  16. *** 0 ****
  17. --- 1,118 ----
  18. + Copyright (C) 1993 Aladdin Enterprises.  All rights reserved.
  19. + This file is part of Ghostscript; it is licensed under the same terms
  20. + as the rest of Ghostscript.  If you do not have Ghostscript, you do
  21. + not have the right to have this file.
  22. + Fixes for Ghostscript 2.6.1
  23. + ---------------------------
  24. + (last update: 6/14/93)
  25. + This file summarizes a number of important quality fixes for Ghostscript
  26. + 2.6.1.  The fixes are supplied in the form of replacements for
  27. + corresponding files in the 2.6.1 release.  Please report any problems.
  28. + 6/5/93
  29. + ------
  30. + Problem:
  31. +     The Unix install script used gs rather than $(GS) as the name of
  32. +     the executable.
  33. +     The Unix install script didn't copy gs_dbt_e.ps to $(gsdatadir).
  34. + Files affected:
  35. +     unixtail.mak (and unix-*.mak, built from it using tar_cat)
  36. + Problem:
  37. +     The ps2ascii script still referenced ps2ascii.ps under its
  38. +     old name gs_2asc.ps.
  39. + Files affected:
  40. +     ps2ascii
  41. + Problem:
  42. +     ps2image.ps had a 'pop' missing in the written-out definition of
  43. +     'max' in the boilerplate code it put at the beginning of
  44. +     compressed files.
  45. +     ps2image.ps got a typecheck if a scan line had no repeated
  46. +     data in it anywhere.
  47. + Files affected:
  48. +     ps2image.ps
  49. + Problem:
  50. +     rectfill drew rectangles with vertices specified in clockwise
  51. +     order as 0-width lines.
  52. + Files affected:
  53. +     gsdps1.c
  54. + Problem:
  55. +     The string matching function reported that 'abcdefg'
  56. +     matched the pattern 'abcde'.
  57. + Files affected:
  58. +     gsutil.c
  59. + Problem:
  60. +     The bounding box of non-rectangular clipping paths was not
  61. +     being marked as valid, so cached characters would simply get
  62. +     discarded as being outside the bounding box.
  63. + Fix:
  64. +     Have gx_path_intersect set the `setbbox' flag if the new clipping
  65. +     path is not rectangular.
  66. + Files affected:
  67. +     gxcpath.c
  68. + 6/9/93
  69. + ------
  70. + Problem:
  71. +     The PCX driver didn't offer a gray-scale option.
  72. + Fix:
  73. +     Implement one.
  74. + Files affected:
  75. +     devs.mak
  76. +     gdevpcx.c
  77. + 6/10/93
  78. + -------
  79. + Problem:
  80. +     Colors with equal R/G/B or C/M/Y components were converted to
  81. +     gray before being mapped through the transfer function.
  82. + Files affected:
  83. +     gxcmap.c
  84. + 6/11/93
  85. + -------
  86. + Problem:
  87. +     Faulty X servers could generate bogus errors on XFreeColors.
  88. + Fix:
  89. +     Catch and ignore the errors.
  90. + Files affected:
  91. +     gdevxini.c
  92. +     x_.h
  93. + Problem:
  94. +     X driver gave up on color allocation too easily.
  95. +     X driver dynamic color table size could become negative.
  96. + Files affected:
  97. +     gdevx.c
  98. + Problem:
  99. +     x_lookup_font could return platform fonts of very small
  100. +     sizes, which have very inaccurate metrics.
  101. + Fix:
  102. +     Don't return fonts of size 4 pixels or smaller.
  103. + Files affected:
  104. +     gdevxxf.c
  105. + 6/14/93
  106. + -------
  107. + Problem:
  108. +     rc_unshare could indirect through 0 to obtain the size of a
  109. +     new block, causing the CIE rendering caches to be allocated
  110. +     with a random size.
  111. + Fix:
  112. +     Change it to use rc_alloc_struct_1 rather than rc_alloc_1.
  113. + Files affected:
  114. +     gxrefct.h
  115. *** 1.1    1993/06/27 12:24:14
  116. --- devs.mak    1993/06/09 08:27:08
  117. ***************
  118. *** 108,113 ****
  119. --- 108,114 ----
  120.   #    gifmono    Monochrome GIF file format
  121.   #    gif8    8-bit color GIF file format
  122.   #    pcxmono    Monochrome PCX file format
  123. + #    pcxgray    8-bit gray scale PCX file format
  124.   #    pcx16    Older color PCX file format (EGA/VGA, 16-color)
  125.   #    pcx256    Newer color PCX file format (256-color)
  126.   #    pbm    Portable Bitmap (plain format)
  127. ***************
  128. *** 756,765 ****
  129.   
  130.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  131.   
  132. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h)
  133.   
  134.   pcxmono.dev: $(pcx_)
  135.       $(SHP)gssetdev pcxmono $(pcx_)
  136.   
  137.   pcx16.dev: $(pcx_)
  138.       $(SHP)gssetdev pcx16 $(pcx_)
  139. --- 757,769 ----
  140.   
  141.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  142.   
  143. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
  144.   
  145.   pcxmono.dev: $(pcx_)
  146.       $(SHP)gssetdev pcxmono $(pcx_)
  147. + pcxgray.dev: $(pcx_)
  148. +     $(SHP)gssetdev pcxgray $(pcx_)
  149.   
  150.   pcx16.dev: $(pcx_)
  151.       $(SHP)gssetdev pcx16 $(pcx_)
  152. *** 1.1    1993/06/27 12:24:14
  153. --- gdevpcx.c    1993/06/01 12:21:26
  154. ***************
  155. *** 1,4 ****
  156. ! /* Copyright (C) 1992 Aladdin Enterprises.  All rights reserved.
  157.   
  158.   This file is part of Ghostscript.
  159.   
  160. --- 1,4 ----
  161. ! /* Copyright (C) 1992, 1993 Aladdin Enterprises.  All rights reserved.
  162.   
  163.   This file is part of Ghostscript.
  164.   
  165. ***************
  166. *** 20,25 ****
  167. --- 20,26 ----
  168.   /* PCX file format devices for Ghostscript */
  169.   #include "gdevprn.h"
  170.   #include "gdevpccm.h"
  171. + #include "gxlum.h"
  172.   
  173.   /* Thanks to Phil Conrad for donating the original version */
  174.   /* of these drivers to Aladdin Enterprises. */
  175. ***************
  176. *** 43,48 ****
  177. --- 44,66 ----
  178.       0,0,0,0,            /* margins */
  179.       1, pcxmono_print_page);
  180.   
  181. + /* Chunky 8-bit gray scale. */
  182. + private dev_proc_print_page(pcx256_print_page);
  183. + private dev_proc_map_rgb_color(pcxgray_map_rgb_color);
  184. + private dev_proc_map_color_rgb(pcxgray_map_color_rgb);
  185. + private gx_device_procs pcxgray_procs =
  186. +   prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
  187. +     pcxgray_map_rgb_color, pcxgray_map_color_rgb);
  188. + gx_device_printer far_data gs_pcxgray_device =
  189. +   prn_device(pcxgray_procs, "pcxgray",
  190. +     DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
  191. +     X_DPI, Y_DPI,
  192. +     0,0,0,0,            /* margins */
  193. +     8, pcx256_print_page);
  194.   /* 4-bit planar (EGA/VGA-style) color. */
  195.   
  196.   private dev_proc_print_page(pcx16_print_page);
  197. ***************
  198. *** 60,67 ****
  199.   /* Chunky 8-bit (SuperVGA-style) color. */
  200.   /* (Uses a fixed palette of 3,3,2 bits.) */
  201.   
  202. - private dev_proc_print_page(pcx256_print_page);
  203.   private gx_device_procs pcx256_procs =
  204.     prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
  205.       pc_8bit_map_rgb_color, pc_8bit_map_color_rgb);
  206. --- 78,83 ----
  207. ***************
  208. *** 116,121 ****
  209. --- 132,149 ----
  210.   private void pcx_write_rle(P3(const byte *, const byte *, FILE *));
  211.   private int pcx_write_page(P4(gx_device_printer *, FILE *, pcx_header _ss *, int));
  212.   
  213. + /* Write a monochrome PCX page. */
  214. + private int
  215. + pcxmono_print_page(gx_device_printer *pdev, FILE *file)
  216. + {    pcx_header header;
  217. +     header.version = 2;
  218. +     header.bpp = 1;
  219. +     header.nplanes = 1;
  220. +     /* Clear the EGA palette */
  221. +     memset((byte *)header.palette, 0, sizeof(header.palette));
  222. +     return pcx_write_page(pdev, file, &header, 0);
  223. + }
  224.   /* Write an "old" PCX page. */
  225.   static const byte ega_palette[16*3] = {
  226.     0x00,0x00,0x00,  0x00,0x00,0xaa,  0x00,0xaa,0x00,  0x00,0xaa,0xaa,
  227. ***************
  228. *** 153,173 ****
  229.       return code;
  230.   }
  231.   
  232. - /* Write a monochrome PCX page. */
  233. - private int
  234. - pcxmono_print_page(gx_device_printer *pdev, FILE *file)
  235. - {    pcx_header header;
  236. -     header.version = 2;
  237. -     header.bpp = 1;
  238. -     header.nplanes = 1;
  239. -     /* Clear the EGA palette */
  240. -     memset((byte *)header.palette, 0, sizeof(header.palette));
  241. -     return pcx_write_page(pdev, file, &header, 0);
  242. - }
  243.   /* Write out a page in PCX format. */
  244. ! /* This routine is used for all three formats (monochrome, planar */
  245. ! /* "8-bit" actually 4-bit color, and chunky 8-bit color.) */
  246.   private int
  247.   pcx_write_page(gx_device_printer *pdev, FILE *file, pcx_header _ss *phdr,
  248.     int planar)
  249. --- 181,189 ----
  250.       return code;
  251.   }
  252.   
  253.   /* Write out a page in PCX format. */
  254. ! /* This routine is used for all four formats (monochrome, gray scale, */
  255. ! /* planar "8-bit" actually 4-bit color, and chunky 8-bit color.) */
  256.   private int
  257.   pcx_write_page(gx_device_printer *pdev, FILE *file, pcx_header _ss *phdr,
  258.     int planar)
  259. ***************
  260. *** 270,275 ****
  261. --- 286,315 ----
  262.   }
  263.   
  264.   /* ------ Internal routines ------ */
  265. + /* Map an RGB color to a gray value. */
  266. + private gx_color_index
  267. + pcxgray_map_rgb_color(gx_device *dev, ushort r, ushort g, ushort b)
  268. + {    /* We round the value rather than truncating it. */
  269. +     gx_color_value gray =
  270. +         ((r * (ulong)lum_red_weight) +
  271. +          (g * (ulong)lum_green_weight) +
  272. +          (b * (ulong)lum_blue_weight) +
  273. +          (lum_all_weights / 2)) / lum_all_weights
  274. +         * dev->color_info.max_gray / gx_max_color_value;
  275. +     return gray;
  276. + }
  277. + /* Map a gray value back to an RGB color. */
  278. + private int
  279. + pcxgray_map_color_rgb(gx_device *dev, gx_color_index color, ushort prgb[3])
  280. + {    gx_color_value gray =
  281. +         color * gx_max_color_value / dev->color_info.max_gray;
  282. +     prgb[0] = gray;
  283. +     prgb[1] = gray;
  284. +     prgb[2] = gray;
  285. +     return 0;
  286. + }
  287.   
  288.   /* Write one line in PCX run-length-encoded format. */
  289.   private void
  290. *** 1.1    1993/06/27 12:24:14
  291. --- gdevx.c    1993/06/01 12:15:22
  292. ***************
  293. *** 191,197 ****
  294.   
  295.       if (xdev->ghostview) x_send_event(dev, xdev->done);
  296.       if (xdev->vinfo) {
  297. !     XFree(xdev->vinfo);
  298.       xdev->vinfo = NULL;
  299.       }
  300.       if (xdev->dither_colors) {
  301. --- 191,197 ----
  302.   
  303.       if (xdev->ghostview) x_send_event(dev, xdev->done);
  304.       if (xdev->vinfo) {
  305. !     XFree((char *)xdev->vinfo);
  306.       xdev->vinfo = NULL;
  307.       }
  308.       if (xdev->dither_colors) {
  309. *** 1.1    1993/06/27 12:24:14
  310. --- gdevxini.c    1993/06/12 03:46:54
  311. ***************
  312. *** 140,145 ****
  313. --- 140,169 ----
  314.   private void gdev_x_setup_colors(P1(gx_device_X *));
  315.   private void gdev_x_setup_fontmap(P1(gx_device_X *));
  316.   
  317. + /* Catch the alloc error when there is not enough resources for the
  318. +  * backing pixmap.  Automatically shut off backing pixmap and let the
  319. +  * user know when this happens.
  320. +  */
  321. + private Boolean alloc_error;
  322. + private XErrorHandler oldhandler;
  323. + private int
  324. + x_catch_alloc(Display *dpy, XErrorEvent *err)
  325. + {
  326. +     if (err->error_code == BadAlloc)
  327. +     alloc_error = True;
  328. +     if (alloc_error)
  329. +     return 0;
  330. +     return oldhandler(dpy, err);
  331. + }
  332. + private int
  333. + x_catch_free_colors(Display *dpy, XErrorEvent *err)
  334. + {
  335. +     if (err->request_code == X_FreeColors) return 0;
  336. +     return oldhandler(dpy, err);
  337. + }
  338.   /* Open the X device */
  339.   int
  340.   gdev_x_open(register gx_device_X *xdev)
  341. ***************
  342. *** 299,304 ****
  343. --- 323,332 ----
  344.       exit(1);
  345.       }
  346.       /* Get X Resources.  Use the toolkit for this. */
  347. + #if !defined(XtSpecificationRelease) || XtSpecificationRelease < 5
  348. +     /* R4 and earlier toolkits may cause a Bad Access on XFreeColors. */
  349. +     oldhandler = XSetErrorHandler(x_catch_free_colors);
  350. + #endif
  351.       XtToolkitInitialize();
  352.       app_con = XtCreateApplicationContext();
  353.       dpy = XtOpenDisplay(app_con, NULL, "ghostscript", "Ghostscript",
  354. ***************
  355. *** 310,315 ****
  356. --- 338,346 ----
  357.       XtDestroyWidget(toplevel);
  358.       XtCloseDisplay(dpy);
  359.       XtDestroyApplicationContext(app_con);
  360. + #if !defined(XtSpecificationRelease) || XtSpecificationRelease < 5
  361. +     oldhandler = XSetErrorHandler(oldhandler);
  362. + #endif
  363.   
  364.       gdev_x_setup_colors(xdev);
  365.       gdev_x_setup_fontmap(xdev);
  366. ***************
  367. *** 449,471 ****
  368.       return 0;
  369.   }
  370.   
  371. - /* Catch the alloc error when there is not enough resources for the
  372. -  * backing pixmap.  Automatically shut off backing pixmap and let the
  373. -  * user know when this happens.
  374. -  */
  375. - private Boolean alloc_error;
  376. - private XErrorHandler oldhandler;
  377. - private int
  378. - x_catch_alloc(Display *dpy, XErrorEvent *err)
  379. - {
  380. -     if (err->error_code == BadAlloc)
  381. -     alloc_error = True;
  382. -     if (alloc_error)
  383. -     return 0;
  384. -     oldhandler(dpy, err);
  385. - }
  386.   /* Allocate the backing pixmap, if any, and clear the window. */
  387.   void
  388.   gdev_x_clear_window(gx_device_X *xdev)
  389. --- 480,485 ----
  390. ***************
  391. *** 614,631 ****
  392.   #define cube(r) (r*r*r)
  393.   #define cbrt(r) pow(r, 1.0/3.0)
  394.       {
  395. !         int avail_colors = xdev->vinfo->colormap_size;
  396.   
  397. !         while (!xdev->dither_colors && avail_colors) {
  398. !         int ramp_size = min((int)cbrt((double)avail_colors / 2.0),
  399. !                     min(xdev->maxRGBRamp, num_rgb));
  400.           int max_rgb = ramp_size - 1;
  401.           int r, g, b;
  402.   
  403. -         if (ramp_size < 2) {
  404. -             avail_colors = 0;
  405. -             goto no_cube;
  406. -         }
  407.           xdev->color_info.dither_gray =
  408.               xdev->color_info.dither_rgb = ramp_size;
  409.           xdev->dither_colors =
  410. --- 628,641 ----
  411.   #define cube(r) (r*r*r)
  412.   #define cbrt(r) pow(r, 1.0/3.0)
  413.       {
  414. !         int ramp_size =
  415. !             min((int)cbrt((double)xdev->vinfo->colormap_size / 2.0),
  416. !                 min(xdev->maxRGBRamp, num_rgb));
  417.   
  418. !         while (!xdev->dither_colors && ramp_size >= 2) {
  419.           int max_rgb = ramp_size - 1;
  420.           int r, g, b;
  421.   
  422.           xdev->color_info.dither_gray =
  423.               xdev->color_info.dither_rgb = ramp_size;
  424.           xdev->dither_colors =
  425. ***************
  426. *** 655,666 ****
  427.                   } else {
  428.                       int i;
  429.   
  430. !                     avail_colors = cube_index(r, g, b) - 1;
  431. !                     for (i = 1; i <= avail_colors; i++) {
  432.                       XFreeColors(xdev->dpy, xdev->cmap,
  433.                               &(xdev->dither_colors[i]),
  434.                               1, 0);
  435.                       }
  436.                       gs_free((char *)xdev->dither_colors,
  437.                           sizeof(x_pixel), cube(ramp_size),
  438.                           "gdev_x_rgb_cube");
  439. --- 665,681 ----
  440.                   } else {
  441.                       int i;
  442.   
  443. !                     ramp_size--;
  444. !                     oldhandler =
  445. !                     XSetErrorHandler(x_catch_free_colors);
  446. !                     for (i = 1; i < cube_index(r, g, b); i++) {
  447.                       XFreeColors(xdev->dpy, xdev->cmap,
  448.                               &(xdev->dither_colors[i]),
  449.                               1, 0);
  450.                       }
  451. +                     /* Force any errors */
  452. +                     XSync(xdev->dpy, False);
  453. +                     oldhandler = XSetErrorHandler(oldhandler);
  454.                       gs_free((char *)xdev->dither_colors,
  455.                           sizeof(x_pixel), cube(ramp_size),
  456.                           "gdev_x_rgb_cube");
  457. ***************
  458. *** 682,689 ****
  459.       /* Allocate space for dynamic colors, do at most 256 */
  460.       /* If there are more avaiaible, we ask the X server */
  461.       xdev->dynamic_number = 0;
  462. !     xdev->dynamic_size = min(256, xdev->vinfo->colormap_size);
  463. !     xdev->dynamic_size -= cube(xdev->color_info.dither_rgb);
  464.       if (xdev->dynamic_size) {
  465.           xdev->dynamic_colors =
  466.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  467. --- 697,704 ----
  468.       /* Allocate space for dynamic colors, do at most 256 */
  469.       /* If there are more avaiaible, we ask the X server */
  470.       xdev->dynamic_number = 0;
  471. !     xdev->dynamic_size = min(256, xdev->vinfo->colormap_size -
  472. !                       cube(xdev->color_info.dither_rgb));
  473.       if (xdev->dynamic_size) {
  474.           xdev->dynamic_colors =
  475.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  476. ***************
  477. *** 710,727 ****
  478.       /* colormap, the user specified maxGrayRamp (usually 128), */
  479.       /* or the number of representable grays */
  480.       {
  481. !         int avail_colors = xdev->vinfo->colormap_size;
  482.   
  483. !         while (!xdev->dither_colors && avail_colors) {
  484. !         int ramp_size = min(avail_colors / 2,
  485. !                     min(xdev->maxGrayRamp, num_rgb));
  486.           int max_gray = ramp_size - 1;
  487.           int i;
  488.   
  489. -         if (ramp_size < 2) {
  490. -             avail_colors = 0;
  491. -             goto no_ramp;
  492. -         }
  493.           xdev->color_info.dither_gray = ramp_size;
  494.           xdev->dither_colors =
  495.               (x_pixel *) gs_malloc(sizeof(x_pixel), ramp_size,
  496. --- 725,737 ----
  497.       /* colormap, the user specified maxGrayRamp (usually 128), */
  498.       /* or the number of representable grays */
  499.       {
  500. !         int ramp_size = min(xdev->vinfo->colormap_size / 2,
  501. !                 min(xdev->maxGrayRamp, num_rgb));
  502.   
  503. !         while (!xdev->dither_colors && ramp_size >= 3) {
  504.           int max_gray = ramp_size - 1;
  505.           int i;
  506.   
  507.           xdev->color_info.dither_gray = ramp_size;
  508.           xdev->dither_colors =
  509.               (x_pixel *) gs_malloc(sizeof(x_pixel), ramp_size,
  510. ***************
  511. *** 739,749 ****
  512.               if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) {
  513.                   xdev->dither_colors[i] = xc.pixel;
  514.               } else {
  515. !                 avail_colors = i - 1;
  516. !                 for (i = 1; i <= avail_colors; i++) {
  517.                   XFreeColors(xdev->dpy, xdev->cmap,
  518.                           &(xdev->dither_colors[i]), 1, 0);
  519.                   }
  520.                   gs_free((char *)xdev->dither_colors,
  521.                       sizeof(x_pixel), ramp_size,
  522.                       "gdev_x_gray_ramp");
  523. --- 749,763 ----
  524.               if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) {
  525.                   xdev->dither_colors[i] = xc.pixel;
  526.               } else {
  527. !                 int j = i;
  528. !                 ramp_size /= 2;
  529. !                 oldhandler = XSetErrorHandler(x_catch_free_colors);
  530. !                 for (i = 1; i < j; i++) {
  531.                   XFreeColors(xdev->dpy, xdev->cmap,
  532.                           &(xdev->dither_colors[i]), 1, 0);
  533.                   }
  534. +                 XSync(xdev->dpy, False); /* Force any errors */
  535. +                 oldhandler = XSetErrorHandler(oldhandler);
  536.                   gs_free((char *)xdev->dither_colors,
  537.                       sizeof(x_pixel), ramp_size,
  538.                       "gdev_x_gray_ramp");
  539. ***************
  540. *** 762,769 ****
  541.       /* Allocate space for dynamic colors, do at most 256 */
  542.       /* If there are more avaiaible, we ask the X server */
  543.       xdev->dynamic_number = 0;
  544. !     xdev->dynamic_size = min(256, xdev->vinfo->colormap_size);
  545. !     xdev->dynamic_size -= xdev->color_info.dither_gray;
  546.       if (xdev->dynamic_size) {
  547.           xdev->dynamic_colors =
  548.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  549. --- 776,783 ----
  550.       /* Allocate space for dynamic colors, do at most 256 */
  551.       /* If there are more avaiaible, we ask the X server */
  552.       xdev->dynamic_number = 0;
  553. !     xdev->dynamic_size = min(256, xdev->vinfo->colormap_size -
  554. !                       xdev->color_info.dither_gray);
  555.       if (xdev->dynamic_size) {
  556.           xdev->dynamic_colors =
  557.           (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
  558. *** 1.1    1993/06/27 12:24:14
  559. --- gdevxxf.c    1993/06/06 14:03:48
  560. ***************
  561. *** 105,110 ****
  562. --- 105,113 ----
  563.       return NULL;
  564.       }
  565.   
  566. +     /* Don't do very small fonts.  Font metrics are way off due to rounding */
  567. +     if (xwidth <= 4 || xheight <= 4) return NULL;
  568.       if (encoding_index == 0 || encoding_index == 1) {
  569.       int tried_other_encoding = 0;
  570.   
  571. *** 1.1    1993/06/27 12:24:14
  572. --- gsdps1.c    1993/05/31 23:00:48
  573. ***************
  574. *** 71,77 ****
  575.           int code;
  576.           /* Ensure counter-clockwise drawing. */
  577.           if ( (qx >= px) != (qy >= py) )
  578. !             qx = px, px = pr->p.x;    /* swap x values */
  579.           if ( (code = gs_moveto(pgs, px, py)) < 0 ||
  580.                (code = gs_lineto(pgs, qx, py)) < 0 ||
  581.                (code = gs_lineto(pgs, qx, qy)) < 0 ||
  582. --- 71,77 ----
  583.           int code;
  584.           /* Ensure counter-clockwise drawing. */
  585.           if ( (qx >= px) != (qy >= py) )
  586. !             qx = px, px = pr->q.x;    /* swap x values */
  587.           if ( (code = gs_moveto(pgs, px, py)) < 0 ||
  588.                (code = gs_lineto(pgs, qx, py)) < 0 ||
  589.                (code = gs_lineto(pgs, qx, qy)) < 0 ||
  590. *** 1.1    1993/06/27 12:24:14
  591. --- gsutil.c    1993/06/02 19:25:44
  592. ***************
  593. *** 53,90 ****
  594.   string_match(const byte *str, uint len, const byte *pstr, uint plen,
  595.     register const string_match_params *psmp)
  596.   {    const byte *pback = 0;
  597.       const byte *p = pstr, *pend = pstr + plen;
  598.       const byte *sp = str, *spend = str + len;
  599. -     uint matched = 0;
  600.       if ( psmp == 0 )
  601.           psmp = &smp_default;
  602. !     while ( p < pend )
  603.       {    register byte ch = *p;
  604.           if ( ch == psmp->any_substring )
  605. !         {    pback = ++p, matched = 0;
  606.               continue;
  607.           }
  608.           else if ( ch == psmp->any_char )
  609.           {    if ( sp == spend ) return 0;    /* str too short */
  610. !             p++, sp++, matched++;
  611.               continue;
  612.           }
  613.           else if ( ch == psmp->quote_next )
  614.           {    if ( ++p == pend ) return 1;    /* bad pattern */
  615.               ch = *p;
  616.           }
  617. !         if ( sp == spend ) return 0;    /* str too short */
  618.           if ( *sp == ch || psmp->ignore_case && (*sp ^ ch) == 0x20 &&
  619.                (ch &= ~0x20) >= 0x41 && ch <= 0x5a
  620.              )
  621. !             p++, sp++, matched++;
  622.           else if ( pback == 0 )
  623.               return 0;    /* no * to back up to */
  624.           else
  625. !            {    sp += 1 - matched;
  626.               p = pback;
  627. -             matched = 0;
  628.              }
  629.       }
  630.       return 1;
  631.   }
  632. --- 53,101 ----
  633.   string_match(const byte *str, uint len, const byte *pstr, uint plen,
  634.     register const string_match_params *psmp)
  635.   {    const byte *pback = 0;
  636. +     const byte *spback;
  637.       const byte *p = pstr, *pend = pstr + plen;
  638.       const byte *sp = str, *spend = str + len;
  639.       if ( psmp == 0 )
  640.           psmp = &smp_default;
  641. ! again:    while ( p < pend )
  642.       {    register byte ch = *p;
  643.           if ( ch == psmp->any_substring )
  644. !         {    pback = ++p, spback = sp;
  645.               continue;
  646.           }
  647.           else if ( ch == psmp->any_char )
  648.           {    if ( sp == spend ) return 0;    /* str too short */
  649. !             p++, sp++;
  650.               continue;
  651.           }
  652.           else if ( ch == psmp->quote_next )
  653.           {    if ( ++p == pend ) return 1;    /* bad pattern */
  654.               ch = *p;
  655.           }
  656. !         if ( sp == spend )
  657. !             return 0;    /* str too short */
  658.           if ( *sp == ch || psmp->ignore_case && (*sp ^ ch) == 0x20 &&
  659.                (ch &= ~0x20) >= 0x41 && ch <= 0x5a
  660.              )
  661. !             p++, sp++;
  662.           else if ( pback == 0 )
  663.               return 0;    /* no * to back up to */
  664.           else
  665. !            {    sp = ++spback;
  666.               p = pback;
  667.              }
  668. +     }
  669. +     if ( sp < spend )
  670. +     {    /* We got a match, but there are chars left over. */
  671. +         /* If we can back up, back up to the only place that */
  672. +         /* could produce a complete match, otherwise fail. */
  673. +         if ( pback == 0 )
  674. +             return 0;
  675. +         p = pback;
  676. +         pback = 0;
  677. +         sp = spend - (pend - p);
  678. +         goto again;
  679.       }
  680.       return 1;
  681.   }
  682. *** 1.1    1993/06/27 12:24:14
  683. --- gxcmap.c    1993/06/11 00:13:32
  684. ***************
  685. *** 1,4 ****
  686. ! /* Copyright (C) 1992 Aladdin Enterprises.  All rights reserved.
  687.   
  688.   This file is part of Ghostscript.
  689.   
  690. --- 1,4 ----
  691. ! /* Copyright (C) 1992, 1993 Aladdin Enterprises.  All rights reserved.
  692.   
  693.   This file is part of Ghostscript.
  694.   
  695. ***************
  696. *** 21,32 ****
  697. --- 21,36 ----
  698.   #include "gx.h"
  699.   #include "gserrors.h"
  700.   #include "gscspace.h"
  701. + #include "gxarith.h"
  702.   #include "gxfrac.h"
  703.   #include "gxlum.h"
  704.   #include "gxcolor.h"
  705.   #include "gxdevice.h"
  706.   #include "gzcolor.h"
  707.   #include "gzstate.h"
  708. + /* Brought back from a later release.... */
  709. + #define color_set_pure(pdc, color)\
  710. +   ((pdc)->color1 = (pdc)->color2 = (color), (pdc)->halftone_level = 0)
  711.   
  712.   /* Convert a frac to a gx_color_value. */
  713.   /* This is needed because map_rgb_color still uses gx_color_value. */
  714. ***************
  715. *** 147,168 ****
  716.     frac cmyk[4])
  717.   {    frac c = frac_1 - r, m = frac_1 - g, y = frac_1 - b;
  718.       frac k = (c < m ? min(c, y) : min(m, y));
  719. -     floatp fk = frac2float(k);
  720.       /* The default UCR and BG functions are pretty arbitrary.... */
  721. -     float fucr =
  722. -         (pgs->undercolor_removal == NULL ? 0.0 :
  723. -          (*pgs->undercolor_removal)(pgs, fk));
  724. -     float fbg =
  725. -         (pgs->black_generation == NULL ? 0.0 :
  726. -          (*pgs->black_generation)(pgs, fk));
  727. -     signed_frac ucr =
  728. -       (fucr < -1.0 ? -frac_1 : fucr > 1.0 ? frac_1 : float2frac(fucr));
  729.       frac bg =
  730. !       (fbg < 0.0 ? frac_0 : fbg > 1.0 ? frac_1 : float2frac(fbg));
  731. !     cmyk[0] = (c < ucr ? frac_0 : ucr < c - frac_1 ? frac_1 : c - ucr);
  732. !     cmyk[1] = (m < ucr ? frac_0 : ucr < m - frac_1 ? frac_1 : m - ucr);
  733. !     cmyk[2] = (y < ucr ? frac_0 : ucr < y - frac_1 ? frac_1 : y - ucr);
  734.       cmyk[3] = bg;
  735.   }
  736.   
  737.   /* Convert CMYK to Gray. */
  738. --- 151,185 ----
  739.     frac cmyk[4])
  740.   {    frac c = frac_1 - r, m = frac_1 - g, y = frac_1 - b;
  741.       frac k = (c < m ? min(c, y) : min(m, y));
  742.       /* The default UCR and BG functions are pretty arbitrary.... */
  743.       frac bg =
  744. !         (pgs->black_generation == NULL ? frac_0 :
  745. !          float2frac((*pgs->black_generation)(pgs, frac2float(k))));
  746. !     signed_frac ucr =
  747. !         (pgs->undercolor_removal == NULL ? frac_0 :
  748. !          float2frac((*pgs->undercolor_removal)(pgs, frac2float(k))));
  749. !     /* Adobe specifies, e.g., */
  750. !     /*    C = max(0.0, min(1.0, 1 - R - UCR)) */
  751. !     /* but in order to match our improved CMYK->RGB mapping, we use */
  752. !     /*    C = max(0.0, min(1.0, 1 - R / (1 - UCR)) */
  753. !     if ( ucr == frac_1 )
  754. !         cmyk[0] = cmyk[1] = cmyk[2] = 0;
  755. !     else
  756. !     {    float denom = frac2float(frac_1 - ucr);    /* unscaled */
  757. !         float v;
  758. !         v = (float)frac_1 - r / denom;    /* unscaled */
  759. !         cmyk[0] =
  760. !           (is_fneg(v) ? frac_0 : v >= (float)frac_1 ? frac_1 : (frac)v);
  761. !         v = (float)frac_1 - g / denom;    /* unscaled */
  762. !         cmyk[1] =
  763. !           (is_fneg(v) ? frac_0 : v >= (float)frac_1 ? frac_1 : (frac)v);
  764. !         v = (float)frac_1 - b / denom;    /* unscaled */
  765. !         cmyk[2] =
  766. !           (is_fneg(v) ? frac_0 : v >= (float)frac_1 ? frac_1 : (frac)v);
  767. !     }
  768.       cmyk[3] = bg;
  769. +     if_debug7('c', "[c]RGB 0x%x,0x%x,0x%x -> CMYK 0x%x,0x%x,0x%x,0x%x\n",
  770. +           r, g, b, cmyk[0], cmyk[1], cmyk[2], cmyk[3]);
  771.   }
  772.   
  773.   /* Convert CMYK to Gray. */
  774. ***************
  775. *** 199,204 ****
  776. --- 216,223 ----
  777.           rgb[2] = deduct_black(y);
  778.       }
  779.       }
  780. +     if_debug7('c', "[c]CMYK 0x%x,0x%x,0x%x,0x%x -> RGB 0x%x,0x%x,0x%x\n",
  781. +           c, m, y, k, rgb[0], rgb[1], rgb[2]);
  782.   }
  783.   
  784.   /* ------ Device color rendering ------ */
  785. ***************
  786. *** 207,217 ****
  787.   private cmap_proc_gray(cmap_gray_direct);
  788.   private cmap_proc_gray(cmap_gray_to_rgb);
  789.   private cmap_proc_gray(cmap_gray_to_cmyk);
  790. ! private cmap_proc_rgb(cmap_rgb_halftoned);
  791.   private cmap_proc_rgb(cmap_rgb_direct);
  792.   private cmap_proc_rgb(cmap_rgb_to_gray);
  793.   private cmap_proc_rgb(cmap_rgb_to_cmyk);
  794. ! private cmap_proc_cmyk(cmap_cmyk_halftoned);
  795.   private cmap_proc_cmyk(cmap_cmyk_direct);
  796.   private cmap_proc_cmyk(cmap_cmyk_to_gray);
  797.   private cmap_proc_cmyk(cmap_cmyk_to_rgb);
  798. --- 226,236 ----
  799.   private cmap_proc_gray(cmap_gray_direct);
  800.   private cmap_proc_gray(cmap_gray_to_rgb);
  801.   private cmap_proc_gray(cmap_gray_to_cmyk);
  802. ! #define cmap_rgb_halftoned cmap_rgb_direct
  803.   private cmap_proc_rgb(cmap_rgb_direct);
  804.   private cmap_proc_rgb(cmap_rgb_to_gray);
  805.   private cmap_proc_rgb(cmap_rgb_to_cmyk);
  806. ! #define cmap_cmyk_halftoned cmap_cmyk_direct
  807.   private cmap_proc_cmyk(cmap_cmyk_direct);
  808.   private cmap_proc_cmyk(cmap_cmyk_to_gray);
  809.   private cmap_proc_cmyk(cmap_cmyk_to_rgb);
  810. ***************
  811. *** 260,266 ****
  812.   /* Color remappers for the standard color spaces. */
  813.   #define unit_frac(v)\
  814.     (ftemp = (v),\
  815. !    (ftemp < 0.0 ? frac_0 : ftemp > 1.0 ? frac_1 : float2frac(ftemp)))
  816.   int
  817.   gx_remap_DeviceGray(const gs_client_color *pc, const gs_color_space *pcs,
  818.     gx_device_color *pdc, gs_state *pgs)
  819. --- 279,285 ----
  820.   /* Color remappers for the standard color spaces. */
  821.   #define unit_frac(v)\
  822.     (ftemp = (v),\
  823. !    (is_fneg(ftemp) ? frac_0 : ftemp >= 1.0 ? frac_1 : float2frac(ftemp)))
  824.   int
  825.   gx_remap_DeviceGray(const gs_client_color *pc, const gs_color_space *pcs,
  826.     gx_device_color *pdc, gs_state *pgs)
  827. ***************
  828. *** 308,315 ****
  829.       {    gx_render_gray(mgray, pdc, pgs);
  830.           return;
  831.       }
  832. !     pdc->color1 = pdc->color2 = color;
  833. !     pdc->halftone_level = 0;
  834.   }
  835.   
  836.   private void
  837. --- 327,333 ----
  838.       {    gx_render_gray(mgray, pdc, pgs);
  839.           return;
  840.       }
  841. !     color_set_pure(pdc, color);
  842.   }
  843.   
  844.   private void
  845. ***************
  846. *** 329,371 ****
  847.   
  848.   /* Render RGB color. */
  849.   
  850.   private void
  851.   cmap_rgb_direct(frac r, frac g, frac b, gx_device_color *pdc,
  852.     const gs_state *pgs)
  853. ! {    if ( r == g && g == b )
  854. !     {    cmap_gray_direct(r, pdc, pgs);
  855. !         return;
  856. !     }
  857. !     {    gx_device *dev = gs_currentdevice(pgs);
  858. !         frac mred = gx_map_color_frac(pgs, r, red);
  859. !         gx_color_value cv_red = frac2cv(mred);
  860. !         frac mgreen = gx_map_color_frac(pgs, g, green);
  861. !         gx_color_value cv_green = frac2cv(mgreen);
  862. !         frac mblue = gx_map_color_frac(pgs, b, blue);
  863. !         gx_color_value cv_blue = frac2cv(mblue);
  864. !         gx_color_index color =
  865.               (*dev->procs->map_rgb_color)(dev,
  866. !                 cv_red, cv_green, cv_blue);
  867. !         if ( color == gx_no_color_index )
  868. !         {    gx_render_rgb(mred, mgreen, mblue, pdc, pgs);
  869.               return;
  870.           }
  871. -         pdc->color1 = pdc->color2 = color;
  872. -         pdc->halftone_level = 0;
  873. -     }
  874. - }
  875. - private void
  876. - cmap_rgb_halftoned(frac r, frac g, frac b, gx_device_color *pdc,
  877. -   const gs_state *pgs)
  878. - {    if ( r == g && g == b )
  879. -     {    cmap_gray_halftoned(r, pdc, pgs);    /* pick any one */
  880. -         return;
  881.       }
  882. !     gx_render_rgb(gx_map_color_frac(pgs, r, red),
  883. !               gx_map_color_frac(pgs, g, green),
  884. !               gx_map_color_frac(pgs, b, blue),
  885. !               pdc, pgs);
  886.   }
  887.   
  888.   private void
  889. --- 347,386 ----
  890.   
  891.   /* Render RGB color. */
  892.   
  893. + /*
  894. +  * This code should test r == g and g == b and then use the gray
  895. +  * rendering procedures.  The Adobe documentation allows this:
  896. +  * conversion between color spaces occurs before the transfer function
  897. +  * and halftoning.  However, output from FrameMaker (mis)uses the
  898. +  * transfer function to provide the equivalent of indexed color;
  899. +  * it requires the color components to be passed through unchanged.
  900. +  * For this reason, we have to make the check after the transfer
  901. +  * function rather than before.
  902. +  */
  903.   private void
  904.   cmap_rgb_direct(frac r, frac g, frac b, gx_device_color *pdc,
  905.     const gs_state *pgs)
  906. ! {    gx_device *dev = gs_currentdevice(pgs);
  907. !     frac mred = gx_map_color_frac(pgs, r, red);
  908. !     frac mgreen = gx_map_color_frac(pgs, g, green);
  909. !     frac mblue = gx_map_color_frac(pgs, b, blue);
  910. !     /* We make a test for direct vs. halftoned, rather than */
  911. !     /* duplicating most of the code of this procedure. */
  912. !     if ( dev->color_info.max_rgb >= 31 )
  913. !     {    gx_color_index color =
  914.               (*dev->procs->map_rgb_color)(dev,
  915. !                 frac2cv(mred), frac2cv(mgreen),
  916. !                 frac2cv(mblue));
  917. !         if ( color != gx_no_color_index )
  918. !         {    color_set_pure(pdc, color);
  919.               return;
  920.           }
  921.       }
  922. !     if ( mred == mgreen && mred == mblue )    /* gray shade */
  923. !         gx_render_gray(mred, pdc, pgs);
  924. !     else
  925. !         gx_render_rgb(mred, mgreen, mblue, pdc, pgs);
  926.   }
  927.   
  928.   private void
  929. ***************
  930. *** 384,424 ****
  931.   
  932.   /* Render CMYK color. */
  933.   
  934.   private void
  935.   cmap_cmyk_direct(frac c, frac m, frac y, frac k, gx_device_color *pdc,
  936.     const gs_state *pgs)
  937. ! {    if ( c == m && m == y )
  938. !     {    cmap_gray_direct(color_cmyk_to_gray(c, m, y, k, pgs), pdc, pgs);
  939. !         return;
  940. !     }
  941. !     {    gx_device *dev = gs_currentdevice(pgs);
  942. !         frac mcyan = gx_map_color_frac(pgs, c, red);
  943. !         gx_color_value cv_cyan = frac2cv(mcyan);
  944. !         frac mmagenta = gx_map_color_frac(pgs, m, green);
  945. !         gx_color_value cv_magenta = frac2cv(mmagenta);
  946. !         frac myellow = gx_map_color_frac(pgs, y, blue);
  947. !         gx_color_value cv_yellow = frac2cv(myellow);
  948. !         frac mblack = gx_map_color_frac(pgs, k, gray);
  949. !         gx_color_value cv_black = frac2cv(mblack);
  950. !         gx_color_index color =
  951.               (*dev->procs->map_cmyk_color)(dev,
  952. !                 cv_cyan, cv_magenta, cv_yellow, cv_black);
  953. !         if ( color == gx_no_color_index )
  954. !         {    cmap_cmyk_halftoned(c, m, y, k, pdc, pgs);
  955.               return;
  956.           }
  957. -         pdc->color1 = pdc->color2 = color;
  958. -         pdc->halftone_level = 0;
  959.       }
  960. ! }
  961. ! private void
  962. ! cmap_cmyk_halftoned(frac c, frac m, frac y, frac k, gx_device_color *pdc,
  963. !   const gs_state *pgs)
  964. ! {    /* CMYK halftones are not implemented yet. */
  965. !     frac rgb[3];
  966. !     color_cmyk_to_rgb(c, m, y, k, pgs, rgb);
  967. !     cmap_rgb_halftoned(rgb[0], rgb[1], rgb[2], pdc, pgs);
  968.   }
  969.   
  970.   private void
  971. --- 399,431 ----
  972.   
  973.   /* Render CMYK color. */
  974.   
  975. + /* See above under RGB for why we can't use a shortcut for gray. */
  976.   private void
  977.   cmap_cmyk_direct(frac c, frac m, frac y, frac k, gx_device_color *pdc,
  978.     const gs_state *pgs)
  979. ! {    gx_device *dev = gs_currentdevice(pgs);
  980. !     frac mcyan = gx_map_color_frac(pgs, c, red);
  981. !     frac mmagenta = gx_map_color_frac(pgs, m, green);
  982. !     frac myellow = gx_map_color_frac(pgs, y, blue);
  983. !     frac mblack = gx_map_color_frac(pgs, k, gray);
  984. !     /* We make a test for direct vs. halftoned, rather than */
  985. !     /* duplicating most of the code of this procedure. */
  986. !     if ( dev->color_info.max_rgb >= 31 )
  987. !     {    gx_color_index color =
  988.               (*dev->procs->map_cmyk_color)(dev,
  989. !                 frac2cv(mcyan), frac2cv(mmagenta),
  990. !                 frac2cv(myellow), frac2cv(mblack));
  991. !         if ( color != gx_no_color_index )
  992. !         {    color_set_pure(pdc, color);
  993.               return;
  994.           }
  995.       }
  996. !     /* CMYK halftones are not implemented yet. */
  997. !     {    frac rgb[3];
  998. !         color_cmyk_to_rgb(c, m, y, k, pgs, rgb);
  999. !         cmap_rgb_halftoned(rgb[0], rgb[1], rgb[2], pdc, pgs);
  1000. !     }
  1001.   }
  1002.   
  1003.   private void
  1004. *** 1.1    1993/06/27 12:24:14
  1005. --- gxcpath.c    1993/06/06 07:11:42
  1006. ***************
  1007. *** 212,217 ****
  1008. --- 212,221 ----
  1009.           pcpath->path.bbox.p.y = int2fixed(adev.bbox.p.y);
  1010.           pcpath->path.bbox.q.x = int2fixed(adev.bbox.q.x);
  1011.           pcpath->path.bbox.q.y = int2fixed(adev.bbox.q.y);
  1012. +         /* Using the setbbox flag here is slightly bogus, */
  1013. +         /* but it's as good a way as any to indicate that */
  1014. +         /* the bbox is accurate. */
  1015. +         pcpath->path.bbox_set = 1;
  1016.           /* Note that the result of the intersection might be */
  1017.           /* a single rectangle.  This will cause clip_path_is_rect.. */
  1018.           /* to return true.  This, in turn, requires that */
  1019. *** 1.1    1993/06/27 12:24:14
  1020. --- gxrefct.h    1993/06/14 22:46:06
  1021. ***************
  1022. *** 74,80 ****
  1023.   #define rc_unshare(vp, stype, mprocs, errstat, cname)\
  1024.     if ( vp == 0 || vp->rc.ref_count > 1 )\
  1025.      {    stype *new;\
  1026. !     rc_alloc_1(new, stype, vp->rc.size, mprocs, errstat, cname);\
  1027.       if ( vp ) vp->rc.ref_count--;\
  1028.       vp = new;\
  1029.      }
  1030. --- 74,80 ----
  1031.   #define rc_unshare(vp, stype, mprocs, errstat, cname)\
  1032.     if ( vp == 0 || vp->rc.ref_count > 1 )\
  1033.      {    stype *new;\
  1034. !     rc_alloc_struct_1(new, stype, mprocs, errstat, cname);\
  1035.       if ( vp ) vp->rc.ref_count--;\
  1036.       vp = new;\
  1037.      }
  1038. *** 1.1    1993/06/27 12:24:14
  1039. --- ps2ascii    1993/06/01 13:42:38
  1040. ***************
  1041. *** 5,13 ****
  1042.   # If both infile and outfile are omitted, ps2ascii acts as a filter,
  1043.   # reading from stdin and writing on stdout.
  1044.   if ( test $# -eq 0 ) then
  1045. !     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps - quit.ps
  1046.   elif ( test $# -eq 1 ) then
  1047. !     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps
  1048.   else
  1049. !     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps >$2
  1050.   fi
  1051. --- 5,13 ----
  1052.   # If both infile and outfile are omitted, ps2ascii acts as a filter,
  1053.   # reading from stdin and writing on stdout.
  1054.   if ( test $# -eq 0 ) then
  1055. !     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - quit.ps
  1056.   elif ( test $# -eq 1 ) then
  1057. !     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps
  1058.   else
  1059. !     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps >$2
  1060.   fi
  1061. *** 1.1    1993/06/27 12:24:14
  1062. --- ps2image.ps    1993/06/02 23:27:20
  1063. ***************
  1064. *** 37,56 ****
  1065.   
  1066.           % Initialize the tables for reading a image.
  1067.           % This code gets copied to the output file.
  1068.     /initread
  1069.      {
  1070.           % Initialize the strings for filling runs.
  1071.   
  1072. !      /.ImageFills 31        % max repeat count
  1073.        0 1 255
  1074. !       { 1 index string dup 0 1 5 index 1 sub { 3 index put dup } for
  1075. !         pop exch pop readonly exch
  1076. !       } for pop
  1077. !       256 array astore readonly def
  1078.   
  1079.           % Initialize the procedure table for input dispatching.
  1080.   
  1081. !      /.ImageProcs
  1082.        33 { { pop .ImageItem } } repeat
  1083.        32 { {    % 0x21-0x40: (N-0x20) data bytes follow
  1084.         32 sub 3 index exch 0 exch getinterval 2 index exch
  1085. --- 37,58 ----
  1086.   
  1087.           % Initialize the tables for reading a image.
  1088.           % This code gets copied to the output file.
  1089. +   /maxrep 31 def        % max repeat count
  1090. +   /maxrep1 maxrep 1 sub def
  1091.     /initread
  1092.      {
  1093.           % Initialize the strings for filling runs.
  1094.   
  1095. !      /.ImageFills [
  1096.        0 1 255
  1097. !       { //maxrep string dup 0 1 //maxrep1 { 3 index put dup } for
  1098. !         pop exch pop readonly
  1099. !       } for
  1100. !      ] readonly def
  1101.   
  1102.           % Initialize the procedure table for input dispatching.
  1103.   
  1104. !      /.ImageProcs [
  1105.        33 { { pop .ImageItem } } repeat
  1106.        32 { {    % 0x21-0x40: (N-0x20) data bytes follow
  1107.         32 sub 3 index exch 0 exch getinterval 2 index exch
  1108. ***************
  1109. *** 61,67 ****
  1110.         exch 0 exch getinterval
  1111.        } bind } repeat
  1112.        160 { { pop .ImageItem } } repeat
  1113. !      256 array astore readonly def
  1114.   
  1115.      } def
  1116.           % Read one item from a compressed image.
  1117. --- 63,69 ----
  1118.         exch 0 exch getinterval
  1119.        } bind } repeat
  1120.        160 { { pop .ImageItem } } repeat
  1121. !      ] readonly def
  1122.   
  1123.      } def
  1124.           % Read one item from a compressed image.
  1125. ***************
  1126. *** 79,85 ****
  1127.        clippath pathbbox pop pop translate
  1128.        pathbbox newpath 4 -2 roll pop pop
  1129.        dup 3 1 roll abs 5 index exch div exch abs 6 index exch div
  1130. !      2 copy lt { exch } if    % (definition of max)
  1131.        0 0 2 index neg 0 4 index 7 -1 roll mul
  1132.        ] { .ImageItem }
  1133.        4 index 7 add 8 idiv string currentfile ()
  1134. --- 81,87 ----
  1135.        clippath pathbbox pop pop translate
  1136.        pathbbox newpath 4 -2 roll pop pop
  1137.        dup 3 1 roll abs 5 index exch div exch abs 6 index exch div
  1138. !      2 copy lt { exch } if pop        % (definition of max)
  1139.        0 0 2 index neg 0 4 index 7 -1 roll mul
  1140.        ] { .ImageItem }
  1141.        4 index 7 add 8 idiv string currentfile ()
  1142. ***************
  1143. *** 111,127 ****
  1144.      {  { dup length 4 lt { exit } if
  1145.           % Detect a maximal run of non-repeated data.
  1146.       dup length 4 sub 0 exch 1 exch
  1147. !      { 2 copy get
  1148. !        dup 3 index 3 index 1 add get eq
  1149. !         { dup 3 index 3 index 2 add get eq
  1150. !            { dup 3 index 3 index 3 add get eq
  1151. !               { pop exit
  1152. !           } if
  1153. !            } if
  1154. !         } if
  1155. !       pop pop
  1156.        }
  1157.       for
  1158.       1 add
  1159.       1 index 0 2 index getinterval writedata
  1160.       1 index length 1 index sub getinterval
  1161. --- 113,123 ----
  1162.      {  { dup length 4 lt { exit } if
  1163.           % Detect a maximal run of non-repeated data.
  1164.       dup length 4 sub 0 exch 1 exch
  1165. !      { 2 copy 3 getinterval 2 index 2 index 1 add 3 getinterval
  1166. !        eq { exit } if pop
  1167.        }
  1168.       for
  1169. +     dup type /stringtype eq { exit } if    % no repetition found
  1170.       1 add
  1171.       1 index 0 2 index getinterval writedata
  1172.       1 index length 1 index sub getinterval
  1173. *** 1.1    1993/06/27 12:24:55
  1174. --- unix-ansi.mak    1993/06/27 12:26:06
  1175. ***************
  1176. *** 1134,1139 ****
  1177. --- 1134,1140 ----
  1178.   #    gifmono    Monochrome GIF file format
  1179.   #    gif8    8-bit color GIF file format
  1180.   #    pcxmono    Monochrome PCX file format
  1181. + #    pcxgray    8-bit gray scale PCX file format
  1182.   #    pcx16    Older color PCX file format (EGA/VGA, 16-color)
  1183.   #    pcx256    Newer color PCX file format (256-color)
  1184.   #    pbm    Portable Bitmap (plain format)
  1185. ***************
  1186. *** 1782,1792 ****
  1187.   
  1188.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1189.   
  1190. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h)
  1191.   
  1192.   pcxmono.dev: $(pcx_)
  1193.       $(SHP)gssetdev pcxmono $(pcx_)
  1194.   
  1195.   pcx16.dev: $(pcx_)
  1196.       $(SHP)gssetdev pcx16 $(pcx_)
  1197.   
  1198. --- 1783,1796 ----
  1199.   
  1200.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1201.   
  1202. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
  1203.   
  1204.   pcxmono.dev: $(pcx_)
  1205.       $(SHP)gssetdev pcxmono $(pcx_)
  1206.   
  1207. + pcxgray.dev: $(pcx_)
  1208. +     $(SHP)gssetdev pcxgray $(pcx_)
  1209.   pcx16.dev: $(pcx_)
  1210.       $(SHP)gssetdev pcx16 $(pcx_)
  1211.   
  1212. ***************
  1213. *** 1881,1887 ****
  1214.       $(SHP)gsaddmod unix_ -fdev pipe
  1215.   
  1216.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1217. !  $(stat__h) $(time__h)
  1218.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1219.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1220.   
  1221. --- 1885,1891 ----
  1222.       $(SHP)gsaddmod unix_ -fdev pipe
  1223.   
  1224.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1225. !  $(gsutil_h) $(stat__h) $(time__h)
  1226.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1227.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1228.   
  1229. ***************
  1230. *** 1939,1950 ****
  1231.   docdir=$(gsdatadir)/doc
  1232.   exdir=$(gsdatadir)/examples
  1233.   
  1234. ! install: gs
  1235.       -mkdir $(bindir)
  1236. !     for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1237.       -mkdir $(datadir)
  1238.       -mkdir $(gsdatadir)
  1239. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1240.       -mkdir $(docdir)
  1241.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1242.       -mkdir $(exdir)
  1243. --- 1943,1954 ----
  1244.   docdir=$(gsdatadir)/doc
  1245.   exdir=$(gsdatadir)/examples
  1246.   
  1247. ! install: $(GS)
  1248.       -mkdir $(bindir)
  1249. !     for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1250.       -mkdir $(datadir)
  1251.       -mkdir $(gsdatadir)
  1252. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1enc.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1253.       -mkdir $(docdir)
  1254.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1255.       -mkdir $(exdir)
  1256. *** 1.1    1993/06/27 12:24:55
  1257. --- unix-cc.mak    1993/06/27 12:26:06
  1258. ***************
  1259. *** 1129,1134 ****
  1260. --- 1129,1135 ----
  1261.   #    gifmono    Monochrome GIF file format
  1262.   #    gif8    8-bit color GIF file format
  1263.   #    pcxmono    Monochrome PCX file format
  1264. + #    pcxgray    8-bit gray scale PCX file format
  1265.   #    pcx16    Older color PCX file format (EGA/VGA, 16-color)
  1266.   #    pcx256    Newer color PCX file format (256-color)
  1267.   #    pbm    Portable Bitmap (plain format)
  1268. ***************
  1269. *** 1777,1787 ****
  1270.   
  1271.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1272.   
  1273. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h)
  1274.   
  1275.   pcxmono.dev: $(pcx_)
  1276.       $(SHP)gssetdev pcxmono $(pcx_)
  1277.   
  1278.   pcx16.dev: $(pcx_)
  1279.       $(SHP)gssetdev pcx16 $(pcx_)
  1280.   
  1281. --- 1778,1791 ----
  1282.   
  1283.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1284.   
  1285. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
  1286.   
  1287.   pcxmono.dev: $(pcx_)
  1288.       $(SHP)gssetdev pcxmono $(pcx_)
  1289.   
  1290. + pcxgray.dev: $(pcx_)
  1291. +     $(SHP)gssetdev pcxgray $(pcx_)
  1292.   pcx16.dev: $(pcx_)
  1293.       $(SHP)gssetdev pcx16 $(pcx_)
  1294.   
  1295. ***************
  1296. *** 1876,1882 ****
  1297.       $(SHP)gsaddmod unix_ -fdev pipe
  1298.   
  1299.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1300. !  $(stat__h) $(time__h)
  1301.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1302.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1303.   
  1304. --- 1880,1886 ----
  1305.       $(SHP)gsaddmod unix_ -fdev pipe
  1306.   
  1307.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1308. !  $(gsutil_h) $(stat__h) $(time__h)
  1309.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1310.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1311.   
  1312. ***************
  1313. *** 1934,1945 ****
  1314.   docdir=$(gsdatadir)/doc
  1315.   exdir=$(gsdatadir)/examples
  1316.   
  1317. ! install: gs
  1318.       -mkdir $(bindir)
  1319. !     for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1320.       -mkdir $(datadir)
  1321.       -mkdir $(gsdatadir)
  1322. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1323.       -mkdir $(docdir)
  1324.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1325.       -mkdir $(exdir)
  1326. --- 1938,1949 ----
  1327.   docdir=$(gsdatadir)/doc
  1328.   exdir=$(gsdatadir)/examples
  1329.   
  1330. ! install: $(GS)
  1331.       -mkdir $(bindir)
  1332. !     for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1333.       -mkdir $(datadir)
  1334.       -mkdir $(gsdatadir)
  1335. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1enc.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1336.       -mkdir $(docdir)
  1337.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1338.       -mkdir $(exdir)
  1339. *** 1.1    1993/06/27 12:24:55
  1340. --- unix-gcc.mak    1993/06/27 12:26:06
  1341. ***************
  1342. *** 1136,1141 ****
  1343. --- 1136,1142 ----
  1344.   #    gifmono    Monochrome GIF file format
  1345.   #    gif8    8-bit color GIF file format
  1346.   #    pcxmono    Monochrome PCX file format
  1347. + #    pcxgray    8-bit gray scale PCX file format
  1348.   #    pcx16    Older color PCX file format (EGA/VGA, 16-color)
  1349.   #    pcx256    Newer color PCX file format (256-color)
  1350.   #    pbm    Portable Bitmap (plain format)
  1351. ***************
  1352. *** 1784,1794 ****
  1353.   
  1354.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1355.   
  1356. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h)
  1357.   
  1358.   pcxmono.dev: $(pcx_)
  1359.       $(SHP)gssetdev pcxmono $(pcx_)
  1360.   
  1361.   pcx16.dev: $(pcx_)
  1362.       $(SHP)gssetdev pcx16 $(pcx_)
  1363.   
  1364. --- 1785,1798 ----
  1365.   
  1366.   pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1367.   
  1368. ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
  1369.   
  1370.   pcxmono.dev: $(pcx_)
  1371.       $(SHP)gssetdev pcxmono $(pcx_)
  1372.   
  1373. + pcxgray.dev: $(pcx_)
  1374. +     $(SHP)gssetdev pcxgray $(pcx_)
  1375.   pcx16.dev: $(pcx_)
  1376.       $(SHP)gssetdev pcx16 $(pcx_)
  1377.   
  1378. ***************
  1379. *** 1883,1889 ****
  1380.       $(SHP)gsaddmod unix_ -fdev pipe
  1381.   
  1382.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1383. !  $(stat__h) $(time__h)
  1384.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1385.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1386.   
  1387. --- 1887,1893 ----
  1388.       $(SHP)gsaddmod unix_ -fdev pipe
  1389.   
  1390.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1391. !  $(gsutil_h) $(stat__h) $(time__h)
  1392.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1393.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1394.   
  1395. ***************
  1396. *** 1941,1952 ****
  1397.   docdir=$(gsdatadir)/doc
  1398.   exdir=$(gsdatadir)/examples
  1399.   
  1400. ! install: gs
  1401.       -mkdir $(bindir)
  1402. !     for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1403.       -mkdir $(datadir)
  1404.       -mkdir $(gsdatadir)
  1405. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1406.       -mkdir $(docdir)
  1407.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1408.       -mkdir $(exdir)
  1409. --- 1945,1956 ----
  1410.   docdir=$(gsdatadir)/doc
  1411.   exdir=$(gsdatadir)/examples
  1412.   
  1413. ! install: $(GS)
  1414.       -mkdir $(bindir)
  1415. !     for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1416.       -mkdir $(datadir)
  1417.       -mkdir $(gsdatadir)
  1418. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1enc.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1419.       -mkdir $(docdir)
  1420.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1421.       -mkdir $(exdir)
  1422. *** 1.1    1993/06/27 12:24:14
  1423. --- unixtail.mak    1993/06/03 20:43:16
  1424. ***************
  1425. *** 42,48 ****
  1426.       $(SHP)gsaddmod unix_ -fdev pipe
  1427.   
  1428.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1429. !  $(stat__h) $(time__h)
  1430.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1431.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1432.   
  1433. --- 42,48 ----
  1434.       $(SHP)gsaddmod unix_ -fdev pipe
  1435.   
  1436.   gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1437. !  $(gsutil_h) $(stat__h) $(time__h)
  1438.       if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\
  1439.       else $(CCC) -DNOSYSTIME gp_unix.c; fi
  1440.   
  1441. ***************
  1442. *** 100,111 ****
  1443.   docdir=$(gsdatadir)/doc
  1444.   exdir=$(gsdatadir)/examples
  1445.   
  1446. ! install: gs
  1447.       -mkdir $(bindir)
  1448. !     for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1449.       -mkdir $(datadir)
  1450.       -mkdir $(gsdatadir)
  1451. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1452.       -mkdir $(docdir)
  1453.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1454.       -mkdir $(exdir)
  1455. --- 100,111 ----
  1456.   docdir=$(gsdatadir)/doc
  1457.   exdir=$(gsdatadir)/examples
  1458.   
  1459. ! install: $(GS)
  1460.       -mkdir $(bindir)
  1461. !     for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1462.       -mkdir $(datadir)
  1463.       -mkdir $(gsdatadir)
  1464. !     for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1enc.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  1465.       -mkdir $(docdir)
  1466.       for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  1467.       -mkdir $(exdir)
  1468. *** 1.1    1993/06/27 12:24:14
  1469. --- x_.h    1993/06/10 14:51:40
  1470. ***************
  1471. *** 108,113 ****
  1472. --- 108,114 ----
  1473.   #  endif                /* ifdef __GNUC__ */
  1474.   
  1475.   #  include <decw$include/Xlib.h>
  1476. + #  include <decw$include/Xproto.h>
  1477.   #  include <decw$include/Xatom.h>
  1478.   #  include <decw$include/Xutil.h>
  1479.   #  include <decw$include/Intrinsic.h>
  1480. ***************
  1481. *** 117,122 ****
  1482. --- 118,124 ----
  1483.   #else                    /* !ifdef VMS */
  1484.   
  1485.   #  include <X11/Xlib.h>
  1486. + #  include <X11/Xproto.h>
  1487.   #  include <X11/Xatom.h>
  1488.   #  include <X11/Xutil.h>
  1489.   #  include <X11/Intrinsic.h>
  1490.