sane-project-website/old-archive/1999-11/0279.html

149 wiersze
6.1 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Sun Nov 28 09:09:48 1999 PST" -->
<!-- sent="Sun, 28 Nov 1999 17:26:43 +0100" -->
<!-- name="Henning Meier-Geinitz" -->
<!-- email="henningmg@gmx.de" -->
<!-- subject="Re: Mustek 600 IIN color patch" -->
<!-- id="" -->
<!-- inreplyto="38404221.3157E21@informatik.umu.se" -->
<title>sane-devel: Re: Mustek 600 IIN color patch</title>
<h1>Re: Mustek 600 IIN color patch</h1>
<b>Henning Meier-Geinitz</b> (<a href="mailto:henningmg@gmx.de"><i>henningmg@gmx.de</i></a>)<br>
<i>Sun, 28 Nov 1999 17:26:43 +0100</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#279">[ date ]</a><a href="index.html#279">[ thread ]</a><a href="subject.html#279">[ subject ]</a><a href="author.html#279">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0280.html">Oliver Rauch: "Re: Thanks"</a>
<li> <b>Previous message:</b> <a href="0278.html">Cyril Y. Nickonorov: "Thanks"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
--h31gzZEtNLTqOjlF<br>
Content-Type: text/plain; charset=us-ascii<br>
<p>
Hi,<br>
<p>
<i>&gt; Mr. Meier-Geinitz, thank you very much for your fast reply on my</i><br>
<i>&gt; question.</i><br>
<i>&gt; Unfortunaley, the problem seams to continue to exist even thought I have</i><br>
<i>&gt; applied the patch.</i><br>
<i>&gt; There was however some problems when I patched it:</i><br>
<i>&gt; </i><br>
<i>&gt; "patching file 'backend/mustek.c'</i><br>
<i>&gt; Hunk #1 succeeded at 1873 with fuzz 1 (offset 479 lines)</i><br>
<i>&gt; Hunk #2 FAILED at 1883</i><br>
<i>&gt; Hunk #3 FAILED at 1900</i><br>
<i>&gt; 2 out of 3 hunks FAILED -- saving rejects to backend/mustek.c.rej"</i><br>
<p>
The patch was against an older version of sane but works for me:<br>
<p>
hmg1:/usr/src/sane-1.0.1 # patch -p1 &lt;../dev-sane/sane7.dif<br>
patching file backend/mustek.c<br>
Hunk #1 succeeded at 1873 (offset 479 lines).<br>
Hunk #2 succeeded at 1404 with fuzz 2.<br>
Hunk #3 succeeded at 1906 (offset 485 lines). <br>
<p>
I will try to make a new patch and attach it to this mail. Possibly<br>
the old one didn't work because of some blank/tab problems with copy<br>
and paste. Try to save the patch directly from the mail.<br>
<p>
<i>&gt; I have tried to change the strip height but that don't seam to help</i><br>
<i>&gt; (first I thought the I/O card was to slow but it don't seam to be the</i><br>
<i>&gt; case, more likley some kind of strange behavior in the backend when it</i><br>
<i>&gt; is supposed to put the colors togehter to one picture?)</i><br>
<p>
The backend's line distance correction is wrong for this firmware<br>
version. So the lines get all mixed up.<br>
<p>
<i>&gt; Is there any hope that this ever will work? (Btw, can I be sure that a</i><br>
<i>&gt; 'make install' will write over all previous installed version of the</i><br>
<i>&gt; same sane (1.0.1-3) or do I have to remove them manually?)</i><br>
<p>
If you use the standard tar.gz it will overwrite the libraries and<br>
binaries. It won't overwrite the .conf files. Precompiled packages<br>
(e.g. rpms) will possibly use other directories so they won't be<br>
overwritten.<br>
<p>
If I change something in the source code I will just do "make clean;<br>
make; make install".<br>
<p>
<i>&gt; Is it my scanner that is being evil or is it just not compatible with</i><br>
<i>&gt; SANE?</i><br>
<p>
Both :-) But it should work with the patch applied. If you read the<br>
archives carefully some could manage to use this scanner.<br>
<p>
Bye, Henning<br>
<p>
<p>
--h31gzZEtNLTqOjlF<br>
Content-Type: text/plain; charset=us-ascii<br>
Content-Description: patch file for sane 1.0.1<br>
Content-Disposition: attachment; filename="sane8.dif"<br>
<p>
diff -ru sane-1.0.1/backend/mustek.c sane-1.0.1.patched/backend/mustek.c<br>
--- sane-1.0.1/backend/mustek.c Sat Apr 3 07:02:21 1999<br>
+++ sane-1.0.1.patched/backend/mustek.c Sun Nov 28 17:11:36 1999<br>
@@ -1873,7 +1873,7 @@<br>
}<br>
}<br>
<br>
- num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[2];<br>
+ num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[1];<br>
if (num_saved_lines &gt; 0)<br>
/* restore the previously saved lines: */<br>
memcpy (out, s-&gt;ld.buf[0], num_saved_lines * bpl);<br>
@@ -1883,10 +1883,10 @@<br>
if (++s-&gt;ld.lmod3 &gt;= 3)<br>
s-&gt;ld.lmod3 = 0;<br>
<br>
- c = color_seq[s-&gt;ld.lmod3];<br>
+ c = s-&gt;ld.lmod3;<br>
if (s-&gt;ld.index[c] &lt; 0)<br>
++s-&gt;ld.index[c];<br>
- else if (s-&gt;ld.index[c] &lt; s-&gt;params.lines)<br>
+ else /*if (s-&gt;ld.index[c] &lt; s-&gt;params.lines)*/<br>
{<br>
s-&gt;ld.quant[c] += s-&gt;ld.peak_res;<br>
if (s-&gt;ld.quant[c] &gt; s-&gt;ld.max_value)<br>
@@ -1906,17 +1906,17 @@<br>
DBG (1, "fix_line_distance_pp: lmod3=%d, index=(%d,%d,%d)\n",<br>
s-&gt;ld.lmod3,<br>
s-&gt;ld.index[0], s-&gt;ld.index[1], s-&gt;ld.index[2]);<br>
- num_lines = s-&gt;ld.index[2] - s-&gt;ld.ld_line;<br>
+ num_lines = s-&gt;ld.index[1] - s-&gt;ld.ld_line;<br>
<br>
/* copy away the lines with at least one missing<br>
color component, so that we can interleave them<br>
with new scan data on the next call */<br>
- num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[2];<br>
+ num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[1];<br>
memcpy (s-&gt;ld.buf[0], out + num_lines * bpl,<br>
num_saved_lines * bpl);<br>
<br>
/* notice the number of lines we processed */<br>
- s-&gt;ld.ld_line = s-&gt;ld.index[2];<br>
+ s-&gt;ld.ld_line = s-&gt;ld.index[1];<br>
/* return number of complete (r+g+b) lines */<br>
return num_lines;<br>
}<br>
Only in sane-1.0.1.patched/backend: mustek.c.orig<br>
<p>
--h31gzZEtNLTqOjlF--<br>
<p>
<pre>
--
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">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0280.html">Oliver Rauch: "Re: Thanks"</a>
<li> <b>Previous message:</b> <a href="0278.html">Cyril Y. Nickonorov: "Thanks"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>