pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Missing stream backend error conditions.


From: Michael Gold
Subject: Re: [pdf-devel] Missing stream backend error conditions.
Date: Mon, 18 May 2009 22:25:18 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

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

[Prev in Thread] Current Thread [Next in Thread]