kopia lustrzana https://gitlab.com/sane-project/website
62 wiersze
2.6 KiB
HTML
62 wiersze
2.6 KiB
HTML
|
<!-- received="Sun Feb 28 13:20:07 1999 PST" -->
|
||
|
<!-- sent="Sun, 28 Feb 1999 13:19:55 -0800" -->
|
||
|
<!-- name="David Mosberger-Tang" -->
|
||
|
<!-- email="David.Mosberger@acm.org" -->
|
||
|
<!-- subject="Re: Epson backend" -->
|
||
|
<!-- id="199902282119.NAA07649@panda.mostang.com" -->
|
||
|
<!-- inreplyto="yam7727.2108.141046672@vip.cybercity.dk" -->
|
||
|
<title>sane-devel: Re: Epson backend</title>
|
||
|
<h1>Re: Epson backend</h1>
|
||
|
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
|
||
|
<i>Sun, 28 Feb 1999 13:19:55 -0800</i>
|
||
|
<p>
|
||
|
<ul>
|
||
|
<li> <b>Messages sorted by:</b> <a href="date.html#231">[ date ]</a><a href="index.html#231">[ thread ]</a><a href="subject.html#231">[ subject ]</a><a href="author.html#231">[ author ]</a>
|
||
|
<!-- next="start" -->
|
||
|
<li> <b>Next message:</b> <a href="0232.html">Dieter Poesl: "Mustek ScanExpress 12000SP"</a>
|
||
|
<li> <b>Next message:</b> <a href="0232.html">Bob Campbell: "Re: SANE and MicroTek ScanMaker X6"</a>
|
||
|
<li> <b>Previous message:</b> <a href="0230.html">Zygo Blaxell: "Re: UMAX Astra 1200S lamp question"</a>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
</ul>
|
||
|
<!-- body="start" -->
|
||
|
<i>>>>>> On Sat, 27 Feb 1999 21:53:42 +0100, Svend Daugaard Pedersen <<a href="mailto:sdp@vip.cybercity.dk">sdp@vip.cybercity.dk</a>> said:</i><br>
|
||
|
<p>
|
||
|
Svend> I have not made the "final" solution to this problem. Since<br>
|
||
|
Svend> my version of the code is to be used on M680x0 I swapped the<br>
|
||
|
Svend> to bytes in the 16 bit word<br>
|
||
|
<p>
|
||
|
Svend> wordSwap(head->count);<br>
|
||
|
<p>
|
||
|
Svend> by using this macro:<br>
|
||
|
<p>
|
||
|
Svend> #define wordSwap(X) {u_char b;u_char*<br>
|
||
|
Svend> bp=(u_char*)&(X);b=*bp;*( bp++)=*bp;*bp=b;}<br>
|
||
|
<p>
|
||
|
This is just as non-portable as the original code. What you should do<br>
|
||
|
is change the struture declaration to use:<br>
|
||
|
<p>
|
||
|
u_char count[2]<br>
|
||
|
<p>
|
||
|
instead of u_short count. Then you can get the count using the expression:<br>
|
||
|
<p>
|
||
|
(head->count[0] | (head->count[1] << 8))<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="0232.html">Dieter Poesl: "Mustek ScanExpress 12000SP"</a>
|
||
|
<li> <b>Next message:</b> <a href="0232.html">Bob Campbell: "Re: SANE and MicroTek ScanMaker X6"</a>
|
||
|
<li> <b>Previous message:</b> <a href="0230.html">Zygo Blaxell: "Re: UMAX Astra 1200S lamp question"</a>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
</ul>
|