pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] I'm Back at last


From: jemarch
Subject: Re: [pdf-devel] I'm Back at last
Date: Thu, 13 Dec 2007 21:00:36 +0100
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

    >  pdf_p_<module-name>[_<module-component>].[ch]
    > 
    > What do you think?

   Sure, I like it. If everyone agrees change names ASAP :-)

I will change the source files soon.

   #define PDF_ERROR 1

Please define also PDF_OK 0

   enum pdf_error_t
   {
        /* foo module errros */
        PDF_EINVCHAR = 0,
        PDF_EINVSYNTAX,
        PDF_EEOF,
        /* memory module errors */
        PDF_EOUTOFMEM
        /* general errors */
        PDF_EFATAL
   };

Make sure to document these errors both with suitable comments and in 
the Library Reference Manual. As new error types are added the
documentation should be according updated.

   /* Print a message with `fprintf (stderr, FORMAT, ...)';
      if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
      If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
   extern void pdf_error (int status, int errnum, const char *format, ...);

Please make sure that the error strings conform to the GCS. 
I would also rename this function to `pdf_perror'. What are the data
structure containing the error descriptions?

   extern void pdf_error_at_line (int status, int errnum, const char *fname,
                                  unsigned int lineno, const char *format, ...);

Is this function intended to be used by clients of the error module?
`pdf_perror' could output __LINE__ and __FILE__ information too.

    > BTW, you will need a wiki account in order to write down the
    > architecture/design of the error module. I will create one and send you 
the
    > login information.

   Thanks, I just logged in.

Thanks.

--
José E. Marchesi  <address@hidden>

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




reply via email to

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