Re: New backend: UMAX 1220P sane'ification take 1

From: stef (stef-listes@wanadoo.fr)
Date: Wed May 02 2001 - 22:01:23 PDT

  • Next message: v.demartino@tin.it: "A simple question"

    On Tue, May 01, 2001 at 09:06:54PM +0200, Henning Meier-Geinitz wrote:
    > Hi,
    >
    > On Tue, May 01, 2001 at 02:03:55PM +0200, stef wrote:
    > > A fixed version of the UMAX 1220P backend is available at :
    > > ftp://umax1220p.sourceforge.net/pub/umax1220p/umax1220p-1.9.gz
    >
    > Sorry, I have found some more problems :-}:
    >
    > tools/Makefile.in: it's umax_pp_low.o not umax-low.lo

            fixed

    > umax_pp_low.c: On several occasions something is printed even if the
    > debug level is 0 (or not set). Use DBG(0, ...) only if
    > you are sure that you already detected a scanner that is
    > supported by your backend. Otherwise use level 1 or higher.

            changed debug level of few messages

    >
    > Compilation on Linux works now, there is one warning about
    > parport_name not used in umax_pp_low left (I don't have the necessary
    > lib/header file for ppdev).
    >

            fixed

    > Linking on Irix results in:
    >
    > gmake[1]: Entering directory /tmp/sane/sane-backends/tools'
    > cc -o umax_pp umax_pp.o ../backend/umax_pp_low.lo ../sanei/libsanei.a ../lib/liblib.a -lm
    > ld: WARNING 84: /usr/lib/libm.so is not used for resolving any symbol.
    > ld: ERROR 33: Unresolved text symbol "inb" -- 1st referenced by ../backend/umax_pp_low.lo.
    > ld: ERROR 33: Unresolved text symbol "outb" -- 1st referenced by ../backend/umax_pp_low.lo.
    > ld: ERROR 33: Unresolved text symbol "insb" -- 1st referenced by ../backend/umax_pp_low.lo.
    > ld: ERROR 33: Unresolved text symbol "outsb" -- 1st referenced by ../backend/umax_pp_low.lo.
    > ld: ERROR 33: Unresolved text symbol "insl" -- 1st referenced by ../backend/umax_pp_low.lo.
    > ld: ERROR 33: Unresolved text symbol "outsw" -- 1st referenced by ../backend/umax_pp_low.lo.
    > ld: INFO 152: Output file removed because of error.
    > gmake[1]: *** [umax_pp] Error 1
    >
    > With AIX similar errors occur.
    >
    > All these commands aren't defined for most platforms. SGI machines
    > maybe don't even have "ports". You must check if these commands are
    > available. Look at sanei/sanei_ab306.c or other parport backends for
    > how to do that.

            cut and pasted for inb/outb .... insl, insb, outsb and outsw were added
    >
    > Irix warnings when compiling (irix cc)
    > cfe: Warning 709: umax_pp.c, line 866: Incompatible pointer type assignment
    > free (devlist[0].sane.name);
    > ---------------------------^
    > cfe: Warning 709: umax_pp.c, line 880: Incompatible pointer type assignment
    > free (devlist[0].sane.model);
    > ---------------------------^
    > cfe: Warning 709: umax_pp.c, line 894: Incompatible pointer type assignment
    > free (devlist[0].sane.vendor);
    > ---------------------------^
    > cfe: Warning 709: umax_pp.c, line 925: Incompatible pointer type assignment
    > free (devlist[i].sane.name);
    > ---------------------------^
    > cfe: Warning 709: umax_pp.c, line 926: Incompatible pointer type assignment
    > free (devlist[i].sane.model);
    > ---------------------------^
    > cfe: Warning 709: umax_pp.c, line 927: Incompatible pointer type assignment
    > free (devlist[i].sane.vendor);
    > ---------------------------^
    >
    >
    > Here are the warnings from AIX (gcc):
    > umax_pp_low.c: In function sanei_umax_pp_InitPort':
    > umax_pp_low.c:389: warning: implicit declaration of function inb'
    > umax_pp_low.c:398: warning: implicit declaration of function outb'
    > umax_pp_low.c:354: warning: unused variable parport_name'
    > umax_pp_low.c:353: warning: unused variable mode'
    > umax_pp_low.c: In function Insb':
    > umax_pp_low.c:535: warning: implicit declaration of function insb'
    > umax_pp_low.c: In function Outsb':
    > umax_pp_low.c:541: warning: implicit declaration of function outsb'
    > umax_pp_low.c: In function Insw':
    > umax_pp_low.c:550: warning: implicit declaration of function insl'
    > umax_pp_low.c: In function Outsw':
    > umax_pp_low.c:556: warning: implicit declaration of function outsw'
    > umax_pp_low.c: At top level:
    > umax_pp_low.c:7623: warning: no previous prototype for sanei_umax_pp_gamma'

            prototype added for sanei_umax_pp_gamma
    > ---
    > umax_pp.c: In function sane_umax_pp_init':
    > umax_pp.c:626: warning: cast discards qualifiers from pointer target type
    > umax_pp.c:645: warning: cast discards qualifiers from pointer target type
    > umax_pp.c:845: warning: cast discards qualifiers from pointer target type
    > umax_pp.c:859: warning: cast discards qualifiers from pointer target type
    > umax_pp.c:866: warning: passing arg 1 of free' discards qualifiers from pointer target type
    > umax_pp.c:873: warning: cast discards qualifiers from pointer target type
    > umax_pp.c:880: warning: passing arg 1 of free' discards qualifiers from pointer target type
    > umax_pp.c:887: warning: cast discards qualifiers from pointer target type
    > umax_pp.c:894: warning: passing arg 1 of free' discards qualifiers from pointer target type
    > umax_pp.c: In function sane_umax_pp_exit':
    > umax_pp.c:925: warning: passing arg 1 of free' discards qualifiers from pointer target type
    > umax_pp.c:926: warning: passing arg 1 of free' discards qualifiers from pointer target type
    > umax_pp.c:927: warning: passing arg 1 of free' discards qualifiers from pointer target type
    >

            This part is more tricky: these strings are SANE_String_Const type. But
    we want to change them (while parsing conf file). At least the artec and mustek_pp
    do the same (to be precise umax_pp does the same as mustek_pp).
            So we can't avoid messages like "cast discards qualifiers from pointer
    target type", unless we use a SANE_Device struct "copy" with no const char *,
    then assign it to 'real' SANE_Device struct, or change SANE_Device struc itself.

            What should I do ? I haven't dig very much, but since many backends
    do the same (grep'ing sane.name pop up many assignents), my personnal feeling
    is that changing SANE_Device is a better solution.
            

    > Another thing:
    > Can yout backend freeze if no scanner is detected or a "wrong" scanner
    > is at the parport? Or can it confuse other parport scanners so that
    > they are not detected by their backend? If this is the case, better
    > comment out umax_pp in dll.conf and tell the user in the manpage to
    > enable it.
    >

            Yes, it can freeze or mess devices that are not UMAX scanners on the
    parallel port. So, we have to comment it out in dll.conf

    > Bye,
    > Henning
    >
    > --
    > Source code, list archive, and docs: http://www.mostang.com/sane/
    > To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Wed May 02 2001 - 21:48:10 PDT