sane-project-website/old-archive/2001-01/0286.html

285 wiersze
10 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: canon backend driver fix</TITLE>
<META NAME="Author" CONTENT="Mitsuru Okaniwa (m-okaniwa@bea.hi-ho.ne.jp)">
<META NAME="Subject" CONTENT="Re: canon backend driver fix">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: canon backend driver fix</H1>
<!-- received="Thu Jan 25 20:00:29 2001" -->
<!-- isoreceived="20010126040029" -->
<!-- sent="Fri, 26 Jan 2001 12:50:22 +0900" -->
<!-- isosent="20010126035022" -->
<!-- name="Mitsuru Okaniwa" -->
<!-- email="m-okaniwa@bea.hi-ho.ne.jp" -->
<!-- subject="Re: canon backend driver fix" -->
<!-- id="002701c0874c$7f9661c0$6425530a@necpcuser" -->
<!-- inreplyto="3A6B4D21.5B84A255@cubic.org" -->
<STRONG>From:</STRONG> Mitsuru Okaniwa (<A HREF="mailto:m-okaniwa@bea.hi-ho.ne.jp?Subject=Re:%20canon%20backend%20driver%20fix&In-Reply-To=&lt;002701c0874c$7f9661c0$6425530a@necpcuser&gt;"><EM>m-okaniwa@bea.hi-ho.ne.jp</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu Jan 25 2001 - 19:50:22 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0287.html">Shea Martin: "sane 1.0.1/ how to disabe gimp compat"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0285.html">Nils Gundelach: "Re: Scanmaker 636"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0233.html">doj: "canon backend driver fix"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0288.html">doj: "Re: canon backend driver fix"</A>
<LI><STRONG>Next in thread:</STRONG> <A HREF="0238.html">Randolph Bentson: "Re: ADF scanner question"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0288.html">doj: "Re: canon backend driver fix"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#286">[ date ]</A>
<A HREF="index.html#286">[ thread ]</A>
<A HREF="subject.html#286">[ subject ]</A>
<A HREF="author.html#286">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Dear Mr.Doj
<BR>
<P>I'm the CanoScan user.
<BR>
I have a CanoScan FB620S, and I'm using the model in SANE1.0.3 on Linux.
<BR>
About your patch, would you teach me ?
<BR>
<P>----- Original Message -----
<BR>
from: &quot;doj&quot; &lt;<A HREF="mailto:doj@cubic.org?Subject=Re:%20canon%20backend%20driver%20fix&In-Reply-To=&lt;002701c0874c$7f9661c0$6425530a@necpcuser&gt;">doj@cubic.org</A>&gt;
<BR>
to : &lt;<A HREF="mailto:sane-devel@mostang.com?Subject=Re:%20canon%20backend%20driver%20fix&In-Reply-To=&lt;002701c0874c$7f9661c0$6425530a@necpcuser&gt;">sane-devel@mostang.com</A>&gt;
<BR>
sent : 22 Jan. 2001 at 5:57
<BR>
subject: canon backend driver fix
<BR>
<P><P><EM>&gt; I am using an CanoScan 300. The 0.99 versions of SANE were working with
</EM><BR>
<EM>&gt; my scanner, but since v1.0 the driver complained.
</EM><BR>
Are you using SANE 1.0.1 now ?
<BR>
Or SANE 1.0.3 ?
<BR>
<P><EM>&gt; Now I have worked
</EM><BR>
<EM>&gt; myself through the sources and found some glitches, which I think result
</EM><BR>
<EM>&gt; from another bug beeing solved not 100% correct.
</EM><BR>
What glitches did you have with a CanoScan 300 ?
<BR>
<P><EM>&gt; With the patch I have attached everything is working fine with my system
</EM><BR>
<EM>&gt; again. I think the patch should work with others as well.
</EM><BR>
I'm a beginner of SANE or Linux.
<BR>
And I have the problem the warning error at &quot;make all&quot; of Canon Backend(v
<BR>
991114) with SANE 1.0.3.
<BR>
It is a &quot;warning: comparison between signed and unsigned&quot;.
<BR>
So, I think there is a hint with my problem in your patch.
<BR>
But I don't understand the parts of your modification well.
<BR>
Would you teach me the meaning of the following parts in your modification
<BR>
if you are OK ?
<BR>
<P><P>----------------------------------------------------------------------------
<BR>
<PRE>
----
<P><P>&gt; diff -w -b -B -u -U 5 -r -P sane-backends-1.0.4/backend/canon-sane.c
sane-backends-1.0.4.doj/backend/canon-sane.c
&gt; --- sane-backends-1.0.4/backend/canon-sane.c Sat Aug 12 17:09:02 2000
&gt; +++ sane-backends-1.0.4.doj/backend/canon-sane.c Sun Dec 31 00:36:39 2000
&gt; @@ -103,22 +103,22 @@
&gt; for (dev = first_dev; dev; dev = dev-&gt;next)
&gt; {
&gt; if (strcmp (dev-&gt;sane.name, devnam) == 0)
&gt; break;
&gt; }
&gt; + }
&gt; + else
&gt; + {
&gt; + dev = first_dev;
&gt; + }
&gt;
&gt; if (!dev)
&gt; {
&gt; status = attach (devnam, &amp;dev);
&gt; if (status != SANE_STATUS_GOOD)
&gt; return (status);
&gt; }
&gt; - }
&gt; - else
&gt; - {
&gt; - dev = first_dev;
&gt; - }
&gt;
&gt; if (!dev)
&gt; return (SANE_STATUS_INVAL);
&gt;
&gt; s = malloc (sizeof (*s));
&gt; @@ -1065,11 +1065,11 @@
&gt; /* { */
&gt; /* DBG (1, &quot;attach: GET SCAN MODE for scan control conditions
failed\n&quot;); */
&gt; /* sanei_scsi_close (s-&gt;fd); */
&gt; /* return (SANE_STATUS_INVAL); */
&gt; /* } */
&gt; - for (i=0; i&lt;buf_size; i++)
&gt; + for (i=0; i&lt;(int)buf_size; i++)
&gt; {
&gt; DBG(3, &quot;scan mode control byte[%d] = %d\n&quot;, i, ebuf[i]);
&gt; }
&gt;
&gt; DBG (3, &quot;attach: sending GET SCAN MODE for transparency unit\n&quot;);
&gt; @@ -1081,11 +1081,11 @@
&gt; {
&gt; DBG (1, &quot;attach: GET SCAN MODE for transparency unit failed\n&quot;);
&gt; sanei_scsi_close (s-&gt;fd);
&gt; return (SANE_STATUS_INVAL);
&gt; }
&gt; - for (i=0; i&lt;buf_size; i++)
&gt; + for (i=0; i&lt;(int)buf_size; i++)
&gt; {
&gt; DBG(3, &quot;scan mode control byte[%d] = %d\n&quot;, i, ebuf[i]);
&gt; }
&gt;
&gt; #endif
&gt; @@ -1291,11 +1291,11 @@
&gt; {
&gt; DBG (1, &quot;sane_start: GET SCAN MODE for scan control conditions
failed\n&quot;);
&gt; sanei_scsi_close (s-&gt;fd);
&gt; return (SANE_STATUS_INVAL);
&gt; }
&gt; - for (i=0; i&lt;buf_size; i++)
&gt; + for (i=0; i&lt;(int)buf_size; i++)
&gt; {
&gt; DBG(3, &quot;scan mode byte[%d] = %d\n&quot;, i, ebuf[i]);
&gt; }
&gt; #endif
&gt;
&gt; diff -w -b -B -u -U 5 -r -P sane-backends-1.0.4/backend/canon-scsi.c
sane-backends-1.0.4.doj/backend/canon-scsi.c
&gt; --- sane-backends-1.0.4/backend/canon-scsi.c Sat Aug 12 17:09:02 2000
&gt; +++ sane-backends-1.0.4.doj/backend/canon-scsi.c Sun Dec 31 00:29:26 2000
&gt; @@ -377,11 +377,11 @@
&gt; (page == SCAN_CONTROL_CONDITIONS) ? 0x14 : 0x24;
&gt;
&gt; memcpy (cmd + 10, data, (page == TRANSPARENCY_UNIT) ? 8 :
&gt; (page == SCAN_CONTROL_CONDITIONS) ? 16 : 24);
&gt;
&gt; - for(i = 0; i &lt; sizeof(cmd); i++)
&gt; + for(i = 0; i &lt;(int) sizeof(cmd); i++)
&gt; {
&gt; DBG (31, &quot;define scan mode: cmd[%d]='0x%0X'\n&quot;, i, cmd[i]);
&gt; }
&gt; cmdlen = (page == TRANSPARENCY_UNIT) ? 18 :
&gt; (page == SCAN_CONTROL_CONDITIONS) ? 26 : 34;
&gt; diff -w -b -B -u -U 5 -r -P sane-backends-1.0.4/backend/canon.c
sane-backends-1.0.4.doj/backend/canon.c
&gt; --- sane-backends-1.0.4/backend/canon.c Sat Aug 12 17:09:03 2000
&gt; +++ sane-backends-1.0.4.doj/backend/canon.c Sun Dec 31 00:27:48 2000
&gt; @@ -226,11 +226,11 @@
&gt; {
&gt; DBG (1, &quot;get scan mode failed: %s\n&quot;, sane_strstatus (status));
&gt; return;
&gt; }
&gt;
&gt; - for (i=0; i&lt;buf_size; i++)
&gt; + for (i=0; i&lt;(int)buf_size; i++)
&gt; {
&gt; DBG(3, &quot;scan mode control byte[%d] = %d\n&quot;, i, tbuf[i]);
&gt; }
&gt; dev-&gt;tpu.Status = ( tbuf[2 + 4 + 5] &gt;&gt; 7 ) ?
&gt; TPU_STAT_INACTIVE : TPU_STAT_NONE;
&gt; @@ -280,11 +280,11 @@
&gt; DBG (1, &quot;get scan mode failed: %s\n&quot;, sane_strstatus (status));
&gt; perror(&quot;get scan mode failed&quot;);
&gt; return;
&gt; }
&gt;
&gt; - for (i=0; i&lt;buf_size; i++)
&gt; + for (i=0; i&lt;(int)buf_size; i++)
&gt; {
&gt; DBG(3, &quot;scan mode control byte[%d] = %d\n&quot;, i, abuf[i]);
&gt; /* printf(&quot;scan mode control byte[%d] = %d\n&quot;, i, abuf[i]); */
&gt; }
&gt;
&gt; @@ -594,11 +594,11 @@
&gt; {
&gt; DBG (1, &quot;attach: GET SCAN MODE for scan control conditions
failed\n&quot;);
&gt; sanei_scsi_close (fd);
&gt; return (SANE_STATUS_INVAL);
&gt; }
&gt; - for (i=0; i&lt;buf_size; i++)
&gt; + for (i=0; i&lt;(int)buf_size; i++)
&gt; {
&gt; DBG(3, &quot;scan mode byte[%d] = %d\n&quot;, i, ebuf[i]);
&gt; }
&gt;
&gt; DBG (3, &quot;attach: sending (extended) INQUIRY\n&quot;);
&gt; @@ -1123,11 +1123,11 @@
&gt;
&gt; /* Build the histograms */
&gt; DBG(7, &quot;sizeof(histo)='%lu'\n&quot;, (unsigned long) sizeof(histo));
&gt; memset (histo, 0, sizeof(histo));
&gt;
&gt; - for(i=0; i&lt;bread; i+=3)
&gt; + for(i=0; i&lt;(int)bread; i+=3)
&gt; {
&gt; /* j = (int)adjbuf[i] - 71; */
&gt; /* j = (j&lt;0) ? -j : j; */
&gt; /* ++histo[RED][j]; */
&gt; ++histo[RED][(int)adjbuf[i]];
&gt; Binary files sane-backends-1.0.4/core and sane-backends-1.0.4.doj/core
differ
&gt;
<P>regards,
<P>Mitsuru Okaniwa
<P><P>--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20canon%20backend%20driver%20fix&In-Reply-To=&lt;002701c0874c$7f9661c0$6425530a@necpcuser&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0287.html">Shea Martin: "sane 1.0.1/ how to disabe gimp compat"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0285.html">Nils Gundelach: "Re: Scanmaker 636"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0233.html">doj: "canon backend driver fix"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0288.html">doj: "Re: canon backend driver fix"</A>
<LI><STRONG>Next in thread:</STRONG> <A HREF="0238.html">Randolph Bentson: "Re: ADF scanner question"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0288.html">doj: "Re: canon backend driver fix"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#286">[ date ]</A>
<A HREF="index.html#286">[ thread ]</A>
<A HREF="subject.html#286">[ subject ]</A>
<A HREF="author.html#286">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu Jan 25 2001 - 20:41:24 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>