Re: EOF detection

From: Marian Eichholz (marian.eichholz@freenet-ag.de)
Date: Thu May 10 2001 - 01:53:59 PDT

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

    Henning Meier-Geinitz wrote:
    >
    > Hi,
    >
    > On Tue, May 08, 2001 at 06:01:47PM +0200, Oliver Rauch wrote:
    > > > "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.
    >
    > Depends on what "i.e." is supposed to mean.

    :-) Point.

    >
    > > It does not hurt to mention it explictly.
    >
    > I think that's more clear:
    >
    > The number of bytes returned is stored in *len. A backend must set
    > this to zero when a status other than SANE_STATUS_GOOD is returned.
    >
    > Is this clear enough or should we add another sentence concerning
    > SANE_STATUS_EOF (in addition to "SANE_STATUS_EOF: No more data is
    > available for the current frame.")?

    If You say "No data is available in this frame" it will be more
    precisely, because de facto there must not be any data transferred in
    the call reporting SANE_STATUS_EOF.

    Or even more clearly and concisely stated:

      A backend must not transfer data, if it returns SANE_STATUS_EOF.

    -- 
    Mit freundlichen Gruessen / Yours sincerely
    

    Marian Eichholz

    - - - - - - - - - - - Marian Eichholz Postmaster freenet.de AG Vorsitzender des Aufsichtsrates: Gerhard Schmid Deelbögenkamp 4c Vorstand: Eckhard Spoerr (Vors.), Axel Krieger 22297 Hamburg Amtsgericht Hamburg, HRB 74048

    -- 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 May 10 2001 - 02:04:21 PDT