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: gerel
Subject: Re: [pdf-devel] I'm Back at last
Date: Thu, 13 Dec 2007 22:15:52 -0300

 > Please define also PDF_OK 0

Done.

 >    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.

Sure but notice I'm just adding trivial ones now, I'm not sure if they're right.

 > 
 >    /* 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. 

What is it ? Can you give me any link to that ?

 > I would also rename this function to `pdf_perror'.

It's declared as:

extern void pdf_perror (const char *str);

It usually has fewer parameters than pdf_error. You want it removed and change
"pdf_error" to "pdf_perror" ?

 > What are the data structure containing the error descriptions?

I forgot to add the extern declaration on the header.
They're defined on pdf_error.c:

const char * pdf_error_errlist [] =
{
        "invalid character",
        "invalid syntax",
        "end of file",
        "fatal error"
};

 >    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.

Sure, let's remove that one :-)


-gerel




reply via email to

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