home *** CD-ROM | disk | FTP | other *** search
- Ghostscript 2.6.1 Patch #4
-
-
- To apply this patch:
-
- cd to the directory containing the ghostscript source and do:
- patch -s < ThisFile
- Patch will work silently unless an error occurs.
- If you want to watch patch do its thing, leave out the "-s" argument to patch.
-
- See the readme.fix file for a summary of the fixes.
-
- Prereq: 7/18/93
-
- *** 1.3 1993/07/21 02:17:53
- --- readme.fix 1993/07/20 10:28:00
- ***************
- *** 7,13 ****
- Fixes for Ghostscript 2.6.1
- ---------------------------
-
- ! (last update: 7/18/93)
-
- This file summarizes a number of important quality fixes for Ghostscript
- 2.6.1. The fixes are supplied in the form of replacements for
- --- 7,13 ----
- Fixes for Ghostscript 2.6.1
- ---------------------------
-
- ! (last update: 7/20/93)
-
- This file summarizes a number of important quality fixes for Ghostscript
- 2.6.1. The fixes are supplied in the form of replacements for
- ***************
- *** 329,331 ****
- --- 329,341 ----
- startup time.
- Files affected:
- gs_fonts.ps, fonts.doc, use.doc
- +
- + ---------------- Fixes up to here distributed 7/18/93 ----------------
- +
- + 7/20/93
- + -------
- +
- + Problem:
- + gdevdjet.c was omitted from the previous patch distribution.
- +
- + ---------------- ALL fixes up to here distributed 7/20/93 ----------------
- *** 1.1 1993/07/21 00:33:27
- --- gdevdjet.c 1993/06/29 00:56:32
- ***************
- *** 28,36 ****
- */
-
- /*
- ! * 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
- * the European A4 size; otherwise it is the U.S. letter size (8.5"x11").
- --- 28,36 ----
- */
-
- /*
- ! * 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
- * the European A4 size; otherwise it is the U.S. letter size (8.5"x11").
- ***************
- *** 69,85 ****
- showpage
-
- */
- - /*#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
-
- /*
- --- 69,87 ----
- showpage
-
- */
-
- ! /* 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
-
- /*
- ***************
- *** 112,132 ****
- #define LASERJET_MARGINS_A4 0.25, 0.20, 0.25, 0.00
- #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. */
- #define MIN_SKIP_LINES 7
-
- /* 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 */
- #define LJ 0
- --- 114,125 ----
- ***************
- *** 135,140 ****
- --- 128,134 ----
- #define LJ3 3
- #define DJ 4
- #define DJ500 5
- + #define LJ4 6
-
- /*
- * The notion that there is such a thing as a "PCL printer" is a fiction:
- ***************
- *** 154,175 ****
- /* (includes mode 2) */
- } 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);
- private dev_proc_print_page(djet_print_page);
- --- 148,153 ----
- ***************
- *** 178,183 ****
- --- 156,162 ----
- private dev_proc_print_page(ljetplus_print_page);
- 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 =
- prn_matrix_procs(hpjet_open, gdev_pcl_get_initial_matrix,
- ***************
- *** 225,232 ****
- 0.20, 0.25, 0.25, 0.25, /* margins */
- 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. */
- private int
- --- 204,218 ----
- 0.20, 0.25, 0.25, 0.25, /* margins */
- 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. */
- private int
- ***************
- *** 261,300 ****
- /* The DeskJet can compress (mode 2) */
- 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);
- }
-
- /* Send the page to the printer. For speed, compress each scan line, */
- /* since computer-to-printer communication time is often a bottleneck. */
- 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;
- uint storage_size_words = line_size_words * 8; /* data, out_row, out_row_alt, prev_row */
- --- 247,302 ----
- /* The DeskJet can compress (mode 2) */
- 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);
- }
-
- /* Send the page to the printer. For speed, compress each scan line, */
- /* since computer-to-printer communication time is often a bottleneck. */
- 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;
- uint storage_size_words = line_size_words * 8; /* data, out_row, out_row_alt, prev_row */
- ***************
- *** 311,317 ****
- #define prev_row ((char *)prev_row_words)
- 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;
- static const char *from2to3 = "\033*b3M";
- --- 313,319 ----
- #define prev_row ((char *)prev_row_words)
- 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;
- static const char *from2to3 = "\033*b3M";
- ***************
- *** 339,345 ****
- { fprintf(prn_stream, "\033&l%dA", paper_size);
- }
- fputs("\033&l0o0e0L", prn_stream);
- ! fputs(init_strings[ptype], prn_stream);
-
- /* Send each scan line in turn */
- { int lnum;
- --- 341,347 ----
- { fprintf(prn_stream, "\033&l%dA", paper_size);
- }
- fputs("\033&l0o0e0L", prn_stream);
- ! fputs(init_string, prn_stream);
-
- /* Send each scan line in turn */
- { int lnum;
- ***************
- *** 458,468 ****
- }
- }
-
- ! /* end raster graphics */
- ! fputs("\033*rB", prn_stream);
- !
- ! /* eject page */
- ! fputs("\033&l0H", prn_stream);
-
- /* free temporary storage */
- gs_free((char *)storage, storage_size_words, W, "hpjet_print_page");
- --- 460,467 ----
- }
- }
-
- ! /* end raster graphics and eject page */
- ! fputs("\033*rB\f", prn_stream);
-
- /* free temporary storage */
- gs_free((char *)storage, storage_size_words, W, "hpjet_print_page");
-