[sane-devel] Last call for new backends

Martijn van Oosterhout kleptog at svana.org
Tue Apr 15 16:56:56 BST 2003


On Tue, Apr 15, 2003 at 01:59:44PM +0200, Henning Meier-Geinitz wrote:
> Hi,
> 
> On Tue, Apr 15, 2003 at 07:41:43PM +1000, Martijn van Oosterhout wrote:
> > FWIW, the main problem it has is getting testers. On all the scanners we've
> > tested (about 3 AFAIK) it works fine. It's never been tested on anything
> > other than linux, or on anything than i386 for that matter. I'm almost
> > expecting some endian-problems on other architectures but without an example
> > I can't check.
> 
> Endianess problems should only occur if you scan 16 bit images and
> access them as u_int16 mixed with u_int8. Or with any other data type
> 8 bits sent to the scanner directly.

I guess I wasn't clear. Many of the commands sent to the scanner consist of
integers (both 2 and 4 byte) and sometimes they are big endian, sometimes
little endian. So, the code has hton(l|s) in places and not in others.

To solve that we'd have to go through the entire code base checking that the
right bytes appear in the right places in each structure (maybe do away
with the structures altogether). That's a bit of work and I'd rather do that
when I have someone who can actually *test* the result.

Actually, params.xres = htons( xres ) would probably work fine on most
architectures. It's the more insidious little accesses that'll trip you up.
-- 
Martijn van Oosterhout   <kleptog at svana.org>   http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
>   - Samuel P. Huntington
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20030416/5c52a346/attachment.sig>


More information about the sane-devel mailing list