sane-project-website/old-archive/1999-02/0178.html

102 wiersze
4.4 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Thu Feb 25 12:02:29 1999 PST" -->
<!-- sent="Thu, 25 Feb 1999 20:34:35 +0100" -->
<!-- name="Svend Daugaard Pedersen" -->
<!-- email="sdp@vip.cybercity.dk" -->
<!-- subject="Porting SANE backends" -->
<!-- id="" -->
<!-- inreplyto="" -->
<title>sane-devel: Porting SANE backends</title>
<h1>Porting SANE backends</h1>
<b>Svend Daugaard Pedersen</b> (<a href="mailto:sdp@vip.cybercity.dk"><i>sdp@vip.cybercity.dk</i></a>)<br>
<i>Thu, 25 Feb 1999 20:34:35 +0100</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#178">[ date ]</a><a href="index.html#178">[ thread ]</a><a href="subject.html#178">[ subject ]</a><a href="author.html#178">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0179.html">Wing T. Wong: "Re: UMAX Astra 1200S lamp question"</a>
<li> <b>Previous message:</b> <a href="0177.html">Jeff Evarts: "Re: UMAX Astra 1200S lamp question"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0181.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0181.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0186.html">Milon Firikis: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0190.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0192.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0222.html">Milon Firikis: "Re: Porting SANE backends"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
I'm an Amiga user/programmer. I'm trying to port the SANE<br>
backends to the Amiga. Until now I have been able to port<br>
the backends for Canon, Epson, Microtek and SnapScan.<br>
<p>
I have to thank all the backend implementers for the work<br>
they have done.<br>
<p>
But during my work with porting the backend I have run into<br>
some problems. Most of these problems are in fact unnecessary<br>
because they are caused by the fact that the ANSI C standard<br>
is not followed.<br>
<p>
I have made a "don't" list that I would ask all backend authers<br>
to read (and follow :-))<br>
<p>
- don't use 'alloca()'<br>
this routine is not an ANSI routine and it is difficult<br>
(in many cases impossible) to implement in a C system not<br>
having it.<br>
<p>
- don't use '#pragma'<br>
pragmas are completely implementation dependant.<br>
<p>
- don't make any asumptions about the way variables are stored<br>
in memory a special problem here is that INTEL processors<br>
and M680xx processors stores words and long words in a<br>
different way (use only arrays of SANE_Byte to transfer<br>
data to or from the scanner). If you do not follow this<br>
advice your code can't even be ported between Intel and<br>
68K Linux.<br>
<p>
- don't use special/unusual parameter values<br>
a call like 'malloc(0)' is unlikely to be handled in the<br>
same way by all compilers.<br>
<p>
- don't use 'fork()' and related routines<br>
if you feel it is necessary, do it in a way that makes it<br>
easy to change the code (snapscan.c is a good example) or<br>
better: make this part of the code conditional.<br>
<p>
And here is a single 'do':<br>
<p>
- do read and follow the GUIDE in SANE/backend/<br>
<p>
<p>
The SANE project is a good initiative and it deserves to be<br>
implemented on more than only LINUX platforms<br>
<p>
<p>
Regards<br>
<p>
Svend Daugaard Pedersen<br>
<p>
<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="0179.html">Wing T. Wong: "Re: UMAX Astra 1200S lamp question"</a>
<li> <b>Previous message:</b> <a href="0177.html">Jeff Evarts: "Re: UMAX Astra 1200S lamp question"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0181.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0181.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0186.html">Milon Firikis: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0190.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0192.html">Oliver Rauch: "Re: Porting SANE backends"</a>
<li> <b>Reply:</b> <a href="0222.html">Milon Firikis: "Re: Porting SANE backends"</a>
<!-- reply="end" -->
</ul>