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

Re: printversion could be more translation-friendly



Wichert Akkerman wrote:
> Previously Santiago Vila wrote:
> > Not tested, but if this is wrong I would like to know why:
>
> Because you don't check anymore if the text is succesfully printed.

Yes, I do:

  if (fprintf(stdout,
    _("Debian `%s' package management program version %s.\n"),
    DPKG, DPKG_VERSION_ARCH) < 0) werr("stdout");

If you don't trust a \n-terminated fprintf to do the right thing,
I suggest that you write your own version, rather than making the code
a hell to translate.

BTW: This is not the only place a fprintf is used in dpkg code. I wonder
if all the other ocurrences are "wrong" as well.


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



Reply to: