sane-project-website/old-archive/1999-05/0015.html

89 wiersze
4.1 KiB
HTML

<!-- received="Sun May 2 17:57:21 1999 PDT" -->
<!-- sent="Mon, 3 May 1999 02:56:31 +0200 (MET DST)" -->
<!-- name="Ingo Wilken" -->
<!-- email="Ingo.Wilken@Informatik.Uni-Oldenburg.DE" -->
<!-- subject="Re: May sane_init fail?" -->
<!-- id="m10e727-0009zNC@petersfehn.Informatik.Uni-Oldenburg.DE" -->
<!-- inreplyto="199905022235.AAA30375@lee.Cc.Uit.No" -->
<title>sane-devel: Re: May sane_init fail?</title>
<h1>Re: May sane_init fail?</h1>
<b>Ingo Wilken</b> (<a href="mailto:Ingo.Wilken@Informatik.Uni-Oldenburg.DE"><i>Ingo.Wilken@Informatik.Uni-Oldenburg.DE</i></a>)<br>
<i>Mon, 3 May 1999 02:56:31 +0200 (MET DST)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#15">[ date ]</a><a href="index.html#15">[ thread ]</a><a href="subject.html#15">[ subject ]</a><a href="author.html#15">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0016.html">Graham Stoney: "Re: Possible fix for Sane 1.0.1 segfault in RedHat 5.1 (net)"</a>
<li> <b>Previous message:</b> <a href="0014.html">Petter Reinholdtsen: "Re: xsane default sizes"</a>
<li> <b>In reply to:</b> <a href="0012.html">Petter Reinholdtsen: "Re: May sane_init fail?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt; &gt; What's the suggested return values for a backend/SANE version</i><br>
<i>&gt; &gt; mismatch? I'm currently using SANE_STATUS_UNSUPPORTED (seems</i><br>
<i>&gt; &gt; logical), but SANE_STATUS_INVAL could be used too.</i><br>
<i>&gt; Eh, the version_code parameter is supposed to be used to report the</i><br>
<i>&gt; backends version code, right?</i><br>
<p>
I'm not talking about the version_code argument, but checking<br>
SANE_CURRENT_MAJOR in the backend. Let me quote from the docs:<br>
<p>
# SANE_CURRENT_MAJOR:<br>
# The value of this macro is the number of the SANE standard that<br>
# the interface implements.<br>
<p>
# ..., a backend always provides support for one and only one version of the<br>
# standard.<br>
<p>
This seems to imply that any backend has to look at SANE_CURRENT_MAJOR<br>
to check if it's compatible with the interface (i.e., the library).<br>
<p>
# SANE version control also includes a minor version number and a build<br>
# revision. While control of these numbers remains with the implementor<br>
# of a backend, the recommended use is as follows. The minor version is<br>
# incremented with each official release of a backend. The build<br>
# revision is increased with each build of a backend.<br>
<p>
English is not my first language, but "these numbers" obviously refers to<br>
"a minor version number and a build revision". This whole paragraph clearly<br>
says that a backend has no control over it's own major version number - only<br>
the minor number and build revision. Conclusion: The backend's major number<br>
has to match the SANE major number.<br>
<p>
<p>
If my interpretation is wrong, the paragraph should be rewritten to avoid<br>
further mistakes - and this check removed from snapscan.c:<br>
<p>
/* version check */<br>
if (V_MAJOR != EXPECTED_MAJOR)<br>
{<br>
DBG (DL_MAJOR_ERROR,<br>
"%s: this version of the SnapScan backend is intended for use\n"<br>
"with SANE major version %ld, but the major version of this SANE\n"<br>
"release is %ld. Sorry, but you need a different version of\n"<br>
"this backend.\n\n",<br>
me, (long) /*SANE_CURRENT_MAJOR*/V_MAJOR, (long) EXPECTED_MAJOR);<br>
return SANE_STATUS_INVAL;<br>
}<br>
<p>
<p>
Regards,<br>
Ingo<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="0016.html">Graham Stoney: "Re: Possible fix for Sane 1.0.1 segfault in RedHat 5.1 (net)"</a>
<li> <b>Previous message:</b> <a href="0014.html">Petter Reinholdtsen: "Re: xsane default sizes"</a>
<li> <b>In reply to:</b> <a href="0012.html">Petter Reinholdtsen: "Re: May sane_init fail?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>