kopia lustrzana https://gitlab.com/sane-project/website
76 wiersze
4.0 KiB
HTML
76 wiersze
4.0 KiB
HTML
<!-- received="Fri Apr 3 00:31:52 1998 PST" -->
|
|
<!-- sent="Fri, 3 Apr 1998 00:31:50 -0800" -->
|
|
<!-- name="David Mosberger-Tang" -->
|
|
<!-- email="David.Mosberger@acm.org" -->
|
|
<!-- subject="Re: sane_read returning *len == 0" -->
|
|
<!-- id="199804030831.AAA01897@panda.mostang.com" -->
|
|
<!-- inreplyto="9804021735.AA01900@mulder.looney.infi.net" -->
|
|
<title>sane-devel: Re: sane_read returning *len == 0</title>
|
|
<h1>Re: sane_read returning *len == 0</h1>
|
|
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
|
|
<i>Fri, 3 Apr 1998 00:31:50 -0800</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#26">[ date ]</a><a href="index.html#26">[ thread ]</a><a href="subject.html#26">[ subject ]</a><a href="author.html#26">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0027.html">Arjen Schoneveld: "ScanExpress 12000 SP"</a>
|
|
<li> <b>Previous message:</b> <a href="0025.html">Rogier Wolff: "Re: Sane patches/observations on solaris 2.6/umax s6-e"</a>
|
|
<li> <b>In reply to:</b> <a href="0018.html">Chris Pinkham: "sane_read returning *len == 0"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0034.html">Chris Pinkham: "Re: sane_read returning *len == 0"</a>
|
|
<li> <b>Reply:</b> <a href="0034.html">Chris Pinkham: "Re: sane_read returning *len == 0"</a>
|
|
<li> <b>Reply:</b> <a href="0047.html">David Mosberger-Tang: "Re: sane_read returning *len == 0"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
<i>>>>>> On Thu, 2 Apr 1998 12:35:58 -0500 (EST), Chris Pinkham <<a href="mailto:cpinkham@billing.infi.net">cpinkham@billing.infi.net</a>> said:</i><br>
|
|
<p>
|
|
Chris> I am wondering what the defined action/status of sane_read()<br>
|
|
Chris> should be if when it returns, the *len == 0. Is this<br>
|
|
Chris> considered an error?<br>
|
|
<p>
|
|
No. It simply means that no data is available.<br>
|
|
<p>
|
|
Chris> The reason I ask is because I see this<br>
|
|
Chris> handled (or not handled) 2 different ways in xscanimage/xcam<br>
|
|
Chris> vs. scanimage. In working on the driver for my Artec<br>
|
|
Chris> scanner, to get it working quickly, I had sane_read() reading<br>
|
|
Chris> only 1 row of data from the scanner for each time the<br>
|
|
Chris> function is invoked. Since when in color mode, there is an<br>
|
|
Chris> offset between the RGB lines, the first few times sane_read()<br>
|
|
Chris> is called, *len is set to 0. The status is still set to<br>
|
|
Chris> SANE_STATUS_GOOD though. This works fine in scanimage<br>
|
|
Chris> because it only looks at the returned status of sane_read().<br>
|
|
Chris> In xscanimage and xcam though, I see that they check both the<br>
|
|
Chris> status of sane_read() and the value of *len. If *len == 0,<br>
|
|
Chris> they break out of the loop.<br>
|
|
<p>
|
|
This is indeed a bug. Can you try changing xscanimage.c around line<br>
|
|
584 to read like this:<br>
|
|
<p>
|
|
if (scan_win.input_tag >= 0 && !len)<br>
|
|
break; /* out of data for now */<br>
|
|
<p>
|
|
and tell me how it works?<br>
|
|
<p>
|
|
--david<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="0027.html">Arjen Schoneveld: "ScanExpress 12000 SP"</a>
|
|
<li> <b>Previous message:</b> <a href="0025.html">Rogier Wolff: "Re: Sane patches/observations on solaris 2.6/umax s6-e"</a>
|
|
<li> <b>In reply to:</b> <a href="0018.html">Chris Pinkham: "sane_read returning *len == 0"</a>
|
|
<!-- nextthread="start" -->
|
|
<li> <b>Next in thread:</b> <a href="0034.html">Chris Pinkham: "Re: sane_read returning *len == 0"</a>
|
|
<li> <b>Reply:</b> <a href="0034.html">Chris Pinkham: "Re: sane_read returning *len == 0"</a>
|
|
<li> <b>Reply:</b> <a href="0047.html">David Mosberger-Tang: "Re: sane_read returning *len == 0"</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|