kopia lustrzana https://gitlab.com/sane-project/website
88 wiersze
4.0 KiB
HTML
88 wiersze
4.0 KiB
HTML
<!-- received="Mon Jan 26 21:33:33 1998 PST" -->
|
|
<!-- sent="Mon, 26 Jan 1998 21:33:31 -0800" -->
|
|
<!-- name="David Mosberger-Tang" -->
|
|
<!-- email="David.Mosberger@acm.org" -->
|
|
<!-- subject="Re: Q: Developing a backend" -->
|
|
<!-- id="199801270533.VAA18976@panda.mostang.com" -->
|
|
<!-- inreplyto="34C8E6A6.2CA33BB@iit.nrcps.ariadne-t.gr" -->
|
|
<title>sane-devel: Re: Q: Developing a backend</title>
|
|
<h1>Re: Q: Developing a backend</h1>
|
|
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
|
|
<i>Mon, 26 Jan 1998 21:33:31 -0800</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#179">[ date ]</a><a href="index.html#179">[ thread ]</a><a href="subject.html#179">[ subject ]</a><a href="author.html#179">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0180.html">Mathias Weigt: "Re: Compile error on Slackware 3.3.0 Sane 0.69"</a>
|
|
<li> <b>Previous message:</b> <a href="0178.html">Bernd Seemann: "Re: Astra 6X0S-patch the second"</a>
|
|
<li> <b>In reply to:</b> <a href="0142.html">Vassilis Virvilis: "Q: Developing a backend"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
<i>>>>>> On Fri, 23 Jan 1998 20:51:18 +0200, Vassilis Virvilis <<a href="mailto:vasvir@iit.nrcps.ariadne-t.gr">vasvir@iit.nrcps.ariadne-t.gr</a>> said:</i><br>
|
|
<p>
|
|
Vassilis> 1 Does the below statement make any sense<br>
|
|
<p>
|
|
Vassilis> c=SANE_UNFIX(a+b);<br>
|
|
<p>
|
|
Vassilis> Is this somewhere close to c=SANE_UNFIX(a) + SANE_UNFIX(b);<br>
|
|
<p>
|
|
If a+b does not overflow, then the two expressions are identical<br>
|
|
(except for machines where "double" has less than 32 bits of<br>
|
|
precision).<br>
|
|
<p>
|
|
Vassilis> which one should be used?<br>
|
|
<p>
|
|
I'd say the latter is safer, as overflow is likely to be a bigger<br>
|
|
problem than loss of precision.<br>
|
|
<p>
|
|
Vassilis> 2 I noticed my sane_read is called with a buffer of<br>
|
|
Vassilis> 32768. Why is that? Has anything to do with SCSI_SG_BUF<br>
|
|
Vassilis> (or whatever the name is).<br>
|
|
<p>
|
|
No, that's the size of the buffer the frontend passes to it. It's<br>
|
|
unrelated to SCSI_SG_BUF. scanimage.c happens to use a 32KB buffer.<br>
|
|
<p>
|
|
Vassilis> 3 Should be the sane_controlo_option Reentrant? If not how<br>
|
|
Vassilis> am I going to handle complex dependancies without code<br>
|
|
Vassilis> doubling? I don't have this one very clear in my mind. I<br>
|
|
Vassilis> will be more specific when I 'll have my code handy...<br>
|
|
<p>
|
|
The SANE distribution is not designed for multi-threading. So doesn't<br>
|
|
have to be re-entrant in this sense. However, it must be re-entrant<br>
|
|
with respect to having multiple independent devices open at the same<br>
|
|
time (i.e., avoid global variables to hold scanner specific state).<br>
|
|
<p>
|
|
Vassilis> 4 My backend is based on sane-0.68. What issues must have<br>
|
|
Vassilis> in mind in order to be most portable with the newer<br>
|
|
Vassilis> sane's. Does the API changed?<br>
|
|
<p>
|
|
The API is meant to be fairly stable (at least until work on v2.0<br>
|
|
begins, which is still far in the future). I'd say: hack away, then<br>
|
|
lets take a look at your code.<br>
|
|
<p>
|
|
In general, I prefer if backends respect the GNU coding standard<br>
|
|
(available from prep.ai.mit.edu:/pub/gnu)---it makes it easier for me<br>
|
|
to maintain the many backends.<br>
|
|
<p>
|
|
Good luck,<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="0180.html">Mathias Weigt: "Re: Compile error on Slackware 3.3.0 Sane 0.69"</a>
|
|
<li> <b>Previous message:</b> <a href="0178.html">Bernd Seemann: "Re: Astra 6X0S-patch the second"</a>
|
|
<li> <b>In reply to:</b> <a href="0142.html">Vassilis Virvilis: "Q: Developing a backend"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|