home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR16
/
GS261P.ZIP
/
GS261P1.FIX
next >
Wrap
Text File
|
1993-06-27
|
50KB
|
1,534 lines
Ghostscript 2.6.1 Patch #1
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.
*** /dev/null Sun Jun 27 07:26:01 1993
--- readme.fix Thu Jun 17 11:18:48 1993
***************
*** 0 ****
--- 1,118 ----
+ Copyright (C) 1993 Aladdin Enterprises. All rights reserved.
+
+ This file is part of Ghostscript; it is licensed under the same terms
+ as the rest of Ghostscript. If you do not have Ghostscript, you do
+ not have the right to have this file.
+
+ Fixes for Ghostscript 2.6.1
+ ---------------------------
+
+ (last update: 6/14/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
+ corresponding files in the 2.6.1 release. Please report any problems.
+
+ 6/5/93
+ ------
+
+ Problem:
+ The Unix install script used gs rather than $(GS) as the name of
+ the executable.
+ The Unix install script didn't copy gs_dbt_e.ps to $(gsdatadir).
+ Files affected:
+ unixtail.mak (and unix-*.mak, built from it using tar_cat)
+
+ Problem:
+ The ps2ascii script still referenced ps2ascii.ps under its
+ old name gs_2asc.ps.
+ Files affected:
+ ps2ascii
+
+ Problem:
+ 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 got a typecheck if a scan line had no repeated
+ data in it anywhere.
+ Files affected:
+ ps2image.ps
+
+ Problem:
+ rectfill drew rectangles with vertices specified in clockwise
+ order as 0-width lines.
+ Files affected:
+ gsdps1.c
+
+ Problem:
+ The string matching function reported that 'abcdefg'
+ matched the pattern 'abcde'.
+ Files affected:
+ gsutil.c
+
+ Problem:
+ 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.
+ Fix:
+ Have gx_path_intersect set the `setbbox' flag if the new clipping
+ path is not rectangular.
+ Files affected:
+ gxcpath.c
+
+ 6/9/93
+ ------
+
+ Problem:
+ The PCX driver didn't offer a gray-scale option.
+ Fix:
+ Implement one.
+ Files affected:
+ devs.mak
+ gdevpcx.c
+
+ 6/10/93
+ -------
+
+ Problem:
+ Colors with equal R/G/B or C/M/Y components were converted to
+ gray before being mapped through the transfer function.
+ Files affected:
+ gxcmap.c
+
+ 6/11/93
+ -------
+
+ Problem:
+ Faulty X servers could generate bogus errors on XFreeColors.
+ Fix:
+ Catch and ignore the errors.
+ Files affected:
+ gdevxini.c
+ x_.h
+
+ Problem:
+ X driver gave up on color allocation too easily.
+ X driver dynamic color table size could become negative.
+ Files affected:
+ gdevx.c
+
+ Problem:
+ x_lookup_font could return platform fonts of very small
+ sizes, which have very inaccurate metrics.
+ Fix:
+ Don't return fonts of size 4 pixels or smaller.
+ Files affected:
+ gdevxxf.c
+
+ 6/14/93
+ -------
+
+ Problem:
+ 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.
+ Fix:
+ Change it to use rc_alloc_struct_1 rather than rc_alloc_1.
+ Files affected:
+ gxrefct.h
*** 1.1 1993/06/27 12:24:14
--- devs.mak 1993/06/09 08:27:08
***************
*** 108,113 ****
--- 108,114 ----
# gifmono Monochrome GIF file format
# gif8 8-bit color GIF 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)
# pbm Portable Bitmap (plain format)
***************
*** 756,765 ****
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_)
--- 757,769 ----
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_)
*** 1.1 1993/06/27 12:24:14
--- gdevpcx.c 1993/06/01 12:21:26
***************
*** 1,4 ****
! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved.
This file is part of Ghostscript.
--- 1,4 ----
! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved.
This file is part of Ghostscript.
***************
*** 20,25 ****
--- 20,26 ----
/* PCX file format devices for Ghostscript */
#include "gdevprn.h"
#include "gdevpccm.h"
+ #include "gxlum.h"
/* Thanks to Phil Conrad for donating the original version */
/* of these drivers to Aladdin Enterprises. */
***************
*** 43,48 ****
--- 44,66 ----
0,0,0,0, /* margins */
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. */
private dev_proc_print_page(pcx16_print_page);
***************
*** 60,67 ****
/* Chunky 8-bit (SuperVGA-style) color. */
/* (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,
pc_8bit_map_rgb_color, pc_8bit_map_color_rgb);
--- 78,83 ----
***************
*** 116,121 ****
--- 132,149 ----
private void pcx_write_rle(P3(const byte *, const byte *, FILE *));
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.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 an "old" PCX page. */
static const byte ega_palette[16*3] = {
0x00,0x00,0x00, 0x00,0x00,0xaa, 0x00,0xaa,0x00, 0x00,0xaa,0xaa,
***************
*** 153,173 ****
return code;
}
- /* 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)
--- 181,189 ----
return code;
}
/* 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)
***************
*** 270,275 ****
--- 286,315 ----
}
/* ------ 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. */
private void
*** 1.1 1993/06/27 12:24:14
--- gdevx.c 1993/06/01 12:15:22
***************
*** 191,197 ****
if (xdev->ghostview) x_send_event(dev, xdev->done);
if (xdev->vinfo) {
! XFree(xdev->vinfo);
xdev->vinfo = NULL;
}
if (xdev->dither_colors) {
--- 191,197 ----
if (xdev->ghostview) x_send_event(dev, xdev->done);
if (xdev->vinfo) {
! XFree((char *)xdev->vinfo);
xdev->vinfo = NULL;
}
if (xdev->dither_colors) {
*** 1.1 1993/06/27 12:24:14
--- gdevxini.c 1993/06/12 03:46:54
***************
*** 140,145 ****
--- 140,169 ----
private void gdev_x_setup_colors(P1(gx_device_X *));
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 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);
+ }
+
+ private int
+ x_catch_free_colors(Display *dpy, XErrorEvent *err)
+ {
+ if (err->request_code == X_FreeColors) return 0;
+ return oldhandler(dpy, err);
+ }
+
/* Open the X device */
int
gdev_x_open(register gx_device_X *xdev)
***************
*** 299,304 ****
--- 323,332 ----
exit(1);
}
/* Get X Resources. Use the toolkit for this. */
+ #if !defined(XtSpecificationRelease) || XtSpecificationRelease < 5
+ /* R4 and earlier toolkits may cause a Bad Access on XFreeColors. */
+ oldhandler = XSetErrorHandler(x_catch_free_colors);
+ #endif
XtToolkitInitialize();
app_con = XtCreateApplicationContext();
dpy = XtOpenDisplay(app_con, NULL, "ghostscript", "Ghostscript",
***************
*** 310,315 ****
--- 338,346 ----
XtDestroyWidget(toplevel);
XtCloseDisplay(dpy);
XtDestroyApplicationContext(app_con);
+ #if !defined(XtSpecificationRelease) || XtSpecificationRelease < 5
+ oldhandler = XSetErrorHandler(oldhandler);
+ #endif
gdev_x_setup_colors(xdev);
gdev_x_setup_fontmap(xdev);
***************
*** 449,471 ****
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
gdev_x_clear_window(gx_device_X *xdev)
--- 480,485 ----
***************
*** 614,631 ****
#define cube(r) (r*r*r)
#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 =
--- 628,641 ----
#define cube(r) (r*r*r)
#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 =
***************
*** 655,666 ****
} 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");
--- 665,681 ----
} else {
int i;
! ramp_size--;
! oldhandler =
! XSetErrorHandler(x_catch_free_colors);
! for (i = 1; i < cube_index(r, g, b); i++) {
XFreeColors(xdev->dpy, xdev->cmap,
&(xdev->dither_colors[i]),
1, 0);
}
+ /* Force any errors */
+ XSync(xdev->dpy, False);
+ oldhandler = XSetErrorHandler(oldhandler);
gs_free((char *)xdev->dither_colors,
sizeof(x_pixel), cube(ramp_size),
"gdev_x_rgb_cube");
***************
*** 682,689 ****
/* 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,
--- 697,704 ----
/* 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 -
! cube(xdev->color_info.dither_rgb));
if (xdev->dynamic_size) {
xdev->dynamic_colors =
(XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
***************
*** 710,727 ****
/* colormap, the user specified maxGrayRamp (usually 128), */
/* 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,
--- 725,737 ----
/* colormap, the user specified maxGrayRamp (usually 128), */
/* 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,
***************
*** 739,749 ****
if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) {
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");
--- 749,763 ----
if (XAllocColor(xdev->dpy, xdev->cmap, &xc)) {
xdev->dither_colors[i] = xc.pixel;
} else {
! int j = i;
! ramp_size /= 2;
! oldhandler = XSetErrorHandler(x_catch_free_colors);
! for (i = 1; i < j; i++) {
XFreeColors(xdev->dpy, xdev->cmap,
&(xdev->dither_colors[i]), 1, 0);
}
+ XSync(xdev->dpy, False); /* Force any errors */
+ oldhandler = XSetErrorHandler(oldhandler);
gs_free((char *)xdev->dither_colors,
sizeof(x_pixel), ramp_size,
"gdev_x_gray_ramp");
***************
*** 762,769 ****
/* 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,
--- 776,783 ----
/* 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->color_info.dither_gray);
if (xdev->dynamic_size) {
xdev->dynamic_colors =
(XColor *) gs_malloc(sizeof(XColor), xdev->dynamic_size,
*** 1.1 1993/06/27 12:24:14
--- gdevxxf.c 1993/06/06 14:03:48
***************
*** 105,110 ****
--- 105,113 ----
return NULL;
}
+ /* Don't do very small fonts. Font metrics are way off due to rounding */
+ if (xwidth <= 4 || xheight <= 4) return NULL;
+
if (encoding_index == 0 || encoding_index == 1) {
int tried_other_encoding = 0;
*** 1.1 1993/06/27 12:24:14
--- gsdps1.c 1993/05/31 23:00:48
***************
*** 71,77 ****
int code;
/* 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 ||
(code = gs_lineto(pgs, qx, qy)) < 0 ||
--- 71,77 ----
int code;
/* 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 ||
(code = gs_lineto(pgs, qx, qy)) < 0 ||
*** 1.1 1993/06/27 12:24:14
--- gsutil.c 1993/06/02 19:25:44
***************
*** 53,90 ****
string_match(const byte *str, uint len, const byte *pstr, uint plen,
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;
}
else if ( ch == psmp->quote_next )
{ if ( ++p == pend ) return 1; /* bad pattern */
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;
}
--- 53,101 ----
string_match(const byte *str, uint len, const byte *pstr, uint plen,
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;
}
else if ( ch == psmp->quote_next )
{ if ( ++p == pend ) return 1; /* bad pattern */
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;
}
*** 1.1 1993/06/27 12:24:14
--- gxcmap.c 1993/06/11 00:13:32
***************
*** 1,4 ****
! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved.
This file is part of Ghostscript.
--- 1,4 ----
! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved.
This file is part of Ghostscript.
***************
*** 21,32 ****
--- 21,36 ----
#include "gx.h"
#include "gserrors.h"
#include "gscspace.h"
+ #include "gxarith.h"
#include "gxfrac.h"
#include "gxlum.h"
#include "gxcolor.h"
#include "gxdevice.h"
#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. */
/* This is needed because map_rgb_color still uses gx_color_value. */
***************
*** 147,168 ****
frac cmyk[4])
{ 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;
}
/* Convert CMYK to Gray. */
--- 151,185 ----
frac cmyk[4])
{ 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]);
}
/* Convert CMYK to Gray. */
***************
*** 199,204 ****
--- 216,223 ----
rgb[2] = deduct_black(y);
}
}
+ 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]);
}
/* ------ Device color rendering ------ */
***************
*** 207,217 ****
private cmap_proc_gray(cmap_gray_direct);
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);
private cmap_proc_cmyk(cmap_cmyk_to_rgb);
--- 226,236 ----
private cmap_proc_gray(cmap_gray_direct);
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);
private cmap_proc_cmyk(cmap_cmyk_to_rgb);
***************
*** 260,266 ****
/* Color remappers for the standard color spaces. */
#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,
gx_device_color *pdc, gs_state *pgs)
--- 279,285 ----
/* Color remappers for the standard color spaces. */
#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,
gx_device_color *pdc, gs_state *pgs)
***************
*** 308,315 ****
{ gx_render_gray(mgray, pdc, pgs);
return;
}
! pdc->color1 = pdc->color2 = color;
! pdc->halftone_level = 0;
}
private void
--- 327,333 ----
{ gx_render_gray(mgray, pdc, pgs);
return;
}
! color_set_pure(pdc, color);
}
private void
***************
*** 329,371 ****
/* 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);
}
private void
--- 347,386 ----
/* 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);
}
private void
***************
*** 384,424 ****
/* 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);
}
private void
--- 399,431 ----
/* 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);
! }
}
private void
*** 1.1 1993/06/27 12:24:14
--- gxcpath.c 1993/06/06 07:11:42
***************
*** 212,217 ****
--- 212,221 ----
pcpath->path.bbox.p.y = int2fixed(adev.bbox.p.y);
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.. */
/* to return true. This, in turn, requires that */
*** 1.1 1993/06/27 12:24:14
--- gxrefct.h 1993/06/14 22:46:06
***************
*** 74,80 ****
#define rc_unshare(vp, stype, mprocs, errstat, cname)\
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;\
}
--- 74,80 ----
#define rc_unshare(vp, stype, mprocs, errstat, cname)\
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;\
}
*** 1.1 1993/06/27 12:24:14
--- ps2ascii 1993/06/01 13:42:38
***************
*** 5,13 ****
# If both infile and outfile are omitted, ps2ascii acts as a filter,
# 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
--- 5,13 ----
# If both infile and outfile are omitted, ps2ascii acts as a filter,
# 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
*** 1.1 1993/06/27 12:24:14
--- ps2image.ps 1993/06/02 23:27:20
***************
*** 37,56 ****
% 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
32 sub 3 index exch 0 exch getinterval 2 index exch
--- 37,58 ----
% 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
32 sub 3 index exch 0 exch getinterval 2 index exch
***************
*** 61,67 ****
exch 0 exch getinterval
} bind } repeat
160 { { pop .ImageItem } } repeat
! 256 array astore readonly def
} def
% Read one item from a compressed image.
--- 63,69 ----
exch 0 exch getinterval
} bind } repeat
160 { { pop .ImageItem } } repeat
! ] readonly def
} def
% Read one item from a compressed image.
***************
*** 79,85 ****
clippath pathbbox pop pop translate
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 }
4 index 7 add 8 idiv string currentfile ()
--- 81,87 ----
clippath pathbbox pop pop translate
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 }
4 index 7 add 8 idiv string currentfile ()
***************
*** 111,127 ****
{ { dup length 4 lt { exit } if
% 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
1 index length 1 index sub getinterval
--- 113,123 ----
{ { dup length 4 lt { exit } if
% 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
1 index length 1 index sub getinterval
*** 1.1 1993/06/27 12:24:55
--- unix-ansi.mak 1993/06/27 12:26:06
***************
*** 1134,1139 ****
--- 1134,1140 ----
# gifmono Monochrome GIF file format
# gif8 8-bit color GIF 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)
# pbm Portable Bitmap (plain format)
***************
*** 1782,1792 ****
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_)
--- 1783,1796 ----
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_)
***************
*** 1881,1887 ****
$(SHP)gsaddmod unix_ -fdev pipe
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
--- 1885,1891 ----
$(SHP)gsaddmod unix_ -fdev pipe
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
***************
*** 1939,1950 ****
docdir=$(gsdatadir)/doc
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
-mkdir $(exdir)
--- 1943,1954 ----
docdir=$(gsdatadir)/doc
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 type1enc.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
-mkdir $(exdir)
*** 1.1 1993/06/27 12:24:55
--- unix-cc.mak 1993/06/27 12:26:06
***************
*** 1129,1134 ****
--- 1129,1135 ----
# gifmono Monochrome GIF file format
# gif8 8-bit color GIF 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)
# pbm Portable Bitmap (plain format)
***************
*** 1777,1787 ****
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_)
--- 1778,1791 ----
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_)
***************
*** 1876,1882 ****
$(SHP)gsaddmod unix_ -fdev pipe
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
--- 1880,1886 ----
$(SHP)gsaddmod unix_ -fdev pipe
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
***************
*** 1934,1945 ****
docdir=$(gsdatadir)/doc
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
-mkdir $(exdir)
--- 1938,1949 ----
docdir=$(gsdatadir)/doc
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 type1enc.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
-mkdir $(exdir)
*** 1.1 1993/06/27 12:24:55
--- unix-gcc.mak 1993/06/27 12:26:06
***************
*** 1136,1141 ****
--- 1136,1142 ----
# gifmono Monochrome GIF file format
# gif8 8-bit color GIF 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)
# pbm Portable Bitmap (plain format)
***************
*** 1784,1794 ****
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_)
--- 1785,1798 ----
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_)
***************
*** 1883,1889 ****
$(SHP)gsaddmod unix_ -fdev pipe
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
--- 1887,1893 ----
$(SHP)gsaddmod unix_ -fdev pipe
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
***************
*** 1941,1952 ****
docdir=$(gsdatadir)/doc
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
-mkdir $(exdir)
--- 1945,1956 ----
docdir=$(gsdatadir)/doc
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 type1enc.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
-mkdir $(exdir)
*** 1.1 1993/06/27 12:24:14
--- unixtail.mak 1993/06/03 20:43:16
***************
*** 42,48 ****
$(SHP)gsaddmod unix_ -fdev pipe
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
--- 42,48 ----
$(SHP)gsaddmod unix_ -fdev pipe
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
***************
*** 100,111 ****
docdir=$(gsdatadir)/doc
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
-mkdir $(exdir)
--- 100,111 ----
docdir=$(gsdatadir)/doc
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 type1enc.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
-mkdir $(exdir)
*** 1.1 1993/06/27 12:24:14
--- x_.h 1993/06/10 14:51:40
***************
*** 108,113 ****
--- 108,114 ----
# endif /* ifdef __GNUC__ */
# include <decw$include/Xlib.h>
+ # include <decw$include/Xproto.h>
# include <decw$include/Xatom.h>
# include <decw$include/Xutil.h>
# include <decw$include/Intrinsic.h>
***************
*** 117,122 ****
--- 118,124 ----
#else /* !ifdef VMS */
# include <X11/Xlib.h>
+ # include <X11/Xproto.h>
# include <X11/Xatom.h>
# include <X11/Xutil.h>
# include <X11/Intrinsic.h>