Re: EOF detection

From: Oliver Rauch (oliver.rauch@rauch-domain.de)
Date: Tue May 08 2001 - 09:01:47 PDT

  • Next message: Marian Eichholz: "Re: EOF detection"

    Henning Meier-Geinitz wrote:
    >
    > 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.

    Yes, but you also can argue that SANE_STATUS_EOF is not a failure,
    only the info that there is no more data than returned by
    this sane_read command. It does not hurt to mention it explictly.

    Bye
    Oliver

    -- 
    Homepage:	http://www.rauch-domain.de
    sane-umax:	http://www.rauch-domain.de/sane-umax
    xsane:		http://www.xsane.org
    E-Mail:		mailto:Oliver.Rauch@rauch-domain.de
    

    -- 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 : Tue May 08 2001 - 08:54:28 PDT