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

Re: printversion could be more translation-friendly



Previously Santiago Vila wrote:
> 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.

I am only going to rely on certainties. In this case POSIX, and
preferably even less. And POSIX makes no guarantees that that fprintf
will flush the IO buffers as far as I can see.

As I already said, one could do a fflush after the fprintf and see
if that worked correctly, and we'll look into that after the 1.10
release.

At this moment people are already working on finalizing the translations
for 1.10 so this would be a bad moment to change a bunch of important
strings through the source. If that makes your life a bit harder now,
so be it.

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

dpkg is extremely careful about such things. If you think you know a
place where it doesn't properly check if output is done correctly let us
know and we'll investigate.

Wichert.

-- 
  _________________________________________________________________
 /wichert@wiggy.net         This space intentionally left occupied \
| wichert@deephackmode.org            http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |


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



Reply to: