kopia lustrzana https://gitlab.com/sane-project/website
108 wiersze
5.1 KiB
HTML
108 wiersze
5.1 KiB
HTML
<!-- received="Wed May 13 23:05:11 1998 PDT" -->
|
|
<!-- sent="Wed, 13 May 1998 23:05:09 -0700" -->
|
|
<!-- name="David Mosberger-Tang" -->
|
|
<!-- email="David.Mosberger@acm.org" -->
|
|
<!-- subject="Re: sane 0.73 pre-test patch" -->
|
|
<!-- id="199805140605.XAA07988@panda.mostang.com" -->
|
|
<!-- inreplyto="m0yZqtZ-000J34C@yoo-hoo.ai.mit.edu" -->
|
|
<title>sane-devel: Re: sane 0.73 pre-test patch</title>
|
|
<h1>Re: sane 0.73 pre-test patch</h1>
|
|
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
|
|
<i>Wed, 13 May 1998 23:05:09 -0700</i>
|
|
<p>
|
|
<ul>
|
|
<li> <b>Messages sorted by:</b> <a href="date.html#165">[ date ]</a><a href="index.html#165">[ thread ]</a><a href="subject.html#165">[ subject ]</a><a href="author.html#165">[ author ]</a>
|
|
<!-- next="start" -->
|
|
<li> <b>Next message:</b> <a href="0166.html">Hugo van der Kooij: "Re: Need SCSI card advice"</a>
|
|
<li> <b>Previous message:</b> <a href="0164.html">charter@cs.ualberta.ca: "Re: problems with snapscan and scanimage"</a>
|
|
<li> <b>In reply to:</b> <a href="0163.html">Matto Marjanovic: "Re: sane 0.73 pre-test patch"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|
|
<!-- body="start" -->
|
|
<i>>>>>> On Thu, 14 May 1998 01:49:33 -0400 (EDT), Matto Marjanovic <<a href="mailto:maddog@mir.com">maddog@mir.com</a>> said:</i><br>
|
|
<p>
|
|
Matto> With regards to the new, smarter configuration code:<br>
|
|
<p>
|
|
Matto> a) It would be a good idea if the "attach" function which is<br>
|
|
Matto> passed to sane_config_attach_matching_devices() took an extra<br>
|
|
Matto> (void *) argument, to handle any additional data which it may<br>
|
|
Matto> need/return.<br>
|
|
<p>
|
|
I hope it won't be necessary. Rentrancy is not an issue since this is<br>
|
|
used during initialization only so it would be perfectly ok to use<br>
|
|
some static variables in the backend (the mustek backend does this,<br>
|
|
for example).<br>
|
|
<p>
|
|
Matto> b) sane_config_attach_matching_devices() should return<br>
|
|
Matto> something, at least maybe the results of the called attach<br>
|
|
Matto> function. One might want to know if it succeeds or not.<br>
|
|
<p>
|
|
No. It is/was a common mistake for backends to complain and stop if<br>
|
|
an attach during initialization fails. That's wrong (the attach<br>
|
|
during initialization should be considered a "probe") and with the<br>
|
|
current interface a backend writer simply can't make this mistake<br>
|
|
anymore (or so I hope).<br>
|
|
<p>
|
|
Matto> c) Might it not be cleaner if the attach_matching_devices<br>
|
|
Matto> code would simply return a list of appropriate device name<br>
|
|
Matto> strings, then the backend could go through and do what it<br>
|
|
Matto> wants to each entry? (This would eliminate (a), (b), and<br>
|
|
Matto> (f).)<br>
|
|
<p>
|
|
A matter of taste, I'd say.<br>
|
|
<p>
|
|
Matto> d) (Now, speaking from the perspective of the<br>
|
|
Matto> mentally-challenged Microtek firmware: ) Aside from the<br>
|
|
Matto> Microtek backend needing to look for at least five different<br>
|
|
Matto> vendor strings (something new every day), one of these<br>
|
|
Matto> strings is " " [8 spaces, returned by my very own E6]. The<br>
|
|
Matto> sanei_config2.c code correctly handles quoted strings,<br>
|
|
Matto> however the code which scans /proc/scsi (which has no quotes)<br>
|
|
Matto> discards all this 'whitespace'.<br>
|
|
<p>
|
|
That sounds ugly. I think we can fix it through (e).<br>
|
|
<p>
|
|
Matto> e) How about adding the "Type:" from /proc/scsi/scsi as well?<br>
|
|
Matto> "Scanner" is a good catch-all (except for the HP scanners),<br>
|
|
Matto> and since the average user has only one scanner, this doesn't<br>
|
|
Matto> hammer other devices.<br>
|
|
<p>
|
|
Matto> (as it stands, only "scsi * * * * *" works for the E6,<br>
|
|
Matto> which just assaults the entire scsi bus....)<br>
|
|
<p>
|
|
Yes, I thought of that too. I'll add it.<br>
|
|
<p>
|
|
Matto> f) A logic glitch: If a user does happen to have multiple<br>
|
|
Matto> scanners of the same type in his system, the config code will<br>
|
|
Matto> only attach the first one (after which, the function<br>
|
|
Matto> returns).<br>
|
|
<p>
|
|
I don't think so. It returns only if (*attach)() returns something<br>
|
|
other than SANE_STATUS_GOOD, which happens only when a fatal error<br>
|
|
occurs in the backend (such as when the mustek backend runs out of<br>
|
|
memory, for example). At least, that's the idea...<br>
|
|
<p>
|
|
I integrated your fix for the microtek backend. Thanks for the<br>
|
|
feedback!<br>
|
|
<p>
|
|
Cheers,<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="0166.html">Hugo van der Kooij: "Re: Need SCSI card advice"</a>
|
|
<li> <b>Previous message:</b> <a href="0164.html">charter@cs.ualberta.ca: "Re: problems with snapscan and scanimage"</a>
|
|
<li> <b>In reply to:</b> <a href="0163.html">Matto Marjanovic: "Re: sane 0.73 pre-test patch"</a>
|
|
<!-- nextthread="start" -->
|
|
<!-- reply="end" -->
|
|
</ul>
|