I think redefining the functions as
pdf_status_t
pdf_stm_{read,peek}_char (pdf_stm_t stm,
pdf_char_t *ch)
would be the best way to report errors, since it makes the usage
obvious. pdf_stm_read and pdf_stm_write would need similar changes.
Comments?
I agree. We would be also removing the PDF_EOF special value, so the
posterior cast to pdf_char_t would not be needed. I will commit a
patch for this within the next hours.
A patch changing the interfaces of pdf_stm is now applied in the
trunk. Both pdf-filter and the unit tests has been adapted to use the
new API. The reference manual is also updated.