On Mon, 24 Sep 2007, Paul Eggert wrote:
Martin Koeppe <[EMAIL PROTECTED]> writes:
+ s = _("Unknown system error");
+ fprintf (stderr, ": %s (errno=%d)", s, errnum);
I like the idea, but that "errno=" grates a bit, as user diagnostics
shouldn't be so low-level. How about this instead?
fprintf (stderr, _(": Unknown system error number %d"), errnum);
Ok, I could live with that. My idea was not to change the original
string to avoid re-translation and to give a clear hint what this
number is meant to be, i.e. that's an errno value. The number alone is
probably of no use to any "normal" user anyway. (Though I first had
only "(%d)" myself.) OTOH if strerror() cannot resolve the errno
value, then there is probably a bigger problem in it, not a normally
occuring case (generating a user level diagnostic has just failed!),
and debugging should be made easy. I also think it's a good idea to
have ":" and "%d" not within the string for easy and uniform
translations. That's probably why %s is used that often I could
imagine.
But with your idea in a debug case one could grep through all the
source files and would also find that it is an errno value which has
been reported. So I'm not against your idea.
Martin
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils