Re: EOF detection

From: Henning Meier-Geinitz (henning@meier-geinitz.de)
Date: Mon May 07 2001 - 15:04:22 PDT

  • Next message: regis rampnoux: "Snapscan ... again"

    Hi,

    On Mon, May 07, 2001 at 08:05:40PM +0200, Oliver Rauch wrote:
    > In fact this is not defined very fine in the standard.
    > But after a close look to the sources of scanimage/xscanimage/xsane
    > it looks like all frontends do handle it the same.
    > So we should mention in the standard that the also last sane_read
    > that reutrns valid image data has to return with SANE_STATUS_GOOD.

    It's not very clear but the standard mentions:

    "The number of bytes returned is stored in *len. A backend must set
    this to zero when the call fails (i.e., when a status other
    than SANE_STATUS_GOOD is returned)"

    So you can't return data if you don't return SANE_STATUS_GOOD.

    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 May 07 2001 - 14:58:04 PDT