pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] ASCII85 filter implementation Patch attached


From: jemarch
Subject: Re: [pdf-devel] ASCII85 filter implementation Patch attached
Date: Sun, 29 Nov 2009 15:24:39 +0100
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.92 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Scott.

Thanks for the patch.  Some comments follow.

    === modified file 'INSTALL'

Is there some specific reason to include an updated INSTALL file in
the patch?

    === modified file 'src/base/pdf-stm-f-a85.c'
    ...
    +#ifndef FALSE
    +#define FALSE 0
    +#endif
    +
    +#ifndef TRUE
    +#define TRUE (!FALSE)
    +#endif

Why not using PDF_TRUE and PDF_FALSE instead?  They are used in other
parts of pdf-stm-f-a85.c.

    +  if (filter_state==NULL)

Please put spaces between operands and binary operators.

In pdf_stm_f_a85enc_apply:

    +  /* Fill the output buffer with the contents of the input buffer, but
    +     note that the second may be bigger than the former */
    +

That comment seems to be copied from pdf_stm_f_null_apply.  It does
not make sense in the a85 encoder.

          Note that since 0000 is coded with 'z', this is an upper bound
          rather than the final length of the output buffer. 

That portion of the comment is only applicable to the old
implementation, that used an upper bound of the size of the generated
data to resize the output buffer.

    === added file 'torture/unit/base/stm/pdf-stm-f-a85dec-apply.c'

The unit tests contained in that file are exercising `pdf_stm_read',
and thus should be located in torture/unit/base/stm/pdf-stm-read.c

Finally, it seems that there is a problem while running the decoder
with cache=1 and newline characters in the input:

$ echo -ne "one\ntwo\nthree" | ./utils/pdf-filter --cache=1 --a85enc --a85dec
one
two
libgnupdf: writing to stream: error.

-- 
Jose E. Marchesi    address@hidden
GNU Project         http://www.gnu.org




reply via email to

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