help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] Feature requests: gettext


From: Tim Post
Subject: Re: [help-gengetopt] Feature requests: gettext
Date: Tue, 16 Sep 2008 19:03:01 +0800

On Tue, 2008-09-16 at 12:30 +0200, Lorenzo Bettini wrote:

> OK, now I see what you meant :-)

:)

> as I said, I can cross my heart on that... probably some years ago, but 
> I don't remember where... so probably I confused it with another program...

Actually we share the same foggy memory. Maybe it was BEOS? I can't put
my finger on it either. When I looked, I could not find it .. so it had
to have been something now off the 'radar'.

> however, I've always thought that libc itself was internationalized...

This is why getopt is a corner case.. most things in standard libc do
not print strings, they return allocated or modified strings. Most just
set errno meaningfully which we can make some sense of, most getopt
implementations do not set it, they just print static const strings.

Some have error handlers, but those handlers are not exposed and do not
set anything we can reach.

Getopt has instances where it either:

 - can not complete
 - warns a user why it can't complete

> > Its an interesting discussion :)
> 
> it is :-)

Perhaps it will lead to building the better getopt :) The modern getopt
should not use gettext, rather it should let us register a callback
function that prints and deciphers its noise according to weight. (5
being debug, 1 being error). That callback could then use gettext .. and
the issue would be solved.

This keeps extra dependencies out, but still makes internationalization
simple .. yes? :)

Cheers,
--Tim






reply via email to

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