Re: [dev] New and updated backends

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Mon Apr 09 2001 - 11:09:31 PDT

  • Next message: Henning Meier-Geinitz: "Re: [dev] New and updated backends"

    Hi,

    On Mon, Apr 09, 2001 at 11:27:03AM +0200, Sebastien Sable wrote:
    > > * Update backends
    > > - include snapscan updates http://sourceforge.net/projects/snapscan
    >
    > This one would be great. Can I help in some way for this or will it be
    > done by someone else at some time (by the way, it is just a matter of
    > copying files at the right place)?

    I can do the commit to CVS. In the long run you should get CVS write
    access from Petter Reinholdtsen for further updates.

    > I still have two small patches to apply, so everything should be ready
    > by the end of the week.

    You may have a look at doc/backend-writing.txt if you haven't done
    yet. Especially testing over saned may help to find bugs.

    I just looked at the code. Some comments:

    * Add entries for the AUTHORS file
    * Include snapscan.txt into man page and update man page
    * Remove all C++-Style comments (//) --> breaks compilation on several
      systems
    * Compile with warnings enabled, fix warnings whereever possible
    * In snapscan-usb.c there are some sanei_* functions. I think they
      shouldn't be called sanei_ as long as there is nothing like
      sanei_usb.c. At least they should be static. Comments?

    Compilation under Linux/x86 works after removing the //.
    With Irix the following compilation errors occur:

    cc -c -g -DHAVE_CONFIG_H -I. -I. -I../include -I../include
    -D_GNU_SOURCE -DPATH_SANE_CONFIG_DIR=/tmp/sane-bin/etc/sane.d
    -DPATH_SANE_DATA_DIR=/tmp/sane-bin/share -DV_MAJOR=1 -DV_MINOR=0
    -DBACKEND_NAME=snapscan -DLIBDIR=/tmp/sane-bin/lib/sane snapscan.c
    -DPIC -o .libs/snapscan.lo
    cfe: Error: ./snapscan-usb.c, line 319: Unacceptable operand of '+'.
           if((status = usb_write(fd,src+cmdlen,datalen) ) != SANE_STATUS_GOOD) return status; ;
     ---------------------------------^
    cfe: Warning 740: ./snapscan-usb.c, line 360: conflicting declarations for 'bqhead'
     static struct usb_busy_queue *bqhead=0L ,*bqtail=0L ;
     ------------------------------^
    cfe: Warning 653: ./snapscan-usb.c, line 360: (previous declaration of 'bqhead' at line 42 in file './snapscan-usb.h')
     static struct usb_busy_queue *bqhead=0L ,*bqtail=0L ;
     ------------------------------^
    cfe: Warning 740: ./snapscan-usb.c, line 360: conflicting declarations for 'bqtail'
     static struct usb_busy_queue *bqhead=0L ,*bqtail=0L ;
     ------------------------------------------^
    cfe: Warning 653: ./snapscan-usb.c, line 360: (previous declaration of 'bqtail' at line 42 in file './snapscan-usb.h')
     static struct usb_busy_queue *bqhead=0L ,*bqtail=0L ;
     ------------------------------------------^
    gmake[1]: *** [snapscan.lo] Error 1

    I'm not sure about the first error, maybe it's because of doing
    pointer arithmetics with a void pointer? The bqhead errors are
    probably because they are defined as extern and defined again in the
    code. I couldn't fix the last thing quickly so there may be other
    compilation problems on Irix.

    It compiles on AIX but has quite some warnings. E.g.:

    snapscan-usb.c:319: warning: pointer of type `void *' used in arithmetic
    snapscan-usb.c:360: warning: static declaration for bqhead' follows non-static
    snapscan-usb.c:360: warning: static declaration for bqtail' follows non-static

    That's probably the same problem as for Irix.

    I can't test Sun Solaris at the moment.

    Bye,
      Henning

    --
    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 : Mon Apr 09 2001 - 10:52:58 PDT