Re: Return values of sane_init() (Was: EOF detection)

From: Henning Meier-Geinitz (henning@meier-geinitz.de)
Date: Fri May 11 2001 - 10:13:15 PDT

  • Next message: Henning Meier-Geinitz: "Re: Xsane - winsane? was Re: saned won't run under inetd"

    Hi,

    On Thu, May 10, 2001 at 11:42:22PM +0200, Petter Reinholdtsen wrote:
    > While we are updating the SANE specification, parhaps it is time to
    > document the return values for sane_init()?
    >
    > SANE_STATUS_GOOD is clear, but what about the other values. Is it OK
    > to call any of the other sane_* functions if sane_init() failed?

    I think that's just undefined. We shouldn't change the current
    behaviour, just document it. In SANE 2 we can disallow calls to other
    SANE functions when the result of sane_init() is !SANE_STATUS_GOOD.

    This is from the old thread and copied from other parts of the standard:

    4.3.1 sane_init
    This function must be called before any other SANE function can be
    called. The behavior of a SANE backend is undefined if this function
    is not called first, or if the returned status is anything other then
    SANE_STATUS_GOOD.

    [...] The returned strings must be ASCII-NUL terminated.

    This function may fail with one of the following status codes.

    SANE_STATUS_UNSUPPORTED:
      The operation is not supported for the current configuration.
      number.
    SANE_STATUS_NO_MEM:
      An insufficent amount of memory is available.

    More?

    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 : Fri May 11 2001 - 10:14:38 PDT