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

Re: printversion could be more translation-friendly



On Mon, 27 May 2002, Wichert Akkerman wrote:

> Previously Adam Heath wrote:
> > Why can't we just use fprintf(stdout) there?
>
> fprintf doesn't flush IO buffer and check for succesful writes.
> You could do a fprintf + fflush I guess.

Neither does fputs.

In fact, looking at both the manpage, and info docs(from glibc) for this
function seems to imply that there is no special handling.

I think the reason for using fputs, is that it does no allocation, and just
writes the data.  fprintf may allocate memory, to handle the format string.
And, when printing an error, we need to make certain the error gets displayed,
and not some later error that occurs while attempting to display the first
error.



-- 
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: