Re: sane.init() and version_code

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Thu Jun 08 2000 - 09:47:38 PDT

  • Next message: Jochen Eisinger: "Re: New Interface sanei_pa4s2..."

    Hi,

    On Wed, Jun 07, 2000 at 10:44:11PM -0700, Randolph Bentson wrote:
    > I just discovered that sane_init didn't return a different version_code
    > when I upgraded from 1.0.1 to 1.0.2. I traced this back to discover
    > a decoupling between lines containing
    > VERSION=1.0.2

    This is the version of the SANE distribution.

    > found in include/sane/config.h and
    > #define SANE_VERSION_CODE(major, minor, build) \

    This is a macro to set up a version code for the backends. Only the first
    (major) part is fixed (it must be the major number of the SANE standard to
    which it conforms). The minor and build is up to the backend.

    These two versions don't correspond at the moment.

    > The "2" in "1.0.2" appears to be from "V_REV" in configure.in, but
    > "build" seems to get only the hard-coded value of "0" in all the backends.

    Not true at least for mustek and umax (at least the CVS versions). But you
    are right for most of the other backends. The minor and build version number
    can bes set by the backend at will. The recommendation is to increase minor
    with every realease and build with every build of the backend. As far as I
    see nobody follows this recommendation.

    > If the intent of "build" is to distinguish various builds of a given
    > backend, shouldn't the various backend drivers use something other
    > than "0",

    In my opinion, yes.

    > and don't we then need some way to get the V_REV out of the
    > whole package?

    You mean x.y.z with x=standard version, y=sane distribution version and
    z=build of backend? So the package would have a version of x.y. I think the
    sane package had 2-part version numbers some time ago (1.01?), I don't know
    why this was changed. I think this would be more consistant but I don't know
    if it's worth it.

    By the way: SANE standard 1.01 (two version numbers only) states that the
    API has version 0 (page 13, section 4). This is a typo, isn't it?

    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 : Thu Jun 08 2000 - 09:52:27 PDT