Re: New backends for SANE 1.0.4

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Wed Nov 08 2000 - 13:06:06 PST

  • Next message: Karsten Festag: "Re: New backends for SANE 1.0.4"

    Hi,

    On Wed, Nov 08, 2000 at 10:02:02AM +0800, kwlee wrote:
    > I definitely hope this backend can be included in SANE 1.0.4 but as said,
    > i have no idea about desc or PROJECTS:(

    Ok, so I will have a closer look.

    > the only thing i have done is modify the Makefile and just compile my
    > backend. So, i hope someone can help me include my backend to
    > the config file or something like that, especially to put all my c++ and *
    > .h files
    > under viceo directory(there are too many files on my backend, so putting
    > them on one directory is a good choice) .

    Yes, definitely. I personally don't like these many files...
    especially because all other backends come with one (or few) .c
    file(s).

    > Other issues, i have read other mail about your concern on putting
    > backend on SANE 1.04:
    > .global variable to static var
    > .remove c++ // comment
    > I'm afraid i can not do it:( because there are too many c++ files with
    > hundred of global vars...

    Both are necessary. The // comments will break the build with older
    compilers (e.g. on Solaris, AIX and Irix). The global variables and
    functions without "static" can lead to a naming problems because they
    can occur in other backends, too.

    Some more points:

    * All this code is GPL? Add the GPL header to all of them.
    * Why is the prefix .cpp? Is there any c++ code in these files? Only C
      should be used in SANE
    * Don't use printf for messages. Use the DBG macros instead.
    * there are lots of warnings about comparison between signed and
      unsigned, unused vars, comma at end of enumerator list, etc.
    * the code doesn't seem to compile with all the warning options enabled
    * don't use "pragma" or any other gcc-specific directives
    * look at the file "GUIDE" in the SANE distribution for some more hints
    * write a man page

    I was surprised a bit because the code is this big (ca. 500 kb source
    code) in comparison to the compiled library (ca. 50k). Is all of the
    code used in the library?

    As far as I see there is quite some work to do. So I suggest to not
    include the backend into SANE 1.0.4. If you want to do the changes,
    you will have more time until SANE 1.0.5. This will give some time for
    testing, too.

    However, a viceo.desc file can be included now. Look at the other
    .desc files and the template file for examples and send your file to
    me. I can check it into CVS and add a PROJECTS entry, too.

    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 : Wed Nov 08 2000 - 13:22:56 PST