summaryrefslogtreecommitdiff
path: root/print/ghostscript-afpl/files
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2003-06-08 13:45:15 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2003-06-08 13:45:15 +0000
commit365edaa5fa775a4288ba9c902f3e36b965c64bb3 (patch)
tree02f1d0f8a181590f52c49f7705d65125d983f329 /print/ghostscript-afpl/files
parentFix MASTER_SITES (diff)
Downgrade to 8.0 and fix accidental screwups.
Submitted by: Ports Fury
Diffstat (limited to 'print/ghostscript-afpl/files')
-rw-r--r--print/ghostscript-afpl/files/patch-lib:gs_res.ps13
-rw-r--r--print/ghostscript-afpl/files/patch-src:dmp_site.ps10
-rw-r--r--print/ghostscript-afpl/files/patch-src:dviprlib.c134
-rw-r--r--print/ghostscript-afpl/files/patch-src:dviprlib.h38
-rw-r--r--print/ghostscript-afpl/files/patch-src:gdevdmpr.c38
-rw-r--r--print/ghostscript-afpl/files/patch-src:gdevdmpr.mak21
-rw-r--r--print/ghostscript-afpl/files/patch-src:gdevsgi.c16
7 files changed, 270 insertions, 0 deletions
diff --git a/print/ghostscript-afpl/files/patch-lib:gs_res.ps b/print/ghostscript-afpl/files/patch-lib:gs_res.ps
new file mode 100644
index 000000000000..2e5169720649
--- /dev/null
+++ b/print/ghostscript-afpl/files/patch-lib:gs_res.ps
@@ -0,0 +1,13 @@
+--- lib/gs_res.ps.orig Mon Jul 16 01:09:41 2001
++++ lib/gs_res.ps Fri Feb 8 07:12:09 2002
+@@ -248,8 +248,8 @@
+ /pssystemparams 10 dict readonly def
+ } if
+ pssystemparams begin
+- /FontResourceDir (/Resource/Font/) readonly .forcedef % pssys'params is r-o
+- /GenericResourceDir (/Resource/) readonly .forcedef % pssys'params is r-o
++ /FontResourceDir (%%DATADIR%%/Resource/Font/) readonly .forcedef % pssys'params is r-o
++ /GenericResourceDir (%%DATADIR%%/Resource/) readonly .forcedef % pssys'params is r-o
+ /GenericResourcePathSep (/) readonly .forcedef % pssys'params is r-o
+ end
+ end
diff --git a/print/ghostscript-afpl/files/patch-src:dmp_site.ps b/print/ghostscript-afpl/files/patch-src:dmp_site.ps
new file mode 100644
index 000000000000..ee1a5717d641
--- /dev/null
+++ b/print/ghostscript-afpl/files/patch-src:dmp_site.ps
@@ -0,0 +1,10 @@
+--- 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 @@
+ BeginConfig
+ %%%%%%%%%%%%%%%%%%%%%% Standard user cusomizations %%%%%%%%%%%%%%%%%%%%%
+-/printer (epsimage.src)
++/printer (%%DATADIR%%/%%GS_VERSION%%/lib/escp_24.src)
+ % horizontal / vertical
+ % /resolution [ 160.0 180.0 ]
+ % horizontal / vertical
diff --git a/print/ghostscript-afpl/files/patch-src:dviprlib.c b/print/ghostscript-afpl/files/patch-src:dviprlib.c
new file mode 100644
index 000000000000..c61ca748cbc2
--- /dev/null
+++ b/print/ghostscript-afpl/files/patch-src:dviprlib.c
@@ -0,0 +1,134 @@
+--- src/dviprlib.c.orig Tue May 13 16:14:09 1997
++++ src/dviprlib.c Sun Nov 10 23:26:06 2002
+@@ -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,9 @@
+ char *dviprt_prtcodename[] = { CFG_PRTCODE_NAME, NULL };
+ char *dviprt_encodename[] = { CFG_ENCODE_NAME, NULL };
+
+-private FILE *dviprt_messagestream = stderr;
++private FILE *dviprt_messagestream;
++private void dviprt_messagestream_construct (void) __attribute__((constructor));
++private void dviprt_messagestream_construct (void) { dviprt_messagestream = stderr; }
+
+ /*--- library functions ---*/
+ int
+@@ -1568,16 +1570,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 +1620,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 +2266,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 +2470,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/ghostscript-afpl/files/patch-src:dviprlib.h b/print/ghostscript-afpl/files/patch-src:dviprlib.h
new file mode 100644
index 000000000000..2a671205b46d
--- /dev/null
+++ b/print/ghostscript-afpl/files/patch-src:dviprlib.h
@@ -0,0 +1,38 @@
+--- src/dviprlib.h.orig Tue May 13 16:10:34 1997
++++ src/dviprlib.h Sun Nov 10 23:32:53 2002
+@@ -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/ghostscript-afpl/files/patch-src:gdevdmpr.c b/print/ghostscript-afpl/files/patch-src:gdevdmpr.c
new file mode 100644
index 000000000000..47e980154ccd
--- /dev/null
+++ b/print/ghostscript-afpl/files/patch-src:gdevdmpr.c
@@ -0,0 +1,38 @@
+--- src/gdevdmpr.c.orig Tue May 13 20:43:37 1997
++++ src/gdevdmpr.c Sun Nov 10 21:19:41 2002
+@@ -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 = {
+@@ -846,7 +846,7 @@
+ if (env) {
+ strcpy(fname,env);
+ strcat(fname,
+- gp_file_name_concat_string(env,strlen(env),fname,strlen(fnamebase)));
++ gp_file_name_concat_string(env,strlen(env)));
+ strcat(fname,fnamebase);
+ fp = fopen(fname,gp_fmode_rb);
+ }
diff --git a/print/ghostscript-afpl/files/patch-src:gdevdmpr.mak b/print/ghostscript-afpl/files/patch-src:gdevdmpr.mak
new file mode 100644
index 000000000000..9136172873fa
--- /dev/null
+++ b/print/ghostscript-afpl/files/patch-src:gdevdmpr.mak
@@ -0,0 +1,21 @@
+--- 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/ghostscript-afpl/files/patch-src:gdevsgi.c b/print/ghostscript-afpl/files/patch-src:gdevsgi.c
new file mode 100644
index 000000000000..96d3891fc9e5
--- /dev/null
+++ b/print/ghostscript-afpl/files/patch-src:gdevsgi.c
@@ -0,0 +1,16 @@
+--- src/gdevsgi.c.orig Fri Feb 22 07:24:52 2002
++++ src/gdevsgi.c Sun Nov 10 22:55:30 2002
+@@ -32,8 +32,11 @@
+ sgi_prn_device(sgi_procs, "sgirgb", 3, 24, 255, 255, sgi_print_page);
+
+ private gx_color_index
+-sgi_map_rgb_color(gx_device *dev, ushort r, ushort g, ushort b)
+-{ ushort bitspercolor = dev->color_info.depth / 3;
++sgi_map_rgb_color(gx_device *dev, const ushort cv[])
++{ ushort r = cv[0];
++ ushort g = cv[1];
++ ushort b = cv[2];
++ ushort bitspercolor = dev->color_info.depth / 3;
+ ulong max_value = (1 << bitspercolor) - 1;
+ return ((r*max_value / gx_max_color_value) << (bitspercolor * 2)) +
+ ((g*max_value / gx_max_color_value) << bitspercolor) +