[gs-cvs] rev 7971 - in trunk/gs: . contrib lib src
giles at ghostscript.com
giles at ghostscript.com
Mon May 14 08:22:31 PDT 2007
Author: giles
Date: 2007-05-14 08:22:29 -0700 (Mon, 14 May 2007)
New Revision: 7971
Removed:
trunk/gs/contrib/chp2200/
trunk/gs/contrib/contrib.mak
trunk/gs/contrib/defs.h
trunk/gs/contrib/eplaser/
trunk/gs/contrib/epson740/
trunk/gs/contrib/gdevbjc_.c
trunk/gs/contrib/gdevbjc_.h
trunk/gs/contrib/gdevbjca.c
trunk/gs/contrib/gdevcd8.c
trunk/gs/contrib/gdevcd8.h
trunk/gs/contrib/gdevdj9.c
trunk/gs/contrib/gdevgdi.c
trunk/gs/contrib/gdevhl12.c
trunk/gs/contrib/gdevln03.c
trunk/gs/contrib/gdevlx32.c
trunk/gs/contrib/gdevlx50.c
trunk/gs/contrib/gdevlx7.c
trunk/gs/contrib/gdevmd2k.c
trunk/gs/contrib/gdevop4w.c
trunk/gs/contrib/gdevxes.c
trunk/gs/contrib/gomni.c
trunk/gs/contrib/japanese/
trunk/gs/contrib/lips4/
trunk/gs/contrib/lxm3200-tweaked/
trunk/gs/contrib/md2k_md5k/
trunk/gs/contrib/opvp/
trunk/gs/contrib/pcl3/
trunk/gs/contrib/uniprint/
trunk/gs/cups/
Modified:
trunk/gs/lib/gs_init.ps
trunk/gs/lib/gs_setpd.ps
trunk/gs/src/Makefile.in
trunk/gs/src/configure.ac
trunk/gs/src/contrib.mak
trunk/gs/src/devs.mak
trunk/gs/src/gconf.c
trunk/gs/src/gdevcdj.c
trunk/gs/src/gdevdjet.c
trunk/gs/src/gdevdljm.c
trunk/gs/src/gdevdljm.h
trunk/gs/src/gdevl256.c
trunk/gs/src/gdevlbp8.c
trunk/gs/src/gdevlj56.c
trunk/gs/src/gdevpx.c
trunk/gs/src/gdevpxut.c
trunk/gs/src/gdevpxut.h
trunk/gs/src/gdevvglb.c
trunk/gs/src/gdevxalt.c
trunk/gs/src/gp_unix.c
trunk/gs/src/gs.mak
trunk/gs/src/lib.mak
trunk/gs/src/unix-aux.mak
trunk/gs/src/unix-gcc.mak
trunk/gs/src/unixinst.mak
Log:
Revert the gs-esp merge down, as there are still some build issues.
Deleted: trunk/gs/contrib/contrib.mak
===================================================================
--- trunk/gs/contrib/contrib.mak 2007-05-14 09:34:52 UTC (rev 7970)
+++ trunk/gs/contrib/contrib.mak 2007-05-14 15:22:29 UTC (rev 7971)
@@ -1,1095 +0,0 @@
-# $Id: contrib.mak,v 1.28 2002/10/16 23:26:33 giles Exp $
-
-# Makefile for device drivers which are not in the original GPL GhostScript
-# distributiion
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# Define the name of this makefile.
-CONTRIB_MAK=$(CONTRIBDIR)$(D)contrib.mak
-CONTRIBSRC=$(CONTRIBDIR)$(D)
-
-###### --------------------------- Catalog -------------------------- ######
-
-# The following drivers are user-contributed, and maintained (if at all) by
-# users. Please report problems in these drivers to their authors, whose
-# e-mail addresses appear below: do not report them to mailing lists or
-# mailboxes for general Ghostscript problems.
-
-# Displays:
-#
-# None currently
-#
-# Printers:
-#
-# bj10v Canon BubbleJet BJ10v/BJ15v (japanese)
-# bj10vh Canon BubbleJet BJ10v/BJ15v/BJ35v (japanese)
-# bjc880j Canon Color BubbleJet BJC-880J (japanese)
-# bjccolor Canon BJC-250, BJC-250ex, BJC-1000, ... Floyd-Steinberg
-# dithering
-# bjccmyk Canon BJC-250, BJC-250ex, BJC-1000, ... GhostScript
-# standard dithering
-# bjcgray Canon BJC-250, BJC-250ex, BJC-1000, ... Grayscale mode
-# bjcmono Canon BJC-250, BJC-250ex, BJC-1000, ... Monochrome mode
-# cdj1600 HP DeskJet 1600
-# cdj670 HP DeskJet 670
-# cdj850 HP DeskJet 850
-# cdj880 HP DeskJet 880
-# cdj890 HP DeskJet 890
-# cdj970 HP DeskJet 970
-# chp2200 HP Business Inkjet 2200
-# dl2100 DEC DL2100
-# dmprt dot matrix printer driver for Ghostscript (it can use
-# dviprt printer config files, japanese)
-# escpage Epson ESC/Page driver for Ghostscript (japanese)
-# fmpr Fujitsu FMPR (japanese)
-# fmlbp Fujitsu FMLBP2xx Page Printer (japanese)
-# gdi Samsung's old driver for their SmartGDI laser printers:
-# ML-4500, ML-2xx, ML-1xxx, ML-5080, ML-6040, ... and
-# Lexmark E210, same as "samsunggdi"
-# hl1240 Brother HL-1240 and compatible 600-dpi PCL-5 printers
-# hl1250 Brother HL-1250 and compatible 1200x600-dpi PCL-5 printers
-# hpdj1120c HP DeskJet 1120 ("pcl3" driver)
-# hpdj310 HP DeskJet 310 ("pcl3" driver)
-# hpdj320 HP DeskJet 320 ("pcl3" driver)
-# hpdj340 HP DeskJet 340 ("pcl3" driver)
-# hpdj400 HP DeskJet 400 ("pcl3" driver)
-# hpdj500 HP DeskJet 500 ("pcl3" driver)
-# hpdj500c HP DeskJet 500c ("pcl3" driver)
-# hpdj510 HP DeskJet 510 ("pcl3" driver)
-# hpdj520 HP DeskJet 520 ("pcl3" driver)
-# hpdj540 HP DeskJet 540 ("pcl3" driver)
-# hpdj550c HP DeskJet 550c ("pcl3" driver)
-# hpdj560c HP DeskJet 560c ("pcl3" driver)
-# hpdj600 HP DeskJet 600 ("pcl3" driver)
-# hpdj660c HP DeskJet 660c ("pcl3" driver)
-# hpdj670c HP DeskJet 670c ("pcl3" driver)
-# hpdj680c HP DeskJet 680c ("pcl3" driver)
-# hpdj690c HP DeskJet 690c ("pcl3" driver)
-# hpdj850c HP DeskJet 850c ("pcl3" driver)
-# hpdj855c HP DeskJet 855c ("pcl3" driver)
-# hpdj870c HP DeskJet 870c ("pcl3" driver)
-# hpdj890c HP DeskJet 890c ("pcl3" driver)
-# hpdjplus HP DeskJet Plus ("pcl3" driver)
-# hpdjportable HP DeskJet Portable ("pcl3" driver)
-# jj100 Star JJ-100 (japanese)
-# la50 DEC LA50
-# la70 DEC LA70
-# la75 DEC LA75
-# la75plus DEC LA75+
-# lbp310 Canon LBP-310 (japanese)
-# lbp320 Canon LBP-320 Pro/LBP-350 (japanese)
-# lex2050 Lexmark 2050
-# lex3200 Lexmark 3200
-# lex5700 Lexmark 5700
-# lex7000 Lexmark 7000, Lexmark IJ900, Compaq A900, Z51
-# lips2p Canon LIPS-II+ (japanese)
-# lips4v Canon LIPS IV vector mode driver
-# lips4 Canon LIPS IV raster mode driver
-# ln03 DEC LN03
-# lx5000 Lexmark 5000
-# lxm3200 Lexmark 3200, Z31, Z12
-# md1xMono Alps MD-1000/1300/1500 (monochrome mode, japanese)
-# md2k Alps MD-2000/2010/4000/1000/1300/1500
-# md50Mono Alps MD-5000, Oki DP-5000 (monochrome mode, japanese)
-# md50Eco Alps MD-5000, Oki DP-5000 (economy mode, japanese)
-# md5k Alps MD-5000, Oki DP-5000
-# mj500c Epson Stylus Color IIs, 200, 1500 (japanese)
-# mj700v2c Epson Stylus, Epson MachJet (japanese)
-# mj6000c Epson Stylus Color 400, 800, 1520 (japanese)
-# mj8000c Epson Stylus Color 3000 (japanese)
-# ml600 Okidata Microline 600CL/620CL (japanese)
-# npdl NEC MultiWriter, PC-PR1000/2000 (japanese)
-# oki4w Okidata OkiPage 4w+
-# opvp Gluecode for Vector Driver API
-# pcl3 PCL-3(+) printers: Many, especially older HP inkjets,
-# non-HP inkjets as Sharp AJ, Xerox DocuPrint, ...
-# pr1000 NEC PC-PR 1000 (japanese)
-# pr1000_4 NEC PC-PR 1000/4 (japanese)
-# pr150 NEC PC-PR 150 (japanese)
-# pr201 NEC PC-PR 201 (japanese)
-# rpdl Ricoh RPDL I/II/III/IV drver for Ghostscript (japanese)
-# 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.)
-#
-# Fax systems:
-#
-# None currently
-#
-# 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)
-#
-# Special features
-#
-# uniprint/: Some additional .upp files
-#
-
-# If you add drivers, it would be nice if you kept each list
-# in alphabetical order.
-
-###### ----------------------- End of catalog ----------------------- ######
-
-### ----------------- The BJC-210/240/250/250ex/265/1000 ---------------- ###
-
-###
-### For questions about the driver, mailto://szaszg@hu.inter.net
-### http://bjc250gs.sourceforge.net
-###
-
-bjc_h=$(CONTRIBSRC)gdevbjc_.h
-
-bjc_=$(GLOBJ)gdevbjc_.$(OBJ) $(GLOBJ)gdevbjca.$(OBJ)
-
-$(GLOBJ)gdevbjc_.$(OBJ) : $(CONTRIBSRC)gdevbjc_.c $(PDEVH) $(bjc_h)
- $(GLCC) $(GLO_)gdevbjc_.$(OBJ) $(C_) $(CONTRIBSRC)gdevbjc_.c
-
-$(GLOBJ)gdevbjca.$(OBJ) : $(CONTRIBSRC)gdevbjca.c $(PDEVH) $(bjc_h)
- $(GLCC) $(GLO_)gdevbjca.$(OBJ) $(C_) $(CONTRIBSRC)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_)
-
-
-### -------------- cdj850 - HP 850c Driver under development ------------- ###
-
-cdeskjet8_=$(GLOBJ)gdevcd8.$(OBJ) $(HPPCL)
-
-# Author: Uli Wortmann (uliw at erdw.ethz.ch), Martin Gerbershagen (ger at ulm.temic.de)
-# Printer: HP 670
-$(DD)cdj670.dev : $(cdeskjet8_) $(DD)page.dev
- $(SETPDEV2) $(DD)cdj670 $(cdeskjet8_)
-
-# Author: Uli Wortmann (uliw at erdw.ethz.ch)
-# Printer: HP 850
-$(DD)cdj850.dev : $(cdeskjet8_) $(DD)page.dev
- $(SETPDEV2) $(DD)cdj850 $(cdeskjet8_)
-
-# Author: Uli Wortmann (uliw at erdw.ethz.ch), Martin Gerbershagen (ger at ulm.temic.de)
-# Printer: HP 890
-$(DD)cdj890.dev : $(cdeskjet8_) $(DD)page.dev
- $(SETPDEV2) $(DD)cdj890 $(cdeskjet8_)
-
-# Author: Uli Wortmann (uliw at erdw.ethz.ch), Martin Gerbershagen (ger at ulm.temic.de)
-# Printer: HP 1600
-$(DD)cdj1600.dev : $(cdeskjet8_) $(DD)page.dev
- $(SETPDEV2) $(DD)cdj1600 $(cdeskjet8_)
-
-$(GLOBJ)gdevcd8.$(OBJ) : $(CONTRIBSRC)gdevcd8.c $(PDEVH) $(math__h)\
- $(gsparam_h) $(gxlum_h) $(gdevpcl_h)
- $(GLCC) $(GLO_)gdevcd8.$(OBJ) $(C_) $(CONTRIBSRC)gdevcd8.c
-
-
-### -------------- 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 ###
-
-### NOTE: Depends on the presence of the cdj850 section above. ###
-
-# Author: Matthew Gelhaus (mgelhaus at proaxis.com)
-# Printer: HP 880c
-$(DD)cdj880.dev : $(cdeskjet8_) $(DD)page.dev
- $(SETPDEV2) $(DD)cdj880 $(cdeskjet8_)
-
-
-### ------------- cdj970 - HP 970Cxi Driver under development ------------- ###
-
-cdeskjet9_=$(GLOBJ)gdevdj9.$(OBJ) $(HPPCL)
-
-# Author: Rene Harsch (rene at harsch.net)
-# Printer: HP 970Cxi
-$(DD)cdj970.dev : $(cdeskjet9_) $(DD)page.dev
- $(SETPDEV2) $(DD)cdj970 $(cdeskjet9_)
-
-$(GLOBJ)gdevdj9.$(OBJ) : $(CONTRIBSRC)gdevdj9.c $(PDEVH) $(math__h) $(string__h)\
- $(gsparam_h) $(gxlum_h) $(gdevpcl_h)
- $(GLCC) $(GLO_)gdevdj9.$(OBJ) $(C_) $(CONTRIBSRC)gdevdj9.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_)
-
-
-### ---------------- The Samsung SmartGDI laser printer devices --------- ###
-### Note : this driver is used by Samsung SmartGDI compatible printers. ###
-###
-
-GDIMONO=$(GLOBJ)gdevgdi.$(OBJ) $(HPPCL)
-
-$(DD)gdi.dev: $(GDIMONO) $(DD)page.dev
- $(SETPDEV) $(DD)gdi $(GDIMONO)
-
-$(DD)samsunggdi.dev: $(GDIMONO) $(DD)page.dev
- $(SETPDEV) $(DD)samsunggdi $(GDIMONO)
-
-$(GLOBJ)gdevgdi.$(OBJ): $(CONTRIBSRC)gdevgdi.c $(PDEVH) $(gdevpcl_h)
- $(GLCC) $(GLO_)gdevgdi.$(OBJ) $(C_) $(CONTRIBSRC)gdevgdi.c
-
-
-### ---------------- The Brother HL-1240/HL-1250 printers --------------- ###
-### These printers are 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 at linux.org.pl>
-# Printer: Brother HL-1250 (may work with some other models too)
-$(GLOBJ)gdevhl12.$(OBJ) : $(CONTRIBSRC)gdevhl12.c $(PDEVH) $(gdevdljm_h)
- $(GLCC) $(GLO_)gdevhl12.$(OBJ) $(C_) $(CONTRIBSRC)gdevhl12.c
-
-
-### -------- The DEC LN03/DL2100/LA50/LA70/LA75 printer devices -------- ###
-
-ln03_=$(GLOBJ)gdevln03.$(OBJ)
-
-# Author: Ulrich Mueller (ulm at vsnhd1.cern.ch)
-# Printer: DEC LN03
-$(DD)ln03.dev : $(ln03_) $(DD)page.dev
- $(SETPDEV) $(DD)ln03 $(ln03_)
-
-# Author: Nick Brown (nick.brown at coe.int)
-# Printer: DEClaser 2100
-$(DD)dl2100.dev : $(ln03_) $(DD)page.dev
- $(SETPDEV) $(DD)dl2100 $(ln03_)
-
-# Author: Ian MacPhedran (macphed at dvinci.USask.CA)
-# Printer: DEC LA50
-$(DD)la50.dev : $(ln03_) $(DD)page.dev
- $(SETPDEV) $(DD)la50 $(ln03_)
-
-# Author: Bruce Lowekamp (lowekamp at csugrad.cs.vt.edu)
-# Printer: DEC LA70
-$(DD)la70.dev : $(ln03_) $(DD)page.dev
- $(SETPDEV) $(DD)la70 $(ln03_)
-
-# Author: Ian MacPhedran (macphed at dvinci.USask.CA)
-# Printer: DEC LA75
-$(DD)la75.dev : $(ln03_) $(DD)page.dev
- $(SETPDEV) $(DD)la75 $(ln03_)
-
-# Author: Andre' Beck (Andre_Beck at IRS.Inf.TU-Dresden.de)
-# Printer: DEC LA75plus
-$(DD)la75plus.dev : $(ln03_) $(DD)page.dev
- $(SETPDEV) $(DD)la75plus $(ln03_)
-
-$(GLOBJ)gdevln03.$(OBJ) : $(CONTRIBSRC)gdevln03.c $(PDEVH)
- $(GLCC) $(GLO_)gdevln03.$(OBJ) $(C_) $(CONTRIBSRC)gdevln03.c
-
-
-### -------------------------- EPSON Page/Color -------------------------- ###
-###
-###
-
-ESCV_DIR=$(CONTRIBSRC)eplaser
-ESCV_SRC=$(ESCV_DIR)$(D)
-escv_opts=-DGS_VERSION_MAJOR=$(GS_VERSION_MAJOR)
-
-escv_=$(GLOBJ)gdevescv.$(OBJ)
-
-$(GLOBJ)gdevescv.$(OBJ): $(ESCV_SRC)gdevescv.c $(ESCV_SRC)gdevescv.h $(PDEVH)
- $(GLCC) -DA4 $(GLO_)gdevescv.$(OBJ) $(C_) $(escv_opts) $(ESCV_SRC)gdevescv.c
-
-$(DD)alc1900.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)alc1900 $(escv_)
-
-$(DD)alc2000.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)alc2000 $(escv_)
-
-$(DD)alc4000.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)alc4000 $(escv_)
-
-$(DD)alc4100.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)alc4100 $(escv_)
-
-$(DD)alc8500.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)alc8500 $(escv_)
-
-$(DD)alc8600.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)alc8600 $(escv_)
-
-$(DD)alc9100.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)alc9100 $(escv_)
-
-$(DD)lp3000c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp3000c $(escv_)
-
-$(DD)lp8000c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8000c $(escv_)
-
-$(DD)lp8200c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8200c $(escv_)
-
-$(DD)lp8300c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8300c $(escv_)
-
-$(DD)lp8500c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8500c $(escv_)
-
-$(DD)lp8800c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8800c $(escv_)
-
-$(DD)lp9000c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9000c $(escv_)
-
-$(DD)lp9200c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9200c $(escv_)
-
-$(DD)lp9500c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9500c $(escv_)
-
-$(DD)lp9800c.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9800c $(escv_)
-
-$(DD)lps6500.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lps6500 $(escv_)
-
-$(DD)epl2050.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl2050 $(escv_)
-
-$(DD)epl2050p.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl2050p $(escv_)
-
-$(DD)epl2120.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl2120 $(escv_)
-
-$(DD)epl2500.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl2500 $(escv_)
-
-$(DD)epl2750.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl2750 $(escv_)
-
-$(DD)epl5800.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl5800 $(escv_)
-
-$(DD)epl5900.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl5900 $(escv_)
-
-$(DD)epl6100.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl6100 $(escv_)
-
-$(DD)epl6200.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)epl6200 $(escv_)
-
-$(DD)lp1800.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp1800 $(escv_)
-
-$(DD)lp1900.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp1900 $(escv_)
-
-$(DD)lp2200.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp2200 $(escv_)
-
-$(DD)lp2400.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp2400 $(escv_)
-
-$(DD)lp2500.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp2500 $(escv_)
-
-$(DD)lp7500.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp7500 $(escv_)
-
-$(DD)lp7700.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp7700 $(escv_)
-
-$(DD)lp7900.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp7900 $(escv_)
-
-$(DD)lp8100.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8100 $(escv_)
-
-$(DD)lp8300f.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8300f $(escv_)
-
-$(DD)lp8400f.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8400f $(escv_)
-
-$(DD)lp8600.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8600 $(escv_)
-
-$(DD)lp8600f.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8600f $(escv_)
-
-$(DD)lp8700.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8700 $(escv_)
-
-$(DD)lp8900.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp8900 $(escv_)
-
-$(DD)lp9000b.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9000b $(escv_)
-
-$(DD)lp9100.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9100 $(escv_)
-
-$(DD)lp9200b.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9200b $(escv_)
-
-$(DD)lp9300.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9300 $(escv_)
-
-$(DD)lp9400.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9400 $(escv_)
-
-$(DD)lp9600.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9600 $(escv_)
-
-$(DD)lp9600s.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lp9600s $(escv_)
-
-$(DD)lps4500.dev: $(escv_) $(DD)page.dev
- $(SETPDEV) $(DD)lps4500 $(escv_)
-
-
-# ------ 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): $(CONTRIBSRC)gdevlx7.c $(PDEVH)
- $(GLCC) $(GLO_)gdevlx7.$(OBJ) $(C_) $(CONTRIBSRC)gdevlx7.c
-
-
-### ----------------- LexMark 5000 printer ----------------------------- ###
-### Note: this driver was contributed by users. Please contact: ###
-### Peter B. West <p.west at uq.net.au> ###
-
-lx5000_=$(GLOBJ)gdevlx50.$(OBJ)
-$(DD)lx5000.dev: $(lx5000_)
- $(SETPDEV) $(DD)lx5000 $(lx5000_)
-
-$(GLOBJ)gdevlx50.$(OBJ): $(CONTRIBSRC)gdevlx50.c $(PDEVH)
- $(GLCC) $(GLO_)gdevlx50.$(OBJ) $(C_) $(CONTRIBSRC)gdevlx50.c
-
-
-### ----------- Lexmark 3200 device ------------ ###
-
-lxm3200_=$(GLOBJ)gdevlx32.$(OBJ)
-
-$(GLOBJ)gdevlx32.$(OBJ): $(CONTRIBSRC)gdevlx32.c $(PDEVH) $(gsparam_h)
- $(GLCC) $(GLO_)gdevlx32.$(OBJ) $(C_) $(CONTRIBSRC)gdevlx32.c
-
-$(DD)lxm3200.dev: $(lxm3200_) $(DD)page.dev
- $(SETPDEV) $(DD)lxm3200 $(lxm3200_)
-
-
-### -------------- The Canon LIPS IV laser printer device -------------- ###
-### ###
-LIPS_DIR=$(CONTRIBSRC)lips4
-LIPS_SRC=$(LIPS_DIR)$(D)
-LIPS_OPT=-DGS_VERSION_MAJOR=$(GS_VERSION_MAJOR) $(I_) $(LIPS_SRC)
-
-$(GLOBJ)gdevlprn.$(OBJ): $(LIPS_SRC)gdevlprn.c $(LIPS_SRC)gdevlprn.h\
- $(gdevprn_h) $(PDEVH)
- $(GLCC) $(GLO_)gdevlprn.$(OBJ) $(LIPS_OPT) $(C_) $(LIPS_SRC)gdevlprn.c
-
-lipsr_=$(GLOBJ)gdevl4r.$(OBJ) $(GLOBJ)gdevlips.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ)
-
-$(GLOBJ)gdevl4r.$(OBJ): $(LIPS_SRC)gdevl4r.c $(LIPS_SRC)gdevlips.h $(PDEVH)
- $(GLCC) -DA4 $(GLO_)gdevl4r.$(OBJ) $(LIPS_OPT) $(C_)\
- $(LIPS_SRC)gdevl4r.c
-
-$(GLOBJ)gdevlips.$(OBJ): $(LIPS_SRC)gdevlips.c
- $(GLCC) $(GLO_)gdevlips.$(OBJ) $(LIPS_OPT) $(C_) $(LIPS_SRC)gdevlips.c
-
-$(DD)lips4.dev: $(lipsr_) $(DD)page.dev
- $(SETPDEV) $(DD)lips4 $(lipsr_)
-
-lipsv_=$(GLOBJ)gdevl4v.$(OBJ) $(GLOBJ)gdevlips.$(OBJ)
-
-$(DD)lips4v.dev: $(ECHOGS_XE) $(lipsv_) $(DD)vector.dev
- $(SETDEV) $(DD)lips4v $(lipsv_)
- $(ADDMOD) $(DD)lips4v -include $(GLD)vector
-
-$(GLOBJ)gdevl4v.$(OBJ): $(LIPS_SRC)gdevl4v.c $(LIPS_SRC)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) $(LIPS_OPT) $(C_)\
- $(LIPS_SRC)gdevl4v.c
-
-### --------------- Some extra devices: lips2p, bjc880j ---------------- ###
-
-$(DD)lips2p.dev: $(lipsr_) $(DD)page.dev
- $(SETPDEV) $(DD)lips2p $(lipsr_)
-
-$(DD)bjc880j.dev: $(lipsr_) $(DD)page.dev
- $(SETPDEV) $(DD)bjc880j $(lipsr_)
-
-
-### ------------ ALPS MD series printer devices ------------ ###
-
-md2k_=$(GLOBJ)gdevmd2k.$(OBJ)
-
-$(DD)md2k.dev: $(md2k_) $(DD)page.dev
- $(SETPDEV) $(DD)md2k $(md2k_)
-
-$(DD)md5k.dev: $(md2k_) $(DD)page.dev
- $(SETPDEV) $(DD)md5k $(md2k_)
-
-$(GLOBJ)gdevmd2k.$(OBJ): $(CONTRIBSRC)gdevmd2k.c $(PDEVH) $(gsparam_h)
- $(GLCC) $(GLO_)gdevmd2k.$(OBJ) $(C_) $(CONTRIBSRC)gdevmd2k.c
-
-
-###--------------- IBM Omni Driver Framework --------------------------###
-
-epclr_h1=$(CONTRIBSRC)defs.h
-
-$(DD)omni.dev : $(GLOBJ)gomni.$(OBJ) $(DD)page.dev
- $(SETPDEV) $(DD)omni $(GLOBJ)gomni.$(OBJ)
-
-$(GLOBJ)gomni.$(OBJ) : $(CONTRIBSRC)gomni.c $(epclr_h1) $(PDEVH)
- $(GLCC) $(GLO_)gomni.$(OBJ) $(C_) $(CONTRIBSRC)gomni.c
-
-### ----------------- The Okidata OkiPage 4w+ device ------------------- ###
-
-oki4w_=$(GLOBJ)gdevop4w.$(OBJ)
-$(DD)oki4w.dev : $(oki4w_) $(DD)page.dev
- $(SETPDEV) $(DD)oki4w $(oki4w_)
-
-# Author: Ivan Schreter (ivan at shadow.sk)
-# Printer: Okidata OkiPage 4w+
-$(GLOBJ)gdevop4w.$(OBJ) : $(CONTRIBSRC)gdevop4w.c $(PDEVH)
- $(GLCC) $(GLO_)gdevop4w.$(OBJ) $(C_) $(CONTRIBSRC)gdevop4w.c
-
-
-### ---------------- OpenPrinting Vector Printer Driver ---------------- ###
-### ###
-OPVP_DIR=$(CONTRIBSRC)opvp
-OPVP_SRC=$(OPVP_DIR)$(D)
-OPVP_OPT=-DGS_VERSION_MAJOR=$(GS_VERSION_MAJOR)
-
-opvp_=$(GLOBJ)gdevopvp.$(OBJ)
-
-$(GLOBJ)gdevopvp.$(OBJ) : $(OPVP_SRC)gdevopvp.c $(OPVP_SRC)opvp_common.h\
- $(PDEVH)
- $(GLCC) $(GLO_)gdevopvp.$(OBJ) $(OPVP_OPT) $(C_) $(OPVP_SRC)gdevopvp.c
-
-$(DD)opvp.dev : $(opvp_) $(DD)page.dev
- $(SETPDEV) $(DD)opvp $(opvp_)
-
-$(DD)oprp.dev : $(opvp_) $(DD)page.dev
- $(SETPDEV) $(DD)oprp $(opvp_)
-
-
-### Driver "pcl3" for various PCL-3+ printers #################################
-#
-# Author: Martin Lottermoser, Greifswaldstrasse 28, 38124 Braunschweig,
-# Germany, e-mail: Martin.Lottermoser at t-online.de.
-#
-# Read the file README in the pcl3 distribution for general installation
-# instructions. If you don't have a distribution, visit
-# http://home.t-online.de/home/Martin.Lottermoser/pcl3.html.
-#
-# If you are including both, hpdj and pcl3, in the compilation, you should
-# disable the rules for pclcomp.$(OBJ) and pagecount.$(OBJ) in the hpdj
-# section. The versions of these files contained in the pcl3 distribution are
-# binary compatible with what hpdj 2.6 expects.
-#
-# You can add compilation options to the variable "pcl3_options" below.
-#
-# NDEBUG
-# Define this to remove certain runtime checks from the code which might
-# then become slightly faster. Don't define this for pcl3 beta releases
-# or ghostscript test releases.
-#
-# PCL3_MEDIA_FILE
-# Define this to be a C string containing the absolute path name of a
-# media configuration file if you want the "unspec" subdevice to use this
-# file instead of its default HP DeskJet 850C/855C/870C/890C media
-# configuration. An example definition for UNIX systems is:
-#
-# pcl3_options=-DPCL3_MEDIA_FILE='"$(gsdatadir)/pcl3.mcf"'
-#
-# A detailed description of the meaning and the syntax of this file can
-# be found in the reference page gs-pcl3(1). Briefly, it tells the
-# driver which media sizes your printer supports and how. You can
-# override this at run time with the option "-sMediaConfigurationFile".
-#
-# The variable "eprn_fs_options" is intended for optimization options used only
-# when compiling eprnfs.c. Choose the combination producing the fastest code.
-# You should leave this variable empty unless (a) you definitely know which
-# options produce the fastest code from eprnfs.c, and (b) ghostscript does not
-# use the same options anyway.
-#
-# You should also look at the section below containing the rules for the *.dev
-# files in order to find out which values you can add to the DEVICE_DEVS*
-# variables in the platform-specific make file. You should always add at least
-# the "pcl3" device but you may add others; the latter are shortcuts to the
-# subdevices of pcl3.
-#
-#
-# Remarks for Microsoft Windows
-# =============================
-# When compiling on Microsoft Windows and unless you are using Cygwin, you must
-# define the preprocessor symbol "EPRN_NO_PAGECOUNTFILE" and either remove the
-# dependency of pcl3 on pagecount.obj or replace pagecount.c with an empty
-# file.
-#
-###############################################################################
-
-# Compilation options
-pcl3_options=
-eprn_fs_options=
-
-# Version of the pcl3 rules: $Revision: 1.29 $.
-
-#==============================================================================
-
-# eprn rules
-# This is the part you need if you are developing another eprn-based driver.
-
-# Complete set of compilation options
-eprn_opts=-DGS_REVISION=$(GS_REVISION) $(pcl3_options)
-
-# Directory with eprn's source code as seen from the gs directory. The name
-# does not include a trailing path separator.
-eprn_dir=$(CONTRIBSRC)pcl3$(D)eprn
-# Same as above but with a separator
-eprn_src=$(eprn_dir)$(D)
-
-# List of all eprn object files
-eprn_=$(GLOBJ)gdeveprn.$(OBJ) $(GLOBJ)pagecount.$(OBJ) \
- $(GLOBJ)mediasize.$(OBJ) $(GLOBJ)eprnparm.$(OBJ) $(GLOBJ)eprnrend.$(OBJ) \
- $(GLOBJ)eprnfs.$(OBJ)
-
-# List of eprn headers needed when gdeveprn.h is included:
-eprn_headers=$(eprn_src)mediasize.h $(eprn_src)gdeveprn.h
-
-#------------------------------------------------------------------------------
-
-# Rules for individual files
-
-$(GLOBJ)mediasize.$(OBJ): $(eprn_src)mediasize.c $(eprn_src)mediasize.h
- $(GLCC) $(C_) $(O_)$@ $(eprn_opts) $(eprn_src)mediasize.c
-
-$(GLOBJ)gdeveprn.$(OBJ): $(eprn_src)gdeveprn.c $(eprn_headers) \
- $(eprn_src)pagecount.h
- $(GLCC) $(C_) $(O_)$@ $(eprn_opts) $(eprn_src)gdeveprn.c
-
-$(GLOBJ)eprnparm.$(OBJ): $(eprn_src)eprnparm.c $(eprn_headers)
- $(GLCC) $(C_) $(O_)$@ $(eprn_opts) $(eprn_src)eprnparm.c
-
-$(GLOBJ)eprnrend.$(OBJ): $(eprn_src)eprnrend.c $(eprn_headers)
- $(GLCC) $(C_) $(O_)$@ $(eprn_opts) $(eprn_src)eprnrend.c
-
-$(GLOBJ)eprnfs.$(OBJ): $(eprn_src)eprnfs.c $(eprn_headers)
- $(GLCC) $(C_) $(O_)$@ $(eprn_opts) $(eprn_fs_options) \
- $(eprn_src)eprnfs.c
-
-# File also used by hpdj:
-$(GLOBJ)pagecount.$(OBJ): $(eprn_src)pagecount.c $(eprn_src)pagecount.h
- $(GLCC) $(C_) $(O_)$@ $(eprn_opts) $(eprn_src)pagecount.c
-
-#==============================================================================
-
-# pcl3 rules
-
-# Complete set of compilation options
-pcl3_opts=-DGS_REVISION=$(GS_REVISION) -I$(eprn_dir) $(pcl3_options)
-
-# Root directory of pcl3 distribution as seen from the gs directory. The
-# variable includes a trailing path separator.
-pcl3_root=$(CONTRIBSRC)pcl3$(D)
-
-# Directory with pcl3's source code (name includes a trailing path separator)
-pcl3_src=$(pcl3_root)src$(D)
-
-# Headers used by most pcl3 files
-pcl3_headers=$(eprn_headers) \
- $(pcl3_src)pclgen.h $(pcl3_src)pclcap.h $(pcl3_src)pclsize.h
-
-# List of all object files needed for pcl3
-pcl3_=$(eprn_) $(GLOBJ)gdevpcl3.$(OBJ) $(GLOBJ)pclcap.$(OBJ) \
- $(GLOBJ)pclgen.$(OBJ) $(GLOBJ)pclcomp.$(OBJ) $(GLOBJ)pclsize.$(OBJ)
-
-#------------------------------------------------------------------------------
-
-# Rules for individual files
-
-$(GLOBJ)pclgen.$(OBJ): $(pcl3_src)pclgen.c $(pcl3_src)pclgen.h
- $(GLCC) $(C_) $(O_)$@ $(pcl3_opts) $(pcl3_src)pclgen.c
-
-$(GLOBJ)pclsize.$(OBJ): $(pcl3_src)pclsize.c $(eprn_src)mediasize.h \
- $(pcl3_src)pclsize.h $(pcl3_src)pclgen.h
- $(GLCC) $(C_) $(O_)$@ $(pcl3_opts) $(pcl3_src)pclsize.c
-
-$(GLOBJ)pclcap.$(OBJ): $(pcl3_src)pclcap.c $(pcl3_headers)
- $(GLCC) $(C_) $(O_)$@ $(pcl3_opts) $(pcl3_src)pclcap.c
-
-$(GLOBJ)gdevpcl3.$(OBJ): $(pcl3_src)gdevpcl3.c $(pcl3_headers)
- $(GLCC) $(C_) $(O_)$@ $(pcl3_opts) $(pcl3_src)gdevpcl3.c
-
-# File also used by hpdj:
-$(GLOBJ)pclcomp.$(OBJ): $(pcl3_src)pclcomp.c $(pcl3_src)pclgen.h
- $(GLCC) $(C_) $(O_)$@ $(pcl3_opts) $(pcl3_src)pclcomp.c
-
-#------------------------------------------------------------------------------
-
-# Device rules. The targets here (e.g., "$(DD)pcl3.dev") are the values you
-# can add to the DEVICE_DEVS* variables in the platform-specific make file.
-
-# The generic pcl3 device with selectable subdevices
-$(DD)pcl3.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)pcl3 $(pcl3_)
-
-# Fixed devices for specific printers
-$(DD)hpdjplus.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdjplus $(pcl3_)
-$(DD)hpdjportable.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdjportable $(pcl3_)
-$(DD)hpdj310.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj310 $(pcl3_)
-$(DD)hpdj320.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj320 $(pcl3_)
-$(DD)hpdj340.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj340 $(pcl3_)
-$(DD)hpdj400.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj400 $(pcl3_)
-$(DD)hpdj500.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj500 $(pcl3_)
-$(DD)hpdj500c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj500c $(pcl3_)
-$(DD)hpdj510.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj510 $(pcl3_)
-$(DD)hpdj520.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj520 $(pcl3_)
-$(DD)hpdj540.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj540 $(pcl3_)
-$(DD)hpdj550c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj550c $(pcl3_)
-$(DD)hpdj560c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj560c $(pcl3_)
-$(DD)hpdj600.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj600 $(pcl3_)
-$(DD)hpdj660c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj660c $(pcl3_)
-$(DD)hpdj670c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj670c $(pcl3_)
-$(DD)hpdj680c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj680c $(pcl3_)
-$(DD)hpdj690c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj690c $(pcl3_)
-$(DD)hpdj850c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj850c $(pcl3_)
-$(DD)hpdj855c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj855c $(pcl3_)
-$(DD)hpdj870c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj870c $(pcl3_)
-$(DD)hpdj890c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj890c $(pcl3_)
-$(DD)hpdj1120c.dev: $(pcl3_) $(DD)page.dev
- $(SETPDEV) $(DD)hpdj1120c $(pcl3_)
-
-#------------------------------------------------------------------------------
-
-# The pcl3opts command.
-# This is deliberately not included in the normal compilation because (a) the
-# rule is unlikely to work and (b) the code is unlikely to compile on any but
-# UNIX systems.
-
-pcl3opts: $(BINDIR)$(D)pcl3opts$(XE)
-pcl3opts_=$(pcl3_src)pcl3opts.c $(pcl3_src)pclscan.c $(eprn_src)mediasize.c \
- $(pcl3_src)pclsize.c
-
-$(BINDIR)$(D)pcl3opts$(XE): $(pcl3opts_)
- $(CC_) -o $@ -I$(eprn_src) $(pcl3opts_)
- gencat $(GLOBJ)pcl3opts-en.cat $(pcl3_src)pcl3opts-en.msg
- #gencat $(GLOBJ)pcl3opts-de.cat $(pcl3_src)pcl3opts-de.msg
-
-#------------------------------------------------------------------------------
-
-# Installation rules (work only for UNIX). Note that the PostScript examples
-# and the PPD files are not copied.
-pcl3-install:
- for f in gs-pcl3 pcl3opts; do \
- $(INSTALL_DATA) $(pcl3_root)doc$(D)$$f.1 $(install_prefix)$(man1dir)/$$f.$(man1ext) \
- || exit 1; \
- $(INSTALL_DATA) $(pcl3_root)doc$(D)$$f.html $(install_prefix)$(docdir) || exit 1; done
- $(INSTALL_PROGRAM) $(BINDIR)$(D)pcl3opts$(XE) $(install_prefix)$(bindir)
-
-
-### ----------------- The Xerox XES printer device --------------------- ###
-
-xes_=$(GLOBJ)gdevxes.$(OBJ)
-$(DD)xes.dev : $(xes_) $(DD)page.dev
- $(SETPDEV) $(DD)xes $(xes_)
-
-# Author: Peter Flass (flass at lbdrscs.bitnet)
-# Printer: Xerox XES (2700, 3700, 4045, etc.)
-$(GLOBJ)gdevxes.$(OBJ) : $(CONTRIBSRC)gdevxes.c $(PDEVH)
- $(GLCC) $(GLO_)gdevxes.$(OBJ) $(C_) $(CONTRIBSRC)gdevxes.c
-
-#########################################################################
-### --------------------Japanese printer addons --------------------- ###
-#########################################################################
-
-JAPDIR=$(CONTRIBSRC)japanese
-JAPSRC=$(JAPDIR)$(D)
-
-### ----------------- The NEC PC-PR201 printer device ----------------- ###
-
-pr201_=$(GLOBJ)gdevp201.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-
-$(DD)pr201.dev: $(pr201_)
- $(SETPDEV) $(DD)pr201 $(pr201_)
-
-$(DD)pr150.dev: $(pr201_)
- $(SETPDEV) $(DD)pr150 $(pr201_)
-
-$(DD)pr1000.dev: $(pr201_)
- $(SETPDEV) $(DD)pr1000 $(pr201_)
-
-$(DD)pr1000_4.dev: $(pr201_)
- $(SETPDEV) $(DD)pr1000_4 $(pr201_)
-
-$(GLO_)gdevp201.$(OBJ): $(JAPSRC)gdevp201.c $(PDEVH)
- $(GLCC) $(GLO_)gdevp201.$(OBJ) $(C_) $(JAPSRC)gdevp201.c
-
-### ----------------- The Star JJ-100 printer device ----------------- ###
-
-jj100_=$(GLOBJ)gdevj100.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-
-$(DD)jj100.dev: $(jj100_)
- $(SETPDEV) $(DD)jj100 $(jj100_)
-
-$(GLOBJ)gdevj100.$(OBJ): $(JAPSRC)gdevj100.c $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdevj100.c
-
-### ----------------- The Canon BubbleJet BJ10v device ----------------- ###
-
-bj10v_=$(GLOBJ)gdev10v.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-
-$(DD)bj10v.dev: $(bj10v_)
- $(SETPDEV) $(DD)bj10v $(bj10v_)
-
-$(DD)bj10vh.dev: $(bj10v_)
- $(SETPDEV) $(DD)bj10vh $(bj10v_)
-
-# Uncomment the following line if you are using MS-DOS on PC9801 series.
-
-$(GLOBJ)gdev10v.$(OBJ): $(JAPSRC)gdev10v.c $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdev10v.c
-# $(GLCC) -DPC9801 $(O_)$@ $(C_) $(JAPSRC)gdev10v.c
-
-
-### ------------------------- MAG file formats ------------------------- ###
-
-maguro_=$(GLOBJ)gdevmag.$(OBJ) $(GLOBJ)gdevpccm.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-$(GLOBJ)gdevmag.$(OBJ): $(JAPSRC)gdevmag.c $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdevmag.c
-
-$(DD)mag16.dev: $(maguro_)
- $(SETDEV) $(DD)mag16 $(maguro_)
-
-$(DD)mag256.dev: $(maguro_)
- $(SETDEV) $(DD)mag256 $(maguro_)
-
-### ---------------- Dot matrix printer device ---------------- ###
-dmprt_=$(GLOBJ)gdevdmpr.$(OBJ) $(GLOBJ)dviprlib.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-
-$(DD)dmprt.dev: $(dmprt_) $(DD)page.dev
- $(SETDEV) $(DD)dmprt $(dmprt_)
- $(ADDMOD) $(DD)dmprt -ps dmp_init
-
-$(GLOBJ)gdevdmpr.$(OBJ): $(JAPSRC)gdevdmpr.c $(JAPSRC)dviprlib.h $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdevdmpr.c
-
-$(GLOBJ)dviprlib.$(OBJ): $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c
-
-extra-dmprt-install:
- $(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(install_prefix)$(gsdatadir)$(D)lib || exit 1
- $(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(install_prefix)$(gsdatadir)$(D)lib || exit 1
- $(INSTALL_DATA) $(JAPSRC)escp_24.src $(install_prefix)$(gsdatadir)$(D)lib || exit 1
-
-
-
-##
-## EPSON MachJet driver
-##
-
-mj700v2c_=$(GLOBJ)gdevmjc.$(OBJ) $(HPPCL)
-
-$(GLOBJ)gdevmjc.$(OBJ): $(JAPSRC)gdevmjc.c $(JAPSRC)gdevmjc.h $(PDEVH) $(gdevpcl_h)
- $(GLCC) -DA4 $(GLO_)gdevmjc.$(OBJ) $(C_) $(JAPSRC)gdevmjc.c
-
-$(DD)mj700v2c.dev: $(mj700v2c_) $(DD)page.dev
- $(SETPDEV) $(DD)mj700v2c $(mj700v2c_)
-
-$(DD)mj500c.dev: $(mj700v2c_) $(DD)page.dev
- $(SETPDEV) $(DD)mj500c $(mj700v2c_)
-
-$(DD)mj6000c.dev: $(mj700v2c_) $(DD)page.dev
- $(SETPDEV) $(DD)mj6000c $(mj700v2c_)
-
-$(DD)mj8000c.dev: $(mj700v2c_) $(DD)page.dev
- $(SETPDEV) $(DD)mj8000c $(mj700v2c_)
-
-### ----------------- The Fujitsu FMPR printer device ----------------- ###
-
-fmpr_=$(GLOBJ)gdevfmpr.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-
-$(DD)fmpr.dev: $(fmpr_) $(DD)page.dev
- $(SETPDEV) $(DD)fmpr $(fmpr_)
-
-$(GLOBJ)gdevfmpr.$(OBJ): $(JAPSRC)gdevfmpr.c $(PDEVH)
- $(GLCC) $(GLO_)gdevfmpr.$(OBJ) $(C_) $(JAPSRC)gdevfmpr.c
-
-### --------------- The Fujitsu FMLBP-2xx printer device --------------- ###
-
-fmlbp_=$(GLOBJ)gdevfmlbp.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-
-$(DD)fmlbp.dev: $(fmlbp_) $(DD)page.dev
- $(SETPDEV) $(DD)fmlbp $(fmlbp_)
-
-$(GLOBJ)gdevfmlbp.$(OBJ): $(JAPSRC)gdevfmlbp.c $(PDEVH)
- $(GLCC) -DFMLBP_NOADJUST_MARGIN $(O_)$@ $(C_) $(JAPSRC)gdevfmlbp.c
-
-### ------ The OKI MICROLINE620CL (IPL) printer device ------- ###
-#
-# by N.Tagawa
-#
-# $Id: gdevml6.mak,v 1.2 1998/03/16 13:32:33 tagawa Exp $
-#
-
-ml6_=$(GLOBJ)gdevml6.$(OBJ) $(GLOBJ)gdevprn.$(OBJ)
-
-$(DD)ml600.dev: $(ml6_) $(DD)page.dev
- $(SETPDEV) $(DD)ml600 $(ml6_)
-
-$(GLOBJ)gdevml6.$(OBJ): $(JAPSRC)gdevml6.c $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdevml6.c
-
-
-#----------------------------------------------------------------------#
-
-lbp3x0_=$(GLOBJ)gdevlbp3.$(OBJ)
-
-$(DD)lbp310.dev:$(lbp3x0_) $(DD)page.dev
- $(SETPDEV) $(DD)lbp310 $(lbp3x0_)
-
-$(DD)lbp320.dev:$(lbp3x0_) $(DD)page.dev
- $(SETPDEV) $(DD)lbp320 $(lbp3x0_)
-
-$(GLOBJ)gdevlbp3.$(OBJ): $(JAPSRC)gdevlbp3.c $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdevlbp3.c
-
-### --- The NEC NPDL language printer device ------ ###
-
-npdl_=$(GLOBJ)gdevnpdl.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ)
-
-$(GLOBJ)gdevnpdl.$(OBJ): $(JAPSRC)gdevnpdl.c $(LIPS_SRC)gdevlprn.h $(PDEVH)
- $(GLCC) -DA4 $(GLO_)gdevnpdl.$(OBJ) $(LIPS_OPT) $(C_) $(JAPSRC)gdevnpdl.c
-
-$(DD)npdl.dev: $(npdl_) $(DD)page.dev
- $(SETPDEV) $(DD)npdl $(npdl_)
-
-### ------- EPSON ESC/Page printer device ----------------- ###
-
-escpage_=$(GLOBJ)gdevespg.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ) $(GLOBJ)gdevlips.$(OBJ)
-
-$(GLOBJ)gdevespg.$(OBJ): $(JAPSRC)gdevespg.c $(LIPS_SRC)gdevlprn.h $(PDEVH)
- $(GLCC) -DA4 $(GLO_)gdevespg.$(OBJ) $(LIPS_OPT) $(C_) $(JAPSRC)gdevespg.c
-
-$(DD)escpage.dev: $(escpage_) $(DD)page.dev
- $(SETPDEV) $(DD)escpage $(escpage_)
-
-$(DD)lp2000.dev: $(escpage_) $(DD)page.dev
- $(SETPDEV) $(DD)lp2000 $(escpage_)
-
-### --- The RICOH RPDL language printer device ------ ###
-
-rpdl_=$(GLOBJ)gdevrpdl.$(OBJ) $(GLOBJ)gdevlprn.$(OBJ)
-$(GLOBJ)gdevrpdl.$(OBJ): $(JAPSRC)gdevrpdl.c $(LIPS_SRC)gdevlprn.h $(PDEVH)
- $(GLCC) $(GLO_)gdevrpdl.$(OBJ) $(LIPS_OPT) $(C_) $(JAPSRC)gdevrpdl.c
-
-$(DD)rpdl.dev: $(rpdl_) $(DD)page.dev
- $(SETPDEV) $(DD)rpdl $(rpdl_)
-
-### ---------- RICOH RPDL IV(600dpi) printer devices ---------- ###
-#rpdl_=$(GLOBJ)gdevrpdl.$(OBJ)
-#$(GLOBJ)gdevrpdl.$(OBJ) : $(JAPSRC)gdevrpdl.c
-# $(GLCC) $(GLO_)gdevrpdl.$(OBJ) $(C_) $(JAPSRC)gdevrpdl.c
-#
-#$(DD)nx100f.dev: $(rpdl_) $(DD)page.dev
-# $(SETPDEV2) $(DD)nx100f $(rpdl_)
-#
-#$(DD)nx100v.dev: $(rpdl_) $(DD)page.dev
-# $(SETPDEV2) $(DD)nx100v $(rpdl_)
-
-### ------------ The ALPS Micro Dry printer devices ------------ ###
-
-alps_=$(GLOBJ)gdevalps.$(OBJ)
-
-$(DD)md50Mono.dev: $(alps_) $(DD)page.dev
- $(SETPDEV) $(DD)md50Mono $(alps_)
-
-$(DD)md50Eco.dev: $(alps_) $(DD)page.dev
- $(SETPDEV) $(DD)md50Eco $(alps_)
-
-$(DD)md1xMono.dev: $(alps_) $(DD)page.dev
- $(SETPDEV) $(DD)md1xMono $(alps_)
-
-$(GLOBJ)gdevalps.$(OBJ): $(JAPSRC)gdevalps.c $(PDEVH)
- $(GLCC) $(O_)$@ $(C_) $(JAPSRC)gdevalps.c
-
-#########################################################################
-#########################################################################
-
-### ----------------- Additional .upp files ---------------- ###
-
-extra-upp-install:
- for f in $(CONTRIBSRC)uniprint$(D)*.upp; do \
- $(INSTALL_DATA) $$f $(install_prefix)$(gsdatadir)$(D)lib || exit 1; \
- done
-
-### ------------ Build/Install special features ------------ ###
-
-install-contrib-extras: extra-dmprt-install extra-upp-install
Deleted: trunk/gs/contrib/defs.h
===================================================================
--- trunk/gs/contrib/defs.h 2007-05-14 09:34:52 UTC (rev 7970)
+++ trunk/gs/contrib/defs.h 2007-05-14 15:22:29 UTC (rev 7971)
@@ -1,327 +0,0 @@
-/*******************************************************************************/
-/* */
-/* FILE: defs.h */
-/* */
-/* Header file to satisfy defines for gomni.c .*/
-/* */
-/* */
-/* Created: 03-21-2000 */
-/* */
-/* */
-/* */
-/*******************************************************************************/
-/*
- * IBM Omni driver
- * Copyright (c) International Business Machines Corp., 2000
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Portions of this file are used with permission granted by Aladdin
- * Enterprises
- *
- */
-
-#define APIENTRY
-#define LOCAL
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
-typedef unsigned char BYTE;
-
-typedef unsigned char *PBYTE;
-
-typedef int INT;
-typedef unsigned int UINT;
-
-typedef INT *PINT;
-
-typedef INT BOOL;
-typedef BOOL *PBOOL;
-typedef unsigned short WORD;
-typedef unsigned long DWORD;
-
-typedef char CHAR;
-typedef unsigned char UCHAR;
-typedef short SHORT;
-typedef SHORT *PSHORT;
-typedef unsigned short USHORT;
-typedef USHORT *PUSHORT;
-typedef long LONG;
-typedef LONG *PLONG;
-typedef unsigned long ULONG;
-typedef ULONG *PULONG;
-typedef unsigned long HFILE;
-typedef HFILE *PHFILE;
-
-typedef void VOID;
-typedef VOID *PVOID;
-typedef PVOID *PPVOID;
-
-typedef struct _SIZEL /* sizl */
-{
- LONG cx;
- LONG cy;
-} SIZEL;
-typedef SIZEL *PSIZEL;
-
-
-typedef struct _POINTL {
- LONG x;
- LONG y;
-} POINTL;
-typedef POINTL *PPOINTL;
-
-typedef struct _RECTL { /* rcl */
- LONG xLeft;
- LONG yBottom;
- LONG xRight;
- LONG yTop;
-} RECTL;
-typedef RECTL *PRECTL;
-
-typedef struct _RGB { /* rgb */
- BYTE bBlue;
- BYTE bGreen;
- BYTE bRed;
-} RGB;
-/* typedef RGB *PRGB; */
-
-typedef LONG APIRET;
-
-/* Extract high and low order parts of 16 and 32 bit quantity */
-#define LOBYTE(w) LOUCHAR(w)
-#define HIBYTE(w) HIUCHAR(w)
-#define LOUCHAR(w) ((UCHAR)(w))
-#define HIUCHAR(w) ((UCHAR)(((USHORT)(w) >> 8) & 0xff))
-#define LOUSHORT(l) ((USHORT)((ULONG)l))
-#define HIUSHORT(l) ((USHORT)(((ULONG)(l) >> 16) & 0xffff))
-
-
-#define CLR_FALSE (-5L)
-#define CLR_TRUE (-4L)
-
-#define CLR_ERROR (-255L)
-#define CLR_DEFAULT (-3L)
-#define CLR_WHITE (-2L)
-#define CLR_BLACK (-1L)
-#define CLR_BACKGROUND 0L
-#define CLR_BLUE 1L
-#define CLR_RED 2L
-#define CLR_PINK 3L
-#define CLR_GREEN 4L
-#define CLR_CYAN 5L
-#define CLR_YELLOW 6L
-#define CLR_NEUTRAL 7L
-
-#define CLR_DARKGRAY 8L
-#define CLR_DARKBLUE 9L
-#define CLR_DARKRED 10L
-#define CLR_DARKPINK 11L
-#define CLR_DARKGREEN 12L
-#define CLR_DARKCYAN 13L
-#define CLR_BROWN 14L
-#define CLR_PALEGRAY 15L
-
-/* rgb colors */
-#define RGB_ERROR (-255L)
-#define RGB_BLACK 0x00000000L
-#define RGB_BLUE 0x000000FFL
-#define RGB_GREEN 0x0000FF00L
-#define RGB_CYAN 0x0000FFFFL
-#define RGB_RED 0x00FF0000L
-#define RGB_PINK 0x00FF00FFL
-#define RGB_YELLOW 0x00FFFF00L
-#define RGB_WHITE 0x00FFFFFFL
-
-
-
-#define BMAP_MEMORY 0x00000001
-
-/* bitmap parameterization used by GpiCreateBitmap and others */
-typedef struct _BITMAPINFOHEADER /* bmp */
-{
- ULONG cbFix;
- USHORT cx;
- USHORT cy;
- USHORT cPlanes;
- USHORT cBitCount;
-} BITMAPINFOHEADER;
-typedef BITMAPINFOHEADER *PBITMAPINFOHEADER;
-
-
-typedef struct _BMAPINFO /* bmapinfo */
-{
- ULONG ulLength;
- ULONG ulType;
- ULONG ulWidth;
- ULONG ulHeight;
- ULONG ulBpp;
- ULONG ulBytesPerLine;
- PBYTE pBits;
-} BMAPINFO;
-typedef BMAPINFO *PBMAPINFO;
-
-typedef struct _BITMAPINFOHEADER2 /* bmp2 */
-{
- ULONG cbFix; /* Length of structure */
- ULONG cx; /* Bit-map width in pels */
- ULONG cy; /* Bit-map height in pels */
- USHORT cPlanes; /* Number of bit planes */
- USHORT cBitCount; /* Number of bits per pel within a plane */
- ULONG ulCompression; /* Compression scheme used to store the bitmap */
- ULONG cbImage; /* Length of bit-map storage data in bytes*/
- ULONG cxResolution; /* x resolution of target device */
- ULONG cyResolution; /* y resolution of target device */
- ULONG cclrUsed; /* Number of color indices used */
- ULONG cclrImportant; /* Number of important color indices */
- USHORT usUnits; /* Units of measure */
- USHORT usReserved; /* Reserved */
- USHORT usRecording; /* Recording algorithm */
- USHORT usRendering; /* Halftoning algorithm */
- ULONG cSize1; /* Size value 1 */
- ULONG cSize2; /* Size value 2 */
- ULONG ulColorEncoding; /* Color encoding */
- ULONG ulIdentifier; /* Reserved for application use */
-} BITMAPINFOHEADER2;
-typedef BITMAPINFOHEADER2 *PBITMAPINFOHEADER2;
-
-typedef struct _RGB2 /* rgb2 */
-{
- BYTE bBlue; /* Blue component of the color definition */
- BYTE bGreen; /* Green component of the color definition*/
- BYTE bRed; /* Red component of the color definition */
- BYTE fcOptions; /* Reserved, must be zero */
-} RGB2;
-typedef RGB2 *PRGB2;
-
-typedef struct _BITMAPINFO2 /* bmi2 */
-{
- int cbFix;
- int cx;
- int cy;
- int cPlanes;
- int cBitCount;
- int ulCompresstion;
- int cclrUsed;
- int cclrImportant;
- RGB2 argbColor[1];
-} BITMAPINFO2;
-typedef BITMAPINFO2 *PBITMAPINFO2;
-
-
-/******************************************************************************/
-/* PPOINTL pptlSrc; // src left, bottom, width and height. */
-/* PPOINTL pptlDst; // dst left, bottom, width and height. */
-/* ULONG ulSrcBytesPerLine; // src bytes per line */
-/* PBYTE pbSrcBits; // pointer to src image data */
-/* ULONG ulTrgBytesPerLine; // dst bytes per line */
-/* PBYTE pbTrgBits; // pointer to dst image data */
-/* ULONG ulOptions; // options */
-/* ULONG ulcClrs; // count of colors in rgb2 table */
-/* PRGB2 pargb2; // rgb2 table */
-/******************************************************************************/
-
-typedef struct _IMAGEINFOS /* imginfo */
-{
- PPOINTL pptlSrc;
- PPOINTL pptlDst;
- ULONG ulSrcBpp;
- ULONG ulSrcBytesPerLine;
- PBYTE pbSrcBits;
- ULONG ulcSrcClrs;
- ULONG ulSrcClrType;
- PRGB2 pargb2Src;
- ULONG ulTrgBpp;
- ULONG ulTrgBytesPerLine;
- PBYTE pbTrgBits;
- ULONG ulcTrgClrs;
- ULONG ulTrgClrType;
- PRGB2 pargb2Trg;
- ULONG ulOptions;
- ULONG ulPelSizeCorrection;
-} IMAGEINFOS;
-typedef IMAGEINFOS * PIMAGEINFO; /* pimginfo */
-
-#define GDM_NO_DITHER 0x0000 /* No dithering in system */
-#define GDM_USERDEF_DITHER 0x0001 /* Users supplies own Dithering routines */
-#define GDM_MATRIX_DITHER 0x0002 /* Use System ordered dithering */
-#define GDM_ERRORDIF_DITHER 0x0004 /* Use System error diffusion dithering */
-#define GDM_DITHER_BEGIN 0x0008 /* Use System Floyd-Steinberg dithering */
-#define GDM_DITHER_END 0x0010 /* Use System error propigation dithering */
-#define GDM_COLOR_CONVERT 0x0020 /* use device's clr mapping functions */
-
-
-/*******************************************************************************************/
-/* ULONG ulLength; // length of structure - 88 */
-/* ULONG ulType; // type of dither info structure - GDM_MATRIX_DITHER*/
-/* ULONG fOptions; // dither info options - DI_MONOINVERT - 00 */
-/* ULONG ulIntensity; // RGB Gama Correction Value - 00 */
-/* BYTE bRedWt; // weight of primary color red - 25 */
-/* BYTE bGreenWt; // weight of primary color green - 60 */
-/* BYTE bBlueWt; // weight of primary color blue - 15 */
-/* BYTE bPad; // 4 byte align - 00 */
-/* SIZEL szMatrix; // halftone pattern size - 8 */
-/* BYTE bHalftone[]; // array of halftone patterns - see 32gdata.c */
-/*******************************************************************************************/
-
-typedef struct _MATRIXDITHERINFO /* mtrxdi */
-{
- ULONG ulLength;
- ULONG ulType;
- ULONG fOptions;
- ULONG ulIntensity;
- BYTE bRedWt;
- BYTE bGreenWt;
- BYTE bBlueWt;
- BYTE bPad;
- SIZEL szMatrix;
- BYTE bHalftone[1];
-} MATRIXDITHERINFO;
-typedef MATRIXDITHERINFO *PMDI; /* pmtrxdi */
-
-#define STUCKI_DIF 0x01
-#define JJN_DIF 0x02
-#define RND_DIF 0x04
-#define USER_DIF 0x08
-
-typedef struct _DIFFUSIONDITHERINFO /* difdi */
-{
- ULONG ulLength;
- ULONG ulType; /* Stucki, user defined, etc. */
- ULONG fOptions;
- ULONG ulIntensity;
- BYTE bRedWt;
- BYTE bGreenWt;
- BYTE bBlueWt;
- BYTE bPad;
- PBYTE pBuffer;
- SIZEL szFilter;
- BYTE bFilterArry[1];
-
-} DIFFUSIONDITHERINFO;
-typedef DIFFUSIONDITHERINFO *PDDI; /* pdifdi */
-
-/* bitblt type */
-typedef enum {
- BITBLT_BITMAP,
- BITBLT_AREA,
- BITBLT_TEXT
-} BITBLT_TYPE;
Deleted: trunk/gs/contrib/gdevbjc_.c
===================================================================
--- trunk/gs/contrib/gdevbjc_.c 2007-05-14 09:34:52 UTC (rev 7970)
+++ trunk/gs/contrib/gdevbjc_.c 2007-05-14 15:22:29 UTC (rev 7971)
@@ -1,953 +0,0 @@
-/* BJC-210/240/250/265/1000 Bubble Jet Printer driver for GhostScript
- * main subroutines for GS
- *
- * Copyright 2000, 2001, 2002 Gergely Szász (Gergely Sza'sz)
- * mailto://szaszg@hu.inter.net http://bjc250gs.sourceforge.net
- *
- * This program may be distributed and/or modified under the terms of
- * the GNU General Public License as published by the Free Software
- * Foundation (the "GPL"); either version 2 of the GPL, or (at your option)
- * any later version.
- *
- * When distributed under the terms of the GPL, this program is distributed
- * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GPL for more details.
- *
- * If this program is being distributed under the terms of the GPL, you
- * should have received a copy of the GPL along with this program, normally
- * in a plain ASCII text file named COPYING; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111
- * U.S.A.
- */
-
-/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved.
-
- This program may also be distributed as part of AFPL Ghostscript, under the
- terms of the Aladdin Free Public License (the "License").
-
- AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No
- author or distributor accepts any responsibility for the consequences of
- using it, or for whether it serves any particular purpose or works at
- all, unless he or she says so in writing. Refer to the License for full
- details.
-
- Every copy of AFPL Ghostscript must include a copy of the License,
- normally in a plain ASCII text file named PUBLIC. The License grants you
- the right to copy, modify and redistribute AFPL Ghostscript, but only
- under certain conditions described in the License. Among other things,
- the License requires that the copyright notice and this notice be
- preserved on all copies.
-*/
-
-/* BJC printers drivers */
-#include "gdevprn.h"
-#include "gsparam.h"
-#include "gdevbjc_.h"
-
-/* ------ The device descriptors ------ */
-private dev_proc_print_page(bjc_print_page);
-private dev_proc_print_page(bjc_print_page_mono);
-private dev_proc_print_page(bjc_print_page_gray);
-private dev_proc_print_page(bjc_print_page_cmyk);
-private dev_proc_print_page(bjc_print_page_color);
-private dev_proc_put_params(gdev_bjc_put_params);
-private dev_proc_get_params(gdev_bjc_get_params);
-const stringParamDescription *
- paramValueToParam(const stringParamDescription *, int);
-const stringParamDescription *
- paramStringToParam(const stringParamDescription *, const char *, uint);
-
-BJL_command BJL_command_set[] = {
- { "@Cleaning=1", BJC_BJL_CLEANING, 11},
- { "@PowerOff", BJC_BJL_POWER_OFF, 9},
- { "@RollerCleaning", BJC_BJL_ROCLEANING, 15},
- { "@TestPrint=NozzleCheck", BJC_BJL_NOZZLECHK, 22},
- { "@TestPrint=A", BJC_BJL_TESTA, 12},
- { "@TestPrint=B", BJC_BJL_TESTB, 12},
- { "@TestPrint=C", BJC_BJL_TESTC, 12},
- { "@TestPrint=DemoPrint", BJC_BJL_DEMO, 20},
-
-#define BJL_CMC_AP "ControlMode=Common\012AutoPower" /*+28*/
-
- { BJL_CMC_AP "On=Enable", BJC_BJL_ON_ENABLE, 37},
- { BJL_CMC_AP "On=Disable", BJC_BJL_ON_DISABLE, 38},
- { BJL_CMC_AP "Off=1", BJC_BJL_OFF_1MIN, 33},
- { BJL_CMC_AP "Off=10", BJC_BJL_OFF_10MIN, 34},
- { BJL_CMC_AP "Off=30", BJC_BJL_OFF_30MIN, 34},
- { BJL_CMC_AP "Off=60", BJC_BJL_OFF_60MIN, 34},
- { BJL_CMC_AP "Off=Disable", BJC_BJL_OFF_DISABLE, 39},
- { NULL }
-};
-
-
-/* String parameter definitions */
-
-stringParamDescription strPrinterType[] = {
- { { "BJC-250", 7, false }, 0 },
- { { "BJC-250ex", 9, false }, 1 },
- { { "BJC-1000", 8, false }, 2 },
-
- { { "250", 3, false }, 0 },
- { { "250ex", 5, false }, 1 },
- { { "1000", 4, false }, 2 },
- { {0} }
-};
-
-stringParamDescription strFeeder[] = {
- { { "Manual", 6, false }, 0x11 },
- { { "Auto", 4, false }, 0x10 },
-
- { { "m", 1, false }, 0x11 },
- { { "a", 1, false }, 0x10 },
- { {0} }
-};
-
-stringParamDescription strQuality[] = {
- { { "Normal", 6, false }, 0 },
- { { "High", 4, false }, 1 },
- { { "Draft", 5, false }, 2 },
- { { "NonBleed", 8, false }, 8 },
-
- { { "n", 1, false }, 0 },
- { { "h", 1, false }, 1 },
- { { "d", 1, false }, 2 },
- { { "b", 1, false }, 8 },
- { {0} }
-};
-
-stringParamDescription strInk[] = {
- { { "Black", 5, false }, 8 },
- { { "Cyan", 4, false }, 1 },
- { { "Magenta", 7, false }, 2 },
- { { "Yellow", 6, false }, 4 },
- { { "Red", 3, false }, 6 },
- { { "Green", 5, false }, 5 },
- { { "Blue", 4, false }, 3 },
-
- { { "K", 1, false }, 8 },
- { { "C", 1, false }, 1 },
- { { "M", 1, false }, 2 },
- { { "Y", 1, false }, 4 },
- { { "R", 1, false }, 6 },
- { { "G", 1, false }, 5 },
- { { "B", 1, false }, 3 },
- { { "CK", 2, false }, 9 },
- { { "MK", 2, false }, 10 },
- { { "YK", 2, false }, 12 },
- { { "RK", 2, false }, 14 },
- { { "GK", 2, false }, 13 },
- { { "BK", 2, false }, 11 },
- { { "CMY", 3, false }, 7 },
- { { "CMYK", 4, false }, 15 },
- { {0} }
-};
-
-private stringParamDescription strMedia[] = {
- {{"PlainPaper", 10, false}, 0},
- {{"CoatedPaper", 11, false}, 1},
- {{"TransparencyFilm", 16, false}, 2},
- {{"BackprintFilm", 13, false}, 3},
- {{"T-ShirtTransfer", 15, false}, 3},
- {{"FabricSheet", 11, false}, 4},
- {{"GlossyPaper", 11, false}, 5},
- {{"GlossyPhotoPaper", 16, false}, 5},
- {{"HighGlossPaper", 14, false}, 5},
- {{"HighGlossyFilm", 14, false}, 6},
- {{"Envelope", 8, false}, 7},
- {{"OtherPaper", 10, false}, 8},
- {{"HighResolutionPaper", 19, false}, 9},
-/* { { "HighResPaper", 12, false }, 11 }, */
- {{"GlossyPhotoCard", 15, false}, 10},
-/* { { "FullBleed", 9, false }, 12 }, */
- {{"Banner", 6, false}, 11},
-
- {{"Plain", 5, false}, 0},
- {{"Coated", 6, false}, 1},
- {{"Trans", 5, false}, 2},
- {{"Back", 4, false}, 3},
- {{"Shirt", 4, false}, 3},
-/* { { "Lead", 4, false }, 4 }, */
- {{"Fabric", 6, false}, 4},
- {{"Glossy", 6, false}, 5},
- {{"HGloss", 6, false}, 6},
- {{"Env", 3, false}, 7},
- {{"Oth", 3, false}, 8},
- {{"HiRes", 5, false}, 9},
-/* { { "Bleed", 5, false }, 12 }, */
- {{"Card", 4, false}, 10},
- {{"Ban", 3, false}, 11},
-
- {{"p", 1, false}, 0},
- {{"c", 1, false}, 1},
- {{"t", 1, false}, 2},
- {{"b", 1, false}, 3},
- {{"s", 1, false}, 3},
- {{"f", 1, false}, 4},
- {{"g", 1, false}, 5},
- {{"F", 1, false}, 6},
- {{"e", 1, false}, 7},
- {{"o", 1, false}, 8},
- {{"h", 1, false}, 9},
- {{"C", 1, false}, 10},
- {{"B", 1, false}, 11},
- {{0}}
-};
-
-static media_t media_codes[] = {
- {0x00, 0x00}, /* Plain paper */
- {0x10, 0x10}, /* Coated paper */
- {0x20, 0x20}, /* Transp */
- {0x30, 0x30}, /* Backprint or T-shirt */
- {0x50, 0x40}, /* Fabric */
- {0x60, 0x50}, /* Glossy (Photo) Paper */
- {0x70, 0x60}, /* High gloss film */
- {0x80, 0x00}, /* Envelope */
- {0x90, 0x10}, /* Other */
- {0xb0, 0x70}, /* Hi Res */
- {0xc0, 0x50}, /* Glossy Photo Cards */
- {0xd0, 0x00}, /* Banner */
-};
-
-/***************************************************************************/
-/* ------------------------- 1 bit Monochrome ---------------------------- */
-/***************************************************************************/
-
-private const gx_device_procs bjcmono_procs =
-prn_color_params_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
- NULL, NULL,
- gdev_bjc_get_params, gdev_bjc_put_params);
-
-const gx_device_bjc_printer gs_bjcmono_device =
-bjc_device(bjcmono_procs, "bjcmono",
- DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
- X_DPI, Y_DPI,
- (3.4 / 25.4), (7.0 / 25.4), (3.4 / 25.4), (3.0 / 25.4),
- 1, /* num components */
- 1, /* depth */
- 1, /* max gray */
- 0, /* max color */
- 2, /* dither gray */
- 0, /* dither color */
- bjc_print_page_mono, INK_K); /* printer rutin, default ink */
-
-
-/***************************************************************************/
-/* -------------------------- 8 bit Grayscale ---------------------------- */
-/***************************************************************************/
-
-private const gx_device_procs bjcgray_procs =
-prn_color_params_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
- gx_default_gray_map_rgb_color, gx_default_gray_map_color_rgb,
- gdev_bjc_get_params, gdev_bjc_put_params);
-
-const gx_device_bjc_printer gs_bjcgray_device =
-bjc_device(bjcgray_procs, "bjcgray",
- DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
- X_DPI, Y_DPI,
- (3.4 / 25.4), (7.0 / 25.4), (3.4 / 25.4), (3.0 / 25.4),
- 1, /* num components */
- 8, /* depth */
- 255, /* max gray */
- 0, /* max color */
- 256, /* dither gray */
- 0, /* dither color */
- bjc_print_page_gray, INK_K);
-
-
-/***************************************************************************/
-/* --------------------------- 3 bit CMYK Color -------------------------- */
-/***************************************************************************/
-
-
-
-private const gx_device_procs bjc_cmykcolor_procs =
-bjc_cmyk_param_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
- cmyk_1bit_map_color_rgb, cmyk_1bit_map_cmyk_color,
- gdev_bjc_get_params, gdev_bjc_put_params);
-
-const gx_device_bjc_printer gs_bjccmyk_device =
-bjc_device(bjc_cmykcolor_procs, "bjccmyk",
- DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
- X_DPI, Y_DPI,
- (3.4 / 25.4), (7.0 / 25.4), (3.4 / 25.4), (3.0 / 25.4),
- 4, /* num components */
- 4, /* depth */
- 1, /* max gray */
- 1, /* max color */
- 2, /* dither gray */
- 2, /* dither color */
- bjc_print_page_cmyk, (INK_K|INK_C|INK_M|INK_Y));
-
-
-/***************************************************************************/
-/* --------------------------- 24 bit TrueColor -------------------------- */
-/***************************************************************************/
-
-
-
-private const gx_device_procs bjc_truecolor_procs =
-bjc_cmyk_param_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
- cmyk_8bit_map_color_rgb, cmyk_8bit_map_cmyk_color,
- gdev_bjc_get_params, gdev_bjc_put_params);
-
-const gx_device_bjc_printer gs_bjccolor_device =
-bjc_device(bjc_truecolor_procs, "bjccolor",
- DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
- X_DPI, Y_DPI,
- (3.4 / 25.4), (7.0 / 25.4), (3.4 / 25.4), (3.0 / 25.4),
- 4, /* num components */
- 32, /* depth */
- 255, /* max gray */
- 255, /* max color */
- 256, /* dither gray */
- 256, /* dither color */
- bjc_print_page_color, (INK_K|INK_C|INK_M|INK_Y));
-
-
-/***************************************************************************/
-/* ---------------------------Print a page routine------------------------ */
-/***************************************************************************/
-
-/*
-private int
-bjc_print_page(gx_device_printer * pdev, FILE * file)
-{
-#define ppdev ((gx_device_bjc_printer *) pdev)
-#define prdev ((gx_device_printer *) pdev)
-
- uint raster = gdev_prn_raster(pdev);
- uint bjc_raster = raster + (-raster & 3);
- byte *row = gs_alloc_bytes(pdev->memory, bjc_raster, "bjc file buffer");
- int y;
- int code;
- char alma[512];
-
- sprintf(alma, "\nNumC: %d, Depth: %d, Mgray: %d, Mrgb: %d\n"
- "Dgray: %d, Drgb: %d", pdev->color_info.num_components,
- pdev->color_info.depth,
- pdev->color_info.max_gray,
- pdev->color_info.max_color,
- pdev->color_info.dither_grays,
- pdev->color_info.dither_colors
- );
-
- if (row == 0)
- return_error(gs_error_VMerror);
-
-
-done:
- gs_free_object(pdev->memory, row, "bjc file buffer");
-
-
- fwrite((const char *) alma, 512, 1, file);
- return code;
-
-#undef ppdev
-}
-*/
-
-void
-bjc_put_bjl_command(FILE * file, int bjl_command)
-{
- BJL_command *command = BJL_command_set;
- for( ; command->string; command++)
- if(command->numeric == bjl_command) break;
- if(command->string) {
- fwrite((const char *)"\033[K\002\000\000\037BJLSTART\012", 16, 1, file);
- fwrite(command->string, command->length, 1, file);
- fwrite((const char *)"\012BJLEND\012", 8, 1, file); }
-}
-
-
-/* ------ Get/put parameters ------ */
-
-
-/* Functions for manipulation params strings */
-
-const stringParamDescription *
-paramValueToParam(const stringParamDescription * params, int value)
-{
-
- for (; params->p_string.data; ++params) {
- if (params->p_value == value) {
- return params;
- }
- }
-
- return (stringParamDescription *) NULL;
-}
-
-const stringParamDescription *
-paramStringToParam(const stringParamDescription * params,
- const char * name, uint len)
-{
- for (; params->p_string.data; ++params) {
- if (len == params->p_string.size)
- if (!(strncmp((const char *)params->p_string.data,
- name, len))) {
- return params;
- }
- }
-
- return (stringParamDescription *) NULL;
-}
-
-
-/* Get parameters. BJC printer devices add several more parameters */
-/* to the default set. */
-private int
-gdev_bjc_get_params(gx_device * pdev, gs_param_list * plist)
-{
- const gx_device_bjc_printer * ppdev = (gx_device_bjc_printer *)pdev;
-
- int code = gdev_prn_get_params(pdev, plist);
- if (code < 0 ||
- (code = param_write_string(plist, "PrinterType",
- ¶mValueToParam(strPrinterType, ppdev->printerType)->p_string)) < 0 ||
- (code = param_write_string(plist, "Feeder",
- ¶mValueToParam(strFeeder, ppdev->feeder)->p_string)) < 0 ||
- (code = param_write_string(plist, "Media",
- ¶mValueToParam(strMedia, ppdev->mediaType)->p_string)) < 0 ||
- (code = param_write_string(plist, "Quality",
- ¶mValueToParam(strQuality, ppdev->quality)->p_string)) < 0 ||
- (code = param_write_string(plist, "InkColor",
- ¶mValueToParam(strInk, ppdev->ink)->p_string)) < 0 ||
-
- (code = param_write_bool(plist, "Inverse", &ppdev->inverse)) < 0 ||
- (code = param_write_bool(plist, "Smooth", &ppdev->smooth)) < 0 ||
- (code = param_write_bool(plist, "Compress", &ppdev->compress)) < 0 ||
- (code = param_write_bool(plist, "LimitCheck", &ppdev->limit)) < 0 ||
- (code = param_write_bool(plist, "DecomposeK", &ppdev->compose)) < 0 ||
-
- (code = param_write_int(plist, "PaperRed", &ppdev->paperColor.red)) < 0 ||
- (code = param_write_int(plist, "PaperGreen", &ppdev->paperColor.green)) < 0 ||
- (code = param_write_int(plist, "PaperBlue", &ppdev->paperColor.blue)) < 0 ||
- (code = param_write_int(plist, "Random", &ppdev->rnd)) < 0 ||
-
- (code = param_write_float(plist, "Gamma", &ppdev->gamma)) < 0 ||
- (code = param_write_float(plist, "RedGamma", &ppdev->redGamma)) < 0 ||
- (code = param_write_float(plist, "GreenGamma", &ppdev->greenGamma)) < 0 ||
- (code = param_write_float(plist, "BlueGamma", &ppdev->blueGamma)) < 0)
- return code;
- return code;
-
-}
-
-/* Put parameters. */
-private int
-gdev_bjc_put_params(gx_device * pdev, gs_param_list * plist)
-{
- int code, ecode = 0;
- const char *param_name;
- gs_param_string tmppar;
- uint parsize;
- stringParamDescription *tmpstr=NULL;
-
-# define ppdev ((gx_device_bjc_printer *)pdev)
-
-#define CHECK_PARAM_CASES(good, label) \
- case 1: \
- break; \
- case 0: \
- if ( good ) break; \
- ecode = gs_error_rangecheck; goto label; \
- default: \
- ecode = code; \
-label: \
- param_signal_error(plist, param_name, ecode)
-
-#define CHECK_str_PARAM_CASES(set, str, label) \
- case 1: \
- break; \
- case 0: \
- parsize = tmppar.size; \
- tmpstr = paramStringToParam(str, \
- (const char *)tmppar.data, \
- parsize); \
- if ( tmpstr ) { set = tmpstr->p_value; break;} \
- ecode = gs_error_rangecheck; goto label; \
- default: \
- ecode = code; \
-label: \
- param_signal_error(plist, param_name, ecode)
-
- switch ( code = param_read_string(plist, (param_name = "PrinterType"),
- &tmppar)) {
- CHECK_str_PARAM_CASES(ppdev->printerType, strPrinterType, label_Type);
- }
- switch (code = param_read_string(plist, (param_name = "Feeder"),
- &tmppar)) {
- CHECK_str_PARAM_CASES(ppdev->feeder, strFeeder, label_Feeder);
- }
- switch (code = param_read_string(plist, (param_name = "Media"),
- &tmppar)) {
- CHECK_str_PARAM_CASES(ppdev->mediaType, strMedia, label_Paper);
- }
- switch (code = param_read_string(plist, (param_name = "Quality"),
- &tmppar)) {
- CHECK_str_PARAM_CASES(ppdev->quality, strQuality, label_Quality);
- }
- switch (code = param_read_string(plist, (param_name = "InkColor"),
- &tmppar)) {
- CHECK_str_PARAM_CASES(ppdev->ink, strInk, label_Ink);
- }
-
- switch (code = param_read_bool(plist, (param_name = "Inverse"),
- &ppdev->inverse)) {
- CHECK_PARAM_CASES( ppdev->inverse == true ||
- ppdev->inverse == false , label_Inverse);
- }
- switch (code = param_read_bool(plist, (param_name = "Compress"),
- &ppdev->compress)) {
- CHECK_PARAM_CASES( ppdev->compress == true ||
- ppdev->compress == false , label_Compress);
- }
- switch (code = param_read_bool(plist, (param_name = "Smooth"),
- &ppdev->smooth)) {
- CHECK_PARAM_CASES( ppdev->smooth == true ||
- ppdev->smooth == false , label_Smooth);
- }
-
- switch (code = param_read_bool(plist, (param_name = "LimitCheck"),
- &ppdev->limit)) {
- CHECK_PARAM_CASES( ppdev->limit == true ||
- ppdev->limit == false , label_Limit);
- }
-
- switch (code = param_read_bool(plist, (param_name = "DecomposeK"),
- &ppdev->compose)) {
- CHECK_PARAM_CASES( ppdev->compose == true ||
- ppdev->compose == false , label_Compose);
- }
-
- switch (code = param_read_int(plist, (param_name = "PaperRed"),
- &ppdev->paperColor.red)) {
- CHECK_PARAM_CASES( ppdev->paperColor.red >= 0 &&
- ppdev->paperColor.red <= 255 , label_Red);
- }
- switch (code = param_read_int(plist, (param_name = "PaperGreen"),
- &ppdev->paperColor.green)) {
- CHECK_PARAM_CASES(ppdev->paperColor.green >= 0 &&
- ppdev->paperColor.green <= 255 , label_Green);
- }
- switch (code = param_read_int(plist, (param_name = "PaperBlue"),
- &ppdev->paperColor.blue)) {
- CHECK_PARAM_CASES(ppdev->paperColor.blue >= 0 &&
- ppdev->paperColor.blue <= 255 , label_Blue);
- }
- switch (code = param_read_int(plist, (param_name = "Random"),
- &ppdev->rnd)) {
- CHECK_PARAM_CASES(ppdev->rnd >= 0 &&
- ppdev->rnd <= 100 , label_Random);
- }
- switch (code = param_read_float(plist, (param_name = "Gamma"),
- &ppdev->gamma)) {
- CHECK_PARAM_CASES(ppdev->gamma >= 0.0 &&
- ppdev->gamma <= 10.0 , label_Gamma);
- }
- switch (code = param_read_float(plist, (param_name = "RedGamma"),
- &ppdev->redGamma)) {
- CHECK_PARAM_CASES(ppdev->redGamma >= 0.0 &&
- ppdev->redGamma <= 10.0 , label_Rgamma);
- }
- switch (code = param_read_float(plist, (param_name = "GreenGamma"),
- &ppdev->greenGamma)) {
- CHECK_PARAM_CASES(ppdev->greenGamma >= 0.0 &&
- ppdev->greenGamma <= 10.0 , label_Ggamma);
- }
- switch (code = param_read_float(plist, (param_name = "BlueGamma"),
- &ppdev->blueGamma)) {
- CHECK_PARAM_CASES(ppdev->blueGamma >= 0.0 &&
- ppdev->blueGamma <= 10.0 , label_Bgamma);
- }
- if (ecode < 0) return ecode;
-
- return gdev_prn_put_params(pdev, plist);
-#undef ppdev
-}
-
-private int
-bjc_print_page_mono(gx_device_printer * pdev, FILE * file)
-{
-#define ppdev ((gx_device_bjc_printer *) pdev)
-#define prdev ((gx_device_printer *) pdev)
-
- uint raster = gdev_prn_raster(pdev);
- uint cmplen;
- byte *row = gs_alloc_bytes(pdev->memory, raster, "bjc mono file buffer");
- byte *cmp = gs_alloc_bytes(pdev->memory, (raster << 1) + 1,
- "bjc mono comp buffer"); /*worst case */
- byte *outrow; /* misc variable for send a row */
- int y;
- int skip; /* empty raster lines */
- char color = (ppdev->smooth == true ? 0x12 : /* smooted black */
- ((ppdev->ink & INK_K) ? 0x11: 0x10)); /* black or color */
- char ink = 0x01; /* regular ink type */
- char compress = (ppdev->compress == true ? 0x01 : 0x00); /* compression or not */
- int x_resolution = pdev->HWResolution[0];
- int y_resolution = pdev->HWResolution[1];
- int length = 0/*x71*/, lm = 0/*x01*/, rm = 0/*x01*/, top = 0/*x50*/;
- byte inkc = ppdev->ink;
- byte mask_array[] = { 0xff, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
- byte lastmask = mask_array[pdev->width % 8];
-
- if (row == 0 || cmp == 0) /* can't allocate row buffer */
- return_error(gs_error_VMerror);
-
- /* Write the setup data. */
-
- bjc_put_set_initial (file); /* start printing */
- bjc_put_print_method(file, color, media_codes[ppdev->mediaType].c, ppdev->quality, 0);
- bjc_put_media_supply(file, ppdev->feeder, media_codes[ppdev->mediaType].l);
- bjc_put_raster_resolution(file, x_resolution, y_resolution);
- bjc_put_page_margins(file, length, lm, rm, top);
- bjc_put_set_compression(file, compress);
- bjc_put_image_format(file, 0, 0, ink); /* normal ink */
-
-
- /* Write the contents of the image. */
- skip = 0;
- for (y = 0; y < pdev->height ; y++) {
- gdev_prn_copy_scan_lines(pdev, y, row, raster);
- if (bjc_invert_bytes(row, raster, ppdev->inverse, lastmask)) /* black -> K and check empty line*/
- { /* empty line raster */
- if (skip) bjc_put_raster_skip(file, skip);
- skip = 1;
- if(compress) cmplen = bjc_compress(row, raster, cmp), outrow = cmp;
- else outrow = row, cmplen = raster; /* compress or not */
- if(inkc & INK_K) bjc_put_cmyk_image(file, CMYK_K, outrow, cmplen),
- bjc_put_CR(file);
- if(inkc & INK_C) bjc_put_cmyk_image(file, CMYK_C, outrow, cmplen),
- bjc_put_CR(file);
- if(inkc & INK_M) bjc_put_cmyk_image(file, CMYK_M, outrow, cmplen),
- bjc_put_CR(file);
- if(inkc & INK_Y) bjc_put_cmyk_image(file, CMYK_Y, outrow, cmplen),
- bjc_put_CR(file); /* use the needed ink(s) */
- }
- else skip++; /* +1 empty line */
- }
- if (skip) bjc_put_raster_skip(file, skip);
- bjc_put_FF(file); /* eject a page */
- bjc_put_initialize (file);
-
- gs_free_object(pdev->memory, cmp, "bjc mono comp buffer");
- gs_free_object(pdev->memory, row, "bjc mono file buffer");
-
- return 0;
-
-#undef ppdev
-}
-
-private int
-bjc_print_page_gray(gx_device_printer * pdev, FILE * file)
-{
-#define ppdev ((gx_device_bjc_printer *) pdev)
-#define prdev ((gx_device_printer *) pdev)
-
- uint width = pdev->width; /* Because grayscale */
- uint raster = (pdev->width >> 3) + ( (pdev->width % 8) ? 1:0);
- uint cmplen;
- byte *row = gs_alloc_bytes(pdev->memory, width, "bjc gray file buffer");
- byte *dit = gs_alloc_bytes(pdev->memory, raster, "bjc gray dither buffer");
- byte *cmp = gs_alloc_bytes(pdev->memory, (raster << 1) + 1,
- "bjc gray comp buffer"); /*worst case */
- byte *out; /* misc variable for send a row */
- int y;
- int skip; /* empty raster lines */
- char color = (ppdev->smooth == true ? 0x12 : /* smooted black */
- ((ppdev->ink & INK_K) ? 0x11: 0x10)); /* black or color */
- char ink = 0x01; /* regular ink type */
- char compress = (ppdev->compress == true ? 0x01 : 0x00); /* compression or not */
- int x_resolution = pdev->HWResolution[0];
- int y_resolution = pdev->HWResolution[1];
- int length = 0/*x71*/, lm = 0/*x01*/, rm = 0/*x01*/, top = 0/*x50*/;
- byte inkc = ppdev->ink;
- byte mask_array[] = { 0xff, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
- byte lastmask = mask_array[pdev->width % 8];
-
- if (row == 0 || cmp == 0 ||
- dit == 0 ) /* can't allocate row buffers */
- return_error(gs_error_VMerror);
-
- /* Write the setup data. */
-
- bjc_build_gamma_table(ppdev->gamma, CMYK_K); /* set up the gamma table */
-
- bjc_put_set_initial (file); /* start printing */
- bjc_put_print_method(file, color, media_codes[ppdev->mediaType].c, ppdev->quality, 0);
- bjc_put_media_supply(file, ppdev->feeder, media_codes[ppdev->mediaType].l);
- bjc_put_raster_resolution(file, x_resolution, y_resolution);
- bjc_put_page_margins(file, length, lm, rm, top);
- bjc_put_set_compression(file, compress);
- bjc_put_image_format(file, 0, 0, ink); /* normal ink */
-
-
- /* Write the contents of the image. */
- skip = 0;
- if(FloydSteinbergInitG(pdev) == -1)
- return_error(gs_error_VMerror); /* initiate the dithering */
-
- for (y = 0; y < pdev->height ; y++) {
- gdev_prn_copy_scan_lines(pdev, y, row, width); /* image -> row */
- FloydSteinbergDitheringG(row, dit, width, raster, ppdev->limit); /* gray */
- if (bjc_invert_bytes(dit, raster, ppdev->inverse, lastmask)) /* black -> K and check empty line*/
- { /* end of empty lines */
- if (skip) bjc_put_raster_skip(file, skip);
- skip = 1;
-
- if(compress) cmplen = bjc_compress(dit, raster, cmp), out = cmp;
- else cmplen = raster, out = dit; /* compress or not */
-
- if(inkc & INK_K) bjc_put_cmyk_image(file, CMYK_K, out, cmplen),
- bjc_put_CR(file);
- if(inkc & INK_C) bjc_put_cmyk_image(file, CMYK_C, out, cmplen),
- bjc_put_CR(file);
- if(inkc & INK_M) bjc_put_cmyk_image(file, CMYK_M, out, cmplen),
- bjc_put_CR(file);
- if(inkc & INK_Y) bjc_put_cmyk_image(file, CMYK_Y, out, cmplen),
- bjc_put_CR(file); /* use the needed ink(s) */
-
- } else skip++; /* +1 empty line */
- }
- if (skip) bjc_put_raster_skip(file, skip);
- bjc_put_FF(file); /* eject a page */
- bjc_put_initialize (file);
-
- FloydSteinbergCloseG(pdev);
- gs_free_object(pdev->memory, dit, "bjc gray dither buffer");
- gs_free_object(pdev->memory, cmp, "bjc gray comp buffer");
- gs_free_object(pdev->memory, row, "bjc gray file buffer");
-
- return 0;
-
-#undef ppdev
-}
-
-private int
-bjc_print_page_cmyk(gx_device_printer * pdev, FILE * file)
-{
-#define ppdev ((gx_device_bjc_printer *) pdev)
-#define prdev ((gx_device_printer *) pdev)
-
- uint raster = bitmap_raster(pdev->width);
- uint a_raster; /* a tmp variable */
- uint cmplen;
- byte *row = gs_alloc_bytes(pdev->memory, raster*4,
- "bjc cmyk file buffer"); /* one for each component */
- byte *cmp = gs_alloc_bytes(pdev->memory, (raster << 1) + 1,
- "bjc cmyk comp buffer"); /*worst case */
- byte *rows[4];
- byte *outrow; /* misc variable for send a row */
- int y;
- int skip; /* empty raster lines */
- char color = 0x10; /* color */
- char ink = 0x01; /* regular ink type */
- char compress = (ppdev->compress == true ? 0x01 : 0x00); /* compression or not */
- char skip_x;
- int x_resolution = pdev->HWResolution[0];
- int y_resolution = pdev->HWResolution[1];
- int length = 0/*x71*/, lm = 0/*x01*/, rm = 0/*x01*/, top = 0/*x50*/;
- int plane;
- byte mask_array[] = { 0xff, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
- byte lastmask = mask_array[pdev->width % 8];
- skip_t skipc;
- byte inkc = ppdev->ink;
- bool inverse = ppdev->inverse;
- gx_render_plane_t render_plane;
-
- if (row == 0 || cmp == 0) /* can't allocate row buffer */
- return_error(gs_error_VMerror);
-
- /* Write the setup data. */
-
- bjc_put_set_initial (file); /* start printing */
- bjc_put_print_method(file, color, media_codes[ppdev->mediaType].c, ppdev->quality, 0);
- bjc_put_media_supply(file, ppdev->feeder, media_codes[ppdev->mediaType].l);
- bjc_put_raster_resolution(file, x_resolution, y_resolution);
- bjc_put_page_margins(file, length, lm, rm, top);
- bjc_put_set_compression(file, compress);
- bjc_put_image_format(file, 0, 0, ink); /* normal ink */
-
-
- /* Write the contents of the image. */
- skip = 0;
-
- for (y = 0; y < pdev->height ; y++) {
-
- skip_x = 0;
- for (plane = 0; plane < 4; plane++) { /* print each color component */
- gx_render_plane_init(&render_plane, (gx_device *)pdev, plane);
- gdev_prn_get_lines(pdev, y, 1, row + raster*plane, raster,
- &rows[plane], &a_raster, &render_plane);
- }
-
- {
- int i;
- byte *byteC=rows[0], *byteM=rows[1],
- *byteY=rows[2], *byteK=rows[3];
- for(i=0; i<raster; i++, byteC++, byteM++, byteY++, byteK++) {
- if (ppdev->compose) {
- *byteK = *byteC & *byteM & *byteY;
- *byteC &= ~(*byteK);
- *byteM &= ~(*byteK);
- *byteY &= ~(*byteK);
- }
- else {
- *byteC |= *byteK;
- *byteM |= *byteK;
- *byteY |= *byteK;
- *byteK = 0;
- }
- }
- }
-
- if(bjc_invert_cmyk_bytes(rows[0], rows[1], rows[2], rows[3],
- raster, inverse, lastmask, &skipc)) {
-
- if (skip) bjc_put_raster_skip(file, skip);
- skip = 1;
- if(skipc.skipC && (inkc & INK_C)) {
- if(compress) cmplen = bjc_compress(rows[0], raster, cmp), outrow = cmp;
- else outrow = rows[0], cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_C, outrow, cmplen), bjc_put_CR(file);
- }
- if(skipc.skipM && (inkc & INK_M)) {
- if(compress) cmplen = bjc_compress(rows[1], raster, cmp), outrow = cmp;
- else outrow = rows[1], cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_M, outrow, cmplen), bjc_put_CR(file);
- }
- if(skipc.skipY && (inkc & INK_Y)) {
- if(compress) cmplen = bjc_compress(rows[2], raster, cmp), outrow = cmp;
- else outrow = rows[2], cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_Y, outrow, cmplen), bjc_put_CR(file);
- }
- if(skipc.skipK && (inkc & INK_K)) {
- if(compress) cmplen = bjc_compress(rows[3], raster, cmp), outrow = cmp;
- else outrow = rows[3], cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_K, outrow, cmplen), bjc_put_CR(file);
- }
- }
- else skip++; /* +1 empty line */
- }
-
- if (skip) bjc_put_raster_skip(file, skip);
- bjc_put_FF(file); /* eject a page */
- bjc_put_initialize (file);
-
- gs_free_object(pdev->memory, cmp, "bjc cmyk comp buffer");
- gs_free_object(pdev->memory, row, "bjc cmyk file buffer");
-
- return 0;
-
-#undef ppdev
-}
-
-private int
-bjc_print_page_color(gx_device_printer * pdev, FILE * file)
-{
-#define ppdev ((gx_device_bjc_printer *) pdev)
-#define prdev ((gx_device_printer *) pdev)
-
- uint width = pdev->width; /* Because grayscale */
- uint raster = (pdev->width >> 3) + ( (pdev->width % 8) ? 1:0);
- uint cmplen;
- byte *row = gs_alloc_bytes(pdev->memory, width*4,
- "bjc true file buffer"); /* one for each component */
- byte *dit = gs_alloc_bytes(pdev->memory, raster*4,
- "bjc true dither buffer");
- byte *cmp = gs_alloc_bytes(pdev->memory, (raster << 1) + 1,
- "bjc true comp buffer"); /*worst case */
- byte *rowC = dit; /*C*/
- byte *rowM = dit + raster; /*M*/
- byte *rowY = dit + 2*raster; /*Y*/
- byte *rowK = dit + 3*raster; /*K*/
- byte *outrow; /* misc variable for send a row */
- int y;
- int skip; /* empty raster lines */
- char color = 0x10; /* color */
- char ink = 0x01; /* regular ink type */
- char compress = (ppdev->compress == true ? 0x01 : 0x00); /* compression or not */
- int x_resolution = pdev->HWResolution[0];
- int y_resolution = pdev->HWResolution[1];
- int length = 0/*x71*/, lm = 0/*x01*/, rm = 0/*x01*/, top = 0/*x50*/;
- byte mask_array[] = { 0xff, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe };
- byte lastmask = mask_array[pdev->width % 8];
- skip_t skipc;
- byte inkc = ppdev->ink;
- float rgamma = ppdev->gamma != 1.0 ? ppdev->gamma:ppdev->redGamma;
- float ggamma = ppdev->gamma != 1.0 ? ppdev->gamma:ppdev->greenGamma;
- float bgamma = ppdev->gamma != 1.0 ? ppdev->gamma:ppdev->blueGamma;
-
- if (row == 0 || cmp == 0 || dit == 0) /* can't allocate row buffer */
- return_error(gs_error_VMerror);
-
- bjc_build_gamma_table(rgamma, CMYK_C); /* set up the gamma table */
- bjc_build_gamma_table(ggamma, CMYK_M); /* set up the gamma table */
- bjc_build_gamma_table(bgamma, CMYK_Y); /* set up the gamma table */
-
- /* Write the setup data. */
-
- bjc_put_set_initial (file); /* start printing */
- bjc_put_print_method(file, color, media_codes[ppdev->mediaType].c, ppdev->quality, 0);
- bjc_put_media_supply(file, ppdev->feeder, media_codes[ppdev->mediaType].l);
- bjc_put_raster_resolution(file, x_resolution, y_resolution);
- bjc_put_page_margins(file, length, lm, rm, top);
- bjc_put_set_compression(file, compress);
- bjc_put_image_format(file, 0, 0, ink); /* normal ink */
-
-
- /* Write the contents of the image. */
- skip = 0;
-
- if(FloydSteinbergInitC(pdev) == -1)
- return_error(gs_error_VMerror); /* initiate the dithering */
-
- for (y = 0; y < pdev->height ; y++) {
- gdev_prn_copy_scan_lines(pdev, y, row, gdev_prn_raster(pdev));
- /* image -> row */
- FloydSteinbergDitheringC(row, dit, width, raster, ppdev->limit,
- ppdev->compose);
-
- if(bjc_invert_cmyk_bytes(rowC, rowM, rowY, rowK,
- raster, ~ppdev->inverse, lastmask,
- &skipc)) {
- if (skip) bjc_put_raster_skip(file, skip);
- skip = 1;
- if(skipc.skipC && (inkc & INK_C) ) {
- if(compress) cmplen = bjc_compress(rowC, raster, cmp), outrow = cmp;
- else outrow = rowC, cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_C, outrow, cmplen), bjc_put_CR(file);
- }
- if(skipc.skipM && (inkc & INK_M) ) {
- if(compress) cmplen = bjc_compress(rowM, raster, cmp), outrow = cmp;
- else outrow = rowM, cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_M, outrow, cmplen), bjc_put_CR(file);
- }
- if(skipc.skipY && (inkc & INK_Y) ) {
- if(compress) cmplen = bjc_compress(rowY, raster, cmp), outrow = cmp;
- else outrow = rowY, cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_Y, outrow, cmplen), bjc_put_CR(file);
- }
- if(skipc.skipK && (inkc & INK_K) ) {
- if(compress) cmplen = bjc_compress(rowK, raster, cmp), outrow = cmp;
- else outrow = rowK, cmplen = raster; /* compress or not */
- bjc_put_cmyk_image(file, CMYK_K, outrow, cmplen), bjc_put_CR(file);
- }
- }
- else skip++; /* +1 empty line */
- }
-
- if (skip) bjc_put_raster_skip(file, skip);
- bjc_put_FF(file); /* eject a page */
- bjc_put_initialize (file);
-
- FloydSteinbergCloseC(pdev);
- gs_free_object(pdev->memory, cmp, "bjc true comp buffer");
- gs_free_object(pdev->memory, dit, "bjc true dither buffer");
- gs_free_object(pdev->memory, row, "bjc true file buffer");
-
- return 0;
-
-#undef ppdev
-}
Deleted: trunk/gs/contrib/gdevbjc_.h
===================================================================
--- trunk/gs/contrib/gdevbjc_.h 2007-05-14 09:34:52 UTC (rev 7970)
+++ trunk/gs/contrib/gdevbjc_.h 2007-05-14 15:22:29 UTC (rev 7971)
@@ -1,230 +0,0 @@
-/* BJC-210/240/250/265/1000 Bubble Jet Printer driver for GhostScript
- * header file
- *
- * Copyright 2000, 2001, 2002 Gergely Szász (Gergely Sza'sz)
- * mailto://szaszg@hu.inter.net http://bjc250gs.sourceforge.net
- *
- * This program may be distributed and/or modified under the terms of
- * the GNU General Public License as published by the Free Software
- * Foundation (the "GPL"); either version 2 of the GPL, or (at your option)
- * any later version.
- *
- * When distributed under the terms of the GPL, this program is distributed
- * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GPL for more details.
- *
- * If this program is being distributed under the terms of the GPL, you
- * should have received a copy of the GPL along with this program, normally
- * in a plain ASCII text file named COPYING; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111
- * U.S.A.
- */
-
-/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved.
-
- This program may also be distributed as part of AFPL Ghostscript, under the
- terms of the Aladdin Free Public License (the "License").
-
- AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No
- author or distributor accepts any responsibility for the consequences of
- using it, or for whether it serves any particular purpose or works at
- all, unless he or she says so in writing. Refer to the License for full
- details.
-
- Every copy of AFPL Ghostscript must include a copy of the License,
- normally in a plain ASCII text file named PUBLIC. The License grants you
- the right to copy, modify and redistribute AFPL Ghostscript, but only
- under certain conditions described in the License. Among other things,
- the License requires that the copyright notice and this notice be
- preserved on all copies.
-*/
-
-/* BJC printer drivers definitions and utility interfaces */
-
-#ifndef gdevbjc_INCLUDED
-# define gdevbjc_INCLUDED
-
-/* Define the default X and Y resolution. */
-#define X_DPI 360
-#define Y_DPI 360
-
-#define CMYK_K 'K'
-#define CMYK_C 'C'
-#define CMYK_M 'M'
-#define CMYK_Y 'Y'
-
-#define INK_K 8
-#define INK_C 1
-#define INK_M 2
-#define INK_Y 4
-
-typedef struct {
- gs_param_string p_string;
- int p_value;
-} stringParamDescription;
-
-/* Definitions of device parameters */
-struct skip_s {
- bool skipC;
- bool skipM;
- bool skipY;
- bool skipK;
-};
-
-typedef struct skip_s skip_t;
-
-typedef struct {
- unsigned char l;
- unsigned char c;
-} media_t;
-
-struct gx_device_bjc_printer_s {
- gx_device_common;
- gx_prn_device_common;
- int printerType; /* BJC-250, BJC-250ex, BJC1000, ... */
- int feeder; /* Needed paper feeder */
- int mediaType; /* paper type */
- int quality;
- int ink;
- int rnd;
- bool inverse;
- bool compress;
- bool smooth;
- bool limit; /* paper color correction limit check */
- bool compose; /* color K decomposition */
- float gamma;
- float redGamma;
- float greenGamma;
- float blueGamma;
- struct {
- int red;
- int green;
- int blue;
- } paperColor; /* paper color for color correction */
-};
-
-typedef struct gx_device_bjc_printer_s gx_device_bjc_printer;
-
-#define bjc_device_margins_body(dtype, procs, dname, w10, h10, xdpi, ydpi, lo, to, lm, bm, rm, tm, ncomp, depth, mg, mc, dg, dc, print_page)\
- std_device_full_body_type(dtype, &procs, dname, &st_device_printer,\
- (int)((long)(w10) * (xdpi) / 10),\
- (int)((long)(h10) * (ydpi) / 10),\
- xdpi, ydpi,\
- ncomp, depth, mg, mc, dg, dc,\
- -(lo) * (xdpi), -(to) * (ydpi),\
- (lm) * 72.0, (bm) * 72.0,\
- (rm) * 72.0, (tm) * 72.0\
- ),\
- prn_device_body_rest_(print_page)
-
-#define bjc_device_margins(procs, dname, w10, h10, xdpi, ydpi, lo, to, lm, bm, rm, tm, ncomp, depth, mg, mc, dg, dc, print_page, def_ink)\
-{ bjc_device_margins_body(gx_device_bjc_printer, procs, dname,\
- w10, h10, xdpi, ydpi, lo, to, lm, bm, rm, tm, \
- ncomp, depth, mg, mc, dg, dc, print_page),\
- (int) 0, /* def, printer: BJC250 */ \
- (int) 0x10, /* Auto Feeder */ \
- (int) 0, /* Plain paper */ \
- (int) 0, /* Normal quality */ \
- (int) def_ink, /* Black monochrome ink */ \
- (int) 15, /* Randomness is 15% */ \
- (bool) false, /* Normal printing */ \
- (bool) true, /* Use compression */ \
- (bool) false, /* no smoothing */ \
- (bool) false, /* no limit check */ \
- (bool) true, /* yes we run decomp */ \
- (float) 1.0, /* initiaal gamma */ \
- (float) 1.0, /* initiaal gamma */ \
- (float) 1.0, /* initiaal gamma */ \
- (float) 1.0, /* initiaal gamma */ \
- { (int) 255, /* White paper */ \
- (int) 255, /* */ \
- (int) 255 } /* */ \
-};
-
-
-#define bjc_device(procs, dname, w10, h10, xdpi, ydpi, lm, bm, rm, tm, ncomp, depth, mg, mc, dg, dc, print_page, def_ink)\
- bjc_device_margins(procs, dname, w10, h10, xdpi, ydpi,\
- lm, tm, lm, bm, rm, tm, ncomp, depth, mg, mc, dg, dc, print_page, def_ink)
-
-
-#define bjc_cmyk_param_procs(v_prn_open, v_prn_output_page, v_prn_close, \
- p_map_color_rgb, p_map_cmyk_color, \
- v_prn_get_params, v_prn_put_params)\
- {v_prn_open, NULL, NULL, v_prn_output_page, v_prn_close,\
- NULL, p_map_color_rgb, NULL, NULL, NULL, NULL, NULL, NULL,\
- v_prn_get_params, v_prn_put_params,\
- p_map_cmyk_color, NULL, NULL, NULL, gx_page_device_get_page_device}
-
-
-/* There are the definitions of commands for the Canon BJC printers. */
-
-#define BJC_BJL_CLEANING 0x00 /* "@Cleaning=1\n" */
-#define BJC_BJL_POWER_OFF 0x01 /* "@PowerOff\n" */
-#define BJC_BJL_ROCLEANING 0x02 /* "@RollerCleaning\n" */
-#define BJC_BJL_NOZZLECHK 0x03 /* "@TestPrint=NozzleCheck\n" */
-#define BJC_BJL_TESTA 0x04 /* "@TestPrint=A\012" */
-#define BJC_BJL_TESTB 0x05 /* "@TestPrint=B\012" */
-#define BJC_BJL_TESTC 0x06 /* "@TestPrint=A\012" */
-#define BJC_BJL_DEMO 0x07 /* "@TestPrint=DemoPrint\012" */
-
-#define BJC_BJL_ON_ENABLE 0x20 /* "AutoPowerOn=Enable\n" */
-#define BJC_BJL_ON_DISABLE 0x21 /* "AutoPowerOn=Disable\n" */
-#define BJC_BJL_OFF_1MIN 0x22 /* "AutoPowerOff=1\n" */
-#define BJC_BJL_OFF_10MIN 0x23 /* "AutoPowerOff=10\n" */
-#define BJC_BJL_OFF_30MIN 0x24 /* "AutoPowerOff=30\n" */
-#define BJC_BJL_OFF_60MIN 0x25 /* "AutoPowerOff=60\n" */
-#define BJC_BJL_OFF_DISABLE 0x26 /* "AutoPowerOff=Disable\n" */
-
-typedef struct {
- const char *string;
- int numeric;
- int length; } BJL_command;
-
-/* Put a BJL command to stream */
-
-void bjc_put_bjl_command(FILE * file, int bjl_command);
-
-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(int rnd);
-#endif /* gdevbjc_INCLUDED */
Deleted: trunk/gs/contrib/gdevbjca.c
===================================================================
--- trunk/gs/contrib/gdevbjca.c 2007-05-14 09:34:52 UTC (rev 7970)
+++ trunk/gs/contrib/gdevbjca.c 2007-05-14 15:22:29 UTC (rev 7971)
@@ -1,875 +0,0 @@
-/* BJC-210/240/250/265/1000 Bubble Jet Printer driver for GhostScript
- * utility subroutines and dithering code
- *
- * Copyright 2000, 2001, 2002 Gergely Szász (Gergely Sza'sz)
- * mailto://szaszg@hu.inter.net http://bjc250gs.sourceforge.net
- *
- * This program may be distributed and/or modified under the terms of
- * the GNU General Public License as published by the Free Software
- * Foundation (the "GPL"); either version 2 of the GPL, or (at your option)
- * any later version.
- *
- * When distributed under the terms of the GPL, this program is distributed
- * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GPL for more details.
- *
- * If this program is being distributed under the terms of the GPL, you
- * should have received a copy of the GPL along with this program, normally
- * in a plain ASCII text file named COPYING; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111
- * U.S.A.
- */
-
-/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved.
-
- This program may also be distributed as part of AFPL Ghostscript, under the
- terms of the Aladdin Free Public License (the "License").
-
- AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No
- author or distributor accepts any responsibility for the consequences of
- using it, or for whether it serves any particular purpose or works at
- all, unless he or she says so in writing. Refer to the License for full
- details.
-
- Every copy of AFPL Ghostscript must include a copy of the License,
- normally in a plain ASCII text file named PUBLIC. The License grants you
- the right to copy, modify and redistribute AFPL Ghostscript, but only
- under certain conditions described in the License. Among other things,
- the License requires that the copyright notice and this notice be
- preserved on all copies.
-*/
-
-/* BJC printer drivers utilities */
-#include "gdevprn.h"
-#include "gdevbjc_.h"
-#include <math.h>
-#include <time.h>
-
-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 ---------------- */
-
-private void
-bjc_put_bytes(FILE *file, const char *data, int count)
-{
-
- fwrite(data, count, 1, file);
-}
-
-private void
-bjc_put_hi_lo(FILE *file, int value)
-{
- fputc(((value & 0xffff) >> 8), file);
- fputc(value & 0xff, file);
-}
-
-private void
-bjc_put_lo_hi(FILE *file, int value)
-{
- fputc(value & 0xff, file);
- fputc(((value & 0xffff) >> 8), file);
-}
-
-private void
-bjc_put_command(FILE *file, char command, int count)
-{ char tmp[3] = { '\033', '(', ' '};
- tmp[2] = command;
- fwrite( tmp, 3, 1, file);
- bjc_put_lo_hi(file, count);
-}
-
-/* ---------------- Commands ---------------- */
-
-/* Line feed (^J) */
-void
-bjc_put_LF(FILE *file)
-{
- fputc(0x0a, file);
-}
-
-/* Form feed (^L) */
-void
-bjc_put_FF(FILE *file)
-{
- fputc(0x0c, file);
-}
-
-/* Carriage return (^M) */
-void
-bjc_put_CR(FILE *file)
-{
- fputc(0x0d, file);
-}
-
-/* Return to initial condition (ESC @) */
-void
-bjc_put_initialize(FILE *file)
-{
- bjc_put_bytes(file, "\033@", 2);
-}
-
-/* Set initial condition (ESC [ K <count> <init> <id> <parm1> <parm2>) */
-void
-bjc_put_set_initial(FILE *file)
-{
- bjc_put_bytes(file, "\033[K\002\000\000\017", 7);
-}
-
-/* Set data compression (ESC [ b <count> <state>) */
-void
-bjc_put_set_compression(FILE *file, char compression)
-{
- bjc_put_command(file, 'b', 1);
- fputc(compression, file);
-}
-
-/* Select print method (ESC ( c <count> <parm1> <parm2> [<parm3>]) */
-void
-bjc_put_print_method_short(FILE *file, char color)
-{
- bjc_put_command(file, 'c', 1);
- fputc(color, file);
-}
-void
-bjc_put_print_method(FILE *file, char color, char media, char quality,
- char density)
-{
- bjc_put_command(file, 'c', 2 + (density != 0));
- fputc(color, file);
- fputc(media | quality, file);
- if (density)
- fputc(density, file);
-}
-
-/* Set raster resolution (ESC ( d <count> <y_res> [<x_res>]) */
-void
-bjc_put_raster_resolution(FILE *file, int x_resolution, int y_resolution)
-{
- if (x_resolution == y_resolution) {
- bjc_put_command(file, 'd', 2);
- } else {
- bjc_put_command(file, 'd', 4);
- bjc_put_hi_lo(file, y_resolution);
- }
- bjc_put_hi_lo(file, x_resolution);
-}
-
-/* Raster skip (ESC ( e <count> <skip>) */
-void
-bjc_put_raster_skip(FILE *file, int skip)
-{
- bjc_put_command(file, 'e', 2);
- bjc_put_hi_lo(file, skip);
-}
-
-/* Set page margins (ESC ( g <count> <length> <lm> <rm> <top>) */
-void
-bjc_put_page_margins(FILE *file, int length, int lm, int rm, int top)
-{
- char parms[4];
-
- parms[0] = length, parms[1] = lm, parms[2] = rm, parms[3] = top;
-/* count = 4; */ /* could be 1..3 */
- bjc_put_command(file, 'g', 4);
- bjc_put_bytes(file, parms, 4);
-}
-
-/* Set media supply method (ESC * l <count> <parm1> <parm2>) */
-void
-bjc_put_media_supply(FILE *file, char supply, char type)
-{
- bjc_put_command(file, 'l', 2);
- fputc(supply, file);
- fputc(type << 4, file);
-}
-
-/* Identify ink cartridge (ESC ( m <count> <type>) */ /*
-void
-bjc_put_identify_cartridge(FILE *file,
- bjc_identify_cartridge_command_t command)
-{
- bjc_put_command(s, 'm', 1);
- spputc(s, command);
-} */
-
-/* CMYK raster image (ESC ( A <count> <color>) */
-void
-bjc_put_cmyk_image(FILE *file, char component,
- const char *data, int count)
-{
- bjc_put_command(file, 'A', count + 1);
- fputc(component, file);
- bjc_put_bytes(file, data, count);
-}
-
-/* Move by raster lines (ESC ( n <count> <lines>) */
-void
-bjc_put_move_lines(FILE *file, int lines)
-{
- bjc_put_command(file, 'n', 2);
- bjc_put_hi_lo(file, lines);
-}
-
-/* Set unit for movement by raster lines (ESC ( o <count> <unit>) */
-void
-bjc_put_move_lines_unit(FILE *file, int unit)
-{
- bjc_put_command(file, 'o', 2);
- bjc_put_hi_lo(file, unit);
-}
-
-/* Set extended margins (ESC ( p <count> <length60ths> <lm60ths> */
-/* <rm60ths> <top60ths>) */
-void
-bjc_put_extended_margins(FILE *file, int length, int lm, int rm, int top)
-{
- bjc_put_command(file, 'p', 8);
- bjc_put_hi_lo(file, length);
- bjc_put_hi_lo(file, lm);
- bjc_put_hi_lo(file, rm);
- bjc_put_hi_lo(file, top);
-}
-
-/* Set image format (ESC ( t <count> <depth> <format> <ink>) */
-void
-bjc_put_image_format(FILE *file, char depth, char format, char ink)
-{
- bjc_put_command(file, 't', 3);
- fputc(depth, file);
- fputc(format, file);
- fputc(ink, file);
-}
-
-/* Page ID (ESC ( q <count> <id>) */
-void
-bjc_put_page_id(FILE *file, int id)
-{
- bjc_put_command(file, 'q', 1);
- fputc(id, file);
-}
-
-/* Continue raster image (ESC ( F <count> <data>) */
-void
-bjc_put_continue_image(FILE *file, const char *data, int count)
-{
- bjc_put_command(file, 'F', count);
- bjc_put_bytes(file, data, count);
-}
-
-/* BJ indexed image (ESC ( f <count> R <dot_rows> <dot_cols> <layers> */
-/* <index>) */
-void
-bjc_put_indexed_image(FILE *file, int dot_rows, int dot_cols, int layers)
-{
- bjc_put_command(file, 'f', 5);
- fputc('R', file); /* per spec */
- fputc(dot_rows, file);
- fputc(dot_cols, file);
- fputc(layers, file);
-}
-
-
-/* ------------------------------------------------------------------ */
-
-/* Invert a raster line ( we need it for Black -> K ) */
-bool
-bjc_invert_bytes(byte *row, uint raster, bool inverse, byte lastmask)
-{ bool ret=false;
-
- for(; raster > 1; row++, raster--) {
- if(!(inverse)) *row = ~(*row);
- if(*row) ret = true;
- }
- if(!(inverse)) *row ^= 0xff;
- *row &= lastmask;
- return ret;
-}
-
-bool
-bjc_invert_cmyk_bytes(byte *rowC, byte *rowM, byte *rowY, byte *rowK,
- uint raster, bool inverse, byte lastmask,
- skip_t *skip)
-{ bool ret=false;
- byte tmpC, tmpM, tmpY;
-
- skip->skipC=false;
- skip->skipM=false;
- skip->skipY=false;
- skip->skipK=false;
-
- for(; raster > 1; rowC++, rowM++, rowY++, rowK++, raster--) {
- if(inverse) {
- tmpC = ~(*rowC|*rowK);
- tmpM = ~(*rowM|*rowK);
- tmpY = ~(*rowY|*rowK);
- *rowK = ~(*rowC|*rowM|*rowY|*rowK);
- *rowC = tmpC;
- *rowM = tmpM;
- *rowY = tmpY;
- }
- if(*rowC) skip->skipC=true;
- if(*rowM) skip->skipM=true;
- if(*rowY) skip->skipY=true;
- if(*rowK) skip->skipK=true;
- if(*rowC|*rowM|*rowY|*rowK) ret = true;
- }
- return ret;
-}
-
-/* "1D runlength compression for BJC-600
- * this code is borrowed from gdevpcl.c:gdev_pcl_mode2compress."
- * I copy it from gdevcdj.c
- * It is return with the compressed length. 'compressed' point to the
- * compression buffer
- */
-uint
-bjc_compress(const byte *row, uint raster, byte *compressed)
-{
- const byte *end_row = row;
- register const byte *exam = row;
- register byte *cptr = compressed; /* output pointer into compressed bytes */
-
- end_row += raster;
-
- while ( exam < end_row ) {
- /* Search ahead in the input looking for a run */
- /* of at least 4 identical bytes. */
- const byte *compr = exam;
- const byte *end_dis;
- const byte *next;
- register byte test, test2;
-
- test = *exam;
- while ( exam < end_row ) {
- test2 = *++exam;
- if ( test == test2 )
- break;
- test = test2;
- }
-
-
- /* Find out how long the run is */
- end_dis = exam - 1;
- if ( exam == end_row ) { /* no run */
- next = --end_row;
- } else {
-
- next = exam + 1;
- while ( next < end_row && *next == test ) next++;
- }
-
-
- /* Now [compr..end_dis) should be encoded as dissimilar, */
- /* and [end_dis..next) should be encoded as similar. */
- /* Note that either of these ranges may be empty. */
-
-
- for ( ; ; ) { /* Encode up to 128 dissimilar bytes */
- uint count = end_dis - compr; /* uint for faster switch */
- switch ( count ) { /* Use memcpy only if it's worthwhile. */
- case 6: cptr[6] = compr[5];
- case 5: cptr[5] = compr[4];
- case 4: cptr[4] = compr[3];
- case 3: cptr[3] = compr[2];
- case 2: cptr[2] = compr[1];
- case 1: cptr[1] = compr[0];
- *cptr = count - 1;
- cptr += count + 1;
- case 0: /* all done */
- break;
- default:
- if ( count > 128 ) count = 128;
- *cptr++ = count - 1;
- memcpy(cptr, compr, count);
- cptr += count, compr += count;
- continue;
- }
- break;
- }
-
-
- { /* Encode up to 128 similar bytes. */
- /* Note that count may be <0 at end of row. */
- int count = next - end_dis;
- if (next < end_row || test != 0)
- while ( count > 0 ) {
-
- int this = (count > 128 ? 128 : count);
- *cptr++ = 257 - this;
- *cptr++ = (byte)test;
- count -= this;
- }
- exam = next;
- }
- }
- return (uint)(cptr - compressed);
-}
-
-void bjc_rgb_to_cmy(byte r, byte g, byte b,
- int *c, int *m, int *y)
-{ *c=255-r;
- *m=255-g;
- *y=255-b;
-}
-
-void bjc_rgb_to_gray(byte r, byte g, byte b,
- int *k)
-{
- *k = ( (int)r * 77 + (int)g * 151 + (int)b * 28) >> 8;
-}
-
-int bjc_gamma_tableC[256];
-int bjc_gamma_tableM[256];
-int bjc_gamma_tableY[256];
-#define bjc_gamma_tableK bjc_gamma_tableC
-
-void bjc_build_gamma_table(float gamma, char color)
-{ int i;
- int *table;
-
- switch(color) {
- case CMYK_C:
- table = bjc_gamma_tableC;
- break;
- case CMYK_M:
- table = bjc_gamma_tableM;
- break;
- case CMYK_Y:
- table = bjc_gamma_tableY;
- break;
- case CMYK_K:
- default:
- table = bjc_gamma_tableK;
- break;
- }
-
- if(gamma == 1.0) for (i = 0; i < 256; i++) table[i] = (255 - i) << 4;
- else for (i = 0; i < 256; i++) table[i] =
- 4080 - (int)(pow((double)i / 255.0, gamma) * 4080.0 + .5);
-}
-
-/* -------------------------------------------------------------------------*/
-/* Subroutines and tables for randomization */
-/* -------------------------------------------------------------------------*/
-
-int bjc_rand_seed[55] = {
-3627, 15177, 6104, 15555, 14210, 9940, 11987, 7070, 6147, 15691, 14536, 12896,
-8959, 14926, 9034, 13544, 13665, 3175, 10177, 14856, 16042, 4265, 13976, 10805,
-14817, 8216, 695, 8656, 9189, 15304, 1469, 9641, 1648, 16218, 12421, 5451,
-255, 11268, 16121, 11645, 1855, 5982, 9983, 1052, 5255, 15264, 6123, 3577,
-9712, 14629, 4593, 15670
-};
-int bjc_j=0, bjc_k=31;
-
-int bjc_treshold[1024];
-
-uint bjc_rand(void)
-{
- uint ret=bjc_rand_seed[bjc_j] = bjc_rand_seed[bjc_j++] +
- bjc_rand_seed[bjc_k++];
- if(bjc_j==55) bjc_j = 0;
- if(bjc_k==55) bjc_k = 0;
- return ret & 0x03ff;
-} /* random numbers 0-1023 */
-
-
-void bjc_init_tresh(int rnd)
-{
- int i=(int)(time(NULL) & 0x0ff);
- float delta=40.64*rnd;
- for(;i>0;i--) bjc_rand();
- for(i=-512; i<512; i++) bjc_treshold[i+512] =
- (int)(delta * i / 1024.0 + 2040);
-} /* init treshold array ~rnd% around halfway (127*16) */
-
-
-/* Declarations for Floyd-Steinberg dithering.
- *
- * Errors are accumulated into the array fserrors[], at a resolution of
- * 1/16th of a pixel count. The error at a given pixel is propagated
- * to its not-yet-processed neighbors using the standard F-S fractions,
- * ... (here) 7/16
- * 3/16 5/16 1/16
- * We work left-to-right on even rows, right-to-left on odd rows.
- *
- * We can get away with a single array (holding one row's worth of errors)
- * by using it to store the current row's errors at pixel columns not yet
- * processed, but the next row's errors at columns already processed. We
- * need only a few extra variables to hold the errors immediately around the
- * current column. (If we are lucky, those variables are in registers, but
- * even if not, they're probably cheaper to access than array elements are.)
- *
- * The fserrors[] array has (#columns + 2) entries; the extra entry at
- * each end saves us from special-casing the first and last pixels.
- * Each entry is three values long, one value for each color component.
- */
-
-bool FloydSteinbergDirectionForward = true;
-
-int *FloydSteinbergErrorsC;
-int *FloydSteinbergErrorsM;
-int *FloydSteinbergErrorsY;
-int *FloydSteinbergErrorsK;
-int *FloydSteinbergErrorsG;
-
-int FloydSteinbergC;
-int FloydSteinbergM;
-int FloydSteinbergY;
-int FloydSteinbergK;
-int FloydSteinbergG;
-
-int
-FloydSteinbergInitG(gx_device_printer * pdev)
-{ int i;
-#define ppdev ((gx_device_bjc_printer *) pdev)
-
-FloydSteinbergErrorsG = (int *) gs_alloc_bytes(pdev->memory,
- sizeof(int)*(pdev->width+3),
- "bjc error buffer");
-if (FloydSteinbergErrorsG == 0) /* can't allocate error buffer */
- return -1;
-FloydSteinbergDirectionForward=true;
-
-for (i=0; i < pdev->width+3; i++) FloydSteinbergErrorsG[i] = 0;
- /* clear */
-bjc_rgb_to_gray(ppdev->paperColor.red,
- ppdev->paperColor.green,
- ppdev->paperColor.blue,
- &FloydSteinbergG);
-FloydSteinbergG = (255 - FloydSteinbergG) << 4; /* Maybe */
-bjc_init_tresh(ppdev->rnd);
-return 0;
-#undef ppdev
-}
-
-void
-FloydSteinbergDitheringG(byte *row, byte *dithered, uint width,
- uint raster, bool limit_extr)
-{
- byte byteG=0, bitmask = 0x80; /* first bit */
- int i;
- int error = 0, delta;
- int err_corr;
- int *err_vect;
-
- if (FloydSteinbergDirectionForward) {
- /* First point */
- err_vect = FloydSteinbergErrorsG + 1;
-
- for( i=width; i>0; i--, row++, err_vect++) { /* i, sample, error */
- err_corr = bjc_gamma_tableK[255-(*row)] + FloydSteinbergG;
- if(err_corr > 4080 && limit_extr) err_corr = 4080;
- error += err_corr + *(err_vect+1); /* the error in 1/16 */
-
- if(error > bjc_treshold[bjc_rand()]) {
- error -= 4080;
- byteG |= bitmask;
- }
-
- *(err_vect+1) = (error + 8) >> 4;
- delta = error << 1; /* 2 err */
- error += delta; /* 3/16 */
- *(err_vect-1) += (error + 8) >> 4;
- error += delta; /* 5/16 */
- *err_vect += (error + 8) >> 4;
- error += delta + 8; /* 7/16 */
- error >>= 4;
-
- if (bitmask == 0x01) {
- *dithered = byteG;
- bitmask = 0x80;
- byteG = 0;
- dithered++;
- }
- else if (i == 1) {
- *dithered = byteG;
- }
- else bitmask >>= 1;
- }
- FloydSteinbergDirectionForward=false;
- }
- else {
- row += width - 1; /* point to the end of the row */
- dithered += raster - 1;
- bitmask = 1 << ((raster << 3 ) - width) ;
- err_vect = FloydSteinbergErrorsG + width + 1;
-
- for( i=width; i>0; i--, row--, err_vect--) {
- err_corr = bjc_gamma_tableK[255-(*row)] + FloydSteinbergG;
- if(err_corr > 4080 && limit_extr) err_corr = 4080;
-
- error += err_corr + *(err_vect - 1);
-
- if(error > bjc_treshold[bjc_rand()]) {
- error -= 4080;
- byteG |= bitmask;
- }
-
- *(err_vect-1) = (error + 8) >> 4; /* 1/16 */
- delta = error << 1; /* 2 err */
- error += delta;
- *(err_vect+1) += (error +8) >> 4; /* 3/16 */
- error += delta;
- *err_vect += (error + 8) >> 4; /* 5/16 */
- error += delta + 8; /* 7/16 */
- error >>= 4;
-
- if (bitmask == 0x80) {
- *dithered = byteG;
- bitmask = 0x01;
- byteG = 0;
- dithered--;
- } else if(i==1) {
- *dithered = byteG;
- }
- else bitmask <<= 1;
- }
- FloydSteinbergDirectionForward=true;
- }
-}
-
-void FloydSteinbergCloseG(gx_device_printer *pdev)
-{
- gs_free_object(pdev->memory, FloydSteinbergErrorsG, "bjc error buffer");
-}
-
-int
-FloydSteinbergInitC(gx_device_printer * pdev)
-{ int i;
-#define ppdev ((gx_device_bjc_printer *) pdev)
-
-FloydSteinbergErrorsC = (int *) gs_alloc_bytes(pdev->memory,
- 3*sizeof(int)*(pdev->width+3),
- "bjc CMY error buffer");
-if (FloydSteinbergErrorsC == 0 ) /* can't allocate error buffer */
- return -1;
-
-for (i=0; i < 3 * (pdev->width+3); i++) FloydSteinbergErrorsC[i] = 0;
-
-FloydSteinbergDirectionForward=true;
-bjc_rgb_to_cmy(ppdev->paperColor.red,
- ppdev->paperColor.green,
- ppdev->paperColor.blue,
- &FloydSteinbergC,
- &FloydSteinbergM,
- &FloydSteinbergY);
-
-FloydSteinbergC <<= 4;
-FloydSteinbergM <<= 4;
-FloydSteinbergY <<= 4;
-bjc_init_tresh(ppdev->rnd);
-return 0;
-#undef ppdev
-}
-
-void
-FloydSteinbergDitheringC(byte *row, byte *dithered, uint width,
- uint raster, bool limit_extr, bool composeK)
-{ byte byteC=0, byteM=0, byteY=0, byteK=0, bitmask = 0x80; /* first bit */
- int i;
- int errorC = 0, errorM = 0, errorY = 0, delta;
- int err_corrC, err_corrM, err_corrY;
- int *err_vect;
-
- if (FloydSteinbergDirectionForward) {
- err_vect = FloydSteinbergErrorsC + 3; /* errCMY */
- /* First point */
-
- for( i=width; i>0; i--, row+=4, err_vect+=3) { /*separate components */
-
-/* C + K */
- err_corrC = bjc_gamma_tableC[ (*row) + (*(row+3))]
- + FloydSteinbergC;
- err_corrM = bjc_gamma_tableM[(*(row+1)) + (*(row+3))]
- + FloydSteinbergM;
- err_corrY = bjc_gamma_tableY[(*(row+2)) + (*(row+3))]
- + FloydSteinbergY;
-
- if(err_corrC > 4080 && limit_extr) err_corrC = 4080;
- if(err_corrM > 4080 && limit_extr) err_corrM = 4080;
- if(err_corrY > 4080 && limit_extr) err_corrY = 4080;
-
- errorC += err_corrC + (*(err_vect + 3)); /* CMYCMYCMY */
- errorM += err_corrM + (*(err_vect + 4)); /* | ^ ! */
- errorY += err_corrY + (*(err_vect + 5));
-
- if(errorC > bjc_treshold[bjc_rand()]) {
- errorC -= 4080;
- byteC |= bitmask;
- }
-
- if(errorM > bjc_treshold[bjc_rand()]) {
- errorM -= 4080;
- byteM |= bitmask;
- }
-
- if(errorY > bjc_treshold[bjc_rand()]) {
- errorY -= 4080;
- byteY |= bitmask;
- }
-
- *(err_vect+3) = (errorC + 8) >> 4; /* 1/16 */
- delta = errorC << 1; /* 2 err */
- errorC += delta;
- *(err_vect-3) += (errorC + 8) >> 4; /* 3/16 */
- errorC += delta;
- *err_vect += (errorC + 8) >> 4; /* 5/16 */
- errorC += delta + 8; /* 7/16 */
- errorC >>= 4;
-
- *(err_vect+4) = (errorM + 8) >> 4; /* 1/16 */
- delta = errorM << 1; /* 2 err */
- errorM += delta;
- *(err_vect-2) += (errorM + 8) >> 4; /* 3/16 */
- errorM += delta;
- *(err_vect+1) += (errorM + 8) >> 4; /* 5/16 */
- errorM += delta + 8; /* 7/16 */
- errorM >>= 4;
-
- *(err_vect+5) = (errorY + 8) >> 4; /* 1/16 */
- delta = errorY << 1; /* 2 err */
- errorY += delta;
- *(err_vect-1) += (errorY + 8) >> 4; /* 3/16 */
- errorY += delta;
- *(err_vect+2) += (errorY + 8) >> 4; /* 5/16 */
- errorY += delta + 8; /* 7/16 */
- errorY >>= 4;
-
- if (bitmask == 0x01) {
- bitmask = 0x80;
- if(composeK) {
- byteK = byteC & byteM & byteY;
- byteC = byteC & ~byteK;
- byteM = byteM & ~byteK;
- byteY = byteY & ~byteK;
- } /* if no K byteK always 0 */
- *dithered = byteC;
-