kopia lustrzana https://gitlab.com/sane-project/website
64 wiersze
3.2 KiB
HTML
64 wiersze
3.2 KiB
HTML
<!-- received="Fri Apr 3 10:50:47 1998 PST" -->
|
|
<!-- sent="Fri, 3 Apr 1998 13:50:04 -0500 (EST)" -->
|
|
<!-- name="Matto Marjanovic" -->
|
|
<!-- email="maddog@mir.com" -->
|
|
<!-- subject="Re: sane_read returning *len == 0" -->
|
|
<!-- id="m0yLBXQ-000J1uC@yoo-hoo.ai.mit.edu" -->
|
|
<!-- inreplyto="sane_read returning *len == 0" -->
|
|
<title>sane-devel: Re: sane_read returning *len == 0</title>
|
|
<h1>Re: sane_read returning *len == 0</h1>
|
|
<b>Matto Marjanovic</b> (<a href="mailto:maddog@mir.com"><i>maddog@mir.com</i></a>)<br>
|
|
<i>Fri, 3 Apr 1998 13:50:04 -0500 (EST)</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#38">[ date ]</a><a href="index.html#38">[ thread ]</a><a href="subject.html#38">[ subject ]</a><a href="author.html#38">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0039.html">Jorgen Pehrson: "Olympys & Sane?"</a>
|
|
<li> <b>Previous message:</b> <a href="0037.html">Matto Marjanovic: "Re: pre-release available for testing"</a>
|
|
<li> <b>Maybe 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="0042.html">John Brush: "Can't figure it, maybe some one can tell me."</a>
|
|
<li> <b>Reply:</b> <a href="0042.html">John Brush: "Can't figure it, maybe some one can tell me."</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>
|
|
Doesn't it matter whether or not the IO mode is set to blocking versus<br>
|
|
non-blocking? The spec states that in blocking mode, sane_read must<br>
|
|
return at least one byte of data for each call, blocking until it's got<br>
|
|
at least that one byte to give (otherwise, a front-end would have to<br>
|
|
keep polling, yuck --- non-blocking mode allows you to do a select on<br>
|
|
the device and wake up when data arrives).<br>
|
|
<p>
|
|
So, if your backend is doing the simple blocking mode only, it *should*<br>
|
|
keep reading from from scanner until it has something to return to the<br>
|
|
frontend.<br>
|
|
<p>
|
|
-matt m.<br>
|
|
<p>
|
|
<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="0039.html">Jorgen Pehrson: "Olympys & Sane?"</a>
|
|
<li> <b>Previous message:</b> <a href="0037.html">Matto Marjanovic: "Re: pre-release available for testing"</a>
|
|
<li> <b>Maybe 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="0042.html">John Brush: "Can't figure it, maybe some one can tell me."</a>
|
|
<li> <b>Reply:</b> <a href="0042.html">John Brush: "Can't figure it, maybe some one can tell me."</a>
|
|
<!-- reply="end" -->
|
|
</ul>
|