1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
freebsd-ports/print/hplip3/files/patch-0.9.11-2-official
Doug Barton 9ab82d60d8 Fix port to work on RELENG_4.
Submitted by:	Anish Mistry <amistry@am-productions.biz> (maintainer)
2006-05-26 23:50:11 +00:00

277 lines
9.8 KiB
Plaintext

diff -uNr hplip-0.9.11.old/data/xml/models.xml data/xml/models.xml
--- hplip-0.9.11.old/data/xml/models.xml 2006-05-08 12:27:06.000000000 -0700
+++ data/xml/models.xml 2006-05-12 15:30:54.754891424 -0700
@@ -7797,6 +7797,84 @@
</r0>
</model>
+<model name="PSC_950">
+ <id>MFG:Hewlett-Packard;MDL:PSC 900 Series;SKU:PSC 950;CMD:2,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard PSC 900 Series;1284.3M:f7f,f7f;1284.4DL:4d,4e,1;SERN:MY15U31143WP;VSTATUS:$AU0$AU0,ff,DN,PENF,CUT,K0,C0,SM,NR,KP066,CP095;AiO:00;DW-PCL;</id>
+ <icon>PSC_900_Series.png</icon>
+ <support type="2"/>
+ <case-model>
+ </case-model>
+ <io support="2" mode="1" control="0" mfp-mode="2" scan-port="0"/>
+ <align type="9"/>
+ <clean type="3"/>
+ <color-cal type="0"/>
+ <status type="1"/>
+ <scan type="1"/>
+ <fax type="0"/>
+ <pcard type="1"/>
+ <copy type="0"/>
+ <tech class="DJ9xx" type="2"/>
+ <embedded-server type="0"/>
+ <panel-check type="1"/>
+ <linefeed-cal type="0"/>
+ <pq-diag type="0"/>
+ <r0>
+ <agent1 kind="3" type="1" sku="15 (C6615DN)"/>
+ <agent2 kind="3" type="2" sku="78 (C6578AN / C6578DN)"/>
+ </r0>
+</model>
+
+<model name="PSC_950vr">
+ <id>MFG:Hewlett-Packard;MDL:PSC 900 Series;SKU:PSC 950;CMD:2,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard PSC 900 Series;1284.3M:f7f,f7f;1284.4DL:4d,4e,1;SERN:MY15U31143WP;VSTATUS:$AU0$AU0,ff,DN,PENF,CUT,K0,C0,SM,NR,KP066,CP095;AiO:00;DW-PCL;</id>
+ <icon>PSC_900_Series.png</icon>
+ <support type="2"/>
+ <case-model>
+ </case-model>
+ <io support="2" mode="1" control="0" mfp-mode="2" scan-port="0"/>
+ <align type="9"/>
+ <clean type="3"/>
+ <color-cal type="0"/>
+ <status type="1"/>
+ <scan type="1"/>
+ <fax type="0"/>
+ <pcard type="1"/>
+ <copy type="0"/>
+ <tech class="DJ9xx" type="2"/>
+ <embedded-server type="0"/>
+ <panel-check type="1"/>
+ <linefeed-cal type="0"/>
+ <pq-diag type="0"/>
+ <r0>
+ <agent1 kind="3" type="1" sku="15 (C6615DN)"/>
+ <agent2 kind="3" type="2" sku="78 (C6578AN / C6578DN)"/>
+ </r0>
+</model>
+
+<model name="PSC_950xi">
+ <id>MFG:Hewlett-Packard;MDL:PSC 900 Series;SKU:PSC 950;CMD:2,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard PSC 900 Series;1284.3M:f7f,f7f;1284.4DL:4d,4e,1;SERN:MY15U31143WP;VSTATUS:$AU0$AU0,ff,DN,PENF,CUT,K0,C0,SM,NR,KP066,CP095;AiO:00;DW-PCL;</id>
+ <icon>PSC_900_Series.png</icon>
+ <support type="2"/>
+ <case-model>
+ </case-model>
+ <io support="2" mode="1" control="0" mfp-mode="2" scan-port="0"/>
+ <align type="9"/>
+ <clean type="3"/>
+ <color-cal type="0"/>
+ <status type="1"/>
+ <scan type="1"/>
+ <fax type="0"/>
+ <pcard type="1"/>
+ <copy type="0"/>
+ <tech class="DJ9xx" type="2"/>
+ <embedded-server type="0"/>
+ <panel-check type="1"/>
+ <linefeed-cal type="0"/>
+ <pq-diag type="0"/>
+ <r0>
+ <agent1 kind="3" type="1" sku="15 (C6615DN)"/>
+ <agent2 kind="3" type="2" sku="78 (C6578AN / C6578DN)"/>
+ </r0>
+</model>
+
<model name="Photosmart_2570_series">
<id></id>
<icon>psc_2300_series.png</icon>
diff -uNr hplip-0.9.11.old/prnt/hpijs/colormatch.cpp prnt/hpijs/colormatch.cpp
--- hplip-0.9.11.old/prnt/hpijs/colormatch.cpp 2006-05-09 11:04:30.000000000 -0700
+++ prnt/hpijs/colormatch.cpp 2006-05-11 16:17:17.000000000 -0700
@@ -221,15 +221,21 @@
{
for (unsigned int r = 0; r < 9; r++)
{
+#ifndef NDEBUG
unsigned long ul_RedMapPtr = r * 9 * 9;
+#endif
for (unsigned int g = 0; g < 9; g++)
{
+#ifndef NDEBUG
unsigned long ul_GreenMapPtr = g * 9;
+#endif
for (unsigned int b = 0; b < 9; b++)
{
unsigned long mapptr = b + (g * 9) + (r * 9 * 9); // get address in map
+#ifndef NDEBUG
unsigned long ul_MapPtr = b + ul_GreenMapPtr + ul_RedMapPtr;
ASSERT(mapptr == ul_MapPtr);
+#endif
// put r,g,b in monitor range
unsigned int oldR = r * 255 >> 3;
unsigned int oldG = g * 255 >> 3;
diff -uNr hplip-0.9.11.old/prnt/hpijs/hpijs.cpp prnt/hpijs/hpijs.cpp
--- hplip-0.9.11.old/prnt/hpijs/hpijs.cpp 2006-02-23 14:31:17.000000000 -0800
+++ prnt/hpijs/hpijs.cpp 2006-05-12 15:44:27.509333968 -0700
@@ -177,7 +177,7 @@
char *tail;
int status = 0;
char svalue[IJS_MAX_PARAM+1];
- float w, h;
+ float w, h, dx, dy;
/* Sanity check input value. */
if (value_size > IJS_MAX_PARAM)
@@ -256,8 +256,12 @@
}
else
{
+
+ dx = w > pSS->PaperWidth ? w - pSS->PaperWidth : pSS->PaperWidth - w;
+ dy = h > pSS->PaperHeight ? h - pSS->PaperHeight : pSS->PaperHeight - h;
+
/* Middle of print Job, ignore paper size if same. */
- if (!(w == pSS->PaperWidth && h == pSS->PaperHeight))
+ if ((dx > 0.03) || (dy > 0.03))
{
pSS->FirstRaster = 1; /* force new Job */
pSS->PaperWidth = w; /* set new paper size */
@@ -272,19 +276,19 @@
}
else if (!strcmp (key, "Quality:Quality"))
{
- pSS->Quality = strtol(svalue, &tail, 10);
+ pSS->Quality = (QUALITY_MODE) strtol(svalue, &tail, 10);
}
else if (!strcmp (key, "Quality:MediaType"))
{
- pSS->MediaType = strtol(svalue, &tail, 10);
+ pSS->MediaType = (MEDIATYPE) strtol(svalue, &tail, 10);
}
else if (!strcmp (key, "Quality:ColorMode"))
{
- pSS->ColorMode = strtol(svalue, &tail, 10);
+ pSS->ColorMode = (COLORMODE) strtol(svalue, &tail, 10);
}
else if (!strcmp (key, "Quality:PenSet"))
{
- pSS->PenSet = strtol(svalue, &tail, 10);
+ pSS->PenSet = (PEN_TYPE) strtol(svalue, &tail, 10);
}
else if (!strcmp (key, "Quality:FullBleed"))
{
diff -uNr hplip-0.9.11.old/prnt/hpijs/ljfastraster.cpp prnt/hpijs/ljfastraster.cpp
--- hplip-0.9.11.old/prnt/hpijs/ljfastraster.cpp 2006-05-09 11:04:30.000000000 -0700
+++ prnt/hpijs/ljfastraster.cpp 2006-05-11 16:34:57.000000000 -0700
@@ -1215,7 +1215,7 @@
m_compressedsize = 2 * inputsize * INDY_STRIP_HEIGHT;
BOOL bRet = Compress (compressBuf,
- (uint32_t *) &m_compressedsize,
+ &m_compressedsize,
pbyInputImageBuffer,
inputsize,
m_lCurrCDRasterRow,
diff -uNr hplip-0.9.11.old/prnt/hpijs/ljfastraster.h prnt/hpijs/ljfastraster.h
--- hplip-0.9.11.old/prnt/hpijs/ljfastraster.h 2006-05-09 11:04:30.000000000 -0700
+++ prnt/hpijs/ljfastraster.h 2006-05-11 16:34:57.000000000 -0700
@@ -32,6 +32,7 @@
#ifndef APDK_LJFASTRASTER_H
#define APDK_LJFASTRASTER_H
+#include "global_types.h"
APDK_BEGIN_NAMESPACE
/*!
@@ -136,7 +137,7 @@
long m_lCurrBlockHeight;
long m_lPrinterRasterRow; // Current printer raster row.
- unsigned long m_compressedsize;
+ uint32_t m_compressedsize;
BOOL m_bCompressed;
float m_fRatio;
HPUInt8 *pbySeedRow;
diff -uNr hplip-0.9.11.old/prnt/hpijs/ljjetready.cpp prnt/hpijs/ljjetready.cpp
--- hplip-0.9.11.old/prnt/hpijs/ljjetready.cpp 2006-05-09 11:04:30.000000000 -0700
+++ prnt/hpijs/ljjetready.cpp 2006-05-11 15:49:52.000000000 -0700
@@ -473,7 +473,7 @@
//-----------------------------------------------------------------------------
DRIVER_ERROR HeaderLJJetReady::MapPCLMediaTypeToString (MEDIATYPE eM)
{
- DRIVER_ERROR err;
+ DRIVER_ERROR err = SYSTEM_ERROR;
BYTE szPlain[] = {"\xC8\xC1\x05\x00Plain\xF8\x27"};
BYTE szPhoto[] = {"\xC8\xC1\x05\x00Gloss\xF8\x27"};
diff -uNr hplip-0.9.11.old/prnt/hpijs/services.cpp prnt/hpijs/services.cpp
--- hplip-0.9.11.old/prnt/hpijs/services.cpp 2006-02-23 14:31:47.000000000 -0800
+++ prnt/hpijs/services.cpp 2006-05-12 15:44:44.645728840 -0700
@@ -46,6 +46,12 @@
int UXServices::InitDuplexBuffer()
{
+ /* Free buffer if new page size in middle of print job. */
+ if (RastersOnPage)
+ delete [] RastersOnPage;
+ if (KRastersOnPage)
+ delete [] KRastersOnPage;
+
/* Calculate duplex page buffer */
CurrentRaster = ph.height - 1; /* Height = physical page in pixels */
RastersOnPage = (BYTE **) new BYTE[(ph.height) * sizeof (BYTE *)];
@@ -270,12 +276,13 @@
}
}
- Quality = 0; /* normal */
- MediaType = 0; /* plain */
- ColorMode = 2; /* color */
+ Quality = QUALITY_NORMAL;
+ MediaType = MEDIA_PLAIN;
+ ColorMode = COLOR;
PenSet = DUMMY_PEN;
RastersOnPage = 0;
+ KRastersOnPage = 0;
pPC = NULL;
pJob = NULL;
Duplex = 0;
@@ -294,6 +301,8 @@
{
if (RastersOnPage)
delete [] RastersOnPage;
+ if (KRastersOnPage)
+ delete [] KRastersOnPage;
if (hpFD >= 0)
hplip_CloseHP(hpFD);
hplip_Exit();
diff -uNr hplip-0.9.11.old/prnt/hpijs/services.h prnt/hpijs/services.h
--- hplip-0.9.11.old/prnt/hpijs/services.h 2005-09-14 10:19:08.000000000 -0700
+++ prnt/hpijs/services.h 2006-05-12 15:44:40.360380312 -0700
@@ -35,6 +35,8 @@
#include <stdio.h>
#include <math.h>
+#include "global_types.h"
+
APDK_USING_NAMESPACE
class UXServices:public SystemServices
@@ -123,10 +125,10 @@
const float *Margin;
int Model; /* selected device: -1=no, 1=yes */
int OutputPath; /* open file descriptor */
- int Quality; /* 0=normal, 1=draft, 2=best */
- int MediaType; /* 0=plain, 1=premium, 2=photo */
- int ColorMode; /* 0=grey_k, 1=grey_cmy, 2=color */
- int PenSet; /* 0=black_pen, 1=color_pen, 2=both_pens, 3=mdl_pen, 4=mdl_both */
+ QUALITY_MODE Quality;
+ MEDIATYPE MediaType;
+ COLORMODE ColorMode;
+ PEN_TYPE PenSet;
int MediaPosition;
float PaperWidth; /* physical width in inches */
float PaperHeight; /* physical height in inches */