diff -rNC2 gs261/NEWS gs262/NEWS *** gs261/NEWS Sat May 29 02:40:14 1993 --- gs262/NEWS Wed Apr 19 18:35:44 1995 *************** *** 25,28 **** --- 25,177 ---- README. + Version 2.6.2 (4/19/95) + ============= + + Version 2.6.2 adds a LaserJet 4 driver and several important bug fixes + to version 2.6.1. These fixes where previously distributed separately. + + Procedures + ---------- + + Fixes bugs: + - The Unix install script used gs rather than $(GS) as the name of + the executable. (unixtail.mak) + - The Unix install script didn't copy gs_dbt_e.ps to $(gsdatadir). + (unixtail.mak) + - The Unix install script attempts to install the nonexistent file + type1enc.ps. (unixtail.mak) + - The X libraries were listed in a wrong order, causing link errors + on some systems. (devs.mak) + + Utilities + --------- + + Fixes bugs: + - The ps2ascii script still referenced ps2ascii.ps under its old + name gs_2asc.ps. (ps2ascii) + - ps2image.ps had a 'pop' missing in the written-out definition of + 'max' in the boilerplate code it put at the beginning of compressed + files. (ps2image.ps) + - ps2image.ps got a typecheck if a scan line had no repeated + data in it anywhere. (ps2image.ps) + + Drivers + ------- + + Fixes bugs: + - Faulty X servers could generate bogus errors on XFreeColors, which + weren't being ignored. (x_.h, gdevxini.c) + - The X driver gave up on color allocation too easily. (gdevx.c) + - The X driver dynamic color table size could become + negative. (gdevx.c) + - x_lookup_font could return platform fonts of very small sizes, + which have very inaccurate metrics. (gdevxxf.c) + - The X driver didn't free dynamic colors at the start of each + page. (gdevx.h, gdevx.c) + - The X driver didn't bind foreground/background defaults tightly, + didn't check for GHOSTVIEW_COLORS properly, freed too many colors if an + allocation request failed, and didn't check return value of gs_malloc for + being NULL. (gdevxini.c) + - The DeskJet and LaserJet drivers used \033&l0H (page eject) + instead of \f (end of page), which prevented duplex printing. (gdevdjet.c) + - The DeskJet and LaserJet drivers reset the printer at the start of + each page, which prevented manually initiated duplex printing. (gdevdjet.c) + - The PCX driver put an old version number in the header, and didn't + pad scan lines to an even number of bytes. (gdevpcx.c) + - The TIFF driver didn't handle A4 or B4 size paper + correctly. (gdevtiff.c) + - The ESCP/2 driver was incorrectly named gdevescp2 in + devs.mak. (devs.mak) + - The X11 driver incorrectly demanded the Xmu library, which was not + needed and which caused link errors on some versions of SunOS. (devs.mak) + - The X11 font matching scheme was too loose, causing overlaps and + other problems. (gdevx.h, gdevx*.c) + - X11 Font Extensions (rotated and mirrored fonts) did not work + properly on NCD terminals, and could not be disabled. (gdevx.h, gdevx*.c) + - When the X11 driver freed the rgb cube/gray ramp, the parameters + to gs_free() did not exactly match the parameters to gs_malloc(). (gdevx.c) + - The X11 driver failed to warn the user when it could not + allocatethe original color cube/gray ramp and dropped back to a smaller + cube/ramp, or from color to mono. (gdevxini.c) + - x_release could cause Ghostscript to fail if a font was freed + after the device was closed. (gdevx.c) + - In the X11 driver, the lookup of dynamic colors would be extremely + slow when the colormap filled. (gdevx.h, gdevx.c, gdevxini.c) + - The X driver didn't properly reserve the foreground and background + colors; as a result, they changed to random colors on rare + occasions. (gdevxini.c) + - The Utopia font was missing from the default X resources. + (gdevxini.c) + - Faulty X servers would cause Ghostscript to fail when it freed an + allocated color, because the X driver didn't always catch "Bad Access" + errors from XFreeColors calls. (gdevx.c, gdevxini.c) + + Adds a gray-scale PCX driver. (devs.mak, gdevpcx.c) + + Adds a LaserJet 4 driver that can use the 600 dpi mode. (devs.mak, + gdevdjet.c) + + In response to patent-related actions by Unisys and CompuServe, removes the + GIF driver. (*.mak) + + Platforms + --------- + + Fixes bugs: + - The VMS script files referenced IBSCAN instead of ISCAN2, and + omitted GDEVXXF. (vms-cc.mak, vms-gcc.mak) + - The UUENCODEd icons for the MS Windows platform were omitted from + the fileset. (gsgraph.uue, gstext.uue) + - On MS-DOS systems, filenameforall didn't interpret * alone as a + pattern matching all files. (gp_msdos.c) + + Fonts + ----- + + Fixes bugs: + - The FontName in the font file had be the same as the name in + Fontmap. (This requirement led to the need for aliases, and was extremely + confusing to users.) (gs_fonts.ps) + + Adds a GS_FONTPATH environment variable containing a list of directories + that should be scanned automatically for fonts at startup time. This + greatly reduces the need to edit Fontmap when installing new fonts. + (gs_fonts.ps, fonts.doc, use.doc) + + Interpreter + ----------- + + Fixes bugs: + - zht2.c didn't include alloc.h. (zht2.c) + - exitserver didn't check the password, and always + succeeded. (gs_statd.ps) + - Ghostscript only knew about a limited set of paper sizes; + specifically, it lacked most of ISO a0-a10 and b0-b10, and CAD sizes + archA-archE. (gs_statd.ps) + + Library + ------- + + Fixes bugs: + - rectfill drew rectangles with vertices specified in clockwise + order as 0-width lines. (gsdps1.c) + - The string matching function reported that 'abcdefg' matched the + pattern 'abcde'. (gsutil.c) + - The bounding box of non-rectangular clipping paths was not being + marked as valid, so cached characters would simply get discarded as being + outside the bounding box. (gxcpath.c) + - Colors with equal R/G/B or C/M/Y components were converted to gray + before being mapped through the transfer function. (gxcmap.c) + - rc_unshare could indirect through 0 to obtain the size of a new + block, causing the CIE rendering caches to be allocated with a random + size. (gxrefct.h) + - kshow returned an incorrect (random, 32-bit) character code for + the second character. (gschar.c) + - Color halftones "flipped over" at the 50% point, inverting + foreground and background. (gxdither.c) + - setbbox didn't round the coordinates properly, which could cause + erroneous rangecheck errors with coordinates on the edge of the + box. (gsdps1.c) + Version 2.6.1 (5/28/93) ============= diff -rNC2 gs261/README gs262/README *** gs261/README Wed May 19 21:22:18 1993 --- gs262/README Mon Nov 21 16:15:51 1994 *************** *** 20,24 **** ***************************************************** ! * This file describes version 2.6.1 of Ghostscript. * ***************************************************** --- 20,24 ---- ***************************************************** ! * This file describes version 2.6.2 of Ghostscript. * ***************************************************** diff -rNC2 gs261/bc.mak gs262/bc.mak *** gs261/bc.mak Fri May 28 18:36:26 1993 --- gs262/bc.mak Wed Apr 19 18:07:45 1995 *************** *** 232,236 **** DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev DEVICE_DEVS6=bj10e.dev bj200.dev ! DEVICE_DEVS8=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev !include "gs.mak" !include "devs.mak" --- 232,236 ---- DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev DEVICE_DEVS6=bj10e.dev bj200.dev ! DEVICE_DEVS8=pcxmono.dev pcx16.dev pcx256.dev !include "gs.mak" !include "devs.mak" diff -rNC2 gs261/bcwin.mak gs262/bcwin.mak *** gs261/bcwin.mak Wed May 26 18:56:12 1993 --- gs262/bcwin.mak Wed Apr 19 18:07:56 1995 *************** *** 200,204 **** DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev DEVICE_DEVS7=bmpmono.dev bmp16.dev bmp256.dev bmp16m.dev ! DEVICE_DEVS8=gifmono.dev gif8.dev bit.dev !include "gs.mak" !include "devs.mak" --- 200,204 ---- DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev DEVICE_DEVS7=bmpmono.dev bmp16.dev bmp256.dev bmp16m.dev ! DEVICE_DEVS8=bit.dev !include "gs.mak" !include "devs.mak" diff -rNC2 gs261/devs.mak gs262/devs.mak *** gs261/devs.mak Wed May 19 20:17:18 1993 --- gs262/devs.mak Wed Apr 19 18:08:46 1995 *************** *** 52,56 **** # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) --- 52,56 ---- # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=4 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) *************** *** 84,87 **** --- 84,88 ---- # + ljet2p H-P LaserJet IId/IIp/III* with TIFF compression # + ljet3 H-P LaserJet III* with Delta Row compression + # + ljet4 H-P LaserJet 4 (defaults to 600 dpi) # + ljetplus H-P LaserJet Plus # * m8510 C.Itoh M8510 printer *************** *** 106,112 **** # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format - # gifmono Monochrome GIF file format - # gif8 8-bit color GIF file format # pcxmono Monochrome PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) --- 107,112 ---- # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format # pcxmono Monochrome PCX file format + # pcxgray 8-bit gray scale PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) *************** *** 410,413 **** --- 410,418 ---- $(SHP)gssetdev ljet3 $(HPMONO) + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series. + + ljet4.dev: $(HPMONO) + $(SHP)gssetdev ljet4 $(HPMONO) + ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -### ### Note: there are two different 500C drivers, both contributed by users.### *************** *** 491,499 **** ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### --- 496,504 ---- ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp.$(OBJ): gdevescp.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### *************** *** 690,701 **** # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy. No - # routines are used from either of these two libraries. If you - # do not have libXmu.a or libXext.a, simply remove these two lines - # from the Makefile. x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext # See the main makefile for the definition of XINCLUDE. --- 695,702 ---- # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xext X11 # See the main makefile for the definition of XINCLUDE. *************** *** 741,764 **** $(SHP)gssetdev bmp16m $(bmp_) - ### ------------------------- GIF file formats ------------------------- ### - - GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) - - gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) - - gifmono.dev: $(GIF) - $(SHP)gssetdev gifmono $(GIF) - - gif8.dev: $(GIF) - $(SHP)gssetdev gif8 $(GIF) - ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) pcx16.dev: $(pcx_) --- 742,756 ---- $(SHP)gssetdev bmp16m $(bmp_) ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) + + pcxgray.dev: $(pcx_) + $(SHP)gssetdev pcxgray $(pcx_) pcx16.dev: $(pcx_) diff -rNC2 gs261/fonts.doc gs262/fonts.doc *** gs261/fonts.doc Tue May 18 05:34:16 1993 --- gs262/fonts.doc Sat Jul 17 14:27:38 1993 *************** *** 130,135 **** in the Fontmap file. Since later entries in Fontmap override earlier entries, any fonts you add will supersede the corresponding fonts supplied ! with Ghostscript. Note that the font name in the Fontmap entry must be ! the same as the FontName in the font itself. In the PC world, Type 1 fonts are customarily given names ending in .PFA --- 130,134 ---- in the Fontmap file. Since later entries in Fontmap override earlier entries, any fonts you add will supersede the corresponding fonts supplied ! with Ghostscript. In the PC world, Type 1 fonts are customarily given names ending in .PFA *************** *** 138,143 **** as fonts obtained in conjunction with Adobe Type Manager) with Ghostscript, please read carefully the license that accompanies the font; ! Aladdin Enterprises and the Free Software Foundation take no ! responsibility for any possible violations of such licenses. If you want to convert a BDF file to a scalable outline, use the program --- 137,145 ---- as fonts obtained in conjunction with Adobe Type Manager) with Ghostscript, please read carefully the license that accompanies the font; ! Aladdin Enterprises takes no responsibility for any possible violations of ! such licenses. ! ! Converting BDF fonts ! -------------------- If you want to convert a BDF file to a scalable outline, use the program *************** *** 171,175 **** a PostScript language program, so you must have Ghostscript already running to be able to run font2c; you must also have entries in the ! Fontmap for the fonts you want to compile.) For example, to precompile the Times-Italic font, font2c Times-Italic ptmri.c --- 173,177 ---- a PostScript language program, so you must have Ghostscript already running to be able to run font2c; you must also have entries in the ! Fontmap for the fonts you want to compile. For example, to precompile the Times-Italic font, font2c Times-Italic ptmri.c diff -rNC2 gs261/gdevdjet.c gs262/gdevdjet.c *** gs261/gdevdjet.c Wed May 12 18:08:40 1993 --- gs262/gdevdjet.c Mon Jun 28 19:56:32 1993 *************** *** 29,35 **** /* ! * You may select a resolution of 75, 100, 150, or 300 DPI. ! * Normally you would do this in the makefile or on the gs command line, ! * not here. * * If the preprocessor symbol A4 is defined, the default paper size is --- 29,35 ---- /* ! * You may select a default resolution of 75, 100, 150, 300, or ! * (LJ4 only) 600 DPI in the makefile, or an actual resolution on ! * the gs command line. * * If the preprocessor symbol A4 is defined, the default paper size is *************** *** 70,84 **** */ - /*#define X_DPI 300*/ - /*#define Y_DPI 300*/ ! #define X_DPI_MAX 300 ! #define Y_DPI_MAX 300 ! ! #ifndef X_DPI ! # define X_DPI X_DPI_MAX #endif ! #ifndef Y_DPI ! # define Y_DPI Y_DPI_MAX #endif --- 70,86 ---- */ ! /* Define the default, maximum resolutions. */ ! #ifdef X_DPI ! # define X_DPI2 X_DPI ! #else ! # define X_DPI 300 ! # define X_DPI2 600 #endif ! #ifdef Y_DPI ! # define Y_DPI2 Y_DPI ! #else ! # define Y_DPI 300 ! # define Y_DPI2 600 #endif *************** *** 113,124 **** #define LASERJET_MARGINS_LETTER 0.35, 0.20, 0.35, 0.00 - #ifndef A4 - # define DESKJET_MARGINS DESKJET_MARGINS_LETTER - # define LASERJET_MARGINS LASERJET_MARGINS_LETTER - #else - # define DESKJET_MARGINS DESKJET_MARGINS_A4 - # define LASERJET_MARGINS LASERJET_MARGINS_A4 - #endif - /* The number of blank lines that make it worthwhile to reposition */ /* the cursor. */ --- 115,118 ---- *************** *** 127,131 **** /* We round up the LINE_SIZE to a multiple of a ulong for faster scanning. */ #define W sizeof(word) - #define LINE_SIZE ((X_DPI_MAX * 85 / 10 + W * 8 - 1) / (W * 8) * W) /* Printer types */ --- 121,124 ---- *************** *** 136,139 **** --- 129,133 ---- #define DJ 4 #define DJ500 5 + #define LJ4 6 /* *************** *** 155,174 **** } compression_modes; - /* The printer initialization strings. */ - private const char *init_strings[] = { - /* LaserJet PCL 3, no compression */ - "\033*p0x0Y\033*b0M", - /* LaserJet Plus PCL 3, no compression */ - "\033*p0x0Y\033*b0M", - /* LaserJet IIP PCL 4, mode 2 compression */ - "\033*r0F\033*p0x75Y\033*b2M", - /* LaserJet III PCL 5, mode 2&3 compression */ - "\033*r0F\033*p0x75Y", - /* DeskJet almost PCL 4, mode 2 compression */ - "\033&k1W\033*p0x0Y\033*b2M", - /* DeskJet 500 almost PCL 4, mode 2&3 compression */ - "\033&k1W\033*p0x0Y", - }; - /* The device descriptors */ private dev_proc_open_device(hpjet_open); --- 149,152 ---- *************** *** 179,182 **** --- 157,161 ---- private dev_proc_print_page(ljet2p_print_page); private dev_proc_print_page(ljet3_print_page); + private dev_proc_print_page(ljet4_print_page); gx_device_procs prn_hp_procs = *************** *** 226,231 **** 1, ljet3_print_page); /* Forward references */ ! private int hpjet_print_page(P4(gx_device_printer *, FILE *, int, compression_modes)); /* Open the printer, adjusting the margins if necessary. */ --- 205,217 ---- 1, ljet3_print_page); + gx_device_printer far_data gs_ljet4_device = + prn_device(prn_hp_procs, "ljet4", + DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, + X_DPI2, Y_DPI2, + 0.25, 0.0, 0.25, 0.25, /* margins */ + 1, ljet4_print_page); + /* Forward references */ ! private int hpjet_print_page(P6(gx_device_printer *, FILE *, int, int, compression_modes, const char *)); /* Open the printer, adjusting the margins if necessary. */ *************** *** 262,292 **** private int djet_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, DJ, mode_2); } /* The DeskJet500 can compress (modes 2&3) */ private int djet500_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, DJ500, mode_3); } /* The LaserJet series II can't compress */ private int ljet_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJ, mode_0); } /* The LaserJet Plus can't compress */ private int ljetplus_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJplus, mode_0); } /* All LaserJet series IIIs (III,IIId,IIIp,IIIsi) compress (modes 2&3) */ private int ljet3_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJ3, mode_3); } ! /* LaserJet series IIp & IId compress (mode 2) */ ! /* but don't support *p+ or *b vertical spacing. */ private int ! ljet2p_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJ2p, mode_2p); } --- 248,294 ---- private int djet_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, DJ, 300, mode_2, ! "\033&k1W\033*p0x0Y\033*b2M"); } /* The DeskJet500 can compress (modes 2&3) */ private int djet500_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, DJ500, 300, mode_3, ! "\033&k1W\033*p0x0Y"); } /* The LaserJet series II can't compress */ private int ljet_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJ, 300, mode_0, ! "\033*p0x0Y\033*b0M"); } /* The LaserJet Plus can't compress */ private int ljetplus_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJplus, 300, mode_0, ! "\033*p0x0Y\033*b0M"); ! } ! /* LaserJet series IIp & IId compress (mode 2) */ ! /* but don't support *p+ or *b vertical spacing. */ ! private int ! ljet2p_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJ2p, 300, mode_2p, ! "\033*r0F\033*p0x75Y\033*b2M"); } /* All LaserJet series IIIs (III,IIId,IIIp,IIIsi) compress (modes 2&3) */ private int ljet3_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { return hpjet_print_page(pdev, prn_stream, LJ3, 300, mode_3, ! "\033*r0F\033*p0x75Y"); } ! /* LaserJet 4 series compresses, and it needs a special sequence to */ ! /* allow it to specify coordinates at 600 dpi. */ private int ! ljet4_print_page(gx_device_printer *pdev, FILE *prn_stream) ! { int dots_per_inch = (int)pdev->y_pixels_per_inch; ! char real_init[50]; ! sprintf(real_init, "\033*r0F\033*p0x75Y\033&u%dD", dots_per_inch); ! return hpjet_print_page(pdev, prn_stream, LJ4, dots_per_inch, mode_3, ! real_init); } *************** *** 295,299 **** private int hpjet_print_page(gx_device_printer *pdev, FILE *prn_stream, int ptype, ! compression_modes cmodes) { int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev); int line_size_words = (line_size + W - 1) / W; --- 297,301 ---- private int hpjet_print_page(gx_device_printer *pdev, FILE *prn_stream, int ptype, ! int dots_per_inch, compression_modes cmodes, const char *init_string) { int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev); int line_size_words = (line_size + W - 1) / W; *************** *** 312,316 **** char *out_data; int x_dpi = pdev->x_pixels_per_inch; ! int y_dots_per_pixel = Y_DPI_MAX / pdev->y_pixels_per_inch; int out_count; int compression = -1; --- 314,318 ---- char *out_data; int x_dpi = pdev->x_pixels_per_inch; ! int y_dots_per_pixel = dots_per_inch / pdev->y_pixels_per_inch; int out_count; int compression = -1; *************** *** 340,344 **** } fputs("\033&l0o0e0L", prn_stream); ! fputs(init_strings[ptype], prn_stream); /* Send each scan line in turn */ --- 342,346 ---- } fputs("\033&l0o0e0L", prn_stream); ! fputs(init_string, prn_stream); /* Send each scan line in turn */ *************** *** 459,467 **** } ! /* end raster graphics */ ! fputs("\033*rB", prn_stream); ! ! /* eject page */ ! fputs("\033&l0H", prn_stream); /* free temporary storage */ --- 461,466 ---- } ! /* end raster graphics and eject page */ ! fputs("\033*rB\f", prn_stream); /* free temporary storage */ Only in gs261: gdevgif.c diff -rNC2 gs261/gdevpcx.c gs262/gdevpcx.c *** gs261/gdevpcx.c Wed May 12 18:16:30 1993 --- gs262/gdevpcx.c Fri Jul 9 09:47:28 1993 *************** *** 1,3 **** ! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 21,24 **** --- 21,25 ---- #include "gdevprn.h" #include "gdevpccm.h" + #include "gxlum.h" /* Thanks to Phil Conrad for donating the original version */ *************** *** 44,47 **** --- 45,65 ---- 1, pcxmono_print_page); + /* Chunky 8-bit gray scale. */ + + private dev_proc_print_page(pcx256_print_page); + + private dev_proc_map_rgb_color(pcxgray_map_rgb_color); + private dev_proc_map_color_rgb(pcxgray_map_color_rgb); + + private gx_device_procs pcxgray_procs = + prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close, + pcxgray_map_rgb_color, pcxgray_map_color_rgb); + gx_device_printer far_data gs_pcxgray_device = + prn_device(pcxgray_procs, "pcxgray", + DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, + X_DPI, Y_DPI, + 0,0,0,0, /* margins */ + 8, pcx256_print_page); + /* 4-bit planar (EGA/VGA-style) color. */ *************** *** 61,66 **** /* (Uses a fixed palette of 3,3,2 bits.) */ - private dev_proc_print_page(pcx256_print_page); - private gx_device_procs pcx256_procs = prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close, --- 79,82 ---- *************** *** 94,103 **** ushort vres; /* vert. resolution */ byte palette[16*3]; /* color palette */ ! byte vmode; /* video mode for graphics board */ byte nplanes; /* number of color planes */ ! ushort bpl; /* number of bytes per line (uncompresses) */ ushort palinfo; /* palette info 1=color, 2=grey */ - ushort shres; /* scanner horz. resolution */ - ushort svres; /* scanner vert. resolution */ byte xtra[58]; /* fill out header to 128 bytes */ } pcx_header; --- 110,117 ---- ushort vres; /* vert. resolution */ byte palette[16*3]; /* color palette */ ! byte reserved; byte nplanes; /* number of color planes */ ! ushort bpl; /* number of bytes per line (uncompressed) */ ushort palinfo; /* palette info 1=color, 2=grey */ byte xtra[58]; /* fill out header to 128 bytes */ } pcx_header; *************** *** 109,113 **** ** 2 == 2.8 w/palette info ** 3 == 2.8 without palette info ! ** 5 == 3.0 ** */ --- 123,127 ---- ** 2 == 2.8 w/palette info ** 3 == 2.8 without palette info ! ** 5 == 3.0 (includes palette) ** */ *************** *** 117,120 **** --- 131,145 ---- private int pcx_write_page(P4(gx_device_printer *, FILE *, pcx_header _ss *, int)); + /* Write a monochrome PCX page. */ + private int + pcxmono_print_page(gx_device_printer *pdev, FILE *file) + { pcx_header header; + header.bpp = 1; + header.nplanes = 1; + /* Set the first two entries of the short palette. */ + memcpy((byte *)header.palette, "\377\377\377\000\000\000", 6); + return pcx_write_page(pdev, file, &header, 0); + } + /* Write an "old" PCX page. */ static const byte ega_palette[16*3] = { *************** *** 127,131 **** pcx16_print_page(gx_device_printer *pdev, FILE *file) { pcx_header header; - header.version = 2; header.bpp = 1; header.nplanes = 4; --- 152,155 ---- *************** *** 140,144 **** { pcx_header header; int code; - header.version = 5; header.bpp = 8; header.nplanes = 1; --- 164,167 ---- *************** *** 154,192 **** } - /* Write a monochrome PCX page. */ - private int - pcxmono_print_page(gx_device_printer *pdev, FILE *file) - { pcx_header header; - header.version = 2; - header.bpp = 1; - header.nplanes = 1; - /* Clear the EGA palette */ - memset((byte *)header.palette, 0, sizeof(header.palette)); - return pcx_write_page(pdev, file, &header, 0); - } - /* Write out a page in PCX format. */ ! /* This routine is used for all three formats (monochrome, planar */ ! /* "8-bit" actually 4-bit color, and chunky 8-bit color.) */ private int pcx_write_page(gx_device_printer *pdev, FILE *file, pcx_header _ss *phdr, int planar) ! { int raster = gdev_prn_raster(pdev); int height = pdev->height; int depth = pdev->color_info.depth; ! uint rsize = (pdev->width + 7) >> 3; ! byte *row = (byte *)gs_malloc(raster + rsize, 1, "pcx file buffer"); ! byte *end = row + raster; ! byte *plane = end; int y; int code = 0; /* return code */ ! if ( row == 0 ) /* can't allocate row buffer */ return_error(gs_error_VMerror); ! /* setup the header struct */ phdr->manuf = 10; ! /* version and bpp were set by the caller */ phdr->encoding = 1; /* 1 for rle 8-bit encoding */ phdr->x1 = 0; phdr->y1 = 0; --- 177,204 ---- } /* Write out a page in PCX format. */ ! /* This routine is used for all four formats (monochrome, gray scale, */ ! /* planar "8-bit" actually 4-bit color, and chunky 8-bit color.) */ private int pcx_write_page(gx_device_printer *pdev, FILE *file, pcx_header _ss *phdr, int planar) ! { int orig_raster = gdev_prn_raster(pdev); ! int raster = round_up(orig_raster, 2); /* PCX format requires even */ ! uint rsize = round_up((pdev->width + 7) >> 3, 2); /* ditto */ int height = pdev->height; int depth = pdev->color_info.depth; ! byte *line = (byte *)gs_malloc(raster + rsize, 1, "pcx file buffer"); ! byte *plane = line + raster; int y; int code = 0; /* return code */ ! if ( line == 0 ) /* can't allocate line buffer */ return_error(gs_error_VMerror); ! /* Set up the header struct. */ phdr->manuf = 10; ! phdr->version = 5; phdr->encoding = 1; /* 1 for rle 8-bit encoding */ + /* bpp was set by the caller */ phdr->x1 = 0; phdr->y1 = 0; *************** *** 195,199 **** assign_ushort(phdr->hres, (int)pdev->x_pixels_per_inch); assign_ushort(phdr->vres, (int)pdev->y_pixels_per_inch); ! phdr->vmode = 0; /* nplanes was set by the caller */ assign_ushort(phdr->bpl, (planar && depth > 1 ? rsize : raster)); --- 207,211 ---- assign_ushort(phdr->hres, (int)pdev->x_pixels_per_inch); assign_ushort(phdr->vres, (int)pdev->y_pixels_per_inch); ! phdr->reserved = 0; /* nplanes was set by the caller */ assign_ushort(phdr->bpl, (planar && depth > 1 ? rsize : raster)); *************** *** 209,213 **** /* Dump the contents of the image. */ for ( y = 0; y < height; y++ ) ! { gdev_prn_copy_scan_lines(pdev, y, row, raster); switch ( depth ) { --- 221,232 ---- /* Dump the contents of the image. */ for ( y = 0; y < height; y++ ) ! { byte *row; ! byte *end; ! int code = gdev_prn_get_bits(pdev, y, line, &row); ! if ( code < 0 ) break; ! end = row + raster; ! /* Clear an odd trailing byte. */ ! if ( orig_raster & 1 ) ! end[-1] = 0; switch ( depth ) { *************** *** 252,256 **** >> shift; } ! pcx_write_rle(plane, to, file); } } --- 271,275 ---- >> shift; } ! pcx_write_rle(plane, plane + rsize, file); } } *************** *** 262,269 **** } ! } pcx_done: ! gs_free((char *)row, raster + rsize, 1, "pcx file buffer"); return code; --- 281,288 ---- } ! } pcx_done: ! gs_free((char *)line, raster + rsize, 1, "pcx file buffer"); return code; *************** *** 271,274 **** --- 290,317 ---- /* ------ Internal routines ------ */ + + /* Map an RGB color to a gray value. */ + private gx_color_index + pcxgray_map_rgb_color(gx_device *dev, ushort r, ushort g, ushort b) + { /* We round the value rather than truncating it. */ + gx_color_value gray = + ((r * (ulong)lum_red_weight) + + (g * (ulong)lum_green_weight) + + (b * (ulong)lum_blue_weight) + + (lum_all_weights / 2)) / lum_all_weights + * dev->color_info.max_gray / gx_max_color_value; + return gray; + } + + /* Map a gray value back to an RGB color. */ + private int + pcxgray_map_color_rgb(gx_device *dev, gx_color_index color, ushort prgb[3]) + { gx_color_value gray = + color * gx_max_color_value / dev->color_info.max_gray; + prgb[0] = gray; + prgb[1] = gray; + prgb[2] = gray; + return 0; + } /* Write one line in PCX run-length-encoded format. */ diff -rNC2 gs261/gdevtiff.c gs262/gdevtiff.c *** gs261/gdevtiff.c Wed May 19 20:05:02 1993 --- gs262/gdevtiff.c Sat Mar 20 05:44:02 1993 *************** *** 48,51 **** --- 48,52 ---- long diroff; /* file offset of next write */ int bigendian; /* 1 if machine is big-endian, 0 otherwise */ + unsigned long iwidth; /* width of image data in pixels */ int fax_byte; int fax_weight; *************** *** 78,82 **** #define X_DPI 204 #define Y_DPI 196 ! #define LINE_SIZE ((X_DPI * 98 / 10 + 7) / 8) /* bytes per line */ private dev_proc_open_device(tiff_prn_open); --- 79,83 ---- #define X_DPI 204 #define Y_DPI 196 ! #define LINE_SIZE ((X_DPI * 101 / 10 + 7) / 8) /* bytes per line */ private dev_proc_open_device(tiff_prn_open); *************** *** 109,115 **** { 85, 110, 1728 }, #define PAPER_SIZE_A4 1 ! { 83, 117, 1728 }, #define PAPER_SIZE_B4 2 ! { 98, 1391, 2048 } }; #define NPAGEINFO (sizeof (pageinfo) / sizeof (pageinfo[0])) --- 110,116 ---- { 85, 110, 1728 }, #define PAPER_SIZE_A4 1 ! { 85, 117, 1728 }, #define PAPER_SIZE_B4 2 ! { 101, 143, 2048 } }; #define NPAGEINFO (sizeof (pageinfo) / sizeof (pageinfo[0])) *************** *** 144,147 **** --- 145,149 ---- gx_device_tiff* ddev = (gx_device_tiff*) pdev; faxout_open_fp(ddev->file, &ddev->fax); + ddev->fax.iwidth = pi->iw; } return (rc); *************** *** 655,659 **** register int rl; ! ep = p + 1728/8; bit = 7; for (;;) { --- 657,661 ---- register int rl; ! ep = p + faxp->iwidth/8; bit = 7; for (;;) { *************** *** 690,694 **** if(c>=64) { tpos = (c/64)-1; ! te = mwtable+tpos; c -= te->count; putcode(faxp, te); --- 692,696 ---- if(c>=64) { tpos = (c/64)-1; ! te = tpos < 27 ? mwtable+tpos : extable+tpos-27; c -= te->count; putcode(faxp, te); *************** *** 707,711 **** if(c>=64) { tpos = (c/64)-1; ! te = mbtable+tpos; c -= te->count; putcode(faxp, te); --- 709,713 ---- if(c>=64) { tpos = (c/64)-1; ! te = tpos < 27 ? mbtable+tpos : extable+tpos-27; c -= te->count; putcode(faxp, te); diff -rNC2 gs261/gdevx.c gs262/gdevx.c *** gs261/gdevx.c Fri May 28 09:37:00 1993 --- gs262/gdevx.c Sat Aug 7 17:09:11 1993 *************** *** 150,155 **** NULL, /* dither_colors */ 0, 0, /* color_mask, half_dev_color */ ! NULL, /* dynamic_colors */ ! 0, 0, /* dynamic_size, dynamic_number */ 0, 0, /* borderColor, borderWidth */ NULL, /* geometry */ --- 150,155 ---- NULL, /* dither_colors */ 0, 0, /* color_mask, half_dev_color */ ! NULL, 0, /* dynamic_colors, max_dynamic_colors */ ! 0, 0, /* dynamic_size, dynamic_allocs */ 0, 0, /* borderColor, borderWidth */ NULL, /* geometry */ *************** *** 158,163 **** NULL, NULL, NULL, /* regularFonts, symbolFonts, dingbatFonts */ NULL, NULL, NULL, /* regular_fonts, symbol_fonts, dingbat_fonts */ ! 1, 1, 0, /* useXFonts, useScalableFonts, logXFonts */ ! 10.0, /* xFontTolerance */ 0.0, 0.0, /* xResolution, yResolution */ 1, /* useBackingPixmap */ --- 158,163 ---- NULL, NULL, NULL, /* regularFonts, symbolFonts, dingbatFonts */ NULL, NULL, NULL, /* regular_fonts, symbol_fonts, dingbat_fonts */ ! 1, 1, /* useXFonts, useFontExtensions */ ! 1, 0, /* useScalableFonts, logXFonts */ 0.0, 0.0, /* xResolution, yResolution */ 1, /* useBackingPixmap */ *************** *** 192,210 **** if (xdev->ghostview) x_send_event(dev, xdev->done); if (xdev->vinfo) { ! XFree(xdev->vinfo); xdev->vinfo = NULL; } if (xdev->dither_colors) { if (gx_device_has_color(xdev)) gs_free((char *)xdev->dither_colors, sizeof(x_pixel), ! xdev->color_info.dither_gray, "gdev_x_gray_ramp"); else gs_free((char *)xdev->dither_colors, sizeof(x_pixel), ! xdev->color_info.dither_rgb, "gdev_x_rgb_cube"); xdev->dither_colors = NULL; } if (xdev->dynamic_colors) { ! gs_free((char *)xdev->dynamic_colors, sizeof(XColor), ! xdev->dynamic_size, "gdev_x_dynamic_colors"); xdev->dynamic_colors = NULL; } --- 192,222 ---- if (xdev->ghostview) x_send_event(dev, xdev->done); if (xdev->vinfo) { ! XFree((char *)xdev->vinfo); xdev->vinfo = NULL; } if (xdev->dither_colors) { if (gx_device_has_color(xdev)) + #define cube(r) (r*r*r) gs_free((char *)xdev->dither_colors, sizeof(x_pixel), ! cube(xdev->color_info.dither_rgb), "x11_rgb_cube"); ! #undef cube else gs_free((char *)xdev->dither_colors, sizeof(x_pixel), ! xdev->color_info.dither_gray, "x11_gray_ramp"); xdev->dither_colors = NULL; } if (xdev->dynamic_colors) { ! int i; ! for (i = 0; i < xdev->dynamic_size; i++) { ! x11color *xcp = (*xdev->dynamic_colors)[i]; ! x11color *next; ! while (xcp) { ! next = xcp->next; ! gs_free((char *)xcp, sizeof(x11color), 1, "x11_dynamic_color"); ! xcp = next; ! } ! } ! gs_free((char *)xdev->dynamic_colors, sizeof(x11color *), ! xdev->dynamic_size, "x11_dynamic_colors"); xdev->dynamic_colors = NULL; } *************** *** 215,222 **** if (font->iso_names) XFreeFontNames(font->iso_names); gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "gdev_x_font_x11name"); gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "gdev_x_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap"); } while (xdev->symbol_fonts) { --- 227,234 ---- if (font->iso_names) XFreeFontNames(font->iso_names); gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "x11_font_x11name"); gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "x11_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); } while (xdev->symbol_fonts) { *************** *** 226,233 **** if (font->iso_names) XFreeFontNames(font->iso_names); gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "gdev_x_font_x11name"); gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "gdev_x_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap"); } while (xdev->dingbat_fonts) { --- 238,245 ---- if (font->iso_names) XFreeFontNames(font->iso_names); gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "x11_font_x11name"); gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "x11_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); } while (xdev->dingbat_fonts) { *************** *** 237,244 **** if (font->iso_names) XFreeFontNames(font->iso_names); gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "gdev_x_font_x11name"); gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "gdev_x_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap"); } XCloseDisplay(xdev->dpy); --- 249,256 ---- if (font->iso_names) XFreeFontNames(font->iso_names); gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "x11_font_x11name"); gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "x11_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); } XCloseDisplay(xdev->dpy); *************** *** 331,359 **** /* Finally look through the list of dynamic colors */ if (xdev->dynamic_colors) { ! int i; ! XColor *xcp = xdev->dynamic_colors; XColor xc; ! for (i = 0; i < xdev->dynamic_number; xcp++, i++) { ! if (xcp->red == dr && xcp->green == dg && xcp->blue == db) { ! return xcp->pixel; } } ! /* If not in our list of dynamic colors, ask the X server and */ ! /* add an entry if there is room. */ ! xc.red = dr; ! xc.green = dg; ! xc.blue = db; if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) { ! if (xdev->dynamic_number < xdev->dynamic_size) { ! xcp->red = dr; ! xcp->green = dg; ! xcp->blue = db; ! xcp->pixel = xc.pixel; ! xdev->dynamic_number++; ! } return xc.pixel; } else { return gx_no_color_index; } --- 343,385 ---- /* Finally look through the list of dynamic colors */ if (xdev->dynamic_colors) { ! int i = (dr ^ dg ^ db) >> (16 - xdev->vinfo->bits_per_rgb); ! x11color *xcp = (*xdev->dynamic_colors)[i]; ! x11color *last = NULL; XColor xc; ! while (xcp) { ! if (xcp->color.red == dr && xcp->color.green == dg && ! xcp->color.blue == db) { ! if (last) { ! last->next = xcp->next; ! xcp->next = (*xdev->dynamic_colors)[i]; ! (*xdev->dynamic_colors)[i] = xcp; ! } ! if (xcp->color.pad) return xcp->color.pixel; ! else return gx_no_color_index; } + last = xcp; + xcp = xcp->next; } ! /* If not in our list of dynamic colors, */ ! /* ask the X server and add an entry. */ ! /* First check if dynamic table is exhausted */ ! if (xdev->dynamic_allocs > xdev->max_dynamic_colors) ! return gx_no_color_index; ! xcp = (x11color *) gs_malloc(sizeof(x11color), 1, "x11_dynamic_color"); ! if (!xcp) return gx_no_color_index; ! xc.red = xcp->color.red = dr; ! xc.green = xcp->color.green = dg; ! xc.blue = xcp->color.blue = db; ! xcp->next = (*xdev->dynamic_colors)[i]; ! (*xdev->dynamic_colors)[i] = xcp; ! xdev->dynamic_allocs++; if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) { ! xcp->color.pixel = xc.pixel; ! xcp->color.pad = True; return xc.pixel; } else { + xcp->color.pad = False; return gx_no_color_index; } *************** *** 410,414 **** update_flush(dev); ! XSync(xdev->dpy, 0); return 0; } --- 436,440 ---- update_flush(dev); ! XFlush(xdev->dpy); return 0; } *************** *** 471,474 **** --- 497,521 ---- /* for erasepage (yet). */ if (x == 0 && y == 0 && w == xdev->width && h == xdev->height) { + if (color == xdev->foreground || color == xdev->background) { + if (xdev->dynamic_colors) { + int i; + for (i = 0; i < xdev->dynamic_size; i++) { + x11color *xcp = (*xdev->dynamic_colors)[i]; + x11color *next; + while (xcp) { + next = xcp->next; + if (xcp->color.pad) { + XFreeColors(xdev->dpy, xdev->cmap, + &xcp->color.pixel, 1, 0); + } + gs_free((char *)xcp, sizeof(x11color), 1, + "x11_dynamic_color"); + xcp = next; + } + (*xdev->dynamic_colors)[i] = NULL; + } + xdev->dynamic_allocs = 0; + } + } xdev->colors_or = xdev->colors_and = color; } diff -rNC2 gs261/gdevx.h gs262/gdevx.h *** gs261/gdevx.h Fri May 28 08:08:20 1993 --- gs262/gdevx.h Sat Aug 7 17:09:11 1993 *************** *** 29,32 **** --- 29,40 ---- } rect; + /* Define dynamic color hash table structure */ + struct x11color_s; + typedef struct x11color_s x11color; + struct x11color_s { + XColor color; + x11color *next; + }; + /* Define PostScript to X11 font name mapping */ struct x11fontmap_s; *************** *** 115,120 **** ushort color_mask; ushort half_dev_color; ! XColor *dynamic_colors; ! int dynamic_size, dynamic_number; #define note_color(pixel)\ --- 123,128 ---- ushort color_mask; ushort half_dev_color; ! x11color *(*dynamic_colors)[]; ! int max_dynamic_colors, dynamic_size, dynamic_allocs; #define note_color(pixel)\ *************** *** 146,151 **** x11fontmap *symbol_fonts; x11fontmap *dingbat_fonts; ! Boolean useXFonts, useScalableFonts, logXFonts; ! float xFontTolerance; float xResolution, yResolution; --- 154,158 ---- x11fontmap *symbol_fonts; x11fontmap *dingbat_fonts; ! Boolean useXFonts, useFontExtensions, useScalableFonts, logXFonts; float xResolution, yResolution; *************** *** 160,163 **** --- 167,171 ---- void x_update_add(P5(gx_device *, int, int, int, int)); void gdev_x_clear_window(P1(gx_device_X *)); + int x_catch_free_colors(P2(Display *, XErrorEvent *)); /* Number used to distinguish when resoultion was set from the command line */ diff -rNC2 gs261/gdevxini.c gs262/gdevxini.c *** gs261/gdevxini.c Fri May 28 09:36:20 1993 --- gs262/gdevxini.c Sat Aug 7 17:09:11 1993 *************** *** 41,47 **** XtOffsetOf(gx_device_X, dingbatFonts), XtRString, "ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal--"}, - {"externalFontTolerance", "ExternalFontTolerance", XtRFloat, sizeof(float), - XtOffsetOf(gx_device_X, xFontTolerance), - XtRString, (XtPointer)"10.0"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), XtOffsetOf(gx_device_X, foreground), --- 41,44 ---- *************** *** 101,104 **** --- 98,105 ---- Times-Italic:-Adobe-Times-Medium-I-Normal--\n\ Times-Roman:-Adobe-Times-Medium-R-Normal--\n\ + Utopia-Bold:-Adobe-Utopia-Bold-R-Normal--\n\ + Utopia-BoldItalic:-Adobe-Utopia-Bold-I-Normal--\n\ + Utopia-Italic:-Adobe-Utopia-Regular-I-Normal--\n\ + Utopia-Regular:-Adobe-Utopia-Regular-R-Normal--\n\ ZapfChancery-MediumItalic:-Adobe-ITC Zapf Chancery-Medium-I-Normal--"}, {"symbolFonts", "SymbolFonts", XtRString, sizeof(String), *************** *** 111,114 **** --- 112,118 ---- XtOffsetOf(gx_device_X, useXFonts), XtRImmediate, (XtPointer)True}, + {"useFontExtensions", "UseFontExtensions", XtRBoolean, sizeof(Boolean), + XtOffsetOf(gx_device_X, useFontExtensions), + XtRImmediate, (XtPointer)True}, {"useScalableFonts", "UseScalableFonts", XtRBoolean, sizeof(Boolean), XtOffsetOf(gx_device_X, useScalableFonts), *************** *** 128,131 **** --- 132,142 ---- }; + private String + fallback_resources[] = { + "Ghostscript*Background: white", + "Ghostscript*Foreground: black", + NULL + }; + /* Define constants for orientation from ghostview */ /* Number represents clockwise rotation of the paper in degrees */ *************** *** 141,144 **** --- 152,180 ---- private void gdev_x_setup_fontmap(P1(gx_device_X *)); + /* Catch the alloc error when there is not enough resources for the + * backing pixmap. Automatically shut off backing pixmap and let the + * user know when this happens. + */ + private Boolean alloc_error; + private XErrorHandler orighandler; + private XErrorHandler oldhandler; + + private int + x_catch_alloc(Display *dpy, XErrorEvent *err) + { + if (err->error_code == BadAlloc) + alloc_error = True; + if (alloc_error) + return 0; + return oldhandler(dpy, err); + } + + int + x_catch_free_colors(Display *dpy, XErrorEvent *err) + { + if (err->request_code == X_FreeColors) return 0; + return orighandler(dpy, err); + } + /* Open the X device */ int *************** *** 153,156 **** --- 189,193 ---- Widget toplevel; Display *dpy; + XColor xc; int zero = 0; *************** *** 299,305 **** --- 336,347 ---- exit(1); } + + /* Buggy X servers may cause a Bad Access on XFreeColors. */ + orighandler = XSetErrorHandler(x_catch_free_colors); + /* Get X Resources. Use the toolkit for this. */ XtToolkitInitialize(); app_con = XtCreateApplicationContext(); + XtAppSetFallbackResources(app_con, fallback_resources); dpy = XtOpenDisplay(app_con, NULL, "ghostscript", "Ghostscript", NULL, 0, &zero, NULL); *************** *** 308,311 **** --- 350,363 ---- XtGetApplicationResources(toplevel, (XtPointer) xdev, resources, XtNumber(resources), NULL, 0); + + /* Reserve foreground and background colors under the regular connection. */ + xc.pixel = xdev->foreground; + XQueryColor(xdev->dpy, xdev->cmap, &xc); + XAllocColor(xdev->dpy, xdev->cmap, &xc); + xc.pixel = xdev->background; + XQueryColor(xdev->dpy, xdev->cmap, &xc); + XAllocColor(xdev->dpy, xdev->cmap, &xc); + + /* And close the toolkit connection. */ XtDestroyWidget(toplevel); XtCloseDisplay(dpy); *************** *** 446,470 **** xdev->vinfo->depth); - XSync(xdev->dpy, 0); return 0; } - /* Catch the alloc error when there is not enough resources for the - * backing pixmap. Automatically shut off backing pixmap and let the - * user know when this happens. - */ - private Boolean alloc_error; - private XErrorHandler oldhandler; - - private int - x_catch_alloc(Display *dpy, XErrorEvent *err) - { - if (err->error_code == BadAlloc) - alloc_error = True; - if (alloc_error) - return 0; - oldhandler(dpy, err); - } - /* Allocate the backing pixmap, if any, and clear the window. */ void --- 498,504 ---- *************** *** 563,567 **** nitems = sscanf(buf, "%*s %d %d", &(xdev->foreground), &(xdev->background)); ! if (nitems != 2 || *buf != 'M' || *buf != 'G' || *buf != 'C') { eprintf("gs: Malformed ghostview color property.\n"); exit(1); --- 597,601 ---- nitems = sscanf(buf, "%*s %d %d", &(xdev->foreground), &(xdev->background)); ! if (nitems != 2 || *buf != 'M' && *buf != 'G' && *buf != 'C') { eprintf("gs: Malformed ghostview color property.\n"); exit(1); *************** *** 586,589 **** --- 620,625 ---- xdev->dither_colors = NULL; xdev->dynamic_colors = NULL; + xdev->dynamic_size = 0; + xdev->dynamic_allocs = 0; xdev->color_info.depth = xdev->vinfo->depth; *************** *** 592,596 **** xdev->color_info.max_gray = xdev->color_info.max_rgb = num_rgb - 1; - xdev->dither_colors = NULL; #if HaveStdCMap /* Get a standard color map if available */ --- 628,631 ---- *************** *** 615,635 **** #define cbrt(r) pow(r, 1.0/3.0) { ! int avail_colors = xdev->vinfo->colormap_size; ! while (!xdev->dither_colors && avail_colors) { ! int ramp_size = min((int)cbrt((double)avail_colors / 2.0), ! min(xdev->maxRGBRamp, num_rgb)); int max_rgb = ramp_size - 1; int r, g, b; - if (ramp_size < 2) { - avail_colors = 0; - goto no_cube; - } xdev->color_info.dither_gray = xdev->color_info.dither_rgb = ramp_size; xdev->dither_colors = (x_pixel *) gs_malloc(sizeof(x_pixel), cube(ramp_size), ! "gdev_x_rgb_cube"); for (r = 0; r < ramp_size; r++) { for (g = 0; g < ramp_size; g++) { --- 650,670 ---- #define cbrt(r) pow(r, 1.0/3.0) { ! int ramp_size = ! min((int)cbrt((double)xdev->vinfo->colormap_size / 2.0), ! min(xdev->maxRGBRamp, num_rgb)); ! while (!xdev->dither_colors && ramp_size >= 2) { int max_rgb = ramp_size - 1; int r, g, b; xdev->color_info.dither_gray = xdev->color_info.dither_rgb = ramp_size; xdev->dither_colors = (x_pixel *) gs_malloc(sizeof(x_pixel), cube(ramp_size), ! "x11_rgb_cube"); ! if (xdev->dither_colors == NULL) { ! ramp_size--; ! goto no_cube; ! } for (r = 0; r < ramp_size; r++) { for (g = 0; g < ramp_size; g++) { *************** *** 654,668 **** xc.pixel; } else { ! int i; ! ! avail_colors = cube_index(r, g, b) - 1; ! for (i = 1; i <= avail_colors; i++) { XFreeColors(xdev->dpy, xdev->cmap, ! &(xdev->dither_colors[i]), ! 1, 0); } gs_free((char *)xdev->dither_colors, sizeof(x_pixel), cube(ramp_size), ! "gdev_x_rgb_cube"); xdev->dither_colors = NULL; goto no_cube; --- 689,703 ---- xc.pixel; } else { ! eprintf3("Warning: failed to allocate %dx%dx%d RGB cube.\n", ! ramp_size, ramp_size, ramp_size); ! ramp_size--; ! if (cube_index(r, g, b) - 1 > 0) { XFreeColors(xdev->dpy, xdev->cmap, ! xdev->dither_colors + 1, ! cube_index(r, g, b) - 1, 0); } gs_free((char *)xdev->dither_colors, sizeof(x_pixel), cube(ramp_size), ! "x11_rgb_cube"); xdev->dither_colors = NULL; goto no_cube; *************** *** 680,694 **** } ! /* Allocate space for dynamic colors, do at most 256 */ ! /* If there are more avaiaible, we ask the X server */ ! xdev->dynamic_number = 0; ! xdev->dynamic_size = min(256, xdev->vinfo->colormap_size); ! xdev->dynamic_size -= cube(xdev->color_info.dither_rgb); ! if (xdev->dynamic_size) { ! xdev->dynamic_colors = ! (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size, ! "gdev_x_dynamic_colors"); ! } else { ! xdev->dynamic_colors = NULL; } #undef cube --- 715,730 ---- } ! /* Allocate space for dynamic colors hash table */ ! xdev->dynamic_colors = ! (x11color*(*)[]) gs_malloc(sizeof(x11color *), num_rgb, ! "x11_dynamic_colors"); ! if (xdev->dynamic_colors) { ! int i; ! xdev->dynamic_size = num_rgb; ! for (i = 0; i < num_rgb; i++) { ! (*xdev->dynamic_colors)[i] = NULL; ! } ! xdev->max_dynamic_colors = xdev->vinfo->colormap_size - ! cube(xdev->color_info.dither_rgb); } #undef cube *************** *** 697,701 **** xdev->color_info.num_components = 1; xdev->color_info.max_gray = num_rgb - 1; - xdev->dither_colors = NULL; #if HaveStdCMap /* Get a standard color map if available */ --- 733,736 ---- *************** *** 711,730 **** /* or the number of representable grays */ { ! int avail_colors = xdev->vinfo->colormap_size; ! while (!xdev->dither_colors && avail_colors) { ! int ramp_size = min(avail_colors / 2, ! min(xdev->maxGrayRamp, num_rgb)); int max_gray = ramp_size - 1; int i; - if (ramp_size < 2) { - avail_colors = 0; - goto no_ramp; - } xdev->color_info.dither_gray = ramp_size; xdev->dither_colors = (x_pixel *) gs_malloc(sizeof(x_pixel), ramp_size, ! "gdev_x_gray_ramp"); for (i = 0; i < ramp_size; i++) { XColor xc; --- 746,764 ---- /* or the number of representable grays */ { ! int ramp_size = min(xdev->vinfo->colormap_size / 2, ! min(xdev->maxGrayRamp, num_rgb)); ! while (!xdev->dither_colors && ramp_size >= 3) { int max_gray = ramp_size - 1; int i; xdev->color_info.dither_gray = ramp_size; xdev->dither_colors = (x_pixel *) gs_malloc(sizeof(x_pixel), ramp_size, ! "x11_gray_ramp"); ! if (xdev->dither_colors == NULL) { ! ramp_size--; ! goto no_ramp; ! } for (i = 0; i < ramp_size; i++) { XColor xc; *************** *** 740,751 **** xdev->dither_colors[i] = xc.pixel; } else { ! avail_colors = i - 1; ! for (i = 1; i <= avail_colors; i++) { XFreeColors(xdev->dpy, xdev->cmap, ! &(xdev->dither_colors[i]), 1, 0); } gs_free((char *)xdev->dither_colors, sizeof(x_pixel), ramp_size, ! "gdev_x_gray_ramp"); xdev->dither_colors = NULL; goto no_ramp; --- 774,787 ---- xdev->dither_colors[i] = xc.pixel; } else { ! eprintf1("Warning: failed to allocate %d level gray ramp.\n", ! ramp_size); ! ramp_size /= 2; ! if (i - 1 > 0) { XFreeColors(xdev->dpy, xdev->cmap, ! xdev->dither_colors + 1, i - 1, 0); } gs_free((char *)xdev->dither_colors, sizeof(x_pixel), ramp_size, ! "x11_gray_ramp"); xdev->dither_colors = NULL; goto no_ramp; *************** *** 760,774 **** } ! /* Allocate space for dynamic colors, do at most 256 */ ! /* If there are more avaiaible, we ask the X server */ ! xdev->dynamic_number = 0; ! xdev->dynamic_size = min(256, xdev->vinfo->colormap_size); ! xdev->dynamic_size -= xdev->color_info.dither_gray; ! if (xdev->dynamic_size) { ! xdev->dynamic_colors = ! (XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size, ! "gdev_x_dynamic_colors"); ! } else { ! xdev->dynamic_colors = NULL; } } else if (palette == 'M') { --- 796,811 ---- } ! /* Allocate space for dynamic colors hash table */ ! xdev->dynamic_colors = ! (x11color*(*)[]) gs_malloc(sizeof(x11color *), num_rgb, ! "x11_dynamic_colors"); ! if (xdev->dynamic_colors) { ! int i; ! xdev->dynamic_size = num_rgb; ! for (i = 0; i < num_rgb; i++) { ! (*xdev->dynamic_colors)[i] = NULL; ! } ! xdev->max_dynamic_colors = xdev->vinfo->colormap_size - ! xdev->color_info.dither_gray; } } else if (palette == 'M') { *************** *** 852,862 **** if (x11_name = get_x11_name(&cp, &x11_name_len)) { font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, ! "gdev_x_setup_fontmap"); font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, ! "gdev_x_setup_fontmap"); strncpy(font->ps_name, ps_name, ps_name_len); font->ps_name[ps_name_len] = '\0'; font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, ! "gdev_x_setup_fontmap"); strncpy(font->x11_name, x11_name, x11_name_len-1); font->x11_name[x11_name_len-1] = '\0'; --- 889,910 ---- if (x11_name = get_x11_name(&cp, &x11_name_len)) { font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, ! "x11_setup_fontmap"); ! if (font == NULL) continue; font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, ! "x11_setup_fontmap"); ! if (font->ps_name == NULL) { ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); ! continue; ! } strncpy(font->ps_name, ps_name, ps_name_len); font->ps_name[ps_name_len] = '\0'; font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, ! "x11_setup_fontmap"); ! if (font->x11_name == NULL) { ! gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "x11_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); ! continue; ! } strncpy(font->x11_name, x11_name, x11_name_len-1); font->x11_name[x11_name_len-1] = '\0'; *************** *** 874,884 **** if (x11_name = get_x11_name(&cp, &x11_name_len)) { font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, ! "gdev_x_setup_fontmap"); font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, ! "gdev_x_setup_fontmap"); strncpy(font->ps_name, ps_name, ps_name_len); font->ps_name[ps_name_len] = '\0'; font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, ! "gdev_x_setup_fontmap"); strncpy(font->x11_name, x11_name, x11_name_len-1); font->x11_name[x11_name_len-1] = '\0'; --- 922,943 ---- if (x11_name = get_x11_name(&cp, &x11_name_len)) { font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, ! "x11_setup_fontmap"); ! if (font == NULL) continue; font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, ! "x11_setup_fontmap"); ! if (font->ps_name == NULL) { ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); ! continue; ! } strncpy(font->ps_name, ps_name, ps_name_len); font->ps_name[ps_name_len] = '\0'; font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, ! "x11_setup_fontmap"); ! if (font->x11_name == NULL) { ! gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "x11_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); ! continue; ! } strncpy(font->x11_name, x11_name, x11_name_len-1); font->x11_name[x11_name_len-1] = '\0'; *************** *** 896,906 **** if (x11_name = get_x11_name(&cp, &x11_name_len)) { font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, ! "gdev_x_setup_fontmap"); font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, ! "gdev_x_setup_fontmap"); strncpy(font->ps_name, ps_name, ps_name_len); font->ps_name[ps_name_len] = '\0'; font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, ! "gdev_x_setup_fontmap"); strncpy(font->x11_name, x11_name, x11_name_len-1); font->x11_name[x11_name_len-1] = '\0'; --- 955,976 ---- if (x11_name = get_x11_name(&cp, &x11_name_len)) { font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, ! "x11_setup_fontmap"); ! if (font == NULL) continue; font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, ! "x11_setup_fontmap"); ! if (font->ps_name == NULL) { ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); ! continue; ! } strncpy(font->ps_name, ps_name, ps_name_len); font->ps_name[ps_name_len] = '\0'; font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, ! "x11_setup_fontmap"); ! if (font->x11_name == NULL) { ! gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "x11_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "x11_fontmap"); ! continue; ! } strncpy(font->x11_name, x11_name, x11_name_len-1); font->x11_name[x11_name_len-1] = '\0'; diff -rNC2 gs261/gdevxxf.c gs262/gdevxxf.c *** gs261/gdevxxf.c Fri May 28 08:12:46 1993 --- gs262/gdevxxf.c Fri Jul 16 07:09:57 1993 *************** *** 75,88 **** x_xfont *xxf; char x11template[256]; ! char *x11fontname; XFontStruct *x11font; x11fontmap *fmp; int i; - double diff, d; double height; int size; int xwidth, xheight, angle; Boolean My; ! Boolean scalable_font; if (!xdev->useXFonts) return NULL; --- 75,87 ---- x_xfont *xxf; char x11template[256]; ! char *x11fontname = NULL; XFontStruct *x11font; x11fontmap *fmp; int i; double height; int size; int xwidth, xheight, angle; Boolean My; ! Boolean scalable_font = False; if (!xdev->useXFonts) return NULL; *************** *** 106,109 **** --- 105,113 ---- } + /* Don't do very small fonts. Font metrics are way off due to rounding */ + if (xwidth <= 4 || xheight <= 4) return NULL; + + if (!xdev->useFontExtensions && (My || angle != 0)) return NULL; + if (encoding_index == 0 || encoding_index == 1) { int tried_other_encoding = 0; *************** *** 118,122 **** while (True) { if (encoding_index == 0) { - scalable_font = False; if (fmp->std_count == -1) { sprintf(x11template, "%s%s", fmp->x11_name, --- 122,125 ---- *************** *** 126,130 **** } if (fmp->std_count) { - diff = 999.9; for (i = 0; i < fmp->std_count; i++) { char *szp = fmp->std_names[i] + strlen(fmp->x11_name)+1; --- 129,132 ---- *************** *** 137,156 **** continue; } ! d = fabs(height - size) / height; ! if (d < diff) { x11fontname = fmp->std_names[i]; ! diff = d; } } ! if (xdev->useScalableFonts && scalable_font) { ! d = fabs(height - xheight) / height; ! if (d < diff) { ! sprintf(x11template, "%s-%d%s", fmp->x11_name, ! xheight, "-0-0-0-*-0-Adobe-fontspecific"); ! x11fontname = x11template; ! diff = 0; /* Always use scalable font if closer */ ! } } ! if (diff*100 <= xdev->xFontTolerance) break; } if (tried_other_encoding) return NULL; --- 139,154 ---- continue; } ! if (size == xheight) { x11fontname = fmp->std_names[i]; ! break; } } ! if (!x11fontname && scalable_font && ! xdev->useScalableFonts) { ! sprintf(x11template, "%s-%d%s", fmp->x11_name, ! xheight, "-0-0-0-*-0-Adobe-fontspecific"); ! x11fontname = x11template; } ! if (x11fontname) break; } if (tried_other_encoding) return NULL; *************** *** 158,162 **** tried_other_encoding = 1; } else if (encoding_index == 1) { - scalable_font = False; if (fmp->iso_count == -1) { sprintf(x11template, "%s%s", fmp->x11_name, --- 156,159 ---- *************** *** 166,170 **** } if (fmp->iso_count) { - diff = 999.9; for (i = 0; i < fmp->iso_count; i++) { char *szp = fmp->iso_names[i] + strlen(fmp->x11_name)+1; --- 163,166 ---- *************** *** 177,196 **** continue; } ! d = fabs(height - size) / height; ! if (d < diff) { x11fontname = fmp->iso_names[i]; ! diff = d; } } ! if (xdev->useScalableFonts && scalable_font) { ! d = fabs(height - xheight) / height; ! if (d < diff) { ! sprintf(x11template, "%s-%d%s", fmp->x11_name, ! xheight, "-0-0-0-*-0-ISO8859-1"); ! x11fontname = x11template; ! diff = 0; /* Always use scalable font if closer */ ! } } ! if (diff*100 <= xdev->xFontTolerance) break; } if (tried_other_encoding) return NULL; --- 173,188 ---- continue; } ! if (size == xheight) { x11fontname = fmp->iso_names[i]; ! break; } } ! if (!x11fontname && scalable_font && ! xdev->useScalableFonts) { ! sprintf(x11template, "%s-%d%s", fmp->x11_name, ! xheight, "-0-0-0-*-0-ISO8859-1"); ! x11fontname = x11template; } ! if (x11fontname) break; } if (tried_other_encoding) return NULL; *************** *** 200,204 **** } } else if (encoding_index == 2 || encoding_index == 3) { - scalable_font = False; if (encoding_index == 2) fmp = xdev->symbol_fonts; if (encoding_index == 3) fmp = xdev->dingbat_fonts; --- 192,195 ---- *************** *** 217,221 **** } if (fmp->std_count) { - diff = 999.9; for (i = 0; i < fmp->std_count; i++) { char *szp = fmp->std_names[i] + strlen(fmp->x11_name)+1; --- 208,211 ---- *************** *** 228,247 **** continue; } ! d = fabs(height - size) / height; ! if (d < diff) { x11fontname = fmp->std_names[i]; ! diff = d; } } ! if (xdev->useScalableFonts && scalable_font) { ! d = fabs(height - xheight) / height; ! if (d < diff) { ! sprintf(x11template, "%s-%d%s", fmp->x11_name, xheight, ! "-0-0-0-*-0-Adobe-fontspecific"); ! x11fontname = x11template; ! diff = 0; /* Always use scalable font if closer */ ! } } ! if (diff*100 > xdev->xFontTolerance) return NULL; } else { return NULL; --- 218,232 ---- continue; } ! if (size == xheight) { x11fontname = fmp->std_names[i]; ! break; } } ! if (!x11fontname && scalable_font && xdev->useScalableFonts) { ! sprintf(x11template, "%s-%d%s", fmp->x11_name, xheight, ! "-0-0-0-*-0-Adobe-fontspecific"); ! x11fontname = x11template; } ! if (!x11fontname) return NULL; } else { return NULL; *************** *** 456,462 **** { x_xfont *xxf = (x_xfont *) xf; - gx_device_X *xdev = xxf->xdev; ! XFreeFont(xxf->xdev->dpy, xxf->font); if (mprocs != NULL) (*mprocs->free) ((char *)xf, 1, sizeof(x_xfont), --- 441,447 ---- { x_xfont *xxf = (x_xfont *) xf; ! /* The device may not be open. Cannot reliably free the font. */ ! /* XFreeFont(xxf->xdev->dpy, xxf->font); */ if (mprocs != NULL) (*mprocs->free) ((char *)xf, 1, sizeof(x_xfont), diff -rNC2 gs261/gp_msdos.c gs262/gp_msdos.c *** gs261/gp_msdos.c Wed May 12 18:18:22 1993 --- gs262/gp_msdos.c Sun Jul 18 04:55:36 1993 *************** *** 162,165 **** --- 162,166 ---- int hsize = 0; int i; + int dot = 0; if ( pfen == 0 ) return 0; *************** *** 177,182 **** --- 178,192 ---- *p++ = '*'; while ( i < patlen && pat[i] != '.' ) i++; + if ( i == patlen && !dot ) + { /* DOS doesn't interpret * alone as */ + /* matching all files; we need *.*. */ + *p++ = '.'; + *p++ = '*'; + } i--; continue; + case '.': + dot = 1; + break; case '\\': if ( i + 1 < patlen && pat[i + 1] == '\\' ) *************** *** 186,189 **** --- 196,200 ---- case '/': hsize = p + 1 - (pattern + patlen); + dot = 0; } *p++ = pat[i]; diff -rNC2 gs261/gs_fonts.ps gs262/gs_fonts.ps *** gs261/gs_fonts.ps Thu May 27 18:13:42 1993 --- gs262/gs_fonts.ps Sun Jul 18 06:40:58 1993 *************** *** 17,28 **** % copies. ! % Font initialization for Ghostscript. % The standard representation for PostScript compatible fonts is described % in the book "Adobe Type 1 Font Format", published by Adobe Systems Inc. - % We don't attempt to document this representation here. - % Ghostscript uses Type 1 fonts, except that the external form doesn't use - % eexec encryption and may not even use CharString encryption. - % Define the default font. --- 17,24 ---- % copies. ! % Font initialization and management code. % The standard representation for PostScript compatible fonts is described % in the book "Adobe Type 1 Font Format", published by Adobe Systems Inc. % Define the default font. *************** *** 31,35 **** % Load the font name -> font file name map. userdict /Fontmap FontDirectory maxlength dict put ! /.loadFontmap % { 2 dict begin mark Fontmap --- 27,31 ---- % Load the font name -> font file name map. userdict /Fontmap FontDirectory maxlength dict put ! /.loadFontmap % .loadFontmap - { 2 dict begin mark Fontmap *************** *** 47,55 **** (Fontmap) .loadFontmap ! % Ghostscript optionally can load individual CharStrings as they are needed. % (This is intended primarily for machines with very small memories.) ! % This happens if DISKFONTS is true. In this case, we define another ! % dictionary parallel to FontDirectory that retains an open file ! % for every font loaded. /FontFileDirectory 10 dict def --- 43,185 ---- (Fontmap) .loadFontmap ! % Parse a font file just enough to find the FontName. ! /.findfontname % .findfontname true ! % .findfontname false ! % Closes the file in either case. ! { { dup token not { false exit } if % end of file ! dup /eexec eq { pop false exit } if % reached eexec section ! dup /FontName eq ! { xcheck not { dup token exit } if } % found /FontName ! { pop } ! ifelse ! } loop ! dup { 3 } { 2 } ifelse -1 roll closefile ! } bind def ! ! (GS_FONTPATH) getenv not { (%END GS_FONTPATH) .skipeof } if ! pop ! ! % Scan directories looking for plausible fonts. "Plausible" means that ! % the file begins either with %!PS-AdobeFont-, or with \200\001 ! % followed by four arbitrary bytes and then "%!PS-AdobeFont-". ! % To speed up the search, we skip any file whose name appears in ! % the Fontmap (with any extension and upper/lower case variation) already. ! % ! % NOTE: The current implementation of this procedure is Unix/DOS- ! % specific. It assumes that '/' and '\' are directory separators; that ! % the part of a file name following the last '.' is the extension; ! % that ';' cannot appear in a file name; and that ':' can appear in a ! % file name only if the file name doesn't begin with '/', '\', or '.'. ! % (this is so that Unix systems can use ':' as the separator). ! % ! /.lowerstring % .lowerstring ! { 0 1 2 index length 1 sub ! { 2 copy get dup 65 ge exch 90 le and ! { 2 copy 2 copy get 32 add put } ! if pop ! } ! for ! } bind def ! /.splitfilename % .basename ! { { (/) search { true } { (\\) search } ifelse ! { pop pop } ! { exit } ! ifelse ! } ! loop ! dup { (.) search { pop pop } { exit } ifelse } loop ! 2 copy eq ! { pop () } ! { exch dup length 2 index length 1 add sub 0 exch getinterval exch } ! ifelse ! } bind def ! /.scanfontdict Fontmap maxlength dict def ! /.scanfontbegin ! { % Construct the table of all file names already in Fontmap. ! Fontmap ! { exch pop dup type /stringtype eq ! { .splitfilename pop =string copy .lowerstring cvn ! .scanfontdict exch true .growput ! } ! { pop ! } ! ifelse ! } ! forall ! } bind def ! /.scanfontskip 4 dict dup begin ! (afm) true def ! (pfm) true def ! end def ! /.scan1fontstring 128 string def ! /.fontheader (\200\001????%!PS-AdobeFont-*) def ! /.scan1fontfirst .fontheader length string def ! /.scan1fontdir % .scan1fontdir - ! { QUIET not { (Scanning ) print dup print ( for fonts... ) print flush } if ! 0 exch (/*) concatstrings ! { dup .splitfilename ! .scanfontskip exch known exch .scanfontdict exch known or ! { pop ! } ! { dup (r) file ! dup .scan1fontfirst readstring pop ! dup .fontheader 6 16 getinterval .stringmatch ! { pop true } ! { .fontheader .stringmatch } ! ifelse ! { dup 0 setfileposition .findfontname ! { dup Fontmap exch known ! { pop pop ! } ! { exch copystring exch ! Fontmap exch 2 index .growput ! .splitfilename pop true .scanfontdict 3 1 roll .growput ! 1 add ! } ! ifelse ! } ! if ! } ! { closefile pop ! } ! ifelse ! } ! ifelse ! } ! .scan1fontstring filenameforall ! QUIET { pop } { =only ( found.\n) print flush } ifelse ! } bind def ! % Scan all the directories mentioned in GS_FONTPATH. ! (GS_FONTPATH) getenv ! { .scanfontbegin ! % Parsing the list of dictionaries is messy, since we have to ! % handle both the Unix : and the other-system ; as separators. ! % See the earlier comment for the restrictions that make this work. ! { dup length 0 eq { pop exit } if ! (;) search ! { exch pop ! } ! { dup 0 1 getinterval (/\\.) exch search ! { pop pop pop (:) search ! { exch pop } ! { () exch } ! ifelse ! } ! { pop () exch ! } ! ifelse ! } ! ifelse .scan1fontdir ! } ! loop ! } ! if ! ! %END GS_FONTPATH ! ! % If DISKFONTS is true, we load individual CharStrings as they are needed. % (This is intended primarily for machines with very small memories.) ! % In this case, we define another dictionary, parallel to FontDirectory, ! % that retains an open file for every font loaded. /FontFileDirectory 10 dict def *************** *** 125,129 **** ! % Ghostscript optionally can load individual CharStrings as they are needed. % (This is intended primarily for machines with very small memories.) % Initially, the character definition is the file position of the definition; --- 255,259 ---- ! % If DISKFONTS is true, we load individual CharStrings as they are needed. % (This is intended primarily for machines with very small memories.) % Initially, the character definition is the file position of the definition; *************** *** 176,180 **** % Type1BuildGlyph calls load_C to actually load the character definition. ! /load_C % -> - { dup abs 1000 idiv FontFile exch setfileposition CharStrings 3 1 roll --- 306,310 ---- % Type1BuildGlyph calls load_C to actually load the character definition. ! /load_C % load_C - { dup abs 1000 idiv FontFile exch setfileposition CharStrings 3 1 roll *************** *** 196,200 **** } bind def ! /seac_C % charstring -> achar bchar ..or nothing.. { dup length _Cstring length le { 4330 exch _Cstring .type1decrypt exch pop --- 326,330 ---- } bind def ! /seac_C % seac_C ..or nothing.. { dup length _Cstring length le { 4330 exch _Cstring .type1decrypt exch pop *************** *** 295,299 **** } bind def currentdict end readonly /.loadfontdict exch def ! /.loadfont % .loadfont -> { mark exch systemdict begin DISKFONTS { .loadfontdict begin } if --- 425,429 ---- } bind def currentdict end readonly /.loadfontdict exch def ! /.loadfont % .loadfont - { mark exch systemdict begin DISKFONTS { .loadfontdict begin } if *************** *** 301,340 **** % but fonts produced by Fontographer require a writable dictionary.... 8 dict begin % garbage ! % We can't just use `run', because we want to check for ! % .PFB files. We can't save the packing status anywhere, ! % so we need two separate control paths. ! % Also, we would like to use `false /PFBDecode filter', % but this occasionally produces a whitespace character as % the first of an eexec section, so we can't do it. ! % Finally, since the interpreter doesn't currently automatically % close an input file when the file reaches EOF (unless it's % the interpreter's current input file), we must explicitly % close the real file if we used a PFB filter. ! currentpacking ! { false setpacking ! { dup read not { -1 } if ! 2 copy unread 16#80 eq ! { dup true /PFBDecode filter cvx exec closefile } ! { cvx exec } ! ifelse ! } stopped % split up `execute' ! true setpacking ! $error /newerror get and {handleerror} if ! } ! { { dup read not { -1 } if ! 2 copy unread 16#80 eq ! { dup true /PFBDecode filter cvx exec closefile } ! { cvx exec } ! ifelse ! } execute ! } ! ifelse ! DISKFONTS { end } if ! end end cleartomark } bind def % Define a procedure for defining aliased fonts. % We just copy the original font, changing the FontName. ! /.aliasfont % -> { dup length 2 add dict dup 3 -1 roll { 1 index /FID eq { pop pop } { put dup } ifelse } forall --- 431,464 ---- % but fonts produced by Fontographer require a writable dictionary.... 8 dict begin % garbage ! % We can't just use `run', because we want to check for .PFB files. ! currentpacking ! { false setpacking .loadfont1 true setpacking } ! { .loadfont1 } ! ifelse ! { handleerror } if ! end ! DISKFONTS { end } if ! end cleartomark ! } bind def ! /.loadfont1 % .loadfont1 ! { % We would like to use `false /PFBDecode filter', % but this occasionally produces a whitespace character as % the first of an eexec section, so we can't do it. ! % Also, since the interpreter doesn't currently automatically % close an input file when the file reaches EOF (unless it's % the interpreter's current input file), we must explicitly % close the real file if we used a PFB filter. ! { dup read not { -1 } if ! 2 copy unread 16#80 eq ! { dup true /PFBDecode filter cvx exec closefile } ! { cvx exec } ! ifelse ! } stopped ! $error /newerror get and } bind def % Define a procedure for defining aliased fonts. % We just copy the original font, changing the FontName. ! /.aliasfont % .aliasfont { dup length 2 add dict dup 3 -1 roll { 1 index /FID eq { pop pop } { put dup } ifelse } forall *************** *** 393,402 **** (done.\n) print flush } if % Check to make sure the font was actually loaded. dup FontDirectory exch known { findfont exit } if ! (Loading ) print dup cvx =only ! ( font failed, substituting ) print defaultfontname cvx =only ! (.\n) print flush defaultfontname findfont .aliasfont exit } --- 517,554 ---- (done.\n) print flush } if + % Check to make sure the font was actually loaded. dup FontDirectory exch known { findfont exit } if ! % Maybe the file had a different FontName. ! % See if we can get a FontName from the file, and if so, ! % whether a font by that name exists now. ! dup Fontmap exch get findlibfile ! { exch pop .findfontname ! { dup FontDirectory exch .knownget ! { % Yes. Stack: origfontname filefontname fontdir ! exch ! QUIET ! { pop ! } ! { (Using ) print cvx =only ! ( font for ) print 1 index cvx =only ! (.\n) print flush ! } ! ifelse ! .aliasfont exit ! } ! if pop ! } ! if ! } ! if ! ! % The font definitely did not load correctly. ! QUIET not ! { (Loading ) print dup cvx =only ! ( font failed, substituting ) print defaultfontname cvx =only ! (.\n) print flush ! } if defaultfontname findfont .aliasfont exit } *************** *** 405,416 **** % findlibfile failed, substitute the default font. % Stack: fontname fontfilename ! (Can't find \(or can't open\) font file ) print print ! dup defaultfontname eq ! { ( for default font \() print cvx =only (\)! Giving up.\n) print flush 1 .quit } ! { ( for font ) print dup cvx =only ! (, substituting ) print defaultfontname cvx =only ! (.\n) print flush defaultfontname findfont .aliasfont } --- 557,573 ---- % findlibfile failed, substitute the default font. % Stack: fontname fontfilename ! (Can't find \(or can't open\) font file ) ! 1 index defaultfontname eq ! { print print ( for default font \() print cvx =only (\)! Giving up.\n) print flush 1 .quit } ! { QUIET ! { pop ! } ! { print print ( for font ) print dup cvx =only ! (, substituting ) print defaultfontname cvx =only ! (.\n) print flush ! } ! ifelse defaultfontname findfont .aliasfont } *************** *** 470,474 **** /setcachedevice_C { setcachedevice } bind def ! /outline_C % -> - { currentdict /Metrics .knownget { 2 index .knownget --- 627,631 ---- /setcachedevice_C { setcachedevice } bind def ! /outline_C % outline_C - { currentdict /Metrics .knownget { 2 index .knownget diff -rNC2 gs261/gs_init.ps gs262/gs_init.ps *** gs261/gs_init.ps Fri May 28 17:57:52 1993 --- gs262/gs_init.ps Mon Nov 21 16:17:11 1994 *************** *** 27,31 **** % Check the interpreter revision. NOTE: the interpreter code requires % that the first non-comment token in this file be an integer. ! 261 dup revision ne { (gs: Interpreter revision \() print revision 10 string cvs print --- 27,31 ---- % Check the interpreter revision. NOTE: the interpreter code requires % that the first non-comment token in this file be an integer. ! 262 dup revision ne { (gs: Interpreter revision \() print revision 10 string cvs print diff -rNC2 gs261/gs_statd.ps gs262/gs_statd.ps *** gs261/gs_statd.ps Wed May 12 18:22:20 1993 --- gs262/gs_statd.ps Fri Jul 9 02:51:16 1993 *************** *** 34,42 **** /note {540 720 //statusdict begin .setpagesize end} bind def /legal {612 1008 //statusdict begin .setpagesize end} bind def ! /a3 {842 1190 //statusdict begin .setpagesize end} bind def ! /a4 {595 842 //statusdict begin .setpagesize end} bind def ! /a5 {421 595 //statusdict begin .setpagesize end} bind def ! /a6 {297 421 //statusdict begin .setpagesize end} bind def ! /b4 {709 1002 //statusdict begin .setpagesize end} bind def /flsa {612 936 //statusdict begin .setpagesize end} bind def % U.S. foolscap /flse {612 936 //statusdict begin .setpagesize end} bind def % European foolscap --- 34,59 ---- /note {540 720 //statusdict begin .setpagesize end} bind def /legal {612 1008 //statusdict begin .setpagesize end} bind def ! /a0 {2380 3368 //statusdict begin .setpagesize end} bind def % ISO standard ! /a1 {1684 2380 //statusdict begin .setpagesize end} bind def % ISO standard ! /a2 {1190 1684 //statusdict begin .setpagesize end} bind def % ISO standard ! /a3 {842 1190 //statusdict begin .setpagesize end} bind def % ISO standard ! /a4 {595 842 //statusdict begin .setpagesize end} bind def % ISO standard ! /a5 {421 595 //statusdict begin .setpagesize end} bind def % ISO standard ! /a6 {297 421 //statusdict begin .setpagesize end} bind def % ISO standard ! /a7 {210 297 //statusdict begin .setpagesize end} bind def % ISO standard ! /a8 {148 210 //statusdict begin .setpagesize end} bind def % ISO standard ! /a9 {105 148 //statusdict begin .setpagesize end} bind def % ISO standard ! /a10 {74 105 //statusdict begin .setpagesize end} bind def % ISO standard ! /b0 {2836 4008 //statusdict begin .setpagesize end} bind def % ISO standard ! /b1 {2004 2836 //statusdict begin .setpagesize end} bind def % ISO standard ! /b2 {1418 2004 //statusdict begin .setpagesize end} bind def % ISO standard ! /b3 {1002 1418 //statusdict begin .setpagesize end} bind def % ISO standard ! /b4 {709 1002 //statusdict begin .setpagesize end} bind def % ISO standard ! /b5 {501 709 //statusdict begin .setpagesize end} bind def % ISO standard ! /archE {2592 3456 //statusdict begin .setpagesize end} bind def % U.S. CAD std ! /archD {1728 2592 //statusdict begin .setpagesize end} bind def % U.S. CAD std ! /archC {1296 1728 //statusdict begin .setpagesize end} bind def % U.S. CAD std ! /archB {864 1296 //statusdict begin .setpagesize end} bind def % U.S. CAD std ! /archA {648 864 //statusdict begin .setpagesize end} bind def % U.S. CAD std /flsa {612 936 //statusdict begin .setpagesize end} bind def % U.S. foolscap /flse {612 936 //statusdict begin .setpagesize end} bind def % European foolscap *************** *** 52,56 **** % The values for all but letter and note are arbitrary. /.pagetypenames ! { /letter /note /legal /a3 /a4 /a5 /a6 /b4 /flsa /flse /halfletter /11x17 /ledger } cvlit readonly def --- 69,75 ---- % The values for all but letter and note are arbitrary. /.pagetypenames ! { /letter /note /legal ! /a0 /a1 /a2 /a3 /a4 /a5 /a6 /a7 /a8 /a9 /a10 ! /b0 /b1 /b2 /b3 /b4 /b5 /archE /archD /archC /archB /archA /flsa /flse /halfletter /11x17 /ledger } cvlit readonly def *************** *** 177,181 **** % However, this interacts badly with our standard error handler, % so we override it with the following less appropriate definition. ! /exitserver { clear cleardictstack } bind def /setrealdevice { } bind def --- 196,200 ---- % However, this interacts badly with our standard error handler, % so we override it with the following less appropriate definition. ! /exitserver { 0 ne { clear cleardictstack } if } bind def /setrealdevice { } bind def diff -rNC2 gs261/gschar.c gs262/gschar.c *** gs261/gschar.c Thu May 27 07:17:30 1993 --- gs262/gschar.c Thu Jul 8 11:50:00 1993 *************** *** 548,552 **** else code = show_fast_move(cc->wxy, pgs); ! if ( code ) return code; } /* All done. */ --- 548,557 ---- else code = show_fast_move(cc->wxy, pgs); ! if ( code ) ! { /* Might be kshow, so store the state. */ ! penum->current_char = chr; ! penum->current_glyph = glyph; ! return code; ! } } /* All done. */ diff -rNC2 gs261/gsdps1.c gs262/gsdps1.c *** gs261/gsdps1.c Wed May 12 18:19:52 1993 --- gs262/gsdps1.c Mon Jun 28 12:46:38 1993 *************** *** 19,22 **** --- 19,23 ---- /* gsdps1.c */ /* Display PostScript graphics additions for Ghostscript library */ + #include "math_.h" #include "gx.h" #include "gserrors.h" *************** *** 32,36 **** gs_setbbox(gs_state *pgs, floatp llx, floatp lly, floatp urx, floatp ury) { gs_rect ubox, dbox; ! gs_fixed_rect bbox; gx_path *ppath = pgs->path; int code; --- 33,37 ---- gs_setbbox(gs_state *pgs, floatp llx, floatp lly, floatp urx, floatp ury) { gs_rect ubox, dbox; ! gs_fixed_rect obox, bbox; gx_path *ppath = pgs->path; int code; *************** *** 44,60 **** if ( (code = gs_bbox_transform(&ubox, &ctm_only(pgs), &dbox)) < 0 ) return code; ! if ( gx_path_bbox(ppath, &bbox) >= 0 ) { /* Take the union of the bboxes. */ ! ppath->bbox.p.x = min(bbox.p.x, float2fixed(dbox.p.x)); ! ppath->bbox.p.y = min(bbox.p.y, float2fixed(dbox.p.y)); ! ppath->bbox.q.x = max(bbox.q.x, float2fixed(dbox.q.x)); ! ppath->bbox.q.y = max(bbox.q.y, float2fixed(dbox.q.y)); } else /* empty path */ { /* Just set the bbox. */ ! ppath->bbox.p.x = float2fixed(dbox.p.x); ! ppath->bbox.p.y = float2fixed(dbox.p.y); ! ppath->bbox.q.x = float2fixed(dbox.q.x); ! ppath->bbox.q.y = float2fixed(dbox.q.y); ppath->bbox_set = 1; } --- 45,66 ---- if ( (code = gs_bbox_transform(&ubox, &ctm_only(pgs), &dbox)) < 0 ) return code; ! /* Round the corners in opposite directions. */ ! bbox.p.x = (fixed)floor(dbox.p.x * _fixed_scale); ! bbox.p.y = (fixed)floor(dbox.p.y * _fixed_scale); ! bbox.q.x = (fixed)ceil(dbox.q.x * _fixed_scale); ! bbox.q.y = (fixed)ceil(dbox.q.y * _fixed_scale); ! if ( gx_path_bbox(ppath, &obox) >= 0 ) { /* Take the union of the bboxes. */ ! ppath->bbox.p.x = min(obox.p.x, bbox.p.x); ! ppath->bbox.p.y = min(obox.p.y, bbox.p.y); ! ppath->bbox.q.x = max(obox.q.x, bbox.q.x); ! ppath->bbox.q.y = max(obox.q.y, bbox.q.y); } else /* empty path */ { /* Just set the bbox. */ ! ppath->bbox.p.x = bbox.p.x; ! ppath->bbox.p.y = bbox.p.y; ! ppath->bbox.q.x = bbox.q.x; ! ppath->bbox.q.y = bbox.q.y; ppath->bbox_set = 1; } *************** *** 72,76 **** /* Ensure counter-clockwise drawing. */ if ( (qx >= px) != (qy >= py) ) ! qx = px, px = pr->p.x; /* swap x values */ if ( (code = gs_moveto(pgs, px, py)) < 0 || (code = gs_lineto(pgs, qx, py)) < 0 || --- 78,82 ---- /* Ensure counter-clockwise drawing. */ if ( (qx >= px) != (qy >= py) ) ! qx = px, px = pr->q.x; /* swap x values */ if ( (code = gs_moveto(pgs, px, py)) < 0 || (code = gs_lineto(pgs, qx, py)) < 0 || diff -rNC2 gs261/gsgraph.uue gs262/gsgraph.uue *** gs261/gsgraph.uue Wed Dec 31 18:00:00 1969 --- gs262/gsgraph.uue Thu Jul 8 03:07:50 1993 *************** *** 0 **** --- 1,21 ---- + begin 644 gsgraph.ico + M ! $ (" 0 #H @ %@ "@ @ 0 $ ! @ ( + M " " @( @ ( @ " @ + M@(" $! 0 /\ /\ #__P#_ _P#_ /__ #___\ S,S,S,S,S,S, + 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\ + 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[ + 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, + MS,S,S,S,S,S,S,S,S,S,S /__________\ /_______P\ + M /_______P /_______P / _P /\/______ + M\ ____ ___P_______P_____P _____P______________ /______ + M_______P /\ /_P /__________\ /\ #P #__________P + M#_______\/ /_P_P#_\ #_#_\ __ + M _____P /____\ #_#P_P + M #___ __\ #__P + M /__ /\ + M + M ^ __P ?_^ ?OS "!X . ! ( & PA@ >=\ + M /__@ '__\ !___@ ?__^ '___@#___X!____ ____@?___P/___^'____S_ + !____ + + end diff -rNC2 gs261/gstext.uue gs262/gstext.uue *** gs261/gstext.uue Wed Dec 31 18:00:00 1969 --- gs262/gstext.uue Thu Jul 8 03:07:50 1993 *************** *** 0 **** --- 1,21 ---- + begin 644 gstext.ico + M ! $ (" 0 #H @ %@ "@ @ 0 $ ! @ ( + M " " @( @ ( @ " @ + M@(" $! 0 /\ /\ #__P#_ _P#_ /__ #___\ $1$1$1$1$1$1 + 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; + M$1L;$1L1$1$1$1$1&Q$;&Q$;&Q$;$1&Q$1$1$1L1&QL1&QL1&Q$1L1$1$1$; + 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 + M$1$1$1$1$1$1$1$1$1$1$0 /__________\ /_______P\ + M /_______P /_______P / _P /\/______ + M\ ____ ___P_______P_____P _____P______________ /______ + M_______P /\ /_P /__________\ /\ #P #__________P + M#_______\/ /_P_P#_\ #_#_\ __ + M _____P /____\ #_#P_P + M #___ __\ #__P + M /__ /\ + M + M ^ __P ?_^ ?OS "!X . ! ( & PA@ >=\ + M /__@ '__\ !___@ ?__^ '___@#___X!____ ____@?___P/___^'____S_ + !____ + + end diff -rNC2 gs261/gsutil.c gs262/gsutil.c *** gs261/gsutil.c Wed May 12 18:21:20 1993 --- gs262/gsutil.c Wed Jun 2 14:25:44 1993 *************** *** 54,71 **** register const string_match_params *psmp) { const byte *pback = 0; const byte *p = pstr, *pend = pstr + plen; const byte *sp = str, *spend = str + len; - uint matched = 0; if ( psmp == 0 ) psmp = &smp_default; ! while ( p < pend ) { register byte ch = *p; if ( ch == psmp->any_substring ) ! { pback = ++p, matched = 0; continue; } else if ( ch == psmp->any_char ) { if ( sp == spend ) return 0; /* str too short */ ! p++, sp++, matched++; continue; } --- 54,71 ---- register const string_match_params *psmp) { const byte *pback = 0; + const byte *spback; const byte *p = pstr, *pend = pstr + plen; const byte *sp = str, *spend = str + len; if ( psmp == 0 ) psmp = &smp_default; ! again: while ( p < pend ) { register byte ch = *p; if ( ch == psmp->any_substring ) ! { pback = ++p, spback = sp; continue; } else if ( ch == psmp->any_char ) { if ( sp == spend ) return 0; /* str too short */ ! p++, sp++; continue; } *************** *** 74,89 **** ch = *p; } ! if ( sp == spend ) return 0; /* str too short */ if ( *sp == ch || psmp->ignore_case && (*sp ^ ch) == 0x20 && (ch &= ~0x20) >= 0x41 && ch <= 0x5a ) ! p++, sp++, matched++; else if ( pback == 0 ) return 0; /* no * to back up to */ else ! { sp += 1 - matched; p = pback; - matched = 0; } } return 1; --- 74,100 ---- ch = *p; } ! if ( sp == spend ) ! return 0; /* str too short */ if ( *sp == ch || psmp->ignore_case && (*sp ^ ch) == 0x20 && (ch &= ~0x20) >= 0x41 && ch <= 0x5a ) ! p++, sp++; else if ( pback == 0 ) return 0; /* no * to back up to */ else ! { sp = ++spback; p = pback; } + } + if ( sp < spend ) + { /* We got a match, but there are chars left over. */ + /* If we can back up, back up to the only place that */ + /* could produce a complete match, otherwise fail. */ + if ( pback == 0 ) + return 0; + p = pback; + pback = 0; + sp = spend - (pend - p); + goto again; } return 1; diff -rNC2 gs261/gxcmap.c gs262/gxcmap.c *** gs261/gxcmap.c Tue May 18 18:19:24 1993 --- gs262/gxcmap.c Thu Jun 10 19:13:32 1993 *************** *** 1,3 **** ! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 22,25 **** --- 22,26 ---- #include "gserrors.h" #include "gscspace.h" + #include "gxarith.h" #include "gxfrac.h" #include "gxlum.h" *************** *** 28,31 **** --- 29,35 ---- #include "gzcolor.h" #include "gzstate.h" + /* Brought back from a later release.... */ + #define color_set_pure(pdc, color)\ + ((pdc)->color1 = (pdc)->color2 = (color), (pdc)->halftone_level = 0) /* Convert a frac to a gx_color_value. */ *************** *** 148,167 **** { frac c = frac_1 - r, m = frac_1 - g, y = frac_1 - b; frac k = (c < m ? min(c, y) : min(m, y)); - floatp fk = frac2float(k); /* The default UCR and BG functions are pretty arbitrary.... */ - float fucr = - (pgs->undercolor_removal == NULL ? 0.0 : - (*pgs->undercolor_removal)(pgs, fk)); - float fbg = - (pgs->black_generation == NULL ? 0.0 : - (*pgs->black_generation)(pgs, fk)); - signed_frac ucr = - (fucr < -1.0 ? -frac_1 : fucr > 1.0 ? frac_1 : float2frac(fucr)); frac bg = ! (fbg < 0.0 ? frac_0 : fbg > 1.0 ? frac_1 : float2frac(fbg)); ! cmyk[0] = (c < ucr ? frac_0 : ucr < c - frac_1 ? frac_1 : c - ucr); ! cmyk[1] = (m < ucr ? frac_0 : ucr < m - frac_1 ? frac_1 : m - ucr); ! cmyk[2] = (y < ucr ? frac_0 : ucr < y - frac_1 ? frac_1 : y - ucr); cmyk[3] = bg; } --- 152,184 ---- { frac c = frac_1 - r, m = frac_1 - g, y = frac_1 - b; frac k = (c < m ? min(c, y) : min(m, y)); /* The default UCR and BG functions are pretty arbitrary.... */ frac bg = ! (pgs->black_generation == NULL ? frac_0 : ! float2frac((*pgs->black_generation)(pgs, frac2float(k)))); ! signed_frac ucr = ! (pgs->undercolor_removal == NULL ? frac_0 : ! float2frac((*pgs->undercolor_removal)(pgs, frac2float(k)))); ! /* Adobe specifies, e.g., */ ! /* C = max(0.0, min(1.0, 1 - R - UCR)) */ ! /* but in order to match our improved CMYK->RGB mapping, we use */ ! /* C = max(0.0, min(1.0, 1 - R / (1 - UCR)) */ ! if ( ucr == frac_1 ) ! cmyk[0] = cmyk[1] = cmyk[2] = 0; ! else ! { float denom = frac2float(frac_1 - ucr); /* unscaled */ ! float v; ! v = (float)frac_1 - r / denom; /* unscaled */ ! cmyk[0] = ! (is_fneg(v) ? frac_0 : v >= (float)frac_1 ? frac_1 : (frac)v); ! v = (float)frac_1 - g / denom; /* unscaled */ ! cmyk[1] = ! (is_fneg(v) ? frac_0 : v >= (float)frac_1 ? frac_1 : (frac)v); ! v = (float)frac_1 - b / denom; /* unscaled */ ! cmyk[2] = ! (is_fneg(v) ? frac_0 : v >= (float)frac_1 ? frac_1 : (frac)v); ! } cmyk[3] = bg; + if_debug7('c', "[c]RGB 0x%x,0x%x,0x%x -> CMYK 0x%x,0x%x,0x%x,0x%x\n", + r, g, b, cmyk[0], cmyk[1], cmyk[2], cmyk[3]); } *************** *** 200,203 **** --- 217,222 ---- } } + if_debug7('c', "[c]CMYK 0x%x,0x%x,0x%x,0x%x -> RGB 0x%x,0x%x,0x%x\n", + c, m, y, k, rgb[0], rgb[1], rgb[2]); } *************** *** 208,216 **** private cmap_proc_gray(cmap_gray_to_rgb); private cmap_proc_gray(cmap_gray_to_cmyk); ! private cmap_proc_rgb(cmap_rgb_halftoned); private cmap_proc_rgb(cmap_rgb_direct); private cmap_proc_rgb(cmap_rgb_to_gray); private cmap_proc_rgb(cmap_rgb_to_cmyk); ! private cmap_proc_cmyk(cmap_cmyk_halftoned); private cmap_proc_cmyk(cmap_cmyk_direct); private cmap_proc_cmyk(cmap_cmyk_to_gray); --- 227,235 ---- private cmap_proc_gray(cmap_gray_to_rgb); private cmap_proc_gray(cmap_gray_to_cmyk); ! #define cmap_rgb_halftoned cmap_rgb_direct private cmap_proc_rgb(cmap_rgb_direct); private cmap_proc_rgb(cmap_rgb_to_gray); private cmap_proc_rgb(cmap_rgb_to_cmyk); ! #define cmap_cmyk_halftoned cmap_cmyk_direct private cmap_proc_cmyk(cmap_cmyk_direct); private cmap_proc_cmyk(cmap_cmyk_to_gray); *************** *** 261,265 **** #define unit_frac(v)\ (ftemp = (v),\ ! (ftemp < 0.0 ? frac_0 : ftemp > 1.0 ? frac_1 : float2frac(ftemp))) int gx_remap_DeviceGray(const gs_client_color *pc, const gs_color_space *pcs, --- 280,284 ---- #define unit_frac(v)\ (ftemp = (v),\ ! (is_fneg(ftemp) ? frac_0 : ftemp >= 1.0 ? frac_1 : float2frac(ftemp))) int gx_remap_DeviceGray(const gs_client_color *pc, const gs_color_space *pcs, *************** *** 309,314 **** return; } ! pdc->color1 = pdc->color2 = color; ! pdc->halftone_level = 0; } --- 328,332 ---- return; } ! color_set_pure(pdc, color); } *************** *** 330,370 **** /* Render RGB color. */ private void cmap_rgb_direct(frac r, frac g, frac b, gx_device_color *pdc, const gs_state *pgs) ! { if ( r == g && g == b ) ! { cmap_gray_direct(r, pdc, pgs); ! return; ! } ! { gx_device *dev = gs_currentdevice(pgs); ! frac mred = gx_map_color_frac(pgs, r, red); ! gx_color_value cv_red = frac2cv(mred); ! frac mgreen = gx_map_color_frac(pgs, g, green); ! gx_color_value cv_green = frac2cv(mgreen); ! frac mblue = gx_map_color_frac(pgs, b, blue); ! gx_color_value cv_blue = frac2cv(mblue); ! gx_color_index color = (*dev->procs->map_rgb_color)(dev, ! cv_red, cv_green, cv_blue); ! if ( color == gx_no_color_index ) ! { gx_render_rgb(mred, mgreen, mblue, pdc, pgs); return; } - pdc->color1 = pdc->color2 = color; - pdc->halftone_level = 0; - } - } - - private void - cmap_rgb_halftoned(frac r, frac g, frac b, gx_device_color *pdc, - const gs_state *pgs) - { if ( r == g && g == b ) - { cmap_gray_halftoned(r, pdc, pgs); /* pick any one */ - return; } ! gx_render_rgb(gx_map_color_frac(pgs, r, red), ! gx_map_color_frac(pgs, g, green), ! gx_map_color_frac(pgs, b, blue), ! pdc, pgs); } --- 348,385 ---- /* Render RGB color. */ + /* + * This code should test r == g and g == b and then use the gray + * rendering procedures. The Adobe documentation allows this: + * conversion between color spaces occurs before the transfer function + * and halftoning. However, output from FrameMaker (mis)uses the + * transfer function to provide the equivalent of indexed color; + * it requires the color components to be passed through unchanged. + * For this reason, we have to make the check after the transfer + * function rather than before. + */ + private void cmap_rgb_direct(frac r, frac g, frac b, gx_device_color *pdc, const gs_state *pgs) ! { gx_device *dev = gs_currentdevice(pgs); ! frac mred = gx_map_color_frac(pgs, r, red); ! frac mgreen = gx_map_color_frac(pgs, g, green); ! frac mblue = gx_map_color_frac(pgs, b, blue); ! /* We make a test for direct vs. halftoned, rather than */ ! /* duplicating most of the code of this procedure. */ ! if ( dev->color_info.max_rgb >= 31 ) ! { gx_color_index color = (*dev->procs->map_rgb_color)(dev, ! frac2cv(mred), frac2cv(mgreen), ! frac2cv(mblue)); ! if ( color != gx_no_color_index ) ! { color_set_pure(pdc, color); return; } } ! if ( mred == mgreen && mred == mblue ) /* gray shade */ ! gx_render_gray(mred, pdc, pgs); ! else ! gx_render_rgb(mred, mgreen, mblue, pdc, pgs); } *************** *** 385,423 **** /* Render CMYK color. */ private void cmap_cmyk_direct(frac c, frac m, frac y, frac k, gx_device_color *pdc, const gs_state *pgs) ! { if ( c == m && m == y ) ! { cmap_gray_direct(color_cmyk_to_gray(c, m, y, k, pgs), pdc, pgs); ! return; ! } ! { gx_device *dev = gs_currentdevice(pgs); ! frac mcyan = gx_map_color_frac(pgs, c, red); ! gx_color_value cv_cyan = frac2cv(mcyan); ! frac mmagenta = gx_map_color_frac(pgs, m, green); ! gx_color_value cv_magenta = frac2cv(mmagenta); ! frac myellow = gx_map_color_frac(pgs, y, blue); ! gx_color_value cv_yellow = frac2cv(myellow); ! frac mblack = gx_map_color_frac(pgs, k, gray); ! gx_color_value cv_black = frac2cv(mblack); ! gx_color_index color = (*dev->procs->map_cmyk_color)(dev, ! cv_cyan, cv_magenta, cv_yellow, cv_black); ! if ( color == gx_no_color_index ) ! { cmap_cmyk_halftoned(c, m, y, k, pdc, pgs); return; } - pdc->color1 = pdc->color2 = color; - pdc->halftone_level = 0; } ! } ! ! private void ! cmap_cmyk_halftoned(frac c, frac m, frac y, frac k, gx_device_color *pdc, ! const gs_state *pgs) ! { /* CMYK halftones are not implemented yet. */ ! frac rgb[3]; ! color_cmyk_to_rgb(c, m, y, k, pgs, rgb); ! cmap_rgb_halftoned(rgb[0], rgb[1], rgb[2], pdc, pgs); } --- 400,430 ---- /* Render CMYK color. */ + /* See above under RGB for why we can't use a shortcut for gray. */ + private void cmap_cmyk_direct(frac c, frac m, frac y, frac k, gx_device_color *pdc, const gs_state *pgs) ! { gx_device *dev = gs_currentdevice(pgs); ! frac mcyan = gx_map_color_frac(pgs, c, red); ! frac mmagenta = gx_map_color_frac(pgs, m, green); ! frac myellow = gx_map_color_frac(pgs, y, blue); ! frac mblack = gx_map_color_frac(pgs, k, gray); ! /* We make a test for direct vs. halftoned, rather than */ ! /* duplicating most of the code of this procedure. */ ! if ( dev->color_info.max_rgb >= 31 ) ! { gx_color_index color = (*dev->procs->map_cmyk_color)(dev, ! frac2cv(mcyan), frac2cv(mmagenta), ! frac2cv(myellow), frac2cv(mblack)); ! if ( color != gx_no_color_index ) ! { color_set_pure(pdc, color); return; } } ! /* CMYK halftones are not implemented yet. */ ! { frac rgb[3]; ! color_cmyk_to_rgb(c, m, y, k, pgs, rgb); ! cmap_rgb_halftoned(rgb[0], rgb[1], rgb[2], pdc, pgs); ! } } diff -rNC2 gs261/gxcpath.c gs262/gxcpath.c *** gs261/gxcpath.c Wed May 26 14:51:12 1993 --- gs262/gxcpath.c Sun Jun 6 02:11:42 1993 *************** *** 213,216 **** --- 213,220 ---- pcpath->path.bbox.q.x = int2fixed(adev.bbox.q.x); pcpath->path.bbox.q.y = int2fixed(adev.bbox.q.y); + /* Using the setbbox flag here is slightly bogus, */ + /* but it's as good a way as any to indicate that */ + /* the bbox is accurate. */ + pcpath->path.bbox_set = 1; /* Note that the result of the intersection might be */ /* a single rectangle. This will cause clip_path_is_rect.. */ diff -rNC2 gs261/gxdither.c gs262/gxdither.c *** gs261/gxdither.c Wed May 12 18:24:08 1993 --- gs262/gxdither.c Thu Jul 8 12:00:44 1993 *************** *** 235,249 **** if ( rem_r > half ) rem_r = frac_1 - rem_r, ! adjust_r = -1, r++, lum_invert += lum_red_weight; else adjust_r = 1; if ( rem_g > half ) rem_g = frac_1 - rem_g, ! adjust_g = -1, g++, lum_invert += lum_green_weight; else adjust_g = 1; if ( rem_b > half ) rem_b = frac_1 - rem_b, ! adjust_b = -1, b++, lum_invert += lum_blue_weight; else adjust_b = 1; --- 235,249 ---- if ( rem_r > half ) rem_r = frac_1 - rem_r, ! adjust_r = -1, r++, lum_invert += lum_red_weight * 2; else adjust_r = 1; if ( rem_g > half ) rem_g = frac_1 - rem_g, ! adjust_g = -1, g++, lum_invert += lum_green_weight * 2; else adjust_g = 1; if ( rem_b > half ) rem_b = frac_1 - rem_b, ! adjust_b = -1, b++, lum_invert += lum_blue_weight * 2; else adjust_b = 1; *************** *** 312,317 **** fractional_color(g, max_value), fractional_color(b, max_value)); - /****** THIS IS A BAD IDEA ******/ - #if 0 if ( lum_w[diagc] < lum_invert ) { pdevc->color2 = pdevc->color1; --- 312,315 ---- *************** *** 320,324 **** } else - #endif pdevc->color2 = color2; gx_color_load(pdevc, pgs); --- 318,321 ---- diff -rNC2 gs261/gxrefct.h gs262/gxrefct.h *** gs261/gxrefct.h Mon May 17 12:07:46 1993 --- gs262/gxrefct.h Mon Jun 14 17:46:06 1993 *************** *** 75,79 **** if ( vp == 0 || vp->rc.ref_count > 1 )\ { stype *new;\ ! rc_alloc_1(new, stype, vp->rc.size, mprocs, errstat, cname);\ if ( vp ) vp->rc.ref_count--;\ vp = new;\ --- 75,79 ---- if ( vp == 0 || vp->rc.ref_count > 1 )\ { stype *new;\ ! rc_alloc_struct_1(new, stype, mprocs, errstat, cname);\ if ( vp ) vp->rc.ref_count--;\ vp = new;\ diff -rNC2 gs261/iinit.c gs262/iinit.c *** gs261/iinit.c Fri May 28 17:57:42 1993 --- gs262/iinit.c Wed Apr 19 18:24:03 1995 *************** *** 34,44 **** /* Define various parameters of this interpreter: */ const char *gs_copyright = ! "Copyright (C) 1990-1993 Aladdin Enterprises, Menlo Park, CA.\n"; const char *gs_product = "Ghostscript"; const int gs_revision = ! 261; /* release number x 100 + the sub-release. */ const long gs_revisiondate = ! 930528; /* year x 10000 + month x 100 + day. */ const long gs_serialnumber = 42; /* a well-known number */ --- 34,44 ---- /* Define various parameters of this interpreter: */ const char *gs_copyright = ! "Copyright (C) 1990-1995 Aladdin Enterprises, Menlo Park, CA.\n"; const char *gs_product = "Ghostscript"; const int gs_revision = ! 262; /* release number x 100 + the sub-release. */ const long gs_revisiondate = ! 950419; /* year x 10000 + month x 100 + day. */ const long gs_serialnumber = 42; /* a well-known number */ diff -rNC2 gs261/msc.mak gs262/msc.mak *** gs261/msc.mak Sun May 16 09:00:18 1993 --- gs262/msc.mak Wed Apr 19 18:09:06 1995 *************** *** 236,240 **** DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev ! DEVICE_DEVS8=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev !include gs.mak !include devs.mak --- 236,240 ---- DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev ! DEVICE_DEVS8=pcxmono.dev pcx16.dev pcx256.dev !include gs.mak !include devs.mak diff -rNC2 gs261/ps2ascii gs262/ps2ascii *** gs261/ps2ascii Tue Nov 17 14:29:32 1992 --- gs262/ps2ascii Tue Jun 1 08:42:38 1993 *************** *** 6,13 **** # reading from stdin and writing on stdout. if ( test $# -eq 0 ) then ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps - quit.ps elif ( test $# -eq 1 ) then ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps else ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps >$2 fi --- 6,13 ---- # reading from stdin and writing on stdout. if ( test $# -eq 0 ) then ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - quit.ps elif ( test $# -eq 1 ) then ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps else ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps >$2 fi diff -rNC2 gs261/ps2image.ps gs262/ps2image.ps *** gs261/ps2image.ps Fri May 21 15:04:58 1993 --- gs262/ps2image.ps Wed Jun 2 18:27:20 1993 *************** *** 38,55 **** % Initialize the tables for reading a image. % This code gets copied to the output file. /initread { % Initialize the strings for filling runs. ! /.ImageFills 31 % max repeat count 0 1 255 ! { 1 index string dup 0 1 5 index 1 sub { 3 index put dup } for ! pop exch pop readonly exch ! } for pop ! 256 array astore readonly def % Initialize the procedure table for input dispatching. ! /.ImageProcs 33 { { pop .ImageItem } } repeat 32 { { % 0x21-0x40: (N-0x20) data bytes follow --- 38,57 ---- % Initialize the tables for reading a image. % This code gets copied to the output file. + /maxrep 31 def % max repeat count + /maxrep1 maxrep 1 sub def /initread { % Initialize the strings for filling runs. ! /.ImageFills [ 0 1 255 ! { //maxrep string dup 0 1 //maxrep1 { 3 index put dup } for ! pop exch pop readonly ! } for ! ] readonly def % Initialize the procedure table for input dispatching. ! /.ImageProcs [ 33 { { pop .ImageItem } } repeat 32 { { % 0x21-0x40: (N-0x20) data bytes follow *************** *** 62,66 **** } bind } repeat 160 { { pop .ImageItem } } repeat ! 256 array astore readonly def } def --- 64,68 ---- } bind } repeat 160 { { pop .ImageItem } } repeat ! ] readonly def } def *************** *** 80,84 **** pathbbox newpath 4 -2 roll pop pop dup 3 1 roll abs 5 index exch div exch abs 6 index exch div ! 2 copy lt { exch } if % (definition of max) 0 0 2 index neg 0 4 index 7 -1 roll mul ] { .ImageItem } --- 82,86 ---- pathbbox newpath 4 -2 roll pop pop dup 3 1 roll abs 5 index exch div exch abs 6 index exch div ! 2 copy lt { exch } if pop % (definition of max) 0 0 2 index neg 0 4 index 7 -1 roll mul ] { .ImageItem } *************** *** 112,126 **** % Detect a maximal run of non-repeated data. dup length 4 sub 0 exch 1 exch ! { 2 copy get ! dup 3 index 3 index 1 add get eq ! { dup 3 index 3 index 2 add get eq ! { dup 3 index 3 index 3 add get eq ! { pop exit ! } if ! } if ! } if ! pop pop } for 1 add 1 index 0 2 index getinterval writedata --- 114,122 ---- % Detect a maximal run of non-repeated data. dup length 4 sub 0 exch 1 exch ! { 2 copy 3 getinterval 2 index 2 index 1 add 3 getinterval ! eq { exit } if pop } for + dup type /stringtype eq { exit } if % no repetition found 1 add 1 index 0 2 index getinterval writedata diff -rNC2 gs261/readme.doc gs262/readme.doc *** gs261/readme.doc Fri May 28 18:40:08 1993 --- gs262/readme.doc Wed Apr 19 18:20:47 1995 *************** *** 20,24 **** This file, readme.doc, describes problems and new features in the ! current release of Ghostscript. This file describes version 2.6.1 of Ghostscript. --- 20,24 ---- This file, readme.doc, describes problems and new features in the ! current release of Ghostscript. This file describes version 2.6.2 of Ghostscript. diff -rNC2 gs261/unix-ansi.mak gs262/unix-ansi.mak *** gs261/unix-ansi.mak Sat May 29 11:20:37 1993 --- gs262/unix-ansi.mak Wed Apr 19 18:09:56 1995 *************** *** 1078,1082 **** # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) --- 1078,1082 ---- # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=4 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) *************** *** 1110,1113 **** --- 1110,1114 ---- # + ljet2p H-P LaserJet IId/IIp/III* with TIFF compression # + ljet3 H-P LaserJet III* with Delta Row compression + # + ljet4 H-P LaserJet 4 (defaults to 600 dpi) # + ljetplus H-P LaserJet Plus # * m8510 C.Itoh M8510 printer *************** *** 1132,1138 **** # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format - # gifmono Monochrome GIF file format - # gif8 8-bit color GIF file format # pcxmono Monochrome PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) --- 1133,1138 ---- # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format # pcxmono Monochrome PCX file format + # pcxgray 8-bit gray scale PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) *************** *** 1436,1439 **** --- 1436,1444 ---- $(SHP)gssetdev ljet3 $(HPMONO) + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series. + + ljet4.dev: $(HPMONO) + $(SHP)gssetdev ljet4 $(HPMONO) + ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -### ### Note: there are two different 500C drivers, both contributed by users.### *************** *** 1517,1525 **** ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### --- 1522,1530 ---- ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp.$(OBJ): gdevescp.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### *************** *** 1716,1727 **** # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy. No - # routines are used from either of these two libraries. If you - # do not have libXmu.a or libXext.a, simply remove these two lines - # from the Makefile. x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext # See the main makefile for the definition of XINCLUDE. --- 1721,1728 ---- # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xext X11 # See the main makefile for the definition of XINCLUDE. *************** *** 1767,1791 **** $(SHP)gssetdev bmp16m $(bmp_) - ### ------------------------- GIF file formats ------------------------- ### - - GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) - - gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) - - gifmono.dev: $(GIF) - $(SHP)gssetdev gifmono $(GIF) - - gif8.dev: $(GIF) - $(SHP)gssetdev gif8 $(GIF) - ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) pcx16.dev: $(pcx_) $(SHP)gssetdev pcx16 $(pcx_) --- 1768,1783 ---- $(SHP)gssetdev bmp16m $(bmp_) ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) + pcxgray.dev: $(pcx_) + $(SHP)gssetdev pcxgray $(pcx_) + pcx16.dev: $(pcx_) $(SHP)gssetdev pcx16 $(pcx_) *************** *** 1882,1886 **** gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi --- 1874,1878 ---- gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(gsutil_h) $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi *************** *** 1940,1949 **** exdir=$(gsdatadir)/examples ! install: gs -mkdir $(bindir) ! for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 -mkdir $(docdir) 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 --- 1932,1941 ---- exdir=$(gsdatadir)/examples ! install: $(GS) -mkdir $(bindir) ! for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) 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 diff -rNC2 gs261/unix-cc.mak gs262/unix-cc.mak *** gs261/unix-cc.mak Sat May 29 11:20:38 1993 --- gs262/unix-cc.mak Wed Apr 19 18:09:56 1995 *************** *** 1073,1077 **** # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) --- 1073,1077 ---- # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=4 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) *************** *** 1105,1108 **** --- 1105,1109 ---- # + ljet2p H-P LaserJet IId/IIp/III* with TIFF compression # + ljet3 H-P LaserJet III* with Delta Row compression + # + ljet4 H-P LaserJet 4 (defaults to 600 dpi) # + ljetplus H-P LaserJet Plus # * m8510 C.Itoh M8510 printer *************** *** 1127,1133 **** # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format - # gifmono Monochrome GIF file format - # gif8 8-bit color GIF file format # pcxmono Monochrome PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) --- 1128,1133 ---- # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format # pcxmono Monochrome PCX file format + # pcxgray 8-bit gray scale PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) *************** *** 1431,1434 **** --- 1431,1439 ---- $(SHP)gssetdev ljet3 $(HPMONO) + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series. + + ljet4.dev: $(HPMONO) + $(SHP)gssetdev ljet4 $(HPMONO) + ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -### ### Note: there are two different 500C drivers, both contributed by users.### *************** *** 1512,1520 **** ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### --- 1517,1525 ---- ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp.$(OBJ): gdevescp.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### *************** *** 1711,1722 **** # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy. No - # routines are used from either of these two libraries. If you - # do not have libXmu.a or libXext.a, simply remove these two lines - # from the Makefile. x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext # See the main makefile for the definition of XINCLUDE. --- 1716,1723 ---- # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xext X11 # See the main makefile for the definition of XINCLUDE. *************** *** 1762,1786 **** $(SHP)gssetdev bmp16m $(bmp_) - ### ------------------------- GIF file formats ------------------------- ### - - GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) - - gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) - - gifmono.dev: $(GIF) - $(SHP)gssetdev gifmono $(GIF) - - gif8.dev: $(GIF) - $(SHP)gssetdev gif8 $(GIF) - ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) pcx16.dev: $(pcx_) $(SHP)gssetdev pcx16 $(pcx_) --- 1763,1778 ---- $(SHP)gssetdev bmp16m $(bmp_) ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) + pcxgray.dev: $(pcx_) + $(SHP)gssetdev pcxgray $(pcx_) + pcx16.dev: $(pcx_) $(SHP)gssetdev pcx16 $(pcx_) *************** *** 1877,1881 **** gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi --- 1869,1873 ---- gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(gsutil_h) $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi *************** *** 1935,1944 **** exdir=$(gsdatadir)/examples ! install: gs -mkdir $(bindir) ! for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 -mkdir $(docdir) 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 --- 1927,1936 ---- exdir=$(gsdatadir)/examples ! install: $(GS) -mkdir $(bindir) ! for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) 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 diff -rNC2 gs261/unix-gcc.mak gs262/unix-gcc.mak *** gs261/unix-gcc.mak Sat May 29 11:20:38 1993 --- gs262/unix-gcc.mak Wed Apr 19 18:09:56 1995 *************** *** 1080,1084 **** # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) --- 1080,1084 ---- # * sonyfb Sony Microsystems monochrome display [Sony only] # * sunview SunView window system [SunOS only] ! # x11 X Windows version 11, release >=4 [Unix and VMS only] # Printers: # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) *************** *** 1112,1115 **** --- 1112,1116 ---- # + ljet2p H-P LaserJet IId/IIp/III* with TIFF compression # + ljet3 H-P LaserJet III* with Delta Row compression + # + ljet4 H-P LaserJet 4 (defaults to 600 dpi) # + ljetplus H-P LaserJet Plus # * m8510 C.Itoh M8510 printer *************** *** 1134,1140 **** # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format - # gifmono Monochrome GIF file format - # gif8 8-bit color GIF file format # pcxmono Monochrome PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) --- 1135,1140 ---- # bmp256 8-bit (256-color) .BMP file format # bmp16m 24-bit .BMP file format # pcxmono Monochrome PCX file format + # pcxgray 8-bit gray scale PCX file format # pcx16 Older color PCX file format (EGA/VGA, 16-color) # pcx256 Newer color PCX file format (256-color) *************** *** 1438,1441 **** --- 1438,1446 ---- $(SHP)gssetdev ljet3 $(HPMONO) + ### Selecting ljet4 also provides Delta Row compression on LaserJet IV series. + + ljet4.dev: $(HPMONO) + $(SHP)gssetdev ljet4 $(HPMONO) + ###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -### ### Note: there are two different 500C drivers, both contributed by users.### *************** *** 1519,1527 **** ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### --- 1524,1532 ---- ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### ! escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ) escp2.dev: $(escp2_) $(SHP)gssetdev escp2 $(escp2_) ! gdevescp.$(OBJ): gdevescp.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### *************** *** 1718,1729 **** # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). - # NOTE: Xmu and Xext are here to keep Sun's dynamic linker happy. No - # routines are used from either of these two libraries. If you - # do not have libXmu.a or libXext.a, simply remove these two lines - # from the Makefile. x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xmu X11 Xext # See the main makefile for the definition of XINCLUDE. --- 1723,1730 ---- # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ) x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xt Xext X11 # See the main makefile for the definition of XINCLUDE. *************** *** 1769,1793 **** $(SHP)gssetdev bmp16m $(bmp_) - ### ------------------------- GIF file formats ------------------------- ### - - GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) - - gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) - - gifmono.dev: $(GIF) - $(SHP)gssetdev gifmono $(GIF) - - gif8.dev: $(GIF) - $(SHP)gssetdev gif8 $(GIF) - ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) pcx16.dev: $(pcx_) $(SHP)gssetdev pcx16 $(pcx_) --- 1770,1785 ---- $(SHP)gssetdev bmp16m $(bmp_) ### ------------------------- PCX file formats ------------------------- ### pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) ! gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h) pcxmono.dev: $(pcx_) $(SHP)gssetdev pcxmono $(pcx_) + pcxgray.dev: $(pcx_) + $(SHP)gssetdev pcxgray $(pcx_) + pcx16.dev: $(pcx_) $(SHP)gssetdev pcx16 $(pcx_) *************** *** 1884,1888 **** gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi --- 1876,1880 ---- gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(gsutil_h) $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi *************** *** 1942,1951 **** exdir=$(gsdatadir)/examples ! install: gs -mkdir $(bindir) ! for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 -mkdir $(docdir) 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 --- 1934,1943 ---- exdir=$(gsdatadir)/examples ! install: $(GS) -mkdir $(bindir) ! for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) 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 diff -rNC2 gs261/unixtail.mak gs262/unixtail.mak *** gs261/unixtail.mak Sat May 29 02:42:34 1993 --- gs262/unixtail.mak Mon Jun 28 13:08:04 1993 *************** *** 43,47 **** gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi --- 43,47 ---- gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \ ! $(gsutil_h) $(stat__h) $(time__h) if ( test -f /usr/include/sys/time.h ) then $(CCC) gp_unix.c;\ else $(CCC) -DNOSYSTIME gp_unix.c; fi *************** *** 101,110 **** exdir=$(gsdatadir)/examples ! install: gs -mkdir $(bindir) ! for f in gs gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 -mkdir $(docdir) 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 --- 101,110 ---- exdir=$(gsdatadir)/examples ! install: $(GS) -mkdir $(bindir) ! for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done -mkdir $(datadir) -mkdir $(gsdatadir) ! 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 type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) 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 diff -rNC2 gs261/use.doc gs262/use.doc *** gs261/use.doc Sat May 29 02:42:02 1993 --- gs262/use.doc Sun Jul 18 10:52:50 1993 *************** *** 1,3 **** ! Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. --- 1,3 ---- ! Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 287,290 **** --- 287,297 ---- appropriate for the operating system (':' on Unix systems, ';' on VMS systems, ';' on MS-DOS systems). + + When Ghostscript starts up, it also looks at the GS_FONTPATH environment + variable, which is also a list of directories. It goes to those + directories and looks for all files that appear to contain PostScript + fonts; it then effectively adds all those files and fonts to its internal + copy of the Fontmap (the catalog of fonts and the files that contain + them). Temporary files diff -rNC2 gs261/vms-cc.mak gs262/vms-cc.mak *** gs261/vms-cc.mak Wed May 12 18:33:08 1993 --- gs262/vms-cc.mak Thu Jul 8 11:55:20 1993 *************** *** 152,156 **** IALLOC IBNUM - IBSCAN ICCFONT IDEBUG --- 152,155 ---- *************** *** 162,165 **** --- 161,165 ---- ISAVE ISCAN + ISCAN2 IUTIL SBITS *************** *** 264,271 **** $ CC'CDEF/NOLIST/OBJECT=GDEVX.OBJ GDEVX.C $ ! $ CC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C $ ! $ CC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GCONFIG,- GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,- --- 264,273 ---- $ CC'CDEF/NOLIST/OBJECT=GDEVX.OBJ GDEVX.C $ ! + $ CC'CDEF/NOLIST/OBJECT=GDEVXXF.OBJ GDEVXXF.C + $ ! $ CC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C $ ! $ CC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GDEVXXF,GCONFIG,- GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,- *************** *** 276,280 **** SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE $ ! ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,- GCONFIG.OBJ.* $ ! --- 278,282 ---- SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE $ ! ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GDEVXXF.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,- GCONFIG.OBJ.* $ ! diff -rNC2 gs261/vms-gcc.mak gs262/vms-gcc.mak *** gs261/vms-gcc.mak Wed May 12 18:33:12 1993 --- gs262/vms-gcc.mak Thu Jul 8 11:55:32 1993 *************** *** 158,162 **** IALLOC IBNUM - IBSCAN ICCFONT IDEBUG --- 158,161 ---- *************** *** 168,171 **** --- 167,171 ---- ISAVE ISCAN + ISCAN2 IUTIL SBITS *************** *** 264,273 **** $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") - /OBJECT=GDEVXINI.OBJ GDEVXINI.C ! $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON")/OBJECT=GDEVX.OBJ - ! GDEVX.C $ GCC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C $ ! $ GCC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GCONFIG,- GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,- --- 264,275 ---- $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") - /OBJECT=GDEVXINI.OBJ GDEVXINI.C ! $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") - ! /OBJECT=GDEVX.OBJ GDEVX.C ! $ GCC'CDEF/NOLIST/INCLUDE_DIRECTORY='F$TRNLNM("SYS$COMMON") - ! /OBJECT=GDEVXXF.OBJ GDEVXXF.C $ GCC'CDEF/NOLIST/OBJECT=GSMAIN.OBJ GSMAIN.C $ ! $ GCC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C ! $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,GDEVX,GDEVXINI,GDEVXXF,GCONFIG,- GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,GXCLREAD,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCOLOR2,ZCONTROL,ZDEVICE,ZDPS1,- *************** *** 278,282 **** SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE $ ! ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,- GCONFIG.OBJ.* $ ! --- 280,284 ---- SYS$SHARE:DECW$DWTLIBSHR/SHARE,SYS$SHARE:DECW$XLIBSHR.EXE/SHARE $ ! ! $ DELETE GDEVX.OBJ.*,GDEVXINI.OBJ.*,GDEVXXF.OBJ.*,GSMAIN.OBJ.*,GS.OBJ.*,- GCONFIG.OBJ.* $ ! diff -rNC2 gs261/watc.mak gs262/watc.mak *** gs261/watc.mak Tue May 25 08:20:06 1993 --- gs262/watc.mak Wed Apr 19 18:09:42 1995 *************** *** 132,136 **** DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev ! DEVICE_DEVS8=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev bit.dev !include gs.mak !include devs.mak --- 132,136 ---- DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev ! DEVICE_DEVS8=pcxmono.dev pcx16.dev pcx256.dev bit.dev !include gs.mak !include devs.mak diff -rNC2 gs261/watcwin.mak gs262/watcwin.mak *** gs261/watcwin.mak Thu May 27 18:21:16 1993 --- gs262/watcwin.mak Wed Apr 19 18:09:46 1995 *************** *** 130,134 **** DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev ! DEVICE_DEVS8=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev bit.dev !include gs.mak !include devs.mak --- 130,134 ---- DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev ! DEVICE_DEVS8=pcxmono.dev pcx16.dev pcx256.dev bit.dev !include gs.mak !include devs.mak diff -rNC2 gs261/x_.h gs262/x_.h *** gs261/x_.h Wed May 12 18:33:48 1993 --- gs262/x_.h Thu Jun 10 09:51:40 1993 *************** *** 109,112 **** --- 109,113 ---- # include + # include # include # include *************** *** 118,121 **** --- 119,123 ---- # include + # include # include # include diff -rNC2 gs261/zht2.c gs262/zht2.c *** gs261/zht2.c Wed May 12 18:35:20 1993 --- gs262/zht2.c Thu Jul 8 11:58:14 1993 *************** *** 22,25 **** --- 22,26 ---- #include "errors.h" #include "oper.h" + #include "alloc.h" #include "dict.h" #include "dparam.h"