sane-project-website/old-archive/2001-05/0051.html

270 wiersze
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: New backend: UMAX 1220P sane'ification take 1</TITLE>
<META NAME="Author" CONTENT="Henning Meier-Geinitz (henning@meier-geinitz.de)">
<META NAME="Subject" CONTENT="Re: New backend: UMAX 1220P sane'ification take 1">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: New backend: UMAX 1220P sane'ification take 1</H1>
<!-- received="Thu May 3 13:05:24 2001" -->
<!-- isoreceived="20010503200524" -->
<!-- sent="Thu, 3 May 2001 22:14:48 +0200" -->
<!-- isosent="20010503201448" -->
<!-- name="Henning Meier-Geinitz" -->
<!-- email="henning@meier-geinitz.de" -->
<!-- subject="Re: New backend: UMAX 1220P sane'ification take 1" -->
<!-- id="20010503221447.E30124@vortex.swb.de" -->
<!-- inreplyto="20010503070123.A478@wanadoo.fr" -->
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:henning@meier-geinitz.de?Subject=Re:%20New%20backend:%20UMAX%201220P%20sane'ification%20take%201&In-Reply-To=&lt;20010503221447.E30124@vortex.swb.de&gt;"><EM>henning@meier-geinitz.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu May 03 2001 - 13:14:48 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0052.html">EdHamrick@aol.com: "Re: HP 7400c info / Minolta Scan Dual II"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0050.html">Henning Meier-Geinitz: "Re: SANE API &amp; file format"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0038.html">stef: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0066.html">stef: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0066.html">stef: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#51">[ date ]</A>
<A HREF="index.html#51">[ thread ]</A>
<A HREF="subject.html#51">[ subject ]</A>
<A HREF="author.html#51">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>the good news is that umax_pp is now included into SANE. I just
<BR>
committed your patch (sligthly modified) to the SANE CVS. Please test
<BR>
it because I'm not sure if I didn't make any mistakes. I've put a
<BR>
snapshot of current CVS at
<BR>
<A HREF="http://www.meier-geinitz.de/sane/sane-cvs-2001-05-03.tar.gz">http://www.meier-geinitz.de/sane/sane-cvs-2001-05-03.tar.gz</A>.
<BR>
<P>Some details:
<BR>
<P>On Thu, May 03, 2001 at 07:01:23AM +0200, stef wrote:
<BR>
<EM>&gt; &gt; Linking on Irix results in:
</EM><BR>
<EM>&gt; &gt;
</EM><BR>
<EM>&gt; &gt; gmake[1]: Entering directory /tmp/sane/sane-backends/tools'
</EM><BR>
<EM>&gt; &gt; cc -o umax_pp umax_pp.o ../backend/umax_pp_low.lo ../sanei/libsanei.a ../lib/liblib.a -lm
</EM><BR>
<EM>&gt; &gt; ld: WARNING 84: /usr/lib/libm.so is not used for resolving any symbol.
</EM><BR>
<EM>&gt; &gt; ld: ERROR 33: Unresolved text symbol &quot;inb&quot; -- 1st referenced by ../backend/umax_pp_low.lo.
</EM><BR>
<EM>&gt; &gt; ld: ERROR 33: Unresolved text symbol &quot;outb&quot; -- 1st referenced by ../backend/umax_pp_low.lo.
</EM><BR>
<EM>&gt; &gt; ld: ERROR 33: Unresolved text symbol &quot;insb&quot; -- 1st referenced by ../backend/umax_pp_low.lo.
</EM><BR>
<EM>&gt; &gt; ld: ERROR 33: Unresolved text symbol &quot;outsb&quot; -- 1st referenced by ../backend/umax_pp_low.lo.
</EM><BR>
<EM>&gt; &gt; ld: ERROR 33: Unresolved text symbol &quot;insl&quot; -- 1st referenced by ../backend/umax_pp_low.lo.
</EM><BR>
<EM>&gt; &gt; ld: ERROR 33: Unresolved text symbol &quot;outsw&quot; -- 1st referenced by ../backend/umax_pp_low.lo.
</EM><BR>
<EM>&gt; &gt; ld: INFO 152: Output file removed because of error.
</EM><BR>
<EM>&gt; &gt; gmake[1]: *** [umax_pp] Error 1
</EM><BR>
<EM>&gt; &gt;
</EM><BR>
<EM>&gt; &gt; With AIX similar errors occur.
</EM><BR>
<EM>&gt; &gt;
</EM><BR>
<EM>&gt; &gt; All these commands aren't defined for most platforms. SGI machines
</EM><BR>
<EM>&gt; &gt; maybe don't even have &quot;ports&quot;. You must check if these commands are
</EM><BR>
<EM>&gt; &gt; available. Look at sanei/sanei_ab306.c or other parport backends for
</EM><BR>
<EM>&gt; &gt; how to do that.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; cut and pasted for inb/outb .... insl, insb, outsb and outsw were added
</EM><BR>
<P>There were some remaining problems: In sanei_umax_pp_InitPort I had to
<BR>
write an #else part around the outb/inb. Also AIX seems to have
<BR>
sys/io.h, also, so I had to combine this test with HAVE_IOPERM. This
<BR>
is a hack, maybe it's better to do it like in sanei/sanei_ab306.c.
<BR>
<P><EM>&gt; &gt; Irix warnings when compiling (irix cc)
</EM><BR>
<EM>&gt; &gt; cfe: Warning 709: umax_pp.c, line 866: Incompatible pointer type assignment
</EM><BR>
<EM>&gt; &gt; free (devlist[0].sane.name);
</EM><BR>
<EM>&gt; &gt; ---------------------------^
</EM><BR>
<EM>&gt; &gt; cfe: Warning 709: umax_pp.c, line 880: Incompatible pointer type assignment
</EM><BR>
<EM>&gt; &gt; free (devlist[0].sane.model);
</EM><BR>
<EM>&gt; &gt; ---------------------------^
</EM><BR>
<EM>&gt; &gt; cfe: Warning 709: umax_pp.c, line 894: Incompatible pointer type assignment
</EM><BR>
<EM>&gt; &gt; free (devlist[0].sane.vendor);
</EM><BR>
<EM>&gt; &gt; ---------------------------^
</EM><BR>
<EM>&gt; &gt; cfe: Warning 709: umax_pp.c, line 925: Incompatible pointer type assignment
</EM><BR>
<EM>&gt; &gt; free (devlist[i].sane.name);
</EM><BR>
<EM>&gt; &gt; ---------------------------^
</EM><BR>
<EM>&gt; &gt; cfe: Warning 709: umax_pp.c, line 926: Incompatible pointer type assignment
</EM><BR>
<EM>&gt; &gt; free (devlist[i].sane.model);
</EM><BR>
<EM>&gt; &gt; ---------------------------^
</EM><BR>
<EM>&gt; &gt; cfe: Warning 709: umax_pp.c, line 927: Incompatible pointer type assignment
</EM><BR>
<EM>&gt; &gt; free (devlist[i].sane.vendor);
</EM><BR>
<EM>&gt; &gt; ---------------------------^
</EM><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>
One idea is to make temorary char* for these names and assign them to
<BR>
sane.vendor etc. when they are finally fixed. e.g. something like
<BR>
devlist[i].vendor = strdup ...; free (devlist[i].vendor); ...
<BR>
devlist[i].sane.vendor = devlist[i].vendor;
<BR>
<P><EM>&gt; &gt; umax_pp.c: In function sane_umax_pp_init':
</EM><BR>
<EM>&gt; &gt; umax_pp.c:626: warning: cast discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:645: warning: cast discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:845: warning: cast discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:859: warning: cast discards qualifiers from pointer target type
</EM><BR>
<P>I removed these together with the test for whitespace at the end of
<BR>
lines. This is done in sanei_config_read so it's not necessary to do
<BR>
it here.
<BR>
<P><EM>&gt; &gt; umax_pp.c:866: warning: passing arg 1 of free' discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:873: warning: cast discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:880: warning: passing arg 1 of free' discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:887: warning: cast discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:894: warning: passing arg 1 of free' discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c: In function sane_umax_pp_exit':
</EM><BR>
<EM>&gt; &gt; umax_pp.c:925: warning: passing arg 1 of free' discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:926: warning: passing arg 1 of free' discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt; umax_pp.c:927: warning: passing arg 1 of free' discards qualifiers from pointer target type
</EM><BR>
<EM>&gt; &gt;
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; This part is more tricky: these strings are SANE_String_Const type. But
</EM><BR>
<EM>&gt; we want to change them (while parsing conf file). At least the artec and mustek_pp
</EM><BR>
<EM>&gt; do the same (to be precise umax_pp does the same as mustek_pp).
</EM><BR>
<EM>&gt; So we can't avoid messages like &quot;cast discards qualifiers from pointer
</EM><BR>
<EM>&gt; target type&quot;, unless we use a SANE_Device struct &quot;copy&quot; with no const char *,
</EM><BR>
<EM>&gt; then assign it to 'real' SANE_Device struct, or change SANE_Device struc itself.
</EM><BR>
<P>Exactly.
<BR>
<P><EM>&gt; What should I do ? I haven't dig very much, but since many backends
</EM><BR>
<EM>&gt; do the same (grep'ing sane.name pop up many assignents), my personnal feeling
</EM><BR>
<EM>&gt; is that changing SANE_Device is a better solution.
</EM><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>
As this is in the SANE standard we won't change it (at least in SANE 1).
<BR>
But these warnings are not that important. When you do some work on
<BR>
your backend and find a nice way to remove them, it's ok. If there
<BR>
isn't a nice way, just ignore them.
<BR>
<P>If you have CVS write access you can now update your backend whenever
<BR>
you want. If you don't have it yet, ask Petter Reinholdtsen for access
<BR>
(there is some information on his CVS page
<BR>
<A HREF="http://www.student.uit.no/~pere/linux/sane/cvs-server.html">http://www.student.uit.no/~pere/linux/sane/cvs-server.html</A>).
<BR>
<P>Bye,
<BR>
&nbsp;&nbsp;Henning
<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?Subject=Re:%20New%20backend:%20UMAX%201220P%20sane'ification%20take%201&In-Reply-To=&lt;20010503221447.E30124@vortex.swb.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0052.html">EdHamrick@aol.com: "Re: HP 7400c info / Minolta Scan Dual II"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0050.html">Henning Meier-Geinitz: "Re: SANE API &amp; file format"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0038.html">stef: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0066.html">stef: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0066.html">stef: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#51">[ date ]</A>
<A HREF="index.html#51">[ thread ]</A>
<A HREF="subject.html#51">[ subject ]</A>
<A HREF="author.html#51">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu May 03 2001 - 13:06:03 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>