bug-mailutils
[Top][All Lists]
Advanced

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

mailutils use of fprintf()


From: Alain Magloire
Subject: mailutils use of fprintf()
Date: Tue, 24 Apr 2001 10:10:21 -0400 (EDT)

Bonjour

 1. Several sources from mailbox subdirectory call fprintf(stderr,...)
    to issue error messages. As the stderr usually gets connected to
    the output socket, the client program receives all these error
    messages and gets confused, since they do not start with
    rfc-compliant +OK, -ERR keywords. So I have added a module
    error.c and changed all these fprintf's to error()'s. Actual
    function that ouputs the messages can be supplied by the
    application using error_set_print() call. Source files
    mailbox/error.c and include/mailutils/error.h are contained in
    attachments 3 and 4.

Aggreed, on all points.  Changes done except for some cosmetics:
error () is a well know BSD function.  Munching this namespace would
be bad for application linking with libmailbox.{a.so}.  So I use
mu_error(), i.e. prefix the functions with "mu_".  Also note
that the mu_error() returns int, like fprintf() knowing the number
of byte written can be usefull.

Thanks. Patch done.




reply via email to

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