File ghostscript-9.00.dif of Package ghostscript-library.887
--- Resource/Init/Fontmap
+++ Resource/Init/Fontmap 2008-02-21 14:55:26.000000000 +0000
@@ -1,4 +1,9 @@
%!
% See Fontmap.GS for the syntax of real Fontmap files.
%% Replace 1 (Fontmap.GS)
+(Fontmap.X11-auto) .runlibfileifexists
(Fontmap.GS) .runlibfile
+(Fontmap.kanji) .runlibfileifexists
+(Fontmap.rus) .runlibfileifexists
+(Fontmap.CID) .runlibfileifexists
+(Fontmap.greek) .runlibfileifexists
--- Resource/Init/gs_fonts.ps
+++ Resource/Init/gs_fonts.ps 2008-02-21 14:55:26.000000000 +0000
@@ -203,7 +203,7 @@ userdict /Fontmap .FontDirectory maxleng
NOFONTPATH { /FONTPATH () def } if
/FONTPATH where
{ pop }
- { /FONTPATH (GS_FONTPATH) getenv not { () } if def }
+ { /FONTPATH (GS_FONTPATH) getenv not { (@@FONTPATH@@) } if def }
ifelse
FONTPATH length 0 eq { (%END FONTPATH) .skipeof } if
/FONTPATH [ FONTPATH .pathlist ] def
--- Resource/Init/gs_init.ps
+++ Resource/Init/gs_init.ps 2008-02-21 14:55:26.000000000 +0000
@@ -75,7 +75,7 @@ systemdict /.languagelevel known not { /
% standard page size A4 rather than US letter, the page size of
% devices that default to letter or A4 can be changed by setting
% DEFAULTPAPERSIZE.
-% /DEFAULTPAPERSIZE (a4) def
+/DEFAULTPAPERSIZE (a4) def
% Turn on array packing for the rest of initialization.
true setpacking
@@ -239,7 +239,7 @@ userdict /=string 256 string put
{ mark
product (Ghostscript) search
{ pop pop pop
- (This software comes with NO WARRANTY: see the file PUBLIC for details.\n)
+ (This software comes with NO WARRANTY: see the file COPYING for details.\n)
}
{ pop
}
--- base/Makefile.in
+++ base/Makefile.in 2010-09-28 13:05:05.291926537 +0000
@@ -47,10 +47,11 @@ PSD=$(PSGENDIR)/
# the directories also define the default search path for the
# initialization files (gs_*.ps) and the fonts.
-INSTALL = $(GLSRCDIR)/instcopy -c
+INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_SHARED = @INSTALL_SHARED@
+ARCHLIB=$(shell test -d /usr/lib64 && echo lib64 || echo lib)
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -87,7 +88,7 @@ CUPSPDFTORASTER=@CUPSPDFTORASTER@
# Define the default directory/ies for the runtime
# initialization and font files. Separate multiple directories with a :.
-GS_LIB_DEFAULT=$(gsdatadir)/Resource/Init:$(gsdatadir)/lib:$(gsdatadir)/Resource/Font:$(gsdir)/fonts:@fontpath@
+GS_LIB_DEFAULT=/etc/ghostscript/$(GS_DOT_VERSION):$(gsdatadir)/Resource/Init:$(gsdatadir)/lib:$(gsdatadir)/Resource/Font:$(gsdir)/Resource:$(gsdir)/fonts:@fontpath@
# Define the default directory for cached data files
# this must be a single path.
@@ -112,7 +113,9 @@ GS_INIT=gs_init.ps
# Code runs substantially slower even if no debugging switches
# are set.
-GENOPT=
+GLIBOPT=
+DEBUG=
+GENOPT=-DA4 -DHAVE_PNG_H $(GLIBOPT) $(DEBUG) -DICCPROFILESDIR=\"$(gsdatadir)/iccprofiles/\"
# Choose capability options.
@@ -251,6 +254,11 @@ LCMSSRCDIR=lcms
IJSSRCDIR=@IJSDIR@
IJSEXECTYPE=unix
+# Define library names for the Gimp-Print (stp) driver
+STPLIB=gimpprint
+STPINC=$(CONTRIBSRC)/../stp/include
+STPDIR=$(CONTRIBSRC)/../stp/src/main/.libs
+
# Define the directory where the imdi library source is stored.
# See devs.mak for more information.
@@ -325,7 +333,7 @@ LDFLAGS=@LDFLAGS@ $(XLDFLAGS)
# Solaris may need -lnsl -lsocket -lposix4.
# (Libraries required by individual drivers are handled automatically.)
-EXTRALIBS=@LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@
+EXTRALIBS=@LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ $(FT_LIBS) -Wl,-rpath-link,$(STPDIR)/ -L$(STPDIR)/ -rdynamic -ldl
# Define the standard libraries to search at the end of linking.
# Most platforms require -lpthread for the POSIX threads library;
@@ -387,7 +395,9 @@ CAIRO_LIBS = @CAIRO_LIBS@
# 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 $(GLD)gsnogc.dev $(GLD)roplib.dev $(GLD)htxlib.dev $(PSD)fapi.dev @JBIG2DEVS@ @JPXDEVS@ @UTF8DEVS@
+FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dps.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev \
+ $(EXTRADEVS) $(GLD)pipe.dev $(PSD)rasterop.dev $(PSD)fzlib.dev $(PSD)cidfont.dev $(GLD)gsnogc.dev \
+ $(GLD)roplib.dev $(GLD)htxlib.dev $(PSD)fapi.dev $(PSD)type1.dev $(PSD)type32.dev $(PSD)type42.dev $(PSD)compfont.dev @JBIG2DEVS@ @JPXDEVS@ @UTF8DEVS@
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(GLD)pipe.dev
# The following is strictly for testing.
@@ -416,7 +426,7 @@ BAND_LIST_COMPRESSOR=zlib
# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
# See gs.mak and sfxfd.c for more details.
-FILE_IMPLEMENTATION=stdio
+FILE_IMPLEMENTATION=both
# Choose the implementation of stdio: '' for file I/O and 'c' for callouts
# See gs.mak and ziodevs.c/ziodevsc.c for more details.
@@ -429,7 +439,7 @@ GS_DEV_DEFAULT="x11alpha x11 bbox"
# Fallback default device. This is set to 'display' by
# unix-dll.mak when building a shared object.
-DISPLAY_DEV=$(DD)bbox.dev
+DISPLAY_DEV=
# Choose the device(s) to include. See devs.mak for details,
# devs.mak and contrib.mak for the list of available devices.
@@ -461,13 +471,13 @@ DISPLAY_DEV=$(DD)bbox.dev
#DEVICE_DEVS19=
#DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev
#DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev
-DEVICE_DEVS=$(DISPLAY_DEV) @X_DEVS@
+DEVICE_DEVS=$(DISPLAY_DEV) $(STATIC_DEVS)
DEVICE_DEVS1=@FILES@
DEVICE_DEVS2=@PRINTERS@
-DEVICE_DEVS3=@CUPSDEV@
-DEVICE_DEVS4=@IJSDEVS@
-DEVICE_DEVS5=@OMNIDEVS@
-DEVICE_DEVS6=@PNGDEVS@
+DEVICE_DEVS3=
+DEVICE_DEVS4=
+DEVICE_DEVS5=
+DEVICE_DEVS6=
DEVICE_DEVS7=@JBIG2DEVS@
DEVICE_DEVS8=$(DD)svgwrite.dev
DEVICE_DEVS9=
--- base/configure.ac
+++ base/configure.ac 2008-02-21 15:12:05.000000000 +0000
@@ -789,6 +789,7 @@ JPEG 2000 PDF image support entirely.
else
AC_MSG_RESULT([no])
AC_CHECK_LIB([jasper], [jas_image_create], [
+ JASPERDIR=/usr/include
SHARE_JASPER=1
], [
AC_MSG_WARN([disabling support for JPEG 2000 images])
@@ -1126,11 +1127,18 @@ if test -n "$P_DEVS"; then
# Remove contributed drivers if requested and make sure we don't have any
# duplicates in there, add $(DD)foo.dev constructs
+ OIFS="$IFS"
+ IFS=$'\n'
noncontribmakefiles=`find . -name '*.mak' -print | grep -v '^\./contrib/'`
- PRINTERS=`(for i in $P_DEVS; do d='$(DD)'${i}.dev; if ( grep '^'$d $noncontribmakefiles 2>&1 >/dev/null ) || ( ! test -z "$CONTRIBINCLUDE" ); then echo $d; fi; done) | sort | uniq | tr '\012' ' '`
+ IFS="$OIFS"
+ PRINTERS=`(for i in $P_DEVS; do d='$(DD)'${i}.dev; if (IFS=$'\n'; grep '^'$d $noncontribmakefiles &> /dev/null ) || ( ! test -z "$CONTRIBINCLUDE" ); then echo $d; fi; done) | sort | uniq | tr '\012' ' '`
fi
if test -n "$F_DEVS"; then
- FILES=`(for i in $F_DEVS; do d='$(DD)'${i}.dev; if ( grep '^'$d $noncontribmakefiles 2>&1 >/dev/null) || ( ! test -z "$CONTRIBINCLUDE" ); then echo $d; fi; done) | sort | uniq | tr '\012' ' '`
+ OIFS="$IFS"
+ IFS=$'\n'
+ noncontribmakefiles=`find . -name '*.mak' -print | grep -v '^\./contrib/'`
+ IFS="$OIFS"
+ FILES=`(for i in $F_DEVS; do d='$(DD)'${i}.dev; if (IFS=$'\n'; grep '^'$d $noncontribmakefiles >& /dev/null) || ( ! test -z "$CONTRIBINCLUDE" ); then echo $d; fi; done) | sort | uniq | tr '\012' ' '`
fi
AC_SUBST(PRINTERS)
AC_SUBST(FILES)
--- base/contrib.mak
+++ base/contrib.mak 2008-02-21 14:55:26.000000000 +0000
@@ -26,7 +26,7 @@ CONTRIB_MAK=$(GLSRC)contrib.mak
# Displays:
# MS-DOS (note: not usable with Desqview/X):
# herc Hercules Graphics display [MS-DOS only]
-# pe Private Eye display
+# pe Private Eye display [MS-DOS only]
# Unix and VMS:
# att3b1 AT&T 3b1/Unixpc monochrome display [3b1 only]
# sonyfb Sony Microsystems monochrome display [Sony only]
@@ -299,6 +299,9 @@ $(DD)bjc800.dev : $(cdeskjet_) $(DD)page
$(DD)escp.dev : $(cdeskjet_) $(DD)page.dev
$(SETPDEV) $(DD)escp $(cdeskjet_)
+$(DD)escpc.dev : $(cdeskjet_) $(DD)page.dev
+ $(SETPDEV) $(DD)escpc $(cdeskjet_)
+
# NB: you can also customise the build if required, using
# -DBitsPerPixel=<number> if you wish the default to be other than 24
# for the generic drivers (cdj500, cdj550, pjxl300, pjtest, pjxltest).
@@ -557,8 +560,8 @@ lbp8_=$(GLOBJ)gdevlbp8.$(OBJ)
$(DD)lbp8.dev : $(lbp8_) $(DD)page.dev
$(SETPDEV) $(DD)lbp8 $(lbp8_)
-$(DD)lips3.dev : $(lbp8_) $(DD)page.dev
- $(SETPDEV) $(DD)lips3 $(lbp8_)
+#$(DD)lips3.dev : $(lbp8_) $(DD)page.dev
+# $(SETPDEV) $(DD)lips3 $(lbp8_)
$(GLOBJ)gdevlbp8.$(OBJ) : $(GLSRC)gdevlbp8.c $(PDEVH)
$(GLCC) $(GLO_)gdevlbp8.$(OBJ) $(C_) $(GLSRC)gdevlbp8.c
--- base/devs.mak
+++ base/devs.mak 2009-06-16 13:09:00.000000000 +0000
@@ -44,19 +44,19 @@ GDEV=$(AK) $(ECHOGS_XE) $(GDEVH)
# MS-DOS displays (note: not usable with Desqview/X):
# MS-DOS EGA and VGA:
-# ega EGA (640x350, 16-color)
-# vga VGA (640x480, 16-color)
+# ega EGA (640x350, 16-color) [MS-DOS]
+# vga VGA (640x480, 16-color) [MS-DOS]
# MS-DOS SuperVGA:
-# * ali SuperVGA using Avance Logic Inc. chipset, 256-color modes
-# * atiw ATI Wonder SuperVGA, 256-color modes
-# * cirr SuperVGA using Cirrus Logic CL-GD54XX chips, 256-color modes
-# * s3vga SuperVGA using S3 86C911 chip (e.g., Diamond Stealth board)
-# svga16 Generic SuperVGA in 800x600, 16-color mode
-# * tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes
-# * tvga SuperVGA using Trident chipset, 256-color modes
-# ****** NOTE: The vesa device does not work with the Watcom (32-bit MS-DOS)
+# * ali SuperVGA using Avance Logic Inc. chipset, 256-color modes [MS-DOS]
+# * atiw ATI Wonder SuperVGA, 256-color modes [MS-DOS]
+# * cirr SuperVGA using Cirrus Logic CL-GD54XX chips, 256-color modes [MS-DOS]
+# * s3vga SuperVGA using S3 86C911 chip (e.g., Diamond Stealth board) [MS-DOS]
+# svga16 Generic SuperVGA in 800x600, 16-color mode [MS-DOS]
+# * tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes [MS-DOS]
+# * tvga SuperVGA using Trident chipset, 256-color modes [MS-DOS]
+# ****** NOTE: The vesa device does not work with the Watcom (32-bit MS-DOS) [MS-DOS]
# ****** compiler or executable.
-# vesa SuperVGA with VESA standard API driver
+# vesa SuperVGA with VESA standard API driver [MS-DOS]
# Other displays:
# display For use on any platform that supports DLLs
# MS Windows:
@@ -238,6 +238,10 @@ GDEV=$(AK) $(ECHOGS_XE) $(GDEVH)
# "Printer" drivers depend on the following:
PDEVH=$(AK) $(gdevprn_h)
+# General rules
+$(GLOBJ)%.$(OBJ): $(GLSRC)%.c $(PDEVH)
+ $(GLCC) $(O_) $@ $(C_) $<
+
# Define the header files for device drivers. Every header file used by
# more than one device driver family must be listed here.
gdev8bcm_h=$(GLSRC)gdev8bcm.h
--- base/gdevhl7x.c
+++ base/gdevhl7x.c 2008-02-21 14:55:26.000000000 +0000
@@ -19,7 +19,7 @@
* The original code was borrowed from the
* HP LaserJet/DeskJet driver for Ghostscript.
* The code specific to the Brother HL 720 was written by :
- * Pierre-Olivier Gaillard (pierre.gaillard@hol.fr)
+ * Gaillard Pierre-Olivier <gaillarp@club-internet.fr>
* Thanks to the documentation kindly provided by :
* Richard Thomas <RICHARDT@brother.co.uk>
*
@@ -89,6 +89,7 @@ typedef struct {
typedef unsigned char Byte; /* Rep. of elementary data unit */
+#define USE_POSSIBLY_FLAWED_COMPRESSION 1
/*
--- base/gdevl256.c
+++ base/gdevl256.c 2008-02-21 14:55:26.000000000 +0000
@@ -32,6 +32,10 @@
#include <errno.h>
#include <vga.h>
#include <vgagl.h>
+#ifdef __linux__
+# include <unistd.h>
+ extern uid_t saveuid, savegid;
+#endif
/* The color map for dynamically assignable colors. */
#define first_dc_index 64
@@ -102,7 +106,16 @@ lvga256_open(gx_device * dev)
int vgamode;
int width, height;
+#ifdef __linux__
+ /* get old privileges */
+ seteuid(saveuid);
+ setegid(savegid);
+#endif
vga_init();
+#ifdef __linux__
+ seteuid(getuid());
+ setegid(getgid());
+#endif
vgamode = vga_getdefaultmode();
if (vgamode == -1)
vgamode = G320x200x256;
--- base/gdevperm.c
+++ base/gdevperm.c 2008-02-21 14:55:26.000000000 +0000
@@ -286,7 +286,7 @@ perm_get_color_mapping_procs(const gx_de
(strncmp((const char *)name, (const char *)str, name_size) == 0))
static int
-perm_get_color_comp_index(const gx_device *pdev, const char *pname,
+perm_get_color_comp_index(gx_device *pdev, const char *pname,
int name_size, int component_type)
{
const gx_device_perm_t * const dev = (const gx_device_perm_t *)pdev;
--- base/gdevpng.c
+++ base/gdevpng.c 2008-02-21 14:55:27.000000000 +0000
@@ -410,7 +410,7 @@ png_print_page(gx_device_printer * pdev,
* This could be avoided if we were willing to edit pngconf.h to
* #undef PNG_PROGRESSIVE_READ_SUPPORTED
*/
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+#if !defined(PNG_EXTERN) && defined(PNG_PROGRESSIVE_READ_SUPPORTED)
# if PNG_LIBPNG_VER >= 95
# define PPFB_LENGTH_T png_size_t
# else
--- base/gdevxalt.c
+++ base/gdevxalt.c 2008-02-21 14:55:27.000000000 +0000
@@ -23,6 +23,11 @@
#include "gxdevice.h"
#include "gsdevice.h" /* for gs_copydevice */
#include "gdevx.h"
+#ifdef GS_DEVS_SHARED
+# include <stdlib.h>
+# include "gp.h"
+extern void gs_lib_register_device(const gx_device *dev);
+#endif
extern const gx_device_X gs_x11_device;
extern const gx_device_X gs_x11alpha_device;
@@ -845,18 +850,20 @@ x_rg32x_alt_map_color(gx_device * dev, g
}
#ifdef GS_DEVS_SHARED
-extern void gs_lib_register_device(const gx_device *dev);
void
gs_shared_init(void)
{
- gs_lib_register_device(&gs_x11_device);
- gs_lib_register_device(&gs_x11alpha_device);
- gs_lib_register_device(&gs_x11cmyk_device);
- gs_lib_register_device(&gs_x11cmyk2_device);
- gs_lib_register_device(&gs_x11cmyk4_device);
- gs_lib_register_device(&gs_x11cmyk8_device);
- gs_lib_register_device(&gs_x11gray2_device);
- gs_lib_register_device(&gs_x11gray4_device);
- gs_lib_register_device(&gs_x11mono_device);
+ gs_lib_register_device((const gx_device *)&gs_x11_device);
+ gs_lib_register_device((const gx_device *)&gs_x11alpha_device);
+ gs_lib_register_device((const gx_device *)&gs_x11cmyk_device);
+ gs_lib_register_device((const gx_device *)&gs_x11cmyk2_device);
+ gs_lib_register_device((const gx_device *)&gs_x11cmyk4_device);
+ gs_lib_register_device((const gx_device *)&gs_x11cmyk8_device);
+ gs_lib_register_device((const gx_device *)&gs_x11gray2_device);
+ gs_lib_register_device((const gx_device *)&gs_x11gray4_device);
+ gs_lib_register_device((const gx_device *)&gs_x11mono_device);
+
+ if (gp_getenv_display() && getenv("GS_DEVICE") == (char*)0)
+ (void)setenv("GS_DEVICE", "x11", 1);
}
#endif
--- base/gp.h
+++ base/gp.h 2008-02-21 14:55:27.000000000 +0000
@@ -167,7 +167,12 @@ const char *gp_getenv_display(void);
* Note that this is the size of the buffer, not the maximum number of
* characters: the latter is one less, because of the terminating \0.
*/
-#define gp_file_name_sizeof 260 /* == MAX_PATH on Windows */
+#ifdef linux
+# include <limits.h>
+# define gp_file_name_sizeof PATH_MAX
+#else
+# define gp_file_name_sizeof 260 /* == MAX_PATH on Windows */
+#endif
/* Define the character used for separating file names in a list. */
extern const char gp_file_name_list_separator;
--- base/gp_unifs.c
+++ base/gp_unifs.c 2010-09-29 13:01:55.383926360 +0000
@@ -14,6 +14,7 @@
/* $Id: gp_unifs.c 11250 2010-05-15 03:12:31Z hintak $ */
/* "Unix-like" file system platform routines for Ghostscript */
+#include "std.h"
#include "stdio_.h" /* for FILENAME_MAX */
#include "memory_.h"
#include "string_.h"
@@ -55,6 +56,14 @@ const char gp_null_file_name[] = "/dev/n
/* Define the name that designates the current directory. */
const char gp_current_directory_name[] = ".";
+static char ** tempfiles;
+static unsigned ntempfiles = 0;
+static void cleanup_tempfiles(void)
+{
+ while (ntempfiles--)
+ unlink(tempfiles[ntempfiles]);
+}
+
/* Create and open a scratch file with a given name prefix. */
/* Write the actual file name at fname. */
static FILE *
@@ -66,11 +75,13 @@ gp_open_scratch_file_generic(const gs_me
{ /* The -8 is for XXXXXX plus a possible final / and -. */
int prefix_length = strlen(prefix);
int len = gp_file_name_sizeof - prefix_length - 8;
+ int is_absolute = 0;
FILE *fp;
- if (gp_file_name_is_absolute(prefix, prefix_length))
+ if (gp_file_name_is_absolute(prefix, prefix_length)) {
*fname = 0;
- else if (gp_gettmpdir(fname, &len) != 0)
+ is_absolute++;
+ } else if (gp_gettmpdir(fname, &len) != 0)
strcpy(fname, "/tmp/");
else {
if (strlen(fname) != 0 && fname[strlen(fname) - 1] != '/')
@@ -84,31 +95,33 @@ gp_open_scratch_file_generic(const gs_me
strcat(fname, "-");
strcat(fname, "XXXXXX");
-#ifdef HAVE_MKSTEMP
+#if defined(HAVE_MKSTEMP) || defined(__linux__)
{
int file;
char ofname[gp_file_name_sizeof];
/* save the old filename template in case mkstemp fails */
memcpy(ofname, fname, gp_file_name_sizeof);
-#ifdef HAVE_MKSTEMP64
- if (b64)
- file = mkstemp64(fname);
- else
+
+ if (is_absolute) {
+ file = mkstemp(fname);
+ if (file < -1) {
+ emprintf1(mem, "**** Could not open temporary file %s\n", ofname);
+ return NULL;
+ }
+ } else {
+ tempfiles = (char **) realloc(tempfiles, (ntempfiles+1) * sizeof(char *));
+ if (tempfiles == NULL)
+ return NULL;
file = mkstemp(fname);
-#else
- file = mkstemp(fname);
-#endif
- if (file < -1) {
- emprintf1(mem, "**** Could not open temporary file %s\n", ofname);
- return NULL;
- }
-#if defined(O_LARGEFILE) && defined(__hpux)
- if (b64)
- fcntl(file, F_SETFD, fcntl(file, F_GETFD) | O_LARGEFILE);
-#else
- /* Fixme : what to do with b64 and 32-bit mkstemp? Unimplemented. */
-#endif
+ if (file < -1) {
+ emprintf1(mem, "**** Could not open temporary file %s\n", ofname);
+ return NULL;
+ }
+ if (ntempfiles == 0)
+ atexit(cleanup_tempfiles);
+ tempfiles[ntempfiles++] = strdup(fname);
+ }
fp = fdopen(file, mode);
if (fp == NULL)
--- base/gsargs.c
+++ base/gsargs.c 2008-02-21 14:55:33.000000000 +0000
@@ -153,7 +153,7 @@ arg_next(arg_list * pal, int *code)
/* Skip a comment. */
do {
c = cfsgetc();
- } while (!(c == endc || is_eol(c)));
+ } while (!(c == endc || (eol = is_eol(c))));
if (c == '\r')
c = cfsgetc();
if (c == '\n')
@@ -163,12 +163,11 @@ arg_next(arg_list * pal, int *code)
if (c == '\\') {
/* Check for \ followed by newline. */
c = cfsgetc();
- if (is_eol(c)) {
+ if ((eol = is_eol(c))) {
if (c == '\r')
c = cfsgetc();
if (c == '\n')
c = cfsgetc();
- eol = true;
continue;
}
/* \ anywhere else is treated as a printing character. */
--- base/gsmisc.c
+++ base/gsmisc.c 2008-02-21 14:55:33.000000000 +0000
@@ -45,6 +45,7 @@ orig_sqrt(double x)
#include "gserrors.h"
#include "gxfarith.h"
#include "gxfixed.h"
+#include "gscdefs.h"
#include "stdint_.h"
#include "stdio_.h"
--- base/ijs.mak
+++ base/ijs.mak 2008-02-21 14:55:33.000000000 +0000
@@ -10,6 +10,10 @@
# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
#
+###### --------------------------- Catalog -------------------------- ######
+# ijs HP - developed DeskJet 630C upto 900C
+###### ----------------------- End of catalog ----------------------- ######
+#
# $Id: ijs.mak 8022 2007-06-05 22:23:38Z giles $
# makefile for ijs client library code.
# Users of this makefile must define the following:
--- base/lib.mak
+++ base/lib.mak 2008-02-21 14:55:26.000000000 +0000
@@ -914,7 +914,7 @@ $(GLOBJ)gsparam.$(OBJ) : $(GLSRC)gsparam
$(GLOBJ)gsparamx.$(OBJ) : $(GLSRC)gsparamx.c $(string__h)\
$(gserror_h) $(gserrors_h) $(gsmemory_h) $(gsparam_h) $(gsparamx_h)\
$(gstypes_h)
- $(GLCC) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
+ $(GLCCSHARED) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
# Future replacement for gsparams.c
$(GLOBJ)gsparam2.$(OBJ) : $(GLSRC)gsparam2.c $(GXERR) $(memory__h)\
--- base/malloc_.h
+++ base/malloc_.h 2008-02-21 14:55:33.000000000 +0000
@@ -41,7 +41,7 @@ extern void free();
#endif /* !__TURBOC__ */
/* (At least some versions of) Linux don't have a working realloc.... */
-#ifdef linux
+#ifdef __linux__
# define malloc__need_realloc
void *gs_realloc(void *, size_t, size_t);
--- base/stdio_.h
+++ base/stdio_.h 2008-02-21 14:55:33.000000000 +0000
@@ -39,7 +39,9 @@
* if they do, the declaration will be compatible with this one, as long
* as const has not been disabled by defining it to be the empty string.
*/
-int unlink(const char *);
+# include <unistd.h>
+#else
+# include <unistd.h>
#endif
#endif
--- base/unix-dll.mak
+++ base/unix-dll.mak 2010-09-28 13:19:21.088426352 +0000
@@ -36,11 +36,6 @@ GSSOC_XENAME=$(GS)c$(XE)
GSSOC_XE=$(BINDIR)/$(GSSOC_XENAME)
GSSOC=$(BINDIR)/$(SOBINRELDIR)/$(GSSOC_XENAME)
-# loader suporting display device using Gtk+
-GSSOX_XENAME=$(GS)x$(XE)
-GSSOX_XE=$(BINDIR)/$(GSSOX_XENAME)
-GSSOX=$(BINDIR)/$(SOBINRELDIR)/$(GSSOX_XENAME)
-
# shared library
GS_SONAME_BASE=lib$(GS)
@@ -78,12 +73,8 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR)
# Build the small Ghostscript loaders, with Gtk+ and without
$(GSSOC_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER)
- $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \
- $(LDFLAGS) -L$(BINDIR) -l$(GS)
-
-$(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER)
- $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \
- $(LDFLAGS) -L$(BINDIR) -l$(GS) $(SOC_LIBS)
+ $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)$(SOC_LOADER) \
+ $(LDFLAGS) -L$(BINDIR) -l$(GS) $(EXTRALIBS) $(STDLIBS)
# ------------------------- Recursive make targets ------------------------- #
@@ -107,7 +98,7 @@ so: SODIRS
$(GLOBJDIR)/$(SOOBJRELDIR)/echogs$(XEAUX) $(GLOBJDIR)/$(SOOBJRELDIR)/genarch$(XEAUX)
$(MAKE) $(SODEFS) LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)' CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' \
prefix=$(prefix)
- $(MAKE) $(SODEFS) LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
+ $(MAKE) $(SODEFS) LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC)
# Debug shared object
# Note that this is in the same directory as the normal shared
@@ -120,10 +111,10 @@ sodebug: SODIRS
$(GLOBJDIR)/$(SOOBJRELDIR)/echogs$(XEAUX) $(GLOBJDIR)/$(SOOBJRELDIR)/genarch$(XEAUX)
$(MAKE) $(SODEFS) GENOPT='-DDEBUG' LDFLAGS='$(LDFLAGS) $(LDFLAGS_SO)' CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' \
prefix=$(prefix)
- $(MAKE) $(SODEFS) GENOPT='-DDEBUG' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
+ $(MAKE) $(SODEFS) GENOPT='-DDEBUG' LDFLAGS='$(LDFLAGS)' CFLAGS='$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC)
-# $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC) $(GSSOX)
+# $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC)
install-so: so
-mkdir -p $(DESTDIR)$(prefix)
@@ -134,7 +125,6 @@ install-so: so
-mkdir -p $(DESTDIR)$(libdir)
-mkdir -p $(DESTDIR)$(gsincludedir)
$(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
- $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
$(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
$(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
--- base/unixlink.mak
+++ base/unixlink.mak 2008-04-01 10:48:19.000000000 +0000
@@ -44,15 +44,26 @@ $(GS_A): $(obj_tr) $(ECHOGS_XE) $(INT_AR
$(SH) <$(liar_tr)
$(RANLIB) $(GS_A)
-# Here is the final link step. The stuff with LD_RUN_PATH is for SVR4
+# Here is the final link step.
# systems with dynamic library loading; I believe it's harmless elsewhere.
# The resetting of the environment variables to empty strings is for SCO Unix,
# which has limited environment space.
ldt_tr=$(PSOBJ)ldt.tr
+
+ifeq (omni,$(findstring omni,$(DEVS_ALL)))
+ LIBDLOPEN = $(shell glib-config --libs gmodule)
+ LIBCPP = -lstdc++
+ CCLD = gcc
+ ADDOMI = $(ECHOGS_XE) -a $(ldt_tr) -n - $(LIBDLOPEN) $(LIBCPP)
+else
+ ADDOMI = echo No OMNI
+endif
+
$(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
$(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE)
$(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) $(PSOBJ)gs.$(OBJ) -s
cat $(ld_tr) >>$(ldt_tr)
+ $(ADDOMI)
$(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS)
if [ x$(XLIBDIR) != x ]; then LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; fi; \
XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
@@ -62,4 +73,4 @@ $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL
DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \
DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \
DEVICE_DEVS_EXTRA= \
- $(SH) <$(ldt_tr)
+ $(SH) -x <$(ldt_tr)
--- contrib/contrib.mak
+++ contrib/contrib.mak 2009-06-16 12:48:29.000000000 +0000
@@ -35,6 +35,13 @@ CONTRIBSRC=$(CONTRIBDIR)$(D)
#
# Printers:
#
+# alc1900 EPSON AcuLaser C1900
+# alc2000 EPSON AcuLaser C2000
+# alc4000 EPSON AcuLaser C4000,C4000PS
+# alc4100 EPSON AcuLaser C4100
+# alc8500 EPSON AcuLaser C8500
+# alc8600 EPSON AcuLaser C8600
+# alc9100 EPSON AcuLaser C9100
# bj10v Canon BubbleJet BJ10v/BJ15v (japanese)
# bj10vh Canon BubbleJet BJ10v/BJ15v/BJ35v (japanese)
# bjc880j Canon Color BubbleJet BJC-880J (japanese)
@@ -53,8 +60,18 @@ CONTRIBSRC=$(CONTRIBDIR)$(D)
# cdnj500 HP DesignJet 500
# chp2200 HP Business Inkjet 2200
# dl2100 DEC DL2100
+# djet820c H-P DeskJet 820c, EXPERIMENTAL:
+# NO COLOR, HARDCODED PAPER SIZES (A4, letter)
# dmprt dot matrix printer driver for Ghostscript (it can use
# dviprt printer config files, japanese)
+# epl2050 EPSON Laser EPL-2050
+# epl2050p EPSON Laser EPL-2050+
+# epl2120 EPSON Laser EPL-2120
+# epl2500 EPSON Laser EPL-2500
+# epl2750 EPSON Laser EPL-2750
+# epl5800 EPSON Laser EPL-5800
+# epl5900 EPSON Laser EPL-5900
+# epl6100 EPSON Laser EPL-6100
# escpage Epson ESC/Page driver for Ghostscript (japanese)
# fmpr Fujitsu FMPR (japanese)
# fmlbp Fujitsu FMLBP2xx Page Printer (japanese)
@@ -100,7 +117,39 @@ CONTRIBSRC=$(CONTRIBDIR)$(D)
# lips2p Canon LIPS-II+ (japanese)
# lips4v Canon LIPS IV vector mode driver
# lips4 Canon LIPS IV raster mode driver
-# ln03 DEC LN03
+# ln03 DEC LN03
+# lp1800 EPSON LP-1800
+# lp1900 EPSON LP-1900
+# lp2200 EPSON LP-2200
+# lp2400 EPSON LP-2400
+# lp2500 EPSON LP-2500
+# lp3000c EPSON LP-3000c
+# lp7500 EPSON LP-7500
+# lp7700 EPSON LP-7700
+# lp7900 EPSON LP-7900
+# lp8000c EPSON LP-8000c
+# lp8100 EPSON LP-8100
+# lp8200c EPSON LP-8200c
+# lp8300c EPSON LP-8300c
+# lp8300f EPSON LP-8300f
+# lp8400f EPSON LP-8400f
+# lp8500c EPSON LP-8500c
+# lp8600 EPSON LP-8600
+# lp8600f EPSON LP-8600f
+# lp8700 EPSON LP-8700
+# lp8800c EPSON LP-8800c
+# lp8900 EPSON LP-8900
+# lp9000b EPSON LP-9000b
+# lp9000c EPSON LP-9000c
+# lp9100 EPSON LP-9100
+# lp9200b EPSON LP-9200b
+# lp9200c EPSON LP-9200c
+# lp9300 EPSON LP-9300
+# lp9400 EPSON LP-9400
+# lp9500c EPSON LP-9500c
+# lp9600 EPSON LP-9600
+# lp9600s EPSON LP-9600s
+# lp9800c EPSON LP-9800c
# lx5000 Lexmark 5000
# lxm3200 Lexmark 3200, Z31, Z12
# md1xMono Alps MD-1000/1300/1500 (monochrome mode, japanese)
@@ -126,16 +175,18 @@ CONTRIBSRC=$(CONTRIBDIR)$(D)
# samsunggdi Samsung's old driver for their SmartGDI laser printers:
# ML-4500, ML-2xx, ML-1xxx, ML-5080, ML-6040, ... and
# Lexmark E210, same as "gdi"
-# xes Xerox XES (2700, 3700, 4045, etc.)
+# stp STP driver -- Configurable Color ESC/P-, ESC/P2-,
+# HP-RTL/PCL mono/color driver
+# xes Xerox XES (2700, 3700, 4045, etc.)
#
# Fax systems:
#
-# None currently
+# bff Ferrari, electronic AG BFF fax format
#
# Other raster file formats and devices:
#
-# mag16 MAG file format (from Red Hat's japanese driver pack)
-# mag256 MAG file format (from Red Hat's japanese driver pack)
+# mag16 MAG file format
+# mag256 MAG file format
#
# Special features
#
@@ -176,6 +227,32 @@ $(DD)bjccmyk.dev : $(bjc_) $(DD)page.dev
$(DD)bjccolor.dev : $(bjc_) $(DD)page.dev
$(SETPDEV) $(DD)bjccolor $(bjc_)
+### ------------------------- DEC sixel displays ------------------------ ###
+
+# Author: Phil Keegstra (keegstra@tonga.gsfc.nasa.gov)
+# Device: DEC sixel displays
+# This is a "printer" device, but it probably shouldn't be.
+# I don't know why the implementor chose to do it this way.
+
+sxlcrt_=$(GLOBJ)gdevln03.$(OBJ)
+$(DD)sxlcrt.dev : $(sxlcrt_) $(DD)page.dev
+ $(SETPDEV) $(DD)sxlcrt $(sxlcrt_)
+
+### -------------------- Gimp-Print (stp) driver -------------------###
+
+# To include this driver add '$(DD)stp.dev' to your DEVICE_DEVS
+# line and define 'STPLIB=gimpprint' in your top-level makefile.
+# See http://gimp-print.sourceforge.net/ for more information.
+
+stp_=$(GLOBJ)gdevstp.$(OBJ)
+
+$(DD)stp.dev : $(stp_) $(DD)page.dev
+ $(SETPDEV) $(DD)stp $(stp_)
+ $(ADDMOD) $(DD)stp -lib $(STPLIB)
+
+$(GLOBJ)gdevstp.$(OBJ) : $(CONTRIBSRC)gdevstp.c \
+ $(gdevprn_h) $(gdevpccm_h) $(gsparam_h)
+ $(GLCC) $(I_)$(PSI_) $(I_)$(STPINC) $(GLO_)gdevstp.$(OBJ) $(C_) $(CONTRIBSRC)gdevstp.c
### -------------- cdj850 - HP 850c Driver under development ------------- ###
@@ -205,19 +282,42 @@ $(GLOBJ)gdevcd8.$(OBJ) : $(CONTRIBSRC)gd
$(gsparam_h) $(gxlum_h) $(gdevpcl_h)
$(GLCC) $(GLO_)gdevcd8.$(OBJ) $(C_) $(CONTRIBSRC)gdevcd8.c
+### -------------- chp2200 - HP Business Inkjet 2200 ------------- ###
+
+### NOTE: Depends on the presence of the cdj850 section.
+
+#$(DD)chp2200.dev : $(cdeskjet8_) $(DD)page.dev
+# $(SETPDEV2) $(DD)chp2200 $(cdeskjet8_)
+
### -------------- cdj880 - HP 880c Driver under development ------------- ###
### Since this driver is in the development phase it is not distributed ###
### with Ghostscript, but is available from ###
-### http://www.proaxis.com/~mgelhaus/linux/software/hp880c/hp880c.html ###
+### http://www.gelhaus.net/hp880c/ ###
+### http://hp.sourceforge.net/gs-hp2200.php ###
### NOTE: Depends on the presence of the cdj850 section above. ###
+cdeskjet8chp2200_=$(GLOBJ)gdevcd8-chp2200.$(OBJ) $(HPPCL)
+cdeskjet8cdj880_= $(GLOBJ)gdevcd8-cdj880.$(OBJ) $(HPPCL)
+
# Author: Matthew Gelhaus (mgelhaus@proaxis.com)
# Printer: HP 880c
-$(DD)cdj880.dev : $(cdeskjet8_) $(DD)page.dev
- $(SETPDEV2) $(DD)cdj880 $(cdeskjet8_)
+$(DD)cdj880.dev : $(cdeskjet8cdj880_) $(DD)page.dev
+ $(SETPDEV2) $(DD)cdj880 $(cdeskjet8cdj880_)
+# Author: Matthew J. Gelhaus (mgelhaus@proaxis.com)
+# Printer: HP Business Inkjet 2200
+$(DD)chp2200.dev : $(cdeskjet8chp2200_) $(DD)page.dev
+ $(SETPDEV) $(DD)chp2200 $(cdeskjet8chp2200_)
+
+$(GLOBJ)gdevcd8-chp2200.$(OBJ) : $(CONTRIBSRC)gdevcd8-chp2200.c $(PDEVH) \
+ $(math__h) $(gsparam_h) $(gxlum_h) $(gdevpcl_h)
+ $(GLCC) $(GLO_)gdevcd8-chp2200.$(OBJ) $(C_) $(CONTRIBSRC)gdevcd8-chp2200.c
+
+$(GLOBJ)gdevcd8-cdj880.$(OBJ) : $(CONTRIBSRC)gdevcd8-cdj880.c $(PDEVH) \
+ $(math__h) $(gsparam_h) $(gxlum_h) $(gdevpcl_h)
+ $(GLCC) $(GLO_)gdevcd8-cdj880.$(OBJ) $(C_) $(CONTRIBSRC)gdevcd8-cdj880.c
### ------------- cdj970 - HP 970Cxi Driver under development ------------- ###
@@ -241,14 +341,6 @@ $(DD)cdnj500.dev : $(cdeskjet8_) $(DD)pa
$(SETPDEV2) $(DD)cdnj500 $(cdeskjet8_)
-### -------------- chp2200 - HP Business Inkjet 2200 ------------- ###
-
-### NOTE: Depends on the presence of the cdj850 section.
-
-$(DD)chp2200.dev : $(cdeskjet8_) $(DD)page.dev
- $(SETPDEV2) $(DD)chp2200 $(cdeskjet8_)
-
-
### ---------------- The Samsung SmartGDI laser printer devices --------- ###
### Note : this driver is used by Samsung SmartGDI compatible printers. ###
###
@@ -523,7 +615,9 @@ $(GLOBJ)gdevlx50.$(OBJ) : $(CONTRIBSRC)g
$(GLCC) $(GLO_)gdevlx50.$(OBJ) $(C_) $(CONTRIBSRC)gdevlx50.c
-### ----------- Lexmark 3200 device ------------ ###
+### ----------- Lexmark 3200 device ------------------------------------ ###
+### by Daniel Gordini (dgordin@tin.it)
+### http://www.geocities.com/dgordini
lxm3200_=$(GLOBJ)gdevlx32.$(OBJ)
@@ -573,6 +667,9 @@ $(GLOBJ)gdevl4v.$(OBJ) : $(LIPS_SRC)gdev
$(DD)lips2p.dev : $(lipsr_) $(DD)page.dev
$(SETPDEV) $(DD)lips2p $(lipsr_)
+$(DD)lips3.dev: $(lipsr_) $(DD)page.dev
+ $(SETPDEV) $(DD)lips3 $(lipsr_)
+
$(DD)bjc880j.dev : $(lipsr_) $(DD)page.dev
$(SETPDEV) $(DD)bjc880j $(lipsr_)
@@ -589,6 +686,17 @@ $(DD)md5k.dev : $(md2k_) $(DD)page.dev
$(GLOBJ)gdevmd2k.$(OBJ) : $(CONTRIBSRC)gdevmd2k.c $(PDEVH) $(gsparam_h)
$(GLCC) $(GLO_)gdevmd2k.$(OBJ) $(C_) $(CONTRIBSRC)gdevmd2k.c
+
+
+### ----------------------------- bff files ------------------------------ ###
+
+bff_=$(GLOBJ)gdevbff.$(OBJ)
+
+$(DD)bff.dev : $(bff_)
+ $(SETPDEV) $(DD)bff $(bff_)
+
+$(GLOBJ)gdevbff.$(OBJ) : $(CONTRIBSRC)gdevbff.c $(PDEVH)
+ $(GLCC) $(GLO_)gdevbff.$(OBJ) $(C_) $(CONTRIBSRC)gdevbff.c
###--------------- IBM Omni Driver Framework --------------------------###
@@ -689,7 +797,7 @@ $(DD)oprp.dev : $(opvp_) $(DD)page.dev
###############################################################################
# Compilation options
-pcl3_options=
+pcl3_options=-DNDEBUG=1
eprn_fs_options=
# Version of the pcl3 rules: $Revision: 1.29 $.
@@ -854,7 +962,7 @@ pcl3opts_=$(pcl3_src)pcl3opts.c $(pcl3_s
$(pcl3_src)pclsize.c
$(BINDIR)$(D)pcl3opts$(XE): $(pcl3opts_)
- $(CC_) -o $@ -I$(eprn_src) $(pcl3opts_)
+ $(GLCC) -I$(eprn_src) -o $@ $(pcl3opts_)
gencat $(GLOBJ)pcl3opts-en.cat $(pcl3_src)pcl3opts-en.msg
#gencat $(GLOBJ)pcl3opts-de.cat $(pcl3_src)pcl3opts-de.msg
@@ -870,6 +978,121 @@ pcl3-install:
$(INSTALL_PROGRAM) $(BINDIR)$(D)pcl3opts$(XE) $(DESTDIR)$(bindir)
+### Driver for various printers understanding PCL 3+, mostly HP DeskJets ###
+#
+# The WWW home page for this driver is
+# ftp://ftp.sbs.de/pub/graphics/ghostscript/pcl3.html.
+#
+# The "hpdj" driver has several compile-time configuration options accessible
+# by preprocessor symbols. The first group is concerned with default values
+# and can be overridden at runtime:
+#
+# HPDJ_DEFAULT_COMPRESSION The default is 'pcl_cm_crdr' (of type
+# 'pcl_compression' defined in pclcomp.h), i.e.,
+# method 9.
+# HPDJ_DEFAULT_MODEL The default is 'hpdj_none' (of type 'Model'
+# defined in hpdj.h).
+# HPDJ_DEFAULT_RESOLUTION The default is '300' (pixels per inch).
+# HPDJ_MARGIN_FILE If defined, this must be a string giving the
+# path name of an existing margin description
+# file. The model 'unspec' will then not use the
+# margin descriptions for the DJ 850C as a default
+# but will instead read from this source.
+#
+# You can leave these values undefined, but if you have only one printer it is
+# certainly a good idea to set HPDJ_DEFAULT_MODEL. In that case you should
+# ensure that HPDJ_DEFAULT_COMPRESSION and HPDJ_DEFAULT_RESOLUTION are set to
+# values supported by the model chosen as HPDJ_DEFAULT_MODEL. This is apparently
+# only a problem for the DJ 500 where HPDJ_DEFAULT_COMPRESSION should be set to
+# 'pcl_cm_delta'.
+#
+# The following preprocessor symbols are more esoteric:
+#
+# HPDJ_MEDIASIZE Try defining this if the clipping should turn
+# out to be wrong when you are printing in
+# landscape orientation with future (> 5.50)
+# versions of ghostscript.
+# HPDJ_NO_PAGECOUNTFILE Define this if you don't want to have the
+# page count file feature of hpdj. I suspect that
+# you must define this on non-UNIX platforms.
+# If you do define this parameter you should also
+# remove "pagecount.$(OBJ)" from the variable
+# 'hpdj_' below unless you merely wish to insert
+# the calls into a more general part of
+# ghostscript.
+# HPDJ_PRINT_BLANK_ROWS If defined, the driver will not use the PCL
+# command Relative Vertical Pixel Movement within
+# a page. Try defining this if you think your
+# printer shows excessive head movements on pages
+# having vertical white space.
+#
+# Finally, a few symbols exist to adapt hpdj to older versions of ghostscript:
+#
+# HPDJ_INPUTMEDIA_PRN (non-zero for gs <= 5.10, see hpdjparm.c)
+# HPDJ_USEPAGESIZE (non-zero for gs < 3.46, see gdevhpdj.c)
+#
+# Unless you run into compilation problems, you can ignore these symbols
+# because hpdj should recognize ghostscript's version automatically.
+# If, however, you are using an hpdj diff to patch a different version of
+# ghostscript than the one it was intended for and if your gs version is older
+# than 4.51, you should modify the value for GS_REVISION in 'hpdj_opts' below
+# to accurately reflect your version.
+#
+# Here follow some examples. First a DeskJet 500:
+#
+# hpdj_options=-DHPDJ_DEFAULT_MODEL=hpdj500 \
+# -DHPDJ_DEFAULT_COMPRESSION=pcl_cm_delta
+#
+# A DeskJet 850C:
+#
+# hpdj_options=-DHPDJ_DEFAULT_MODEL=hpdj850c
+#
+# A newer PCL-3 printer using a margin file from ghostscript's usual data
+# directory:
+#
+# hpdj_options=-DHPDJ_DEFAULT_MODEL=hpdj_unspec \
+# -DHPDJ_MARGIN_FILE='"$(gsdatadir)/hpdj.mdf"'
+#
+###############################################################################
+
+# Compilation options
+hpdj_options= -DHPDJ_DEFAULT_MODEL=hpdj_unspec
+hpdj_opts=-DGS_REVISION=$(GS_REVISION) $(hpdj_options)
+
+# List of all object files needed for hpdj
+hpdj_=$(GLOBJ)gdevhpdj.$(OBJ) $(GLOBJ)hpdjdata.$(OBJ) $(GLOBJ)hpdjparm.$(OBJ) \
+ $(GLOBJ)hpdjprn.$(OBJ) $(GLOBJ)pclcomp.$(OBJ) $(GLOBJ)pagecount.$(OBJ)
+
+# Header file dependencies
+$(hpdj_): $(CONTRIBSRC)pclcomp.h $(CONTRIBSRC)hpdj.h $(PDEVH)
+$(DD)hpdj.dev: $(hpdj_) $(DD)page.dev
+ $(SETPDEV) $(DD)hpdj $(hpdj_)
+
+$(GLOBJ)gdevhpdj.$(OBJ): $(CONTRIBSRC)gdevhpdj.c
+ $(GLCC) $(C_) $(GLO_)gdevhpdj.$(OBJ) $(hpdj_opts) $(CONTRIBSRC)gdevhpdj.c
+
+$(GLOBJ)hpdjdata.$(OBJ): $(CONTRIBSRC)hpdjdata.c
+ $(GLCC) $(C_) $(GLO_)hpdjdata.$(OBJ) $(hpdj_opts) $(CONTRIBSRC)hpdjdata.c
+
+$(GLOBJ)hpdjparm.$(OBJ): $(CONTRIBSRC)hpdjparm.c
+ $(GLCC) $(C_) $(GLO_)hpdjparm.$(OBJ) $(hpdj_opts) $(CONTRIBSRC)hpdjparm.c
+
+$(GLOBJ)hpdjprn.$(OBJ): $(CONTRIBSRC)hpdjprn.c
+ $(GLCC) $(C_) $(GLO_)hpdjprn.$(OBJ) $(hpdj_opts) $(CONTRIBSRC)hpdjprn.c
+
+### -------------- djet820c - HP 820c experimental Driver -------------- ###
+### EXPERIMENTAL: NO COLOR, HARDCODED PAPER SIZES (A4, letter) ###
+### available via anonymous ftp from: ###
+### ftp://ftp.ig.utexas.edu/outgoing/scottk/820C/ ###
+
+$(GLOBJ)gdev820c.$(OBJ): $(CONTRIBSRC)gdev820c.c $(PDEVH)
+ $(GLCC) $(GLO_)gdev820c.$(OBJ) $(C_) $(CONTRIBSRC)gdev820c.c
+
+djet820c_=$(GLOBJ)gdev820c.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
+
+$(DD)djet820c.dev: $(djet820c_) $(DD)page.dev
+ $(SETDEV) $(DD)djet820c $(djet820c_)
+
### ----------------- The Xerox XES printer device --------------------- ###
xes_=$(GLOBJ)gdevxes.$(OBJ)
@@ -954,7 +1177,7 @@ $(DD)dmprt.dev : $(dmprt_) $(DD)page.dev
$(ADDMOD) $(DD)dmprt -ps dmp_init
$(GLOBJ)gdevdmpr.$(OBJ) : $(JAPSRC)gdevdmpr.c $(JAPSRC)dviprlib.h $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdevdmpr.c
+ $(GLCC) $(I_)$(PSI_) $(O_)$@ $(C_) $(JAPSRC)gdevdmpr.c
$(GLOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h
$(GLCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c
@@ -1105,6 +1328,45 @@ extra-upp-install:
$(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \
done
+### ------------ Install extra documentation --------------------------- ###
+
+extra-documentation:
+ -mkdir -p $(DESTDIR)$(install_prefix)$(docdir)/pcl3
+ cp $(CONTRIBSRC)/pcl3/NEWS $(CONTRIBSRC)/pcl3/NEWS.pcl3
+ cp $(CONTRIBSRC)/pcl3/README $(CONTRIBSRC)/pcl3/README.pcl3
+ for f in BUGS LGPL NEWS.pcl3 README.pcl3 doc/gs-pcl3.html \
+ doc/how-to-report.txt doc/reports.txt ps/margins-A4.ps \
+ ps/margins-A4Rotated.ps ps/margins-Letter.ps \
+ ps/margins-LetterRotated.ps ps/margins-Env10Rotated.ps \
+ ps/margins-EnvDLRotated.ps ps/levels-test.ps \
+ ps/dumppdd.ps ps/calign.ps ; \
+ do $(INSTALL_DATA) $(CONTRIBSRC)/pcl3/$$f $(DESTDIR)$(install_prefix)$(docdir)/pcl3/$${f##*/} ; \
+ done
+ tbl $(CONTRIBSRC)/pcl3/doc/gs-pcl3.1 | troff -Tlatin1 -t -mandoc | \
+ grotty -bou > $(DESTDIR)$(install_prefix)$(docdir)/pcl3/gs-pcl3.txt
+ -mkdir -p $(DESTDIR)$(install_prefix)$(docdir)/hpdj
+ for f in LGPL.txt NEWS.hpdj README.hpdj example.mdf gs-hpdj.ps \
+ hpdj.html margins-A4.ps margins-A4Rotated.ps \
+ margins-Letter.ps margins-LetterRotated.ps ; \
+ do $(INSTALL_DATA) hpdj/$$f $(DESTDIR)$(install_prefix)$(docdir)/hpdj/$$f ; \
+ done
+ tbl man/gs-hpdj.1 | troff -Tlatin1 -t -mandoc | \
+ grotty -bou > $(DESTDIR)$(install_prefix)$(docdir)/hpdj/gs-hpdj.txt
+ -mkdir -p $(DESTDIR)$(install_prefix)$(docdir)/stp
+ for f in stp/ChangeLog stp/src/ghost/README stp/src/ghost/COPYING \
+ stp/src/ghost/gs-stp.1 ; \
+ do $(INSTALL_DATA) $$f $(DESTDIR)$(install_prefix)$(docdir)/stp/`basename $$f` ; \
+ done
+
+extra-examples:
+ -mkdir -p $(DESTDIR)$(install_prefix)$(exdir)
+ for f in allkanji.ps article9.ps fmaptype.ps hankaku.ps \
+ vchars.ps vchars1.ps ; \
+ do test -e $(CONTRIBSRC)/examples/$$f || continue ; \
+ $(INSTALL_DATA) $(CONTRIBSRC)/examples/$$f $(DESTDIR)$(install_prefix)$(exdir) ; \
+ done
+
### ------------ Build/Install special features ------------ ###
-install-contrib-extras: extra-dmprt-install extra-upp-install
+install-contrib-extras: extra-dmprt-install extra-upp-install \
+ extra-documentation extra-examples
--- contrib/gdevcd8.c
+++ contrib/gdevcd8.c 2008-02-21 14:55:26.000000000 +0000
@@ -835,14 +835,14 @@ cdj_850_device(cdj850_procs, "cdj850", 6
1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
cdj850_start_raster_mode, cdj850_print_non_blank_lines,
cdj850_terminate_page);
-
+#if 0 /* given with gdevcd8-cdj880.c */
const gx_device_cdj850 gs_cdj880_device =
cdj_850_device(cdj880_procs, "cdj880", 600, 600, 32, cdj850_print_page, 0,
PRESENTATION, PLAIN_PAPER, 4, DJ880C, 2,
1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
cdj880_start_raster_mode, cdj880_print_non_blank_lines,
cdj880_terminate_page);
-
+#endif
const gx_device_cdj850 gs_cdj890_device =
cdj_850_device(cdj890_procs, "cdj890", 600, 600, 32, cdj850_print_page, 0,
PRESENTATION, PLAIN_PAPER, 4, DJ890C, 9,
@@ -856,7 +856,7 @@ cdj_1600_device(cdj1600_procs, "cdj1600"
1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
cdj1600_start_raster_mode, cdj1600_print_non_blank_lines,
cdj1600_terminate_page);
-
+#if 0 /* given with gdevcd8-chp2200.c */
/* HP2200 does not need color matching and halftoning parameters */
const gx_device_cdj850 gs_chp2200_device =
chp_2200_device(chp2200_procs, "chp2200", 300, 300, 24, chp2200_print_page, 0,
@@ -864,7 +864,7 @@ chp_2200_device(chp2200_procs, "chp2200"
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, /*all unused*/
chp2200_start_raster_mode, NULL /*unused*/,
chp2200_terminate_page);
-
+#endif
/* DNJ500 does not need color matching and halftoning parameters */
const gx_device_cdj850 gs_cdnj500_device =
chp_2200_device(chp2200_procs, "cdnj500", 300, 300, 24, cdnj500_print_page, 0,
--- contrib/gdevgdi.c
+++ contrib/gdevgdi.c 2008-02-21 14:55:26.000000000 +0000
@@ -243,7 +243,7 @@ gdi_print_page(gx_device_printer *pdev,
/*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;
+ /*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;*/
switch (compression_type) {
--- contrib/gomni.c
+++ contrib/gomni.c 2008-02-21 14:55:26.000000000 +0000
@@ -673,9 +673,9 @@ SetupDevice (gx_device *pgxdev, gs_param
static char cDialogName[] = "libomnijobdialog.so";
static const char *apszLibraryPaths[] = {
#if __WORDSIZE == 64
- "/usr/lib64/ghostscript/",
+ "/usr/lib64/ghostscript/Omni",
#else
- "/usr/lib/ghostscript/",
+ "/usr/lib/ghostscript/Omni",
#endif
"/usr/lib/Omni/",
"/opt/Omni/bin/",
--- cups/cups.mak
+++ cups/cups.mak 2010-09-28 13:24:38.567926031 +0000
@@ -29,13 +29,12 @@ CUPS_MAK=cups/cups.mak
cups_= $(GLOBJ)gdevcups.$(OBJ)
# These are set in the toplevel Makefile via autoconf(1)
-# CUPSCFLAGS=`cups-config --cflags`
-# CUPSSERVERBIN=`cups-config --serverbin`
-# CUPSSERVERROOT=`cups-config --serverroot`
-# CUPSDATA=`cups-config --datadir`
-# CUPSPDFTORASTER= 1 if CUPS is new enough (cups-config --version)
+# CUPSCFLAGS =$(shell cups-config --cflags)
+# CUPSSERVERBIN =$(shell cups-config --serverbin)
+# CUPSSERVERROOT=$(shell cups-config --serverroot)
+# CUPSDATA =$(shell cups-config --datadir)
-$(DD)cups.dev : $(CUPS_MAK) $(cups_) $(GLD)page.dev
+$(DD)cups.dev : $(CUPS_MAK) $(cups_) $(GLD)page.dev cups/pstoraster
$(SETPDEV2) $(DD)cups $(cups_)
$(ADDMOD) $(DD)cups -libpath $(CUPSLIBDIRS)
$(ADDMOD) $(DD)cups -lib $(CUPSLIBS)
@@ -50,11 +49,16 @@ pdftoraster: $(PDFTORASTER_XE)
pdftoraster_=cups/pdftoraster.c
$(PDFTORASTER_XE): $(pdftoraster_)
- if [ "$(CUPSPDFTORASTER)" = "1" ]; then \
- $(GLCC) $(LDFLAGS) -DBINDIR='"$(bindir)"' -DGS='"$(GS)"' -o $@ $(pdftoraster_) `cups-config --image --ldflags --libs`; \
- fi
+ $(GLCC) $(LDFLAGS) -DBINDIR='"$(bindir)"' -DGS='"$(GS)"' -o $@ $(pdftoraster_) `cups-config --image --ldflags --libs`
+
+cups/pstoraster: cups/pstoraster.in
+ sed -e 's|@prefix@|$(prefix)|' \
+ -e 's|@exec_prefix@|$(exec_prefix)|' \
+ -e 's|@bindir@|$(bindir)|' \
+ -e 's|@GS@|$(GS)|' < cups/pstoraster.in > cups/pstoraster
install: install-cups
+soinstall: install-cups
install-cups: cups
-mkdir -p $(DESTDIR)$(CUPSSERVERBIN)/filter
--- cups/pdftoraster.c
+++ cups/pdftoraster.c 2010-01-20 09:44:00.000000000 +0000
@@ -66,7 +66,7 @@ void parseOpts(int argc, char **argv)
if (argc < 6 || argc > 7) {
fprintf(stderr, "ERROR: %s job-id user title copies options [file]",
- argv[0]);
+ argv[0]);
exit(1);
}
--- doc/Deprecated.htm
+++ doc/Deprecated.htm 2008-02-21 14:55:26.000000000 +0000
@@ -1498,6 +1498,14 @@ changed with the <a href="Use.htm#Resolu
switch</a>.
</dl>
+dl>
+<dt><b><tt>PageSize</tt></b> (floats array)
+<dd> An array of 2 floats giving the width and height of the page size to
+use, in points. The bjc600 driver supports papers up to A4 and letter
+(max width 612 points, max height 842 points) and the bjc800 up to A3
+and 11x17 (max width 842 points, max height 1224 points).
+</dl>
+
<dl>
<dt><code>ManualFeed</code> (bool)
<dd>Indicate that the sheets won't be fed automatically by the printer,
--- ijs/Makefile.am
+++ ijs/Makefile.am 2008-02-21 14:55:26.000000000 +0000
@@ -62,11 +62,10 @@ else
libijs_la_LIBADD = ijs_exec_unix.lo $(IJS_DEPLIBS)
endif
# Uncommment to build an unversioned library (version in soname)
-libijs_la_LDFLAGS = -release $(IJS_VERSION) -rpath $(libdir)
+#libijs_la_LDFLAGS = -release $(IJS_VERSION) -rpath $(libdir)
# Uncomment to build a versioned library
-#libijs_la_LDFLAGS = \
-# -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-# -rpath $(libdir)
+libijs_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
ijs_client_example_SOURCES = ijs_client_example.c
--- jbig2dec/jbig2.h
+++ jbig2dec/jbig2.h 2008-02-21 14:55:26.000000000 +0000
@@ -20,6 +20,8 @@ extern "C" {
#ifndef _JBIG2_H
#define _JBIG2_H
+#include <stdint.h>
+
/* warning levels */
typedef enum {
JBIG2_SEVERITY_DEBUG,
--- lib/dumphint
+++ lib/dumphint 2010-09-28 13:19:55.771926311 +0000
@@ -27,4 +27,4 @@ if [ $# -ne 1 ]; then
exit 1
fi
-exec "$GS_EXECUTABLE" -q -dNODISPLAY $OPTIONS -- "`dirname \"$0\"`/dumphint.ps" "$1"
+exec "$GS_EXECUTABLE" -q -dNODISPLAY $OPTIONS -- "`dirname \"$0\"`/dumphint.ps" ${1+"$@"}
--- lib/pdf2dsc
+++ lib/pdf2dsc 2010-09-28 13:22:00.659926268 +0000
@@ -22,6 +22,16 @@ usage() {
exit 1
}
+OPTIONS=""
+while true
+do
+ case "$1" in
+ -?*) OPTIONS="${OPTIONS:+$OPTIONS }$1" ;;
+ *) break ;;
+ esac
+ shift
+done
+
if [ $# -gt 2 ]
then
usage
@@ -31,5 +41,5 @@ pdffile=$1
dscfile=$2
: ${dscfile:=`echo $pdffile | sed 's,\.[^/.]*,,'`.dsc}
-exec "$GS_EXECUTABLE" -q -dNODISPLAY -P- -dSAFER -dDELAYSAFER\
- -sPDFname="$pdffile" -sDSCname="$dscfile" pdf2dsc.ps -c quit
+exec "$GS_EXECUTABLE" -q -dNODISPLAY -P- -dSAFER -dDELAYSAFER $OPTIONS \
+ -sPDFname="$pdffile" -sDSCname="$dscfile" pdf2dsc.ps $OPTIONS -c quit
--- lib/pdf2ps
+++ lib/pdf2ps 2010-06-08 12:48:26.000000000 +0000
@@ -15,7 +15,7 @@ OPTIONS=""
while true
do
case "$1" in
- -?*) OPTIONS="$OPTIONS $1" ;;
+ -?*) OPTIONS="${OPTIONS:+$OPTIONS }$1" ;;
*) break ;;
esac
shift
--- lib/ps2epsi
+++ lib/ps2epsi 2008-02-21 14:55:26.000000000 +0000
@@ -10,14 +10,10 @@ if test ! -x "$gs"; then
fi
GS_EXECUTABLE="$gs"
-# try to create a temporary file securely
-if test -z "$TMPDIR"; then
- TMPDIR=/tmp
-fi
if which mktemp >/dev/null 2>/dev/null; then
- tmpfile="`mktemp $TMPDIR/ps2epsi.XXXXXX`"
+ tmpfile="`mktemp ${TMPDIR-/tmp}/ps2epsi.XXXXXX`"
else
- tmpdir=$TMPDIR/ps2epsi.$$
+ tmpdir=${TMPDIR-/tmp}/ps2epsi.$$
(umask 077 && mkdir "$tmpdir")
if test ! -d "$tmpdir"; then
echo "failed: could not create temporary file"
--- lib/ps2pdfwr
+++ lib/ps2pdfwr 2010-06-08 12:51:50.000000000 +0000
@@ -15,7 +15,7 @@ OPTIONS="-P- -dSAFER"
while true
do
case "$1" in
- -?*) OPTIONS="$OPTIONS $1" ;;
+ -?*) OPTIONS="${OPTIONS:+$OPTIONS }$1" ;;
*) break ;;
esac
shift
--- psi/iinit.c
+++ psi/iinit.c 2008-02-21 14:55:33.000000000 +0000
@@ -44,29 +44,29 @@
*/
/* The size of systemdict can be set in the makefile. */
#ifndef SYSTEMDICT_SIZE
-# define SYSTEMDICT_SIZE 631
+# define SYSTEMDICT_SIZE 1901
#endif
#ifndef SYSTEMDICT_LEVEL2_SIZE
-# define SYSTEMDICT_LEVEL2_SIZE 983
+# define SYSTEMDICT_LEVEL2_SIZE 2953
#endif
#ifndef SYSTEMDICT_LL3_SIZE
-# define SYSTEMDICT_LL3_SIZE 1123
+# define SYSTEMDICT_LL3_SIZE 3371
#endif
/* The size of level2dict, if applicable, can be set in the makefile. */
#ifndef LEVEL2DICT_SIZE
-# define LEVEL2DICT_SIZE 251
+# define LEVEL2DICT_SIZE 701
#endif
/* Ditto the size of ll3dict. */
#ifndef LL3DICT_SIZE
-# define LL3DICT_SIZE 43
+# define LL3DICT_SIZE 131
#endif
/* Ditto the size of filterdict. */
#ifndef FILTERDICT_SIZE
-# define FILTERDICT_SIZE 43
+# define FILTERDICT_SIZE 131
#endif
/* Define an arbitrary size for the operator procedure tables. */
#ifndef OP_ARRAY_TABLE_SIZE
-# define OP_ARRAY_TABLE_SIZE 300
+# define OP_ARRAY_TABLE_SIZE 547
#endif
#ifndef OP_ARRAY_TABLE_GLOBAL_SIZE
# define OP_ARRAY_TABLE_GLOBAL_SIZE OP_ARRAY_TABLE_SIZE
--- psi/imainarg.c
+++ psi/imainarg.c 2008-02-21 14:55:33.000000000 +0000
@@ -47,6 +47,10 @@
#include "iutil.h"
#include "ivmspace.h"
#include "vdtrace.h"
+#ifdef __linux__
+# include <unistd.h>
+ uid_t saveuid, savegid;
+#endif
/* Import operator procedures */
extern int zflush(i_ctx_t *);
@@ -124,6 +128,14 @@ gs_main_init_with_args(gs_main_instance
const char *arg;
arg_list args;
int code;
+#ifdef __linux__
+ /* save the priviliges */
+ saveuid=geteuid();
+ savegid=getegid();
+ /* and now drop them */
+ seteuid(getuid());
+ setegid(getgid());
+#endif
arg_init(&args, (const char **)argv, argc,
gs_main_arg_fopen, (void *)minst);
@@ -361,6 +373,19 @@ run_stdin:
if (code < 0)
return code;
pal->expand_ats = false;
+
+ if (arg[0]) {
+ char *sarg;
+
+ if (arg[0] == '@' || (arg[0] == '-' && !isdigit((unsigned char)arg[1])))
+ break;
+ sarg = arg_copy(arg, minst->heap);
+ if (sarg == NULL)
+ return e_Fatal;
+ code = runarg(minst, "", sarg, ".runstring", 0);
+ if (code < 0)
+ return code;
+ }
while ((arg = arg_next(pal, &code)) != 0) {
char *sarg;
--- psi/iminst.h
+++ psi/iminst.h 2008-02-21 14:55:33.000000000 +0000
@@ -82,7 +82,7 @@ struct gs_main_instance_s {
* must include gconfig.h, because of SEARCH_HERE_FIRST.
*/
#define gs_main_instance_default_init_values\
- 0, 20000, 0, 0, -1, 0, SEARCH_HERE_FIRST, 1
+ 0, (24<<10), 0, 0, -1, 0, SEARCH_HERE_FIRST, 1
extern const gs_main_instance gs_main_instance_init_values;
#endif /* iminst_INCLUDED */