pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] pdf_function.c


From: jemarch
Subject: Re: [pdf-devel] pdf_function.c
Date: Wed, 24 Oct 2007 23:33:34 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.50 (powerpc-unknown-linux-gnu) MULE/5.0 (SAKAKI)

   > Maybe I am missing something, but I think that the following
   > code should work in order to read a NULL character.
   > ...
   > Both backends should support it.
   Yes, they do. However,
    I ran into an endless loop in skip_whitespace()
   because pdf_stm_read_char() returns c=0 if read_p() is false.
   It should return PDF_EOF instead, shouldn't it?

It has no sense to execute pdf_stm_read_char() in a stream when
read_p() return PDF_FALSE. read_p() indicates if the stream support
reading. Memory streams always support reading while file streams look
at the opening mode for the stream: if it is MODE_READ or MODE_RW then
pdf_read() return PDF_TRUE. It return true if the file stream was
opened in MODE_WRITE. So the return value of read_p() is fixed for
each stream and only depend on the mode specified in
pdf_create_stream(). 

   > That program could be included as a library utility in utils/
   > as `pdf_function'. Does it have a standard --help output? I
   > expect to automatically generate the manpages for all
   > utilities using the help2man program.
   >
   It is just a test driver, but --help will help me. 

Thanks.

-- 
Jose E. Marchesi  <address@hidden>
                  <address@hidden>

GNU Spain         http://es.gnu.org
GNU Project       http://www.gnu.org




reply via email to

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