On Mon, May 18, 2009 at 21:14:17 -0300, gerel wrote:
...
> Sure, it all comes down to one thing:  error != eof != no_read/written data.
> I believe the current code was meant to work mainly for memory backends.
> 
> So, the set of status code for Stm module read/write operations should be:
>       - PDF_OK
>       - PDF_EEOF (read)
>       - PDF_EAGAIN (read/write)
>       - PDF_ENOSPC (write)
>       - PDF_EINVOP (read for write mode and viceversa)
>       - PDF_ERROR (other error)
...

Those are good, but we may need a few more:
  - PDF_EBADFILE could be returned if a filter reads invalid data
  - PDF_EIO (not yet defined) if the backend has some kind of I/O error
  - maybe PDF_EIMPLLIMIT and PDF_ENOMEM if the filters can produce these

Also, EINTR either has to be handled in the backend (by retrying the
operation), or propagated upward.

-- Michael

Attachment: signature.asc
Description: Digital signature

Reply via email to