diff options
author | hrs <hrs@FreeBSD.org> | 2007-06-03 13:02:53 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2007-06-03 13:02:53 +0800 |
commit | f1542cb2be1ee02523547a5772c3787054e69858 (patch) | |
tree | ae89080e7769eecc621ddf6c3a9acd85ab56f456 /print/ghostscript8/files | |
parent | c62c7be4adc11d9f087a151756da3d41c46884a1 (diff) | |
download | freebsd-ports-gnome-f1542cb2be1ee02523547a5772c3787054e69858.tar.gz freebsd-ports-gnome-f1542cb2be1ee02523547a5772c3787054e69858.tar.zst freebsd-ports-gnome-f1542cb2be1ee02523547a5772c3787054e69858.zip |
Update to 8.57.
Submitted by: KATO Tsuguru
PR: ports/113009
Diffstat (limited to 'print/ghostscript8/files')
65 files changed, 944 insertions, 5370 deletions
diff --git a/print/ghostscript8/files/bjc250.contrib.mak b/print/ghostscript8/files/bjc250.contrib.mak deleted file mode 100644 index 5c1ce77e98dc..000000000000 --- a/print/ghostscript8/files/bjc250.contrib.mak +++ /dev/null @@ -1,31 +0,0 @@ -### ----------------- The BJC-210/240/250/250ex/265/1000 ---------------- ### - -### -### For questions about the driver, mailto://szaszg@hu.inter.net -### http://bjc250gs.sourceforge.net -### - -bjc_h=$(GLSRC)gdevbjc_.h - -bjc_=$(GLOBJ)gdevbjc_.$(OBJ) $(GLOBJ)gdevbjca.$(OBJ) - -$(GLOBJ)gdevbjc_.$(OBJ) : $(GLSRC)gdevbjc_.c $(PDEVH) $(bjc_h) - $(GLCC) $(GLO_)gdevbjc_.$(OBJ) $(C_) $(GLSRC)gdevbjc_.c - -$(GLOBJ)gdevbjca.$(OBJ) : $(GLSRC)gdevbjca.c $(PDEVH) $(bjc_h) - $(GLCC) $(GLO_)gdevbjca.$(OBJ) $(C_) $(GLSRC)gdevbjca.c - -$(DD)bjcmono.dev : $(bjc_) $(DD)page.dev - $(SETPDEV) $(DD)bjcmono $(bjc_) - -$(DD)bjcgray.dev : $(bjc_) $(DD)page.dev - $(SETPDEV) $(DD)bjcgray $(bjc_) - -$(DD)bjccmyk.dev : $(bjc_) $(DD)page.dev - $(SETPDEV) $(DD)bjccmyk $(bjc_) - -$(DD)bjccolor.dev : $(bjc_) $(DD)page.dev - $(SETPDEV) $(DD)bjccolor $(bjc_) - -### -------------------- The H-P Color LaserJet 5/5M -------------------- ### - diff --git a/print/ghostscript8/files/cdj850.contrib.mak b/print/ghostscript8/files/cdj850.contrib.mak deleted file mode 100644 index 8faefec5fe4e..000000000000 --- a/print/ghostscript8/files/cdj850.contrib.mak +++ /dev/null @@ -1,21 +0,0 @@ -###- cdj850 - HP 850 Driver under development -------- ### -cdeskjet8_=$(GLOBJ)gdevcd8.$(OBJ) $(HPPCL) - -$(DD)cdj670.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj670 $(cdeskjet8_) - -$(DD)cdj850.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj850 $(cdeskjet8_) - -$(DD)cdj880.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj880 $(cdeskjet8_) - -$(DD)cdj890.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj890 $(cdeskjet8_) - -$(DD)cdj1600.dev : $(cdeskjet8_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj1600 $(cdeskjet8_) - -$(GLOBJ)gdevcd8.$(OBJ) : $(GLSRC)gdevcd8.c $(PDEVH) $(math__h)\ - $(gsparam_h) $(gxlum_h) $(gdevpcl_h) - $(GLCC) $(GLO_)gdevcd8.$(OBJ) $(C_) $(GLSRC)gdevcd8.c diff --git a/print/ghostscript8/files/dj970.contrib.mak b/print/ghostscript8/files/dj970.contrib.mak deleted file mode 100644 index 8227012da41a..000000000000 --- a/print/ghostscript8/files/dj970.contrib.mak +++ /dev/null @@ -1,9 +0,0 @@ -###- cdj970 - HP 970Cxi Driver under development -------- ### -cdeskjet9_=$(GLOBJ)gdevdj9.$(OBJ) $(HPPCL) - -$(DD)cdj970.dev : $(cdeskjet9_) $(DD)page.dev - $(SETPDEV2) $(DD)cdj970 $(cdeskjet9_) - -$(GLOBJ)gdevdj9.$(OBJ) : $(GLSRC)gdevdj9.c $(PDEVH) $(math__h) \ - $(gsparam_h) $(gxlum_h) $(gdevpcl_h) - $(GLCC) $(GLO_)gdevdj9.$(OBJ) $(C_) $(GLSRC)gdevdj9.c diff --git a/print/ghostscript8/files/gdevhl12-hl1250.mak b/print/ghostscript8/files/gdevhl12-hl1250.mak deleted file mode 100644 index 8e1421ad1f03..000000000000 --- a/print/ghostscript8/files/gdevhl12-hl1250.mak +++ /dev/null @@ -1,16 +0,0 @@ -### -------------------- The Brother HL-1250 printer -------------------- ### -### This printer is ljet4-compatible, plus support for source tray ### -### selection and special 1200x600 dpi mode. ### - -hl1250_=$(GLOBJ)gdevhl12.$(OBJ) $(HPDLJM) -$(DD)hl1250.dev : $(hl1250_) $(DD)page.dev - $(SETPDEV) $(DD)hl1250 $(hl1250_) - -$(DD)hl1240.dev : $(hl1250_) $(DD)page.dev - $(SETPDEV) $(DD)hl1240 $(hl1250_) - -# Author: Marek Michalkiewicz <marekm@linux.org.pl> -# Printer: Brother HL-1250 (may work with some other models too) -$(GLOBJ)gdevhl12.$(OBJ) : $(GLSRC)gdevhl12.c $(PDEVH) $(gdevdljm_h) - $(GLCC) $(GLO_)gdevhl12.$(OBJ) $(C_) $(GLSRC)gdevhl12.c - diff --git a/print/ghostscript8/files/lex7000.contrib.mak b/print/ghostscript8/files/lex7000.contrib.mak deleted file mode 100644 index a5f1a162b785..000000000000 --- a/print/ghostscript8/files/lex7000.contrib.mak +++ /dev/null @@ -1,21 +0,0 @@ -# ------ The Lexmark 5700 and 7000 devices ------ # - -lex7000_=$(GLOBJ)gdevlx7.$(OBJ) -$(DD)lex7000.dev: $(lex7000_) $(DD)page.dev - $(SETPDEV) $(DD)lex7000 $(lex7000_) - -lex5700_=$(GLOBJ)gdevlx7.$(OBJ) -$(DD)lex5700.dev: $(lex5700_) $(DD)page.dev - $(SETPDEV) $(DD)lex5700 $(lex5700_) - -lex3200_=$(GLOBJ)gdevlx7.$(OBJ) -$(DD)lex3200.dev: $(lex3200_) $(DD)page.dev - $(SETPDEV) $(DD)lex3200 $(lex3200_) - -lex2050_=$(GLOBJ)gdevlx7.$(OBJ) -$(DD)lex2050.dev: $(lex2050_) $(DD)page.dev - $(SETPDEV) $(DD)lex2050 $(lex2050_) - -$(GLOBJ)gdevlx7.$(OBJ): $(GLSRC)gdevlx7.c $(PDEVH) - $(GLCC) $(GLO_)gdevlx7.$(OBJ) $(C_) $(GLSRC)gdevlx7.c - diff --git a/print/ghostscript8/files/lx5000.contrib.mak b/print/ghostscript8/files/lx5000.contrib.mak deleted file mode 100644 index f22c1dbb904c..000000000000 --- a/print/ghostscript8/files/lx5000.contrib.mak +++ /dev/null @@ -1,11 +0,0 @@ -### ----------------- LexMark 5000 printer ----------------------------- ### -### Note: this driver was contributed by users. Please contact: ### -### Peter B. West <p.west@uq.net.au> ### - -lx5000_=$(GLOBJ)gdevlx50.$(OBJ) -$(DD)lx5000.dev: $(lx5000_) - $(SETPDEV) $(DD)lx5000 $(lx5000_) - -$(GLOBJ)gdevlx50.$(OBJ): $(GLSRC)gdevlx50.c $(PDEVH) - $(GLCC) $(GLO_)gdevlx50.$(OBJ) $(C_) $(GLSRC)gdevlx50.c - diff --git a/print/ghostscript8/files/lxm3200.contrib.mak b/print/ghostscript8/files/lxm3200.contrib.mak deleted file mode 100644 index c670f6de111c..000000000000 --- a/print/ghostscript8/files/lxm3200.contrib.mak +++ /dev/null @@ -1,10 +0,0 @@ -### ---------------- Lexmark 3200 device ----------------- ### - -lxm3200_=$(GLOBJ)gdevlx32.$(OBJ) - -$(DD)lxm3200.dev: $(lxm3200_) $(DD)page.dev - $(SETPDEV) $(DD)lxm3200 $(lxm3200_) - -$(GLOBJ)gdevlx32.$(OBJ): $(GLSRC)gdevlx32.c $(PDEVH) $(gsparam_h) - $(GLCC) $(GLO_)gdevlx32.$(OBJ) $(C_) $(GLSRC)gdevlx32.c - diff --git a/print/ghostscript8/files/patch-alps:gdevalps.mak b/print/ghostscript8/files/patch-alps:gdevalps.mak deleted file mode 100644 index 45144eaadcfd..000000000000 --- a/print/ghostscript8/files/patch-alps:gdevalps.mak +++ /dev/null @@ -1,25 +0,0 @@ ---- alps/gdevalps.mak-5.50.orig Sat Jan 12 13:21:12 2002 -+++ alps/gdevalps.mak-5.50 Sat Jan 12 13:23:45 2002 -@@ -2,15 +2,15 @@ - - alps_=$(GLOBJ)gdevalps.$(OBJ) - --md50Mono.dev: $(alps_) page.dev -- $(SETPDEV) md50Mono $(alps_) -+$(DD)md50Mono.dev: $(alps_) $(DD)page.dev -+ $(SETPDEV) $(DD)md50Mono $(alps_) - --md50Eco.dev: $(alps_) page.dev -- $(SETPDEV) md50Eco $(alps_) -+$(DD)md50Eco.dev: $(alps_) $(DD)page.dev -+ $(SETPDEV) $(DD)md50Eco $(alps_) - --md1xMono.dev: $(alps_) page.dev -- $(SETPDEV) md1xMono $(alps_) -+$(DD)md1xMono.dev: $(alps_) $(DD)page.dev -+ $(SETPDEV) $(DD)md1xMono $(alps_) - --$(GLOBJ)gdevalps.$(OBJ): $(GLSRC)gdevalps.c $(PDEVH) -+$(GLOBJ)gdevalps.$(OBJ): $(GLSRC)gdevalps.c $(gdevprn_h) $(PDEVH) - $(GLCC) $(GLO_)gdevalps.$(OBJ) $(C_) $(GLSRC)gdevalps.c - diff --git a/print/ghostscript8/files/patch-alps__gdevalps.c b/print/ghostscript8/files/patch-alps__gdevalps.c deleted file mode 100644 index ad77a9e9af10..000000000000 --- a/print/ghostscript8/files/patch-alps__gdevalps.c +++ /dev/null @@ -1,22 +0,0 @@ ---- alps/gdevalps.c.orig Wed Nov 24 09:28:35 1999 -+++ alps/gdevalps.c Fri Dec 17 19:12:35 2004 -@@ -173,7 +173,7 @@ - { - int lnum; - int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev); -- byte *data = (byte *)gs_malloc(8, line_size, "md50_print_page(data)" ); -+ byte *data = (byte *)gs_malloc(pdev->memory, 8, line_size, "md50_print_page(data)" ); - int skipping = 0; - int nbyte; - int nskip; -@@ -232,8 +232,8 @@ - { - int lnum; - int line_size = gdev_mem_bytes_per_scan_line((gx_device *)pdev); -- byte *data = (byte *)gs_malloc(8, line_size, "md1xm_print_page(data)"); -- byte *out_start = (byte *)gs_malloc(8, line_size, "md1xm_print_page(data)"); -+ byte *data = (byte *)gs_malloc(pdev->memory, 8, line_size, "md1xm_print_page(data)"); -+ byte *out_start = (byte *)gs_malloc(pdev->memory, 8, line_size, "md1xm_print_page(data)"); - int skipping = 0; - int nbyte; - diff --git a/print/ghostscript8/files/patch-bjc250:src:gdevbjc_.c b/print/ghostscript8/files/patch-bjc250:src:gdevbjc_.c deleted file mode 100644 index 8eaf44e181c0..000000000000 --- a/print/ghostscript8/files/patch-bjc250:src:gdevbjc_.c +++ /dev/null @@ -1,14 +0,0 @@ ---- bjc250/src/gdevbjc_.c.orig Fri Nov 8 06:15:15 2002 -+++ bjc250/src/gdevbjc_.c Fri Nov 8 07:43:31 2002 -@@ -54,9 +54,9 @@ - private dev_proc_put_params(gdev_bjc_put_params); - private dev_proc_get_params(gdev_bjc_get_params); - const stringParamDescription * -- paramValueToParam(P2(const stringParamDescription *, int)); -+ paramValueToParam(const stringParamDescription *, int); - const stringParamDescription * -- paramStringToParam(P3(const stringParamDescription *, const char *, uint)); -+ paramStringToParam(const stringParamDescription *, const char *, uint); - - BJL_command BJL_command_set[] = { - { "@Cleaning=1", BJC_BJL_CLEANING, 11}, diff --git a/print/ghostscript8/files/patch-bjc250:src:gdevbjc_.h b/print/ghostscript8/files/patch-bjc250:src:gdevbjc_.h deleted file mode 100644 index 26af2028cebc..000000000000 --- a/print/ghostscript8/files/patch-bjc250:src:gdevbjc_.h +++ /dev/null @@ -1,93 +0,0 @@ ---- bjc250/src/gdevbjc_.h.orig Fri Nov 8 06:15:15 2002 -+++ bjc250/src/gdevbjc_.h Fri Nov 8 07:44:18 2002 -@@ -183,48 +183,48 @@ - - /* Put a BJL command to stream */ - --void bjc_put_bjl_command(P2(FILE * file, int bjl_command)); -+void bjc_put_bjl_command(FILE * file, int bjl_command); - --void bjc_put_LF(P1(FILE *file)); --void bjc_put_FF(P1(FILE *file)); --void bjc_put_CR(P1(FILE *file)); --void bjc_put_initialize(P1(FILE *file)); --void bjc_put_set_initial(P1(FILE *file)); --void bjc_put_set_compression(P2(FILE *file, char compression)); --void bjc_put_print_method_short(P2(FILE *file, char color)); --void bjc_put_print_method(P5(FILE *file, char color, char media, char quality, char density)); --void bjc_put_raster_resolution(P3(FILE *file, int x_resolution, int y_resolution)); --void bjc_put_raster_skip(P2(FILE *file, int skip)); --void bjc_put_page_margins(P5(FILE *file, int length, int lm, int rm, int top)); --void bjc_put_media_supply(P3(FILE *file, char supply, char type)); --void bjc_put_cmyk_image(P4(FILE *file, char component, const char *data, int count)); --void bjc_put_move_lines(P2(FILE *file, int lines)); --void bjc_put_move_lines_unit(P2(FILE *file, int unit)); --void bjc_put_extended_margins(P5(FILE *file, int length, int lm, int rm, int top)); --void bjc_put_image_format(P4(FILE *file, char depth, char format, char ink)); --void bjc_put_page_id(P2(FILE *file, int id)); --void bjc_put_continue_image(P3(FILE *file, const char *data, int count)); --void bjc_put_indexed_image(P4(FILE *file, int dot_rows, int dot_cols, int layers)); -- --bool bjc_invert_bytes(P4(byte *row, uint raster, bool inverse, byte lastmask)); --bool bjc_invert_cmyk_bytes(P8(byte *rowC,byte *rowM, byte *rowY, byte *rowK, uint raster, -- bool inverse, byte lastmask, skip_t *skip)); --uint bjc_compress(P3(const byte *row, uint raster, byte *compressed)); -- --int FloydSteinbergInitG(P1(gx_device_printer * pdev)); --void FloydSteinbergDitheringG(P5(byte *row, byte *dithered, uint width, uint raster, bool limit_extr)); --void FloydSteinbergCloseG(P1(gx_device_printer *pdev)); -- --int FloydSteinbergForwardCut(P5(int error, int *Errors, int i, byte *dithered, byte bitmask)); --int FloydSteinbergBckwardCut(P5(int error, int *Errors, int i, byte *dithered, byte bitmask)); --int FloydSteinbergInitC(P1(gx_device_printer * pdev)); --void FloydSteinbergDitheringC(P6(byte *row, byte *dithered, uint width, uint raster, -- bool limit_extr, bool composeK)); --void FloydSteinbergCloseC(P1(gx_device_printer *pdev)); -- --void bjc_build_gamma_table(P2(float gamma, char color)); --void bjc_rgb_to_cmy (P6(byte r, byte g, byte b, int *c, int *m, int *y)); --void bjc_rgb_to_gray(P4(byte r, byte g, byte b, int *k)); -+void bjc_put_LF(FILE *file); -+void bjc_put_FF(FILE *file); -+void bjc_put_CR(FILE *file); -+void bjc_put_initialize(FILE *file); -+void bjc_put_set_initial(FILE *file); -+void bjc_put_set_compression(FILE *file, char compression); -+void bjc_put_print_method_short(FILE *file, char color); -+void bjc_put_print_method(FILE *file, char color, char media, char quality, char density); -+void bjc_put_raster_resolution(FILE *file, int x_resolution, int y_resolution); -+void bjc_put_raster_skip(FILE *file, int skip); -+void bjc_put_page_margins(FILE *file, int length, int lm, int rm, int top); -+void bjc_put_media_supply(FILE *file, char supply, char type); -+void bjc_put_cmyk_image(FILE *file, char component, const char *data, int count); -+void bjc_put_move_lines(FILE *file, int lines); -+void bjc_put_move_lines_unit(FILE *file, int unit); -+void bjc_put_extended_margins(FILE *file, int length, int lm, int rm, int top); -+void bjc_put_image_format(FILE *file, char depth, char format, char ink); -+void bjc_put_page_id(FILE *file, int id); -+void bjc_put_continue_image(FILE *file, const char *data, int count); -+void bjc_put_indexed_image(FILE *file, int dot_rows, int dot_cols, int layers); -+ -+bool bjc_invert_bytes(byte *row, uint raster, bool inverse, byte lastmask); -+bool bjc_invert_cmyk_bytes(byte *rowC,byte *rowM, byte *rowY, byte *rowK, uint raster, -+ bool inverse, byte lastmask, skip_t *skip); -+uint bjc_compress(const byte *row, uint raster, byte *compressed); -+ -+int FloydSteinbergInitG(gx_device_printer * pdev); -+void FloydSteinbergDitheringG(byte *row, byte *dithered, uint width, uint raster, bool limit_extr); -+void FloydSteinbergCloseG(gx_device_printer *pdev); -+ -+int FloydSteinbergForwardCut(int error, int *Errors, int i, byte *dithered, byte bitmask); -+int FloydSteinbergBckwardCut(int error, int *Errors, int i, byte *dithered, byte bitmask); -+int FloydSteinbergInitC(gx_device_printer * pdev); -+void FloydSteinbergDitheringC(byte *row, byte *dithered, uint width, uint raster, -+ bool limit_extr, bool composeK); -+void FloydSteinbergCloseC(gx_device_printer *pdev); -+ -+void bjc_build_gamma_table(float gamma, char color); -+void bjc_rgb_to_cmy (byte r, byte g, byte b, int *c, int *m, int *y); -+void bjc_rgb_to_gray(byte r, byte g, byte b, int *k); - uint bjc_rand(void); --void bjc_init_tresh(P1(int rnd)); -+void bjc_init_tresh(int rnd); - #endif /* gdevbjc_INCLUDED */ diff --git a/print/ghostscript8/files/patch-bjc250:src:gdevbjca.c b/print/ghostscript8/files/patch-bjc250:src:gdevbjca.c deleted file mode 100644 index 37f525bfeb42..000000000000 --- a/print/ghostscript8/files/patch-bjc250:src:gdevbjca.c +++ /dev/null @@ -1,17 +0,0 @@ ---- bjc250/src/gdevbjca.c.orig Fri Nov 8 06:15:15 2002 -+++ bjc250/src/gdevbjca.c Fri Nov 8 07:47:41 2002 -@@ -46,10 +46,10 @@ - #include <math.h> - #include <time.h> - --private void bjc_put_bytes(P3(FILE *file, const char *data, int count)); --private void bjc_put_hi_lo(P2(FILE *file, int value)); --private void bjc_put_lo_hi(P2(FILE *file, int value)); --private void bjc_put_command(P3(FILE *file, char command, int count)); -+private void bjc_put_bytes(FILE *file, const char *data, int count); -+private void bjc_put_hi_lo(FILE *file, int value); -+private void bjc_put_lo_hi(FILE *file, int value); -+private void bjc_put_command(FILE *file, char command, int count); - - /* ---------------- Utilities ---------------- */ - diff --git a/print/ghostscript8/files/patch-contrib__gdevhl12.c b/print/ghostscript8/files/patch-contrib__gdevhl12.c new file mode 100644 index 000000000000..64ef936f0975 --- /dev/null +++ b/print/ghostscript8/files/patch-contrib__gdevhl12.c @@ -0,0 +1,11 @@ +--- contrib/gdevhl12.c.orig Thu Apr 26 01:27:24 2007 ++++ contrib/gdevhl12.c Tue May 15 16:49:03 2007 +@@ -474,7 +474,7 @@ + continue; + #if 1 + /* XXX - please report if you ever see this, then change to #if 0 */ +- fprintf(stderr, ++ dprintf1( + "hl1250: compression failed (y=%u), doing 1200x300 dpi\n", + band + y); + #endif diff --git a/print/ghostscript8/files/patch-src-dmp_site.ps b/print/ghostscript8/files/patch-contrib__japanese__dmp_site.ps index ee1a5717d641..9f7ad073a58a 100644 --- a/print/ghostscript8/files/patch-src-dmp_site.ps +++ b/print/ghostscript8/files/patch-contrib__japanese__dmp_site.ps @@ -1,10 +1,11 @@ ---- src/dmp_site.ps.orig Tue May 27 09:57:00 1997 -+++ src/dmp_site.ps Tue Apr 2 23:05:45 2002 -@@ -1,6 +1,6 @@ +--- contrib/japanese/dmp_site.ps.orig Wed Nov 29 20:56:17 2006 ++++ contrib/japanese/dmp_site.ps Sun May 13 21:06:03 2007 +@@ -1,7 +1,7 @@ + %! BeginConfig %%%%%%%%%%%%%%%%%%%%%% Standard user cusomizations %%%%%%%%%%%%%%%%%%%%% --/printer (epsimage.src) +-/printer (escp_24.src) +/printer (%%DATADIR%%/%%GS_VERSION%%/lib/escp_24.src) % horizontal / vertical - % /resolution [ 160.0 180.0 ] + % /resolution [ 180.0 180.0 ] % horizontal / vertical diff --git a/print/ghostscript8/files/patch-contrib__japanese__gdevdmpr.c b/print/ghostscript8/files/patch-contrib__japanese__gdevdmpr.c new file mode 100644 index 000000000000..1e6c3261d464 --- /dev/null +++ b/print/ghostscript8/files/patch-contrib__japanese__gdevdmpr.c @@ -0,0 +1,44 @@ +--- contrib/japanese/gdevdmpr.c.orig Thu Apr 26 01:27:24 2007 ++++ contrib/japanese/gdevdmpr.c Tue May 15 01:44:09 2007 +@@ -41,8 +41,6 @@ + /* include library header. */ + #include "dviprlib.h" + +-extern FILE *lib_fopen(const char *); +- + #define LOCAL_DEBUG 0 + + #define DEVICE_NAME "dmprt" +@@ -405,8 +403,6 @@ + if (pddev->dmprt.max_height>0 && pddev->dmprt.max_height<pddev->height) + pddev->height = pddev->dmprt.max_height; + +- dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL); +- + return code; + } + +@@ -425,8 +421,6 @@ + if (code < 0) return code; + if (code == 0) pddev->dmprt.debug_f = vbool; + +- dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL); +- + code = param_read_bool(plist, "Verbose", &vbool); + if (code < 0) return code; + pddev->dmprt.verbose_f = vbool; +@@ -841,13 +835,12 @@ + char *env; + + strcpy(fname,fnamebase); +- fp = lib_fopen(fname); ++ fp = fopen(fname,"r"); + if (fp == NULL) { + env = getenv("TEXCFG"); + if (env) { + strcpy(fname,env); + strcat(fname, gp_file_name_concat_string(env,strlen(env))); +- strcat(fname,fnamebase); + fp = fopen(fname,gp_fmode_rb); + } + } diff --git a/print/ghostscript8/files/patch-contrib__japanese__gdevfmlbp.c b/print/ghostscript8/files/patch-contrib__japanese__gdevfmlbp.c new file mode 100644 index 000000000000..8bd0d2b123e5 --- /dev/null +++ b/print/ghostscript8/files/patch-contrib__japanese__gdevfmlbp.c @@ -0,0 +1,11 @@ +--- contrib/japanese/gdevfmlbp.c.orig Thu Apr 26 01:27:24 2007 ++++ contrib/japanese/gdevfmlbp.c Tue May 15 16:49:03 2007 +@@ -121,7 +121,7 @@ + height_inches >= 9.2 ? PAPER_SIZE_B5 : + height_inches >= 7.6 ? PAPER_SIZE_A5 : PAPER_SIZE_HAGAKI), landscape); + #ifdef FMLBP_DEBUG +- fprintf(stderr, "w=%d(%f) x h=%d(%f) -> %s\n", ++ dprintf5("w=%d(%f) x h=%d(%f) -> %s\n", + dev->width, width_inches, dev->height, height_inches, paper); + #endif/*FMLBP_DEBUG*/ + return paper; diff --git a/print/ghostscript8/files/patch-contrib__pcl3__eprn__eprnparm.c b/print/ghostscript8/files/patch-contrib__pcl3__eprn__eprnparm.c new file mode 100644 index 000000000000..5d0443b4ff75 --- /dev/null +++ b/print/ghostscript8/files/patch-contrib__pcl3__eprn__eprnparm.c @@ -0,0 +1,238 @@ +--- contrib/pcl3/eprn/eprnparm.c.orig Thu Apr 26 01:27:24 2007 ++++ contrib/pcl3/eprn/eprnparm.c Tue May 15 02:02:42 2007 +@@ -146,7 +146,7 @@ + /* First we construct a properly NUL-terminated string */ + s = (char *) malloc(in_value->size + 1); + if (s == NULL) { +- fprintf(stderr, ERRPREF ++ eprintf1(ERRPREF + "Memory allocation failure in eprn_get_int(): %s.\n", + strerror(errno)); + return_error(gs_error_VMerror); +@@ -352,8 +352,7 @@ + 'eprn->media_overrides' should be NULL. + + The function returns zero on success and a non-zero ghostscript error value +- otherwise. In the latter case, an error message will have been issued on +- stderr. ++ otherwise. In the latter case, an error message will have been issued. + + ******************************************************************************/ + +@@ -379,7 +378,7 @@ + + /* Open the file */ + if ((f = fopen(eprn->media_file, "r")) == NULL) { +- fprintf(stderr, "%s" ERRPREF "Error opening the media configuration file\n" ++ eprintf5("%s" ERRPREF "Error opening the media configuration file\n" + "%s `%s'\n%s for reading: %s.\n", + epref, epref, eprn->media_file, epref, strerror(errno)); + return_error(gs_error_invalidfileaccess); +@@ -395,7 +394,7 @@ + + /* Check for buffer overflow */ + if ((s = strchr(buffer, '\n')) == NULL && fgetc(f) != EOF) { +- fprintf(stderr, "%s" ERRPREF "Exceeding line length %d in " ++ eprintf5("%s" ERRPREF "Exceeding line length %d in " + "media configuration file\n%s %s, line %d.\n", + epref, BUFFER_SIZE - 2 /* '\n'+'\0' */, epref, eprn->media_file, line); + cleanup(); +@@ -453,7 +452,7 @@ + new_list = (eprn_PageDescription *) + realloc(list, (read+1)*sizeof(eprn_PageDescription)); + if (new_list == NULL) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "Memory allocation failure in eprn_read_media_data(): %s.\n", + epref, strerror(errno)); + cleanup(); +@@ -477,14 +476,14 @@ + { + ms_MediaCode code = ms_find_code_from_name(s, eprn->flag_desc); + if (code == ms_none) { +- fprintf(stderr, "%s" ERRPREF "Unknown media name (%s) in " ++ eprintf5("%s" ERRPREF "Unknown media name (%s) in " + "media configuration file\n%s %s, line %d.\n", + epref, s, epref, eprn->media_file, line); + cleanup(); + return_error(gs_error_rangecheck); + } + if (code & MS_ROTATED_FLAG) { +- fprintf(stderr, "%s" ERRPREF "Invalid substring \"" MS_ROTATED_STRING ++ eprintf5("%s" ERRPREF "Invalid substring \"" MS_ROTATED_STRING + "\" in media name (%s)\n" + "%s in media configuration file %s, line %d.\n", + epref, s, epref, eprn->media_file, line); +@@ -499,7 +498,7 @@ + ¤t->bottom, ¤t->right, ¤t->top, &chars_read) != 4 || + t[chars_read] != '\0') { + if (*t != '\0') *(t-1) = ' '; /* remove NUL after media name */ +- fprintf(stderr, "%s" ERRPREF ++ eprintf5("%s" ERRPREF + "Syntax error in media configuration file %s, line %d:\n%s %s\n", + epref, eprn->media_file, line, epref, buffer); + cleanup(); +@@ -509,7 +508,7 @@ + /* Check for sign */ + if (current->left < 0 || current->bottom < 0 || current->right < 0 || + current->top < 0) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf4("%s" ERRPREF + "Ghostscript does not support negative margins (line %d in the\n" + "%s media configuration file %s).\n", + epref, line, epref, eprn->media_file); +@@ -530,14 +529,14 @@ + The user might not notice the reason without help, hence we check. */ + if (ms_without_flags(current->code) == ms_CustomPageSize && + eprn->cap->custom == NULL) +- fprintf(stderr, "%s" WARNPREF "The media configuration file %s\n" ++ eprintf6("%s" WARNPREF "The media configuration file %s\n" + "%s contains a custom page size entry in line %d, " + "but custom page sizes\n" + "%s are not supported by the %s.\n", + wpref, eprn->media_file, wpref, line, wpref, eprn->cap->name); + } + if (ferror(f)) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "Unidentified system error while reading `%s'.\n", + epref, eprn->media_file); + cleanup(); +@@ -547,7 +546,7 @@ + + /* Was the file empty? */ + if (read == 0) { +- fprintf(stderr, "%s" ERRPREF "The media configuration file %s\n" ++ eprintf3("%s" ERRPREF "The media configuration file %s\n" + "%s does not contain any media information.\n", + epref, eprn->media_file, epref); + return_error(gs_error_rangecheck); +@@ -557,7 +556,7 @@ + eprn->media_overrides = (eprn_PageDescription *) gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), read + 1, + sizeof(eprn_PageDescription), "eprn_read_media_data"); + if (eprn->media_overrides == NULL) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf1("%s" ERRPREF + "Memory allocation failure from gs_malloc() in eprn_read_media_data().\n", + epref); + free(list); +@@ -585,8 +584,7 @@ + from the specified media configuration file. + + The return code will be zero an success and a ghostscript error code +- otherwise. In the latter case, an error message will have been issued on +- stderr. ++ otherwise. In the latter case, an error message will have been issued. + + The 'length' may be positive in which case it denotes the length of the + string 'media_file' or zero in which case the string is assumed to be +@@ -629,7 +627,7 @@ + eprn->media_file = (char *)gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), length + 1, sizeof(char), + "eprn_set_media_data"); + if (eprn->media_file == NULL) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf1("%s" ERRPREF + "Memory allocation failure from gs_malloc() in " + "eprn_set_media_data().\n", + epref); +@@ -928,9 +926,9 @@ + rc = eprn_get_int(&string_value, eprn_colour_model_list, &temp); \ + if (rc != 0) { \ + if (rc != gs_error_VMerror) { \ +- fprintf(stderr, "%s" ERRPREF "Unknown colour model: `", epref); \ +- fwrite(string_value.data, sizeof(char), string_value.size, stderr); \ +- fputs("'.\n", stderr); \ ++ eprintf1("%s" ERRPREF "Unknown colour model: `", epref); \ ++ errwrite(string_value.data, sizeof(char)*string_value.size); \ ++ eprintf("'.\n"); \ + } \ + last_error = rc; \ + param_signal_error(plist, pname, last_error); \ +@@ -994,7 +992,7 @@ + eprn->black_levels = temp; + } + else { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "The value for BlackLevels is outside the range permitted: %d.\n", + epref, temp); + last_error = gs_error_rangecheck; +@@ -1011,7 +1009,7 @@ + eprn->non_black_levels = temp; + } + else { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "The value for CMYLevels is outside the range permitted: %d.\n", + epref, temp); + last_error = gs_error_rangecheck; +@@ -1025,8 +1023,8 @@ + bool temp; + if ((rc = param_read_bool(plist, "CUPSAccounting", &temp)) == 0) { + if (eprn->CUPS_accounting && !temp) +- fputs(CUPS_WARNPREF WARNPREF +- "Attempt to set CUPSAccounting from true to false.\n", stderr); ++ eprintf(CUPS_WARNPREF WARNPREF ++ "Attempt to set CUPSAccounting from true to false.\n"); + else eprn->CUPS_accounting = temp; + } + else if (rc < 0) last_error = rc; +@@ -1042,10 +1040,10 @@ + eprn->intensity_rendering = temp; + } + else { +- fprintf(stderr, "%s" ERRPREF "Invalid method for IntensityRendering: `", ++ eprintf1("%s" ERRPREF "Invalid method for IntensityRendering: `", + epref); +- fwrite(string_value.data, sizeof(char), string_value.size, stderr); +- fputs("'.\n", stderr); ++ errwrite(string_value.data, sizeof(char)*string_value.size); ++ eprintf("'.\n"); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); + } +@@ -1066,7 +1064,7 @@ + eprn->default_orientation = temp; + } + else { +- fprintf(stderr, ++ eprintf2( + "%s" ERRPREF "LeadingEdge may only have values 0 to 3, not %d.\n", + epref, temp); + last_error = gs_error_rangecheck; +@@ -1111,7 +1109,7 @@ + /* Current (up to at least gs 6.50) ghostscript versions do not accept + negative MediaPosition values. */ + if (eprn->media_position < 0) +- fprintf(stderr, "%s" WARNPREF ++ eprintf3("%s" WARNPREF + "Ghostscript does not accept negative values (%d) for the\n" + "%s `MediaPosition' parameter.\n", + wpref, eprn->media_position, wpref); +@@ -1145,7 +1143,7 @@ + eprn->pagecount_file = (char *)gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), string_value.size + 1, + sizeof(char), "eprn_put_params"); + if (eprn->pagecount_file == NULL) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf1( "%s" ERRPREF + "Memory allocation failure from gs_malloc() in eprn_put_params().\n", + epref); + last_error = gs_error_VMerror; +@@ -1167,7 +1165,7 @@ + eprn->non_black_levels = temp; + } + else { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "The value for RGBLevels is outside the range permitted: %d.\n", + epref, temp); + last_error = gs_error_rangecheck; +@@ -1187,7 +1185,7 @@ + */ + if ((rc = param_read_int(plist, (pname = "BitsPerPixel"), &temp)) == 0) { + if (temp != dev->color_info.depth) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf3("%s" ERRPREF + "Attempt to set `BitsPerPixel' to a value (%d)\n" + "%s other than the one selected by the driver.\n", + epref, temp, epref); diff --git a/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.c b/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.c new file mode 100644 index 000000000000..696feccb9a52 --- /dev/null +++ b/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.c @@ -0,0 +1,237 @@ +--- contrib/pcl3/eprn/gdeveprn.c.orig Thu Apr 26 01:27:24 2007 ++++ contrib/pcl3/eprn/gdeveprn.c Tue May 15 01:34:15 2007 +@@ -95,6 +95,7 @@ + #ifdef EPRN_TRACE + #include "gdebug.h" + #endif /* EPRN_TRACE */ ++#include "gxstdio.h" + + /* Special headers for this device */ + #ifndef EPRN_NO_PAGECOUNTFILE +@@ -143,8 +144,8 @@ + "! eprn_get_initial_matrix(): code is still ms_none.\n"); + #endif + if (eprn_set_page_layout(dev) != 0) +- fputs(" Processing can't be stopped at this point although this error " +- "occurred.\n", stderr); ++ eprintf(" Processing can't be stopped at this point although this error " ++ "occurred.\n"); + /* The current function has a signature without the ability to signal + an error condition. */ + } +@@ -303,17 +304,17 @@ + + Function: print_flags + +- Print a textual description of 'flags' on 'f'. ++ Print a textual description of 'flags' to the error stream. + + ******************************************************************************/ + +-static void print_flags(FILE *f, ms_MediaCode flags, const ms_Flag *user_flags) ++static void print_flags(ms_MediaCode flags, const ms_Flag *user_flags) + { + /* Non-standard flags first */ + if (user_flags != NULL) { + while (user_flags->code != ms_none) { + if (user_flags->code & flags) { +- fputs(user_flags->name, f); ++ errprintf(user_flags->name); + flags &= ~user_flags->code; + } + user_flags++; +@@ -321,17 +322,17 @@ + } + + /* Standard substrings */ +- if (flags & MS_SMALL_FLAG) fputs(MS_SMALL_STRING, f); +- if (flags & MS_BIG_FLAG ) fputs(MS_BIG_STRING, f); +- if (flags & MS_EXTRA_FLAG) fputs(MS_EXTRA_STRING, f); ++ if (flags & MS_SMALL_FLAG) eprintf(MS_SMALL_STRING); ++ if (flags & MS_BIG_FLAG ) eprintf(MS_BIG_STRING); ++ if (flags & MS_EXTRA_FLAG) eprintf(MS_EXTRA_STRING); + flags &= ~(MS_SMALL_FLAG | MS_BIG_FLAG | MS_EXTRA_FLAG); + + /* Completeness check */ + if (flags & ~MS_TRANSVERSE_FLAG) +- fprintf(f, "0x%04X", (unsigned int)(flags & ~MS_TRANSVERSE_FLAG)); ++ eprintf1("0x%04X", (unsigned int)(flags & ~MS_TRANSVERSE_FLAG)); + + /* Standard qualifier */ +- if (flags & MS_TRANSVERSE_FLAG) fputs("." MS_TRANSVERSE_STRING, f); ++ if (flags & MS_TRANSVERSE_FLAG) eprintf("." MS_TRANSVERSE_STRING); + + return; + } +@@ -347,37 +348,37 @@ + + If the derived device has set a flag mismatch error reporting function, the + call will be passed to that function. Otherwise a general error message is +- written on 'err'. ++ written through the graphics library's eprintf(). + + ******************************************************************************/ + +-static void eprn_flag_mismatch(FILE *err, const struct s_eprn_Device *eprn, ++static void eprn_flag_mismatch(const struct s_eprn_Device *eprn, + bool no_match) + { +- if (eprn->fmr != NULL) (*eprn->fmr)(err, eprn, no_match); ++ if (eprn->fmr != NULL) (*eprn->fmr)(eprn, no_match); + else { + const char *epref = eprn->CUPS_messages? CUPS_ERRPREF: ""; + +- fprintf(err, "%s" ERRPREF "The %s does not support ", ++ eprintf2("%s" ERRPREF "The %s does not support ", + epref, eprn->cap->name); +- if (eprn->desired_flags == 0) fprintf(err, "an empty set of media flags"); ++ if (eprn->desired_flags == 0) eprintf("an empty set of media flags"); + else { +- fputs("the \"", err); +- print_flags(err, eprn->desired_flags, eprn->flag_desc); +- fputs("\" flag(s)", err); ++ eprintf("the \""); ++ print_flags(eprn->desired_flags, eprn->flag_desc); ++ eprintf("\" flag(s)"); + } +- fprintf(err, "\n%s (ignoring presence or absence of \"", epref); ++ eprintf1("\n%s (ignoring presence or absence of \"", epref); + { + ms_MediaCode optional = MS_TRANSVERSE_FLAG; + if (eprn->optional_flags != NULL) { + const ms_MediaCode *of = eprn->optional_flags; + while (*of != ms_none) optional |= *of++; + } +- print_flags(err, optional, eprn->flag_desc); ++ print_flags(optional, eprn->flag_desc); + } +- fputs("\") for ", err); +- if (no_match) fputs("any", err); else fputs("this", err); +- fputs(" page size.\n", err); ++ eprintf("\") for "); ++ if (no_match) eprintf("any"); else eprintf("this"); ++ eprintf(" page size.\n"); + } + + return; +@@ -483,7 +484,7 @@ + the media flags, or the page descriptions have been changed. + + The function returns zero on success and a non-zero value otherwise. +- In the latter case, an error message has been issued on stderr. This can only ++ In the latter case, an error message has been issued. This can only + occur if the media size is not supported with the flags requested. + + On success, the following variables in the device structure are consistent: +@@ -615,21 +616,21 @@ + /* No discrete match */ + if (best_cmatch == NULL) { + /* No match at all. */ +- fprintf(stderr, "%s" ERRPREF ++ eprintf3("%s" ERRPREF + "This document requests a page size of %.0f x %.0f bp.\n", + epref, dev->MediaSize[0], dev->MediaSize[1]); + if (eprn->cap->custom == NULL) { + /* The printer does not support custom page sizes */ + if (eprn->media_overrides != NULL) +- fprintf(stderr, ++ eprintf1( + "%s The media configuration file does not contain an entry for " + " this size.\n", epref); + else +- fprintf(stderr, "%s This size is not supported by the %s.\n", ++ eprintf2("%s This size is not supported by the %s.\n", + epref, eprn->cap->name); + } + else +- fprintf(stderr, ++ eprintf3( + "%s This size is not supported as a discrete size and it exceeds " + "the\n" + "%s custom page size limits for the %s.\n", +@@ -637,7 +638,7 @@ + return -1; + } + if (eprn->media_overrides != NULL && best_cdmatch == NULL) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf6("%s" ERRPREF + "This document requests a page size of %.0f x %.0f bp\n" + "%s but there is no entry for this size in the " + "media configuration file\n" +@@ -692,7 +693,7 @@ + } + /* If we've found a match, 'code' is no longer 'ms_none'. */ + if (eprn->code == ms_none) { +- eprn_flag_mismatch(stderr, eprn, no_match); ++ eprn_flag_mismatch(eprn, no_match); + return -1; + } + +@@ -762,7 +763,7 @@ + + rc = gdev_prn_open((gx_device *)dev); + if (rc < 0) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "Failure of gdev_prn_open(), code is %d.\n", + epref, rc); + return rc; +@@ -944,13 +945,13 @@ + &eprn->black_levels, &eprn->non_black_levels) != 0) { + gs_param_string str; + +- fprintf(stderr, "%s" ERRPREF "The requested combination of colour model (", ++ eprintf1("%s" ERRPREF "The requested combination of colour model (", + epref); + str.size = 0; + if (eprn_get_string(eprn->colour_model, eprn_colour_model_list, &str) != 0) + assert(0); /* Bug. No harm on NDEBUG because I've just set the size. */ +- fwrite(str.data, str.size, sizeof(str.data[0]), stderr); +- fprintf(stderr, "),\n" ++ errwrite(str.data, str.size * sizeof(str.data[0])); ++ eprintf7("),\n" + "%s resolution (%gx%g ppi) and intensity levels (%d, %d) is\n" + "%s not supported by the %s.\n", + epref, device->HWResolution[0], device->HWResolution[1], +@@ -1022,9 +1023,8 @@ + updating the file. */ + else { + /* pcf_getcount() has issued an error message. */ +- fputs( +- " No further attempts will be made to access the page count file.\n", +- stderr); ++ eprintf( ++ " No further attempts will be made to access the page count file.\n"); + gs_free(gs_lib_ctx_get_non_gc_memory_t(), eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, + sizeof(char), "eprn_open_device"); + eprn->pagecount_file = NULL; +@@ -1060,7 +1060,7 @@ + } + } + if (eprn->scan_line.str == NULL) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf1("%s" ERRPREF + "Memory allocation failure from gs_malloc() in eprn_open_device().\n", + epref); + return_error(gs_error_VMerror); +@@ -1156,7 +1156,7 @@ + accounting, this seems unfair. + */ + if (rc == 0 && eprn->CUPS_accounting) +- fprintf(stderr, "PAGE: %ld %d\n", dev->ShowpageCount, num_copies); ++ eprintf2("PAGE: %ld %d\n", dev->ShowpageCount, num_copies); + /* The arguments are the number of the page, starting at 1, and the number + of copies of that page. */ + +@@ -1166,9 +1166,8 @@ + assert(num_copies > 0); /* because of signed/unsigned */ + if (pcf_inccount(eprn->pagecount_file, num_copies) != 0) { + /* pcf_inccount() has issued an error message. */ +- fputs( +- " No further attempts will be made to access the page count file.\n", +- stderr); ++ eprintf( ++ " No further attempts will be made to access the page count file.\n"); + gs_free(gs_lib_ctx_get_non_gc_memory_t(), eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, + sizeof(char), "eprn_output_page"); + eprn->pagecount_file = NULL; diff --git a/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.h b/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.h new file mode 100644 index 000000000000..1da6579effbc --- /dev/null +++ b/print/ghostscript8/files/patch-contrib__pcl3__eprn__gdeveprn.h @@ -0,0 +1,22 @@ +--- contrib/pcl3/eprn/gdeveprn.h.orig Thu Apr 26 01:33:54 2007 ++++ contrib/pcl3/eprn/gdeveprn.h Tue May 15 02:03:02 2007 +@@ -396,8 +396,8 @@ + struct s_eprn_Device; + /* The preceding statement is needed in order to establish a forward + declaration for "struct s_eprn_Device" at file scope. */ +-typedef void (*eprn_FlagMismatchReporter)(FILE *f, +- const struct s_eprn_Device *dev, bool no_match); ++typedef void (*eprn_FlagMismatchReporter)(const struct s_eprn_Device *dev, ++ bool no_match); + /* A function of this kind will be called if the requested media flags cannot + be satisfied by the printer although the size itself is supported for some + (unspecified) set of flags. The parameter 'no_match' indicates whether the +@@ -406,7 +406,7 @@ + capabilities). The requested set of media selection flags is available in + 'dev->eprn.desired_flags' and 'dev->eprn.optional_flags' (MS_ROTATED_FLAG + will never be set). +- The function must write an error message on 'f'. ++ The function must write an error message. + */ + + /*****************************************************************************/ diff --git a/print/ghostscript8/files/patch-contrib__pcl3__src__gdevpcl3.c b/print/ghostscript8/files/patch-contrib__pcl3__src__gdevpcl3.c new file mode 100644 index 000000000000..dd8e850bf6e0 --- /dev/null +++ b/print/ghostscript8/files/patch-contrib__pcl3__src__gdevpcl3.c @@ -0,0 +1,314 @@ +--- contrib/pcl3/src/gdevpcl3.c.orig Thu Apr 26 01:27:24 2007 ++++ contrib/pcl3/src/gdevpcl3.c Tue May 15 01:48:00 2007 +@@ -338,7 +338,7 @@ + /* First we construct a properly NUL-terminated string */ + s = (char *) malloc(in_value->size + 1); + if (s == NULL) { +- fprintf(stderr, ERRPREF ++ eprintf1(ERRPREF + "Memory allocation failure in get_int_for_string(): %s.\n", + strerror(errno)); + return_error(gs_error_VMerror); +@@ -434,25 +434,25 @@ + const char *epref = eprn->CUPS_messages? CUPS_ERRPREF: ""; + + if (eprn->desired_flags == 0) { +- fprintf(stderr, ++ eprintf2( + "%s" ERRPREF "The %s does not support the requested media properties.\n", + epref, eprn->cap->name); + } + else if (eprn->desired_flags == MS_BIG_FLAG) { +- fprintf(stderr, "%s" ERRPREF "The %s does not support banner printing", ++ eprintf2("%s" ERRPREF "The %s does not support banner printing", + epref, eprn->cap->name); +- if (!no_match) fputs(" for this size", stderr); +- fputs(".\n", stderr); ++ if (!no_match) eprintf(" for this size"); ++ eprintf(".\n"); + } + else if (eprn->desired_flags == PCL_CARD_FLAG) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "The %s does not support a `Card' variant for ", + epref, eprn->cap->name); +- if (no_match) fputs("any", stderr); else fputs("this", stderr); +- fputs(" size.\n", stderr); ++ if (no_match) eprintf("any"); else eprintf("this"); ++ eprintf(" size.\n"); + } + else { +- fprintf(stderr, ++ eprintf1( + "%s" ERRPREF "Banner printing on postcards?? You must be joking!\n", + epref); + } +@@ -699,8 +699,8 @@ + be copied to '*s'. + + The function returns a negative ghostscript error code on error and zero +- otherwise. In the former case an error message will have been issued on +- stderr, using 'epref' as a prefix for the message. ++ otherwise. In the former case an error message will have been issued, ++ using 'epref' as a prefix for the message. + + ******************************************************************************/ + +@@ -728,7 +728,7 @@ + + if (s->str == NULL) { + s->length = 0; +- fprintf(stderr, "%s" ERRPREF ++ eprintf1("%s" ERRPREF + "Memory allocation failure from gs_malloc().\n", epref); + rc = gs_error_VMerror; + param_signal_error(plist, pname, rc); +@@ -760,8 +760,7 @@ + copied. + + The function returns a negative ghostscript error code on error and zero +- otherwise. In the former case an error message will have been issued on +- stderr. ++ otherwise. In the former case an error message will have been issued. + + ******************************************************************************/ + +@@ -785,7 +784,7 @@ + "fetch_cstring"); + + if (*s == NULL) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf1("%s" ERRPREF + "Memory allocation failure from gs_malloc().\n", epref); + rc = gs_error_VMerror; + param_signal_error(plist, pname, rc); +@@ -907,9 +906,9 @@ + eprn_init_device((eprn_Device *)dev, &pcl3_printers[dev->printer].desc); + } + else { +- fprintf(stderr, "%s" ERRPREF "Unknown subdevice name: `", epref); +- fwrite(string_value.data, sizeof(char), string_value.size, stderr); +- fputs("'.\n", stderr); ++ eprintf1("%s" ERRPREF "Unknown subdevice name: `", epref); ++ errwrite(string_value.data, sizeof(char)*string_value.size); ++ eprintf("'.\n"); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); + } +@@ -925,8 +924,8 @@ + == 0) { + if (temp != pcl_cm_none && temp != pcl_cm_rl && temp != pcl_cm_tiff && + temp != pcl_cm_delta && temp != pcl_cm_crdr) { +- fprintf(stderr, +- "%s" ERRPREF "Unsupported compression method: %d.\n", epref, temp); ++ eprintf2("%s" ERRPREF "Unsupported compression method: %d.\n", ++ epref, temp); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); + } +@@ -934,7 +933,7 @@ + if (temp == pcl_cm_crdr && (dev->printer == HPDeskJet || + dev->printer == HPDeskJetPlus || dev->printer == HPDJ500)) { + /* This I know to be the case for the DJ 500. The others are guessed. */ +- fprintf(stderr, ++ eprintf2( + "%s" ERRPREF "The %s does not support compression method 9.\n", + epref, dev->eprn.cap->name); + last_error = gs_error_rangecheck; +@@ -956,7 +955,7 @@ + if (1 <= temp && temp <= 5 && (dev->printer != HPDJ500C || temp <= 3)) + requested.depletion = temp; + else { +- fprintf(stderr, "%s" ERRPREF "Invalid value for depletion: %d.\n", ++ eprintf2("%s" ERRPREF "Invalid value for depletion: %d.\n", + epref, temp); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); +@@ -978,7 +977,7 @@ + Hence I'm giving an error message only in those cases where HP + explicitly states that the printer does not support the command. + */ +- fprintf(stderr, ++ eprintf2( + "%s" ERRPREF "The %s does not support setting a dry time.\n", + epref, dev->eprn.cap->name); + last_error = gs_error_rangecheck; +@@ -987,8 +986,8 @@ + else data->dry_time = temp; + } + else { +- fprintf(stderr, +- "%s" ERRPREF "Invalid value for the dry time: %d.\n", epref, temp); ++ eprintf2("%s" ERRPREF "Invalid value for the dry time: %d.\n", ++ epref, temp); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); + } +@@ -1008,7 +1007,7 @@ + dev->Duplex_set = 0; /* force to "null" */ + } + else { +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "You can use a non-trivial value for DuplexCapability\n" + "%s only for unspec and unspecold.\n", epref, epref); + last_error = gs_error_rangecheck; +@@ -1016,9 +1015,9 @@ + } + } + else { +- fprintf(stderr, "%s" ERRPREF "Invalid duplex capability: `", epref); +- fwrite(string_value.data, sizeof(char), string_value.size, stderr); +- fputs("'.\n", stderr); ++ eprintf1("%s" ERRPREF "Invalid duplex capability: `", epref); ++ errwrite(string_value.data, sizeof(char)*string_value.size); ++ eprintf("'.\n"); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); + } +@@ -1037,12 +1036,12 @@ + if ((rc = param_read_bool(plist, (pname = "Duplex"), &temp)) == 0 && + temp && dev->duplex_capability == Duplex_none) { + if (dev->printer == pcl3_generic_new || dev->printer == pcl3_generic_old) +- fprintf(stderr, "%s" ERRPREF ++ eprintf3("%s" ERRPREF + "The '%s' device does not support duplex printing unless\n" + "%s 'DuplexCapability' is not 'none'.\n", + epref, find_subdevice_name(dev->printer), epref); + else +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "The %s does not support duplex printing.\n", + epref, dev->eprn.cap->name); + last_error = gs_error_rangecheck; +@@ -1071,9 +1070,9 @@ + rc = get_int_for_string(&string_value, media_type_list, &temp); + if (rc != 0) { + if (rc != gs_error_VMerror) { +- fprintf(stderr, "%s" ERRPREF "Unknown medium: `", epref); +- fwrite(string_value.data, sizeof(char), string_value.size, stderr); +- fputs("'.\n", stderr); ++ eprintf1("%s" ERRPREF "Unknown medium: `", epref); ++ errwrite(string_value.data, sizeof(char)*string_value.size); ++ eprintf("'.\n"); + } + last_error = rc; + param_signal_error(plist, pname, last_error); +@@ -1081,7 +1080,7 @@ + else { + new_quality = true; + if (temp < 0 || 6 < temp) +- fprintf(stderr, "%s" WARNPREF "Unknown media type code: %d.\n", ++ eprintf2("%s" WARNPREF "Unknown media type code: %d.\n", + wpref, temp); + pcl3_set_mediatype(data, temp); + } +@@ -1107,7 +1106,7 @@ + if (pcl_has_CRD(data->level)) + data->level = (temp? pcl_level_3plus_CRD_only: pcl_level_3plus_S68); + else if (temp == true) { +- fprintf(stderr, "%s" ERRPREF ++ eprintf1("%s" ERRPREF + "OnlyCRD may be set only for group-3 devices.\n", epref); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); +@@ -1140,9 +1139,9 @@ + rc = get_int_for_string(&string_value, print_quality_list, &temp); + if (rc != 0) { + if (rc != gs_error_VMerror) { +- fprintf(stderr, "%s" ERRPREF "Unknown print quality: `", epref); +- fwrite(string_value.data, sizeof(char), string_value.size, stderr); +- fputs("'.\n", stderr); ++ eprintf1("%s" ERRPREF "Unknown print quality: `", epref); ++ errwrite(string_value.data, sizeof(char)*string_value.size); ++ eprintf("'.\n"); + } + last_error = rc; + param_signal_error(plist, pname, last_error); +@@ -1150,7 +1149,7 @@ + else { + new_quality = true; + if (temp < -1 || 1 < temp) +- fprintf(stderr, "%s" WARNPREF "Unknown print quality: %d.\n", ++ eprintf2("%s" WARNPREF "Unknown print quality: %d.\n", + wpref, temp); + pcl3_set_printquality(data, temp); + } +@@ -1165,7 +1164,7 @@ + == 0) { + if (0 <= temp && temp <= 2) requested.quality = temp; + else { +- fprintf(stderr, ++ eprintf2( + "%s" ERRPREF "Invalid value for raster graphics quality: %d.\n", + epref, temp); + last_error = gs_error_rangecheck; +@@ -1186,7 +1185,7 @@ + if ((rc = param_read_int(plist, (pname = "SendNULs"), &temp)) == 0) { + if (data->NULs_to_send >= 0) data->NULs_to_send = temp; + else { +- fprintf(stderr, ++ eprintf2( + "%s" ERRPREF "Invalid value for SendNULs parameter: %d.\n", + epref, temp); + last_error = gs_error_rangecheck; +@@ -1202,7 +1201,7 @@ + (rc = param_read_int(plist, pname, &temp)) == 0) { + if (0 <= temp && temp <= 2) requested.shingling = temp; + else { +- fprintf(stderr, "%s" ERRPREF "Invalid value for shingling: %d.\n", ++ eprintf2("%s" ERRPREF "Invalid value for shingling: %d.\n", + epref, temp); + last_error = gs_error_rangecheck; + param_signal_error(plist, pname, last_error); +@@ -1280,7 +1279,7 @@ + /* Check on rendering parameters */ + if ((dev->eprn.black_levels > 2 || dev->eprn.non_black_levels > 2) && + dev->file_data.print_quality == -1) +- fprintf(stderr, ++ eprintf2( + "%s" WARNPREF "More than 2 intensity levels and draft quality\n" + "%s are unlikely to work in combination.\n", wpref, wpref); + +@@ -1311,18 +1310,18 @@ + */ + char buffer[50]; + +- fprintf(stderr, "%s" ERRPREF ++ eprintf2("%s" ERRPREF + "The current configuration for this driver has identified the\n" + "%s page setup requested by the document as being for `", + epref, epref); + if (ms_find_name_from_code(buffer, sizeof(buffer), +- dev->eprn.code, flag_description) == 0) fputs(buffer, stderr); +- else fputs("UNKNOWN", stderr); /* should never happen */ +- fprintf(stderr, "' (%.0f x %.0f bp).\n" ++ dev->eprn.code, flag_description) == 0) eprintf(buffer); ++ else eprintf("UNKNOWN"); /* should never happen */ ++ eprintf3("' (%.0f x %.0f bp).\n" + "%s The driver does not know how to do this in PCL.\n", + dev->MediaSize[0], dev->MediaSize[1], epref); + if (dev->eprn.media_file != NULL) +- fprintf(stderr, ++ eprintf2( + "%s You should therefore not include such an entry in the\n" + "%s media configuration file.\n", epref, epref); + return_error(gs_error_rangecheck); +@@ -1473,7 +1472,7 @@ + pcl_cm_is_differential(dev->file_data.compression) && + rd.previous == NULL) { + free(lengths); free(rd.next); free(rd.previous); +- fprintf(stderr, "%s" ERRPREF "Memory allocation failure from malloc().\n", ++ eprintf1("%s" ERRPREF "Memory allocation failure from malloc().\n", + epref); + return_error(gs_error_VMerror); + } +@@ -1514,7 +1513,7 @@ + free(lengths); free(rd.next); free(rd.previous); + for (j = 0; j < 2; j++) free(rd.workspace[j]); + +- fprintf(stderr, "%s" ERRPREF "Memory allocation failure from malloc().\n", ++ eprintf1("%s" ERRPREF "Memory allocation failure from malloc().\n", + epref); + return_error(gs_error_VMerror); + } diff --git a/print/ghostscript8/files/patch-epag__gdevepag.c b/print/ghostscript8/files/patch-epag__gdevepag.c index f3823f24998b..b65ef6921509 100644 --- a/print/ghostscript8/files/patch-epag__gdevepag.c +++ b/print/ghostscript8/files/patch-epag__gdevepag.c @@ -1,37 +1,35 @@ --- epag/gdevepag.c.orig Sat Jul 8 13:33:09 2000 -+++ epag/gdevepag.c Thu May 26 00:12:48 2005 ++++ epag/gdevepag.c Mon May 14 01:22:31 2007 @@ -417,15 +417,15 @@ cont->maxY = epag_cont.cRowBuf / cont->bh * cont->bh ; if(cont->maxY < cont->bh) cont->maxY = cont->bh; - cont->bp = gs_malloc(bpl , cont->maxY, "epag_skip_blank_init(bp)"); - cont->bp2 = gs_malloc(bpl*3/2+1 , cont->maxY, "epag_skip_blank_init(bp2)"); -+ cont->bp = gs_malloc(pdev->memory, bpl , cont->maxY, "epag_skip_blank_init(bp)"); -+ cont->bp2 = gs_malloc(pdev->memory, bpl*3/2+1 , cont->maxY, "epag_skip_blank_init(bp2)"); ++ cont->bp = (byte *)gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), bpl , cont->maxY, "epag_skip_blank_init(bp)"); ++ cont->bp2 = (byte *)gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), bpl*3/2+1 , cont->maxY, "epag_skip_blank_init(bp2)"); cont->h = cont->r = 0; - cont->bubbleTbl=gs_malloc(sizeof(EpagBubble *),cont->maxBx,"bubbleTbl"); -+ cont->bubbleTbl=gs_malloc(pdev->memory, sizeof(EpagBubble *),cont->maxBx,"bubbleTbl"); ++ cont->bubbleTbl = (byte *)gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), sizeof(EpagBubble *),cont->maxBx,"bubbleTbl"); for(i=0;i<cont->maxBx;i++) cont->bubbleTbl[i] = NULL; - cont->bubbleBuffer=gs_malloc(sizeof(EpagBubble),cont->maxBx,"bubbleBuffer"); -+ cont->bubbleBuffer=gs_malloc(pdev->memory, sizeof(EpagBubble),cont->maxBx,"bubbleBuffer"); ++ cont->bubbleBuffer=gs_malloc(gs_lib_ctx_get_non_gc_memory_t(), sizeof(EpagBubble),cont->maxBx,"bubbleBuffer"); bbtbl = (EpagBubble *)cont->bubbleBuffer; for(i=0;i<cont->maxBx-1;i++) bbtbl[i].next = &bbtbl[i+1]; -@@ -436,9 +436,11 @@ +@@ -436,9 +436,9 @@ private void epag_page_close(EpagPageCont *cont) { - gs_free(cont->bp, bpl, cont->maxY, "epag_skip_blank_init(bp)"); - gs_free(cont->bp2, bpl*3/2+1, cont->maxY, "epag_skip_blank_init(bp2)"); - gs_free(cont->bubbleBuffer, sizeof(EpagBubble), cont->maxBx,"bubbleBuffer"); -+ gx_device* pdev; -+ -+ gs_free(pdev->memory, cont->bp, bpl, cont->maxY, "epag_skip_blank_init(bp)"); -+ gs_free(pdev->memory, cont->bp2, bpl*3/2+1, cont->maxY, "epag_skip_blank_init(bp2)"); -+ gs_free(pdev->memory, cont->bubbleBuffer, sizeof(EpagBubble), cont->maxBx,"bubbleBuffer"); ++ gs_free(gs_lib_ctx_get_non_gc_memory_t(), cont->bp, bpl, cont->maxY, "epag_skip_blank_init(bp)"); ++ gs_free(gs_lib_ctx_get_non_gc_memory_t(), cont->bp2, bpl*3/2+1, cont->maxY, "epag_skip_blank_init(bp2)"); ++ gs_free(gs_lib_ctx_get_non_gc_memory_t(), cont->bubbleBuffer, sizeof(EpagBubble), cont->maxBx,"bubbleBuffer"); } private int diff --git a/print/ghostscript8/files/patch-eplaser:gdevescv.c b/print/ghostscript8/files/patch-eplaser:gdevescv.c deleted file mode 100644 index e9f51746ab22..000000000000 --- a/print/ghostscript8/files/patch-eplaser:gdevescv.c +++ /dev/null @@ -1,100 +0,0 @@ ---- eplaser/gdevescv.c.orig Mon May 17 14:25:19 2004 -+++ eplaser/gdevescv.c Mon Aug 2 14:04:30 2004 -@@ -37,10 +37,6 @@ - - */ - --#include <stdlib.h> --#include <unistd.h> --#include <string.h> -- - #include "math_.h" - #include "gx.h" - #include "gserrors.h" -@@ -62,6 +58,10 @@ - #include "gspath.h" - #include "gzpath.h" - -+#include <stdlib.h> -+#include <unistd.h> -+#include <string.h> -+ - /* ---------------- Device definition ---------------- */ - - /* Device procedures */ -@@ -342,6 +342,16 @@ - }; - - /* Vector device implementation */ -+#if GS_VERSION_MAJOR >= 8 -+private int escv_beginpage(gx_device_vector * vdev); -+private int escv_setfillcolor(gx_device_vector * vdev, const gx_drawing_color * pdc); -+private int escv_setstrokecolor(gx_device_vector * vdev, const gx_drawing_color * pdc); -+private int escv_setdash(gx_device_vector * vdev, const float *pattern, -+ uint count, floatp offset); -+private int escv_setflat(gx_device_vector * vdev, floatp flatness); -+private int escv_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, -+ gs_logical_operation_t diff); -+#else - private int escv_beginpage(P1(gx_device_vector * vdev)); - private int escv_setfillcolor(P2(gx_device_vector * vdev, const gx_drawing_color * pdc)); - private int escv_setstrokecolor(P2(gx_device_vector * vdev, const gx_drawing_color * pdc)); -@@ -350,10 +360,25 @@ - private int escv_setflat(P2(gx_device_vector * vdev, floatp flatness)); - private int escv_setlogop(P3(gx_device_vector * vdev, gs_logical_operation_t lop, - gs_logical_operation_t diff)); -+#endif - private int escv_vector_dorect(gx_device_vector * vdev, fixed x0, fixed y0, fixed x1, - fixed y1, gx_path_type_t type); - private int escv_vector_dopath(gx_device_vector * vdev, const gx_path * ppath, - gx_path_type_t type); -+#if GS_VERSION_MAJOR >= 8 -+private int escv_beginpath(gx_device_vector * vdev, gx_path_type_t type); -+private int escv_moveto(gx_device_vector * vdev, floatp x0, floatp y0, -+ floatp x, floatp y, gx_path_type_t type); -+private int escv_lineto(gx_device_vector * vdev, floatp x0, floatp y0, -+ floatp x, floatp y, gx_path_type_t type); -+private int escv_curveto(gx_device_vector * vdev, floatp x0, floatp y0, -+ floatp x1, floatp y1, floatp x2, floatp y2, -+ floatp x3, floatp y3, gx_path_type_t type); -+private int escv_closepath(gx_device_vector * vdev, floatp x, floatp y, -+ floatp x_start, floatp y_start, gx_path_type_t type); -+ -+private int escv_endpath(gx_device_vector * vdev, gx_path_type_t type); -+#else - private int escv_beginpath(P2(gx_device_vector * vdev, gx_path_type_t type)); - private int escv_moveto(P6(gx_device_vector * vdev, floatp x0, floatp y0, - floatp x, floatp y, gx_path_type_t type)); -@@ -366,6 +391,7 @@ - floatp x_start, floatp y_start, gx_path_type_t type)); - - private int escv_endpath(P2(gx_device_vector * vdev, gx_path_type_t type)); -+#endif - private int escv_setlinewidth(gx_device_vector * vdev, floatp width); - private int escv_setlinecap(gx_device_vector * vdev, gs_line_cap cap); - private int escv_setlinejoin(gx_device_vector * vdev, gs_line_join join); -@@ -1578,7 +1604,7 @@ - pdev->MaskState = 1; - } - color_set_pure(&color, one); -- code = gdev_vector_update_fill_color((gx_device_vector *) pdev, &color); -+ code = gdev_vector_update_fill_color((gx_device_vector *) pdev, NULL, &color); - - /* ここを通過したら以下の色設定は無意味? */ - } -@@ -1671,13 +1697,13 @@ - gs_logical_operation_t lop, const gx_clip_path * pcpath) - { - gx_device_vector const *vdev = (gx_device_vector *) dev; -- gx_device_escv const *pdev = (gx_device_escv *) dev; -+ gx_device_escv *pdev = (gx_device_escv *) dev; - stream *s = gdev_vector_stream(vdev); - - if (w <= 0 || h <= 0) return 0; - - if (depth > 1 || -- gdev_vector_update_fill_color(vdev, pdcolor) < 0 || -+ gdev_vector_update_fill_color(vdev, NULL, pdcolor) < 0 || - gdev_vector_update_clip_path(vdev, pcpath) < 0 || - gdev_vector_update_log_op(vdev, lop) < 0 - ) diff --git a/print/ghostscript8/files/patch-eplaser:gdevesmv.c b/print/ghostscript8/files/patch-eplaser:gdevesmv.c deleted file mode 100644 index 0d56322a5eb8..000000000000 --- a/print/ghostscript8/files/patch-eplaser:gdevesmv.c +++ /dev/null @@ -1,102 +0,0 @@ ---- eplaser/gdevesmv.c.orig Mon May 17 14:25:19 2004 -+++ eplaser/gdevesmv.c Mon Aug 2 14:05:21 2004 -@@ -34,10 +34,6 @@ - - */ - --#include <stdlib.h> --#include <unistd.h> --#include <string.h> -- - #include "math_.h" - #include "gx.h" - #include "gserrors.h" -@@ -59,6 +55,10 @@ - #include "gspath.h" - #include "gzpath.h" - -+#include <stdlib.h> -+#include <unistd.h> -+#include <string.h> -+ - /* ---------------- Device definition ---------------- */ - - /* Device procedures */ -@@ -428,6 +428,16 @@ - - - /* Vector device implementation */ -+#if GS_VERSION_MAJOR >= 8 -+private int esmv_beginpage(gx_device_vector * vdev); -+private int esmv_setfillcolor(gx_device_vector * vdev, const gx_drawing_color * pdc); -+private int esmv_setstrokecolor(gx_device_vector * vdev, const gx_drawing_color * pdc); -+private int esmv_setdash(gx_device_vector * vdev, const float *pattern, -+ uint count, floatp offset); -+private int esmv_setflat(gx_device_vector * vdev, floatp flatness); -+private int esmv_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, -+ gs_logical_operation_t diff); -+#else - private int esmv_beginpage(P1(gx_device_vector * vdev)); - private int esmv_setfillcolor(P2(gx_device_vector * vdev, const gx_drawing_color * pdc)); - private int esmv_setstrokecolor(P2(gx_device_vector * vdev, const gx_drawing_color * pdc)); -@@ -436,10 +446,25 @@ - private int esmv_setflat(P2(gx_device_vector * vdev, floatp flatness)); - private int esmv_setlogop(P3(gx_device_vector * vdev, gs_logical_operation_t lop, - gs_logical_operation_t diff)); -+#endif - private int esmv_vector_dorect(gx_device_vector * vdev, fixed x0, fixed y0, fixed x1, - fixed y1, gx_path_type_t type); - private int esmv_vector_dopath(gx_device_vector * vdev, const gx_path * ppath, - gx_path_type_t type); -+#if GS_VERSION_MAJOR >= 8 -+private int esmv_beginpath(gx_device_vector * vdev, gx_path_type_t type); -+private int esmv_moveto(gx_device_vector * vdev, floatp x0, floatp y0, -+ floatp x, floatp y, gx_path_type_t type); -+private int esmv_lineto(gx_device_vector * vdev, floatp x0, floatp y0, -+ floatp x, floatp y, gx_path_type_t type); -+private int esmv_curveto(gx_device_vector * vdev, floatp x0, floatp y0, -+ floatp x1, floatp y1, floatp x2, floatp y2, -+ floatp x3, floatp y3, gx_path_type_t type); -+private int esmv_closepath(gx_device_vector * vdev, floatp x, floatp y, -+ floatp x_start, floatp y_start, gx_path_type_t type); -+ -+private int esmv_endpath(gx_device_vector * vdev, gx_path_type_t type); -+#else - private int esmv_beginpath(P2(gx_device_vector * vdev, gx_path_type_t type)); - private int esmv_moveto(P6(gx_device_vector * vdev, floatp x0, floatp y0, - floatp x, floatp y, gx_path_type_t type)); -@@ -452,6 +477,7 @@ - floatp x_start, floatp y_start, gx_path_type_t type)); - - private int esmv_endpath(P2(gx_device_vector * vdev, gx_path_type_t type)); -+#endif - private int esmv_setlinewidth(gx_device_vector * vdev, floatp width); - private int esmv_setlinecap(gx_device_vector * vdev, gs_line_cap cap); - private int esmv_setlinejoin(gx_device_vector * vdev, gs_line_join join); -@@ -1688,7 +1714,7 @@ - pdev->MaskState = 1; - } - color_set_pure(&color, one); -- code = gdev_vector_update_fill_color((gx_device_vector *) pdev, &color); -+ code = gdev_vector_update_fill_color((gx_device_vector *) pdev, NULL, &color); - - /* ここを通過したら以下の色設定は無意味? */ - } -@@ -1771,7 +1797,7 @@ - gs_logical_operation_t lop, const gx_clip_path * pcpath) - { - gx_device_vector const *vdev = (gx_device_vector *) dev; -- gx_device_esmv const *pdev = (gx_device_esmv *) dev; -+ gx_device_esmv *pdev = (gx_device_esmv *) dev; - stream *s = gdev_vector_stream(vdev); - gx_color_index color = gx_dc_pure_color(pdcolor); - char obuf[64]; -@@ -1779,7 +1805,7 @@ - if (w <= 0 || h <= 0) return 0; - - if (depth > 1 || -- gdev_vector_update_fill_color(vdev, pdcolor) < 0 || -+ gdev_vector_update_fill_color(vdev, NULL, pdcolor) < 0 || - gdev_vector_update_clip_path(vdev, pcpath) < 0 || - gdev_vector_update_log_op(vdev, lop) < 0 - ) diff --git a/print/ghostscript8/files/patch-gdev10v:gdev10v.mak b/print/ghostscript8/files/patch-gdev10v:gdev10v.mak deleted file mode 100644 index 25a8317379b8..000000000000 --- a/print/ghostscript8/files/patch-gdev10v:gdev10v.mak +++ /dev/null @@ -1,22 +0,0 @@ ---- gdev10v/gdev10v.mak.orig Thu Oct 12 11:17:50 2000 -+++ gdev10v/gdev10v.mak Thu Oct 12 11:21:12 2000 -@@ -1,12 +1,13 @@ - ### ----------------- The Canon BubbleJet BJ10v device ----------------- ### - --bj10v_=gdev10v.$(OBJ) gdevprn.$(OBJ) --bj10v.dev: $(bj10v_) -- $(SHP)gssetdev bj10v $(bj10v_) --bj10vh.dev: $(bj10v_) -- $(SHP)gssetdev bj10vh $(bj10v_) -+bj10v_=$(GLOBJ)gdev10v.$(OBJ) $(GLOBJ)gdevprn.$(OBJ) -+$(DD)bj10v.dev: $(bj10v_) $(DD)page.dev -+ $(SETPDEV) $(DD)bj10v $(bj10v_) -+$(DD)bj10vh.dev: $(bj10v_) $(DD)page.dev -+ $(SETPDEV) $(DD)bj10vh $(bj10v_) - - # Uncomment the following line if you are using MS-DOS on PC9801 series. - --gdev10v.$(OBJ): gdevbj10.c $(PDEVH) -+$(GLOBJ)gdev10v.$(OBJ): $(GLSRC)gdevbj10.c $(PDEVH) -+ $(GLCC) $(GLO_)gdev10v.$(OBJ) $(C_) $(GLSRC)gdev10v.c - # $(CCC) -DPC9801 gdev10v.c diff --git a/print/ghostscript8/files/patch-gdev10v__gdev10v.c b/print/ghostscript8/files/patch-gdev10v__gdev10v.c deleted file mode 100644 index 46887cfad39c..000000000000 --- a/print/ghostscript8/files/patch-gdev10v__gdev10v.c +++ /dev/null @@ -1,23 +0,0 @@ ---- gdev10v/gdev10v.c.orig Sat Dec 11 04:10:45 1993 -+++ gdev10v/gdev10v.c Fri Dec 17 19:15:49 2004 -@@ -152,8 +152,8 @@ - int bytes_per_column = bits_per_column / 8; - int x_skip_unit = bytes_per_column * (xres / 180); - int y_skip_unit = (yres / 180); -- byte *in = (byte *)gs_malloc(8, line_size, "bj10v_print_page(in)"); -- byte *out = (byte *)gs_malloc(bits_per_column, line_size, "bj10v_print_page(out)"); -+ byte *in = (byte *)gs_malloc(pdev->memory, 8, line_size, "bj10v_print_page(in)"); -+ byte *out = (byte *)gs_malloc(pdev->memory, bits_per_column, line_size, "bj10v_print_page(out)"); - int lnum = 0; - int y_skip = 0; - int code = 0; -@@ -275,7 +275,7 @@ - /* Eject the page */ - xit: prn_putc(pdev, 014); /* form feed */ - prn_flush(pdev); -- gs_free((char *)out, bits_per_column, line_size, "bj10v_print_page(out)"); -- gs_free((char *)in, 8, line_size, "bj10v_print_page(in)"); -+ gs_free(pdev->memory, (char *)out, bits_per_column, line_size, "bj10v_print_page(out)"); -+ gs_free(pdev->memory, (char *)in, 8, line_size, "bj10v_print_page(in)"); - return code; - } diff --git a/print/ghostscript8/files/patch-lex7000__src__gdevlx7.c b/print/ghostscript8/files/patch-lex7000__src__gdevlx7.c deleted file mode 100644 index d3a72fa97dd3..000000000000 --- a/print/ghostscript8/files/patch-lex7000__src__gdevlx7.c +++ /dev/null @@ -1,31 +0,0 @@ ---- lex7000/src/gdevlx7.c.orig Fri Dec 31 17:22:48 2004 -+++ lex7000/src/gdevlx7.c Fri Dec 31 17:24:39 2004 -@@ -615,14 +615,14 @@ - dprintf2("Current resolution is %f width x %f height dpi\n", - pdev->x_pixels_per_inch, pdev->y_pixels_per_inch ); - #endif -- pbuf = (byte *)gs_malloc(rpbufsize, 1, "lxmgen_print_page(pbuf)"); -+ pbuf = (byte *)gs_malloc(pdev->memory, rpbufsize, 1, "lxmgen_print_page(pbuf)"); - if (pbuf == NULL) - return_error(gs_error_VMerror); - -- outbuf = (byte *)gs_malloc(OUT_BUF_SIZE, 1, "lxmgen_print_page(outbuf)"); -+ outbuf = (byte *)gs_malloc(pdev->memory, OUT_BUF_SIZE, 1, "lxmgen_print_page(outbuf)"); - if (outbuf == NULL) - { -- gs_free((char*)pbuf,pbufsize, 1, "lxmgen_print_page(pbuf)"); -+ gs_free(pdev->memory, (char*)pbuf,pbufsize, 1, "lxmgen_print_page(pbuf)"); - return_error(gs_error_VMerror); - } - /* initialize begin of outbuf ... */ -@@ -799,8 +799,8 @@ - - /* eject page */ - lex_eject(prn_stream); -- gs_free((char*)pbuf,rpbufsize, 1, "lxmgen_print_page(pbuf)"); -- gs_free((char*)outbuf,OUT_BUF_SIZE, 1, "lxmgen_print_page(outbuf)"); -+ gs_free(pdev->memory, (char*)pbuf,rpbufsize, 1, "lxmgen_print_page(pbuf)"); -+ gs_free(pdev->memory, (char*)outbuf,OUT_BUF_SIZE, 1, "lxmgen_print_page(outbuf)"); - - #ifdef DEBUG - dprintf1("[%s] print_page() end\n",pdev->dname); diff --git a/print/ghostscript8/files/patch-lib::cidfmap b/print/ghostscript8/files/patch-lib::cidfmap index a231ec0f220e..fe06650806e5 100644 --- a/print/ghostscript8/files/patch-lib::cidfmap +++ b/print/ghostscript8/files/patch-lib::cidfmap @@ -1,6 +1,6 @@ --- lib/cidfmap.orig Thu Dec 29 04:56:24 2005 -+++ lib/cidfmap Mon Apr 9 00:47:56 2007 -@@ -26,3 +26,27 @@ ++++ lib/cidfmap Sat Apr 28 15:25:55 2007 +@@ -26,3 +26,31 @@ % /ShinGo-Bold /HeiseiKakuGo-W5 ; % /Ryumin-Medium << /FileType /TrueType /Path (H:/AuxFiles/Fonts/BATANG.TTC) /SubfontID 3 /CSI [(Japan1) 2] >> ; % @@ -28,3 +28,7 @@ +/HYGoThic-Medium /MunhwaGothic-Regular ; +/HYSMyeongJo-Medium /Munhwa-Regular ; +/HYRGoThic-Medium /MunhwaGothic-Bold ; ++ ++/STHeiti-Regular << /FileType /TrueType /Path (STHeiti-Regular.ttf) /SubfontID 0 /CSI [(CNS1) 5] >> ; ++/STSong-Light << /FileType /TrueType /Path (STSong-Light.ttf) /SubfontID 0 /CSI [(GB1) 5] >> ; ++/MSung-Light << /FileType /TrueType /Path (MSung-Light.ttf) /SubfontID 0 /CSI [(GB1) 5] >> ; diff --git a/print/ghostscript8/files/patch-lib:gs_init.ps b/print/ghostscript8/files/patch-lib:gs_init.ps index 11ec1bba61cd..a5c5eaf1b8f3 100644 --- a/print/ghostscript8/files/patch-lib:gs_init.ps +++ b/print/ghostscript8/files/patch-lib:gs_init.ps @@ -1,14 +1,5 @@ --- lib/gs_init.ps.orig Sat Mar 5 07:02:23 2005 +++ lib/gs_init.ps Thu Apr 21 13:05:43 2005 -@@ -1440,7 +1440,7 @@ - % Set the default screen and BG/UCR. - /.setdefaultbgucr { - systemdict /setblackgeneration known { -- { pop 0 } dup setblackgeneration setundercolorremoval -+ {} dup setblackgeneration setundercolorremoval - } if - } bind def - /.useloresscreen { % - .useloresscreen <bool> @@ -2241,3 +2241,7 @@ ifelse diff --git a/print/ghostscript8/files/patch-lips:gdevl4r.c b/print/ghostscript8/files/patch-lips:gdevl4r.c deleted file mode 100644 index e7ab9d0ecbe2..000000000000 --- a/print/ghostscript8/files/patch-lips:gdevl4r.c +++ /dev/null @@ -1,176 +0,0 @@ ---- lips/gdevl4r.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevl4r.c Fri Dec 17 19:19:02 2004 -@@ -53,8 +53,8 @@ - #define lips_device(dtype, procs, dname, xdpi, ydpi, lm, bm, rm, tm, color_bits,\ - print_page_copies, image_out, cassetFeed, username)\ - { std_device_std_color_full_body(dtype, &procs, dname,\ -- (int)((long)(DEFAULT_WIDTH_10THS) * (xdpi) / 10),\ -- (int)((long)(DEFAULT_HEIGHT_10THS) * (ydpi) / 10),\ -+ (int)((long)((DEFAULT_WIDTH_10THS) * (xdpi)) / 10),\ -+ (int)((long)((DEFAULT_HEIGHT_10THS) * (ydpi)) / 10),\ - xdpi, ydpi, color_bits,\ - -(lm) * (xdpi), -(tm) * (ydpi),\ - (lm) * 72.0, (bm) * 72.0,\ -@@ -68,8 +68,8 @@ - #define lips4_device(dtype, procs, dname, xdpi, ydpi, lm, bm, rm, tm, color_bits,\ - print_page_copies, image_out, cassetFeed, username)\ - { std_device_std_color_full_body(dtype, &procs, dname,\ -- (int)((long)(DEFAULT_WIDTH_10THS) * (xdpi) / 10),\ -- (int)((long)(DEFAULT_HEIGHT_10THS) * (ydpi) / 10),\ -+ (int)((long)((DEFAULT_WIDTH_10THS) * (xdpi)) / 10),\ -+ (int)((long)((DEFAULT_HEIGHT_10THS) * (ydpi)) / 10),\ - xdpi, ydpi, color_bits,\ - -(lm) * (xdpi), -(tm) * (ydpi),\ - (lm) * 72.0, (bm) * 72.0,\ -@@ -178,8 +178,13 @@ - private int lips4c_output_page(gx_device_printer * pdev, FILE * prn_stream); - private int lips_delta_encode(byte * inBuff, byte * prevBuff, byte * outBuff, byte * diffBuff, int Length); - private int lips_byte_cat(byte * TotalBuff, byte * Buff, int TotalLen, int Len); -+#if GS_VERSION_MAJOR >= 8 -+private int lips_print_page_copies(gx_device_printer * pdev, FILE * prn_stream, lips_printer_type ptype, int numcopies); -+private int lips_print_page_copies(gx_device_printer * pdev, FILE * prn_stream, lips_printer_type ptype, int numcopies); -+#else - private int lips_print_page_copies(P4(gx_device_printer * pdev, FILE * prn_stream, lips_printer_type ptype, int numcopies)); - private int lips_print_page_copies(P4(gx_device_printer * pdev, FILE * prn_stream, lips_printer_type ptype, int numcopies)); -+#endif - private int lips4type_print_page_copies(gx_device_printer * pdev, FILE * prn_stream, int num_copies, int ptype); - - private int -@@ -597,7 +602,7 @@ - /* Initialize printer. */ - lips_job_start(pdev, ptype, prn_stream, num_copies); - -- if (!(lprn->CompBuf = gs_malloc(bpl * 3 / 2 + 1, maxY, "(CompBuf)"))) -+ if (!(lprn->CompBuf = gs_malloc(pdev->memory, bpl * 3 / 2 + 1, maxY, "(CompBuf)"))) - return_error(gs_error_VMerror); - - -@@ -607,7 +612,7 @@ - if (code < 0) - return code; - -- gs_free(lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "(CompBuf)"); -+ gs_free(pdev->memory, lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "(CompBuf)"); - - /* eject page */ - lips_job_end(pdev, prn_stream); -@@ -641,9 +646,9 @@ - - if (pdev->color_info.depth == 1) - { -- if (!(lprn->CompBuf = gs_malloc(bpl * 3 / 2 + 1, maxY, "(CompBuf)"))) -+ if (!(lprn->CompBuf = gs_malloc(pdev->memory, bpl * 3 / 2 + 1, maxY, "(CompBuf)"))) - return_error(gs_error_VMerror); -- if (!(lprn->CompBuf2 = gs_malloc(bpl * 3 / 2 + 1, maxY, "(CompBuf2)"))) -+ if (!(lprn->CompBuf2 = gs_malloc(pdev->memory, bpl * 3 / 2 + 1, maxY, "(CompBuf2)"))) - return_error(gs_error_VMerror); - - if (lprn->NegativePrint) { -@@ -663,8 +668,8 @@ - if (code < 0) - return code; - -- gs_free(lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "(CompBuf)"); -- gs_free(lprn->CompBuf2, bpl * 3 / 2 + 1, maxY, "(CompBuf2)"); -+ gs_free(pdev->memory, lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "(CompBuf)"); -+ gs_free(pdev->memory, lprn->CompBuf2, bpl * 3 / 2 + 1, maxY, "(CompBuf2)"); - } - else - { -@@ -903,15 +908,15 @@ - int lnum = 0; - - /* Memory Allocate */ -- if (!(pBuff = (byte *) gs_malloc(nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(pBuff)"))) -+ if (!(pBuff = (byte *) gs_malloc(pdev->memory, nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(pBuff)"))) - return_error(gs_error_VMerror); -- if (!(prevBuff = (byte *) gs_malloc(nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(prevBuff)"))) -+ if (!(prevBuff = (byte *) gs_malloc(pdev->memory, nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(prevBuff)"))) - return_error(gs_error_VMerror); -- if (!(ComBuff = (byte *) gs_malloc(Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128, sizeof(byte), "lips4c_compress_output_page(ComBuff)"))) -+ if (!(ComBuff = (byte *) gs_malloc(pdev->memory, Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128, sizeof(byte), "lips4c_compress_output_page(ComBuff)"))) - return_error(gs_error_VMerror); -- if (!(TotalBuff = (byte *) gs_malloc((Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128) * NUM_LINES_4C, sizeof(byte), "lips4c_compress_output_page(TotalBuff)"))) -+ if (!(TotalBuff = (byte *) gs_malloc(pdev->memory, (Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128) * NUM_LINES_4C, sizeof(byte), "lips4c_compress_output_page(TotalBuff)"))) - return_error(gs_error_VMerror); -- if (!(diffBuff = (byte *) gs_malloc(Xpixel * num_components * 2, sizeof(byte), "lips_print_page"))) -+ if (!(diffBuff = (byte *) gs_malloc(pdev->memory, Xpixel * num_components * 2, sizeof(byte), "lips_print_page"))) - return_error(gs_error_VMerror); - - /* make output data */ -@@ -927,11 +932,11 @@ - pdev->height - (lnum - NUM_LINES_4C)); - } - /* Free Memory */ -- gs_free(pBuff, nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(pBuff)"); -- gs_free(prevBuff, nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(prevBuff)"); -- gs_free(ComBuff, Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128, sizeof(byte), "lips4c_compress_output_page(ComBuff)"); -- gs_free(TotalBuff, (Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128) * NUM_LINES_4C, sizeof(byte), "lips4c_compress_output_page(TotalBuff)"); -- gs_free(diffBuff, Xpixel * num_components * 2, sizeof(byte), "lips_print_page"); -+ gs_free(pdev->memory, pBuff, nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(pBuff)"); -+ gs_free(pdev->memory, prevBuff, nBytesPerLine, sizeof(byte), "lips4c_compress_output_page(prevBuff)"); -+ gs_free(pdev->memory, ComBuff, Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128, sizeof(byte), "lips4c_compress_output_page(ComBuff)"); -+ gs_free(pdev->memory, TotalBuff, (Xpixel * num_components + (Xpixel * num_components + 127) * 129 / 128) * NUM_LINES_4C, sizeof(byte), "lips4c_compress_output_page(TotalBuff)"); -+ gs_free(pdev->memory, diffBuff, Xpixel * num_components * 2, sizeof(byte), "lips_print_page"); - - return 0; - } -@@ -1065,11 +1070,25 @@ - if (paper_size == USER_SIZE) { - fprintf(prn_stream, "%c2 I", LIPS_CSI); - fprintf(prn_stream, "%c80;%d;%dp", LIPS_CSI, -- width * 10, height * 10); -+ /* modified by shige 06/27 2003 -+ width * 10, height * 10); */ -+ /* modified by shige 11/09 2003 -+ height * 10, width * 10); */ -+ (height * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (height * 10), -+ (width * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (width * 10)); - } else if (paper_size == USER_SIZE + LANDSCAPE) { - fprintf(prn_stream, "%c2 I", LIPS_CSI); - fprintf(prn_stream, "%c81;%d;%dp", LIPS_CSI, -- height * 10, width * 10); -+ /* modified by shige 06/27 2003 -+ width * 10, height * 10); */ -+ /* modified by shige 11/09 2003 -+ width * 10, height * 10); */ -+ (width * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (width * 10), -+ (height * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (height * 10)); - } else { - fprintf(prn_stream, "%c%dp", LIPS_CSI, paper_size); - } -@@ -1078,14 +1097,28 @@ - prev_paper_height != height) { - fprintf(prn_stream, "%c2 I", LIPS_CSI); - fprintf(prn_stream, "%c80;%d;%dp", LIPS_CSI, -- width * 10, height * 10); -+ /* modified by shige 06/27 2003 -+ width * 10, height * 10); */ -+ /* modified by shige 11/09 2003 -+ height * 10, width * 10); */ -+ (height * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (height * 10), -+ (width * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (width * 10)); - } - } else if (paper_size == USER_SIZE + LANDSCAPE) { - if (prev_paper_width != width || - prev_paper_height != height) { - fprintf(prn_stream, "%c2 I", LIPS_CSI); - fprintf(prn_stream, "%c81;%d;%dp", LIPS_CSI, -- height * 10, width * 10); -+ /* modified by shige 06/27 2003 -+ height * 10, width * 10); */ -+ /* modified by shige 11/09 2003 -+ width * 10, height * 10); */ -+ (width * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (width * 10), -+ (height * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (height * 10)); - } - } - /* desired number of copies */ diff --git a/print/ghostscript8/files/patch-lips:gdevl4v.c b/print/ghostscript8/files/patch-lips:gdevl4v.c deleted file mode 100644 index 8713a1469f3c..000000000000 --- a/print/ghostscript8/files/patch-lips:gdevl4v.c +++ /dev/null @@ -1,173 +0,0 @@ ---- lips/gdevl4v.c.orig Thu Nov 2 05:09:18 2000 -+++ lips/gdevl4v.c Sun Jun 11 15:57:43 2006 -@@ -230,41 +230,67 @@ - }; - - /* Vector device implementation */ --private int lips4v_beginpage(P1(gx_device_vector * vdev)); --private int lips4v_setfillcolor(P2(gx_device_vector * vdev, -- const gx_drawing_color * pdc)); --private int lips4v_setstrokecolor(P2(gx_device_vector * vdev, -- const gx_drawing_color * pdc)); --private int lips4v_setdash(P4(gx_device_vector * vdev, const float *pattern, -- uint count, floatp offset)); --private int lips4v_setflat(P2(gx_device_vector * vdev, floatp flatness)); -+#if GS_VERSION_MAJOR >= 8 -+private int lips4v_beginpage(gx_device_vector * vdev); -+private int lips4v_setfillcolor(gx_device_vector * vdev, -+ const gx_drawing_color * pdc); -+private int lips4v_setstrokecolor(gx_device_vector * vdev, -+ const gx_drawing_color * pdc); -+private int lips4v_setdash(gx_device_vector * vdev, const float *pattern, -+ uint count, floatp offset); -+private int lips4v_setflat(gx_device_vector * vdev, floatp flatness); -+private int -+lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, -+ gs_logical_operation_t diff); -+private int -+ -+lips4v_beginpath(gx_device_vector * vdev, gx_path_type_t type); -+private int -+lips4v_moveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -+ floatp y, gx_path_type_t type); -+private int -+lips4v_lineto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -+ floatp y, gx_path_type_t type); - private int --lips4v_setlogop(P3 -+lips4v_curveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x1, -+ floatp y1, floatp x2, floatp y2, floatp x3, floatp y3, -+ gx_path_type_t type); -+private int -+lips4v_closepath(gx_device_vector * vdev, floatp x, floatp y, floatp x_start, -+ floatp y_start, gx_path_type_t type); - -- (gx_device_vector * vdev, gs_logical_operation_t lop, -- gs_logical_operation_t diff)); -+private int lips4v_endpath(gx_device_vector * vdev, gx_path_type_t type); -+#else -+private int lips4v_beginpage(P1(gx_device_vector * vdev)); -+private int lips4v_setfillcolor(gx_device_vector * vdev, -+ const gx_drawing_color * pdc); -+private int lips4v_setstrokecolor(gx_device_vector * vdev, -+ const gx_drawing_color * pdc); -+private int lips4v_setdash(gx_device_vector * vdev, const float *pattern, -+ uint count, floatp offset); -+private int lips4v_setflat(gx_device_vector * vdev, floatp flatness); -+private int -+lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, -+ gs_logical_operation_t diff); - private int - --lips4v_beginpath(P2(gx_device_vector * vdev, gx_path_type_t type)); -+lips4v_beginpath(gx_device_vector * vdev, gx_path_type_t type); - private int --lips4v_moveto(P6 -- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -- floatp y, gx_path_type_t type)); -+lips4v_moveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -+ floatp y, gx_path_type_t type); - private int --lips4v_lineto(P6 -- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -- floatp y, gx_path_type_t type)); -+lips4v_lineto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -+ floatp y, gx_path_type_t type); - private int --lips4v_curveto(P10 -- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x1, -+lips4v_curveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x1, - floatp y1, floatp x2, floatp y2, floatp x3, floatp y3, -- gx_path_type_t type)); -+ gx_path_type_t type); - private int --lips4v_closepath(P6 -- (gx_device_vector * vdev, floatp x, floatp y, floatp x_start, -- floatp y_start, gx_path_type_t type)); -+lips4v_closepath(gx_device_vector * vdev, floatp x, floatp y, floatp x_start, -+ floatp y_start, gx_path_type_t type); - --private int lips4v_endpath(P2(gx_device_vector * vdev, gx_path_type_t type)); -+private int lips4v_endpath(gx_device_vector * vdev, gx_path_type_t type); -+#endif - private int lips4v_setlinewidth(gx_device_vector * vdev, floatp width); - private int lips4v_setlinecap(gx_device_vector * vdev, gs_line_cap cap); - private int lips4v_setlinejoin(gx_device_vector * vdev, gs_line_join join); -@@ -758,10 +784,26 @@ - /* 用紙サイズ */ - if (pdev->prev_paper_size != paper_size) { - if (paper_size == USER_SIZE) { -- sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); -+ /* modified by shige 06/27 2003 -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */ -+ /* modified by shige 11/09 2003 -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */ -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, -+ (height * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (height * 10), -+ (width * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (width * 10)); - lputs(s, paper); - } else if (paper_size == USER_SIZE + LANDSCAPE) { -- sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); -+ /* modified by shige 06/27 2003 -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */ -+ /* modified by shige 11/09 2003 -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */ -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, -+ (width * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (width * 10), -+ (height * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (height * 10)); - lputs(s, paper); - } else { - sprintf(paper, "%c%dp", LIPS_CSI, paper_size); -@@ -770,12 +812,28 @@ - } else if (paper_size == USER_SIZE) { - if (pdev->prev_paper_width != width || - pdev->prev_paper_height != height) -- sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); -+ /* modified by shige 06/27 2003 -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, width * 10, height * 10); */ -+ /* modified by shige 11/09 2003 -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, height * 10, width * 10); */ -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, -+ (height * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (height * 10), -+ (width * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (width * 10)); - lputs(s, paper); - } else if (paper_size == USER_SIZE + LANDSCAPE) { - if (pdev->prev_paper_width != width || - pdev->prev_paper_height != height) -- sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); -+ /* modified by shige 06/27 2003 -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, height * 10, width * 10); */ -+ /* modified by shige 11/09 2003 -+ sprintf(paper, "%c81;%d;%dp", LIPS_CSI, width * 10, height * 10); */ -+ sprintf(paper, "%c80;%d;%dp", LIPS_CSI, -+ (width * 10 > LIPS_HEIGHT_MAX_720)? -+ LIPS_HEIGHT_MAX_720 : (width * 10), -+ (height * 10 > LIPS_WIDTH_MAX_720)? -+ LIPS_WIDTH_MAX_720 : (height * 10)); - lputs(s, paper); - } - pdev->prev_paper_size = paper_size; -@@ -1881,7 +1939,7 @@ - } - color_set_pure(&color, one); - code = gdev_vector_update_fill_color((gx_device_vector *) pdev, -- &color); -+ NULL, &color); - } - if (code < 0) - return 0; -@@ -2026,7 +2084,7 @@ - if (w <= 0 || h <= 0) - return 0; - if (depth > 1 || -- gdev_vector_update_fill_color(vdev, pdcolor) < 0 || -+ gdev_vector_update_fill_color(vdev, NULL, pdcolor) < 0 || - gdev_vector_update_clip_path(vdev, pcpath) < 0 || - gdev_vector_update_log_op(vdev, lop) < 0) - return gx_default_fill_mask(dev, data, data_x, raster, id, diff --git a/print/ghostscript8/files/patch-lips:gdevlips.c b/print/ghostscript8/files/patch-lips:gdevlips.c deleted file mode 100644 index 143fed14f0a1..000000000000 --- a/print/ghostscript8/files/patch-lips:gdevlips.c +++ /dev/null @@ -1,18 +0,0 @@ ---- lips/gdevlips.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevlips.c Tue Jan 13 01:23:47 2004 -@@ -62,7 +62,15 @@ - height = tmp; - } - for (pt = lips_paper_table; pt->num_unit < 80; pt++) -+/* add by shige 11/06 2003 */ -+#ifdef USE_LIPS_SIZE_ERROR -+ if(pt->width+LIPS_SIZE_ERROR_VALUE>=width -+ && pt->width-LIPS_SIZE_ERROR_VALUE<=width -+ && pt->height+LIPS_SIZE_ERROR_VALUE>=height -+ && pt->height-LIPS_SIZE_ERROR_VALUE<=height) -+#else - if (pt->width == width && pt->height == height) -+#endif - break; - - return pt->num_unit + landscape; diff --git a/print/ghostscript8/files/patch-lips:gdevlips.h b/print/ghostscript8/files/patch-lips:gdevlips.h deleted file mode 100644 index eebce89cc054..000000000000 --- a/print/ghostscript8/files/patch-lips:gdevlips.h +++ /dev/null @@ -1,17 +0,0 @@ ---- lips/gdevlips.h.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevlips.h Tue Jan 13 01:23:47 2004 -@@ -188,6 +188,14 @@ - bool faceup;\ - char mediaType[LIPS_MEDIACHAR_MAX]; - -+/* added by shige 11/06 2003 */ -+#define USE_LIPS_SIZE_ERROR -+#define LIPS_SIZE_ERROR_VALUE 2 -+ -+/* added by shige 11/09 2003 */ -+#define LIPS_HEIGHT_MAX_720 11906 -+#define LIPS_WIDTH_MAX_720 8419 -+ - int lips_media_selection(int width, int height); - int lips_packbits_encode(byte * inBuff, byte * outBuff, int Length); - int lips_mode3format_encode(byte * inBuff, byte * outBuff, int Length); diff --git a/print/ghostscript8/files/patch-lips:gdevlips.mak b/print/ghostscript8/files/patch-lips:gdevlips.mak deleted file mode 100644 index a434f739a5fa..000000000000 --- a/print/ghostscript8/files/patch-lips:gdevlips.mak +++ /dev/null @@ -1,59 +0,0 @@ ---- lips/gdevlips.mak.orig Thu Nov 2 12:12:13 2000 -+++ lips/gdevlips.mak Sat Sep 27 22:16:20 2003 -@@ -1,17 +1,19 @@ - # ---------------- Laser Printer devices ---------------- # - # $Id: gdevlips.mak $ - -+lips_opts=-DGS_VERSION_MAJOR=$(GS_VERSION_MAJOR) -+ - $(GLOBJ)gdevlprn.$(OBJ): $(GLSRC)gdevlprn.c $(GLSRC)gdevlprn.h\ - $(gdevprn_h) $(PDEVH) -- $(GLCC) $(GLO_)gdevlprn.$(OBJ) $(C_) $(GLSRC)gdevlprn.c -+ $(GLCC) $(GLO_)gdevlprn.$(OBJ) $(C_) $(lips_opts) $(GLSRC)gdevlprn.c - - ### --- The Canon LIPS II+/III/IVc/IV printer device --- ### - - lipsr_=$(GLOBJ)gdevl4r.$(OBJ) $(GLOBJ)gdevlips.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ) - $(GLOBJ)gdevl4r.$(OBJ): $(GLSRC)gdevl4r.c $(GLSRC)gdevlips.h $(PDEVH) -- $(GLCC) -DA4 $(GLO_)gdevl4r.$(OBJ) $(C_) $(GLSRC)gdevl4r.c -+ $(GLCC) -DA4 $(GLO_)gdevl4r.$(OBJ) $(C_) $(lips_opts) $(GLSRC)gdevl4r.c - $(GLOBJ)gdevlips.$(OBJ): $(GLSRC)gdevlips.c -- $(GLCC) $(GLO_)gdevlips.$(OBJ) $(C_) $(GLSRC)gdevlips.c -+ $(GLCC) $(GLO_)gdevlips.$(OBJ) $(C_) $(lips_opts) $(GLSRC)gdevlips.c - $(DD)lips2p.dev: $(lipsr_) $(DD)page.dev - $(SETPDEV) $(DD)lips2p $(lipsr_) - $(DD)lips3.dev: $(lipsr_) $(DD)page.dev -@@ -29,13 +31,13 @@ - $(GLOBJ)gdevl4v.$(OBJ): $(GLSRC)gdevl4v.c $(GLSRC)gdevlips.h $(GDEV) $(math__h)\ - $(gscspace_h) $(gsutil_h) $(gsparam_h) $(gsmatrix_h) $(gdevvec_h)\ - $(ghost_h) $(gzstate_h) $(igstate_h) -- $(GLCC) -DA4 $(GLO_)gdevl4v.$(OBJ) $(C_) $(GLSRC)gdevl4v.c -+ $(GLCC) -DA4 $(GLO_)gdevl4v.$(OBJ) $(C_) $(lips_opts) $(GLSRC)gdevl4v.c - - ### ------- Epson ESC/Page printer device ----------------- ### - - escpage_=$(GLOBJ)gdevespg.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ) - $(GLOBJ)gdevespg.$(OBJ): $(GLSRC)gdevespg.c $(GLSRC)gdevlprn.h $(PDEVH) -- $(GLCC) -DA4 $(GLO_)gdevespg.$(OBJ) $(C_) $(GLSRC)gdevespg.c -+ $(GLCC) -DA4 $(GLO_)gdevespg.$(OBJ) $(C_) $(lips_opts) $(GLSRC)gdevespg.c - - $(GLOBJ)escpage.dev: $(escpage_) $(DD)page.dev - $(SETPDEV) $(DD)escpage $(escpage_) -@@ -47,7 +49,7 @@ - - npdl_=$(GLOBJ)gdevnpdl.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ) - $(GLOBJ)gdevnpdl.$(OBJ): $(GLSRC)gdevnpdl.c $(GLSRC)gdevlprn.h $(PDEVH) -- $(GLCC) -DA4 $(GLO_)gdevnpdl.$(OBJ) $(C_) $(GLSRC)gdevnpdl.c -+ $(GLCC) -DA4 $(GLO_)gdevnpdl.$(OBJ) $(C_) $(lips_opts) $(GLSRC)gdevnpdl.c - - $(GLOBJ)npdl.dev: $(npdl_) $(DD)page.dev - $(SETPDEV) $(DD)npdl $(npdl_) -@@ -56,7 +58,7 @@ - - rpdl_=$(GLOBJ)gdevrpdl.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ) - $(GLOBJ)gdevrpdl.$(OBJ): $(GLSRC)gdevrpdl.c $(GLSRC)gdevlprn.h $(PDEVH) -- $(GLCC) -DA4 $(GLO_)gdevrpdl.$(OBJ) $(C_) $(GLSRC)gdevrpdl.c -+ $(GLCC) -DA4 $(GLO_)gdevrpdl.$(OBJ) $(C_) $(lips_opts) $(GLSRC)gdevrpdl.c - - $(GLOBJ)rpdl.dev: $(rpdl_) $(DD)page.dev - $(SETPDEV) $(DD)rpdl $(rpdl_) diff --git a/print/ghostscript8/files/patch-lips:gdevlprn.h b/print/ghostscript8/files/patch-lips:gdevlprn.h deleted file mode 100644 index f692dbe410a2..000000000000 --- a/print/ghostscript8/files/patch-lips:gdevlprn.h +++ /dev/null @@ -1,16 +0,0 @@ ---- lips/gdevlprn.h.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevlprn.h Sat Sep 13 23:06:38 2003 -@@ -28,8 +28,13 @@ - - #include "gdevprn.h" - -+#if GS_VERSION_MAJOR >= 8 -+#define lprn_dev_proc_image_out(proc)\ -+ void proc(gx_device_printer *, FILE *, int, int, int, int) -+#else - #define lprn_dev_proc_image_out(proc)\ - void proc(P6(gx_device_printer *, FILE *, int, int, int, int)) -+#endif - - #define dev_proc_image_out(proc) lprn_dev_proc_image_out(proc) - diff --git a/print/ghostscript8/files/patch-lips__gdevespg.c b/print/ghostscript8/files/patch-lips__gdevespg.c deleted file mode 100644 index ae28dffd626e..000000000000 --- a/print/ghostscript8/files/patch-lips__gdevespg.c +++ /dev/null @@ -1,20 +0,0 @@ ---- lips/gdevespg.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevespg.c Fri Dec 17 19:39:57 2004 -@@ -142,7 +142,7 @@ - if (pdev->PageCount == 0) - escpage_printer_initialize(pdev, fp, num_coipes); - -- if (!(lprn->CompBuf = gs_malloc(bpl * 3 / 2 + 1, maxY, "lp2000_print_page_copies(CompBuf)"))) -+ if (!(lprn->CompBuf = gs_malloc(pdev->memory, bpl * 3 / 2 + 1, maxY, "lp2000_print_page_copies(CompBuf)"))) - return_error(gs_error_VMerror); - - if (lprn->NegativePrint) { -@@ -154,7 +154,7 @@ - if (code < 0) - return code; - -- gs_free(lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "lp2000_print_page_copies(CompBuf)"); -+ gs_free(pdev->memory, lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "lp2000_print_page_copies(CompBuf)"); - - if (pdev->Duplex) - fprintf(fp, "%c0dpsE", GS); diff --git a/print/ghostscript8/files/patch-lips__gdevlprn.c b/print/ghostscript8/files/patch-lips__gdevlprn.c deleted file mode 100644 index 236cc5a3a8f5..000000000000 --- a/print/ghostscript8/files/patch-lips__gdevlprn.c +++ /dev/null @@ -1,35 +0,0 @@ ---- lips/gdevlprn.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevlprn.c Fri Dec 17 19:21:08 2004 -@@ -219,13 +219,13 @@ - maxBy = (pdev->height + lprn->nBh - 1) / lprn->nBh; - maxY = lprn->BlockLine / lprn->nBh * lprn->nBh; - -- if (!(lprn->ImageBuf = gs_malloc(bpl, maxY, "lprn_print_image(ImageBuf)"))) -+ if (!(lprn->ImageBuf = gs_malloc(pdev->memory, bpl, maxY, "lprn_print_image(ImageBuf)"))) - return_error(gs_error_VMerror); -- if (!(lprn->TmpBuf = gs_malloc(bpl, maxY, "lprn_print_iamge(TmpBuf)"))) -+ if (!(lprn->TmpBuf = gs_malloc(pdev->memory, bpl, maxY, "lprn_print_iamge(TmpBuf)"))) - return_error(gs_error_VMerror); -- if (!(lprn->bubbleTbl = gs_malloc(sizeof(Bubble *), maxBx, "lprn_print_image(bubbleTbl)"))) -+ if (!(lprn->bubbleTbl = gs_malloc(pdev->memory, sizeof(Bubble *), maxBx, "lprn_print_image(bubbleTbl)"))) - return_error(gs_error_VMerror); -- if (!(bubbleBuffer = gs_malloc(sizeof(Bubble), maxBx, "lprn_print_image(bubbleBuffer)"))) -+ if (!(bubbleBuffer = gs_malloc(pdev->memory, sizeof(Bubble), maxBx, "lprn_print_image(bubbleBuffer)"))) - return_error(gs_error_VMerror); - - for (i = 0; i < maxBx; i++) -@@ -261,10 +261,10 @@ - } - lprn_bubble_flush_all(pdev, fp); /* flush the rest of bubble */ - -- gs_free(lprn->ImageBuf, bpl, maxY, "lprn_print_image(ImageBuf)"); -- gs_free(lprn->TmpBuf, bpl, maxY, "lprn_print_iamge(TmpBuf)"); -- gs_free(lprn->bubbleTbl, sizeof(Bubble *), maxBx, "lprn_print_image(bubbleTbl)"); -- gs_free(bubbleBuffer, sizeof(Bubble), maxBx, "lprn_print_image(bubbleBuffer)"); -+ gs_free(pdev->memory, lprn->ImageBuf, bpl, maxY, "lprn_print_image(ImageBuf)"); -+ gs_free(pdev->memory, lprn->TmpBuf, bpl, maxY, "lprn_print_iamge(TmpBuf)"); -+ gs_free(pdev->memory, lprn->bubbleTbl, sizeof(Bubble *), maxBx, "lprn_print_image(bubbleTbl)"); -+ gs_free(pdev->memory, bubbleBuffer, sizeof(Bubble), maxBx, "lprn_print_image(bubbleBuffer)"); - - return code; - } diff --git a/print/ghostscript8/files/patch-lips__gdevnpdl.c b/print/ghostscript8/files/patch-lips__gdevnpdl.c deleted file mode 100644 index ad237e348f15..000000000000 --- a/print/ghostscript8/files/patch-lips__gdevnpdl.c +++ /dev/null @@ -1,20 +0,0 @@ ---- lips/gdevnpdl.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevnpdl.c Fri Dec 31 17:32:52 2004 -@@ -582,7 +582,7 @@ - int code; - int maxY = lprn->BlockLine / lprn->nBh * lprn->nBh; - -- if (!(lprn->CompBuf = gs_malloc(line_size * maxY, sizeof(byte), "npdl_print_page_copies(CompBuf)"))) -+ if (!(lprn->CompBuf = gs_malloc(pdev->memory, line_size * maxY, sizeof(byte), "npdl_print_page_copies(CompBuf)"))) - return_error(gs_error_VMerror); - - -@@ -680,7 +680,7 @@ - /* Form Feed */ - fputs("\014", prn_stream); - -- gs_free(lprn->CompBuf, line_size * maxY, sizeof(byte), "npdl_print_page_copies(CompBuf)"); -+ gs_free(pdev->memory, lprn->CompBuf, line_size * maxY, sizeof(byte), "npdl_print_page_copies(CompBuf)"); - return 0; - } - diff --git a/print/ghostscript8/files/patch-lips__gdevrpdl.c b/print/ghostscript8/files/patch-lips__gdevrpdl.c deleted file mode 100644 index 8673cb716108..000000000000 --- a/print/ghostscript8/files/patch-lips__gdevrpdl.c +++ /dev/null @@ -1,20 +0,0 @@ ---- lips/gdevrpdl.c.orig Thu Nov 2 12:09:18 2000 -+++ lips/gdevrpdl.c Fri Dec 31 17:34:04 2004 -@@ -81,7 +81,7 @@ - if (pdev->PageCount == 0) - rpdl_printer_initialize(pdev, prn_stream, num_coipes); - -- if (!(lprn->CompBuf = gs_malloc(bpl * 3 / 2 + 1, maxY, "rpdl_print_page_copies(CompBuf)"))) -+ if (!(lprn->CompBuf = gs_malloc(pdev->memory, bpl * 3 / 2 + 1, maxY, "rpdl_print_page_copies(CompBuf)"))) - return_error(gs_error_VMerror); - - lprn->NegativePrint = false; /* Not Support */ -@@ -90,7 +90,7 @@ - if (code < 0) - return code; - -- gs_free(lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "rpdl_print_page_copies(CompBuf)"); -+ gs_free(pdev->memory, lprn->CompBuf, bpl * 3 / 2 + 1, maxY, "rpdl_print_page_copies(CompBuf)"); - - fprintf(prn_stream, "\014"); /* Form Feed */ - diff --git a/print/ghostscript8/files/patch-lxm3200:gdevlx32.c b/print/ghostscript8/files/patch-lxm3200:gdevlx32.c deleted file mode 100644 index e4b45a4bece2..000000000000 --- a/print/ghostscript8/files/patch-lxm3200:gdevlx32.c +++ /dev/null @@ -1,55 +0,0 @@ ---- lxm3200/gdevlx32.c.orig Wed Apr 23 01:06:20 2003 -+++ lxm3200/gdevlx32.c Thu May 26 00:11:50 2005 -@@ -422,9 +422,11 @@ - * of the nearest color. - */ - private gx_color_index --lxm3200_map_rgb_color(gx_device *dev, gx_color_value r, -- gx_color_value g, gx_color_value b) -+lxm3200_map_rgb_color(gx_device *dev, const gx_color_value cv[]) - { -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - gx_color_index col; - int c, m, y; - -@@ -479,7 +481,7 @@ - break; - - default: -- col = gdev_prn_map_rgb_color(dev, r, g, b); -+ col = gdev_prn_map_rgb_color(dev, cv); - break; - } - -@@ -732,10 +734,10 @@ - /* Allocate memory for the buffers and - * verify that the allocation was done properly. - */ -- gendata.scanbuf = (byte *)gs_malloc(gendata.numbytes, gendata.numblines, -+ gendata.scanbuf = (byte *)gs_malloc(pdev->memory, gendata.numbytes, gendata.numblines, - "lxm3200_print_page(scanbuf)"); - -- gendata.outdata = (byte *)gs_malloc(gendata.numbytes, 30, -+ gendata.outdata = (byte *)gs_malloc(pdev->memory, gendata.numbytes, 30, - "lxm3200_print_page(outdata)"); - - if(gendata.scanbuf == NULL || -@@ -943,12 +945,14 @@ - private void - freeresources(void) - { -+ gx_device *pdev; -+ - if(gendata.scanbuf) -- gs_free((char *)gendata.scanbuf, gendata.numbytes, gendata.numblines, -+ gs_free(pdev->memory, (char *)gendata.scanbuf, gendata.numbytes, gendata.numblines, - "lxm3200:freeresources(scanbuf)"); - - if(gendata.outdata) -- gs_free((char *)gendata.outdata, gendata.numbytes, 30, -+ gs_free(pdev->memory, (char *)gendata.outdata, gendata.numbytes, 30, - "lxm3200:freeresources(outdata)"); - } - diff --git a/print/ghostscript8/files/patch-md2k:gdevmd2k.c b/print/ghostscript8/files/patch-md2k:gdevmd2k.c deleted file mode 100644 index 1aeeb74be38f..000000000000 --- a/print/ghostscript8/files/patch-md2k:gdevmd2k.c +++ /dev/null @@ -1,68 +0,0 @@ ---- md2k/gdevmd2k.c.orig Sun May 2 14:07:57 1999 -+++ md2k/gdevmd2k.c Fri Dec 17 19:10:22 2004 -@@ -495,7 +495,7 @@ - int i, j; - - /* allocate memory */ -- work = (byte *)gs_malloc(3+sizeof(int), line_size, -+ work = (byte *)gs_malloc(pdev->memory, 3+sizeof(int), line_size, - "alps_print_page(work)"); - if (work == 0) - return_error(gs_error_VMerror); -@@ -597,7 +597,7 @@ - "\033\052\162\103" - "\033\045\0\130", 1, 9, prn_stream); - -- gs_free((char *)work, 3+sizeof(int), line_size, "alps_print_page(work)"); -+ gs_free(pdev->memory, (char *)work, 3+sizeof(int), line_size, "alps_print_page(work)"); - return 0; - } - -@@ -638,11 +638,13 @@ - (k) = gx_bits_to_color_value((v) & ((1 << (b)) - 1), (b)) - - private gx_color_index --alps_map_cmyk_color(gx_device* pdev, -- gx_color_value c, gx_color_value m, -- gx_color_value y, gx_color_value k) -+alps_map_cmyk_color(gx_device* pdev, const gx_color_value cv[]) - { - gx_color_index color; -+ gx_color_value c = cv[0]; -+ gx_color_value m = cv[1]; -+ gx_color_value y = cv[2]; -+ gx_color_value k = cv[3]; - - switch (pdev->color_info.depth) { - case 1: -@@ -675,10 +677,12 @@ - } - - private gx_color_index --alps_map_cmy_color(gx_device* pdev, -- gx_color_value c, gx_color_value m, -- gx_color_value y, gx_color_value k) -+alps_map_cmy_color(gx_device* pdev, const gx_color_value cv[]) - { -+ gx_color_value c = cv[0]; -+ gx_color_value m = cv[1]; -+ gx_color_value y = cv[2]; -+ gx_color_value k = cv[3]; - int nbits = pdev->color_info.depth; - ulong weight = ((gx_max_color_value - k) << 10) / gx_max_color_value; - c = ((c * weight) >> 10) + k; -@@ -694,10 +698,12 @@ - /* Mapping of RGB colors to gray values. */ - - private gx_color_index --alps_map_rgb_color(gx_device *pdev, -- gx_color_value r, gx_color_value g, gx_color_value b) -+alps_map_rgb_color(gx_device *pdev, const gx_color_value cv[]) - { - -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - if (gx_color_value_to_byte(r & g & b) == 0xff) { - return (gx_color_index) 0; /* White */ - } else { diff --git a/print/ghostscript8/files/patch-md2k:gdevmd2k.mak b/print/ghostscript8/files/patch-md2k:gdevmd2k.mak deleted file mode 100644 index b003efb81f7f..000000000000 --- a/print/ghostscript8/files/patch-md2k:gdevmd2k.mak +++ /dev/null @@ -1,19 +0,0 @@ ---- md2k/gdevmd2k.mak-5.50.orig Sun Nov 19 18:42:20 2000 -+++ md2k/gdevmd2k.mak-5.50 Sun Nov 19 18:52:14 2000 -@@ -3,11 +3,11 @@ - - md2k_=$(GLOBJ)gdevmd2k.$(OBJ) - --md2k.dev: $(md2k_) page.dev -- $(SETPDEV) md2k $(md2k_) -+$(DD)md2k.dev: $(md2k_) $(DD)page.dev -+ $(SETPDEV) $(DD)md2k $(md2k_) - --md5k.dev: $(md2k_) page.dev -- $(SETPDEV) md5k $(md2k_) -+$(DD)md5k.dev: $(md2k_) $(DD)page.dev -+ $(SETPDEV) $(DD)md5k $(md2k_) - --$(GLOBJ)gdevmd2k.$(OBJ): gdevmd2k.c $(PDEVH) $(gsparam_h) -+$(GLOBJ)gdevmd2k.$(OBJ): $(GLSRC)gdevmd2k.c $(PDEVH) $(gsparam_h) - $(GLCC) $(GLO_)gdevmd2k.$(OBJ) $(C_) $(GLSRC)gdevmd2k.c diff --git a/print/ghostscript8/files/patch-mjc:gdevmjc.c b/print/ghostscript8/files/patch-mjc:gdevmjc.c deleted file mode 100644 index 862e9f1801c2..000000000000 --- a/print/ghostscript8/files/patch-mjc:gdevmjc.c +++ /dev/null @@ -1,413 +0,0 @@ ---- mjc/gdevmjc.c.orig Sat Nov 2 17:58:50 1996 -+++ mjc/gdevmjc.c Fri Dec 31 16:24:50 2004 -@@ -43,7 +43,8 @@ - #include <limits.h> - #include "gdevprn.h" - #include "gdevpcl.h" --#include "gsprops.h" -+#include "gsparam.h" -+#include "gsstate.h" - - #include "mjmtx2.c" - #include "mjbksep.c" -@@ -150,7 +151,9 @@ - - /* Undefined macros expected to be defined in gdevpcl.h */ - #define PAPER_SIZE_A3_NOBI 28 -+#ifndef PAPER_SIZE_A2 - #define PAPER_SIZE_A2 29 -+#endif - #define PAPER_SIZE_B4 30 - #define PAPER_SIZE_B5 31 - -@@ -190,18 +193,16 @@ - private dev_proc_print_page(mjc720_print_page); - private dev_proc_print_page(mj500c_print_page); - --private dev_proc_get_props(mj_get_props); --private dev_proc_put_props(mj_put_props); -- --private void expand_line(P4(word*, int, int, int)); --private int put_prop_float(P5(gs_prop_item *, float *, float, float, int)); --private int put_prop_int(P5(gs_prop_item *, int *, int, int, int)); -+private dev_proc_get_params(mj_get_params); -+private dev_proc_put_params(mj_put_params); - --private void set_bpp(P2(gx_device *, int)); -+private void expand_line(word*, int, int, int); -+private int mj_put_param_int(gs_param_list *, gs_param_name, int *, int, int, int); -+private void mj_set_bpp(gx_device *, int); - --private uint gdev_prn_rasterwidth(P2(const gx_device_printer *, int )); -+private uint gdev_prn_rasterwidth(const gx_device_printer *, int ); - --private gx_color_index mjc_correct_color(P2(gx_device_printer *, gx_color_index)); -+private gx_color_index mjc_correct_color(gx_device_printer *, gx_color_index); - - /* The device descriptors */ - struct gx_device_mj_s { -@@ -224,7 +225,7 @@ - #define mj ((gx_device_mj *) pdev) - - #define prn_hp_colour_device(procs, dev_name, x_dpi, y_dpi, bpp, print_page)\ -- prn_device_body(gx_device_printer, procs, dev_name,\ -+ prn_device_body(gx_device_mj, procs, dev_name,\ - WIDTH_10THS, HEIGHT_10THS, x_dpi, y_dpi, 0, 0, 0, 0, 0,\ - bpp, 0, 0, 0, 0, print_page) - -@@ -235,9 +236,9 @@ - } - - --#define mj_colour_procs(proc_colour_open, proc_get_props, proc_put_props) {\ -+#define mj_colour_procs(proc_colour_open, proc_get_params, proc_put_params) {\ - proc_colour_open,\ -- gdev_pcl_get_initial_matrix,\ -+ gx_default_get_initial_matrix,\ - gx_default_sync_output,\ - gdev_prn_output_page,\ - gdev_prn_close,\ -@@ -249,15 +250,15 @@ - NULL, /* copy_color */\ - NULL, /* draw_line */\ - gx_default_get_bits,\ -- proc_get_props,\ -- proc_put_props\ -+ proc_get_params,\ -+ proc_put_params\ - } - --private int mjc_open(P1(gx_device *)); --private int mj_colour_open(P1(gx_device *)); -+private int mjc_open(gx_device *); -+private int mj_colour_open(gx_device *); - - private gx_device_procs mj_procs = --mj_colour_procs(mjc_open, mj_get_props, mj_put_props); -+mj_colour_procs(mjc_open, mj_get_params, mj_put_params); - - gx_device_mj far_data gs_mjc180_device = - mj_device(mj_procs, "mjc180", 180, 180, BITSPERPIXEL, -@@ -306,14 +307,14 @@ - static const float mj_b4[4] = { MJ700V2C_MARGINS_B4 }; - static const float mj_b5[4] = { MJ700V2C_MARGINS_B5 }; - static const float mj_letter[4] = { MJ700V2C_MARGINS_LETTER }; -- const float _ds *m; -+ const float *m; - int psize; - - int paper_size; - - /* Set up colour params if put_props has not already done so */ - if (pdev->color_info.num_components == 0) -- set_bpp(pdev, pdev->color_info.depth); -+ mj_set_bpp(pdev, pdev->color_info.depth); - - paper_size = gdev_mjc_paper_size(pdev); - if (paper_size == PAPER_SIZE_A2 ) { -@@ -332,10 +333,7 @@ - m = mj_letter; - } - -- pdev->l_margin = m[0]; -- pdev->b_margin = m[1]; -- pdev->r_margin = m[2]; -- pdev->t_margin = m[3]; -+ gx_device_set_margins(pdev, m, true); - - switch (mj->colorcomp) { - case 1: -@@ -360,84 +358,78 @@ - * and control over the bits-per-pixel used in output rendering */ - /* Added properties for DeskJet 5xxC */ - --private const gs_prop_item props_mj[] = { -- /* Read-write properties. */ -- prop_def("Density", prt_int), -- prop_def("Cyan", prt_int), -- prop_def("Magenta", prt_int), -- prop_def("Yellow", prt_int), -- prop_def("Black", prt_int), -- prop_def("Dither", prt_int), -- prop_def("ColorComponent", prt_int), -- prop_def("Direction", prt_int), -- prop_def("MicroWeave", prt_int), -- prop_def("DotSize", prt_int), --}; -- - private int --mj_get_props(gx_device *pdev, gs_prop_item *plist) --{ int start = gdev_prn_get_props(pdev, plist); -- if ( plist != 0 ) { -- register gs_prop_item *pi = plist + start; -- memcpy(pi, props_mj, sizeof(props_mj)); -- pi[0].value.i = mj->density; -- pi[1].value.i = mj->cyan; -- pi[2].value.i = mj->magenta; -- pi[3].value.i = mj->yellow; -- pi[4].value.i = mj->black; -- pi[5].value.i = mj->dither; -- pi[6].value.i = mj->colorcomp; -- pi[7].value.i = mj->direction; -- pi[8].value.i = mj->microweave; -- pi[9].value.i = mj->dotsize; -- } -- return start + sizeof(props_mj) / sizeof(gs_prop_item); -+mj_get_params(gx_device *pdev, gs_param_list *plist) -+{ int code = gdev_prn_get_params(pdev, plist); -+ if ( code < 0 || -+ (code = param_write_int(plist, "Density", &mj->density)) < 0 || -+ (code = param_write_int(plist, "Cyan", &mj->cyan)) < 0 || -+ (code = param_write_int(plist, "Magenta", &mj->magenta)) < 0 || -+ (code = param_write_int(plist, "Yellow", &mj->yellow)) < 0 || -+ (code = param_write_int(plist, "Black", &mj->black)) < 0 || -+ (code = param_write_int(plist, "Dither", &mj->dither)) < 0 || -+ (code = param_write_int(plist, "ColorComponent", &mj->colorcomp)) < 0 || -+ (code = param_write_int(plist, "Direction", &mj->direction)) < 0 || -+ (code = param_write_int(plist, "MicroWeave", &mj->microweave)) < 0 || -+ (code = param_write_int(plist, "DotSize", &mj->dotsize)) < 0 -+ ) -+ return code; -+ return code; - } - - /* Put properties. */ - private int --mj_put_props(gx_device *pdev, gs_prop_item *plist, int count) -+mj_put_params(gx_device *pdev, gs_param_list *plist) - { -- static const argn = 10; --/* gs_prop_item *known[argn]; */ -- gs_prop_item *known[10]; - int old_bpp = mj->color_info.depth; - int bpp = 0; - int code = 0; -- -- props_extract(plist, count, props_mj, argn, known, 0); -- code = gdev_prn_put_props(pdev, plist, count); -- if ( code < 0 ) return code; -- -- code = put_prop_int(known[0], &mj->density, 0, INT_MAX, code); -- code = put_prop_int(known[1], &mj->cyan, 0, INT_MAX, code); -- code = put_prop_int(known[2], &mj->magenta, 0, INT_MAX, code); -- code = put_prop_int(known[3], &mj->yellow, 0, INT_MAX, code); -- code = put_prop_int(known[4], &mj->black, 0, INT_MAX, code); -- code = put_prop_int(known[5], &mj->dither, 0, 1, code); -- code = put_prop_int(known[6], &mj->colorcomp, 1, 4, code); -- code = put_prop_int(known[7], &mj->direction, 1, 2, code); -- code = put_prop_int(known[8], &mj->microweave, 0, 1, code); -- code = put_prop_int(known[9], &mj->dotsize, 0, 1, code); -- -+ int density = mj->density; -+ int cyan = mj->cyan; -+ int magenta = mj->magenta; -+ int yellow = mj->yellow; -+ int black = mj->black; -+ int dither = mj->dither; -+ int colorcomp = mj->colorcomp; -+ int direction = mj->direction; -+ int microweave = mj->microweave; -+ int dotsize = mj->dotsize; -+ code = mj_put_param_int(plist, "Density", &density, 0, INT_MAX, code); -+ code = mj_put_param_int(plist, "Cyan", &cyan, 0, INT_MAX, code); -+ code = mj_put_param_int(plist, "Magenta", &magenta, 0, INT_MAX, code); -+ code = mj_put_param_int(plist, "Yellow", &yellow, 0, INT_MAX, code); -+ code = mj_put_param_int(plist, "Black", &black, 0, INT_MAX, code); -+ code = mj_put_param_int(plist, "Dither", &dither, 0, 1, code); -+ code = mj_put_param_int(plist, "ColorComponent", &colorcomp, 1, 4, code); -+ code = mj_put_param_int(plist, "Direction", &direction, 1, 2, code); -+ code = mj_put_param_int(plist, "MicroWeave", µweave, 0, 1, code); -+ code = mj_put_param_int(plist, "DotSize", &dotsize, 0, 1, code); -+ code = mj_put_param_int(plist, "BitsPerPixel", &bpp, 1, 32, code); - if ( code < 0 ) -- return_error(code); -- -- if (bpp != 0) { -- set_bpp(pdev, bpp); -- -- /* Close the device; gs_putdeviceprops will reopen it. */ -+ return code; -+ mj->density = density; -+ mj->cyan = cyan; -+ mj->magenta = magenta; -+ mj->yellow = yellow; -+ mj->black = black; -+ mj->dither = dither; -+ mj->colorcomp = colorcomp; -+ mj->direction = direction; -+ mj->microweave = microweave; -+ mj->dotsize = dotsize; -+ if ( bpp != 0 ) { -+ mj_set_bpp(pdev, bpp); -+ gdev_prn_put_params(pdev, plist); - if ( bpp != old_bpp && pdev->is_open ) -- { int ccode = gs_closedevice(pdev); -- if ( ccode < 0 ) return ccode; -- } -+ return gs_closedevice(pdev); -+ return 0; - } -- -- return code; -+ else -+ return gdev_prn_put_params(pdev, plist); - } - - /* ------ Internal routines ------ */ --private int mj_colour_print_page(P3(gx_device_printer *, FILE *, int)); -+private int mj_colour_print_page(gx_device_printer *, FILE *, int); - - - private int -@@ -988,7 +980,7 @@ - - /* NOZ */ - xtalbuff_size = plane_size*8 + 64; -- xtalbuff = (short *) gs_malloc( xtalbuff_size*(16*4+2*4) , W, "mj_colour_print_barrier"); -+ xtalbuff = (short *) gs_malloc(pdev->memory, xtalbuff_size*(16*4+2*4) , W, "mj_colour_print_barrier"); - memset(xtalbuff, 0, xtalbuff_size*(16*4+2*4) * W); - { - int i; -@@ -1027,12 +1019,12 @@ - p += xtalbuff_size; - } - -- storage = (word *) gs_malloc(storage_size_words, W, "mj_colour_print_page"); -+ storage = (word *) gs_malloc(pdev->memory, storage_size_words, W, "mj_colour_print_page"); - - /* prepare a temporary buffer for mj_raster_cmd */ - - mj_tmp_buf_size = plane_size; -- mj_tmp_buf = (byte *) gs_malloc(mj_tmp_buf_size, W ,"mj_raster_buffer"); -+ mj_tmp_buf = (byte *) gs_malloc(pdev->memory, mj_tmp_buf_size, W ,"mj_raster_buffer"); - - #if 0 - fprintf(stderr, "storage_size_words :%d\n", storage_size_words); -@@ -1163,7 +1155,8 @@ - - /* Send each scan line in turn */ - { -- long int lend = pdev->height - (pdev->t_margin + pdev->b_margin) * y_dpi; -+ long int lend = pdev->height - -+ (dev_t_margin_points(pdev) + dev_b_margin_points(pdev)); - int cErr, mErr, yErr, kErr; - int this_pass, i; - long int lnum; -@@ -1403,19 +1396,19 @@ - fflush(prn_stream); - } - /* free temporary storage */ -- gs_free((char *) storage, storage_size_words, W, "mj_colour_print_page"); -- gs_free((char *) mj_tmp_buf, mj_tmp_buf_size, W, "mj_raster_buffer"); -- gs_free((char *) xtalbuff , xtalbuff_size*(16*4+2*4) , W, "mj_colour_print_barrier"); -+ gs_free(pdev->memory, (char *) storage, storage_size_words, W, "mj_colour_print_page"); -+ gs_free(pdev->memory, (char *) mj_tmp_buf, mj_tmp_buf_size, W, "mj_raster_buffer"); -+ gs_free(pdev->memory, (char *) xtalbuff , xtalbuff_size*(16*4+2*4) , W, "mj_colour_print_barrier"); - - return 0; - } - - void - mj_color_correct(gx_color_value *Rptr ,gx_color_value *Gptr , gx_color_value *Bptr ) -- /* R,G,B : 0`255 */ -+ /* R,G,B : 0)B`255 */ - { -- short R,G,B; /* R,G,B : 0`255 */ -- short C,M,Y; /* C,M,Y : 0`1023 */ -+ short R,G,B; /* R,G,B : 0)B`255 */ -+ short C,M,Y; /* C,M,Y : 0)B`1023 */ - short H,D,Wa; /* ese-HSV */ - long S; /* HSV */ - -@@ -1517,9 +1510,11 @@ - * c, m, y, inks by reducing the cyan component to give a truer black. - */ - private gx_color_index --gdev_mjc_map_rgb_color(gx_device *pdev, gx_color_value r, -- gx_color_value g, gx_color_value b) -+gdev_mjc_map_rgb_color(gx_device *pdev, const gx_color_value cv[]) - { -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - if (gx_color_value_to_byte(r & g & b) == 0xff) - return (gx_color_index)0; /* white */ - else { -@@ -1685,39 +1680,25 @@ - } - - private int --put_prop_int(gs_prop_item *pi, int *property, int minval, int maxval, int code) --{ -- if ( pi == 0 ) -- return (code); -- -- if ( pi->value.i < minval || pi->value.i > maxval ) -- { pi->status = pv_rangecheck; -- return (gs_error_rangecheck); -- } -- else -- { *property = pi->value.i; -- return (code ? code : 1); -- } --} -- --private int --put_prop_float(gs_prop_item *pi, float *property, float minval, float maxval, int code) --{ -- if ( pi == 0 ) -- return (code); -- -- if ( pi->value.f < minval || pi->value.f > maxval ) -- { pi->status = pv_rangecheck; -- return (gs_error_rangecheck); -- } -- else -- { *property = pi->value.f; -- return (code ? code : 1); -- } -+mj_put_param_int(gs_param_list *plist, gs_param_name pname, int *pvalue, -+ int minval, int maxval, int ecode) -+{ int code, value; -+ switch ( code = param_read_int(plist, pname, &value) ) -+ { -+ default: -+ return code; -+ case 1: -+ return ecode; -+ case 0: -+ if ( value < minval || value > maxval ) -+ param_signal_error(plist, pname, gs_error_rangecheck); -+ *pvalue = value; -+ return (ecode < 0 ? ecode : 1); -+ } - } - - private void --set_bpp(gx_device *pdev, int bits_per_pixel) -+mj_set_bpp(gx_device *pdev, int bits_per_pixel) - { gx_device_color_info *ci = &pdev->color_info; - /* Only valid bits-per-pixel are 1, 3, 8, 16, 24, 32 */ - int bpp = bits_per_pixel < 3 ? 1 : bits_per_pixel < 8 ? 3 : -@@ -1725,9 +1706,9 @@ - ci->num_components = ((bpp == 1) || (bpp == 8) ? 1 : 3); - ci->depth = ((bpp > 1) && (bpp < 8) ? 8 : bpp); - ci->max_gray = (bpp >= 8 ? 255 : 1); -- ci->max_rgb = (bpp >= 8 ? 255 : bpp > 1 ? 1 : 0); -- ci->dither_gray = (bpp >= 8 ? 5 : 2); -- ci->dither_rgb = (bpp >= 8 ? 5 : bpp > 1 ? 2 : 0); -+ ci->max_color = (bpp >= 8 ? 255 : bpp > 1 ? 1 : 0); -+ ci->dither_grays = (bpp >= 8 ? 5 : 2); -+ ci->dither_colors = (bpp >= 8 ? 5 : bpp > 1 ? 2 : 0); - } - - /* This returns either the number of pixels in a scan line, or the number -@@ -1736,7 +1717,7 @@ - gdev_prn_rasterwidth(const gx_device_printer *pdev, int pixelcount) - { - word raster_width = -- pdev->width - pdev->x_pixels_per_inch * (pdev->l_margin + pdev->r_margin); -+ pdev->width - (pdev->HWMargins[0] + pdev->HWMargins[2]); - return (pixelcount ? - (uint)raster_width : - (uint)((raster_width * pdev->color_info.depth + 7) >> 3)); diff --git a/print/ghostscript8/files/patch-mjc:gdevmjc.mak b/print/ghostscript8/files/patch-mjc:gdevmjc.mak deleted file mode 100644 index a094ea08812f..000000000000 --- a/print/ghostscript8/files/patch-mjc:gdevmjc.mak +++ /dev/null @@ -1,43 +0,0 @@ ---- mjc/gdevmjc.mak.orig Tue May 23 19:19:13 2000 -+++ mjc/gdevmjc.mak Tue May 23 19:19:40 2000 -@@ -4,25 +4,22 @@ - # Supports MJ-700V2C, MJ-5000C, MJ-900C, MJ-800C, MJ-500C - # - ## --# --# Append this file to Makefile --# --## --MJCSRC = gdevmjc.c mjmtx2.c mjbksep.c mjhtocmy.c mjvtbl.c \ -- mjgrnsp.c mjgrnsp2.c mjespdtc.c mjespdtm.c mjespdty.c mjbarrie.c -+MJCSRC = $(GLSRC)gdevmjc.c $(GLSRC)mjmtx2.c $(GLSRC)mjbksep.c \ -+ $(GLSRC)mjhtocmy.c $(GLSRC)mjvtbl.c $(GLSRC)mjgrnsp.c \ -+ $(GLSRC)mjgrnsp2.c $(GLSRC)mjespdtc.c $(GLSRC)mjespdtm.c \ -+ $(GLSRC)mjespdty.c $(GLSRC)mjbarrie.c - --mj700v2c_=gdevmjc.$(OBJ) $(HPPCL) -+mj700v2c_=$(GLOBJ)gdevmjc.$(OBJ) $(HPPCL) - - # To make A4 paper the default, change the second line below this to --gdevmjc.$(OBJ): $(MJCSRC) $(PDEVH) $(gdevpcl_h) -- $(CCC) -DA4 gdevmjc.c -- --mjc180.dev: $(mj700v2c_) -- $(SHP)gssetdev mjc180 $(mj700v2c_) --mjc360.dev: $(mj700v2c_) -- $(SHP)gssetdev mjc360 $(mj700v2c_) --mjc720.dev: $(mj700v2c_) -- $(SHP)gssetdev mjc720 $(mj700v2c_) --mj500c.dev: $(mj700v2c_) -- $(SHP)gssetdev mj500c $(mj700v2c_) -+$(GLOBJ)gdevmjc.$(OBJ): $(MJCSRC) $(PDEVH) $(gdevpcl_h) -+ $(GLCC) -DA4 $(GLO_)gdevmjc.$(OBJ) $(C_) $(GLSRC)gdevmjc.c - -+$(GLOBJ)mjc180.dev: $(mj700v2c_) $(DD)page.dev -+ $(SETPDEV) $(DD)mjc180 $(mj700v2c_) -+$(GLOBJ)mjc360.dev: $(mj700v2c_) $(DD)page.dev -+ $(SETPDEV) $(DD)mjc360 $(mj700v2c_) -+$(GLOBJ)mjc720.dev: $(mj700v2c_) $(DD)page.dev -+ $(SETPDEV) $(DD)mjc720 $(mj700v2c_) -+$(GLOBJ)mj500c.dev: $(mj700v2c_) $(DD)page.dev -+ $(SETPDEV) $(DD)mj500c $(mj700v2c_) diff --git a/print/ghostscript8/files/patch-pcl3__eprn__gdeveprn.c b/print/ghostscript8/files/patch-pcl3__eprn__gdeveprn.c deleted file mode 100644 index 894661dd365b..000000000000 --- a/print/ghostscript8/files/patch-pcl3__eprn__gdeveprn.c +++ /dev/null @@ -1,180 +0,0 @@ ---- pcl3/eprn/gdeveprn.c.orig Mon Apr 30 14:15:51 2001 -+++ pcl3/eprn/gdeveprn.c Sun Mar 25 22:22:54 2007 -@@ -142,11 +142,13 @@ - if_debug0(EPRN_TRACE_CHAR, - "! eprn_get_initial_matrix(): code is still ms_none.\n"); - #endif -+#if 0 - if (eprn_set_page_layout(dev) != 0) - fputs(" Processing can't be stopped at this point although this error " - "occurred.\n", stderr); - /* The current function has a signature without the ability to signal - an error condition. */ -+#endif - } - - quarters = dev->eprn.default_orientation + -@@ -607,6 +609,7 @@ - } - } - -+#if 0 - /* Now the 'best_*match' variables indicate for each of the categories of - page descriptions to which extent the size is supported at all (non-NULL - value) and what the best flag match in the category is. Here we now check -@@ -647,6 +650,7 @@ - return -1; - } - } -+#endif - /* Now we have: best_dmatch != NULL || best_cmatch != NULL && - (eprn->media_overrides == NULL || best_cdmatch != NULL). */ - -@@ -692,7 +696,9 @@ - } - /* If we've found a match, 'code' is no longer 'ms_none'. */ - if (eprn->code == ms_none) { -+#if 0 - eprn_flag_mismatch(stderr, eprn, no_match); -+#endif - return -1; - } - -@@ -762,9 +768,11 @@ - - rc = gdev_prn_open((gx_device *)dev); - if (rc < 0) { -+#if 0 - fprintf(stderr, "%s" ERRPREF - "Failure of gdev_prn_open(), code is %d.\n", - epref, rc); -+#endif - return rc; - } - } -@@ -875,7 +883,7 @@ - &hres, &vres, &eprn->black_levels, &eprn->non_black_levels); - - if (eprn->pagecount_file != NULL) { -- gs_free(eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, -+ gs_free(dev->memory, eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, - sizeof(char), "eprn_init_device"); - eprn->pagecount_file = NULL; - } -@@ -944,17 +952,21 @@ - &eprn->black_levels, &eprn->non_black_levels) != 0) { - gs_param_string str; - -+#if 0 - fprintf(stderr, "%s" ERRPREF "The requested combination of colour model (", - epref); -+#endif - str.size = 0; - if (eprn_get_string(eprn->colour_model, eprn_colour_model_list, &str) != 0) - assert(0); /* Bug. No harm on NDEBUG because I've just set the size. */ -+#if 0 - fwrite(str.data, str.size, sizeof(str.data[0]), stderr); - fprintf(stderr, "),\n" - "%s resolution (%gx%g ppi) and intensity levels (%d, %d) is\n" - "%s not supported by the %s.\n", - epref, device->HWResolution[0], device->HWResolution[1], - eprn->black_levels, eprn->non_black_levels, epref, eprn->cap->name); -+#endif - return_error(gs_error_rangecheck); - } - -@@ -1017,11 +1029,13 @@ - inappropriate :-). Note that eprn does not use 'PageCount' for - updating the file. */ - else { -+#if 0 - /* pcf_getcount() has issued an error message. */ - fputs( - " No further attempts will be made to access the page count file.\n", - stderr); -- gs_free(eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, -+#endif -+ gs_free(device->memory, eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, - sizeof(char), "eprn_open_device"); - eprn->pagecount_file = NULL; - } -@@ -1034,31 +1048,33 @@ - /* Just in case a previous open call failed in a derived device (note that - 'octets_per_line' is still the same as then): */ - if (eprn->scan_line.str != NULL) -- gs_free(eprn->scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), -+ gs_free(device->memory, eprn->scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), - "eprn_open_device"); - if (eprn->next_scan_line.str != NULL) { -- gs_free(eprn->next_scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), -+ gs_free(device->memory, eprn->next_scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), - "eprn_open_device"); - eprn->next_scan_line.str = NULL; - } - - /* Calls which might depend on prn having been initialized */ - eprn->octets_per_line = gdev_prn_raster((gx_device_printer *)device); -- eprn->scan_line.str = (eprn_Octet *) gs_malloc(eprn->octets_per_line, -+ eprn->scan_line.str = (eprn_Octet *) gs_malloc(device->memory, eprn->octets_per_line, - sizeof(eprn_Octet), "eprn_open_device"); - if (eprn->intensity_rendering == eprn_IR_FloydSteinberg) { -- eprn->next_scan_line.str = (eprn_Octet *) gs_malloc(eprn->octets_per_line, -+ eprn->next_scan_line.str = (eprn_Octet *) gs_malloc(device->memory, eprn->octets_per_line, - sizeof(eprn_Octet), "eprn_open_device"); - if (eprn->next_scan_line.str == NULL && eprn->scan_line.str != NULL) { -- gs_free(eprn->scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), -+ gs_free(device->memory, eprn->scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), - "eprn_open_device"); - eprn->scan_line.str = NULL; - } - } - if (eprn->scan_line.str == NULL) { -+#if 0 - fprintf(stderr, "%s" ERRPREF - "Memory allocation failure from gs_malloc() in eprn_open_device().\n", - epref); -+#endif - return_error(gs_error_VMerror); - } - -@@ -1080,12 +1096,12 @@ - #endif - - if (eprn->scan_line.str != NULL) { -- gs_free(eprn->scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), -+ gs_free(device->memory, eprn->scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), - "eprn_close_device"); - eprn->scan_line.str = NULL; - } - if (eprn->next_scan_line.str != NULL) { -- gs_free(eprn->next_scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), -+ gs_free(device->memory, eprn->next_scan_line.str, eprn->octets_per_line, sizeof(eprn_Octet), - "eprn_close_device"); - eprn->next_scan_line.str = NULL; - } -@@ -1152,20 +1168,24 @@ - accounting, this seems unfair. - */ - if (rc == 0 && eprn->CUPS_accounting) -+#if 0 - fprintf(stderr, "PAGE: %ld %d\n", dev->ShowpageCount, num_copies); - /* The arguments are the number of the page, starting at 1, and the number - of copies of that page. */ -+#endif - - #ifndef EPRN_NO_PAGECOUNTFILE - /* On success, record the number of pages printed */ - if (rc == 0 && eprn->pagecount_file != NULL) { - assert(num_copies > 0); /* because of signed/unsigned */ - if (pcf_inccount(eprn->pagecount_file, num_copies) != 0) { -+#if 0 - /* pcf_inccount() has issued an error message. */ - fputs( - " No further attempts will be made to access the page count file.\n", - stderr); -- gs_free(eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, -+#endif -+ gs_free(dev->memory, eprn->pagecount_file, strlen(eprn->pagecount_file) + 1, - sizeof(char), "eprn_output_page"); - eprn->pagecount_file = NULL; - } diff --git a/print/ghostscript8/files/patch-pcl3_eprn_eprnrend.c b/print/ghostscript8/files/patch-pcl3_eprn_eprnrend.c deleted file mode 100644 index 69dd96167b0c..000000000000 --- a/print/ghostscript8/files/patch-pcl3_eprn_eprnrend.c +++ /dev/null @@ -1,182 +0,0 @@ ---- pcl3/eprn/eprnrend.c.orig Wed Aug 1 14:12:56 2001 -+++ pcl3/eprn/eprnrend.c Tue May 24 20:19:18 2005 -@@ -161,8 +161,11 @@ - ******************************************************************************/ - - gx_color_index eprn_map_rgb_color_for_RGB(gx_device *device, -- gx_color_value red, gx_color_value green, gx_color_value blue) -+ const gx_color_value cv[]) - { -+ gx_color_value red = cv[0]; -+ gx_color_value green = cv[1]; -+ gx_color_value blue = cv[2]; - static const gx_color_value half = gx_max_color_value/2; - gx_color_index value = 0; - const eprn_Device *dev = (eprn_Device *)device; -@@ -197,8 +200,11 @@ - ******************************************************************************/ - - gx_color_index eprn_map_rgb_color_for_CMY_or_K(gx_device *device, -- gx_color_value red, gx_color_value green, gx_color_value blue) -+ const gx_color_value cv[]) - { -+ gx_color_value red = cv[0]; -+ gx_color_value green = cv[1]; -+ gx_color_value blue = cv[2]; - static const gx_color_value half = gx_max_color_value/2; - gx_color_index value = (CYAN_BIT | MAGENTA_BIT | YELLOW_BIT); - const eprn_Device *dev = (eprn_Device *)device; -@@ -240,8 +246,11 @@ - ******************************************************************************/ - - gx_color_index eprn_map_rgb_color_for_RGB_flex(gx_device *device, -- gx_color_value red, gx_color_value green, gx_color_value blue) -+ const gx_color_value cv[]) - { -+ gx_color_value red = cv[0]; -+ gx_color_value green = cv[1]; -+ gx_color_value blue = cv[2]; - gx_color_index value = 0; - gx_color_value step; - unsigned int level; -@@ -284,8 +293,12 @@ - ******************************************************************************/ - - gx_color_index eprn_map_rgb_color_for_CMY_or_K_flex(gx_device *device, -- gx_color_value red, gx_color_value green, gx_color_value blue) -+ const gx_color_value cv[]) - { -+ gx_color_value red = cv[0]; -+ gx_color_value green = cv[1]; -+ gx_color_value blue = cv[2]; -+ gx_color_value tmpcv[4]; - const eprn_Device *dev = (eprn_Device *)device; - - #ifdef EPRN_TRACE -@@ -298,11 +311,17 @@ - /* Treat pure grey levels differently if we have black. This implies that for - CMY+K only "true" grey shades will be printed with black ink, all others - will be mixed from CMY. */ -- if (dev->eprn.colour_model != eprn_DeviceCMY && red == green && green == blue) -- return eprn_map_cmyk_color_flex(device, 0, 0, 0, gx_max_color_value - red); -+ if (dev->eprn.colour_model != eprn_DeviceCMY && red == green && green == blue) { -+ tmpcv[0] = 0; tmpcv[1] = 0; tmpcv[2] = 0; -+ tmpcv[3] = gx_max_color_value - red; -+ return eprn_map_cmyk_color_flex(device, tmpcv); - -- return eprn_map_cmyk_color_flex(device, gx_max_color_value - red, -- gx_max_color_value - green, gx_max_color_value - blue, 0); -+ } -+ tmpcv[0] = gx_max_color_value - red; -+ tmpcv[1] = gx_max_color_value - green; -+ tmpcv[2] = gx_max_color_value - blue; -+ tmpcv[3] = 0; -+ return eprn_map_cmyk_color_flex(device, tmpcv); - } - - /****************************************************************************** -@@ -315,8 +334,11 @@ - ******************************************************************************/ - - gx_color_index eprn_map_rgb_color_for_RGB_max(gx_device *device, -- gx_color_value red, gx_color_value green, gx_color_value blue) -+ const gx_color_value cv[]) - { -+ gx_color_value red = cv[0]; -+ gx_color_value green = cv[1]; -+ gx_color_value blue = cv[2]; - gx_color_index value; - - #ifdef EPRN_TRACE -@@ -345,8 +367,12 @@ - ******************************************************************************/ - - gx_color_index eprn_map_rgb_color_for_CMY_or_K_max(gx_device *device, -- gx_color_value red, gx_color_value green, gx_color_value blue) -+ const gx_color_value cv[]) - { -+ gx_color_value red = cv[0]; -+ gx_color_value green = cv[1]; -+ gx_color_value blue = cv[2]; -+ gx_color_value tmpcv[4]; - const eprn_Device *dev = (eprn_Device *)device; - - #ifdef EPRN_TRACE -@@ -356,13 +382,18 @@ - red, green, blue); - #endif - -- if (dev->eprn.colour_model == eprn_DeviceGray) -- return eprn_map_cmyk_color_max(device, 0, 0, 0, gx_max_color_value - red); -- -+ if (dev->eprn.colour_model == eprn_DeviceGray) { -+ tmpcv[0] = 0; tmpcv[1] = 0; tmpcv[2] = 0; -+ tmpcv[3] = gx_max_color_value - red; -+ return eprn_map_cmyk_color_max(device, tmpcv); -+ } - /* Note that the conversion from composite black to true black for CMY+K can - only happen at the output pixel level, not here. */ -- return eprn_map_cmyk_color_max(device, gx_max_color_value - red, -- gx_max_color_value - green, gx_max_color_value - blue, 0); -+ tmpcv[0] = gx_max_color_value - red; -+ tmpcv[1] = gx_max_color_value - green; -+ tmpcv[2] = gx_max_color_value - blue; -+ tmpcv[3] = 0; -+ return eprn_map_cmyk_color_max(device, tmpcv); - } - - /****************************************************************************** -@@ -389,7 +420,7 @@ - ******************************************************************************/ - - int eprn_map_color_rgb(gx_device *device, gx_color_index color, -- gx_color_value rgb[3]) -+ gx_color_value rgb[]) - { - #ifdef EPRN_TRACE - if_debug1(EPRN_TRACE_CHAR, -@@ -415,9 +446,12 @@ - ******************************************************************************/ - - gx_color_index eprn_map_cmyk_color(gx_device *device, -- gx_color_value cyan, gx_color_value magenta, gx_color_value yellow, -- gx_color_value black) -+ const gx_color_value cv[]) - { -+ gx_color_value cyan = cv[0]; -+ gx_color_value magenta = cv[1]; -+ gx_color_value yellow = cv[2]; -+ gx_color_value black = cv[3]; - gx_color_index value = 0; - static const gx_color_value threshold = gx_max_color_value/2; - -@@ -449,9 +483,12 @@ - ******************************************************************************/ - - gx_color_index eprn_map_cmyk_color_flex(gx_device *device, -- gx_color_value cyan, gx_color_value magenta, gx_color_value yellow, -- gx_color_value black) -+ const gx_color_value cv[]) - { -+ gx_color_value cyan = cv[0]; -+ gx_color_value magenta = cv[1]; -+ gx_color_value yellow = cv[2]; -+ gx_color_value black = cv[3]; - gx_color_index value = 0; - gx_color_value step; - unsigned int level; -@@ -530,9 +567,12 @@ - ******************************************************************************/ - - gx_color_index eprn_map_cmyk_color_max(gx_device *device, -- gx_color_value cyan, gx_color_value magenta, gx_color_value yellow, -- gx_color_value black) -+ const gx_color_value cv[]) - { -+ gx_color_value cyan = cv[0]; -+ gx_color_value magenta = cv[1]; -+ gx_color_value yellow = cv[2]; -+ gx_color_value black = cv[3]; - gx_color_index value; - - #ifdef EPRN_TRACE diff --git a/print/ghostscript8/files/patch-src-dviprlib.c b/print/ghostscript8/files/patch-src-dviprlib.c deleted file mode 100644 index 5bee5e72645d..000000000000 --- a/print/ghostscript8/files/patch-src-dviprlib.c +++ /dev/null @@ -1,135 +0,0 @@ ---- src/dviprlib.c.orig Tue May 13 16:14:09 1997 -+++ src/dviprlib.c Tue May 24 21:41:09 2005 -@@ -39,8 +39,8 @@ - - - /*--- forward declarations ---*/ --private int dviprt_read_S_cfg(P2(dviprt_cfg_t *,dviprt_cfg_i *)); --private int dviprt_read_QR_cfg(P2(dviprt_cfg_t *,dviprt_cfg_i *)); -+private int dviprt_read_S_cfg(dviprt_cfg_t *,dviprt_cfg_i *); -+private int dviprt_read_QR_cfg(dviprt_cfg_t *,dviprt_cfg_i *); - - /*--- library functions ---*/ - int -@@ -429,21 +429,21 @@ - - /*--- forward declarations ---*/ - private int dviprt_set_select -- (P4(dviprt_cfg_item_t *,uchar **,dviprt_cfg_t *,dviprt_cfg_i *)); -+ (dviprt_cfg_item_t *,uchar **,dviprt_cfg_t *,dviprt_cfg_i *); - private int dviprt_set_integer -- (P4(dviprt_cfg_item_t *, uchar *, dviprt_cfg_t *,dviprt_cfg_i *)); -+ (dviprt_cfg_item_t *, uchar *, dviprt_cfg_t *,dviprt_cfg_i *); - private int dviprt_set_strings -- (P4(dviprt_cfg_item_t *,uchar *,dviprt_cfg_t *,dviprt_cfg_i *)); -+ (dviprt_cfg_item_t *,uchar *,dviprt_cfg_t *,dviprt_cfg_i *); - private int dviprt_set_rpexpr -- (P6(dviprt_cfg_item_t *,uchar *,int , dviprt_cfg_t *,dviprt_cfg_i *,int)); -+ (dviprt_cfg_item_t *,uchar *,int , dviprt_cfg_t *,dviprt_cfg_i *,int); - private int dviprt_set_code -- (P4(dviprt_cfg_item_t *,uchar *,dviprt_cfg_t *,dviprt_cfg_i *)); -+ (dviprt_cfg_item_t *,uchar *,dviprt_cfg_t *,dviprt_cfg_i *); - --private long dviprt_oct2long(P3(uchar *,uchar *,uchar **)); --private long dviprt_dec2long(P3(uchar *,uchar *,uchar **)); --private long dviprt_hex2long(P3(uchar *,uchar *,uchar **)); -+private long dviprt_oct2long(uchar *,uchar *,uchar **); -+private long dviprt_dec2long(uchar *,uchar *,uchar **); -+private long dviprt_hex2long(uchar *,uchar *,uchar **); - --private int dviprt_printtokenerror(P4(dviprt_cfg_i *,char *,int ,int)); -+private int dviprt_printtokenerror(dviprt_cfg_i *,char *,int ,int); - - /*--- macros ---*/ - #define strlcmp(tmplt,str,len) \ -@@ -1433,7 +1433,11 @@ - char *dviprt_prtcodename[] = { CFG_PRTCODE_NAME, NULL }; - char *dviprt_encodename[] = { CFG_ENCODE_NAME, NULL }; - -+#if 0 - private FILE *dviprt_messagestream = stderr; -+#else /* patch for glibc 2.1.x by Shin Fukui <shita@april.co.jp> */ -+private FILE *dviprt_messagestream; -+#endif - - /*--- library functions ---*/ - int -@@ -1568,16 +1572,16 @@ - - - /*--- forward declarations ---*/ --private int dviprt_getmaximalwidth(P1(dviprt_print *)); --private int dviprt_flush_buffer(P2(dviprt_print *,uchar far *)); --private int dviprt_output_transpose(P3(dviprt_print *,uchar far *,uint )); --private int dviprt_output_nontranspose(P3(dviprt_print *,uchar far *,uint )); --private int dviprt_output_nontranspose_reverse(P3(dviprt_print *,uchar far *,uint )); --private int dviprt_reverse_bits(P2(uchar far *,uint)); --private int dviprt_transpose8x8(P4(uchar far *,uint, uchar far *,uint)); --private int dviprt_output_expr(P4(dviprt_print *,int,uint,uint)); --private int dviprt_default_outputproc(P3(uchar far *,long ,void *)); --private long dviprt_getbuffersize(P1(dviprt_print *)); -+private int dviprt_getmaximalwidth(dviprt_print *); -+private int dviprt_flush_buffer(dviprt_print *,uchar far *); -+private int dviprt_output_transpose(dviprt_print *,uchar far *,uint); -+private int dviprt_output_nontranspose(dviprt_print *,uchar far *,uint); -+private int dviprt_output_nontranspose_reverse(dviprt_print *,uchar far *,uint); -+private int dviprt_reverse_bits(uchar far *,uint); -+private int dviprt_transpose8x8(uchar far *,uint, uchar far *,uint); -+private int dviprt_output_expr(dviprt_print *,int,uint,uint); -+private int dviprt_default_outputproc(uchar far *,long ,void *); -+private long dviprt_getbuffersize(dviprt_print *); - - /*--- library functions ---*/ - long -@@ -1618,7 +1622,7 @@ - int - dviprt_setstream - #ifdef __PROTOTYPES__ -- (dviprt_print *pprint,int (*func)(P3(uchar far *,long ,void*)),void *pstream) -+ (dviprt_print *pprint,int (*func)(uchar far *,long ,void*),void *pstream) - #else - (pprint,func,pstream) - dviprt_print *pprint; -@@ -2264,19 +2268,19 @@ - #define DVIPRT_SUPPORT_PCL 1 - - /*--- forward declarations ---*/ --private long dviprt_null_getworksize(P2(dviprt_print *,long )); --private long dviprt_null_encode(P3(dviprt_print *,long ,int )); --private long dviprt_hex_getworksize(P2(dviprt_print *,long )); --private long dviprt_hex_encode(P3(dviprt_print *,long ,int )); -+private long dviprt_null_getworksize(dviprt_print *,long ); -+private long dviprt_null_encode(dviprt_print *,long ,int ); -+private long dviprt_hex_getworksize(dviprt_print *,long ); -+private long dviprt_hex_encode(dviprt_print *,long ,int ); - #if DVIPRT_SUPPORT_FAX --private long dviprt_fax_getworksize(P2(dviprt_print *,long )); --private long dviprt_fax_encode(P3(dviprt_print *,long ,int )); -+private long dviprt_fax_getworksize(dviprt_print *,long ); -+private long dviprt_fax_encode(dviprt_print *,long ,int ); - #endif - #if DVIPRT_SUPPORT_PCL --private long dviprt_pcl1_getworksize(P2(dviprt_print *,long )); --private long dviprt_pcl1_encode(P3(dviprt_print *,long ,int )); --private long dviprt_pcl2_getworksize(P2(dviprt_print *,long )); --private long dviprt_pcl2_encode(P3(dviprt_print *,long ,int )); -+private long dviprt_pcl1_getworksize(dviprt_print *,long ); -+private long dviprt_pcl1_encode(dviprt_print *,long ,int ); -+private long dviprt_pcl2_getworksize(dviprt_print *,long ); -+private long dviprt_pcl2_encode(dviprt_print *,long ,int ); - #endif - - private dviprt_encoder dviprt_encoder_list[] = { -@@ -2468,9 +2472,9 @@ - int o_count; - int o_bufcount; - } FaxEncodeInfo; --private int dviprt_fax_set_white(P2(int,FaxEncodeInfo *)); --private int dviprt_fax_set_black(P2(int,FaxEncodeInfo *)); --private int dviprt_fax_set_bitcount(P2(FaxEncode_t *,FaxEncodeInfo *)); -+private int dviprt_fax_set_white(int,FaxEncodeInfo *); -+private int dviprt_fax_set_black(int,FaxEncodeInfo *); -+private int dviprt_fax_set_bitcount(FaxEncode_t *,FaxEncodeInfo *); - - private long - dviprt_fax_encode(dviprt_print *pprint,long s,int f) diff --git a/print/ghostscript8/files/patch-src-dviprlib.h b/print/ghostscript8/files/patch-src-dviprlib.h deleted file mode 100644 index d7fce3138d0a..000000000000 --- a/print/ghostscript8/files/patch-src-dviprlib.h +++ /dev/null @@ -1,38 +0,0 @@ ---- src/dviprlib.h.orig Tue May 13 16:10:34 1997 -+++ src/dviprlib.h Tue May 24 21:41:14 2005 -@@ -337,23 +337,23 @@ - #ifdef dviprlib_implementation - typedef struct { - int no; -- long (*getworksize)(P2(dviprt_print *,long )); -- long (*encode)(P3(dviprt_print *,long,int)); -+ long (*getworksize)(dviprt_print *,long); -+ long (*encode)(dviprt_print *,long,int); - } dviprt_encoder; - - #define liblocal private - --liblocal dviprt_encoder *dviprt_getencoder_(P1(int )); --liblocal int dviprt_setcfgbuffer_(P3(dviprt_cfg_i *,int ,int )); --liblocal int dviprt_resetcfgbuffer_(P1(dviprt_cfg_i *)); --liblocal int dviprt_initcfg_(P2(dviprt_cfg_t *,dviprt_cfg_i *)); --liblocal int dviprt_printmessage(P2(char *,int )); --liblocal int dviprt_printerror(P2(char *,int )); --liblocal int dviprt_printwarning(P2(char *,int )); --liblocal int dviprt_printcfgerror(P3(dviprt_cfg_i *,char *,int )); --liblocal int dviprt_printcfgwarning(P3(dviprt_cfg_i *,char *,int )); -+liblocal dviprt_encoder *dviprt_getencoder_(int); -+liblocal int dviprt_setcfgbuffer_(dviprt_cfg_i *,int ,int); -+liblocal int dviprt_resetcfgbuffer_(dviprt_cfg_i *); -+liblocal int dviprt_initcfg_(dviprt_cfg_t *,dviprt_cfg_i *); -+liblocal int dviprt_printmessage(char *,int); -+liblocal int dviprt_printerror(char *,int); -+liblocal int dviprt_printwarning(char *,int); -+liblocal int dviprt_printcfgerror(dviprt_cfg_i *,char *,int); -+liblocal int dviprt_printcfgwarning(dviprt_cfg_i *,char *,int); - --extern int dviprt_print_headercomment_(P4(char *,char *,char *,FILE *)); -+extern int dviprt_print_headercomment_(char *,char *,char *,FILE *); - extern char dviprt_message_buffer[]; - #endif dviprlib_implementation - diff --git a/print/ghostscript8/files/patch-src-gdevdmpr.c b/print/ghostscript8/files/patch-src-gdevdmpr.c deleted file mode 100644 index 4e2b27f4fca4..000000000000 --- a/print/ghostscript8/files/patch-src-gdevdmpr.c +++ /dev/null @@ -1,134 +0,0 @@ ---- src/gdevdmpr.c.orig Tue May 13 20:43:37 1997 -+++ src/gdevdmpr.c Sat Mar 24 15:41:48 2007 -@@ -41,7 +41,7 @@ - /* include library header. */ - #include "dviprlib.h" - --extern FILE *lib_fopen(P1(const char *)); -+extern FILE *lib_fopen(const char *); - - #define LOCAL_DEBUG 0 - -@@ -87,12 +87,12 @@ - private dev_proc_close_device(gdev_dmprt_close); - - /* declarations of sub functions to get printer properties. */ --private void gdev_dmprt_init_printer_props(P1(gx_device_dmprt *)); --private int gdev_dmprt_get_printer_props(P2(gx_device_dmprt *,char *)); --private int gdev_dmprt_check_code_props(P2(byte * ,int )); --private FILE *gdev_dmprt_dviprt_lib_fopen(P2(const char *,char *)); -+private void gdev_dmprt_init_printer_props(gx_device_dmprt *); -+private int gdev_dmprt_get_printer_props(gx_device_dmprt *,char *); -+private int gdev_dmprt_check_code_props(byte * ,int ); -+private FILE *gdev_dmprt_dviprt_lib_fopen(const char *,char *); - --private int gdev_dmprt_error_no_dviprt_to_gs(P1(int )); -+private int gdev_dmprt_error_no_dviprt_to_gs(int ); - - /* The device descriptor */ - gx_device_procs prn_dmprt_procs = { -@@ -405,7 +405,9 @@ - if (pddev->dmprt.max_height>0 && pddev->dmprt.max_height<pddev->height) - pddev->height = pddev->dmprt.max_height; - -+#if 0 - dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL); -+#endif - - return code; - } -@@ -425,7 +427,9 @@ - if (code < 0) return code; - if (code == 0) pddev->dmprt.debug_f = vbool; - -+#if 0 - dviprt_setmessagestream(pddev->dmprt.debug_f ? stderr : NULL); -+#endif - - code = param_read_bool(plist, "Verbose", &vbool); - if (code < 0) return code; -@@ -475,14 +479,14 @@ - code = param_read_string(plist, "FileName", &vstr); - if (code < 0) return code; - if (code == 0) { -- char *filename = gs_malloc(vstr.size + 1, 1, -+ char *filename = gs_malloc(pdev->memory, vstr.size + 1, 1, - "gdev_dmprt_put_props(filename)"); - int ccode; - if (filename == 0) return e_VMerror; - strncpy(filename, (const char*)vstr.data, vstr.size); - filename[vstr.size] = '\0'; - ccode = gdev_dmprt_get_printer_props(pddev,filename); -- gs_free(filename, vstr.size+1, 1, "gdev_dmprt_put_props(filename)"); -+ gs_free(pdev->memory, filename, vstr.size+1, 1, "gdev_dmprt_put_props(filename)"); - if (ccode < 0) return ccode; - } - -@@ -686,7 +690,7 @@ - byte *in; - - /* get work buffer */ -- in = (byte *)gs_malloc(1, i_buf_size ,"gdev_dmprt_print_page(in)"); -+ in = (byte *)gs_malloc(pdev->memory, 1, i_buf_size ,"gdev_dmprt_print_page(in)"); - if ( in == 0 ) - return e_VMerror; - -@@ -737,7 +741,7 @@ - eprintf1(" %lu bytes\n",dviprt_getoutputbytes(pprint)-prev_bytes); - } - error_ex: -- gs_free((char *)in, 1, i_buf_size,"gdev_dmprt_print_page(in)"); -+ gs_free(pdev->memory, (char *)in, 1, i_buf_size,"gdev_dmprt_print_page(in)"); - - return code; - } -@@ -797,7 +801,7 @@ - dviprt_cfg_t cfg; - char *fname; - -- fname = gs_malloc(256,1,"dviprt_lib_fname"); -+ fname = gs_malloc(pdev->memory, 256,1,"dviprt_lib_fname"); - if (fname == NULL) return e_VMerror; - - fp = gdev_dmprt_dviprt_lib_fopen(fnamebase,fname); -@@ -828,11 +832,12 @@ - cfg.integer[CFG_Y_DPI] > 0 ? cfg.integer[CFG_Y_DPI] : pddev->dmprt.orig_x_dpi; - } - -- gs_free(fname,256,1,"dviprt_lib_fname"); -+ gs_free(pdev->memory, fname,256,1,"dviprt_lib_fname"); - - return code; - } - -+private const char * gp_file_name_concat_string(const char *, unsigned); - private FILE * - gdev_dmprt_dviprt_lib_fopen(const char *fnamebase,char *fname) - { -@@ -845,9 +850,7 @@ - env = getenv("TEXCFG"); - if (env) { - strcpy(fname,env); -- strcat(fname, -- gp_file_name_concat_string(env,strlen(env),fname,strlen(fnamebase))); -- strcat(fname,fnamebase); -+ strcat(fname, gp_file_name_concat_string(env,strlen(env))); - fp = fopen(fname,gp_fmode_rb); - } - } -@@ -867,4 +870,15 @@ - default: - return -1; - } -+} -+ -+/* Answer the string to be used for combining a directory/device prefix */ -+/* with a base file name. The prefix directory/device is examined to */ -+/* determine if a separator is needed and may return an empty string */ -+private const char * -+gp_file_name_concat_string(const char *prefix, unsigned plen) -+{ -+ if (plen > 0 && prefix[plen - 1] == '/') -+ return ""; -+ return "/"; - } diff --git a/print/ghostscript8/files/patch-src-gdevdmpr.mak b/print/ghostscript8/files/patch-src-gdevdmpr.mak deleted file mode 100644 index 9136172873fa..000000000000 --- a/print/ghostscript8/files/patch-src-gdevdmpr.mak +++ /dev/null @@ -1,21 +0,0 @@ ---- src/gdevdmpr.mak.orig Mon May 1 20:24:43 2000 -+++ src/gdevdmpr.mak Mon May 1 20:26:23 2000 -@@ -1,8 +1,12 @@ - ### ---------------- Dot matrix printer device ---------------- ### --dmprt_=gdevdmpr.$(OBJ) dviprlib.$(OBJ) gdevprn.$(OBJ) -+dmprt_=$(GLOBJ)gdevdmpr.$(OBJ) $(GLOBJ)dviprlib.$(OBJ) $(GLOBJ)gdevprn.$(OBJ) - --dmprt.dev: $(dmprt_) -- $(SETDEV) dmprt $(dmprt_) -- $(ADDMOD) dmprt -ps dmp_init --gdevdmpr.$(OBJ): gdevdmpr.c dviprlib.h $(PDEVH) --dviprlib.$(OBJ): dviprlib.c dviprlib.h -+$(DD)dmprt.dev: $(dmprt_) -+ $(SETDEV) $(DD)dmprt $(dmprt_) -+ $(ADDMOD) $(DD)dmprt -ps dmp_init -+ -+$(GLOBJ)gdevdmpr.$(OBJ): $(GLSRC)gdevdmpr.c $(GLSRC)dviprlib.h $(PDEVH) -+ $(GLCC) $(GLO_)gdevdmpr.$(OBJ) $(C_) $(GLSRC)gdevdmpr.c -+ -+$(GLOBJ)dviprlib.$(OBJ): $(GLSRC)dviprlib.c $(GLSRC)dviprlib.h -+ $(GLCC) $(GLO_)dviprlib.$(OBJ) $(C_) $(GLSRC)dviprlib.c diff --git a/print/ghostscript8/files/patch-src-gdevijs.c b/print/ghostscript8/files/patch-src-gdevijs.c deleted file mode 100644 index fd5aeb1966d3..000000000000 --- a/print/ghostscript8/files/patch-src-gdevijs.c +++ /dev/null @@ -1,659 +0,0 @@ ---- src/gdevijs.c.orig Thu Mar 10 23:57:23 2005 -+++ src/gdevijs.c Fri May 27 02:56:55 2005 -@@ -27,15 +27,29 @@ - * which is a security risk, since any program can be run. - * You should use -dSAFER which sets .LockSafetyParams to true - * before opening this device. -+ * -+ * 11/26/03 David Suffield -+ * (c) 2003-2004 Copyright Hewlett-Packard Development Company, LP -+ * -+ * 1. Removed hpijs 1.0-1.0.2 workarounds, use hpijs 1.0.3 or higher. -+ * 2. Added krgb support. -+ * -+ * 02/21/05 David Suffield -+ * 1. Fixed segfault issue with 1-bit color space. -+ * 2. Fixed z-order issue with colored text on black rectangle. -+ * - */ - - #include "unistd_.h" /* for dup() */ - #include <stdlib.h> -+#include <fcntl.h> - #include "gdevprn.h" - #include "gp.h" - #include "ijs.h" - #include "ijs_client.h" - -+/*#define KRGB_DEBUG*/ -+ - /* This should go into gdevprn.h, or, better yet, gdevprn should - acquire an API for changing resolution. */ - int gdev_prn_maybe_realloc_memory(gx_device_printer *pdev, -@@ -52,6 +66,14 @@ - private dev_proc_put_params(gsijs_put_params); - private dev_proc_finish_copydevice(gsijs_finish_copydevice); - -+/* Following definitions are for krgb support. */ -+private dev_proc_create_buf_device(gsijs_create_buf_device); -+private dev_proc_fill_rectangle(gsijs_fill_rectangle); -+private dev_proc_copy_mono(gsijs_copy_mono); -+private dev_proc_fill_mask(gsijs_fill_mask); -+private dev_proc_fill_path(gsijs_fill_path); -+private dev_proc_stroke_path(gsijs_stroke_path); -+ - private const gx_device_procs gsijs_procs = { - gsijs_open, - NULL, /* get_initial_matrix */ -@@ -126,6 +148,14 @@ - - IjsClientCtx *ctx; - int ijs_version; -+ -+ /* Additional parameters for krgb support. */ -+ int krgb_mode; /* 0=false, 1=true */ -+ int k_path; /* k plane path, 0=false, 1=true */ -+ int k_width; /* k plane width in pixels */ -+ int k_band_size; /* k plane buffer size in bytes, byte aligned */ -+ unsigned char *k_band; /* k plane buffer */ -+ gx_device_procs prn_procs; /* banding playback procedures */ - }; - - #define DEFAULT_DPI 74 /* See gsijs_set_resolution() below. */ -@@ -153,7 +183,12 @@ - FALSE, /* Tumble_set */ - - NULL, /* IjsClient *ctx */ -- 0 /* ijs_version */ -+ 0, /* ijs_version */ -+ 0, /* krgb_mode */ -+ 0, /* k_path */ -+ 0, /* k_width */ -+ 0, /* k_band_size */ -+ NULL /* k_band buffer */ - }; - - -@@ -169,12 +204,254 @@ - - /**************************************************************************/ - --/* ------ Private definitions ------ */ -+/* ---------------- Low-level graphic procedures ---------------- */ -+ -+static unsigned char xmask[] = -+{ -+ 0x80, /* x=0 */ -+ 0x40, /* 1 */ -+ 0x20, /* 2 */ -+ 0x10, /* 3 */ -+ 0x08, /* 4 */ -+ 0x04, /* 5 */ -+ 0x02, /* 6 */ -+ 0x01 /* 7 */ -+}; -+ -+private int gsijs_fill_rectangle(gx_device * dev, int x, int y, int w, int h, -+ gx_color_index color) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target; -+ -+ if (ijsdev->krgb_mode && ijsdev->k_path && y >= 0 && x >= 0) -+ { -+ int raster = (ijsdev->k_width+7) >> 3; -+ register unsigned char *dest=ijsdev->k_band+(raster*y)+(x >> 3); -+ int dest_start_bit = x & 7; -+ int i,j,w1; -+ -+ if (h <= 0 || w <= 0) -+ return 0; -+ -+ if ((x+w) > ijsdev->k_width) -+ w1 = ijsdev->k_width - x; -+ else -+ w1 = w; -+ -+ /* Note x,y orgin 0,0 is stored first byte 0 left to right. */ -+ -+ if (color==0x0) -+ { -+ /* Color is black, store in k plane band instead of regular band. */ -+ for (j=0; j<h; j++) -+ { -+ for (i=0; i<w1; i++) -+ dest[(dest_start_bit+i)>>3] |= xmask[(dest_start_bit+i)&7]; -+ dest+=raster; -+ } -+ return 0; -+ } -+ else -+ { -+ /* Color is not black, remove any k plane bits for z-order dependencies, store in regular band. */ -+ for (j=0; j<h; j++) -+ { -+ for (i=0; i<w1; i++) -+ dest[(dest_start_bit+i)>>3] &= ~xmask[(dest_start_bit+i)&7]; -+ dest+=raster; -+ } -+ } -+ } -+ -+ return (*ijsdev->prn_procs.fill_rectangle)(dev, x, y, w, h, color); -+} -+ -+private int gsijs_copy_mono(gx_device * dev, const byte * data, -+ int dx, int draster, gx_bitmap_id id, -+ int x, int y, int w, int height, gx_color_index zero, gx_color_index one) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target; -+ -+ /* if (ijsdev->krgb_mode && ijsdev->k_path && one==0x0) */ -+ if (ijsdev->krgb_mode && ijsdev->k_path) -+ { -+ /* Store in k plane band instead of regular band. */ -+ int raster = (ijsdev->k_width+7) >> 3; /* raster width in bytes, byte aligned */ -+ register unsigned char *dest=ijsdev->k_band+(raster*y)+(x >> 3); -+ register const unsigned char *scan=data+(dx >> 3); -+ int dest_start_bit = x & 7; -+ int scan_start_bit = dx & 7; -+ int i, h=height; -+ -+ if (h <= 0 || w <= 0) -+ return 0; -+ -+ if (one==0x0) -+ { -+ /* Color is black, store in k plane band instead of regular band. */ -+ while (h-- > 0) -+ { -+ for (i=0; i<w; i++) -+ { -+ if (scan[(scan_start_bit+i)>>3] & xmask[(scan_start_bit+i)&7]) -+ dest[(dest_start_bit+i)>>3] |= xmask[(dest_start_bit+i)&7]; -+ } -+ scan+=draster; -+ dest+=raster; -+ } -+ return 0; -+ } -+ else -+ { -+ /* Color is not black, remove any k plane bits for z-order dependencies, store in regular band. */ -+ while (h-- > 0) -+ { -+ for (i=0; i<w; i++) -+ { -+ if (scan[(scan_start_bit+i)>>3] & xmask[(scan_start_bit+i)&7]) -+ dest[(dest_start_bit+i)>>3] &= ~xmask[(dest_start_bit+i)&7]; -+ } -+ scan+=draster; -+ dest+=raster; -+ } -+ } -+ } -+ -+ return (*ijsdev->prn_procs.copy_mono)(dev, data, dx, draster, id, x, y, w, height, zero, one); -+} -+ -+/* ---------------- High-level graphic procedures ---------------- */ -+ -+private int gsijs_fill_mask(gx_device * dev, -+ const byte * data, int dx, int raster, gx_bitmap_id id, -+ int x, int y, int w, int h, -+ const gx_drawing_color * pdcolor, int depth, -+ gs_logical_operation_t lop, const gx_clip_path * pcpath) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target; -+ int code; -+ -+ ijsdev->k_path = 1; -+ -+ code = (*ijsdev->prn_procs.fill_mask)(dev, data, dx, raster, id, x, y, w, h, pdcolor, depth, lop, pcpath); -+ -+ ijsdev->k_path = 0; -+ -+ return code; -+} -+ -+private int gsijs_fill_path(gx_device * dev, const gs_imager_state * pis, -+ gx_path * ppath, const gx_fill_params * params, -+ const gx_drawing_color * pdcolor, -+ const gx_clip_path * pcpath) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target; -+ int code; -+ -+ ijsdev->k_path = 1; -+ -+ code = (*ijsdev->prn_procs.fill_path)(dev, pis, ppath, params, pdcolor, pcpath); -+ -+ ijsdev->k_path = 0; -+ -+ return 0; -+} -+ -+private int gsijs_stroke_path(gx_device * dev, const gs_imager_state * pis, -+ gx_path * ppath, const gx_stroke_params * params, -+ const gx_drawing_color * pdcolor, -+ const gx_clip_path * pcpath) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)((gx_device_forward *)dev)->target; -+ int code; -+ -+ ijsdev->k_path = 1; - --/* Versions 1.0 through 1.0.2 of hpijs report IJS version 0.29, and -- require some workarounds. When more up-to-date hpijs versions -- become ubiquitous, all these workarounds should be removed. */ --#define HPIJS_1_0_VERSION 29 -+ code = (*ijsdev->prn_procs.stroke_path)(dev, pis, ppath, params, pdcolor, pcpath); -+ -+ ijsdev->k_path = 0; -+ -+ return code; -+} -+ -+/* ---------------- krgb banding playback procedures ---------------- */ -+ -+private int gsijs_get_bits(gx_device_printer * pdev, int y, byte * str, byte ** actual_data) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)pdev; -+ gx_device_clist_common *cdev = (gx_device_clist_common *)pdev; -+ int band_height = cdev->page_info.band_params.BandHeight; -+ int band_number = y/band_height; -+ int raster = (ijsdev->k_width+7) >> 3; /* raster width in bytes, byte aligned */ -+ int y1=raster*(y-(band_height*band_number)); -+ -+ if (y1 == 0) -+ { -+ /* First raster for band, clear k_band. Banding playback occurs on first raster. */ -+ memset(ijsdev->k_band, 0, ijsdev->k_band_size); -+ } -+ -+ return gdev_prn_get_bits(pdev, y, str, actual_data); /* get raster from regular band */ -+} -+ -+private int gsijs_k_get_bits(gx_device_printer * pdev, int y, byte ** actual_data) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)pdev; -+ gx_device_clist_common *cdev = (gx_device_clist_common *)pdev; -+ int band_height = cdev->page_info.band_params.BandHeight; -+ int band_number = y/band_height; -+ int raster = (ijsdev->k_width+7) >> 3; /* raster width in bytes, byte aligned */ -+ int y1=raster*(y-(band_height*band_number)); -+ -+ *actual_data = ijsdev->k_band+y1; -+ -+ return 0; -+} -+ -+private int gsijs_create_buf_device(gx_device **pbdev, gx_device *target, -+ const gx_render_plane_t *render_plane, gs_memory_t *mem, bool for_band) -+{ -+ gx_device_ijs *ijsdev = (gx_device_ijs *)target; -+ int n_chan = ijsdev->color_info.num_components; -+ int code = gx_default_create_buf_device(pbdev, target, render_plane, mem, for_band); -+ if (code < 0 || n_chan != 3) -+ return code; -+ -+ /* Save buffer (vector) procedures so that we can hook them during banding playback. */ -+ ijsdev->prn_procs = (*pbdev)->procs; -+ -+ /* Replace buffer procedures with krgb procedures. */ -+ set_dev_proc(*pbdev, fill_rectangle, gsijs_fill_rectangle); -+ set_dev_proc(*pbdev, copy_mono, gsijs_copy_mono); -+ set_dev_proc(*pbdev, fill_mask, gsijs_fill_mask); -+ set_dev_proc(*pbdev, fill_path, gsijs_fill_path); -+ set_dev_proc(*pbdev, stroke_path, gsijs_stroke_path); -+ -+ return code; -+} -+ -+/* See if IJS server supports krgb. Return value: 0=false, 1=true. */ -+private int -+gsijs_set_krgb_mode(gx_device_ijs *ijsdev) -+{ -+ char buf[256]; -+ int n_chan = ijsdev->color_info.num_components; -+ int code; -+ -+ if (n_chan != 3) -+ return 0; /* no krgb support, not RGB colorspace */ -+ -+ buf[0] = 0; -+ code = ijs_client_enum_param(ijsdev->ctx, 0, "ColorSpace", buf, sizeof(buf)-1); -+ if (code >= 0) -+ buf[code] = 0; -+ if (strstr(buf, "KRGB") == NULL) -+ return 0; /* no krgb support */ -+ -+ return 1; /* krgb is supported */ -+} -+ -+/* ------ Private definitions ------ */ - - private int - gsijs_parse_wxh (const char *val, int size, double *pw, double *ph) -@@ -212,34 +489,6 @@ - } - - /** -- * gsijs_set_generic_params_hpijs: Set generic IJS parameters. -- * -- * This version is specialized for hpijs 1.0 through 1.0.2, and -- * accommodates a number of quirks. -- **/ --private int --gsijs_set_generic_params_hpijs(gx_device_ijs *ijsdev) --{ -- char buf[256]; -- int code = 0; -- -- /* IjsParams, Duplex, and Tumble get set at this point because -- they may affect margins. */ -- if (ijsdev->IjsParams) { -- code = gsijs_client_set_param(ijsdev, "IjsParams", ijsdev->IjsParams); -- } -- -- if (code == 0 && ijsdev->Duplex_set) { -- int duplex_val; -- -- duplex_val = ijsdev->Duplex ? (ijsdev->IjsTumble ? 1 : 2) : 0; -- sprintf (buf, "%d", duplex_val); -- code = gsijs_client_set_param(ijsdev, "Duplex", buf); -- } -- return code; --} -- --/** - * gsijs_set_generic_params: Set generic IJS parameters. - **/ - private int -@@ -250,9 +499,6 @@ - int i, j; - char *value; - -- if (ijsdev->ijs_version == HPIJS_1_0_VERSION) -- return gsijs_set_generic_params_hpijs(ijsdev); -- - /* Split IjsParams into separate parameters and send to ijs server */ - value = NULL; - for (i=0, j=0; (j < ijsdev->IjsParams_size) && (i < sizeof(buf)-1); j++) { -@@ -293,68 +539,6 @@ - } - - /** -- * gsijs_set_margin_params_hpijs: Do margin negotiation with IJS server. -- * -- * This version is specialized for hpijs 1.0 through 1.0.2, and -- * accommodates a number of quirks. -- **/ --private int --gsijs_set_margin_params_hpijs(gx_device_ijs *ijsdev) --{ -- char buf[256]; -- int code = 0; -- -- if (code == 0) { -- sprintf(buf, "%d", ijsdev->width); -- code = gsijs_client_set_param(ijsdev, "Width", buf); -- } -- if (code == 0) { -- sprintf(buf, "%d", ijsdev->height); -- code = gsijs_client_set_param(ijsdev, "Height", buf); -- } -- -- if (code == 0) { -- double printable_width, printable_height; -- double printable_left, printable_top; -- float m[4]; -- -- code = ijs_client_get_param(ijsdev->ctx, 0, "PrintableArea", -- buf, sizeof(buf)); -- if (code == IJS_EUNKPARAM) -- /* IJS server doesn't support margin negotiations. -- That's ok. */ -- return 0; -- else if (code >= 0) { -- code = gsijs_parse_wxh(buf, code, -- &printable_width, &printable_height); -- } -- -- if (code == 0) { -- code = ijs_client_get_param(ijsdev->ctx, 0, "PrintableTopLeft", -- buf, sizeof(buf)); -- if (code == IJS_EUNKPARAM) -- return 0; -- else if (code >= 0) { -- code = gsijs_parse_wxh(buf, code, -- &printable_left, &printable_top); -- } -- } -- -- if (code == 0) { -- m[0] = printable_left; -- m[1] = ijsdev->MediaSize[1] * (1.0 / 72) - -- printable_top - printable_height; -- m[2] = ijsdev->MediaSize[0] * (1.0 / 72) - -- printable_left - printable_width; -- m[3] = printable_top; -- gx_device_set_margins((gx_device *)ijsdev, m, true); -- } -- } -- -- return code; --} -- --/** - * gsijs_set_margin_params: Do margin negotiation with IJS server. - **/ - private int -@@ -365,9 +549,6 @@ - int i, j; - char *value; - -- if (ijsdev->ijs_version == HPIJS_1_0_VERSION) -- return gsijs_set_margin_params_hpijs(ijsdev); -- - /* Split IjsParams into separate parameters and send to ijs server */ - value = NULL; - for (i=0, j=0; (j < ijsdev->IjsParams_size) && (i < sizeof(buf)-1); j++) { -@@ -534,12 +715,18 @@ - char buf[256]; - bool use_outputfd; - int fd = -1; -+ long max_bitmap = ijsdev->space_params.MaxBitmap; - - if (strlen(ijsdev->IjsServer) == 0) { - eprintf("ijs server not specified\n"); - return gs_note_error(gs_error_ioerror); - } - -+ ijsdev->space_params.MaxBitmap = 0; /* force banding */ -+ -+ /* Set create_buf_device in printer device, so that we can hook the banding playback procedures. */ -+ ijsdev->printer_procs.buf_procs.create_buf_device = gsijs_create_buf_device; -+ - /* Decide whether to use OutputFile or OutputFD. Note: how to - determine this is a tricky question, so we just allow the - user to set it. -@@ -554,6 +741,8 @@ - if (code < 0) - return code; - -+ ijsdev->space_params.MaxBitmap = max_bitmap; -+ - if (use_outputfd) { - /* Note: dup() may not be portable to all interesting IJS - platforms. In that case, this branch should be #ifdef'ed out. -@@ -613,6 +802,9 @@ - if (code >= 0) - code = gsijs_set_margin_params(ijsdev); - -+ if (code >= 0) -+ ijsdev->krgb_mode = gsijs_set_krgb_mode(ijsdev); -+ - return code; - } - -@@ -695,21 +887,6 @@ - return min(width, end); - } - --private int ijs_all_white(unsigned char *data, int size) --{ -- int clean = 1; -- int i; -- for (i = 0; i < size; i++) -- { -- if (data[i] != 0xFF) -- { -- clean = 0; -- break; -- } -- } -- return clean; --} -- - /* Print a page. Don't use normal printer gdev_prn_output_page - * because it opens the output file. - */ -@@ -720,8 +897,9 @@ - gx_device_printer *pdev = (gx_device_printer *)dev; - int raster = gdev_prn_raster(pdev); - int ijs_width, ijs_height; -- int row_bytes; -+ int row_bytes, k_row_bytes=0; - int n_chan = pdev->color_info.num_components; -+ int krgb_mode = ijsdev->krgb_mode; - unsigned char *data; - char buf[256]; - double xres = pdev->HWResolution[0]; -@@ -737,13 +915,23 @@ - - /* Determine bitmap width and height */ - ijs_height = gdev_prn_print_scan_lines(dev); -- if (ijsdev->ijs_version == HPIJS_1_0_VERSION) { -- ijs_width = pdev->width; -- } else { - ijs_width = gsijs_raster_width(dev); -- } -+ - row_bytes = (ijs_width * pdev->color_info.depth + 7) >> 3; - -+ if (krgb_mode) -+ { -+ gx_device_clist_common *cdev = (gx_device_clist_common *)dev; -+ int band_height = cdev->page_info.band_params.BandHeight; -+ k_row_bytes = (ijs_width + 7) >> 3; -+ -+ /* Create banding buffer for k plane. */ -+ ijsdev->k_width = ijs_width; -+ ijsdev->k_band_size = band_height * k_row_bytes; -+ if ((ijsdev->k_band = gs_malloc(pdev->memory, ijsdev->k_band_size, 1, "gsijs_output_page")) == (unsigned char *)NULL) -+ return gs_note_error(gs_error_VMerror); -+ } -+ - /* Required page parameters */ - sprintf(buf, "%d", n_chan); - gsijs_client_set_param(ijsdev, "NumChan", buf); -@@ -752,44 +940,71 @@ - - /* This needs to become more sophisticated for DeviceN. */ - strcpy(buf, (n_chan == 4) ? "DeviceCMYK" : -- ((n_chan == 3) ? "DeviceRGB" : "DeviceGray")); -+ ((n_chan == 3) ? (krgb_mode ? "KRGB" : "DeviceRGB") : "DeviceGray")); - gsijs_client_set_param(ijsdev, "ColorSpace", buf); - -- /* If hpijs 1.0, don't set width and height here, because it -- expects them to be the paper size. */ -- if (ijsdev->ijs_version != HPIJS_1_0_VERSION) { -- sprintf(buf, "%d", ijs_width); -- gsijs_client_set_param(ijsdev, "Width", buf); -- sprintf(buf, "%d", ijs_height); -- gsijs_client_set_param(ijsdev, "Height", buf); -- } -+ sprintf(buf, "%d", ijs_width); -+ gsijs_client_set_param(ijsdev, "Width", buf); -+ sprintf(buf, "%d", ijs_height); -+ gsijs_client_set_param(ijsdev, "Height", buf); - - sprintf(buf, "%gx%g", xres, yres); - gsijs_client_set_param(ijsdev, "Dpi", buf); - -+#ifdef KRGB_DEBUG -+ int kfd, rgbfd; -+ char sz[128]; -+ kfd = open("/tmp/k.pbm", O_CREAT | O_TRUNC | O_RDWR, 0644); -+ rgbfd = open("/tmp/rgb.ppm", O_CREAT | O_TRUNC | O_RDWR, 0644); -+ snprintf(sz, sizeof(sz), "P4\n#gdevijs test\n%d\n%d\n", ijs_width, ijs_height); -+ write(kfd, sz, strlen(sz)); -+ snprintf(sz, sizeof(sz), "P6\n#gdevijs test\n%d\n%d\n255\n", ijs_width, ijs_height); -+ write(rgbfd, sz, strlen(sz)); -+#endif -+ - for (i=0; i<num_copies; i++) { - unsigned char *actual_data; - ijs_client_begin_cmd (ijsdev->ctx, IJS_CMD_BEGIN_PAGE); - status = ijs_client_send_cmd_wait(ijsdev->ctx); - - for (y = 0; y < ijs_height; y++) { -- code = gdev_prn_get_bits(pdev, y, data, &actual_data); -- if (code < 0) -- break; -+ if (krgb_mode) -+ code = gsijs_get_bits(pdev, y, data, &actual_data); -+ else -+ code = gdev_prn_get_bits(pdev, y, data, &actual_data); -+ if (code < 0) -+ break; -+#ifdef KRGB_DEBUG -+ write(rgbfd, actual_data, row_bytes); -+#endif -+ status = ijs_client_send_data_wait(ijsdev->ctx, 0, (char *)actual_data, row_bytes); -+ if (status) -+ break; - -- if (ijsdev->ijs_version == HPIJS_1_0_VERSION && -- ijs_all_white(actual_data, row_bytes)) -- status = ijs_client_send_data_wait(ijsdev->ctx, 0, NULL, 0); -- else -- status = ijs_client_send_data_wait(ijsdev->ctx, 0, -- (char *)actual_data, row_bytes); -- if (status) -- break; -+ if (krgb_mode) { -+ code = gsijs_k_get_bits(pdev, y, &actual_data); -+ if (code < 0) -+ break; -+#ifdef KRGB_DEBUG -+ write(kfd, actual_data, k_row_bytes); -+#endif -+ status = ijs_client_send_data_wait(ijsdev->ctx, 0, (char *)actual_data, k_row_bytes); -+ if (status) -+ break; -+ } - } - ijs_client_begin_cmd(ijsdev->ctx, IJS_CMD_END_PAGE); - status = ijs_client_send_cmd_wait(ijsdev->ctx); - } - -+#ifdef KRGB_DEBUG -+ close(kfd); -+ close(rgbfd); -+#endif -+ -+ if(krgb_mode) -+ gs_free(pdev->memory, ijsdev->k_band, ijsdev->k_band_size, 1, "gsijs_output_page"); -+ - gs_free_object(pdev->memory, data, "gsijs_output_page"); - - endcode = (pdev->buffer_space && !pdev->is_async_renderer ? -@@ -1093,7 +1308,6 @@ - dprintf2("ijs: Can't set parameter %s=%s\n", key, value); - return code; - } -- - - private int - gsijs_set_color_format(gx_device_ijs *ijsdev) diff --git a/print/ghostscript8/files/patch-src:cpca_gdevl4v.c b/print/ghostscript8/files/patch-src:cpca_gdevl4v.c deleted file mode 100644 index 8e7c323a351d..000000000000 --- a/print/ghostscript8/files/patch-src:cpca_gdevl4v.c +++ /dev/null @@ -1,82 +0,0 @@ ---- src/cpca_gdevl4v.c.orig Tue May 7 00:30:00 2002 -+++ src/cpca_gdevl4v.c Wed Dec 10 19:54:46 2003 -@@ -316,41 +316,35 @@ - }; - - /* Vector device implementation */ --private int lips4v_beginpage(P1(gx_device_vector * vdev)); --private int lips4v_setfillcolor(P2(gx_device_vector * vdev, -- const gx_drawing_color * pdc)); --private int lips4v_setstrokecolor(P2(gx_device_vector * vdev, -- const gx_drawing_color * pdc)); --private int lips4v_setdash(P4(gx_device_vector * vdev, const float *pattern, -- uint count, floatp offset)); --private int lips4v_setflat(P2(gx_device_vector * vdev, floatp flatness)); -+private int lips4v_beginpage(gx_device_vector * vdev); -+private int lips4v_setfillcolor(gx_device_vector * vdev, -+ const gx_drawing_color * pdc); -+private int lips4v_setstrokecolor(gx_device_vector * vdev, -+ const gx_drawing_color * pdc); -+private int lips4v_setdash(gx_device_vector * vdev, const float *pattern, -+ uint count, floatp offset); -+private int lips4v_setflat(gx_device_vector * vdev, floatp flatness); - private int --lips4v_setlogop(P3 -- -- (gx_device_vector * vdev, gs_logical_operation_t lop, -- gs_logical_operation_t diff)); -+lips4v_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, -+ gs_logical_operation_t diff); - private int - --lips4v_beginpath(P2(gx_device_vector * vdev, gx_path_type_t type)); -+lips4v_beginpath(gx_device_vector * vdev, gx_path_type_t type); - private int --lips4v_moveto(P6 -- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -- floatp y, gx_path_type_t type)); -+lips4v_moveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -+ floatp y, gx_path_type_t type); - private int --lips4v_lineto(P6 -- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -- floatp y, gx_path_type_t type)); -+lips4v_lineto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, -+ floatp y, gx_path_type_t type); - private int --lips4v_curveto(P10 -- (gx_device_vector * vdev, floatp x0, floatp y0, floatp x1, -+lips4v_curveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x1, - floatp y1, floatp x2, floatp y2, floatp x3, floatp y3, -- gx_path_type_t type)); -+ gx_path_type_t type); - private int --lips4v_closepath(P6 -- (gx_device_vector * vdev, floatp x, floatp y, floatp x_start, -- floatp y_start, gx_path_type_t type)); -+lips4v_closepath(gx_device_vector * vdev, floatp x, floatp y, floatp x_start, -+ floatp y_start, gx_path_type_t type); - --private int lips4v_endpath(P2(gx_device_vector * vdev, gx_path_type_t type)); -+private int lips4v_endpath(gx_device_vector * vdev, gx_path_type_t type); - private int lips4v_setlinewidth(gx_device_vector * vdev, floatp width); - private int lips4v_setlinecap(gx_device_vector * vdev, gs_line_cap cap); - private int lips4v_setlinejoin(gx_device_vector * vdev, gs_line_join join); -@@ -2296,7 +2290,7 @@ - } - color_set_pure(&color, one); - code = gdev_vector_update_fill_color((gx_device_vector *) pdev, -- &color); -+ NULL, &color); - } - if (code < 0) - return 0; -@@ -2438,7 +2432,7 @@ - if (w <= 0 || h <= 0) - return 0; - if (depth > 1 || -- gdev_vector_update_fill_color(vdev, pdcolor) < 0 || -+ gdev_vector_update_fill_color(vdev, NULL, pdcolor) < 0 || - gdev_vector_update_clip_path(vdev, pcpath) < 0 || - gdev_vector_update_log_op(vdev, lop) < 0) - return gx_default_fill_mask(dev, data, data_x, raster, id, diff --git a/print/ghostscript8/files/patch-src:gdevcd8.c b/print/ghostscript8/files/patch-src:gdevcd8.c deleted file mode 100644 index b5257edb49de..000000000000 --- a/print/ghostscript8/files/patch-src:gdevcd8.c +++ /dev/null @@ -1,303 +0,0 @@ ---- src/gdevcd8.c.orig Mon Feb 28 16:01:59 2000 -+++ src/gdevcd8.c Fri Dec 17 19:42:52 2004 -@@ -406,19 +406,19 @@ - }; - - private int -- rescale_byte_wise1x1(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise1x1(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - private int -- rescale_byte_wise2x1(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise2x1(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - private int -- rescale_byte_wise1x2(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise1x2(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - private int -- rescale_byte_wise2x2(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise2x2(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - --private int (* const rescale_color_plane[2][2]) (P4(int, const byte *, const byte *, byte *)) = { -+private int (* const rescale_color_plane[2][2]) (int, const byte *, const byte *, byte *) = { - { - rescale_byte_wise1x1, rescale_byte_wise1x2 - }, -@@ -571,16 +571,16 @@ - }; - - /* function pointer typedefs for device driver struct */ --typedef void (*StartRasterMode) (P3(gx_device_printer * pdev, int paper_size, -- FILE * prn_stream)); --typedef void (*PrintNonBlankLines) (P6(gx_device_printer * pdev, -+typedef void (*StartRasterMode) (gx_device_printer * pdev, int paper_size, -+ FILE * prn_stream); -+typedef void (*PrintNonBlankLines) (gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - --typedef void (*TerminatePage) (P2(gx_device_printer * pdev, FILE * prn_stream)); -+typedef void (*TerminatePage) (gx_device_printer * pdev, FILE * prn_stream); - - typedef struct gx_device_cdj850_s { - gx_device_common; -@@ -699,52 +699,52 @@ - * functions. - */ - private void -- cdj850_start_raster_mode(P3(gx_device_printer * pdev, -- int papersize, FILE * prn_stream)); -+ cdj850_start_raster_mode(gx_device_printer * pdev, -+ int papersize, FILE * prn_stream); - - private void -- cdj850_print_non_blank_lines(P6(gx_device_printer * pdev, -+ cdj850_print_non_blank_lines(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - - private void -- cdj850_terminate_page(P2(gx_device_printer * pdev, FILE * prn_stream)); -+ cdj850_terminate_page(gx_device_printer * pdev, FILE * prn_stream); - - /* The 880C and siblings need a separate set of functions because they seem - * to require a somewhat different version of PCL3+. - */ - private void -- cdj880_start_raster_mode(P3(gx_device_printer * pdev, -- int papersize, FILE * prn_stream)); -+ cdj880_start_raster_mode(gx_device_printer * pdev, -+ int papersize, FILE * prn_stream); - - private void -- cdj880_print_non_blank_lines(P6(gx_device_printer * pdev, -+ cdj880_print_non_blank_lines(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - - private void -- cdj880_terminate_page(P2(gx_device_printer * pdev, FILE * prn_stream)); -+ cdj880_terminate_page(gx_device_printer * pdev, FILE * prn_stream); - - /* Functions for the 1600C. - */ - private void -- cdj1600_start_raster_mode(P3(gx_device_printer * pdev, -- int papersize, FILE * prn_stream)); -+ cdj1600_start_raster_mode(gx_device_printer * pdev, -+ int papersize, FILE * prn_stream); - private void -- cdj1600_print_non_blank_lines(P6(gx_device_printer * pdev, -+ cdj1600_print_non_blank_lines(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - private void -- cdj1600_terminate_page(P2(gx_device_printer * pdev, FILE * prn_stream)); -+ cdj1600_terminate_page(gx_device_printer * pdev, FILE * prn_stream); - - - -@@ -804,12 +804,12 @@ - cdj1600_terminate_page); - - /* Forward references */ --private int cdj_put_param_int(P6(gs_param_list *, gs_param_name, -- int *, int, int, int)); --private int cdj_put_param_float(P6(gs_param_list *, gs_param_name, float -- *, float, float, int)); --private int cdj_put_param_bpp(P5(gx_device *, gs_param_list *, int, int, int)); --private int cdj_set_bpp(P3(gx_device *, int, int)); -+private int cdj_put_param_int(gs_param_list *, gs_param_name, -+ int *, int, int, int); -+private int cdj_put_param_float(gs_param_list *, gs_param_name, float -+ *, float, float, int); -+private int cdj_put_param_bpp(gx_device *, gs_param_list *, int, int, int); -+private int cdj_set_bpp(gx_device *, int, int); - - - /* hp_colour_open() -@@ -1028,73 +1028,73 @@ - - /* internal functions */ - private void -- FSDlinebw(P7(int scan, int plane_size, -+ FSDlinebw(int scan, int plane_size, - struct error_val_field *error_values, - byte * kP, -- int n, int *ep, byte * dp)); -+ int n, int *ep, byte * dp); - private void -- FSDlinec2(P9(int scan, int plane_size, -+ FSDlinec2(int scan, int plane_size, - struct error_val_field *error_values, - byte * cPa, byte * mPa, byte * yPa, int n, -- byte * dp, int *ep)); -+ byte * dp, int *ep); - private void -- FSDlinec3(P12(int scan, int plane_size, -+ FSDlinec3(int scan, int plane_size, - struct error_val_field *error_values, - byte * cPa, byte * mPa, byte * yPa, - byte * cPb, byte * mPb, byte * yPb, -- int n, byte * dp, int *ep)); -+ int n, byte * dp, int *ep); - private void -- FSDlinec4(P12(int scan, int plane_size, -+ FSDlinec4(int scan, int plane_size, - struct error_val_field *error_values, - byte * cPa, byte * mPa, byte * yPa, - byte * cPb, byte * mPb, byte * yPb, -- int n, byte * dp, int *ep)); -+ int n, byte * dp, int *ep); - private void - init_error_buffer(struct misc_struct *misc_vars, - struct ptr_arrays *data_ptrs); - private void -- do_floyd_steinberg(P8(int scan, int cscan, int plane_size, -+ do_floyd_steinberg(int scan, int cscan, int plane_size, - int plane_size_c, int n, - struct ptr_arrays *data_ptrs, - gx_device_printer * pdev, -- struct error_val_field *error_values)); -+ struct error_val_field *error_values); - private int -- do_gcr(P8(int bytecount, byte * inbyte, const byte * kvalues, -+ do_gcr(int bytecount, byte * inbyte, const byte * kvalues, - const byte * cvalues, const byte * mvalues, - const byte * yvalues, const int *kcorrect, -- word * inword)); -+ word * inword); - - /* UNUSED - *private int -- *test_scan (P4(int size, -+ *test_scan (int size, - * byte * current, - * byte * last, -- * byte * control)); -+ * byte * control); - *private void -- *save_color_data(P3(int size, -+ *save_color_data(int size, - * byte * current, -- * byte * saved)); -+ * byte * saved); - * - */ - private void -- send_scan_lines(P6(gx_device_printer * pdev, -+ send_scan_lines(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - private void -- do_gamma(P3(float mastergamma, float gammaval, byte * values)); -+ do_gamma(float mastergamma, float gammaval, byte * values); - private void -- do_black_correction(P2(float kvalue, int *kcorrect)); -+ do_black_correction(float kvalue, int *kcorrect); - - private void -- init_data_structure(P3(gx_device_printer * pdev, -+ init_data_structure(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, -- struct misc_struct *misc_vars)); -+ struct misc_struct *misc_vars); - private void -- calculate_memory_size(P2(gx_device_printer * pdev, -- struct misc_struct *misc_vars)); -+ calculate_memory_size(gx_device_printer * pdev, -+ struct misc_struct *misc_vars); - - - private void -@@ -1175,7 +1175,7 @@ - 2bpp feature of the hp850 someday, it is sized like storage. - storagee contains the errors from b/w fs-ditherng */ - -- data_ptrs.storage = (ulong *) gs_malloc(misc_vars.storage_size_words, W, -+ data_ptrs.storage = (ulong *) gs_malloc(pdev->memory, misc_vars.storage_size_words, W, - "cdj850_print_page"); - - /* if we can't allocate working area */ -@@ -1196,7 +1196,7 @@ - (*cdj850->terminate_page) (pdev, prn_stream); - - /* Free Memory */ -- gs_free((char *)data_ptrs.storage, misc_vars.storage_size_words, W, -+ gs_free(pdev->memory, (char *)data_ptrs.storage, misc_vars.storage_size_words, W, - "hp850_print_page"); - - return 0; -@@ -2744,13 +2744,14 @@ - (y) = gx_bits_to_color_value((v) & ((1 << (b)) - 1), (b)) - - private gx_color_index --gdev_cmyk_map_cmyk_color(gx_device * pdev, -- gx_color_value cyan, gx_color_value magenta, -- gx_color_value yellow, -- gx_color_value black) -+gdev_cmyk_map_cmyk_color(gx_device * pdev, const gx_color_value cv[]) - { - - gx_color_index color; -+ gx_color_value cyan = cv[0]; -+ gx_color_value magenta = cv[1]; -+ gx_color_value yellow = cv[2]; -+ gx_color_value black = cv[3]; - - switch (pdev->color_info.depth) { - case 1: -@@ -2783,9 +2784,11 @@ - /* Mapping of RGB colors to gray values. */ - - private gx_color_index --gdev_cmyk_map_rgb_color(gx_device * pdev, gx_color_value r, gx_color_value -- g, gx_color_value b) -+gdev_cmyk_map_rgb_color(gx_device * pdev, const gx_color_value cv[]) - { -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - if (gx_color_value_to_byte(r & g & b) == 0xff) { - return (gx_color_index) 0; /* White */ - } else { -@@ -2873,9 +2876,11 @@ - } - - private gx_color_index --gdev_pcl_map_rgb_color(gx_device * pdev, gx_color_value r, -- gx_color_value g, gx_color_value b) -+gdev_pcl_map_rgb_color(gx_device * pdev, const gx_color_value cv[]) - { -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - if (gx_color_value_to_byte(r & g & b) == 0xff) - return (gx_color_index) 0; /* white */ - else { diff --git a/print/ghostscript8/files/patch-src:gdevdj9.c b/print/ghostscript8/files/patch-src:gdevdj9.c deleted file mode 100644 index ef473318ad07..000000000000 --- a/print/ghostscript8/files/patch-src:gdevdj9.c +++ /dev/null @@ -1,273 +0,0 @@ ---- src/gdevdj9.c.orig Fri Dec 17 19:31:42 2004 -+++ src/gdevdj9.c Fri Dec 17 19:44:07 2004 -@@ -243,19 +243,19 @@ - }; - - private int -- rescale_byte_wise1x1(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise1x1(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - private int -- rescale_byte_wise2x1(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise2x1(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - private int -- rescale_byte_wise1x2(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise1x2(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - private int -- rescale_byte_wise2x2(P4(int bytecount, const byte * inbytea, -- const byte * inbyteb, byte * outbyte)); -+ rescale_byte_wise2x2(int bytecount, const byte * inbytea, -+ const byte * inbyteb, byte * outbyte); - --private int (* const rescale_color_plane[2][2]) (P4(int, const byte *, const byte *, byte *)) = { -+private int (* const rescale_color_plane[2][2]) (int, const byte *, const byte *, byte *) = { - { - rescale_byte_wise1x1, rescale_byte_wise1x2 - }, -@@ -264,7 +264,7 @@ - } - }; - /* --private int (* const rescale_color_plane[2][2]) (P4(int, const byte *, const byte *, byte *)) = { -+private int (* const rescale_color_plane[2][2]) (int, const byte *, const byte *, byte *) = { - { - rescale_byte_wise1x1, rescale_byte_wise1x1 - }, -@@ -273,8 +273,8 @@ - } - }; - */ --private int cdj970_write_header(P2(gx_device *, FILE *)); --private int cdj970_write_trailer(P2(gx_device *, FILE *)); -+private int cdj970_write_header(gx_device *, FILE *); -+private int cdj970_write_trailer(gx_device *, FILE *); - - /* - * Drivers stuff. -@@ -422,16 +422,16 @@ - }; - - /* function pointer typedefs for device driver struct */ --typedef void (*StartRasterMode) (P3(gx_device_printer * pdev, int paper_size, -- FILE * prn_stream)); --typedef void (*PrintNonBlankLines) (P6(gx_device_printer * pdev, -+typedef void (*StartRasterMode) (gx_device_printer * pdev, int paper_size, -+ FILE * prn_stream); -+typedef void (*PrintNonBlankLines) (gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - --typedef void (*TerminatePage) (P2(gx_device_printer * pdev, FILE * prn_stream)); -+typedef void (*TerminatePage) (gx_device_printer * pdev, FILE * prn_stream); - - typedef struct gx_device_cdj970_s { - gx_device_common; -@@ -529,18 +529,18 @@ - } - - private void -- cdj970_start_raster_mode(P3(gx_device_printer * pdev, -- int papersize, FILE * prn_stream)); -+ cdj970_start_raster_mode(gx_device_printer * pdev, -+ int papersize, FILE * prn_stream); - - private void -- cdj970_print_non_blank_lines(P6(gx_device_printer * pdev, -+ cdj970_print_non_blank_lines(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - private void -- cdj970_terminate_page(P2(gx_device_printer * pdev, FILE * prn_stream)); -+ cdj970_terminate_page(gx_device_printer * pdev, FILE * prn_stream); - - - private const gx_device_procs cdj970_procs = -@@ -555,12 +555,12 @@ - cdj970_terminate_page); - - /* Forward references */ --private int cdj_put_param_int(P6(gs_param_list *, gs_param_name, -- int *, int, int, int)); --private int cdj_put_param_float(P6(gs_param_list *, gs_param_name, float -- *, float, float, int)); --private int cdj_put_param_bpp(P5(gx_device *, gs_param_list *, int, int, int)); --private int cdj_set_bpp(P3(gx_device *, int, int)); -+private int cdj_put_param_int(gs_param_list *, gs_param_name, -+ int *, int, int, int); -+private int cdj_put_param_float(gs_param_list *, gs_param_name, float -+ *, float, float, int); -+private int cdj_put_param_bpp(gx_device *, gs_param_list *, int, int, int); -+private int cdj_set_bpp(gx_device *, int, int); - - static int PageCtr = 0; - -@@ -692,70 +692,70 @@ - - /* internal functions */ - private void -- FSDlinebw(P7(int scan, int plane_size, -+ FSDlinebw(int scan, int plane_size, - struct error_val_field *error_values, - byte * kP, -- int n, int *ep, byte * dp)); -+ int n, int *ep, byte * dp); - - private void -- FSDlinec2(P9(int scan, int plane_size, -+ FSDlinec2(int scan, int plane_size, - struct error_val_field *error_values, - byte * cPa, byte * mPa, byte * yPa, int n, -- byte * dp, int *ep)); -+ byte * dp, int *ep); - - private void -- FSDlinec3(P12(int scan, int plane_size, -+ FSDlinec3(int scan, int plane_size, - struct error_val_field *error_values, - byte * cPa, byte * mPa, byte * yPa, - byte * cPb, byte * mPb, byte * yPb, -- int n, byte * dp, int *ep)); -+ int n, byte * dp, int *ep); - - private void -- FSDlinec4(P12(int scan, int plane_size, -+ FSDlinec4(int scan, int plane_size, - struct error_val_field *error_values, - byte * cPa, byte * mPa, byte * yPa, - byte * cPb, byte * mPb, byte * yPb, -- int n, byte * dp, int *ep)); -+ int n, byte * dp, int *ep); - - private void - init_error_buffer(struct misc_struct *misc_vars, - struct ptr_arrays *data_ptrs); - - private void -- do_floyd_steinberg(P8(int scan, int cscan, int plane_size, -+ do_floyd_steinberg(int scan, int cscan, int plane_size, - int plane_size_c, int n, - struct ptr_arrays *data_ptrs, - gx_device_printer * pdev, -- struct error_val_field *error_values)); -+ struct error_val_field *error_values); - - - private int -- do_gcr(P7(int bytecount, byte * inbyte, const byte * kvalues, -+ do_gcr(int bytecount, byte * inbyte, const byte * kvalues, - const byte * cvalues, const byte * mvalues, -- const byte * yvalues, const int *kcorrect)); -+ const byte * yvalues, const int *kcorrect); - - private void -- send_scan_lines(P6(gx_device_printer * pdev, -+ send_scan_lines(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, - struct misc_struct *misc_vars, - struct error_val_field *error_values, - const Gamma *gamma, -- FILE * prn_stream)); -+ FILE * prn_stream); - - private void -- do_gamma(P3(float mastergamma, float gammaval, byte * values)); -+ do_gamma(float mastergamma, float gammaval, byte * values); - - private void -- do_black_correction(P2(float kvalue, int *kcorrect)); -+ do_black_correction(float kvalue, int *kcorrect); - - private void -- init_data_structure(P3(gx_device_printer * pdev, -+ init_data_structure(gx_device_printer * pdev, - struct ptr_arrays *data_ptrs, -- struct misc_struct *misc_vars)); -+ struct misc_struct *misc_vars); - - private void -- calculate_memory_size(P2(gx_device_printer * pdev, -- struct misc_struct *misc_vars)); -+ calculate_memory_size(gx_device_printer * pdev, -+ struct misc_struct *misc_vars); - - - /* assign_dpi: -@@ -863,7 +863,7 @@ - 2bpp feature of the hp970 someday, it is sized like storage. - storagee contains the errors from b/w fs-ditherng */ - -- data_ptrs.storage = (ulong *) gs_malloc(misc_vars.storage_size_words, W, -+ data_ptrs.storage = (ulong *) gs_malloc(pdev->memory, misc_vars.storage_size_words, W, - "cdj970_print_page"); - - /* if we can't allocate working area */ -@@ -884,7 +884,7 @@ - (*cdj970->terminate_page) (pdev, prn_stream); - - /* Free Memory */ -- gs_free((char *)data_ptrs.storage, misc_vars.storage_size_words, W, -+ gs_free(pdev->memory, (char *)data_ptrs.storage, misc_vars.storage_size_words, W, - "hp970_print_page"); - - PageCtr ++; -@@ -2292,12 +2292,13 @@ - /* gdev_cmyk_map_cmyk_color: - ----------------------------------------------------------------------------------*/ - private gx_color_index gdev_cmyk_map_cmyk_color(gx_device *pdev, -- gx_color_value cyan, -- gx_color_value magenta, -- gx_color_value yellow, -- gx_color_value black) -+ const gx_color_value cv[]) - { - gx_color_index color; -+ gx_color_value cyan = cv[0]; -+ gx_color_value magenta = cv[1]; -+ gx_color_value yellow = cv[2]; -+ gx_color_value black = cv[3]; - - switch (pdev->color_info.depth) { - case 1: -@@ -2331,10 +2332,11 @@ - /* gdev_cmyk_map_rgb_color: Mapping of RGB colors to gray values. - ----------------------------------------------------------------------------------*/ - private gx_color_index gdev_cmyk_map_rgb_color( gx_device *pdev, -- gx_color_value r, -- gx_color_value g, -- gx_color_value b) -+ const gx_color_value cv[]) - { -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - if (gx_color_value_to_byte(r & g & b) == 0xff) { - return (gx_color_index) 0; /* White */ - } else { -@@ -2427,10 +2429,11 @@ - /* gdev_pcl_map_rgb_color: - ----------------------------------------------------------------------------------*/ - private gx_color_index gdev_pcl_map_rgb_color( gx_device *pdev, -- gx_color_value r, -- gx_color_value g, -- gx_color_value b) -+ const gx_color_value cv[]) - { -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - if (gx_color_value_to_byte(r & g & b) == 0xff) - return (gx_color_index) 0; /* white */ - else { diff --git a/print/ghostscript8/files/patch-src:gdevgdi.c b/print/ghostscript8/files/patch-src:gdevgdi.c deleted file mode 100644 index 49d575dd8c27..000000000000 --- a/print/ghostscript8/files/patch-src:gdevgdi.c +++ /dev/null @@ -1,1007 +0,0 @@ ---- src/gdevgdi.c.orig Wed Jun 19 19:32:49 2002 -+++ src/gdevgdi.c Fri Dec 31 17:41:18 2004 -@@ -60,8 +60,8 @@ - #define GDI_REPEAT_LENGTH 2 - #define GDI_BAND_HEIGHT 128 - #define GDI_MAX_BAND 66 --//#define GDI_BAND_WIDTH 4928 --//#define GDI_BAND_WIDTH_BYTES (((GDI_BAND_WIDTH + 31)/32)*4) -+/*#define GDI_BAND_WIDTH 4928*/ -+/*#define GDI_BAND_WIDTH_BYTES (((GDI_BAND_WIDTH + 31)/32)*4)*/ - - #define GDI_PRE_COMP 2 - #define GDI_REAL_COMP 0 -@@ -74,8 +74,8 @@ - - #define GDI_MARGINS_A4 0.167, 0.167, 0.167, 0.167 - #define GDI_MARGINS_LETTER 0.167, 0.167, 0.167, 0.167 --//#define GDI_MARGINS_A4 0.0, 0.0, 0.0, 0.0 --//#define GDI_MARGINS_LETTER 0.0, 0.0, 0.0, 0.0 -+/*#define GDI_MARGINS_A4 0.0, 0.0, 0.0, 0.0*/ -+/*#define GDI_MARGINS_LETTER 0.0, 0.0, 0.0, 0.0*/ - - /* The number of blank lines that make it worthwhile to reposition */ - /* the cursor. */ -@@ -86,9 +86,15 @@ - - int GDI_BAND_WIDTH[] = {4768, 4928}; - -+#if GS_VERSION_MAJOR >= 8 -+private int gdi_print_page(gx_device_printer *pdev, FILE *prn_stream); -+private int gdi_open(gx_device *pdev); -+private int gdi_close(gx_device *pdev); -+#else - private int gdi_print_page(P2(gx_device_printer *pdev, FILE *prn_stream)); - private int gdi_open(P1(gx_device *pdev)); - private int gdi_close(P1(gx_device *pdev)); -+#endif - - /* The device descriptors */ - private dev_proc_open_device(gdi_open); -@@ -107,6 +113,14 @@ - 1, /* color bit */ - gdi_print_page); - -+gx_device_printer far_data gs_samsunggdi_device = -+ prn_device(prn_gdi_procs, "samsunggdi", -+ DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, /* paper size (unit : 10/72 inch size) */ -+ X_DPI2, Y_DPI2, -+ 0.20, 0.25, 0.25, 0.25, /* margins filled in by gdi_open */ -+ 1, /* color bit */ -+ gdi_print_page); -+ - private FILE *WritePJLHeaderData(gx_device_printer *pdev, FILE *fp); - private FILE *WriteBandHeader(FILE *fp, unsigned int usBandNo, - unsigned char ubCompMode, unsigned int usBandWidth, -@@ -193,9 +207,9 @@ - } - - ul_band_size = band_width_bytes * band_height; -- ibp = (byte *)gs_malloc(ul_band_size, 1, "gdi_print_page"); -- obp = (byte *)gs_malloc(ul_band_size*13/10, 1, "gdi_print_page"); -- tmp = (byte *)gs_malloc(raster, 1, "gdi_print_page"); -+ ibp = (byte *)gs_malloc(pdev->memory, ul_band_size, 1, "gdi_print_page"); -+ obp = (byte *)gs_malloc(pdev->memory, ul_band_size*13/10, 1, "gdi_print_page"); -+ tmp = (byte *)gs_malloc(pdev->memory, raster, 1, "gdi_print_page"); - - if (!ibp) return_error(gs_error_VMerror); - if (!obp) return_error(gs_error_VMerror); -@@ -220,7 +234,7 @@ - memset(obp, 0x00, ul_band_size*13/10); - for (j=0; j<band_height; j++) { - memset(tmp, 0x00, raster); -- //code = gdev_prn_copy_scan_lines(pdev, i*band_height+j, -+ /*code = gdev_prn_copy_scan_lines(pdev, i*band_height+j, */ - if (y == num_rows) break; - code = gdev_prn_copy_scan_lines(pdev, y++, - (byte*)tmp, raster); -@@ -232,15 +246,71 @@ - - /* Write Band Data - Because of Scanline compression, extract Scanline compression mode */ -- //ul_tiff_size = FrameTiffComp(obp, ibp, band_height, band_width_bytes, GDI_PRE_COMP); -- //ul_scan_size = (unsigned long)bmp2run(obp, ibp, band_height, band_width_bytes, GDI_PRE_COMP); -- //ul_min_size = (ul_scan_size > ul_tiff_size) ? ul_tiff_size : ul_scan_size; -+ /*ul_tiff_size = FrameTiffComp(obp, ibp, band_height, band_width_bytes, GDI_PRE_COMP);*/ -+ /*ul_scan_size = (unsigned long)bmp2run(obp, ibp, band_height, band_width_bytes, GDI_PRE_COMP);*/ -+ /*ul_min_size = (ul_scan_size > ul_tiff_size) ? ul_tiff_size : ul_scan_size;*/ - ul_min_size = ul_tiff_size; - compression_type = GDI_COMP_MODITIFF; -- //compression_type = (ul_scan_size > ul_tiff_size) ? GDI_COMP_MODITIFF : GDI_COMP_SCANLINE; -+ /*compression_type = (ul_scan_size > ul_tiff_size) ? GDI_COMP_MODITIFF : GDI_COMP_SCANLINE;*/ - switch (compression_type) { - case GDI_COMP_MODITIFF: -+#define FUDGE_BIG_BANDS -+#ifndef FUDGE_BIG_BANDS - ul_comp_size = FrameTiffComp(obp, ibp, band_height, band_width_bytes, GDI_REAL_COMP); -+#else -+ { -+ /* Very ugly. The printer will hose if the compressed -+ band size is over 65536, so we "fudge" the data in -+ this case repeatedly until we get what we want. -+ -+ The fudge algorithm is simple, this is kinda-sorta -+ RLE, so we just round groups of bits in groups of -+ 2, then 3, then 4, etc until the thing works. */ -+#define MAXBAND 0xffff -+#define ASSERT(x) -+ int fudge=0; -+ byte *use_band=ibp; -+ do { -+ ul_comp_size = FrameTiffComp(obp, use_band, -+ band_height, band_width_bytes, -+ GDI_REAL_COMP); -+ if (ul_comp_size > MAXBAND-8) { -+ int f, g, h; -+ if (!fudge) { -+ ASSERT(use_band == ibp); -+ use_band = (byte*)gs_malloc(pdev->memory, ul_band_size, 1, "gdi_print_page/fudge"); -+ fudge=1; -+ } -+ memcpy(use_band, ibp, ul_band_size); -+ fudge++; -+ ASSERT(fudge>=2); -+ { -+#define FUDGE2(x) ( (((((x)>>6)&0x3)?3:0)<<6) \ -+ | (((((x)>>4)&0x3)?3:0)<<4) \ -+ | (((((x)>>2)&0x3)?3:0)<<2) \ -+ | (((((x)>>0)&0x3)?3:0)) ) -+#define FUDGE4(x) ( (((((x)>>4)&0xf)?0xf:0)<<4) \ -+ | (((((x)>>0)&0xf)?0xf:0)) ) -+#define FUDGE8(x) ( (((((x)>>0)&0xff)?0xf:0)) ) -+#define FUDGE(fudge, x) ( (fudge == 2 ? FUDGE2(x) \ -+ : fudge == 3 ? FUDGE4(x) \ -+ : fudge == 4 ? FUDGE8(x) \ -+ : 0 ) ) -+ -+ for(f=0;f<ul_band_size; f++) { -+ use_band[f] = FUDGE(fudge, ibp[f]); -+ } -+ } -+ } -+ } while (ul_comp_size > MAXBAND-8); -+ oh_well: -+ if (fudge > 1) { -+ ASSERT(use_band != ibp); -+ gs_free(pdev->memory, use_band, ul_band_size, 1, "gdi_print_page/fudge"); -+ /*fprintf(stderr, "smartgdi: band %d fudge factor is %d\n", i, fudge);*/ -+ } -+ } -+#endif - break; - case GDI_COMP_SCANLINE: - ul_comp_size = bmp2run(obp, ibp, band_height, band_width_bytes, GDI_REAL_COMP); -@@ -253,15 +323,15 @@ - - prn_stream = WriteBandHeader(prn_stream, i, compression_type, (band_width_bytes * 8), - band_height, ul_comp_size); -- //fprintf(prn_stream, "[%d] band, size : %d\n", i, ul_tiff_size); -+ /*fprintf(prn_stream, "[%d] band, size : %d\n", i, ul_tiff_size);*/ - fwrite(obp, ul_comp_size, 1, prn_stream); - } - - /* Trailer Output */ - WriteTrailerData(prn_stream); -- gs_free(ibp, ul_band_size, 1, "gdi_line_buffer"); -- gs_free(obp, ul_band_size*13/10, 1, "gdi_line_buffer"); -- gs_free(tmp, raster, 1, "gdi_line_buffer"); -+ gs_free(pdev->memory, ibp, ul_band_size, 1, "gdi_line_buffer"); -+ gs_free(pdev->memory, obp, ul_band_size*13/10, 1, "gdi_line_buffer"); -+ gs_free(pdev->memory, tmp, raster, 1, "gdi_line_buffer"); - return code; - } - -@@ -271,50 +341,50 @@ - unsigned char buffer[300]; - int dots_per_inch = (int)pdev->y_pixels_per_inch; - -- strcpy(buffer, "\x1b%-12345X"); -+ strcpy(buffer, "\033%-12345X"); - -- // Paper Type -- strcat(buffer, "@PJL SET PAPERTYPE = NORMAL ON\x0d\x0a"); -- //Density -- strcat(buffer, "@PJL SET DENSITY = 1\x0d\x0a"); -- // Toner Save -- strcat(buffer, "@PJL SET TONERSAVE = OFF\x0d\x0a"); -- // Enter Language SMART -- strcat(buffer, "@PJL ENTER LANGUAGE = SMART\x0d\x0a"); -- // JobStart -- strcat(buffer, "$PJL JOB START\x0d\x0a"); -+ /* Paper Type*/ -+ strcat(buffer, "@PJL SET PAPERTYPE = NORMAL ON\015\012"); -+ /*Density*/ -+ strcat(buffer, "@PJL SET DENSITY = 1\015\012"); -+ /* Toner Save*/ -+ strcat(buffer, "@PJL SET TONERSAVE = OFF\015\012"); -+ /* Enter Language SMART*/ -+ strcat(buffer, "@PJL ENTER LANGUAGE = SMART\015\012"); -+ /* JobStart*/ -+ strcat(buffer, "$PJL JOB START\015\012"); - -- // Resolution -+ /* Resolution*/ - if (dots_per_inch == 600) -- strcat(buffer, "$PJL RESOLUTION = 600\x0d\x0a"); -+ strcat(buffer, "$PJL RESOLUTION = 600\015\012"); - else -- strcat(buffer, "$PJL RESOLUTION = 300\x0d\x0a"); -+ strcat(buffer, "$PJL RESOLUTION = 300\015\012"); - -- // Copies -- strcat(buffer, "$PJL COPIES = 1\x0d\x0a"); -- // Paper Size -+ /* Copies*/ -+ strcat(buffer, "$PJL COPIES = 1\015\012"); -+ /* Paper Size*/ - switch (gdev_pcl_paper_size((gx_device*)pdev)) - { - case PAPER_SIZE_A4: -- strcat(buffer, "$PJL PAGE A4 AUTO\x0d\x0a"); -+ strcat(buffer, "$PJL PAGE A4 AUTO\015\012"); - break; - case PAPER_SIZE_LETTER: -- strcat(buffer, "$PJL PAGE LETTER AUTO\x0d\x0a"); -+ strcat(buffer, "$PJL PAGE LETTER AUTO\015\012"); - break; - case PAPER_SIZE_LEGAL: -- strcat(buffer, "$PJL PAGE LEGAL AUTO\x0d\x0a"); -+ strcat(buffer, "$PJL PAGE LEGAL AUTO\015\012"); - break; - default: -- strcat(buffer, "$PJL PAGE LETTER AUTO\x0d\x0a"); -+ strcat(buffer, "$PJL PAGE LETTER AUTO\015\012"); - break; - } -- // bitmap start -- strcat(buffer, "$PJL BITMAP START\x0d\x0a"); -- // write buffer to file. -+ /* bitmap start*/ -+ strcat(buffer, "$PJL BITMAP START\015\012"); -+ /* write buffer to file.*/ - ulSize = strlen(buffer); - fwrite(buffer, 1, ulSize, fp ); - return(fp); --} // WritePJLHeaderData() -+} /* WritePJLHeaderData() */ - - - FILE *WriteBandHeader -@@ -335,33 +405,33 @@ - - ulBandSize += 8; - -- // bandsize -+ /* bandsize*/ - buf[i++] = (unsigned char)((ulBandSize >> 24) & 0xff); - buf[i++] = (unsigned char)((ulBandSize >> 16) & 0xff); - buf[i++] = (unsigned char)((ulBandSize >> 8) & 0xff); - buf[i++] = (unsigned char)(ulBandSize & 0xff); - -- // id -+ /* id */ - buf[i++] = (unsigned char)((usBandNo >> 8) & 0xff); - buf[i++] = (unsigned char)(usBandNo & 0xff); - -- // compress mode -+ /* compress mode */ - buf[i++] = (unsigned char)(ubCompMode & 0xff); - -- // ubLeft -+ /* ubLeft */ - buf[i++] = (unsigned char)(ubLeft & 0xff); - -- // height -+ /* height*/ - buf[i++] = (unsigned char)((usBandHeight >> 8) & 0xff); - buf[i++] = (unsigned char)(usBandHeight & 0xff); - -- // width -+ /* width */ - buf[i++] = (unsigned char)((usBandWidth >> 8) & 0xff); - buf[i++] = (unsigned char)(usBandWidth & 0xff); - - fwrite(buf, 1, i, fp); - return(fp); --} // end of WriteBandHeader() -+} /* end of WriteBandHeader()*/ - - FILE *WriteTrailerData(FILE *fp) - { -@@ -369,18 +439,18 @@ - unsigned long buffer[200]; - - memset((char*)buffer, 0x00, 200); -- strcpy((char*)buffer, "$PJL PRINT 4\x0d\x0a"); -- strcat((char*)buffer, "$PJL EOJ\x0d\x0a"); -- strcat((char*)buffer, "$PJL SYNC\x0d\x0a"); -- strcat((char*)buffer, "$PJL RELEASE 0 2047\x0d\x0a"); -- strcat((char*)buffer, "$PJL GARBAGE\x0d\x0a"); -- strcat((char*)buffer, "\x1b%-12345X\x0d\x0a"); -+ strcpy((char*)buffer, "$PJL PRINT 4\015\012"); -+ strcat((char*)buffer, "$PJL EOJ\015\012"); -+ strcat((char*)buffer, "$PJL SYNC\015\012"); -+ strcat((char*)buffer, "$PJL RELEASE 0 2047\015\012"); -+ strcat((char*)buffer, "$PJL GARBAGE\015\012"); -+ strcat((char*)buffer, "\033%-12345X\015\012"); - - ulSize = strlen((char*)buffer); - fwrite(buffer, 1, ulSize, fp); - - return(fp); --} // WriteTrailerData() -+} /* WriteTrailerData()*/ - - unsigned long FrameTiffComp(unsigned char *pubDest, - unsigned char *pubSrc, -@@ -399,7 +469,7 @@ - - for (i = 0; i < usTotalLines; i++) - { -- if (!(ubMode & 0x02)) // -+ if (!(ubMode & 0x02)) - { - usLineSize = FrameTiff_Comp(SrcPtr, TgtPtr, usBytesPerLine); - } -@@ -416,7 +486,7 @@ - ulret += usLineSize; - } - -- if (!(ubMode & 0x02)) // -+ if (!(ubMode & 0x02)) - { - switch (ulret%4) - { -@@ -448,7 +518,7 @@ - } - } - return(ulret); --} // FrameTiffComp() -+} /* FrameTiffComp()*/ - - unsigned int FrameTiff_Comp(unsigned char *lpSrcBuf, unsigned char *lpTgtBuf, unsigned int nSrcBytes) - { -@@ -528,13 +598,13 @@ - usEndCnt = 16384; - } - usEndCnt = usCount - 2; -- // usEndCnt = usCount - 2; original -- // 19990824 by LSM : for end file while (usEndCnt--) -+ /* usEndCnt = usCount - 2; original*/ -+ /* 19990824 by LSM : for end file while (usEndCnt--)*/ - while (usEndCnt--) - { - /* read next data */ - ubFirst = ubSecond; -- ubSecond = *pubSrc++; // read 3rd Data -+ ubSecond = *pubSrc++; /* read 3rd Data*/ - if (ubFirst == ubSecond) - { - if (usEndCnt <= 1) -@@ -544,7 +614,7 @@ - } - else - { -- ubSecond = *pubSrc++; // read 4th Data -+ ubSecond = *pubSrc++; /* read 4th Data*/ - usEndCnt--; - if (ubFirst == ubSecond) - { -@@ -660,14 +730,14 @@ - { - usEndCnt = 16384; - } -- // usEndCnt = usCount - 2; -+ /* usEndCnt = usCount - 2;*/ - usEndCnt = usCount - 2; -- // 19990824 by LSM : for Last file while (usEndCnt--) -+ /* 19990824 by LSM : for Last file while (usEndCnt--)*/ - while (usEndCnt--) - { - /* read next data */ - ubFirst = ubSecond; -- ubSecond = *pubSrc++; // read 3rd Data -+ ubSecond = *pubSrc++; /* read 3rd Data*/ - if (ubFirst == ubSecond) - { - if (usEndCnt <= 1) -@@ -677,8 +747,8 @@ - } - else - { -- ubSecond = *pubSrc++; // read 4th Data -- usEndCnt--; // 19990824 by LSM -+ ubSecond = *pubSrc++; /* read 4th Data*/ -+ usEndCnt--; /* 19990824 by LSM*/ - if (ubFirst == ubSecond) - { - ubMisCnt = 3; -@@ -691,7 +761,7 @@ - /* save data */ - usControl = (unsigned int) (pubSrc - pubOrg); - usControl -= ubMisCnt; -- // 19990824 by LSM : for fixing GPF on Photoshop -+ /* 19990824 by LSM : for fixing GPF on Photoshop*/ - if (usControl > usCount) - { - usControl = usCount; -@@ -728,77 +798,77 @@ - } sc_tbl; - - static sc_tbl gdi_ScanTbl[256] = { --{ 8, 0, 0 }, { 7, 1, 1 }, { 6, 1, 0 }, { 6, 2, 1 }, // 0x00 -+{ 8, 0, 0 }, { 7, 1, 1 }, { 6, 1, 0 }, { 6, 2, 1 }, /* 0x00*/ - { 5, 1, 0 }, { 0, 0, 1 }, { 5, 2, 0 }, { 5, 3, 1 }, - { 4, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 4, 2, 0 }, { 0, 0, 1 }, { 4, 3, 0 }, { 4, 4, 1 }, --{ 3, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x10 -+{ 3, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x10*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 3, 2, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 3, 3, 0 }, { 0, 0, 1 }, { 3, 4, 0 }, { 3, 5, 1 }, --{ 2, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x20 -+{ 2, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x20*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 2, 2, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x30 -+{ 2, 2, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x30*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 2, 3, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 2, 4, 0 }, { 0, 0, 1 }, { 2, 5, 0 }, { 2, 6, 1 }, --{ 1, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x40 -+{ 1, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x40*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x50 -+{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x50*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 1, 2, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x60 -+{ 1, 2, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x60*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 1, 3, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x70 -+{ 1, 3, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x70*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 1, 4, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 1, 5, 0 }, { 0, 0, 1 }, { 1, 6, 0 }, { 1, 7, 1 }, --{ 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x80 -+{ 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x80*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x90 -+{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x90*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0xa0 -+{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0xa0*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0xb0 -+{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0xb0*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 2, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0xc0 -+{ 0, 2, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0xc0*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0xd0 -+{ 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0xd0*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 3, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0xe0 -+{ 0, 3, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0xe0*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, --{ 0, 4, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0xf0 -+{ 0, 4, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0xf0*/ - { 0, 0, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 5, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, - { 0, 6, 0 }, { 0, 0, 1 }, { 0, 7, 0 }, { 0, 8, 1 }, - }; - - static sc_tbl gdi_ScanTbl4[16] = { --{ 4, 0, 0 }, { 3, 1, 1 }, { 2, 1, 0 }, { 2, 2, 1 }, // 0x00 --{ 1, 1, 0 }, { 0, 0, 1 }, { 1, 2, 0 }, { 1, 3, 1 }, // 0x04 --{ 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, // 0x08 --{ 0, 2, 0 }, { 0, 0, 1 }, { 0, 3, 0 }, { 0, 4, 1 } // 0x0c -+{ 4, 0, 0 }, { 3, 1, 1 }, { 2, 1, 0 }, { 2, 2, 1 }, /* 0x00*/ -+{ 1, 1, 0 }, { 0, 0, 1 }, { 1, 2, 0 }, { 1, 3, 1 }, /* 0x04*/ -+{ 0, 1, 0 }, { 0, 0, 1 }, { 0, 0, 0 }, { 0, 0, 1 }, /* 0x08*/ -+{ 0, 2, 0 }, { 0, 0, 1 }, { 0, 3, 0 }, { 0, 4, 1 } /* 0x0c*/ - }; - - long SaveScanData( unsigned char *, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short ); -@@ -816,32 +886,32 @@ - lWarp = (long)(usWarp << 3); - lDis = ((long)usDy * lWarp) + (long)sDx; - -- // 1st, 2nd, 3rd & 4th byte -- ultmp_dat = 0xc0000000; -+ /* 1st, 2nd, 3rd & 4th byte*/ -+ ultmp_dat = 0xc0000000ul; - if (lDis < 0) - { -- ultmp_dat |= 0x20000000; -+ ultmp_dat |= 0x20000000ul; - } -- ultmp_dat |= (lDis & 0x1fffffff); -- *out_buf++ = (unsigned char)((ultmp_dat & 0xff000000) >> 24); -- *out_buf++ = (unsigned char)((ultmp_dat & 0xff0000) >> 16); -- *out_buf++ = (unsigned char)((ultmp_dat & 0xff00) >> 8); -- *out_buf++ = (unsigned char)(ultmp_dat & 0xff); -+ ultmp_dat |= (lDis & 0x1ffffffful); -+ *out_buf++ = (unsigned char)((ultmp_dat & 0xff000000ul) >> 24); -+ *out_buf++ = (unsigned char)((ultmp_dat & 0xff0000ul) >> 16); -+ *out_buf++ = (unsigned char)((ultmp_dat & 0xff00ul) >> 8); -+ *out_buf++ = (unsigned char)(ultmp_dat & 0xfful); - -- // 5th & 6th byte -+ /* 5th & 6th byte*/ - ustmp_dat = 0xc000; - ustmp_dat |= (usRl & 0x3fff); - *out_buf++ = (unsigned char)((ustmp_dat & 0xff00) >> 8); - *out_buf++ = (unsigned char)(ustmp_dat & 0xff); - - return(6); --} // Save6Bytes() -+} /* Save6Bytes()*/ - - long Save4Bytes(unsigned char *out_buf, unsigned short usDy, unsigned short usRl, short sDx) - { - unsigned short ustmp_dat; - -- // 1st & 2nd byte -+ /* 1st & 2nd byte*/ - ustmp_dat = 0x8000; - if (sDx < 0) - { -@@ -851,7 +921,7 @@ - *out_buf++ = (unsigned char)((ustmp_dat & 0xff00) >> 8); - *out_buf++ = (unsigned char)(ustmp_dat & 0xff); - -- // 3rd & 4th byte -+ /* 3rd & 4th byte*/ - ustmp_dat = 0x8000; - ustmp_dat |= ((usDy & 0x03) << 12); - ustmp_dat |= (usRl & 0xfff); -@@ -859,13 +929,13 @@ - *out_buf++ = (unsigned char)(ustmp_dat & 0xff); - - return(4); --} // end of Save4Bytes() -+} /* end of Save4Bytes()*/ - - long Save2Bytes(unsigned char *out_buf, unsigned short usDy, unsigned short usRl, short sDx) - { - unsigned char ubtmp_dat; - -- // 1st byte -+ /* 1st byte*/ - ubtmp_dat = 0x00; - if (usDy == 1) - { -@@ -874,7 +944,7 @@ - ubtmp_dat |= (usRl & 0x3f); - *out_buf++ = ubtmp_dat; - -- // 2nd byte -+ /* 2nd byte*/ - if (sDx < 0) - { - ubtmp_dat = 0x80; -@@ -886,7 +956,7 @@ - ubtmp_dat |= ((unsigned char)sDx & 0x7f); - *out_buf++ = ubtmp_dat; - return(2); --} // end of Save2Bytes() -+} /* end of Save2Bytes()*/ - - long SaveScanData (unsigned char *out_buf, - unsigned short us1Cnt, -@@ -900,26 +970,26 @@ - - sDisX = (int)usPosX01 - (int)usPosX10; - -- // 48 bit -+ /* 48 bit*/ - if ( (usDy > 3) || (us1Cnt > 4095) ) - { - Save6Bytes(out_buf, usDy, us1Cnt, sDisX, usWarp); - lRet = 6; - } -- // 32 bit -+ /* 32 bit*/ - else if ( (usDy > 1) || (us1Cnt > 63) || (sDisX > 127) || (sDisX < -128) ) - { - Save4Bytes(out_buf, usDy, us1Cnt, sDisX); - lRet = 4; - } -- // 16 bit -+ /* 16 bit*/ - else - { - Save2Bytes(out_buf, usDy, us1Cnt, sDisX); - lRet = 2; - } - return(lRet); --} // end of SaveScanData() -+} /* end of SaveScanData()*/ - - - long UpdateScanSize (unsigned char *out_buf, -@@ -934,23 +1004,23 @@ - - sDisX = usPosX01 - usPosX10; - -- // 48 bit -+ /* 48 bit*/ - if ( (usDy > 3) || (us1Cnt > 4095) ) - { - lRet = 6; - } -- // 32 bit -+ /* 32 bit*/ - else if ( (usDy > 1) || (us1Cnt > 63) || (sDisX > 127) || (sDisX < -128) ) - { - lRet = 4; - } -- // 16 bit -+ /* 16 bit*/ - else - { - lRet = 2; - } - return(lRet); --} // end of UpdateScanSize() by bglee 19981224 -+} /* end of UpdateScanSize() by bglee 19981224*/ - - long GetSimpleScan(unsigned char *out_buf, - unsigned char ubSizeMode, -@@ -983,10 +1053,10 @@ - } - - -- // 1 X 1 X -+ /* 1 X 1 X*/ - if (ubPreBit) - { -- // 1 0 1 X -+ /* 1 0 1 X*/ - if (ubDx) - { - lScanSize += (*UpdateScanLine[ubSizeMode])(out_buf, *us1Count, *usDy, *usPosX10, *usPosX01, usWidth); -@@ -994,23 +1064,23 @@ - *usPosX01 = usBytePos + ubDx; - *us1Count = ubRl; - *usDy = 0; -- // 1 0 1 0 -+ /* 1 0 1 0*/ - if (!ubLastBit) - { -- // 19990330 by bglee -+ /* 19990330 by bglee*/ - out_buf = out_buf + lScanSize; - - lScanSize += (*UpdateScanLine[ubSizeMode])(out_buf, *us1Count, *usDy, *usPosX10, *usPosX01, usWidth); - *usPosX10 = *usPosX01 ; - *us1Count = 0; - } -- // 1 0 1 1 -+ /* 1 0 1 1*/ - } -- // 1 1 1 X -+ /* 1 1 1 X*/ - else - { - *us1Count += ubRl; -- // 1 1 1 0 -+ /* 1 1 1 0*/ - if (!ubLastBit) - { - lScanSize += (*UpdateScanLine[ubSizeMode])(out_buf, *us1Count, *usDy, *usPosX10, *usPosX01, usWidth); -@@ -1018,16 +1088,16 @@ - *us1Count = 0; - *usDy = 0; - } -- // 1 1 1 1 -+ /* 1 1 1 1*/ - } - } -- // 0 X 1 X -+ /* 0 X 1 X*/ - else - { -- // 0 X 1 X -+ /* 0 X 1 X*/ - *usPosX01 = usBytePos + ubDx; - *us1Count += ubRl; -- // 0 X 1 0 -+ /* 0 X 1 0*/ - if (!ubLastBit) - { - lScanSize += (*UpdateScanLine[ubSizeMode])(out_buf, *us1Count, *usDy, *usPosX10, *usPosX01, usWidth); -@@ -1035,11 +1105,11 @@ - *us1Count = 0; - *usDy = 0; - } -- // 0 X 1 1 -+ /* 0 X 1 1*/ - } - - return(lScanSize); --} // end of GetSimpleScan() -+} /* end of GetSimpleScan() */ - - - long scan_map (unsigned char *in_buf, -@@ -1049,7 +1119,7 @@ - unsigned char ubMode) - { - unsigned int i, j, k; -- unsigned char ubPreBit, ubCrtByte;//, ubLastBit; -+ unsigned char ubPreBit, ubCrtByte;/*, ubLastBit;*/ - long lScanSize, lTmp; - long lCrtSize; - unsigned short us1Count; -@@ -1078,7 +1148,7 @@ - switch (ubCrtByte) - { - case 0x00: -- // 1 0 -+ /* 1 0 */ - if (ubPreBit) - { - lTmp = (*UpdateScanLine[ubSizeMode])(out_buf, us1Count, usDy, usPosX10, usPosX01, usWidth); -@@ -1088,16 +1158,16 @@ - us1Count = 0; - usDy = 0; - } -- // 0 0 -+ /* 0 0*/ - break; - - case 0xff: -- // 1 1 -+ /* 1 1*/ - if (ubPreBit) - { - us1Count += 8; - } -- // 0 1 -+ /* 0 1*/ - else - { - us1Count = 8; -@@ -1106,7 +1176,7 @@ - break; - - default: -- // X X 1 X -+ /* X X 1 X*/ - if (gdi_ScanTbl[ubCrtByte].ubRl) - { - usBytePos = (j << 3); -@@ -1114,7 +1184,7 @@ - out_buf = out_buf + lTmp; - lScanSize += lTmp; - } -- // complex pattern -+ /* complex pattern*/ - else - { - for (k = 0; k < 2; k++) -@@ -1124,7 +1194,7 @@ - switch (ubTemp) - { - case 0x00: -- // 1 0 -+ /* 1 0*/ - if (ubPreBit) - { - lTmp = (*UpdateScanLine[ubSizeMode])(out_buf, us1Count, usDy, usPosX10, usPosX01, usWidth); -@@ -1134,16 +1204,16 @@ - us1Count = 0; - usDy = 0; - } -- // 0 0 -+ /* 0 0*/ - break; - - case 0x0f: -- // 1 1 -+ /* 1 1*/ - if (ubPreBit) - { - us1Count += 4; - } -- // 0 1 -+ /* 0 1*/ - else - { - us1Count = 4; -@@ -1152,7 +1222,7 @@ - break; - - case 0x05: -- // 1 0101 -+ /* 1 0101*/ - if (ubPreBit) - { - lTmp = (*UpdateScanLine[ubSizeMode])(out_buf, us1Count, usDy, usPosX10, usPosX01, usWidth); -@@ -1162,13 +1232,13 @@ - usPosX10 = usBytePos - us1Count; - usDy = 0; - } -- // 0 0101 -+ /* 0 0101*/ - usPosX01 = usBytePos + 1; - lTmp = (*UpdateScanLine[ubSizeMode])(out_buf, 1, usDy, usPosX10, usPosX01, usWidth); - out_buf = out_buf + lTmp; - lScanSize += lTmp; - -- // next -+ /* next*/ - usPosX10 = 0; - usPosX01 = 2; - usDy = 0; -@@ -1176,12 +1246,12 @@ - break; - - case 0x09: -- // 1 1001 -+ /* 1 1001*/ - if (ubPreBit) - { - us1Count++; - } -- // 0 1001 -+ /* 0 1001*/ - else - { - usPosX01 = usBytePos; -@@ -1191,7 +1261,7 @@ - out_buf = out_buf + lTmp; - lScanSize += lTmp; - -- // next -+ /* next*/ - if (ubPreBit) - { - usPosX10 = usBytePos - us1Count + 1; -@@ -1207,12 +1277,12 @@ - break; - - case 0x0a: -- // 1 1010 -+ /* 1 1010*/ - if (ubPreBit) - { - us1Count++; - } -- // 0 1010 -+ /* 0 1010*/ - else - { - us1Count = 1; -@@ -1222,25 +1292,25 @@ - out_buf = out_buf + lTmp; - lScanSize += lTmp; - -- // next -+ /* next*/ - usPosX10 = usBytePos - us1Count + 1; - usPosX01 = usBytePos + 2; - lTmp = (*UpdateScanLine[ubSizeMode])(out_buf, 1, 0, usPosX10, usPosX01, usWidth); - out_buf = out_buf + lTmp; - lScanSize += lTmp; -- // next -+ /* next*/ - usPosX10 = usBytePos + 2; - usDy = 0; - us1Count = 0; - break; - - case 0x0b: -- // 1 1011 -+ /* 1 1011*/ - if (ubPreBit) - { - us1Count++; - } -- // 0 1011 -+ /* 0 1011*/ - else - { - us1Count = 1; -@@ -1250,7 +1320,7 @@ - out_buf = out_buf + lTmp; - lScanSize += lTmp; - -- // next -+ /* next*/ - if (ubPreBit) - { - usPosX10 = usBytePos - us1Count + 1; -@@ -1267,12 +1337,12 @@ - break; - - case 0x0d: -- // 1 1101 -+ /* 1 1101*/ - if (ubPreBit) - { - us1Count += 2; - } -- // 0 1101 -+ /* 0 1101*/ - else - { - us1Count = 2; -@@ -1282,7 +1352,7 @@ - out_buf = out_buf + lTmp; - lScanSize += lTmp; - -- // next -+ /* next*/ - if (ubPreBit) - { - usPosX10 = usBytePos - us1Count + 2; -@@ -1298,17 +1368,17 @@ - break; - - default: -- // X X 1 X -+ /* X X 1 X*/ - lTmp = GetSimpleScan(out_buf, ubSizeMode, &us1Count, &usDy, &usPosX10, &usPosX01, usBytePos, ubTemp, 4, ubPreBit, usWidth); - out_buf = out_buf + lTmp; - lScanSize += lTmp; - break; -- } // end of switch() -+ } /* end of switch()*/ - ubPreBit = ubTemp & 0x01; -- } // end of k-loop -+ } /* end of k-loop*/ - } - break; -- } // end of switch() -+ } /* end of switch()*/ - - ubPreBit = ubCrtByte & 0x01; - } /*for usWidth */ -@@ -1326,7 +1396,7 @@ - } - usDy++; - -- // check size over -+ /* check size over*/ - if ( (i % 5) == 4 ) - { - lCrtSize = (long)((long)usWidth * (long)(i + 1)); -@@ -1342,7 +1412,7 @@ - lScanSize = -1; - } - return(lScanSize); --} // end of scan_map() -+} /* end of scan_map() */ - - /***************************************************************** - * H : bmp2run -@@ -1362,7 +1432,7 @@ - unsigned char *tmp_buf1, *tmp_buf2; - long scan_size; - -- //return(-1); // 19990323 by bglee - request from SM Lee -+ /*return(-1);*/ /* 19990323 by bglee - request from SM Lee*/ - - tmp_buf1 = in_buf; - tmp_buf2 = out_buf; -@@ -1372,7 +1442,7 @@ - return(-1); - } - -- if ( !(ubMode & 0x02) ) // real compression //--- -+ if ( !(ubMode & 0x02) ) /* real compression */ - { - out_buf = tmp_buf2 + scan_size; - *out_buf++ = 0x00; -@@ -1385,7 +1455,7 @@ - scan_size += 2; - } - } -- else // pre-compression -+ else /* pre-compression*/ - { - scan_size += 2; - if (scan_size % 4) diff --git a/print/ghostscript8/files/patch-src:gdevhl12.c b/print/ghostscript8/files/patch-src:gdevhl12.c deleted file mode 100644 index 45c0472a983d..000000000000 --- a/print/ghostscript8/files/patch-src:gdevhl12.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/gdevhl12.c.orig Wed Mar 28 14:10:35 2007 -+++ src/gdevhl12.c Wed Mar 28 14:13:21 2007 -@@ -472,7 +472,7 @@ - for (y = ytop; y < ybottom; y++) { - if (hl1250_compress_line(s, y)) - continue; --#if 1 -+#if 0 - /* XXX - please report if you ever see this, then change to #if 0 */ - fprintf(stderr, - "hl1250: compression failed (y=%u), doing 1200x300 dpi\n", diff --git a/print/ghostscript8/files/patch-src:gdevl256.c b/print/ghostscript8/files/patch-src:gdevl256.c deleted file mode 100644 index 3102abf74716..000000000000 --- a/print/ghostscript8/files/patch-src:gdevl256.c +++ /dev/null @@ -1,17 +0,0 @@ ---- src/gdevl256.c.orig Fri Feb 22 07:24:51 2002 -+++ src/gdevl256.c Tue May 20 03:08:15 2003 -@@ -147,10 +147,12 @@ - /* for compatibility with the older display modes: */ - /* these are indexed as 0.0.R0.G0.B0.R1.G1.B1. */ - gx_color_index --lvga256_map_rgb_color(gx_device * dev, gx_color_value r, gx_color_value g, -- gx_color_value b) -+lvga256_map_rgb_color(gx_device * dev, const gx_color_value cv[]) - { - #define cv_bits(v,n) (v >> (gx_color_value_bits - n)) -+ gx_color_value r = cv[0]; -+ gx_color_value g = cv[1]; -+ gx_color_value b = cv[2]; - ushort r5 = cv_bits(r, 5), g5 = cv_bits(g, 5), b5 = cv_bits(b, 5); - static const byte cube_bits[32] = - {0, 128, 128, 128, 128, 128, 128, 128, 128, 128, diff --git a/print/ghostscript8/files/patch-src:gdevlbp8.c b/print/ghostscript8/files/patch-src:gdevlbp8.c deleted file mode 100644 index 052492c58f6a..000000000000 --- a/print/ghostscript8/files/patch-src:gdevlbp8.c +++ /dev/null @@ -1,70 +0,0 @@ ---- src/gdevlbp8.c.orig Wed Aug 1 09:48:23 2001 -+++ src/gdevlbp8.c Thu Mar 14 20:56:05 2002 -@@ -22,6 +22,8 @@ - - /* - Modifications: -+ 3.10.00 Johnny Lam -+ Removed LIPS III code, as it's obsoleted by gdevlips driver. - 2.2.97 Lauri Paatero - Changed CSI command into ESC [. DCS commands may still need to be changed - (to ESC P). -@@ -49,7 +51,6 @@ - - /* The device descriptors */ - private dev_proc_print_page(lbp8_print_page); --private dev_proc_print_page(lips3_print_page); - - const gx_device_printer far_data gs_lbp8_device = - prn_device(prn_std_procs, "lbp8", -@@ -58,14 +59,6 @@ - 0.16, 0.2, 0.32, 0.21, /* margins: left, bottom, right, top */ - 1, lbp8_print_page); - --const gx_device_printer far_data gs_lips3_device = -- prn_device(prn_std_procs, "lips3", -- 82, /* width_10ths, 8.3" */ -- 117, /* height_10ths, 11.7" */ -- X_DPI, Y_DPI, -- 0.16, 0.27, 0.23, 0.27, /* margins */ -- 1, lips3_print_page); -- - /* ------ Internal routines ------ */ - - #define ESC 0x1b -@@ -84,23 +77,6 @@ - - static const char *lbp8_end = NULL; - --static const char lips3_init[] = { -- ESC, '<', /* soft reset */ -- DCS, '0', 'J', ST, /* JOB END */ -- DCS, '3', '1', ';', '3', '0', '0', ';', '2', 'J', ST, /* 300dpi, LIPS3 JOB START */ -- ESC, '<', /* soft reset */ -- DCS, '2', 'y', 'P', 'r', 'i', 'n', 't', 'i', 'n', 'g', '(', 'g', 's', ')', ST, /* Printing (gs) display */ -- ESC, '[', '?', '1', 'l', /* auto cr-lf disable */ -- ESC, '[', '?', '2', 'h', /* auto ff disable */ -- ESC, '[', '1', '1', 'h', /* set mode */ -- ESC, '[', '7', ' ', 'I', /* select unit size (300dpi)*/ -- ESC, '[', 'f' /* move to home position */ --}; -- --static const char lips3_end[] = { -- DCS, '0', 'J', ST /* JOB END */ --}; -- - /* Send the page to the printer. */ - private int - can_print_page(gx_device_printer *pdev, FILE *prn_stream, -@@ -203,11 +179,4 @@ - lbp8_print_page(gx_device_printer *pdev, FILE *prn_stream) - { return can_print_page(pdev, prn_stream, lbp8_init, sizeof(lbp8_init), - lbp8_end, sizeof(lbp8_end)); --} -- --/* Print a LIPS III page. */ --private int --lips3_print_page(gx_device_printer *pdev, FILE *prn_stream) --{ return can_print_page(pdev, prn_stream, lips3_init, sizeof(lips3_init), -- lips3_end, sizeof(lips3_end)); - } diff --git a/print/ghostscript8/files/patch-src:gdevlx50.c b/print/ghostscript8/files/patch-src:gdevlx50.c deleted file mode 100644 index b762afcec85d..000000000000 --- a/print/ghostscript8/files/patch-src:gdevlx50.c +++ /dev/null @@ -1,62 +0,0 @@ ---- src/gdevlx50.c.orig Fri Dec 17 19:31:43 2004 -+++ src/gdevlx50.c Fri Dec 17 22:31:26 2004 -@@ -1120,18 +1120,18 @@ - - /* Allocate a buffer for a single scan line */ - lineBuffer = (byte *)gs_alloc_byte_array -- ( &gs_memory_default, lx5000dev->scanLineBytes, 1, -+ ( lx5000dev->memory, lx5000dev->scanLineBytes, 1, - "lx5000_print_page(lineBuffer)" ); - - swipeBuf = (byte *)gs_alloc_byte_array -- ( &gs_memory_default, lx5000dev->swipeBufSize, 1, -+ ( lx5000dev->memory, lx5000dev->swipeBufSize, 1, - "lx5000_print_page(swipeBuf)" ); - - for ( colour = 0 ; colour < numColours; colour++ ) - { - if ( ( colourBufs[colour] = - (byte *)gs_alloc_byte_array -- ( &gs_memory_default, lx5000dev->penBufSize, 1, -+ ( lx5000dev->memory, lx5000dev->penBufSize, 1, - "lx5000_print_page(colourBufs)" - ) - ) == NULL ) -@@ -1172,19 +1172,19 @@ - for ( colour = 0; colour < numColours; colour++ ) - { - if ( colourBufs[colour] != NULL ) -- gs_free_object( &gs_memory_default, -+ gs_free_object( lx5000dev->memory, - (char *)colourBufs[colour], - "lx5000_print_page(colourBufs)" ); - colourBufs[ colour ] = NULL; - colourBufPtrs[ colour ] = NULL; - } - if ( swipeBuf != NULL ) -- gs_free_object( &gs_memory_default, -+ gs_free_object( lx5000dev->memory, - (char *)swipeBuf, "lx5000_print_page(swipeBuf)" ); - swipeBuf = NULL; - *swipeBufPtr = NULL; - if ( lineBuffer != NULL ) -- gs_free_object( &gs_memory_default, -+ gs_free_object( lx5000dev->memory, - (char *)lineBuffer, "lx5000_print_page(lineBuffer)" ); - lineBuffer = NULL; - *lineBufferPtr = NULL; -@@ -2603,9 +2603,12 @@ - - /* Map CMYK to color. */ - private gx_color_index --lx5000_map_cmyk_color(gx_device * dev, gx_color_value cyan, -- gx_color_value magenta, gx_color_value yellow, gx_color_value black) -+lx5000_map_cmyk_color(gx_device * dev, const gx_color_value cv[]) - { -+ gx_color_value cyan = cv[0]; -+ gx_color_value magenta = cv[1]; -+ gx_color_value yellow = cv[2]; -+ gx_color_value black = cv[3]; - int bpc = dev->color_info.depth / 4; - int drop = sizeof(gx_color_value) * 8 - bpc; - gx_color_index color = diff --git a/print/ghostscript8/files/patch-src:gdevvglb.c b/print/ghostscript8/files/patch-src:gdevvglb.c deleted file mode 100644 index b21032ce8779..000000000000 --- a/print/ghostscript8/files/patch-src:gdevvglb.c +++ /dev/null @@ -1,18 +0,0 @@ ---- src/gdevvglb.c.orig Fri Feb 22 07:24:52 2002 -+++ src/gdevvglb.c Tue May 20 23:57:29 2003 -@@ -152,10 +152,12 @@ - } - - private gx_color_index --vgalib_map_rgb_color(gx_device * dev, gx_color_value red, -- gx_color_value green, gx_color_value blue) -+vgalib_map_rgb_color(gx_device * dev, const gx_color_value cv[]) - { -- return pc_4bit_map_rgb_color(dev, red, green, blue); -+ gx_color_value red = cv[0]; -+ gx_color_value green = cv[1]; -+ gx_color_value blue = cv[2]; -+ return pc_4bit_map_rgb_color(dev, cv); - } - - private int diff --git a/print/ghostscript8/files/patch-src:smartgdi-contrib.mak b/print/ghostscript8/files/patch-src:smartgdi-contrib.mak deleted file mode 100644 index 3b832daff662..000000000000 --- a/print/ghostscript8/files/patch-src:smartgdi-contrib.mak +++ /dev/null @@ -1,16 +0,0 @@ ---- src/smartgdi-contrib.mak.orig Wed Jun 19 21:43:43 2002 -+++ src/smartgdi-contrib.mak Mon Jul 21 13:59:00 2003 -@@ -3,10 +3,12 @@ - ### Note : this driver is used by Samsung SmartGDI compatible printers. ### - ### - -+gdi_opts=-DGS_VERSION_MAJOR=$(GS_VERSION_MAJOR) -+ - GDIMONO=$(GLOBJ)gdevgdi.$(OBJ) $(HPPCL) - - $(DD)gdi.dev: $(GDIMONO) $(DD)page.dev - $(SETPDEV) $(DD)gdi $(GDIMONO) - - $(GLOBJ)gdevgdi.$(OBJ): $(GLSRC)gdevgdi.c $(PDEVH) $(gdevpcl_h) -- $(GLCC) $(GLO_)gdevgdi.$(OBJ) $(C_) $(GLSRC)gdevgdi.c -+ $(GLCC) $(GLO_)gdevgdi.$(OBJ) $(C_) $(gdi_opts) $(GLSRC)gdevgdi.c diff --git a/print/ghostscript8/files/patch-src:unix-gcc.mak b/print/ghostscript8/files/patch-src:unix-gcc.mak index ddc62984a8a9..fe6c53b5c5cc 100644 --- a/print/ghostscript8/files/patch-src:unix-gcc.mak +++ b/print/ghostscript8/files/patch-src:unix-gcc.mak @@ -1,6 +1,6 @@ ---- src/unix-gcc.mak.orig Fri Jul 7 06:32:50 2006 -+++ src/unix-gcc.mak Fri Mar 23 14:44:08 2007 -@@ -21,15 +21,16 @@ +--- src/unix-gcc.mak.orig Sat May 12 02:02:29 2007 ++++ src/unix-gcc.mak Fri May 25 04:03:33 2007 +@@ -21,15 +21,17 @@ # source, generated intermediate file, and object directories # for the graphics library (GL) and the PostScript/PDF interpreter (PS). @@ -23,10 +23,11 @@ +PSRESDIR=${.CURDIR}/Resource +PSGENDIR=${.CURDIR}/obj +PSOBJDIR=${.CURDIR}/obj ++CONTRIBDIR=${.CURDIR}/contrib # Do not edit the next group of lines. -@@ -48,11 +49,10 @@ +@@ -48,11 +50,10 @@ # the directories also define the default search path for the # initialization files (gs_*.ps) and the fonts. @@ -41,7 +42,7 @@ exec_prefix = $(prefix) bindir = $(exec_prefix)/bin scriptdir = $(bindir) -@@ -143,7 +143,7 @@ +@@ -143,7 +144,7 @@ # some older JPEG streams that violate the standard. If the JPEG # library built from local sources, the patch will be applied. @@ -50,7 +51,7 @@ JPEG_NAME=jpeg # Define the directory where the PNG library sources are stored, -@@ -158,7 +158,7 @@ +@@ -158,7 +159,7 @@ # what its name is. # See gs.mak and Make.htm for more information. @@ -59,7 +60,7 @@ LIBPNG_NAME=png # Define the directory where the zlib sources are stored. -@@ -170,7 +170,7 @@ +@@ -170,7 +171,7 @@ # what its name is (usually libz, but sometimes libgz). # See gs.mak and Make.htm for more information. @@ -68,7 +69,7 @@ #ZLIB_NAME=gz ZLIB_NAME=z -@@ -179,6 +179,14 @@ +@@ -179,6 +180,14 @@ JBIG2_LIB=jbig2dec JBIG2SRCDIR=jbig2dec @@ -83,7 +84,7 @@ # Define the directory where the icclib source are stored. # See icclib.mak for more information -@@ -202,7 +210,7 @@ +@@ -202,7 +211,7 @@ # Define the name of the C compiler. @@ -92,7 +93,7 @@ # Define the name of the linker for the final link step. # Normally this is the same as the C compiler. -@@ -219,9 +227,9 @@ +@@ -219,9 +228,9 @@ # Define the added flags for standard, debugging, profiling # and shared object builds. @@ -105,25 +106,25 @@ CFLAGS_SO=-fPIC # Define the other compilation flags. Add at most one of the following: -@@ -235,7 +243,7 @@ +@@ -235,7 +244,7 @@ # We don't include -ansi, because this gets in the way of the platform- # specific stuff that <math.h> typically needs; nevertheless, we expect # gcc to accept ANSI-style function prototypes and function definitions. -XCFLAGS= -+XCFLAGS+=-I${.CURDIR}/jasper/src/libjasper/include -I${LOCALBASE}/include/libpng -I${LOCALBASE}/include ++XCFLAGS+=-I${JPXSRCDIR}/src/libjasper/include -I${LOCALBASE}/include/libpng -I${LOCALBASE}/include CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS) -@@ -246,7 +254,7 @@ +@@ -246,7 +255,7 @@ # -R /usr/local/xxx/lib:/usr/local/lib # giving the full path names of the shared library directories. # XLDFLAGS can be set from the command line. -XLDFLAGS= -+XLDFLAGS=-L${LOCALBASE}/lib ++XLDFLAGS+=-L${LOCALBASE}/lib LDFLAGS=$(XLDFLAGS) -@@ -279,7 +287,7 @@ +@@ -279,7 +288,7 @@ # Note that x_.h expects to find the header files in $(XINCLUDE)/X11, # not in $(XINCLUDE). @@ -132,7 +133,7 @@ # Define the directory/ies and library names for the X11 library files. # XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH -@@ -291,12 +299,12 @@ +@@ -291,12 +300,12 @@ # Solaris and other SVR4 systems with dynamic linking probably want #XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib # X11R6 (on any platform) may need @@ -148,7 +149,27 @@ # Define whether this platform has floating point hardware: # FPU_TYPE=2 means floating point is faster than fixed point. -@@ -447,6 +455,9 @@ +@@ -314,16 +323,16 @@ + + # If POSIX sync primitives are used, also change the STDLIBS to include + # the pthread library. +-#SYNC=posync ++SYNC=posync + + # Default is No sync primitives since some platforms don't have it (HP-UX) +-SYNC=nosync ++#SYNC=nosync + + # ------ Devices and features ------ # + + # Choose the language feature(s) to include. See gs.mak for details. + +-FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev ++FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev $(PSD)jbig2.dev $(PSD)jpx.dev + #FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev + # The following is strictly for testing. + FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev +@@ -447,6 +456,9 @@ include $(GLSRCDIR)/zlib.mak include $(GLSRCDIR)/libpng.mak include $(GLSRCDIR)/jbig2.mak @@ -158,3 +179,11 @@ include $(GLSRCDIR)/icclib.mak include $(GLSRCDIR)/ijs.mak include $(GLSRCDIR)/devs.mak +@@ -456,6 +468,7 @@ + include $(GLSRCDIR)/unix-dll.mak + include $(GLSRCDIR)/unix-end.mak + include $(GLSRCDIR)/unixinst.mak ++include $(CONTRIBDIR)/contrib.mak + + # This has to come last so it won't be taken as the default target. + $(AK): diff --git a/print/ghostscript8/files/patch-src_cpca_mk_cmd.c b/print/ghostscript8/files/patch-src_cpca_mk_cmd.c deleted file mode 100644 index e7f1f9221946..000000000000 --- a/print/ghostscript8/files/patch-src_cpca_mk_cmd.c +++ /dev/null @@ -1,270 +0,0 @@ ---- src/cpca_mk_cmd.c.orig Wed Mar 15 15:00:26 2006 -+++ src/cpca_mk_cmd.c Wed Mar 15 15:33:26 2006 -@@ -586,6 +586,7 @@ - Ptr data ; - short size ; - Ptr work ; -+ short *swork ; - unsigned long comSize = 0 ; - - if (p && str) { -@@ -594,7 +595,9 @@ - if (data) { - work = data ; - -- *( ( short *)work )++ = id_val_code_set_Shift_JIS ; -+ swork = (short *)work ; -+ *swork++ = id_val_code_set_Shift_JIS ; -+ work = (Ptr)swork ; - memcpy( work, str, (unsigned char)str[ 0 ] + 1 ) ; - comSize = glue_cpcaSetJob( p, - Attribute, -@@ -867,6 +870,7 @@ - short size ; - Ptr data ; - Ptr work ; -+ unsigned short *uswork ; - unsigned long comSize = 0 ; - - if (p) { -@@ -877,8 +881,10 @@ - - *work++ = id_val_resolution_type_dpi ; - -- *( ( unsigned short *)work )++ = resolutionX ; -- *( ( unsigned short *)work )++ = resolutionY ; -+ uswork = (unsigned short *)work ; -+ *uswork++ = resolutionX ; -+ *uswork++ = resolutionY ; -+ work = (Ptr)uswork ; - - comSize = glue_cpcaSetDocument ( p, - id_att_resolution, -@@ -1597,6 +1603,8 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -+ cpcaHANDLE *cpcaHANDLEp ; -+ cpcaUBYTE *cpcaUBYTEp ; - - - z_setUserInfo( userInfo, &userID, &password ) ; -@@ -1616,9 +1624,14 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaHANDLE *)p )++ = inParam->Object1 ; -- *( ( cpcaUBYTE *)p )++ = inParam->Mode ; -- *( ( cpcaHANDLE *)p )++ = inParam->Object2 ; -+ cpcaHANDLEp = (cpcaHANDLE *)p ; -+ *cpcaHANDLEp++ = inParam->Object1 ; -+ cpcaUBYTEp = (cpcaUBYTE *)cpcaHANDLEp ; -+ *cpcaUBYTEp++ = inParam->Mode ; -+ cpcaHANDLEp = (cpcaHANDLE *)cpcaUBYTEp ; -+ *cpcaHANDLEp++ = inParam->Object2 ; -+ p = (Ptr)cpcaHANDLEp ; -+ - comSize += 9; - - return comSize ; -@@ -1644,7 +1657,7 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -- -+ cpcaATTRIB *cpcaATTRIBp; - - z_setUserInfo( userInfo, &userID, &password ) ; - paramSize = 2 + inParam->Size ; -@@ -1661,7 +1674,9 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaATTRIB *)p )++ = inParam->Attribute ; -+ cpcaATTRIBp = (cpcaATTRIB *)p ; -+ *cpcaATTRIBp++ = inParam->Attribute ; -+ p = (Ptr)cpcaATTRIBp ; - if ( inParam->Data && ( inParam->Size > 0 ) ) - { - memcpy( p, inParam->Data, inParam->Size ) ; -@@ -1687,6 +1702,7 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -+ cpcaHANDLE *cpcaHANDLEp ; - - z_setUserInfo( userInfo, &userID, &password ) ; - paramSize = sizeof( cpcaHANDLE ) ; -@@ -1703,7 +1719,10 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaHANDLE *)p )++ = inParam->Object ; -+ cpcaHANDLEp = (cpcaHANDLE *)p ; -+ *cpcaHANDLEp++ = inParam->Object ; -+ p = (Ptr)cpcaHANDLEp ; -+ - comSize += paramSize ; - - return comSize ; -@@ -1723,6 +1742,7 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -+ cpcaATTRIB *cpcaATTRIBp; - - z_setUserInfo( userInfo, &userID, &password ) ; - paramSize = sizeof( cpcaATTRIB ) + inParam->Size ; -@@ -1739,7 +1759,9 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaATTRIB *)p )++ = inParam->Attribute ; -+ cpcaATTRIBp = (cpcaATTRIB *)p; -+ *cpcaATTRIBp++ = inParam->Attribute ; -+ p = (Ptr)cpcaATTRIBp ; - if ( inParam->Data && ( inParam->Size > 0 ) ) - { - memcpy( p, inParam->Data, inParam->Size ) ; -@@ -1764,22 +1786,27 @@ - short comSize ; - Ptr work ; - char BindName; -+ unsigned char *ucwork ; - - work = p ; - - /* ビンエイリアスの設定 */ -- *( ( unsigned char *)work )++ = bindInfo; -+ ucwork = (unsigned char *)work ; -+ *ucwork++ = bindInfo; - /* ビン番号の設定=なし(0を指定) */ -- *( ( unsigned char *)work )++ = bindNum ; -+ *ucwork++ = bindNum ; - /* ビン名称指定 */ - /* null文字列指定 */ - BindName = 0; -+ work = (Ptr)ucwork ; - - memcpy( ( StringPtr )work, &BindName, 1 ) ; - work += 1 ; - /* 開始ビン、終了ビン指定 */ -- *( ( unsigned char *)work )++ = 0 ; -- *( ( unsigned char *)work )++ = 0 ; -+ ucwork = (unsigned char *)work ; -+ *ucwork++ = 0 ; -+ *ucwork++ = 0 ; -+ work = (Ptr)ucwork ; - /* サイズの取得 */ - comSize = work - p ; - -@@ -1803,19 +1830,24 @@ - Ptr work ; - char count; - char str_count; -+ unsigned char *ucwork ; -+ unsigned short *uswork ; - - work = p ; - count = 1; - str_count = 1; - - /* Type:フィニッシング方法の設定 */ -- *( ( unsigned char *)work )++ = str_count; -+ ucwork = (unsigned char *)work ; -+ *ucwork++ = str_count; - /* Type:フィニッシング方法の設定 */ -- *( ( unsigned char *)work )++ = id_val_finishing_type_staple_stitching; -+ *ucwork++ = id_val_finishing_type_staple_stitching; - /* Count:フィニッシングを行う個数 */ -- *( ( unsigned char *)work )++ = count ; -+ *ucwork++ = count ; - /* Locate:フィニッシングを行う箇所 */ -- *( ( unsigned short *)work )++ = staple_val; -+ uswork = (unsigned short *)ucwork ; -+ *uswork++ = staple_val; -+ work = (Ptr)uswork ; - /* サイズの取得 */ - comSize = work - p ; - -@@ -1839,6 +1871,7 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -+ cpcaHANDLE *cpcaHANDLEp ; - - z_setUserInfo( userInfo, &userID, &password ) ; - paramSize = 4 ; -@@ -1855,7 +1888,9 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaHANDLE *)p )++ = inParam->Object ; -+ cpcaHANDLEp = (cpcaHANDLE *)p ; -+ *cpcaHANDLEp++ = inParam->Object ; -+ p = (Ptr)cpcaHANDLEp ; - comSize += paramSize ; - - return comSize ; -@@ -1876,7 +1911,7 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -- -+ cpcaATTRIB *cpcaATTRIBp ; - - z_setUserInfo( userInfo, &userID, &password ) ; - paramSize = 2 + inParam->Size ; -@@ -1893,7 +1928,9 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaATTRIB *)p )++ = inParam->Attribute ; -+ cpcaATTRIBp = (cpcaATTRIB *)p ; -+ *cpcaATTRIBp++ = inParam->Attribute ; -+ p = (Ptr)cpcaATTRIBp ; - if ( inParam->Data && ( inParam->Size > 0 ) ) - { - memcpy( p, inParam->Data, inParam->Size ) ; -@@ -1918,6 +1955,8 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -+ cpcaHANDLE *cpcaHANDLEp ; -+ cpcaUSHORT *cpcaUSHORTp ; - - z_setUserInfo( userInfo, &userID, &password ) ; - paramSize = 6 + inParam->Size ; -@@ -1934,8 +1973,11 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaHANDLE *)p )++ = inParam->Object ; -- *( ( cpcaUSHORT *)p )++ = inParam->Method ; -+ cpcaHANDLEp = (cpcaHANDLE *)p ; -+ *cpcaHANDLEp++ = inParam->Object ; -+ cpcaUSHORTp = (cpcaUSHORT *)cpcaHANDLEp ; -+ *cpcaUSHORTp++ = inParam->Method ; -+ p = (Ptr)cpcaUSHORTp ; - if ( inParam->Data && ( inParam->Size > 0 ) ) - { - memcpy( p, inParam->Data, inParam->Size ) ; -@@ -2075,6 +2117,7 @@ - short paramSize ; - unsigned long userID ; - unsigned long password ; -+ cpcaUBYTE *cpcaUBYTEp ; - - z_setUserInfo( userInfo, &userID, &password ) ; - paramSize = 1 ; -@@ -2091,7 +2134,9 @@ - p += comSize ; - - /* 固有パラメータの設定 */ -- *( ( cpcaUBYTE *)p )++ = inParam->Code ; -+ cpcaUBYTEp = (cpcaUBYTE *)p ; -+ *cpcaUBYTEp++ = inParam->Code ; -+ p = (Ptr)cpcaUBYTEp ; - comSize += paramSize ; - - return comSize ; diff --git a/print/ghostscript8/files/stc740ih.upp b/print/ghostscript8/files/stc740ih.upp deleted file mode 100644 index bb9805f55fb8..000000000000 --- a/print/ghostscript8/files/stc740ih.upp +++ /dev/null @@ -1,60 +0,0 @@ -# $ApsCVS: src/apsfilter/uniprint/stc740ih.upp,v 1.2 2000/04/21 18:48:00 andreas Exp $ -# --supModel="Epson Stylus Color 740, 1440x720DpI, Inkjet Paper" --sDEVICE=uniprint --dNOPAUSE --dSAFER --dupColorModel=/DeviceCMYKgenerate --dupRendering=/FSCMYK32 --dupOutputFormat=/EscP2XY --r1440x720 --dupMargins="{ 9.0 39.96 9.0 9.0}" --dupBlackTransfer="{ - 0.00000000 0.00627451 0.01254902 0.02196078 0.02980392 0.03764706 0.04549020 - 0.05490196 0.06431373 0.07215686 0.08156863 0.09098039 0.10196078 0.11450980 - 0.12862745 0.14588235 0.16313725 0.18509804 0.20862745 0.25411765 0.40000000 -}" --dupCyanTransfer="{ - 0.00000000 0.00627451 0.01254902 0.02196078 0.02980392 0.03764706 0.04549020 - 0.05490196 0.06431373 0.07215686 0.08156863 0.09098039 0.10196078 0.11450980 - 0.12862745 0.14588235 0.16313725 0.18509804 0.20862745 0.25411765 0.40000000 -}" --dupMagentaTransfer="{ - 0.00000000 0.00627451 0.01254902 0.02196078 0.02980392 0.03764706 0.04549020 - 0.05490196 0.06431373 0.07215686 0.08156863 0.09098039 0.10196078 0.11450980 - 0.12862745 0.14588235 0.16313725 0.18509804 0.20862745 0.25411765 0.40000000 -}" --dupYellowTransfer="{ - 0.00000000 0.00627451 0.01254902 0.02196078 0.02980392 0.03764706 0.04549020 - 0.05490196 0.06431373 0.07215686 0.08156863 0.09098039 0.10196078 0.11450980 - 0.12862745 0.14588235 0.16313725 0.18509804 0.20862745 0.25411765 0.40000000 -}" --dupOutputComponentOrder="{ 1 2 3 0 }" --dupWeaveXPasses=2 --dupOutputXStep=2 --dupWeaveYPasses=6 --dupOutputPins=46 --dupWeaveYFeeds="{23 23 23 23 23 23 23 23 23 23 23 23}" --dupWeaveXStarts="{0 1 0 1 0 1 1 0 1 0 1 0}" --dupWeaveYOffset=50 --dupWeaveInitialYFeeds="{ 5 5 5 5 5 5 5 5 5 5 5 23}" --dupWeaveInitialXStarts="{0 1 0 1 0 1 1 0 1 0 1 0}" --dupWeaveInitialPins="{ 13 16 19 22 25 28 31 34 37 40 43 46}" --dupFormatYabsolute --dupBeginPageCommand="< - 1b40 1b40 - 1b2847 0100 01 - 1b2855 0100 05 - 1b2873 0100 02 - 1b5501 - 1b2865 0200 0001 - 1b2843 0200 0000 - 1b2863 0400 0000 0000 ->" --dupAdjustPageLengthCommand --dupAdjustTopMarginCommand --dupAdjustBottomMarginCommand --dupXStepCommand="<1b285c 0400 a005 0100 0000>" --dupEndPageCommand="(\033@\014)" --dupAbortCommand="(\033@\15\12\12\12\12 Printout-Aborted\15\014)" - diff --git a/print/ghostscript8/files/stc740p.upp b/print/ghostscript8/files/stc740p.upp deleted file mode 100644 index a4e7f5441793..000000000000 --- a/print/ghostscript8/files/stc740p.upp +++ /dev/null @@ -1,36 +0,0 @@ -# $ApsCVS: src/apsfilter/uniprint/stc740p.upp,v 1.2 2000/04/21 18:48:00 andreas Exp $ -# --supModel="Epson Stylus Color 740, 720x720DpI, Plain Paper" --sDEVICE=uniprint --dNOPAUSE --dSAFER --dupColorModel=/DeviceCMYKgenerate --dupRendering=/FSCMYK32 --dupOutputFormat=/EscP2 --r720x720 --dupMargins="{ 9.0 39.96 9.0 9.0}" --dupBlackTransfer="{ 0.0000 0.0453 0.1058 0.1898 0.4321 1.0000 }" --dupCyanTransfer="{ 0.0000 0.0453 0.1058 0.1898 0.4321 1.0000 }" --dupMagentaTransfer="{ 0.0000 0.0453 0.1058 0.1898 0.4321 1.0000 }" --dupYellowTransfer="{ 0.0000 0.0453 0.1058 0.1898 0.4321 1.0000 }" --dupOutputComponentOrder="{ 1 2 3 0 }" --dupWeaveYPasses=6 --dupOutputPins=48 --dupWeaveYFeeds="{47 47 47 53 47 47}" --dupWeaveInitialYFeeds="{1 1 1 1 1 43}" --dupWeaveInitialPins="{ 8 48 40 31 23 15}" --dupBeginPageCommand="< - 1b40 1b40 - 1b2847 0100 01 - 1b2855 0100 05 - 1b5500 - 1b2865 0200 0002 - 1b2843 0200 0000 - 1b2863 0400 0000 0000 ->" --dupAdjustPageLengthCommand --dupAdjustTopMarginCommand --dupAdjustBottomMarginCommand --dupEndPageCommand="(\033@\014)" --dupAbortCommand="(\033@\15\12\12\12\12 Printout-Aborted\15\014)" - diff --git a/print/ghostscript8/files/stc740pl.upp b/print/ghostscript8/files/stc740pl.upp deleted file mode 100644 index b2fdb0dbbc06..000000000000 --- a/print/ghostscript8/files/stc740pl.upp +++ /dev/null @@ -1,32 +0,0 @@ -# $ApsCVS: src/apsfilter/uniprint/stc740pl.upp,v 1.2 2000/04/21 18:48:01 andreas Exp $ -# --supModel="Epson Stylus Color 740, 360x360DpI, Plain Paper" --sDEVICE=uniprint --dNOPAUSE --dSAFER --dupColorModel=/DeviceCMYKgenerate --dupRendering=/FSCMYK32 --dupOutputFormat=/EscP2 --r360x360 --dupMargins="{ 9.0 39.96 9.0 9.0}" --dupOutputComponentOrder="{ 1 2 3 0 }" --dupWeaveYPasses=3 --dupOutputPins=48 --dupWeaveYFeeds="{47 50 47}" --dupWeaveInitialYFeeds="{1 1 46}" --dupWeaveInitialPins="{ 16 48 32}" --dupBeginPageCommand="< - 1b40 1b40 - 1b2847 0100 01 - 1b2855 0100 0A - 1b5500 - 1b2865 0200 0002 - 1b2843 0200 0000 - 1b2863 0400 0000 0000 ->" --dupAdjustPageLengthCommand --dupAdjustTopMarginCommand --dupAdjustBottomMarginCommand --dupEndPageCommand="(\033@\014)" --dupAbortCommand="(\033@\15\12\12\12\12 Printout-Aborted\15\014)" - |