pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] Status of PDF_ERROR versus PDF_EBADDATA


From: jemarch
Subject: Re: [pdf-devel] Status of PDF_ERROR versus PDF_EBADDATA
Date: Sat, 20 Feb 2010 16:15:15 +0100
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.1.91 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Jeff.

   Nearly all (if not all) of the pdf-types functions return PDF_ERROR if
   response to a required but missing parameter. For example,

       pdf_i64_t a, b;
       pdf_status_t status;
       pdf_i64_add(NULL, a, b, &status)

   would return PDF_ERROR even though PDF_EBADDATA specifies bad
   arguments into a function.

   Other sources, such as pdf-time, usually returns PDF_EBADDATA. Should
   the various functions in pdf-types respond with PDF_EBADDATA in this
   circumstance?

I pushed a patch fixing this, making the bignum functions to return
PDF_EBADDATA if a NULL pointer is passed and to return PDF_EDIVBYZERO
in division and modulus functions.

I also updated the documentation.  It was not up to date anyway.

Thanks.

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





reply via email to

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